aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kerrisk (man-pages) <mtk.manpages@gmail.com>2020-11-04 16:16:03 +0100
committerMichael Kerrisk (man-pages) <mtk.manpages@gmail.com>2020-11-05 07:37:49 +0100
commit91d99722d3f9b7ba88012206960957a7d3786efc (patch)
treed928f891d782cab9bbc98c1a2add8e897a103259
parentf26107ff7480a4cee24c043c908348d725899561 (diff)
downloadman-pages-posix-91d99722d3f9b7ba88012206960957a7d3786efc.tar.gz
Add pages long ago generated by Andries Brouwer for POSIX.1-2001 TC 1
-rw-r--r--man-pages-posix-2003/Changes12
-rw-r--r--man-pages-posix-2003/Makefile59
-rw-r--r--man-pages-posix-2003/POSIX-COPYRIGHT25
-rw-r--r--man-pages-posix-2003/README19
-rw-r--r--man-pages-posix-2003/man-pages-posix-2003-a.Announce31
-rw-r--r--man-pages-posix-2003/man-pages-posix-2003-a.lsm12
-rw-r--r--man-pages-posix-2003/man0p/aio.h.0p116
-rw-r--r--man-pages-posix-2003/man0p/assert.h.0p58
-rw-r--r--man-pages-posix-2003/man0p/complex.h.0p210
-rw-r--r--man-pages-posix-2003/man0p/cpio.h.0p70
-rw-r--r--man-pages-posix-2003/man0p/ctype.h.0p89
-rw-r--r--man-pages-posix-2003/man0p/dirent.h.0p125
-rw-r--r--man-pages-posix-2003/man0p/dlfcn.h.0p65
-rw-r--r--man-pages-posix-2003/man0p/errno.h.0p290
-rw-r--r--man-pages-posix-2003/man0p/fcntl.h.0p222
-rw-r--r--man-pages-posix-2003/man0p/fenv.h.0p247
-rw-r--r--man-pages-posix-2003/man0p/float.h.0p328
-rw-r--r--man-pages-posix-2003/man0p/fmtmsg.h.0p129
-rw-r--r--man-pages-posix-2003/man0p/fnmatch.h.0p65
-rw-r--r--man-pages-posix-2003/man0p/ftw.h.0p111
-rw-r--r--man-pages-posix-2003/man0p/glob.h.0p111
-rw-r--r--man-pages-posix-2003/man0p/grp.h.0p74
-rw-r--r--man-pages-posix-2003/man0p/iconv.h.0p54
-rw-r--r--man-pages-posix-2003/man0p/if.h.0p69
-rw-r--r--man-pages-posix-2003/man0p/in.h.0p315
-rw-r--r--man-pages-posix-2003/man0p/inet.h.0p79
-rw-r--r--man-pages-posix-2003/man0p/inttypes.h.0p163
-rw-r--r--man-pages-posix-2003/man0p/ipc.h.0p1
-rw-r--r--man-pages-posix-2003/man0p/iso646.h.0p71
-rw-r--r--man-pages-posix-2003/man0p/langinfo.h.0p360
-rw-r--r--man-pages-posix-2003/man0p/libgen.h.0p46
-rw-r--r--man-pages-posix-2003/man0p/limits.h.0p1044
-rw-r--r--man-pages-posix-2003/man0p/locale.h.0p117
-rw-r--r--man-pages-posix-2003/man0p/math.h.0p487
-rw-r--r--man-pages-posix-2003/man0p/mman.h.0p1
-rw-r--r--man-pages-posix-2003/man0p/monetary.h.0p53
-rw-r--r--man-pages-posix-2003/man0p/mqueue.h.0p88
-rw-r--r--man-pages-posix-2003/man0p/msg.h.0p1
-rw-r--r--man-pages-posix-2003/man0p/ndbm.h.0p84
-rw-r--r--man-pages-posix-2003/man0p/netdb.h.0p298
-rw-r--r--man-pages-posix-2003/man0p/nl_types.h.0p82
-rw-r--r--man-pages-posix-2003/man0p/poll.h.0p110
-rw-r--r--man-pages-posix-2003/man0p/pthread.h.0p385
-rw-r--r--man-pages-posix-2003/man0p/pwd.h.0p76
-rw-r--r--man-pages-posix-2003/man0p/regex.h.0p164
-rw-r--r--man-pages-posix-2003/man0p/resource.h.0p1
-rw-r--r--man-pages-posix-2003/man0p/sched.h.0p118
-rw-r--r--man-pages-posix-2003/man0p/search.h.0p90
-rw-r--r--man-pages-posix-2003/man0p/select.h.0p1
-rw-r--r--man-pages-posix-2003/man0p/sem.h.0p1
-rw-r--r--man-pages-posix-2003/man0p/semaphore.h.0p67
-rw-r--r--man-pages-posix-2003/man0p/setjmp.h.0p78
-rw-r--r--man-pages-posix-2003/man0p/shm.h.0p1
-rw-r--r--man-pages-posix-2003/man0p/signal.h.0p788
-rw-r--r--man-pages-posix-2003/man0p/socket.h.0p1
-rw-r--r--man-pages-posix-2003/man0p/spawn.h.0p128
-rw-r--r--man-pages-posix-2003/man0p/stat.h.0p1
-rw-r--r--man-pages-posix-2003/man0p/statvfs.h.0p1
-rw-r--r--man-pages-posix-2003/man0p/stdarg.h.0p161
-rw-r--r--man-pages-posix-2003/man0p/stdbool.h.0p54
-rw-r--r--man-pages-posix-2003/man0p/stddef.h.0p72
-rw-r--r--man-pages-posix-2003/man0p/stdint.h.0p578
-rw-r--r--man-pages-posix-2003/man0p/stdio.h.0p251
-rw-r--r--man-pages-posix-2003/man0p/stdlib.h.0p237
-rw-r--r--man-pages-posix-2003/man0p/string.h.0p102
-rw-r--r--man-pages-posix-2003/man0p/strings.h.0p55
-rw-r--r--man-pages-posix-2003/man0p/stropts.h.0p399
-rw-r--r--man-pages-posix-2003/man0p/sys_ipc.h.0p100
-rw-r--r--man-pages-posix-2003/man0p/sys_mman.h.0p229
-rw-r--r--man-pages-posix-2003/man0p/sys_msg.h.0p96
-rw-r--r--man-pages-posix-2003/man0p/sys_resource.h.0p158
-rw-r--r--man-pages-posix-2003/man0p/sys_select.h.0p115
-rw-r--r--man-pages-posix-2003/man0p/sys_sem.h.0p131
-rw-r--r--man-pages-posix-2003/man0p/sys_shm.h.0p99
-rw-r--r--man-pages-posix-2003/man0p/sys_socket.h.0p446
-rw-r--r--man-pages-posix-2003/man0p/sys_stat.h.0p355
-rw-r--r--man-pages-posix-2003/man0p/sys_statvfs.h.0p83
-rw-r--r--man-pages-posix-2003/man0p/sys_time.h.0p103
-rw-r--r--man-pages-posix-2003/man0p/sys_timeb.h.0p61
-rw-r--r--man-pages-posix-2003/man0p/sys_times.h.0p63
-rw-r--r--man-pages-posix-2003/man0p/sys_types.h.0p291
-rw-r--r--man-pages-posix-2003/man0p/sys_uio.h.0p71
-rw-r--r--man-pages-posix-2003/man0p/sys_un.h.0p62
-rw-r--r--man-pages-posix-2003/man0p/sys_utsname.h.0p64
-rw-r--r--man-pages-posix-2003/man0p/sys_wait.h.0p122
-rw-r--r--man-pages-posix-2003/man0p/syslog.h.0p159
-rw-r--r--man-pages-posix-2003/man0p/tar.h.0p79
-rw-r--r--man-pages-posix-2003/man0p/tcp.h.0p47
-rw-r--r--man-pages-posix-2003/man0p/termios.h.0p492
-rw-r--r--man-pages-posix-2003/man0p/tgmath.h.0p345
-rw-r--r--man-pages-posix-2003/man0p/time.h.0p244
-rw-r--r--man-pages-posix-2003/man0p/timeb.h.0p1
-rw-r--r--man-pages-posix-2003/man0p/times.h.0p1
-rw-r--r--man-pages-posix-2003/man0p/trace.h.0p293
-rw-r--r--man-pages-posix-2003/man0p/types.h.0p1
-rw-r--r--man-pages-posix-2003/man0p/ucontext.h.0p73
-rw-r--r--man-pages-posix-2003/man0p/uio.h.0p1
-rw-r--r--man-pages-posix-2003/man0p/ulimit.h.0p56
-rw-r--r--man-pages-posix-2003/man0p/un.h.0p1
-rw-r--r--man-pages-posix-2003/man0p/unistd.h.0p1396
-rw-r--r--man-pages-posix-2003/man0p/utime.h.0p62
-rw-r--r--man-pages-posix-2003/man0p/utmpx.h.0p104
-rw-r--r--man-pages-posix-2003/man0p/utsname.h.0p1
-rw-r--r--man-pages-posix-2003/man0p/wait.h.0p1
-rw-r--r--man-pages-posix-2003/man0p/wchar.h.0p242
-rw-r--r--man-pages-posix-2003/man0p/wctype.h.0p108
-rw-r--r--man-pages-posix-2003/man0p/wordexp.h.0p124
-rw-r--r--man-pages-posix-2003/man1p/admin.1p441
-rw-r--r--man-pages-posix-2003/man1p/alias.1p217
-rw-r--r--man-pages-posix-2003/man1p/ar.1p608
-rw-r--r--man-pages-posix-2003/man1p/asa.1p192
-rw-r--r--man-pages-posix-2003/man1p/at.1p711
-rw-r--r--man-pages-posix-2003/man1p/awk.1p2989
-rw-r--r--man-pages-posix-2003/man1p/basename.1p244
-rw-r--r--man-pages-posix-2003/man1p/batch.1p243
-rw-r--r--man-pages-posix-2003/man1p/bc.1p1359
-rw-r--r--man-pages-posix-2003/man1p/bg.1p210
-rw-r--r--man-pages-posix-2003/man1p/break.1p125
-rw-r--r--man-pages-posix-2003/man1p/c99.1p750
-rw-r--r--man-pages-posix-2003/man1p/cal.1p149
-rw-r--r--man-pages-posix-2003/man1p/cat.1p281
-rw-r--r--man-pages-posix-2003/man1p/cd.1p355
-rw-r--r--man-pages-posix-2003/man1p/cflow.1p255
-rw-r--r--man-pages-posix-2003/man1p/chgrp.1p217
-rw-r--r--man-pages-posix-2003/man1p/chmod.1p493
-rw-r--r--man-pages-posix-2003/man1p/chown.1p269
-rw-r--r--man-pages-posix-2003/man1p/cksum.1p356
-rw-r--r--man-pages-posix-2003/man1p/cmp.1p246
-rw-r--r--man-pages-posix-2003/man1p/colon.1p107
-rw-r--r--man-pages-posix-2003/man1p/comm.1p257
-rw-r--r--man-pages-posix-2003/man1p/command.1p489
-rw-r--r--man-pages-posix-2003/man1p/compress.1p221
-rw-r--r--man-pages-posix-2003/man1p/continue.1p107
-rw-r--r--man-pages-posix-2003/man1p/cp.1p639
-rw-r--r--man-pages-posix-2003/man1p/crontab.1p326
-rw-r--r--man-pages-posix-2003/man1p/csplit.1p274
-rw-r--r--man-pages-posix-2003/man1p/ctags.1p419
-rw-r--r--man-pages-posix-2003/man1p/cut.1p367
-rw-r--r--man-pages-posix-2003/man1p/cxref.1p186
-rw-r--r--man-pages-posix-2003/man1p/date.1p577
-rw-r--r--man-pages-posix-2003/man1p/dd.1p593
-rw-r--r--man-pages-posix-2003/man1p/delta.1p277
-rw-r--r--man-pages-posix-2003/man1p/df.1p301
-rw-r--r--man-pages-posix-2003/man1p/diff.1p651
-rw-r--r--man-pages-posix-2003/man1p/dirname.1p219
-rw-r--r--man-pages-posix-2003/man1p/dot.1p108
-rw-r--r--man-pages-posix-2003/man1p/du.1p249
-rw-r--r--man-pages-posix-2003/man1p/echo.1p251
-rw-r--r--man-pages-posix-2003/man1p/ed.1p1467
-rw-r--r--man-pages-posix-2003/man1p/env.1p238
-rw-r--r--man-pages-posix-2003/man1p/eval.1p96
-rw-r--r--man-pages-posix-2003/man1p/ex.1p6061
-rw-r--r--man-pages-posix-2003/man1p/exec.1p162
-rw-r--r--man-pages-posix-2003/man1p/exit.1p123
-rw-r--r--man-pages-posix-2003/man1p/expand.1p166
-rw-r--r--man-pages-posix-2003/man1p/export.1p165
-rw-r--r--man-pages-posix-2003/man1p/expr.1p416
-rw-r--r--man-pages-posix-2003/man1p/false.1p80
-rw-r--r--man-pages-posix-2003/man1p/fc.1p481
-rw-r--r--man-pages-posix-2003/man1p/fg.1p157
-rw-r--r--man-pages-posix-2003/man1p/file.1p791
-rw-r--r--man-pages-posix-2003/man1p/find.1p701
-rw-r--r--man-pages-posix-2003/man1p/fold.1p230
-rw-r--r--man-pages-posix-2003/man1p/fort77.1p505
-rw-r--r--man-pages-posix-2003/man1p/fuser.1p205
-rw-r--r--man-pages-posix-2003/man1p/gencat.1p242
-rw-r--r--man-pages-posix-2003/man1p/get.1p742
-rw-r--r--man-pages-posix-2003/man1p/getconf.1p464
-rw-r--r--man-pages-posix-2003/man1p/getopts.1p354
-rw-r--r--man-pages-posix-2003/man1p/grep.1p455
-rw-r--r--man-pages-posix-2003/man1p/hash.1p189
-rw-r--r--man-pages-posix-2003/man1p/head.1p181
-rw-r--r--man-pages-posix-2003/man1p/iconv.1p263
-rw-r--r--man-pages-posix-2003/man1p/id.1p328
-rw-r--r--man-pages-posix-2003/man1p/ipcrm.1p159
-rw-r--r--man-pages-posix-2003/man1p/ipcs.1p564
-rw-r--r--man-pages-posix-2003/man1p/jobs.1p318
-rw-r--r--man-pages-posix-2003/man1p/join.1p415
-rw-r--r--man-pages-posix-2003/man1p/kill.1p398
-rw-r--r--man-pages-posix-2003/man1p/lex.1p959
-rw-r--r--man-pages-posix-2003/man1p/link.1p132
-rw-r--r--man-pages-posix-2003/man1p/ln.1p267
-rw-r--r--man-pages-posix-2003/man1p/locale.1p446
-rw-r--r--man-pages-posix-2003/man1p/localedef.1p312
-rw-r--r--man-pages-posix-2003/man1p/logger.1p165
-rw-r--r--man-pages-posix-2003/man1p/logname.1p134
-rw-r--r--man-pages-posix-2003/man1p/lp.1p393
-rw-r--r--man-pages-posix-2003/man1p/ls.1p742
-rw-r--r--man-pages-posix-2003/man1p/m4.1p561
-rw-r--r--man-pages-posix-2003/man1p/mailx.1p2213
-rw-r--r--man-pages-posix-2003/man1p/make.1p1758
-rw-r--r--man-pages-posix-2003/man1p/man.1p249
-rw-r--r--man-pages-posix-2003/man1p/mesg.1p165
-rw-r--r--man-pages-posix-2003/man1p/mkdir.1p199
-rw-r--r--man-pages-posix-2003/man1p/mkfifo.1p168
-rw-r--r--man-pages-posix-2003/man1p/more.1p1074
-rw-r--r--man-pages-posix-2003/man1p/mv.1p381
-rw-r--r--man-pages-posix-2003/man1p/newgrp.1p272
-rw-r--r--man-pages-posix-2003/man1p/nice.1p258
-rw-r--r--man-pages-posix-2003/man1p/nl.1p290
-rw-r--r--man-pages-posix-2003/man1p/nm.1p397
-rw-r--r--man-pages-posix-2003/man1p/nohup.1p220
-rw-r--r--man-pages-posix-2003/man1p/od.1p647
-rw-r--r--man-pages-posix-2003/man1p/paste.1p305
-rw-r--r--man-pages-posix-2003/man1p/patch.1p514
-rw-r--r--man-pages-posix-2003/man1p/pathchk.1p363
-rw-r--r--man-pages-posix-2003/man1p/pax.1p2957
-rw-r--r--man-pages-posix-2003/man1p/pr.1p419
-rw-r--r--man-pages-posix-2003/man1p/printf.1p431
-rw-r--r--man-pages-posix-2003/man1p/prs.1p406
-rw-r--r--man-pages-posix-2003/man1p/ps.1p603
-rw-r--r--man-pages-posix-2003/man1p/pwd.1p161
-rw-r--r--man-pages-posix-2003/man1p/qalter.1p795
-rw-r--r--man-pages-posix-2003/man1p/qdel.1p180
-rw-r--r--man-pages-posix-2003/man1p/qhold.1p235
-rw-r--r--man-pages-posix-2003/man1p/qmove.1p159
-rw-r--r--man-pages-posix-2003/man1p/qmsg.1p219
-rw-r--r--man-pages-posix-2003/man1p/qrerun.1p151
-rw-r--r--man-pages-posix-2003/man1p/qrls.1p241
-rw-r--r--man-pages-posix-2003/man1p/qselect.1p768
-rw-r--r--man-pages-posix-2003/man1p/qsig.1p195
-rw-r--r--man-pages-posix-2003/man1p/qstat.1p373
-rw-r--r--man-pages-posix-2003/man1p/qsub.1p1029
-rw-r--r--man-pages-posix-2003/man1p/read.1p219
-rw-r--r--man-pages-posix-2003/man1p/readonly.1p156
-rw-r--r--man-pages-posix-2003/man1p/renice.1p256
-rw-r--r--man-pages-posix-2003/man1p/return.1p99
-rw-r--r--man-pages-posix-2003/man1p/rm.1p359
-rw-r--r--man-pages-posix-2003/man1p/rmdel.1p159
-rw-r--r--man-pages-posix-2003/man1p/rmdir.1p182
-rw-r--r--man-pages-posix-2003/man1p/sact.1p179
-rw-r--r--man-pages-posix-2003/man1p/sccs.1p416
-rw-r--r--man-pages-posix-2003/man1p/sed.1p738
-rw-r--r--man-pages-posix-2003/man1p/set.1p597
-rw-r--r--man-pages-posix-2003/man1p/sh.1p1363
-rw-r--r--man-pages-posix-2003/man1p/shift.1p98
-rw-r--r--man-pages-posix-2003/man1p/sleep.1p178
-rw-r--r--man-pages-posix-2003/man1p/sort.1p517
-rw-r--r--man-pages-posix-2003/man1p/split.1p263
-rw-r--r--man-pages-posix-2003/man1p/strings.1p227
-rw-r--r--man-pages-posix-2003/man1p/strip.1p133
-rw-r--r--man-pages-posix-2003/man1p/stty.1p702
-rw-r--r--man-pages-posix-2003/man1p/tabs.1p268
-rw-r--r--man-pages-posix-2003/man1p/tail.1p254
-rw-r--r--man-pages-posix-2003/man1p/talk.1p283
-rw-r--r--man-pages-posix-2003/man1p/tee.1p179
-rw-r--r--man-pages-posix-2003/man1p/test.1p762
-rw-r--r--man-pages-posix-2003/man1p/time.1p283
-rw-r--r--man-pages-posix-2003/man1p/times.1p107
-rw-r--r--man-pages-posix-2003/man1p/touch.1p349
-rw-r--r--man-pages-posix-2003/man1p/tput.1p233
-rw-r--r--man-pages-posix-2003/man1p/tr.1p543
-rw-r--r--man-pages-posix-2003/man1p/trap.1p245
-rw-r--r--man-pages-posix-2003/man1p/true.1p96
-rw-r--r--man-pages-posix-2003/man1p/tsort.1p159
-rw-r--r--man-pages-posix-2003/man1p/tty.1p152
-rw-r--r--man-pages-posix-2003/man1p/type.1p142
-rw-r--r--man-pages-posix-2003/man1p/ulimit.1p178
-rw-r--r--man-pages-posix-2003/man1p/umask.1p315
-rw-r--r--man-pages-posix-2003/man1p/unalias.1p151
-rw-r--r--man-pages-posix-2003/man1p/uname.1p205
-rw-r--r--man-pages-posix-2003/man1p/uncompress.1p168
-rw-r--r--man-pages-posix-2003/man1p/unexpand.1p187
-rw-r--r--man-pages-posix-2003/man1p/unget.1p179
-rw-r--r--man-pages-posix-2003/man1p/uniq.1p302
-rw-r--r--man-pages-posix-2003/man1p/unlink.1p129
-rw-r--r--man-pages-posix-2003/man1p/unset.1p147
-rw-r--r--man-pages-posix-2003/man1p/uucp.1p268
-rw-r--r--man-pages-posix-2003/man1p/uudecode.1p184
-rw-r--r--man-pages-posix-2003/man1p/uuencode.1p357
-rw-r--r--man-pages-posix-2003/man1p/uustat.1p164
-rw-r--r--man-pages-posix-2003/man1p/uux.1p300
-rw-r--r--man-pages-posix-2003/man1p/val.1p234
-rw-r--r--man-pages-posix-2003/man1p/vi.1p4968
-rw-r--r--man-pages-posix-2003/man1p/wait.1p319
-rw-r--r--man-pages-posix-2003/man1p/wc.1p235
-rw-r--r--man-pages-posix-2003/man1p/what.1p190
-rw-r--r--man-pages-posix-2003/man1p/who.1p316
-rw-r--r--man-pages-posix-2003/man1p/write.1p224
-rw-r--r--man-pages-posix-2003/man1p/xargs.1p520
-rw-r--r--man-pages-posix-2003/man1p/yacc.1p1290
-rw-r--r--man-pages-posix-2003/man1p/zcat.1p129
-rw-r--r--man-pages-posix-2003/man3p/FD_CLR.3p1
-rw-r--r--man-pages-posix-2003/man3p/FD_ISSET.3p1
-rw-r--r--man-pages-posix-2003/man3p/FD_SET.3p1
-rw-r--r--man-pages-posix-2003/man3p/FD_ZERO.3p1
-rw-r--r--man-pages-posix-2003/man3p/_Exit.3p1
-rw-r--r--man-pages-posix-2003/man3p/_exit.3p1
-rw-r--r--man-pages-posix-2003/man3p/_longjmp.3p1
-rw-r--r--man-pages-posix-2003/man3p/_setjmp.3p89
-rw-r--r--man-pages-posix-2003/man3p/_tolower.3p59
-rw-r--r--man-pages-posix-2003/man3p/_toupper.3p60
-rw-r--r--man-pages-posix-2003/man3p/a64l.3p107
-rw-r--r--man-pages-posix-2003/man3p/abort.3p110
-rw-r--r--man-pages-posix-2003/man3p/abs.3p60
-rw-r--r--man-pages-posix-2003/man3p/accept.3p154
-rw-r--r--man-pages-posix-2003/man3p/access.3p164
-rw-r--r--man-pages-posix-2003/man3p/acos.3p99
-rw-r--r--man-pages-posix-2003/man3p/acosf.3p1
-rw-r--r--man-pages-posix-2003/man3p/acosh.3p96
-rw-r--r--man-pages-posix-2003/man3p/acoshf.3p1
-rw-r--r--man-pages-posix-2003/man3p/acoshl.3p1
-rw-r--r--man-pages-posix-2003/man3p/acosl.3p1
-rw-r--r--man-pages-posix-2003/man3p/aio_cancel.3p99
-rw-r--r--man-pages-posix-2003/man3p/aio_error.3p80
-rw-r--r--man-pages-posix-2003/man3p/aio_fsync.3p133
-rw-r--r--man-pages-posix-2003/man3p/aio_read.3p169
-rw-r--r--man-pages-posix-2003/man3p/aio_return.3p86
-rw-r--r--man-pages-posix-2003/man3p/aio_suspend.3p106
-rw-r--r--man-pages-posix-2003/man3p/aio_write.3p171
-rw-r--r--man-pages-posix-2003/man3p/alarm.3p125
-rw-r--r--man-pages-posix-2003/man3p/asctime.3p145
-rw-r--r--man-pages-posix-2003/man3p/asctime_r.3p1
-rw-r--r--man-pages-posix-2003/man3p/asin.3p114
-rw-r--r--man-pages-posix-2003/man3p/asinf.3p1
-rw-r--r--man-pages-posix-2003/man3p/asinh.3p89
-rw-r--r--man-pages-posix-2003/man3p/asinhf.3p1
-rw-r--r--man-pages-posix-2003/man3p/asinhl.3p1
-rw-r--r--man-pages-posix-2003/man3p/asinl.3p1
-rw-r--r--man-pages-posix-2003/man3p/assert.3p72
-rw-r--r--man-pages-posix-2003/man3p/atan.3p92
-rw-r--r--man-pages-posix-2003/man3p/atan2.3p120
-rw-r--r--man-pages-posix-2003/man3p/atan2f.3p1
-rw-r--r--man-pages-posix-2003/man3p/atan2l.3p1
-rw-r--r--man-pages-posix-2003/man3p/atanf.3p1
-rw-r--r--man-pages-posix-2003/man3p/atanh.3p125
-rw-r--r--man-pages-posix-2003/man3p/atanhf.3p1
-rw-r--r--man-pages-posix-2003/man3p/atanhl.3p1
-rw-r--r--man-pages-posix-2003/man3p/atanl.3p1
-rw-r--r--man-pages-posix-2003/man3p/atexit.3p76
-rw-r--r--man-pages-posix-2003/man3p/atof.3p72
-rw-r--r--man-pages-posix-2003/man3p/atoi.3p92
-rw-r--r--man-pages-posix-2003/man3p/atol.3p84
-rw-r--r--man-pages-posix-2003/man3p/atoll.3p1
-rw-r--r--man-pages-posix-2003/man3p/basename.3p109
-rw-r--r--man-pages-posix-2003/man3p/bcmp.3p73
-rw-r--r--man-pages-posix-2003/man3p/bcopy.3p84
-rw-r--r--man-pages-posix-2003/man3p/bind.3p169
-rw-r--r--man-pages-posix-2003/man3p/bsd_signal.3p113
-rw-r--r--man-pages-posix-2003/man3p/bsearch.3p178
-rw-r--r--man-pages-posix-2003/man3p/btowc.3p66
-rw-r--r--man-pages-posix-2003/man3p/bzero.3p68
-rw-r--r--man-pages-posix-2003/man3p/cabs.3p59
-rw-r--r--man-pages-posix-2003/man3p/cabsf.3p1
-rw-r--r--man-pages-posix-2003/man3p/cabsl.3p1
-rw-r--r--man-pages-posix-2003/man3p/cacos.3p63
-rw-r--r--man-pages-posix-2003/man3p/cacosf.3p1
-rw-r--r--man-pages-posix-2003/man3p/cacosh.3p64
-rw-r--r--man-pages-posix-2003/man3p/cacoshf.3p1
-rw-r--r--man-pages-posix-2003/man3p/cacoshl.3p1
-rw-r--r--man-pages-posix-2003/man3p/cacosl.3p1
-rw-r--r--man-pages-posix-2003/man3p/calloc.3p81
-rw-r--r--man-pages-posix-2003/man3p/carg.3p62
-rw-r--r--man-pages-posix-2003/man3p/cargf.3p1
-rw-r--r--man-pages-posix-2003/man3p/cargl.3p1
-rw-r--r--man-pages-posix-2003/man3p/casin.3p64
-rw-r--r--man-pages-posix-2003/man3p/casinf.3p1
-rw-r--r--man-pages-posix-2003/man3p/casinh.3p64
-rw-r--r--man-pages-posix-2003/man3p/casinhf.3p1
-rw-r--r--man-pages-posix-2003/man3p/casinhl.3p1
-rw-r--r--man-pages-posix-2003/man3p/casinl.3p1
-rw-r--r--man-pages-posix-2003/man3p/catan.3p64
-rw-r--r--man-pages-posix-2003/man3p/catanf.3p1
-rw-r--r--man-pages-posix-2003/man3p/catanh.3p64
-rw-r--r--man-pages-posix-2003/man3p/catanhf.3p1
-rw-r--r--man-pages-posix-2003/man3p/catanhl.3p1
-rw-r--r--man-pages-posix-2003/man3p/catanl.3p1
-rw-r--r--man-pages-posix-2003/man3p/catclose.3p67
-rw-r--r--man-pages-posix-2003/man3p/catgets.3p92
-rw-r--r--man-pages-posix-2003/man3p/catopen.3p136
-rw-r--r--man-pages-posix-2003/man3p/cbrt.3p68
-rw-r--r--man-pages-posix-2003/man3p/cbrtf.3p1
-rw-r--r--man-pages-posix-2003/man3p/cbrtl.3p1
-rw-r--r--man-pages-posix-2003/man3p/ccos.3p59
-rw-r--r--man-pages-posix-2003/man3p/ccosf.3p1
-rw-r--r--man-pages-posix-2003/man3p/ccosh.3p59
-rw-r--r--man-pages-posix-2003/man3p/ccoshf.3p1
-rw-r--r--man-pages-posix-2003/man3p/ccoshl.3p1
-rw-r--r--man-pages-posix-2003/man3p/ccosl.3p1
-rw-r--r--man-pages-posix-2003/man3p/ceil.3p102
-rw-r--r--man-pages-posix-2003/man3p/ceilf.3p1
-rw-r--r--man-pages-posix-2003/man3p/ceill.3p1
-rw-r--r--man-pages-posix-2003/man3p/cexp.3p60
-rw-r--r--man-pages-posix-2003/man3p/cexpf.3p1
-rw-r--r--man-pages-posix-2003/man3p/cexpl.3p1
-rw-r--r--man-pages-posix-2003/man3p/cfgetispeed.3p111
-rw-r--r--man-pages-posix-2003/man3p/cfgetospeed.3p63
-rw-r--r--man-pages-posix-2003/man3p/cfsetispeed.3p75
-rw-r--r--man-pages-posix-2003/man3p/cfsetospeed.3p75
-rw-r--r--man-pages-posix-2003/man3p/chdir.3p108
-rw-r--r--man-pages-posix-2003/man3p/chmod.3p221
-rw-r--r--man-pages-posix-2003/man3p/chown.3p179
-rw-r--r--man-pages-posix-2003/man3p/cimag.3p67
-rw-r--r--man-pages-posix-2003/man3p/cimagf.3p1
-rw-r--r--man-pages-posix-2003/man3p/cimagl.3p1
-rw-r--r--man-pages-posix-2003/man3p/clearerr.3p56
-rw-r--r--man-pages-posix-2003/man3p/clock.3p76
-rw-r--r--man-pages-posix-2003/man3p/clock_getcpuclockid.3p86
-rw-r--r--man-pages-posix-2003/man3p/clock_getres.3p1
-rw-r--r--man-pages-posix-2003/man3p/clock_gettime.3p210
-rw-r--r--man-pages-posix-2003/man3p/clock_nanosleep.3p194
-rw-r--r--man-pages-posix-2003/man3p/clock_settime.3p1
-rw-r--r--man-pages-posix-2003/man3p/clog.3p64
-rw-r--r--man-pages-posix-2003/man3p/clogf.3p1
-rw-r--r--man-pages-posix-2003/man3p/clogl.3p1
-rw-r--r--man-pages-posix-2003/man3p/close.3p225
-rw-r--r--man-pages-posix-2003/man3p/closedir.3p93
-rw-r--r--man-pages-posix-2003/man3p/closelog.3p1
-rw-r--r--man-pages-posix-2003/man3p/confstr.3p225
-rw-r--r--man-pages-posix-2003/man3p/conj.3p60
-rw-r--r--man-pages-posix-2003/man3p/conjf.3p1
-rw-r--r--man-pages-posix-2003/man3p/conjl.3p1
-rw-r--r--man-pages-posix-2003/man3p/connect.3p225
-rw-r--r--man-pages-posix-2003/man3p/copysign.3p64
-rw-r--r--man-pages-posix-2003/man3p/copysignf.3p1
-rw-r--r--man-pages-posix-2003/man3p/copysignl.3p1
-rw-r--r--man-pages-posix-2003/man3p/cos.3p106
-rw-r--r--man-pages-posix-2003/man3p/cosf.3p1
-rw-r--r--man-pages-posix-2003/man3p/cosh.3p98
-rw-r--r--man-pages-posix-2003/man3p/coshf.3p1
-rw-r--r--man-pages-posix-2003/man3p/coshl.3p1
-rw-r--r--man-pages-posix-2003/man3p/cosl.3p1
-rw-r--r--man-pages-posix-2003/man3p/cpow.3p65
-rw-r--r--man-pages-posix-2003/man3p/cpowf.3p1
-rw-r--r--man-pages-posix-2003/man3p/cpowl.3p1
-rw-r--r--man-pages-posix-2003/man3p/cproj.3p88
-rw-r--r--man-pages-posix-2003/man3p/cprojf.3p1
-rw-r--r--man-pages-posix-2003/man3p/cprojl.3p1
-rw-r--r--man-pages-posix-2003/man3p/creal.3p67
-rw-r--r--man-pages-posix-2003/man3p/crealf.3p1
-rw-r--r--man-pages-posix-2003/man3p/creall.3p1
-rw-r--r--man-pages-posix-2003/man3p/creat.3p100
-rw-r--r--man-pages-posix-2003/man3p/crypt.3p137
-rw-r--r--man-pages-posix-2003/man3p/csin.3p59
-rw-r--r--man-pages-posix-2003/man3p/csinf.3p1
-rw-r--r--man-pages-posix-2003/man3p/csinh.3p59
-rw-r--r--man-pages-posix-2003/man3p/csinhf.3p1
-rw-r--r--man-pages-posix-2003/man3p/csinhl.3p1
-rw-r--r--man-pages-posix-2003/man3p/csinl.3p1
-rw-r--r--man-pages-posix-2003/man3p/csqrt.3p62
-rw-r--r--man-pages-posix-2003/man3p/csqrtf.3p1
-rw-r--r--man-pages-posix-2003/man3p/csqrtl.3p1
-rw-r--r--man-pages-posix-2003/man3p/ctan.3p59
-rw-r--r--man-pages-posix-2003/man3p/ctanf.3p1
-rw-r--r--man-pages-posix-2003/man3p/ctanh.3p59
-rw-r--r--man-pages-posix-2003/man3p/ctanhf.3p1
-rw-r--r--man-pages-posix-2003/man3p/ctanhl.3p1
-rw-r--r--man-pages-posix-2003/man3p/ctanl.3p1
-rw-r--r--man-pages-posix-2003/man3p/ctermid.3p115
-rw-r--r--man-pages-posix-2003/man3p/ctime.3p117
-rw-r--r--man-pages-posix-2003/man3p/ctime_r.3p1
-rw-r--r--man-pages-posix-2003/man3p/daylight.3p1
-rw-r--r--man-pages-posix-2003/man3p/dbm_clearerr.3p1
-rw-r--r--man-pages-posix-2003/man3p/dbm_close.3p1
-rw-r--r--man-pages-posix-2003/man3p/dbm_delete.3p1
-rw-r--r--man-pages-posix-2003/man3p/dbm_error.3p1
-rw-r--r--man-pages-posix-2003/man3p/dbm_fetch.3p1
-rw-r--r--man-pages-posix-2003/man3p/dbm_firstkey.3p1
-rw-r--r--man-pages-posix-2003/man3p/dbm_nextkey.3p1
-rw-r--r--man-pages-posix-2003/man3p/dbm_open.3p243
-rw-r--r--man-pages-posix-2003/man3p/dbm_store.3p1
-rw-r--r--man-pages-posix-2003/man3p/difftime.3p60
-rw-r--r--man-pages-posix-2003/man3p/dirname.3p141
-rw-r--r--man-pages-posix-2003/man3p/div.3p72
-rw-r--r--man-pages-posix-2003/man3p/dlclose.3p115
-rw-r--r--man-pages-posix-2003/man3p/dlerror.3p93
-rw-r--r--man-pages-posix-2003/man3p/dlopen.3p199
-rw-r--r--man-pages-posix-2003/man3p/dlsym.3p153
-rw-r--r--man-pages-posix-2003/man3p/drand48.3p172
-rw-r--r--man-pages-posix-2003/man3p/dup.3p199
-rw-r--r--man-pages-posix-2003/man3p/dup2.3p1
-rw-r--r--man-pages-posix-2003/man3p/ecvt.3p124
-rw-r--r--man-pages-posix-2003/man3p/encrypt.3p89
-rw-r--r--man-pages-posix-2003/man3p/endgrent.3p1
-rw-r--r--man-pages-posix-2003/man3p/endhostent.3p1
-rw-r--r--man-pages-posix-2003/man3p/endnetent.3p1
-rw-r--r--man-pages-posix-2003/man3p/endprotoent.3p1
-rw-r--r--man-pages-posix-2003/man3p/endpwent.3p1
-rw-r--r--man-pages-posix-2003/man3p/endservent.3p1
-rw-r--r--man-pages-posix-2003/man3p/endutxent.3p1
-rw-r--r--man-pages-posix-2003/man3p/environ.3p1
-rw-r--r--man-pages-posix-2003/man3p/erand48.3p1
-rw-r--r--man-pages-posix-2003/man3p/erf.3p96
-rw-r--r--man-pages-posix-2003/man3p/erfc.3p108
-rw-r--r--man-pages-posix-2003/man3p/erfcf.3p1
-rw-r--r--man-pages-posix-2003/man3p/erfcl.3p1
-rw-r--r--man-pages-posix-2003/man3p/erff.3p1
-rw-r--r--man-pages-posix-2003/man3p/erfl.3p1
-rw-r--r--man-pages-posix-2003/man3p/errno.3p79
-rw-r--r--man-pages-posix-2003/man3p/exec.3p868
-rw-r--r--man-pages-posix-2003/man3p/execl.3p1
-rw-r--r--man-pages-posix-2003/man3p/execle.3p1
-rw-r--r--man-pages-posix-2003/man3p/execlp.3p1
-rw-r--r--man-pages-posix-2003/man3p/execv.3p1
-rw-r--r--man-pages-posix-2003/man3p/execve.3p1
-rw-r--r--man-pages-posix-2003/man3p/execvp.3p1
-rw-r--r--man-pages-posix-2003/man3p/exit.3p385
-rw-r--r--man-pages-posix-2003/man3p/exp.3p121
-rw-r--r--man-pages-posix-2003/man3p/exp2.3p119
-rw-r--r--man-pages-posix-2003/man3p/exp2f.3p1
-rw-r--r--man-pages-posix-2003/man3p/exp2l.3p1
-rw-r--r--man-pages-posix-2003/man3p/expf.3p1
-rw-r--r--man-pages-posix-2003/man3p/expl.3p1
-rw-r--r--man-pages-posix-2003/man3p/expm1.3p130
-rw-r--r--man-pages-posix-2003/man3p/expm1f.3p1
-rw-r--r--man-pages-posix-2003/man3p/expm1l.3p1
-rw-r--r--man-pages-posix-2003/man3p/fabs.3p68
-rw-r--r--man-pages-posix-2003/man3p/fabsf.3p1
-rw-r--r--man-pages-posix-2003/man3p/fabsl.3p1
-rw-r--r--man-pages-posix-2003/man3p/fattach.3p171
-rw-r--r--man-pages-posix-2003/man3p/fchdir.3p85
-rw-r--r--man-pages-posix-2003/man3p/fchmod.3p119
-rw-r--r--man-pages-posix-2003/man3p/fchown.3p120
-rw-r--r--man-pages-posix-2003/man3p/fclose.3p127
-rw-r--r--man-pages-posix-2003/man3p/fcntl.3p481
-rw-r--r--man-pages-posix-2003/man3p/fcvt.3p1
-rw-r--r--man-pages-posix-2003/man3p/fdatasync.3p79
-rw-r--r--man-pages-posix-2003/man3p/fdetach.3p131
-rw-r--r--man-pages-posix-2003/man3p/fdim.3p116
-rw-r--r--man-pages-posix-2003/man3p/fdimf.3p1
-rw-r--r--man-pages-posix-2003/man3p/fdiml.3p1
-rw-r--r--man-pages-posix-2003/man3p/fdopen.3p143
-rw-r--r--man-pages-posix-2003/man3p/feclearexcept.3p60
-rw-r--r--man-pages-posix-2003/man3p/fegetenv.3p72
-rw-r--r--man-pages-posix-2003/man3p/fegetexceptflag.3p75
-rw-r--r--man-pages-posix-2003/man3p/fegetround.3p91
-rw-r--r--man-pages-posix-2003/man3p/feholdexcept.3p65
-rw-r--r--man-pages-posix-2003/man3p/feof.3p57
-rw-r--r--man-pages-posix-2003/man3p/feraiseexcept.3p71
-rw-r--r--man-pages-posix-2003/man3p/ferror.3p57
-rw-r--r--man-pages-posix-2003/man3p/fesetenv.3p1
-rw-r--r--man-pages-posix-2003/man3p/fesetexceptflag.3p1
-rw-r--r--man-pages-posix-2003/man3p/fesetround.3p1
-rw-r--r--man-pages-posix-2003/man3p/fetestexcept.3p82
-rw-r--r--man-pages-posix-2003/man3p/feupdateenv.3p85
-rw-r--r--man-pages-posix-2003/man3p/fflush.3p155
-rw-r--r--man-pages-posix-2003/man3p/ffs.3p59
-rw-r--r--man-pages-posix-2003/man3p/fgetc.3p125
-rw-r--r--man-pages-posix-2003/man3p/fgetpos.3p80
-rw-r--r--man-pages-posix-2003/man3p/fgets.3p92
-rw-r--r--man-pages-posix-2003/man3p/fgetwc.3p127
-rw-r--r--man-pages-posix-2003/man3p/fgetws.3p82
-rw-r--r--man-pages-posix-2003/man3p/fileno.3p72
-rw-r--r--man-pages-posix-2003/man3p/flockfile.3p129
-rw-r--r--man-pages-posix-2003/man3p/floor.3p102
-rw-r--r--man-pages-posix-2003/man3p/floorf.3p1
-rw-r--r--man-pages-posix-2003/man3p/floorl.3p1
-rw-r--r--man-pages-posix-2003/man3p/fma.3p141
-rw-r--r--man-pages-posix-2003/man3p/fmaf.3p1
-rw-r--r--man-pages-posix-2003/man3p/fmal.3p1
-rw-r--r--man-pages-posix-2003/man3p/fmax.3p69
-rw-r--r--man-pages-posix-2003/man3p/fmaxf.3p1
-rw-r--r--man-pages-posix-2003/man3p/fmaxl.3p1
-rw-r--r--man-pages-posix-2003/man3p/fmin.3p69
-rw-r--r--man-pages-posix-2003/man3p/fminf.3p1
-rw-r--r--man-pages-posix-2003/man3p/fminl.3p1
-rw-r--r--man-pages-posix-2003/man3p/fmod.3p119
-rw-r--r--man-pages-posix-2003/man3p/fmodf.3p1
-rw-r--r--man-pages-posix-2003/man3p/fmodl.3p1
-rw-r--r--man-pages-posix-2003/man3p/fmtmsg.3p256
-rw-r--r--man-pages-posix-2003/man3p/fnmatch.3p127
-rw-r--r--man-pages-posix-2003/man3p/fopen.3p241
-rw-r--r--man-pages-posix-2003/man3p/fork.3p363
-rw-r--r--man-pages-posix-2003/man3p/fpathconf.3p1
-rw-r--r--man-pages-posix-2003/man3p/fpclassify.3p62
-rw-r--r--man-pages-posix-2003/man3p/fprintf.3p1
-rw-r--r--man-pages-posix-2003/man3p/fputc.3p131
-rw-r--r--man-pages-posix-2003/man3p/fputs.3p91
-rw-r--r--man-pages-posix-2003/man3p/fputwc.3p133
-rw-r--r--man-pages-posix-2003/man3p/fputws.3p72
-rw-r--r--man-pages-posix-2003/man3p/fread.3p109
-rw-r--r--man-pages-posix-2003/man3p/free.3p66
-rw-r--r--man-pages-posix-2003/man3p/freeaddrinfo.3p1
-rw-r--r--man-pages-posix-2003/man3p/freopen.3p189
-rw-r--r--man-pages-posix-2003/man3p/frexp.3p76
-rw-r--r--man-pages-posix-2003/man3p/frexpf.3p1
-rw-r--r--man-pages-posix-2003/man3p/frexpl.3p1
-rw-r--r--man-pages-posix-2003/man3p/fscanf.3p1
-rw-r--r--man-pages-posix-2003/man3p/fseek.3p191
-rw-r--r--man-pages-posix-2003/man3p/fseeko.3p1
-rw-r--r--man-pages-posix-2003/man3p/fsetpos.3p132
-rw-r--r--man-pages-posix-2003/man3p/fstat.3p135
-rw-r--r--man-pages-posix-2003/man3p/fstatvfs.3p1
-rw-r--r--man-pages-posix-2003/man3p/fsync.3p126
-rw-r--r--man-pages-posix-2003/man3p/ftell.3p97
-rw-r--r--man-pages-posix-2003/man3p/ftello.3p1
-rw-r--r--man-pages-posix-2003/man3p/ftime.3p89
-rw-r--r--man-pages-posix-2003/man3p/ftok.3p145
-rw-r--r--man-pages-posix-2003/man3p/ftruncate.3p135
-rw-r--r--man-pages-posix-2003/man3p/ftrylockfile.3p1
-rw-r--r--man-pages-posix-2003/man3p/ftw.3p199
-rw-r--r--man-pages-posix-2003/man3p/funlockfile.3p1
-rw-r--r--man-pages-posix-2003/man3p/fwide.3p78
-rw-r--r--man-pages-posix-2003/man3p/fwprintf.3p1
-rw-r--r--man-pages-posix-2003/man3p/fwrite.3p85
-rw-r--r--man-pages-posix-2003/man3p/fwscanf.3p1
-rw-r--r--man-pages-posix-2003/man3p/gai_strerror.3p82
-rw-r--r--man-pages-posix-2003/man3p/gcvt.3p1
-rw-r--r--man-pages-posix-2003/man3p/getaddrinfo.3p317
-rw-r--r--man-pages-posix-2003/man3p/getc.3p69
-rw-r--r--man-pages-posix-2003/man3p/getc_unlocked.3p1
-rw-r--r--man-pages-posix-2003/man3p/getchar.3p59
-rw-r--r--man-pages-posix-2003/man3p/getchar_unlocked.3p162
-rw-r--r--man-pages-posix-2003/man3p/getcontext.3p106
-rw-r--r--man-pages-posix-2003/man3p/getcwd.3p150
-rw-r--r--man-pages-posix-2003/man3p/getdate.3p355
-rw-r--r--man-pages-posix-2003/man3p/getdate_err.3p1
-rw-r--r--man-pages-posix-2003/man3p/getegid.3p59
-rw-r--r--man-pages-posix-2003/man3p/getenv.3p162
-rw-r--r--man-pages-posix-2003/man3p/geteuid.3p59
-rw-r--r--man-pages-posix-2003/man3p/getgid.3p59
-rw-r--r--man-pages-posix-2003/man3p/getgrent.3p111
-rw-r--r--man-pages-posix-2003/man3p/getgrgid.3p147
-rw-r--r--man-pages-posix-2003/man3p/getgrgid_r.3p1
-rw-r--r--man-pages-posix-2003/man3p/getgrnam.3p124
-rw-r--r--man-pages-posix-2003/man3p/getgrnam_r.3p1
-rw-r--r--man-pages-posix-2003/man3p/getgroups.3p121
-rw-r--r--man-pages-posix-2003/man3p/gethostbyaddr.3p1
-rw-r--r--man-pages-posix-2003/man3p/gethostbyname.3p149
-rw-r--r--man-pages-posix-2003/man3p/gethostent.3p95
-rw-r--r--man-pages-posix-2003/man3p/gethostid.3p59
-rw-r--r--man-pages-posix-2003/man3p/gethostname.3p64
-rw-r--r--man-pages-posix-2003/man3p/getitimer.3p122
-rw-r--r--man-pages-posix-2003/man3p/getlogin.3p177
-rw-r--r--man-pages-posix-2003/man3p/getlogin_r.3p1
-rw-r--r--man-pages-posix-2003/man3p/getmsg.3p283
-rw-r--r--man-pages-posix-2003/man3p/getnameinfo.3p198
-rw-r--r--man-pages-posix-2003/man3p/getnetbyaddr.3p1
-rw-r--r--man-pages-posix-2003/man3p/getnetbyname.3p1
-rw-r--r--man-pages-posix-2003/man3p/getnetent.3p109
-rw-r--r--man-pages-posix-2003/man3p/getopt.3p326
-rw-r--r--man-pages-posix-2003/man3p/getpeername.3p95
-rw-r--r--man-pages-posix-2003/man3p/getpgid.3p78
-rw-r--r--man-pages-posix-2003/man3p/getpgrp.3p64
-rw-r--r--man-pages-posix-2003/man3p/getpid.3p59
-rw-r--r--man-pages-posix-2003/man3p/getpmsg.3p1
-rw-r--r--man-pages-posix-2003/man3p/getppid.3p60
-rw-r--r--man-pages-posix-2003/man3p/getpriority.3p180
-rw-r--r--man-pages-posix-2003/man3p/getprotobyname.3p1
-rw-r--r--man-pages-posix-2003/man3p/getprotobynumber.3p1
-rw-r--r--man-pages-posix-2003/man3p/getprotoent.3p109
-rw-r--r--man-pages-posix-2003/man3p/getpwent.3p136
-rw-r--r--man-pages-posix-2003/man3p/getpwnam.3p153
-rw-r--r--man-pages-posix-2003/man3p/getpwnam_r.3p1
-rw-r--r--man-pages-posix-2003/man3p/getpwuid.3p196
-rw-r--r--man-pages-posix-2003/man3p/getpwuid_r.3p1
-rw-r--r--man-pages-posix-2003/man3p/getrlimit.3p194
-rw-r--r--man-pages-posix-2003/man3p/getrusage.3p95
-rw-r--r--man-pages-posix-2003/man3p/gets.3p83
-rw-r--r--man-pages-posix-2003/man3p/getservbyname.3p1
-rw-r--r--man-pages-posix-2003/man3p/getservbyport.3p1
-rw-r--r--man-pages-posix-2003/man3p/getservent.3p119
-rw-r--r--man-pages-posix-2003/man3p/getsid.3p73
-rw-r--r--man-pages-posix-2003/man3p/getsockname.3p95
-rw-r--r--man-pages-posix-2003/man3p/getsockopt.3p232
-rw-r--r--man-pages-posix-2003/man3p/getsubopt.3p220
-rw-r--r--man-pages-posix-2003/man3p/gettimeofday.3p63
-rw-r--r--man-pages-posix-2003/man3p/getuid.3p74
-rw-r--r--man-pages-posix-2003/man3p/getutxent.3p1
-rw-r--r--man-pages-posix-2003/man3p/getutxid.3p204
-rw-r--r--man-pages-posix-2003/man3p/getutxline.3p1
-rw-r--r--man-pages-posix-2003/man3p/getwc.3p65
-rw-r--r--man-pages-posix-2003/man3p/getwchar.3p59
-rw-r--r--man-pages-posix-2003/man3p/getwd.3p79
-rw-r--r--man-pages-posix-2003/man3p/glob.3p359
-rw-r--r--man-pages-posix-2003/man3p/globfree.3p1
-rw-r--r--man-pages-posix-2003/man3p/gmtime.3p119
-rw-r--r--man-pages-posix-2003/man3p/gmtime_r.3p1
-rw-r--r--man-pages-posix-2003/man3p/grantpt.3p80
-rw-r--r--man-pages-posix-2003/man3p/h_errno.3p62
-rw-r--r--man-pages-posix-2003/man3p/hcreate.3p180
-rw-r--r--man-pages-posix-2003/man3p/hdestroy.3p1
-rw-r--r--man-pages-posix-2003/man3p/hsearch.3p1
-rw-r--r--man-pages-posix-2003/man3p/htonl.3p72
-rw-r--r--man-pages-posix-2003/man3p/htons.3p1
-rw-r--r--man-pages-posix-2003/man3p/hypot.3p122
-rw-r--r--man-pages-posix-2003/man3p/hypotf.3p1
-rw-r--r--man-pages-posix-2003/man3p/hypotl.3p1
-rw-r--r--man-pages-posix-2003/man3p/iconv.3p172
-rw-r--r--man-pages-posix-2003/man3p/iconv_close.3p66
-rw-r--r--man-pages-posix-2003/man3p/iconv_open.3p100
-rw-r--r--man-pages-posix-2003/man3p/if_freenameindex.3p60
-rw-r--r--man-pages-posix-2003/man3p/if_indextoname.3p70
-rw-r--r--man-pages-posix-2003/man3p/if_nameindex.3p70
-rw-r--r--man-pages-posix-2003/man3p/if_nametoindex.3p59
-rw-r--r--man-pages-posix-2003/man3p/ilogb.3p115
-rw-r--r--man-pages-posix-2003/man3p/ilogbf.3p1
-rw-r--r--man-pages-posix-2003/man3p/ilogbl.3p1
-rw-r--r--man-pages-posix-2003/man3p/imaxabs.3p58
-rw-r--r--man-pages-posix-2003/man3p/imaxdiv.3p64
-rw-r--r--man-pages-posix-2003/man3p/index.3p67
-rw-r--r--man-pages-posix-2003/man3p/inet_addr.3p110
-rw-r--r--man-pages-posix-2003/man3p/inet_ntoa.3p1
-rw-r--r--man-pages-posix-2003/man3p/inet_ntop.3p148
-rw-r--r--man-pages-posix-2003/man3p/inet_pton.3p1
-rw-r--r--man-pages-posix-2003/man3p/initstate.3p1
-rw-r--r--man-pages-posix-2003/man3p/insque.3p189
-rw-r--r--man-pages-posix-2003/man3p/ioctl.3p1063
-rw-r--r--man-pages-posix-2003/man3p/isalnum.3p71
-rw-r--r--man-pages-posix-2003/man3p/isalpha.3p70
-rw-r--r--man-pages-posix-2003/man3p/isascii.3p60
-rw-r--r--man-pages-posix-2003/man3p/isastream.3p64
-rw-r--r--man-pages-posix-2003/man3p/isatty.3p68
-rw-r--r--man-pages-posix-2003/man3p/isblank.3p71
-rw-r--r--man-pages-posix-2003/man3p/iscntrl.3p70
-rw-r--r--man-pages-posix-2003/man3p/isdigit.3p70
-rw-r--r--man-pages-posix-2003/man3p/isfinite.3p61
-rw-r--r--man-pages-posix-2003/man3p/isgraph.3p71
-rw-r--r--man-pages-posix-2003/man3p/isgreater.3p76
-rw-r--r--man-pages-posix-2003/man3p/isgreaterequal.3p77
-rw-r--r--man-pages-posix-2003/man3p/isinf.3p61
-rw-r--r--man-pages-posix-2003/man3p/isless.3p76
-rw-r--r--man-pages-posix-2003/man3p/islessequal.3p76
-rw-r--r--man-pages-posix-2003/man3p/islessgreater.3p78
-rw-r--r--man-pages-posix-2003/man3p/islower.3p98
-rw-r--r--man-pages-posix-2003/man3p/isnan.3p60
-rw-r--r--man-pages-posix-2003/man3p/isnormal.3p61
-rw-r--r--man-pages-posix-2003/man3p/isprint.3p70
-rw-r--r--man-pages-posix-2003/man3p/ispunct.3p70
-rw-r--r--man-pages-posix-2003/man3p/isspace.3p70
-rw-r--r--man-pages-posix-2003/man3p/isunordered.3p71
-rw-r--r--man-pages-posix-2003/man3p/isupper.3p70
-rw-r--r--man-pages-posix-2003/man3p/iswalnum.3p72
-rw-r--r--man-pages-posix-2003/man3p/iswalpha.3p72
-rw-r--r--man-pages-posix-2003/man3p/iswblank.3p71
-rw-r--r--man-pages-posix-2003/man3p/iswcntrl.3p71
-rw-r--r--man-pages-posix-2003/man3p/iswctype.3p110
-rw-r--r--man-pages-posix-2003/man3p/iswdigit.3p71
-rw-r--r--man-pages-posix-2003/man3p/iswgraph.3p71
-rw-r--r--man-pages-posix-2003/man3p/iswlower.3p71
-rw-r--r--man-pages-posix-2003/man3p/iswprint.3p71
-rw-r--r--man-pages-posix-2003/man3p/iswpunct.3p71
-rw-r--r--man-pages-posix-2003/man3p/iswspace.3p71
-rw-r--r--man-pages-posix-2003/man3p/iswupper.3p71
-rw-r--r--man-pages-posix-2003/man3p/iswxdigit.3p71
-rw-r--r--man-pages-posix-2003/man3p/isxdigit.3p71
-rw-r--r--man-pages-posix-2003/man3p/j0.3p93
-rw-r--r--man-pages-posix-2003/man3p/j1.3p1
-rw-r--r--man-pages-posix-2003/man3p/jn.3p1
-rw-r--r--man-pages-posix-2003/man3p/jrand48.3p1
-rw-r--r--man-pages-posix-2003/man3p/kill.3p211
-rw-r--r--man-pages-posix-2003/man3p/killpg.3p64
-rw-r--r--man-pages-posix-2003/man3p/l64a.3p1
-rw-r--r--man-pages-posix-2003/man3p/labs.3p63
-rw-r--r--man-pages-posix-2003/man3p/lchown.3p145
-rw-r--r--man-pages-posix-2003/man3p/lcong48.3p1
-rw-r--r--man-pages-posix-2003/man3p/ldexp.3p115
-rw-r--r--man-pages-posix-2003/man3p/ldexpf.3p1
-rw-r--r--man-pages-posix-2003/man3p/ldexpl.3p1
-rw-r--r--man-pages-posix-2003/man3p/ldiv.3p89
-rw-r--r--man-pages-posix-2003/man3p/lfind.3p1
-rw-r--r--man-pages-posix-2003/man3p/lgamma.3p123
-rw-r--r--man-pages-posix-2003/man3p/lgammaf.3p1
-rw-r--r--man-pages-posix-2003/man3p/lgammal.3p1
-rw-r--r--man-pages-posix-2003/man3p/link.3p207
-rw-r--r--man-pages-posix-2003/man3p/lio_listio.3p230
-rw-r--r--man-pages-posix-2003/man3p/listen.3p120
-rw-r--r--man-pages-posix-2003/man3p/llabs.3p1
-rw-r--r--man-pages-posix-2003/man3p/lldiv.3p1
-rw-r--r--man-pages-posix-2003/man3p/llrint.3p107
-rw-r--r--man-pages-posix-2003/man3p/llrintf.3p1
-rw-r--r--man-pages-posix-2003/man3p/llrintl.3p1
-rw-r--r--man-pages-posix-2003/man3p/llround.3p105
-rw-r--r--man-pages-posix-2003/man3p/llroundf.3p1
-rw-r--r--man-pages-posix-2003/man3p/llroundl.3p1
-rw-r--r--man-pages-posix-2003/man3p/localeconv.3p322
-rw-r--r--man-pages-posix-2003/man3p/localtime.3p205
-rw-r--r--man-pages-posix-2003/man3p/localtime_r.3p1
-rw-r--r--man-pages-posix-2003/man3p/lockf.3p229
-rw-r--r--man-pages-posix-2003/man3p/log.3p108
-rw-r--r--man-pages-posix-2003/man3p/log10.3p106
-rw-r--r--man-pages-posix-2003/man3p/log10f.3p1
-rw-r--r--man-pages-posix-2003/man3p/log10l.3p1
-rw-r--r--man-pages-posix-2003/man3p/log1p.3p117
-rw-r--r--man-pages-posix-2003/man3p/log1pf.3p1
-rw-r--r--man-pages-posix-2003/man3p/log1pl.3p1
-rw-r--r--man-pages-posix-2003/man3p/log2.3p105
-rw-r--r--man-pages-posix-2003/man3p/log2f.3p1
-rw-r--r--man-pages-posix-2003/man3p/log2l.3p1
-rw-r--r--man-pages-posix-2003/man3p/logb.3p107
-rw-r--r--man-pages-posix-2003/man3p/logbf.3p1
-rw-r--r--man-pages-posix-2003/man3p/logbl.3p1
-rw-r--r--man-pages-posix-2003/man3p/logf.3p1
-rw-r--r--man-pages-posix-2003/man3p/logl.3p1
-rw-r--r--man-pages-posix-2003/man3p/longjmp.3p105
-rw-r--r--man-pages-posix-2003/man3p/lrand48.3p1
-rw-r--r--man-pages-posix-2003/man3p/lrint.3p107
-rw-r--r--man-pages-posix-2003/man3p/lrintf.3p1
-rw-r--r--man-pages-posix-2003/man3p/lrintl.3p1
-rw-r--r--man-pages-posix-2003/man3p/lround.3p105
-rw-r--r--man-pages-posix-2003/man3p/lroundf.3p1
-rw-r--r--man-pages-posix-2003/man3p/lroundl.3p1
-rw-r--r--man-pages-posix-2003/man3p/lsearch.3p146
-rw-r--r--man-pages-posix-2003/man3p/lseek.3p138
-rw-r--r--man-pages-posix-2003/man3p/lstat.3p142
-rw-r--r--man-pages-posix-2003/man3p/makecontext.3p147
-rw-r--r--man-pages-posix-2003/man3p/malloc.3p79
-rw-r--r--man-pages-posix-2003/man3p/mblen.3p99
-rw-r--r--man-pages-posix-2003/man3p/mbrlen.3p112
-rw-r--r--man-pages-posix-2003/man3p/mbrtowc.3p127
-rw-r--r--man-pages-posix-2003/man3p/mbsinit.3p78
-rw-r--r--man-pages-posix-2003/man3p/mbsrtowcs.3p110
-rw-r--r--man-pages-posix-2003/man3p/mbstowcs.3p89
-rw-r--r--man-pages-posix-2003/man3p/mbtowc.3p97
-rw-r--r--man-pages-posix-2003/man3p/memccpy.3p66
-rw-r--r--man-pages-posix-2003/man3p/memchr.3p60
-rw-r--r--man-pages-posix-2003/man3p/memcmp.3p66
-rw-r--r--man-pages-posix-2003/man3p/memcpy.3p60
-rw-r--r--man-pages-posix-2003/man3p/memmove.3p62
-rw-r--r--man-pages-posix-2003/man3p/memset.3p57
-rw-r--r--man-pages-posix-2003/man3p/mkdir.3p166
-rw-r--r--man-pages-posix-2003/man3p/mkfifo.3p165
-rw-r--r--man-pages-posix-2003/man3p/mknod.3p212
-rw-r--r--man-pages-posix-2003/man3p/mkstemp.3p91
-rw-r--r--man-pages-posix-2003/man3p/mktemp.3p85
-rw-r--r--man-pages-posix-2003/man3p/mktime.3p128
-rw-r--r--man-pages-posix-2003/man3p/mlock.3p127
-rw-r--r--man-pages-posix-2003/man3p/mlockall.3p138
-rw-r--r--man-pages-posix-2003/man3p/mmap.3p515
-rw-r--r--man-pages-posix-2003/man3p/modf.3p84
-rw-r--r--man-pages-posix-2003/man3p/modff.3p1
-rw-r--r--man-pages-posix-2003/man3p/modfl.3p1
-rw-r--r--man-pages-posix-2003/man3p/mprotect.3p123
-rw-r--r--man-pages-posix-2003/man3p/mq_close.3p73
-rw-r--r--man-pages-posix-2003/man3p/mq_getattr.3p89
-rw-r--r--man-pages-posix-2003/man3p/mq_notify.3p93
-rw-r--r--man-pages-posix-2003/man3p/mq_open.3p200
-rw-r--r--man-pages-posix-2003/man3p/mq_receive.3p181
-rw-r--r--man-pages-posix-2003/man3p/mq_send.3p171
-rw-r--r--man-pages-posix-2003/man3p/mq_setattr.3p91
-rw-r--r--man-pages-posix-2003/man3p/mq_timedreceive.3p1
-rw-r--r--man-pages-posix-2003/man3p/mq_timedsend.3p1
-rw-r--r--man-pages-posix-2003/man3p/mq_unlink.3p84
-rw-r--r--man-pages-posix-2003/man3p/mrand48.3p1
-rw-r--r--man-pages-posix-2003/man3p/msgctl.3p135
-rw-r--r--man-pages-posix-2003/man3p/msgget.3p130
-rw-r--r--man-pages-posix-2003/man3p/msgrcv.3p219
-rw-r--r--man-pages-posix-2003/man3p/msgsnd.3p201
-rw-r--r--man-pages-posix-2003/man3p/msync.3p144
-rw-r--r--man-pages-posix-2003/man3p/munlock.3p1
-rw-r--r--man-pages-posix-2003/man3p/munlockall.3p1
-rw-r--r--man-pages-posix-2003/man3p/munmap.3p113
-rw-r--r--man-pages-posix-2003/man3p/nan.3p97
-rw-r--r--man-pages-posix-2003/man3p/nanf.3p1
-rw-r--r--man-pages-posix-2003/man3p/nanl.3p1
-rw-r--r--man-pages-posix-2003/man3p/nanosleep.3p113
-rw-r--r--man-pages-posix-2003/man3p/nearbyint.3p95
-rw-r--r--man-pages-posix-2003/man3p/nearbyintf.3p1
-rw-r--r--man-pages-posix-2003/man3p/nearbyintl.3p1
-rw-r--r--man-pages-posix-2003/man3p/nextafter.3p128
-rw-r--r--man-pages-posix-2003/man3p/nextafterf.3p1
-rw-r--r--man-pages-posix-2003/man3p/nextafterl.3p1
-rw-r--r--man-pages-posix-2003/man3p/nexttoward.3p1
-rw-r--r--man-pages-posix-2003/man3p/nexttowardf.3p1
-rw-r--r--man-pages-posix-2003/man3p/nexttowardl.3p1
-rw-r--r--man-pages-posix-2003/man3p/nftw.3p258
-rw-r--r--man-pages-posix-2003/man3p/nice.3p102
-rw-r--r--man-pages-posix-2003/man3p/nl_langinfo.3p107
-rw-r--r--man-pages-posix-2003/man3p/nrand48.3p1
-rw-r--r--man-pages-posix-2003/man3p/ntohl.3p1
-rw-r--r--man-pages-posix-2003/man3p/ntohs.3p1
-rw-r--r--man-pages-posix-2003/man3p/open.3p499
-rw-r--r--man-pages-posix-2003/man3p/opendir.3p162
-rw-r--r--man-pages-posix-2003/man3p/openlog.3p1
-rw-r--r--man-pages-posix-2003/man3p/optarg.3p1
-rw-r--r--man-pages-posix-2003/man3p/opterr.3p1
-rw-r--r--man-pages-posix-2003/man3p/optind.3p1
-rw-r--r--man-pages-posix-2003/man3p/optopt.3p1
-rw-r--r--man-pages-posix-2003/man3p/pathconf.3p287
-rw-r--r--man-pages-posix-2003/man3p/pause.3p77
-rw-r--r--man-pages-posix-2003/man3p/pclose.3p173
-rw-r--r--man-pages-posix-2003/man3p/perror.3p98
-rw-r--r--man-pages-posix-2003/man3p/pipe.3p90
-rw-r--r--man-pages-posix-2003/man3p/poll.3p291
-rw-r--r--man-pages-posix-2003/man3p/popen.3p174
-rw-r--r--man-pages-posix-2003/man3p/posix_fadvise.3p119
-rw-r--r--man-pages-posix-2003/man3p/posix_fallocate.3p114
-rw-r--r--man-pages-posix-2003/man3p/posix_madvise.3p130
-rw-r--r--man-pages-posix-2003/man3p/posix_mem_offset.3p102
-rw-r--r--man-pages-posix-2003/man3p/posix_memalign.3p80
-rw-r--r--man-pages-posix-2003/man3p/posix_openpt.3p156
-rw-r--r--man-pages-posix-2003/man3p/posix_spawn.3p636
-rw-r--r--man-pages-posix-2003/man3p/posix_spawn_file_actions_addclose.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_spawn_file_actions_adddup2.3p98
-rw-r--r--man-pages-posix-2003/man3p/posix_spawn_file_actions_addopen.3p223
-rw-r--r--man-pages-posix-2003/man3p/posix_spawn_file_actions_destroy.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_spawn_file_actions_init.3p96
-rw-r--r--man-pages-posix-2003/man3p/posix_spawnattr_destroy.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_spawnattr_getflags.3p121
-rw-r--r--man-pages-posix-2003/man3p/posix_spawnattr_getpgroup.3p100
-rw-r--r--man-pages-posix-2003/man3p/posix_spawnattr_getschedparam.3p106
-rw-r--r--man-pages-posix-2003/man3p/posix_spawnattr_getschedpolicy.3p104
-rw-r--r--man-pages-posix-2003/man3p/posix_spawnattr_getsigdefault.3p104
-rw-r--r--man-pages-posix-2003/man3p/posix_spawnattr_getsigmask.3p103
-rw-r--r--man-pages-posix-2003/man3p/posix_spawnattr_init.3p127
-rw-r--r--man-pages-posix-2003/man3p/posix_spawnattr_setflags.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_spawnattr_setpgroup.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_spawnattr_setschedparam.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_spawnattr_setschedpolicy.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_spawnattr_setsigdefault.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_spawnattr_setsigmask.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_spawnp.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_attr_destroy.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_attr_getclockres.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_attr_getcreatetime.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_attr_getgenversion.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_attr_getinherited.3p233
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_attr_getlogfullpolicy.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_attr_getlogsize.3p212
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_attr_getmaxdatasize.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_attr_getmaxsystemeventsize.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_attr_getmaxusereventsize.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_attr_getname.3p146
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_attr_getstreamfullpolicy.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_attr_getstreamsize.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_attr_init.3p104
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_attr_setinherited.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_attr_setlogfullpolicy.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_attr_setlogsize.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_attr_setmaxdatasize.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_attr_setname.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_attr_setstreamfullpolicy.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_attr_setstreamsize.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_clear.3p103
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_close.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_create.3p386
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_create_withlog.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_event.3p143
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_eventid_equal.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_eventid_get_name.3p171
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_eventid_open.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_eventset_add.3p137
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_eventset_del.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_eventset_empty.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_eventset_fill.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_eventset_ismember.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_eventtypelist_getnext_id.3p92
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_eventtypelist_rewind.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_flush.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_get_attr.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_get_filter.3p126
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_get_status.3p116
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_getnext_event.3p227
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_open.3p144
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_rewind.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_set_filter.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_shutdown.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_start.3p92
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_stop.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_timedgetnext_event.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_trid_eventid_open.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_trace_trygetnext_event.3p1
-rw-r--r--man-pages-posix-2003/man3p/posix_typed_mem_get_info.3p114
-rw-r--r--man-pages-posix-2003/man3p/posix_typed_mem_open.3p190
-rw-r--r--man-pages-posix-2003/man3p/pow.3p186
-rw-r--r--man-pages-posix-2003/man3p/powf.3p1
-rw-r--r--man-pages-posix-2003/man3p/powl.3p1
-rw-r--r--man-pages-posix-2003/man3p/pread.3p1
-rw-r--r--man-pages-posix-2003/man3p/printf.3p980
-rw-r--r--man-pages-posix-2003/man3p/pselect.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_atfork.3p158
-rw-r--r--man-pages-posix-2003/man3p/pthread_attr_destroy.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_attr_getdetachstate.3p97
-rw-r--r--man-pages-posix-2003/man3p/pthread_attr_getguardsize.3p127
-rw-r--r--man-pages-posix-2003/man3p/pthread_attr_getinheritsched.3p108
-rw-r--r--man-pages-posix-2003/man3p/pthread_attr_getschedparam.3p97
-rw-r--r--man-pages-posix-2003/man3p/pthread_attr_getschedpolicy.3p88
-rw-r--r--man-pages-posix-2003/man3p/pthread_attr_getscope.3p87
-rw-r--r--man-pages-posix-2003/man3p/pthread_attr_getstack.3p118
-rw-r--r--man-pages-posix-2003/man3p/pthread_attr_getstackaddr.3p98
-rw-r--r--man-pages-posix-2003/man3p/pthread_attr_getstacksize.3p82
-rw-r--r--man-pages-posix-2003/man3p/pthread_attr_init.3p190
-rw-r--r--man-pages-posix-2003/man3p/pthread_attr_setdetachstate.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_attr_setguardsize.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_attr_setinheritsched.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_attr_setschedparam.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_attr_setschedpolicy.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_attr_setscope.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_attr_setstack.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_attr_setstackaddr.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_attr_setstacksize.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_barrier_destroy.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_barrier_init.3p137
-rw-r--r--man-pages-posix-2003/man3p/pthread_barrier_wait.3p109
-rw-r--r--man-pages-posix-2003/man3p/pthread_barrierattr_destroy.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_barrierattr_getpshared.3p112
-rw-r--r--man-pages-posix-2003/man3p/pthread_barrierattr_init.3p97
-rw-r--r--man-pages-posix-2003/man3p/pthread_barrierattr_setpshared.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_cancel.3p108
-rw-r--r--man-pages-posix-2003/man3p/pthread_cleanup_pop.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_cleanup_push.3p300
-rw-r--r--man-pages-posix-2003/man3p/pthread_cond_broadcast.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_cond_destroy.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_cond_init.3p198
-rw-r--r--man-pages-posix-2003/man3p/pthread_cond_signal.3p187
-rw-r--r--man-pages-posix-2003/man3p/pthread_cond_timedwait.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_cond_wait.3p340
-rw-r--r--man-pages-posix-2003/man3p/pthread_condattr_destroy.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_condattr_getclock.3p100
-rw-r--r--man-pages-posix-2003/man3p/pthread_condattr_getpshared.3p104
-rw-r--r--man-pages-posix-2003/man3p/pthread_condattr_init.3p108
-rw-r--r--man-pages-posix-2003/man3p/pthread_condattr_setclock.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_condattr_setpshared.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_create.3p196
-rw-r--r--man-pages-posix-2003/man3p/pthread_detach.3p100
-rw-r--r--man-pages-posix-2003/man3p/pthread_equal.3p71
-rw-r--r--man-pages-posix-2003/man3p/pthread_exit.3p109
-rw-r--r--man-pages-posix-2003/man3p/pthread_getconcurrency.3p115
-rw-r--r--man-pages-posix-2003/man3p/pthread_getcpuclockid.3p73
-rw-r--r--man-pages-posix-2003/man3p/pthread_getschedparam.3p152
-rw-r--r--man-pages-posix-2003/man3p/pthread_getspecific.3p114
-rw-r--r--man-pages-posix-2003/man3p/pthread_join.3p184
-rw-r--r--man-pages-posix-2003/man3p/pthread_key_create.3p238
-rw-r--r--man-pages-posix-2003/man3p/pthread_key_delete.3p122
-rw-r--r--man-pages-posix-2003/man3p/pthread_kill.3p83
-rw-r--r--man-pages-posix-2003/man3p/pthread_mutex_destroy.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_mutex_getprioceiling.3p95
-rw-r--r--man-pages-posix-2003/man3p/pthread_mutex_init.3p368
-rw-r--r--man-pages-posix-2003/man3p/pthread_mutex_lock.3p194
-rw-r--r--man-pages-posix-2003/man3p/pthread_mutex_setprioceiling.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_mutex_timedlock.3p129
-rw-r--r--man-pages-posix-2003/man3p/pthread_mutex_trylock.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_mutex_unlock.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_mutexattr_destroy.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_mutexattr_getprioceiling.3p95
-rw-r--r--man-pages-posix-2003/man3p/pthread_mutexattr_getprotocol.3p152
-rw-r--r--man-pages-posix-2003/man3p/pthread_mutexattr_getpshared.3p102
-rw-r--r--man-pages-posix-2003/man3p/pthread_mutexattr_gettype.3p134
-rw-r--r--man-pages-posix-2003/man3p/pthread_mutexattr_init.3p346
-rw-r--r--man-pages-posix-2003/man3p/pthread_mutexattr_setprioceiling.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_mutexattr_setprotocol.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_mutexattr_setpshared.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_mutexattr_settype.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_once.3p149
-rw-r--r--man-pages-posix-2003/man3p/pthread_rwlock_destroy.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_rwlock_init.3p142
-rw-r--r--man-pages-posix-2003/man3p/pthread_rwlock_rdlock.3p150
-rw-r--r--man-pages-posix-2003/man3p/pthread_rwlock_timedrdlock.3p128
-rw-r--r--man-pages-posix-2003/man3p/pthread_rwlock_timedwrlock.3p122
-rw-r--r--man-pages-posix-2003/man3p/pthread_rwlock_tryrdlock.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_rwlock_trywrlock.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_rwlock_unlock.3p100
-rw-r--r--man-pages-posix-2003/man3p/pthread_rwlock_wrlock.3p113
-rw-r--r--man-pages-posix-2003/man3p/pthread_rwlockattr_destroy.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_rwlockattr_getpshared.3p108
-rw-r--r--man-pages-posix-2003/man3p/pthread_rwlockattr_init.3p97
-rw-r--r--man-pages-posix-2003/man3p/pthread_rwlockattr_setpshared.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_self.3p63
-rw-r--r--man-pages-posix-2003/man3p/pthread_setcancelstate.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_setcanceltype.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_setconcurrency.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_setschedparam.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_setschedprio.3p107
-rw-r--r--man-pages-posix-2003/man3p/pthread_setspecific.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_sigmask.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_spin_destroy.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_spin_init.3p125
-rw-r--r--man-pages-posix-2003/man3p/pthread_spin_lock.3p97
-rw-r--r--man-pages-posix-2003/man3p/pthread_spin_trylock.3p1
-rw-r--r--man-pages-posix-2003/man3p/pthread_spin_unlock.3p78
-rw-r--r--man-pages-posix-2003/man3p/pthread_testcancel.3p125
-rw-r--r--man-pages-posix-2003/man3p/ptsname.3p71
-rw-r--r--man-pages-posix-2003/man3p/putc.3p63
-rw-r--r--man-pages-posix-2003/man3p/putc_unlocked.3p1
-rw-r--r--man-pages-posix-2003/man3p/putchar.3p55
-rw-r--r--man-pages-posix-2003/man3p/putchar_unlocked.3p1
-rw-r--r--man-pages-posix-2003/man3p/putenv.3p106
-rw-r--r--man-pages-posix-2003/man3p/putmsg.3p262
-rw-r--r--man-pages-posix-2003/man3p/putpmsg.3p1
-rw-r--r--man-pages-posix-2003/man3p/puts.3p91
-rw-r--r--man-pages-posix-2003/man3p/pututxline.3p1
-rw-r--r--man-pages-posix-2003/man3p/putwc.3p65
-rw-r--r--man-pages-posix-2003/man3p/putwchar.3p56
-rw-r--r--man-pages-posix-2003/man3p/pwrite.3p1
-rw-r--r--man-pages-posix-2003/man3p/qsort.3p99
-rw-r--r--man-pages-posix-2003/man3p/raise.3p86
-rw-r--r--man-pages-posix-2003/man3p/rand.3p186
-rw-r--r--man-pages-posix-2003/man3p/rand_r.3p1
-rw-r--r--man-pages-posix-2003/man3p/random.3p142
-rw-r--r--man-pages-posix-2003/man3p/read.3p482
-rw-r--r--man-pages-posix-2003/man3p/readdir.3p286
-rw-r--r--man-pages-posix-2003/man3p/readdir_r.3p1
-rw-r--r--man-pages-posix-2003/man3p/readlink.3p143
-rw-r--r--man-pages-posix-2003/man3p/readv.3p120
-rw-r--r--man-pages-posix-2003/man3p/realloc.3p93
-rw-r--r--man-pages-posix-2003/man3p/realpath.3p131
-rw-r--r--man-pages-posix-2003/man3p/recv.3p180
-rw-r--r--man-pages-posix-2003/man3p/recvfrom.3p204
-rw-r--r--man-pages-posix-2003/man3p/recvmsg.3p217
-rw-r--r--man-pages-posix-2003/man3p/regcomp.3p587
-rw-r--r--man-pages-posix-2003/man3p/regerror.3p1
-rw-r--r--man-pages-posix-2003/man3p/regexec.3p1
-rw-r--r--man-pages-posix-2003/man3p/regfree.3p1
-rw-r--r--man-pages-posix-2003/man3p/remainder.3p89
-rw-r--r--man-pages-posix-2003/man3p/remainderf.3p1
-rw-r--r--man-pages-posix-2003/man3p/remainderl.3p1
-rw-r--r--man-pages-posix-2003/man3p/remove.3p79
-rw-r--r--man-pages-posix-2003/man3p/remque.3p1
-rw-r--r--man-pages-posix-2003/man3p/remquo.3p98
-rw-r--r--man-pages-posix-2003/man3p/remquof.3p1
-rw-r--r--man-pages-posix-2003/man3p/remquol.3p1
-rw-r--r--man-pages-posix-2003/man3p/rename.3p267
-rw-r--r--man-pages-posix-2003/man3p/rewind.3p81
-rw-r--r--man-pages-posix-2003/man3p/rewinddir.3p71
-rw-r--r--man-pages-posix-2003/man3p/rindex.3p68
-rw-r--r--man-pages-posix-2003/man3p/rint.3p105
-rw-r--r--man-pages-posix-2003/man3p/rintf.3p1
-rw-r--r--man-pages-posix-2003/man3p/rintl.3p1
-rw-r--r--man-pages-posix-2003/man3p/rmdir.3p192
-rw-r--r--man-pages-posix-2003/man3p/round.3p94
-rw-r--r--man-pages-posix-2003/man3p/roundf.3p1
-rw-r--r--man-pages-posix-2003/man3p/roundl.3p1
-rw-r--r--man-pages-posix-2003/man3p/scalb.3p140
-rw-r--r--man-pages-posix-2003/man3p/scalbln.3p1
-rw-r--r--man-pages-posix-2003/man3p/scalblnf.3p1
-rw-r--r--man-pages-posix-2003/man3p/scalblnl.3p1
-rw-r--r--man-pages-posix-2003/man3p/scalbn.3p131
-rw-r--r--man-pages-posix-2003/man3p/scalbnf.3p1
-rw-r--r--man-pages-posix-2003/man3p/scalbnl.3p1
-rw-r--r--man-pages-posix-2003/man3p/scanf.3p536
-rw-r--r--man-pages-posix-2003/man3p/sched_get_priority_max.3p76
-rw-r--r--man-pages-posix-2003/man3p/sched_get_priority_min.3p1
-rw-r--r--man-pages-posix-2003/man3p/sched_getparam.3p80
-rw-r--r--man-pages-posix-2003/man3p/sched_getscheduler.3p80
-rw-r--r--man-pages-posix-2003/man3p/sched_rr_get_interval.3p69
-rw-r--r--man-pages-posix-2003/man3p/sched_setparam.3p183
-rw-r--r--man-pages-posix-2003/man3p/sched_setscheduler.3p175
-rw-r--r--man-pages-posix-2003/man3p/sched_yield.3p59
-rw-r--r--man-pages-posix-2003/man3p/seed48.3p1
-rw-r--r--man-pages-posix-2003/man3p/seekdir.3p88
-rw-r--r--man-pages-posix-2003/man3p/select.3p323
-rw-r--r--man-pages-posix-2003/man3p/sem_close.3p82
-rw-r--r--man-pages-posix-2003/man3p/sem_destroy.3p81
-rw-r--r--man-pages-posix-2003/man3p/sem_getvalue.3p77
-rw-r--r--man-pages-posix-2003/man3p/sem_init.3p104
-rw-r--r--man-pages-posix-2003/man3p/sem_open.3p174
-rw-r--r--man-pages-posix-2003/man3p/sem_post.3p93
-rw-r--r--man-pages-posix-2003/man3p/sem_timedwait.3p119
-rw-r--r--man-pages-posix-2003/man3p/sem_trywait.3p1
-rw-r--r--man-pages-posix-2003/man3p/sem_unlink.3p84
-rw-r--r--man-pages-posix-2003/man3p/sem_wait.3p106
-rw-r--r--man-pages-posix-2003/man3p/semctl.3p232
-rw-r--r--man-pages-posix-2003/man3p/semget.3p217
-rw-r--r--man-pages-posix-2003/man3p/semop.3p353
-rw-r--r--man-pages-posix-2003/man3p/send.3p178
-rw-r--r--man-pages-posix-2003/man3p/sendmsg.3p236
-rw-r--r--man-pages-posix-2003/man3p/sendto.3p244
-rw-r--r--man-pages-posix-2003/man3p/setbuf.3p91
-rw-r--r--man-pages-posix-2003/man3p/setcontext.3p1
-rw-r--r--man-pages-posix-2003/man3p/setegid.3p77
-rw-r--r--man-pages-posix-2003/man3p/setenv.3p125
-rw-r--r--man-pages-posix-2003/man3p/seteuid.3p77
-rw-r--r--man-pages-posix-2003/man3p/setgid.3p83
-rw-r--r--man-pages-posix-2003/man3p/setgrent.3p1
-rw-r--r--man-pages-posix-2003/man3p/sethostent.3p1
-rw-r--r--man-pages-posix-2003/man3p/setitimer.3p1
-rw-r--r--man-pages-posix-2003/man3p/setjmp.3p89
-rw-r--r--man-pages-posix-2003/man3p/setkey.3p82
-rw-r--r--man-pages-posix-2003/man3p/setlocale.3p315
-rw-r--r--man-pages-posix-2003/man3p/setlogmask.3p1
-rw-r--r--man-pages-posix-2003/man3p/setnetent.3p1
-rw-r--r--man-pages-posix-2003/man3p/setpgid.3p157
-rw-r--r--man-pages-posix-2003/man3p/setpgrp.3p63
-rw-r--r--man-pages-posix-2003/man3p/setpriority.3p1
-rw-r--r--man-pages-posix-2003/man3p/setprotoent.3p1
-rw-r--r--man-pages-posix-2003/man3p/setpwent.3p1
-rw-r--r--man-pages-posix-2003/man3p/setregid.3p91
-rw-r--r--man-pages-posix-2003/man3p/setreuid.3p98
-rw-r--r--man-pages-posix-2003/man3p/setrlimit.3p1
-rw-r--r--man-pages-posix-2003/man3p/setservent.3p1
-rw-r--r--man-pages-posix-2003/man3p/setsid.3p92
-rw-r--r--man-pages-posix-2003/man3p/setsockopt.3p230
-rw-r--r--man-pages-posix-2003/man3p/setstate.3p1
-rw-r--r--man-pages-posix-2003/man3p/setuid.3p204
-rw-r--r--man-pages-posix-2003/man3p/setutxent.3p1
-rw-r--r--man-pages-posix-2003/man3p/setvbuf.3p96
-rw-r--r--man-pages-posix-2003/man3p/shm_open.3p267
-rw-r--r--man-pages-posix-2003/man3p/shm_unlink.3p91
-rw-r--r--man-pages-posix-2003/man3p/shmat.3p128
-rw-r--r--man-pages-posix-2003/man3p/shmctl.3p135
-rw-r--r--man-pages-posix-2003/man3p/shmdt.3p84
-rw-r--r--man-pages-posix-2003/man3p/shmget.3p147
-rw-r--r--man-pages-posix-2003/man3p/shutdown.3p110
-rw-r--r--man-pages-posix-2003/man3p/sigaction.3p511
-rw-r--r--man-pages-posix-2003/man3p/sigaddset.3p77
-rw-r--r--man-pages-posix-2003/man3p/sigaltstack.3p149
-rw-r--r--man-pages-posix-2003/man3p/sigdelset.3p76
-rw-r--r--man-pages-posix-2003/man3p/sigemptyset.3p98
-rw-r--r--man-pages-posix-2003/man3p/sigfillset.3p62
-rw-r--r--man-pages-posix-2003/man3p/sighold.3p1
-rw-r--r--man-pages-posix-2003/man3p/sigignore.3p1
-rw-r--r--man-pages-posix-2003/man3p/siginterrupt.3p89
-rw-r--r--man-pages-posix-2003/man3p/sigismember.3p79
-rw-r--r--man-pages-posix-2003/man3p/siglongjmp.3p75
-rw-r--r--man-pages-posix-2003/man3p/signal.3p156
-rw-r--r--man-pages-posix-2003/man3p/signbit.3p59
-rw-r--r--man-pages-posix-2003/man3p/signgam.3p1
-rw-r--r--man-pages-posix-2003/man3p/sigpause.3p1
-rw-r--r--man-pages-posix-2003/man3p/sigpending.3p63
-rw-r--r--man-pages-posix-2003/man3p/sigprocmask.3p149
-rw-r--r--man-pages-posix-2003/man3p/sigqueue.3p144
-rw-r--r--man-pages-posix-2003/man3p/sigrelse.3p1
-rw-r--r--man-pages-posix-2003/man3p/sigset.3p145
-rw-r--r--man-pages-posix-2003/man3p/sigsetjmp.3p108
-rw-r--r--man-pages-posix-2003/man3p/sigsuspend.3p84
-rw-r--r--man-pages-posix-2003/man3p/sigtimedwait.3p1
-rw-r--r--man-pages-posix-2003/man3p/sigwait.3p111
-rw-r--r--man-pages-posix-2003/man3p/sigwaitinfo.3p268
-rw-r--r--man-pages-posix-2003/man3p/sin.3p122
-rw-r--r--man-pages-posix-2003/man3p/sinf.3p1
-rw-r--r--man-pages-posix-2003/man3p/sinh.3p108
-rw-r--r--man-pages-posix-2003/man3p/sinhf.3p1
-rw-r--r--man-pages-posix-2003/man3p/sinhl.3p1
-rw-r--r--man-pages-posix-2003/man3p/sinl.3p1
-rw-r--r--man-pages-posix-2003/man3p/sleep.3p164
-rw-r--r--man-pages-posix-2003/man3p/snprintf.3p1
-rw-r--r--man-pages-posix-2003/man3p/sockatmark.3p122
-rw-r--r--man-pages-posix-2003/man3p/socket.3p155
-rw-r--r--man-pages-posix-2003/man3p/socketpair.3p157
-rw-r--r--man-pages-posix-2003/man3p/sprintf.3p1
-rw-r--r--man-pages-posix-2003/man3p/sqrt.3p106
-rw-r--r--man-pages-posix-2003/man3p/sqrtf.3p1
-rw-r--r--man-pages-posix-2003/man3p/sqrtl.3p1
-rw-r--r--man-pages-posix-2003/man3p/srand.3p1
-rw-r--r--man-pages-posix-2003/man3p/srand48.3p1
-rw-r--r--man-pages-posix-2003/man3p/srandom.3p1
-rw-r--r--man-pages-posix-2003/man3p/sscanf.3p1
-rw-r--r--man-pages-posix-2003/man3p/stat.3p231
-rw-r--r--man-pages-posix-2003/man3p/statvfs.3p174
-rw-r--r--man-pages-posix-2003/man3p/stderr.3p1
-rw-r--r--man-pages-posix-2003/man3p/stdin.3p92
-rw-r--r--man-pages-posix-2003/man3p/stdout.3p1
-rw-r--r--man-pages-posix-2003/man3p/strcasecmp.3p77
-rw-r--r--man-pages-posix-2003/man3p/strcat.3p64
-rw-r--r--man-pages-posix-2003/man3p/strchr.3p59
-rw-r--r--man-pages-posix-2003/man3p/strcmp.3p105
-rw-r--r--man-pages-posix-2003/man3p/strcoll.3p101
-rw-r--r--man-pages-posix-2003/man3p/strcpy.3p124
-rw-r--r--man-pages-posix-2003/man3p/strcspn.3p60
-rw-r--r--man-pages-posix-2003/man3p/strdup.3p66
-rw-r--r--man-pages-posix-2003/man3p/strerror.3p118
-rw-r--r--man-pages-posix-2003/man3p/strerror_r.3p1
-rw-r--r--man-pages-posix-2003/man3p/strfmon.3p288
-rw-r--r--man-pages-posix-2003/man3p/strftime.3p434
-rw-r--r--man-pages-posix-2003/man3p/strlen.3p85
-rw-r--r--man-pages-posix-2003/man3p/strncasecmp.3p1
-rw-r--r--man-pages-posix-2003/man3p/strncat.3p63
-rw-r--r--man-pages-posix-2003/man3p/strncmp.3p67
-rw-r--r--man-pages-posix-2003/man3p/strncpy.3p71
-rw-r--r--man-pages-posix-2003/man3p/strpbrk.3p59
-rw-r--r--man-pages-posix-2003/man3p/strptime.3p303
-rw-r--r--man-pages-posix-2003/man3p/strrchr.3p79
-rw-r--r--man-pages-posix-2003/man3p/strspn.3p59
-rw-r--r--man-pages-posix-2003/man3p/strstr.3p63
-rw-r--r--man-pages-posix-2003/man3p/strtod.3p279
-rw-r--r--man-pages-posix-2003/man3p/strtof.3p1
-rw-r--r--man-pages-posix-2003/man3p/strtoimax.3p83
-rw-r--r--man-pages-posix-2003/man3p/strtok.3p184
-rw-r--r--man-pages-posix-2003/man3p/strtok_r.3p1
-rw-r--r--man-pages-posix-2003/man3p/strtol.3p156
-rw-r--r--man-pages-posix-2003/man3p/strtold.3p1
-rw-r--r--man-pages-posix-2003/man3p/strtoll.3p1
-rw-r--r--man-pages-posix-2003/man3p/strtoul.3p159
-rw-r--r--man-pages-posix-2003/man3p/strtoull.3p1
-rw-r--r--man-pages-posix-2003/man3p/strtoumax.3p1
-rw-r--r--man-pages-posix-2003/man3p/strxfrm.3p94
-rw-r--r--man-pages-posix-2003/man3p/swab.3p65
-rw-r--r--man-pages-posix-2003/man3p/swapcontext.3p1
-rw-r--r--man-pages-posix-2003/man3p/swprintf.3p1
-rw-r--r--man-pages-posix-2003/man3p/swscanf.3p1
-rw-r--r--man-pages-posix-2003/man3p/symlink.3p131
-rw-r--r--man-pages-posix-2003/man3p/sync.3p61
-rw-r--r--man-pages-posix-2003/man3p/sysconf.3p313
-rw-r--r--man-pages-posix-2003/man3p/syslog.3p266
-rw-r--r--man-pages-posix-2003/man3p/system.3p320
-rw-r--r--man-pages-posix-2003/man3p/tan.3p149
-rw-r--r--man-pages-posix-2003/man3p/tanf.3p1
-rw-r--r--man-pages-posix-2003/man3p/tanh.3p92
-rw-r--r--man-pages-posix-2003/man3p/tanhf.3p1
-rw-r--r--man-pages-posix-2003/man3p/tanhl.3p1
-rw-r--r--man-pages-posix-2003/man3p/tanl.3p1
-rw-r--r--man-pages-posix-2003/man3p/tcdrain.3p83
-rw-r--r--man-pages-posix-2003/man3p/tcflow.3p103
-rw-r--r--man-pages-posix-2003/man3p/tcflush.3p97
-rw-r--r--man-pages-posix-2003/man3p/tcgetattr.3p114
-rw-r--r--man-pages-posix-2003/man3p/tcgetpgrp.3p77
-rw-r--r--man-pages-posix-2003/man3p/tcgetsid.3p69
-rw-r--r--man-pages-posix-2003/man3p/tcsendbreak.3p92
-rw-r--r--man-pages-posix-2003/man3p/tcsetattr.3p164
-rw-r--r--man-pages-posix-2003/man3p/tcsetpgrp.3p89
-rw-r--r--man-pages-posix-2003/man3p/tdelete.3p1
-rw-r--r--man-pages-posix-2003/man3p/telldir.3p64
-rw-r--r--man-pages-posix-2003/man3p/tempnam.3p114
-rw-r--r--man-pages-posix-2003/man3p/tfind.3p1
-rw-r--r--man-pages-posix-2003/man3p/tgamma.3p129
-rw-r--r--man-pages-posix-2003/man3p/tgammaf.3p1
-rw-r--r--man-pages-posix-2003/man3p/tgammal.3p1
-rw-r--r--man-pages-posix-2003/man3p/time.3p157
-rw-r--r--man-pages-posix-2003/man3p/timer_create.3p202
-rw-r--r--man-pages-posix-2003/man3p/timer_delete.3p67
-rw-r--r--man-pages-posix-2003/man3p/timer_getoverrun.3p1
-rw-r--r--man-pages-posix-2003/man3p/timer_gettime.3p180
-rw-r--r--man-pages-posix-2003/man3p/timer_settime.3p1
-rw-r--r--man-pages-posix-2003/man3p/times.3p163
-rw-r--r--man-pages-posix-2003/man3p/timezone.3p1
-rw-r--r--man-pages-posix-2003/man3p/tmpfile.3p118
-rw-r--r--man-pages-posix-2003/man3p/tmpnam.3p105
-rw-r--r--man-pages-posix-2003/man3p/toascii.3p57
-rw-r--r--man-pages-posix-2003/man3p/tolower.3p65
-rw-r--r--man-pages-posix-2003/man3p/toupper.3p64
-rw-r--r--man-pages-posix-2003/man3p/towctrans.3p86
-rw-r--r--man-pages-posix-2003/man3p/towlower.3p67
-rw-r--r--man-pages-posix-2003/man3p/towupper.3p67
-rw-r--r--man-pages-posix-2003/man3p/trunc.3p66
-rw-r--r--man-pages-posix-2003/man3p/truncate.3p128
-rw-r--r--man-pages-posix-2003/man3p/truncf.3p1
-rw-r--r--man-pages-posix-2003/man3p/truncl.3p1
-rw-r--r--man-pages-posix-2003/man3p/tsearch.3p249
-rw-r--r--man-pages-posix-2003/man3p/ttyname.3p108
-rw-r--r--man-pages-posix-2003/man3p/ttyname_r.3p1
-rw-r--r--man-pages-posix-2003/man3p/twalk.3p1
-rw-r--r--man-pages-posix-2003/man3p/tzname.3p1
-rw-r--r--man-pages-posix-2003/man3p/tzset.3p105
-rw-r--r--man-pages-posix-2003/man3p/ualarm.3p94
-rw-r--r--man-pages-posix-2003/man3p/ulimit.3p97
-rw-r--r--man-pages-posix-2003/man3p/umask.3p79
-rw-r--r--man-pages-posix-2003/man3p/uname.3p96
-rw-r--r--man-pages-posix-2003/man3p/ungetc.3p83
-rw-r--r--man-pages-posix-2003/man3p/ungetwc.3p92
-rw-r--r--man-pages-posix-2003/man3p/unlink.3p274
-rw-r--r--man-pages-posix-2003/man3p/unlockpt.3p72
-rw-r--r--man-pages-posix-2003/man3p/unsetenv.3p79
-rw-r--r--man-pages-posix-2003/man3p/usleep.3p129
-rw-r--r--man-pages-posix-2003/man3p/utime.3p130
-rw-r--r--man-pages-posix-2003/man3p/utimes.3p122
-rw-r--r--man-pages-posix-2003/man3p/va_arg.3p37
-rw-r--r--man-pages-posix-2003/man3p/va_copy.3p1
-rw-r--r--man-pages-posix-2003/man3p/va_end.3p1
-rw-r--r--man-pages-posix-2003/man3p/va_start.3p1
-rw-r--r--man-pages-posix-2003/man3p/vfork.3p118
-rw-r--r--man-pages-posix-2003/man3p/vfprintf.3p1
-rw-r--r--man-pages-posix-2003/man3p/vfscanf.3p1
-rw-r--r--man-pages-posix-2003/man3p/vfwprintf.3p1
-rw-r--r--man-pages-posix-2003/man3p/vfwscanf.3p1
-rw-r--r--man-pages-posix-2003/man3p/vprintf.3p80
-rw-r--r--man-pages-posix-2003/man3p/vscanf.3p76
-rw-r--r--man-pages-posix-2003/man3p/vsnprintf.3p1
-rw-r--r--man-pages-posix-2003/man3p/vsprintf.3p1
-rw-r--r--man-pages-posix-2003/man3p/vsscanf.3p1
-rw-r--r--man-pages-posix-2003/man3p/vswprintf.3p1
-rw-r--r--man-pages-posix-2003/man3p/vswscanf.3p1
-rw-r--r--man-pages-posix-2003/man3p/vwprintf.3p80
-rw-r--r--man-pages-posix-2003/man3p/vwscanf.3p80
-rw-r--r--man-pages-posix-2003/man3p/wait.3p491
-rw-r--r--man-pages-posix-2003/man3p/waitid.3p126
-rw-r--r--man-pages-posix-2003/man3p/waitpid.3p1
-rw-r--r--man-pages-posix-2003/man3p/wcrtomb.3p106
-rw-r--r--man-pages-posix-2003/man3p/wcscat.3p63
-rw-r--r--man-pages-posix-2003/man3p/wcschr.3p63
-rw-r--r--man-pages-posix-2003/man3p/wcscmp.3p65
-rw-r--r--man-pages-posix-2003/man3p/wcscoll.3p79
-rw-r--r--man-pages-posix-2003/man3p/wcscpy.3p61
-rw-r--r--man-pages-posix-2003/man3p/wcscspn.3p61
-rw-r--r--man-pages-posix-2003/man3p/wcsftime.3p88
-rw-r--r--man-pages-posix-2003/man3p/wcslen.3p57
-rw-r--r--man-pages-posix-2003/man3p/wcsncat.3p67
-rw-r--r--man-pages-posix-2003/man3p/wcsncmp.3p67
-rw-r--r--man-pages-posix-2003/man3p/wcsncpy.3p71
-rw-r--r--man-pages-posix-2003/man3p/wcspbrk.3p59
-rw-r--r--man-pages-posix-2003/man3p/wcsrchr.3p63
-rw-r--r--man-pages-posix-2003/man3p/wcsrtombs.3p116
-rw-r--r--man-pages-posix-2003/man3p/wcsspn.3p61
-rw-r--r--man-pages-posix-2003/man3p/wcsstr.3p66
-rw-r--r--man-pages-posix-2003/man3p/wcstod.3p217
-rw-r--r--man-pages-posix-2003/man3p/wcstof.3p1
-rw-r--r--man-pages-posix-2003/man3p/wcstoimax.3p87
-rw-r--r--man-pages-posix-2003/man3p/wcstok.3p97
-rw-r--r--man-pages-posix-2003/man3p/wcstol.3p162
-rw-r--r--man-pages-posix-2003/man3p/wcstold.3p1
-rw-r--r--man-pages-posix-2003/man3p/wcstoll.3p1
-rw-r--r--man-pages-posix-2003/man3p/wcstombs.3p92
-rw-r--r--man-pages-posix-2003/man3p/wcstoul.3p164
-rw-r--r--man-pages-posix-2003/man3p/wcstoull.3p1
-rw-r--r--man-pages-posix-2003/man3p/wcstoumax.3p1
-rw-r--r--man-pages-posix-2003/man3p/wcswcs.3p68
-rw-r--r--man-pages-posix-2003/man3p/wcswidth.3p68
-rw-r--r--man-pages-posix-2003/man3p/wcsxfrm.3p98
-rw-r--r--man-pages-posix-2003/man3p/wctob.3p67
-rw-r--r--man-pages-posix-2003/man3p/wctomb.3p95
-rw-r--r--man-pages-posix-2003/man3p/wctrans.3p79
-rw-r--r--man-pages-posix-2003/man3p/wctype.3p114
-rw-r--r--man-pages-posix-2003/man3p/wcwidth.3p66
-rw-r--r--man-pages-posix-2003/man3p/wmemchr.3p69
-rw-r--r--man-pages-posix-2003/man3p/wmemcmp.3p70
-rw-r--r--man-pages-posix-2003/man3p/wmemcpy.3p68
-rw-r--r--man-pages-posix-2003/man3p/wmemmove.3p73
-rw-r--r--man-pages-posix-2003/man3p/wmemset.3p66
-rw-r--r--man-pages-posix-2003/man3p/wordexp.3p382
-rw-r--r--man-pages-posix-2003/man3p/wordfree.3p1
-rw-r--r--man-pages-posix-2003/man3p/wprintf.3p615
-rw-r--r--man-pages-posix-2003/man3p/write.3p590
-rw-r--r--man-pages-posix-2003/man3p/writev.3p129
-rw-r--r--man-pages-posix-2003/man3p/wscanf.3p522
-rw-r--r--man-pages-posix-2003/man3p/y0.3p118
-rw-r--r--man-pages-posix-2003/man3p/y1.3p1
-rw-r--r--man-pages-posix-2003/man3p/yn.3p1
1406 files changed, 186535 insertions, 0 deletions
diff --git a/man-pages-posix-2003/Changes b/man-pages-posix-2003/Changes
new file mode 100644
index 0000000..8497721
--- /dev/null
+++ b/man-pages-posix-2003/Changes
@@ -0,0 +1,12 @@
+==================== Changes in man-pages-posix-2003-a ====================
+
+Released: 2008-06-12
+
+Global changes
+--------------
+
+This package was created by splitting out the POSIX pages
+(sections 0p, 1p, 3p) from the man-pages package. (man-pages-2.80
+was the last man-pages release to include the POSIX pages.)
+These are pages from POSIX.1-2001, Technical Corrigendum 1.
+Since TC1 appeared in 2003, it is also known as POSIX.1-2003.
diff --git a/man-pages-posix-2003/Makefile b/man-pages-posix-2003/Makefile
new file mode 100644
index 0000000..7e71ec0
--- /dev/null
+++ b/man-pages-posix-2003/Makefile
@@ -0,0 +1,59 @@
+# Do "make screen" first, if you want to protect already installed,
+# more up-to-date manual pages than the ones included in this package.
+# Do "make install" to copy the pages to their destination.
+# Do "make gz" or "make bz2" first if you use compressed source pages.
+
+DESTDIR=
+prefix?=/usr
+MANDIR=$(prefix)/share/man
+
+GZIP=gzip -9
+BZIP2=bzip2 -9
+
+all: screen remove install
+
+allgz: gz all
+
+allbz: bz2 all
+
+screen:
+ -mkdir not_installed
+ for i in man?p/*; do \
+ if [ $(MANDIR)/"$$i" -nt "$$i" ]; then \
+ cmp -s $(MANDIR)/"$$i" "$$i" > /dev/null 2>&1; \
+ if [ "$$?" != 0 ]; then mv "$$i" not_installed; fi; \
+ fi; \
+ done
+
+remove:
+ for i in man?p/*; do \
+ rm -f $(MANDIR)/"$$i" $(MANDIR)/"$$i".gz $(MANDIR)/"$$i".bz2; \
+ done
+
+gz:
+ for i in man?p; do $(GZIP) "$$i"/*; done
+
+bz2:
+ for i in man?p; do $(BZIP2) "$$i"/*; done
+
+# Use with
+# make HTDIR=/some/dir HTOPTS=whatever html
+# The sed removes the lines "Content-type: text/html\n\n"
+html:
+ @if [ x$(HTDIR) = x ]; then echo "You must set HTDIR."; else \
+ for i in man?p; do \
+ [ -d $(HTDIR)/"$$i" ] || mkdir -p $(HTDIR)/"$$i"; \
+ find "$$i/" -type f | while read f; do \
+ (cd "$$i"; man2html $(HTOPTS) `basename $$f`) | \
+ sed -e '1,2d' > $(HTDIR)/"$$i"/`basename $$f`.html; \
+ done; \
+ done; fi
+
+install:
+ for i in man?p; do \
+ install -d -m 755 $(DESTDIR)$(MANDIR)/"$$i" || exit $$?; \
+ install -m 644 "$$i"/* $(DESTDIR)$(MANDIR)/"$$i" || exit $$?; \
+ done; \
+
+# someone might also want to look at /var/catman/cat2 or so ...
+# a problem is that the location of cat pages varies a lot
diff --git a/man-pages-posix-2003/POSIX-COPYRIGHT b/man-pages-posix-2003/POSIX-COPYRIGHT
new file mode 100644
index 0000000..d830db0
--- /dev/null
+++ b/man-pages-posix-2003/POSIX-COPYRIGHT
@@ -0,0 +1,25 @@
+The Institute of Electrical and Electronics Engineers (IEEE) and
+The Open Group, have given us permission to reprint portions of
+their documentation.
+
+In the following statement, the phrase ``this text'' refers to
+portions of the system documentation.
+
+Portions of this text are reprinted and reproduced in electronic form
+in the linux-manpages package, from IEEE Std 1003.1 (TM), 2003 Edition,
+Standard for Information Technology -- Portable Operating System
+Interface (POSIX (R)), The Open Group Base Specifications Issue 6,
+Copyright (C) 2001-2003 by the Institute of Electrical and Electronics
+Engineers, Inc and The Open Group. In the event of any discrepancy
+between these versions and the original IEEE and The Open Group
+Standard, the original IEEE and The Open Group Standard is the referee
+document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
+
+This notice shall appear on any product containing this material.
+
+Redistribution of this material is permitted so long as this notice and
+the corresponding notices within each POSIX manual page are retained on
+any distribution, and the nroff source is included. Modifications to
+the text are permitted so long as any conflicts with the standard
+are clearly marked as such in the text.
diff --git a/man-pages-posix-2003/README b/man-pages-posix-2003/README
new file mode 100644
index 0000000..a568be4
--- /dev/null
+++ b/man-pages-posix-2003/README
@@ -0,0 +1,19 @@
+This package contains the POSIX man pages (pages in sections
+except 0p, 1p, and 3p). Some more information is given in the
+`Announce' file. Some background on UNIX standards, including
+POSIX, can be found in the standards(7) page provide as part
+of the separate Linux man-pages package.
+
+Install by copying to your favourite location.
+"make install" will just copy them to /usr/share/man/man[013]p.
+"make" will move the pages from this package that are older than
+the already installed ones to a subdirectory `not_installed',
+then remove old versions (compressed or not),
+compress the pages, and copy them to /usr/share/man/man[013]p.
+
+Note that you may have to remove preformatted pages.
+
+Copyrights: see the file POSIX-COPYRIGHT.
+
+If you have corrections and additions to suggest, then visit
+http://www.kernel.org/doc/man-pages/
diff --git a/man-pages-posix-2003/man-pages-posix-2003-a.Announce b/man-pages-posix-2003/man-pages-posix-2003-a.Announce
new file mode 100644
index 0000000..570d8d8
--- /dev/null
+++ b/man-pages-posix-2003/man-pages-posix-2003-a.Announce
@@ -0,0 +1,31 @@
+RELEASE
+The Linux man page maintainer proudly announces. . .
+
+ man-pages-posix-2003-a.tar.gz - POSIX man pages
+
+Differences from the previous manual pages release are listed in
+the file "Changes".
+
+For further information, visit http://www.kernel.org/doc/man-pages/
+
+POSIX
+This release contains a copy of the POSIX 1003.1-2003 man pages.
+The directories man0p, man1p, man3p contain descriptions of the
+headers, the utilities, and the functions documented in that standard.
+For the copyright notice, see the file POSIX-COPYRIGHT.
+
+In order to use this, put in {/usr/share/misc/}man.conf{ig} or so
+your favourite order of looking at these pages, for example,
+MANSECT 1p:1:8:0p:3p:2:3:4:5:6:7:9:tcl:n:l:p:o
+or set the MANSECT environment variable.
+
+Here is a breakdown of what this distribution contains:
+
+ Section 0p = POSIX headers
+ Section 1p = POSIX utilities
+ Section 3p = POSIX functions
+
+Copyright information:
+
+ For the POSIX pages permission to distribute was given by IEEE
+ and the Open Group, see POSIX-COPYRIGHT.
diff --git a/man-pages-posix-2003/man-pages-posix-2003-a.lsm b/man-pages-posix-2003/man-pages-posix-2003-a.lsm
new file mode 100644
index 0000000..c4b41ce
--- /dev/null
+++ b/man-pages-posix-2003/man-pages-posix-2003-a.lsm
@@ -0,0 +1,12 @@
+Begin3
+Title: Section 0p, 1p, and 3p man pages (the POSIX man-pages) for Linux
+Version: 2003-a
+Entered-date: 2008-06-12
+Description: POSIX manual pages
+Keywords: man pages
+Author: The Open Group
+Maintained-by: Michael Kerrisk <mtk.manpages@gmail.com>
+Primary-site: ftp://ftp.kernel.org/pub/linux/docs/man-pages
+ 1417k man-pages-posix-2003-a.tar.gz
+Copying-policy: See the file POSIX-COPYRIGHT;
+End
diff --git a/man-pages-posix-2003/man0p/aio.h.0p b/man-pages-posix-2003/man0p/aio.h.0p
new file mode 100644
index 0000000..39ef52c
--- /dev/null
+++ b/man-pages-posix-2003/man0p/aio.h.0p
@@ -0,0 +1,116 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<aio.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <aio.h>
+.SH NAME
+aio.h \- asynchronous input and output (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <aio.h> \fP
+.SH DESCRIPTION
+.LP
+The \fI<aio.h>\fP header shall define the \fBaiocb\fP structure which
+shall include at least the following members:
+.sp
+.RS
+.nf
+
+\fBint aio_fildes \fP File descriptor. \fB
+off_t aio_offset \fP File offset. \fB
+volatile void *aio_buf \fP Location of buffer. \fB
+size_t aio_nbytes \fP Length of transfer. \fB
+int aio_reqprio \fP Request priority offset. \fB
+struct sigevent aio_sigevent \fP Signal number and value. \fB
+int aio_lio_opcode\fP Operation to be performed. \fB
+\fP
+.fi
+.RE
+.LP
+This header shall also include the following constants:
+.TP 7
+AIO_ALLDONE
+A return value indicating that none of the requested operations could
+be canceled since they are already complete.
+.TP 7
+AIO_CANCELED
+A return value indicating that all requested operations have been
+canceled.
+.TP 7
+AIO_NOTCANCELED
+.sp
+A return value indicating that some of the requested operations could
+not be canceled since they are in progress.
+.TP 7
+LIO_NOP
+A \fIlio_listio\fP() element operation option indicating that no transfer
+is
+requested.
+.TP 7
+LIO_NOWAIT
+A \fIlio_listio\fP() synchronization operation indicating that the
+calling thread
+is to continue execution while the \fIlio_listio\fP() operation is
+being performed, and
+no notification is given when the operation is complete.
+.TP 7
+LIO_READ
+A \fIlio_listio\fP() element operation option requesting a read.
+.TP 7
+LIO_WAIT
+A \fIlio_listio\fP() synchronization operation indicating that the
+calling thread
+is to suspend until the \fIlio_listio\fP() operation is complete.
+.TP 7
+LIO_WRITE
+A \fIlio_listio\fP() element operation option requesting a write.
+.sp
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBint aio_cancel(int, struct aiocb *);
+int aio_error(const struct aiocb *);
+int aio_fsync(int, struct aiocb *);
+int aio_read(struct aiocb *);
+ssize_t aio_return(struct aiocb *);
+int aio_suspend(const struct aiocb *const[], int,
+ const struct timespec *);
+int aio_write(struct aiocb *);
+int lio_listio(int, struct aiocb *restrict const[restrict], int,
+ struct sigevent *restrict);
+\fP
+.fi
+.RE
+.LP
+Inclusion of the \fI<aio.h>\fP header may make visible symbols defined
+in the headers \fI<fcntl.h>\fP, \fI<signal.h>\fP, \fI<sys/types.h>\fP,
+and \fI<time.h>\fP.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<fcntl.h>\fP, \fI<signal.h>\fP, \fI<sys/types.h>\fP, \fI<time.h>\fP,
+the System Interfaces volume
+of IEEE\ Std\ 1003.1-2001, \fIfsync\fP(), \fIlseek\fP(), \fIread\fP(),
+\fIwrite\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/assert.h.0p b/man-pages-posix-2003/man0p/assert.h.0p
new file mode 100644
index 0000000..52f8d13
--- /dev/null
+++ b/man-pages-posix-2003/man0p/assert.h.0p
@@ -0,0 +1,58 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<assert.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <assert.h>
+.SH NAME
+assert.h \- verify program assertion
+.SH SYNOPSIS
+.LP
+\fB#include <assert.h>\fP
+.SH DESCRIPTION
+.LP
+The \fI<assert.h>\fP header shall define the \fIassert\fP() macro.
+It refers to
+the macro NDEBUG which is not defined in the header. If NDEBUG is
+defined as a macro name before the inclusion of this header, the
+\fIassert\fP() macro shall be defined simply as:
+.sp
+.RS
+.nf
+
+\fB#define assert(ignore)((void) 0)
+\fP
+.fi
+.RE
+.LP
+Otherwise, the macro behaves as described in \fIassert\fP().
+.LP
+The \fIassert\fP() macro shall be redefined according to the current
+state of NDEBUG
+each time \fI<assert.h>\fP is included.
+.LP
+The \fIassert\fP() macro shall be implemented as a macro, not as a
+function. If the
+macro definition is suppressed in order to access an actual function,
+the behavior is undefined.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIassert\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/complex.h.0p b/man-pages-posix-2003/man0p/complex.h.0p
new file mode 100644
index 0000000..9f65b55
--- /dev/null
+++ b/man-pages-posix-2003/man0p/complex.h.0p
@@ -0,0 +1,210 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<complex.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <complex.h>
+.SH NAME
+complex.h \- complex arithmetic
+.SH SYNOPSIS
+.LP
+\fB#include <complex.h>\fP
+.SH DESCRIPTION
+.LP
+The \fI<complex.h>\fP header shall define the following macros:
+.TP 7
+complex
+Expands to \fB_Complex\fP.
+.TP 7
+_Complex_I
+Expands to a constant expression of type \fBconst float _Complex\fP,
+with the value of the imaginary unit (that is, a number
+\fIi\fP such that \fIi\fP**2=-1).
+.TP 7
+imaginary
+Expands to \fB_Imaginary\fP.
+.TP 7
+_Imaginary_I
+Expands to a constant expression of type \fBconst float _Imaginary\fP
+with the value of the imaginary unit.
+.TP 7
+I
+Expands to either _Imaginary_I or _Complex_I. If _Imaginary_I is not
+defined, I expands to _Complex_I.
+.sp
+.LP
+The macros imaginary and _Imaginary_I shall be defined if and only
+if the implementation supports imaginary types.
+.LP
+An application may undefine and then, perhaps, redefine the complex,
+imaginary, and I macros.
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBdouble cabs(double complex);
+float cabsf(float complex);
+long double cabsl(long double complex);
+double complex cacos(double complex);
+float complex cacosf(float complex);
+double complex cacosh(double complex);
+float complex cacoshf(float complex);
+long double complex cacoshl(long double complex);
+long double complex cacosl(long double complex);
+double carg(double complex);
+float cargf(float complex);
+long double cargl(long double complex);
+double complex casin(double complex);
+float complex casinf(float complex);
+double complex casinh(double complex);
+float complex casinhf(float complex);
+long double complex casinhl(long double complex);
+long double complex casinl(long double complex);
+double complex catan(double complex);
+float complex catanf(float complex);
+double complex catanh(double complex);
+float complex catanhf(float complex);
+long double complex catanhl(long double complex);
+long double complex catanl(long double complex);
+double complex ccos(double complex);
+float complex ccosf(float complex);
+double complex ccosh(double complex);
+float complex ccoshf(float complex);
+long double complex ccoshl(long double complex);
+long double complex ccosl(long double complex);
+double complex cexp(double complex);
+float complex cexpf(float complex);
+long double complex cexpl(long double complex);
+double cimag(double complex);
+float cimagf(float complex);
+long double cimagl(long double complex);
+double complex clog(double complex);
+float complex clogf(float complex);
+long double complex clogl(long double complex);
+double complex conj(double complex);
+float complex conjf(float complex);
+long double complex conjl(long double complex);
+double complex cpow(double complex, double complex);
+float complex cpowf(float complex, float complex);
+long double complex cpowl(long double complex, long double complex);
+double complex cproj(double complex);
+float complex cprojf(float complex);
+long double complex cprojl(long double complex);
+double creal(double complex);
+float crealf(float complex);
+long double creall(long double complex);
+double complex csin(double complex);
+float complex csinf(float complex);
+double complex csinh(double complex);
+float complex csinhf(float complex);
+long double complex csinhl(long double complex);
+long double complex csinl(long double complex);
+double complex csqrt(double complex);
+float complex csqrtf(float complex);
+long double complex csqrtl(long double complex);
+double complex ctan(double complex);
+float complex ctanf(float complex);
+double complex ctanh(double complex);
+float complex ctanhf(float complex);
+long double complex ctanhl(long double complex);
+long double complex ctanl(long double complex);
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Values are interpreted as radians, not degrees.
+.SH RATIONALE
+.LP
+The choice of \fII\fP instead of \fIi\fP for the imaginary unit concedes
+to the widespread use of the identifier \fIi\fP for
+other purposes. The application can use a different identifier, say
+\fIj\fP, for the imaginary unit by following the inclusion of
+the \fI<complex.h>\fP header with:
+.sp
+.RS
+.nf
+
+\fB#undef I
+#define j _Imaginary_I
+\fP
+.fi
+.RE
+.LP
+An \fII\fP suffix to designate imaginary constants is not required,
+as multiplication by \fII\fP provides a sufficiently
+convenient and more generally useful notation for imaginary terms.
+The corresponding real type for the imaginary unit is
+\fBfloat\fP, so that use of \fII\fP for algorithmic or notational
+convenience will not result in widening types.
+.LP
+On systems with imaginary types, the application has the ability to
+control whether use of the macro I introduces an imaginary
+type, by explicitly defining I to be _Imaginary_I or _Complex_I. Disallowing
+imaginary types is useful for some applications
+intended to run on implementations without support for such types.
+.LP
+The macro _Imaginary_I provides a test for whether imaginary types
+are supported.
+.LP
+The \fIcis\fP() function (\fIcos\fP(\fIx\fP) + \fII\fP*\fIsin\fP(\fIx\fP))
+was considered but rejected because its
+implementation is easy and straightforward, even though some implementations
+could compute sine and cosine more efficiently in
+tandem.
+.SH FUTURE DIRECTIONS
+.LP
+The following function names and the same names suffixed with \fIf\fP
+or \fIl\fP are reserved for future use, and may be added
+to the declarations in the \fI<complex.h>\fP header.
+.TS C
+center; lw(26) lw(26) lw(26).
+T{
+.br
+\fIcerf\fP()
+.br
+\fIcerfc\fP()
+.br
+\fIcexp2\fP()
+.br
+\
+T} T{
+.br
+\fIcexpm1\fP()
+.br
+\fIclog10\fP()
+.br
+\fIclog1p\fP()
+.br
+\
+T} T{
+.br
+\fIclog2\fP()
+.br
+\fIclgamma\fP()
+.br
+\fIctgamma\fP()
+.br
+\
+T}
+.TE
+.SH SEE ALSO
+.LP
+The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIcabs\fP(),
+\fIcacos\fP(), \fIcacosh\fP(), \fIcarg\fP(), \fIcasin\fP(), \fIcasinh\fP(),
+\fIcatan\fP(), \fIcatanh\fP(), \fIccos\fP(), \fIccosh\fP(), \fIcexp\fP(),
+\fIcimag\fP(), \fIclog\fP(), \fIconj\fP(), \fIcpow\fP(), \fIcproj\fP(),
+\fIcreal\fP(), \fIcsin\fP(), \fIcsinh\fP(), \fIcsqrt\fP(), \fIctan\fP(),
+\fIctanh\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/cpio.h.0p b/man-pages-posix-2003/man0p/cpio.h.0p
new file mode 100644
index 0000000..a17d6b1
--- /dev/null
+++ b/man-pages-posix-2003/man0p/cpio.h.0p
@@ -0,0 +1,70 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<cpio.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <cpio.h>
+.SH NAME
+cpio.h \- cpio archive values
+.SH SYNOPSIS
+.LP
+\fB#include <cpio.h> \fP
+.SH DESCRIPTION
+.LP
+Values needed by the \fIc_mode\fP field of the \fIcpio\fP archive
+format are described as follows:
+.TS C
+center; l1 l1 l.
+\fBName\fP \fBDescription\fP \fBValue (Octal)\fP
+C_IRUSR Read by owner. 0000400
+C_IWUSR Write by owner. 0000200
+C_IXUSR Execute by owner. 0000100
+C_IRGRP Read by group. 0000040
+C_IWGRP Write by group. 0000020
+C_IXGRP Execute by group. 0000010
+C_IROTH Read by others. 0000004
+C_IWOTH Write by others. 0000002
+C_IXOTH Execute by others. 0000001
+C_ISUID Set user ID. 0004000
+C_ISGID Set group ID. 0002000
+C_ISVTX On directories, restricted deletion flag. 0001000
+C_ISDIR Directory. 0040000
+C_ISFIFO FIFO. 0010000
+C_ISREG Regular file. 0100000
+C_ISBLK Block special. 0060000
+C_ISCHR Character special. 0020000
+C_ISCTG Reserved. 0110000
+C_ISLNK Symbolic link. 0120000
+C_ISSOCK Socket. 0140000
+.TE
+.LP
+The header shall define the symbolic constant:
+.sp
+.RS
+.nf
+
+\fBMAGIC "070707"
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Shell and Utilities volume of IEEE\ Std\ 1003.1-2001, \fIpax\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/ctype.h.0p b/man-pages-posix-2003/man0p/ctype.h.0p
new file mode 100644
index 0000000..2e5c9f0
--- /dev/null
+++ b/man-pages-posix-2003/man0p/ctype.h.0p
@@ -0,0 +1,89 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<ctype.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <ctype.h>
+.SH NAME
+ctype.h \- character types
+.SH SYNOPSIS
+.LP
+\fB#include <ctype.h>\fP
+.SH DESCRIPTION
+.LP
+Some of the functionality described on this reference page extends
+the ISO\ C standard. Applications shall define
+the appropriate feature test macro (see the System Interfaces volume
+of IEEE\ Std\ 1003.1-2001, Section 2.2, The Compilation Environment)
+to enable the visibility of these symbols in this
+header.
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBint isalnum(int);
+int isalpha(int);
+
+int isascii(int);
+
+int isblank(int);
+int iscntrl(int);
+int isdigit(int);
+int isgraph(int);
+int islower(int);
+int isprint(int);
+int ispunct(int);
+int isspace(int);
+int isupper(int);
+int isxdigit(int);
+
+int toascii(int);
+
+int tolower(int);
+int toupper(int);
+\fP
+.fi
+.RE
+.LP
+The following are defined as macros:
+.sp
+.RS
+.nf
+
+\fB
+int _toupper(int);
+int _tolower(int);
+
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<locale.h>\fP, the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+\fIisalnum\fP(), \fIisalpha\fP(), \fIisascii\fP(), \fIiscntrl\fP(),
+\fIisdigit\fP(), \fIisgraph\fP(), \fIislower\fP(), \fIisprint\fP(),
+\fIispunct\fP(), \fIisspace\fP(), \fIisupper\fP(), \fIisxdigit\fP(),
+\fImblen\fP(), \fImbstowcs\fP(), \fImbtowc\fP(), \fIsetlocale\fP(),
+\fItoascii\fP(), \fItolower\fP(), \fI_tolower\fP(), \fItoupper\fP(),
+\fI_toupper\fP(), \fIwcstombs\fP(), \fIwctomb\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/dirent.h.0p b/man-pages-posix-2003/man0p/dirent.h.0p
new file mode 100644
index 0000000..dac8c29
--- /dev/null
+++ b/man-pages-posix-2003/man0p/dirent.h.0p
@@ -0,0 +1,125 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<dirent.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <dirent.h>
+.SH NAME
+dirent.h \- format of directory entries
+.SH SYNOPSIS
+.LP
+\fB#include <dirent.h>\fP
+.SH DESCRIPTION
+.LP
+The internal format of directories is unspecified.
+.LP
+The \fI<dirent.h>\fP header shall define the following type:
+.TP 7
+\fBDIR\fP
+A type representing a directory stream.
+.sp
+.LP
+It shall also define the structure \fBdirent\fP which shall include
+the following members:
+.sp
+.RS
+.nf
+
+\fB
+ino_t d_ino \fP File serial number. \fB
+
+char d_name[] \fP Name of entry. \fB
+\fP
+.fi
+.RE
+.LP
+The type \fBino_t\fP shall be defined as described in \fI<sys/types.h>\fP
+\&.
+.LP
+The character array \fId_name\fP is of unspecified size, but the number
+of bytes preceding the terminating null byte shall not
+exceed {NAME_MAX}.
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBint closedir(DIR *);
+DIR *opendir(const char *);
+struct dirent *readdir(DIR *);
+
+int readdir_r(DIR *restrict, struct dirent *restrict,
+ struct dirent **restrict);
+
+void rewinddir(DIR *);
+
+void seekdir(DIR *, long);
+long telldir(DIR *);
+
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+Information similar to that in the \fI<dirent.h>\fP header is contained
+in a file \fI<sys/dir.h>\fP in 4.2 BSD and
+4.3 BSD. The equivalent in these implementations of \fBstruct dirent\fP
+from this volume of IEEE\ Std\ 1003.1-2001 is
+\fBstruct direct\fP. The filename was changed because the name \fI<sys/dir.h>\fP
+was also used in earlier implementations
+to refer to definitions related to the older access method; this produced
+name conflicts. The name of the structure was changed
+because this volume of IEEE\ Std\ 1003.1-2001 does not completely
+define what is in the structure, so it could be different
+on some implementations from \fBstruct direct\fP.
+.LP
+The name of an array of \fBchar\fP of an unspecified size should not
+be used as an lvalue. Use of:
+.sp
+.RS
+.nf
+
+\fBsizeof(d_name)
+\fP
+.fi
+.RE
+.LP
+is incorrect; use:
+.sp
+.RS
+.nf
+
+\fBstrlen(d_name)
+\fP
+.fi
+.RE
+.LP
+instead.
+.LP
+The array of \fBchar\fP \fId_name\fP is not a fixed size. Implementations
+may need to declare \fBstruct dirent\fP with an
+array size for \fId_name\fP of 1, but the actual number of characters
+provided matches (or only slightly exceeds) the length of
+the filename.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<sys/types.h>\fP, the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+\fIclosedir\fP(), \fIopendir\fP(), \fIreaddir\fP(), \fIreaddir_r\fP(),
+\fIrewinddir\fP(), \fIseekdir\fP(), \fItelldir\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/dlfcn.h.0p b/man-pages-posix-2003/man0p/dlfcn.h.0p
new file mode 100644
index 0000000..ec49a90
--- /dev/null
+++ b/man-pages-posix-2003/man0p/dlfcn.h.0p
@@ -0,0 +1,65 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<dlfcn.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <dlfcn.h>
+.SH NAME
+dlfcn.h \- dynamic linking
+.SH SYNOPSIS
+.LP
+\fB#include <dlfcn.h> \fP
+.SH DESCRIPTION
+.LP
+The \fI<dlfcn.h>\fP header shall define at least the following macros
+for use in the construction of a \fIdlopen\fP() \fImode\fP argument:
+.TP 7
+RTLD_LAZY
+Relocations are performed at an implementation-defined time.
+.TP 7
+RTLD_NOW
+Relocations are performed when the object is loaded.
+.TP 7
+RTLD_GLOBAL
+All symbols are available for relocation processing of other modules.
+.TP 7
+RTLD_LOCAL
+All symbols are not made available for relocation processing by other
+modules.
+.sp
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBint dlclose(void *);
+char *dlerror(void);
+void *dlopen(const char *, int);
+void *dlsym(void *restrict, const char *restrict);
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIdlopen\fP(),
+\fIdlclose\fP(), \fIdlsym\fP(), \fIdlerror\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/errno.h.0p b/man-pages-posix-2003/man0p/errno.h.0p
new file mode 100644
index 0000000..d9c9334
--- /dev/null
+++ b/man-pages-posix-2003/man0p/errno.h.0p
@@ -0,0 +1,290 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<errno.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <errno.h>
+.SH NAME
+errno.h \- system error numbers
+.SH SYNOPSIS
+.LP
+\fB#include <errno.h>\fP
+.SH DESCRIPTION
+.LP
+Some of the functionality described on this reference page extends
+the ISO\ C standard. Any conflict between the
+requirements described here and the ISO\ C standard is unintentional.
+This volume of IEEE\ Std\ 1003.1-2001 defers to
+the ISO\ C standard.
+.LP
+The
+ISO\ C standard only requires the symbols [EDOM], [EILSEQ], and [ERANGE]
+to be defined.
+.LP
+The \fI<errno.h>\fP header shall provide a declaration for \fIerrno\fP
+and give positive values for the following
+symbolic constants. Their values shall be unique except as noted below.
+.TP 7
+.B E2BIG
+Argument list too long.
+.TP 7
+.B EACCES
+Permission denied.
+.TP 7
+.B EADDRINUSE
+Address in use.
+.TP 7
+.B EADDRNOTAVAIL
+Address not available.
+.TP 7
+.B EAFNOSUPPORT
+Address family not supported.
+.TP 7
+.B EAGAIN
+Resource unavailable, try again (may be the same value as [EWOULDBLOCK]).
+.TP 7
+.B EALREADY
+Connection already in progress.
+.TP 7
+.B EBADF
+Bad file descriptor.
+.TP 7
+.B EBADMSG
+Bad message.
+.TP 7
+.B EBUSY
+Device or resource busy.
+.TP 7
+.B ECANCELED
+Operation canceled.
+.TP 7
+.B ECHILD
+No child processes.
+.TP 7
+.B ECONNABORTED
+Connection aborted.
+.TP 7
+.B ECONNREFUSED
+Connection refused.
+.TP 7
+.B ECONNRESET
+Connection reset.
+.TP 7
+.B EDEADLK
+Resource deadlock would occur.
+.TP 7
+.B EDESTADDRREQ
+Destination address required.
+.TP 7
+.B EDOM
+Mathematics argument out of domain of function.
+.TP 7
+.B EDQUOT
+Reserved.
+.TP 7
+.B EEXIST
+File exists.
+.TP 7
+.B EFAULT
+Bad address.
+.TP 7
+.B EFBIG
+File too large.
+.TP 7
+.B EHOSTUNREACH
+Host is unreachable.
+.TP 7
+.B EIDRM
+Identifier removed.
+.TP 7
+.B EILSEQ
+Illegal byte sequence.
+.TP 7
+.B EINPROGRESS
+Operation in progress.
+.TP 7
+.B EINTR
+Interrupted function.
+.TP 7
+.B EINVAL
+Invalid argument.
+.TP 7
+.B EIO
+I/O error.
+.TP 7
+.B EISCONN
+Socket is connected.
+.TP 7
+.B EISDIR
+Is a directory.
+.TP 7
+.B ELOOP
+Too many levels of symbolic links.
+.TP 7
+.B EMFILE
+Too many open files.
+.TP 7
+.B EMLINK
+Too many links.
+.TP 7
+.B EMSGSIZE
+Message too large.
+.TP 7
+.B EMULTIHOP
+Reserved.
+.TP 7
+.B ENAMETOOLONG
+Filename too long.
+.TP 7
+.B ENETDOWN
+Network is down.
+.TP 7
+.B ENETRESET
+Connection aborted by network.
+.TP 7
+.B ENETUNREACH
+Network unreachable.
+.TP 7
+.B ENFILE
+Too many files open in system.
+.TP 7
+.B ENOBUFS
+No buffer space available.
+.TP 7
+.B ENODATA
+No message is available on the STREAM head read queue.
+.TP 7
+.B ENODEV
+No such device.
+.TP 7
+.B ENOENT
+No such file or directory.
+.TP 7
+.B ENOEXEC
+Executable file format error.
+.TP 7
+.B ENOLCK
+No locks available.
+.TP 7
+.B ENOLINK
+Reserved.
+.TP 7
+.B ENOMEM
+Not enough space.
+.TP 7
+.B ENOMSG
+No message of the desired type.
+.TP 7
+.B ENOPROTOOPT
+Protocol not available.
+.TP 7
+.B ENOSPC
+No space left on device.
+.TP 7
+.B ENOSR
+No STREAM resources.
+.TP 7
+.B ENOSTR
+Not a STREAM.
+.TP 7
+.B ENOSYS
+Function not supported.
+.TP 7
+.B ENOTCONN
+The socket is not connected.
+.TP 7
+.B ENOTDIR
+Not a directory.
+.TP 7
+.B ENOTEMPTY
+Directory not empty.
+.TP 7
+.B ENOTSOCK
+Not a socket.
+.TP 7
+.B ENOTSUP
+Not supported.
+.TP 7
+.B ENOTTY
+Inappropriate I/O control operation.
+.TP 7
+.B ENXIO
+No such device or address.
+.TP 7
+.B EOPNOTSUPP
+Operation not supported on socket.
+.TP 7
+.B EOVERFLOW
+Value too large to be stored in data type.
+.TP 7
+.B EPERM
+Operation not permitted.
+.TP 7
+.B EPIPE
+Broken pipe.
+.TP 7
+.B EPROTO
+Protocol error.
+.TP 7
+.B EPROTONOSUPPORT
+.sp
+Protocol not supported.
+.TP 7
+.B EPROTOTYPE
+Protocol wrong type for socket.
+.TP 7
+.B ERANGE
+Result too large.
+.TP 7
+.B EROFS
+Read-only file system.
+.TP 7
+.B ESPIPE
+Invalid seek.
+.TP 7
+.B ESRCH
+No such process.
+.TP 7
+.B ESTALE
+Reserved.
+.TP 7
+.B ETIME
+Stream \fIioctl\fP() timeout.
+.TP 7
+.B ETIMEDOUT
+Connection timed out.
+.TP 7
+.B ETXTBSY
+Text file busy.
+.TP 7
+.B EWOULDBLOCK
+Operation would block (may be the same value as [EAGAIN]).
+.TP 7
+.B EXDEV
+Cross-device link.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Additional error numbers may be defined on conforming systems; see
+the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The System Interfaces volume of IEEE\ Std\ 1003.1-2001, Section 2.3,
+Error
+Numbers
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/fcntl.h.0p b/man-pages-posix-2003/man0p/fcntl.h.0p
new file mode 100644
index 0000000..3ca3b21
--- /dev/null
+++ b/man-pages-posix-2003/man0p/fcntl.h.0p
@@ -0,0 +1,222 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<fcntl.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <fcntl.h>
+.SH NAME
+fcntl.h \- file control options
+.SH SYNOPSIS
+.LP
+\fB#include <fcntl.h>\fP
+.SH DESCRIPTION
+.LP
+The \fI<fcntl.h>\fP header shall define the following requests and
+arguments for use by the functions \fIfcntl\fP() and \fIopen\fP().
+.LP
+Values for \fIcmd\fP used by \fIfcntl\fP() (the following values are
+unique) are as
+follows:
+.TP 7
+F_DUPFD
+Duplicate file descriptor.
+.TP 7
+F_GETFD
+Get file descriptor flags.
+.TP 7
+F_SETFD
+Set file descriptor flags.
+.TP 7
+F_GETFL
+Get file status flags and file access modes.
+.TP 7
+F_SETFL
+Set file status flags.
+.TP 7
+F_GETLK
+Get record locking information.
+.TP 7
+F_SETLK
+Set record locking information.
+.TP 7
+F_SETLKW
+Set record locking information; wait if blocked.
+.TP 7
+F_GETOWN
+Get process or process group ID to receive SIGURG signals.
+.TP 7
+F_SETOWN
+Set process or process group ID to receive SIGURG signals.
+.sp
+.LP
+File descriptor flags used for \fIfcntl\fP() are as follows:
+.TP 7
+FD_CLOEXEC
+Close the file descriptor upon execution of an \fIexec\fP family function.
+.sp
+.LP
+Values for \fIl_type\fP used for record locking with \fIfcntl\fP()
+(the following values
+are unique) are as follows:
+.TP 7
+F_RDLCK
+Shared or read lock.
+.TP 7
+F_UNLCK
+Unlock.
+.TP 7
+F_WRLCK
+Exclusive or write lock.
+.sp
+.LP
+The values used for \fIl_whence\fP, SEEK_SET, SEEK_CUR, and SEEK_END
+shall be defined as described in \fI<unistd.h>\fP .
+.LP
+The following values are file creation flags and are used in the \fIoflag\fP
+value to \fIopen\fP(). They shall be bitwise-distinct.
+.TP 7
+O_CREAT
+Create file if it does not exist.
+.TP 7
+O_EXCL
+Exclusive use flag.
+.TP 7
+O_NOCTTY
+Do not assign controlling terminal.
+.TP 7
+O_TRUNC
+Truncate flag.
+.sp
+.LP
+File status flags used for \fIopen\fP() and \fIfcntl\fP() are as follows:
+.TP 7
+O_APPEND
+Set append mode.
+.TP 7
+O_DSYNC
+Write according to synchronized I/O data integrity completion.
+.TP 7
+O_NONBLOCK
+Non-blocking mode.
+.TP 7
+O_RSYNC
+Synchronized read I/O operations.
+.TP 7
+O_SYNC
+Write according to synchronized I/O file integrity completion.
+.sp
+.LP
+Mask for use with file access modes is as follows:
+.TP 7
+O_ACCMODE
+Mask for file access modes.
+.sp
+.LP
+File access modes used for \fIopen\fP() and \fIfcntl\fP() are as follows:
+.TP 7
+O_RDONLY
+Open for reading only.
+.TP 7
+O_RDWR
+Open for reading and writing.
+.TP 7
+O_WRONLY
+Open for writing only.
+.sp
+.LP
+The symbolic names for file modes for use as values of \fBmode_t\fP
+shall be defined as described in \fI<sys/stat.h>\fP .
+.LP
+Values for \fIadvice\fP used by \fIposix_fadvise\fP() are as follows:
+.TP 7
+POSIX_FADV_NORMAL
+.sp
+The application has no advice to give on its behavior with respect
+to the specified data. It is the default characteristic if no
+advice is given for an open file.
+.TP 7
+POSIX_FADV_SEQUENTIAL
+.sp
+The application expects to access the specified data sequentially
+from lower offsets to higher offsets.
+.TP 7
+POSIX_FADV_RANDOM
+.sp
+The application expects to access the specified data in a random order.
+.TP 7
+POSIX_FADV_WILLNEED
+.sp
+The application expects to access the specified data in the near future.
+.TP 7
+POSIX_FADV_DONTNEED
+.sp
+The application expects that it will not access the specified data
+in the near future.
+.TP 7
+POSIX_FADV_NOREUSE
+.sp
+The application expects to access the specified data once and then
+not reuse it thereafter.
+.sp
+.LP
+The structure \fBflock\fP describes a file lock. It shall include
+the following members:
+.sp
+.RS
+.nf
+
+\fBshort l_type \fP Type of lock; F_RDLCK, F_WRLCK, F_UNLCK. \fB
+short l_whence\fP Flag for starting offset. \fB
+off_t l_start \fP Relative offset in bytes. \fB
+off_t l_len \fP Size; if 0 then until EOF. \fB
+pid_t l_pid \fP Process ID of the process holding the lock; returned with F_GETLK. \fB
+\fP
+.fi
+.RE
+.LP
+The \fBmode_t\fP, \fBoff_t\fP, and \fBpid_t\fP types shall be defined
+as described in \fI<sys/types.h>\fP .
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBint creat(const char *, mode_t);
+int fcntl(int, int, ...);
+int open(const char *, int, ...);
+
+int posix_fadvise(int, off_t, size_t, int);
+int posix_fallocate(int, off_t, size_t);
+
+\fP
+.fi
+.RE
+.LP
+Inclusion of the \fI<fcntl.h>\fP header may also make visible all
+symbols from \fI<sys/stat.h>\fP and \fI<unistd.h>\fP.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<sys/stat.h>\fP, \fI<sys/types.h>\fP, \fI<unistd.h>\fP, the
+System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIcreat\fP(),
+\fIexec\fP, \fIfcntl\fP(), \fIopen\fP(), \fIposix_fadvise\fP(), \fIposix_fallocate\fP(),
+\fIposix_madvise\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/fenv.h.0p b/man-pages-posix-2003/man0p/fenv.h.0p
new file mode 100644
index 0000000..a57792e
--- /dev/null
+++ b/man-pages-posix-2003/man0p/fenv.h.0p
@@ -0,0 +1,247 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<fenv.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <fenv.h>
+.SH NAME
+fenv.h \- floating-point environment
+.SH SYNOPSIS
+.LP
+\fB#include <fenv.h>\fP
+.SH DESCRIPTION
+.LP
+The \fI<fenv.h>\fP header shall define the following data types through
+\fBtypedef\fP:
+.TP 7
+\fBfenv_t\fP
+Represents the entire floating-point environment. The floating-point
+environment refers collectively to any floating-point
+status flags and control modes supported by the implementation.
+.TP 7
+\fBfexcept_t\fP
+Represents the floating-point status flags collectively, including
+any status the implementation associates with the flags. A
+floating-point status flag is a system variable whose value is set
+(but never cleared) when a floating-point exception is raised,
+which occurs as a side effect of exceptional floating-point arithmetic
+to provide auxiliary information. A floating-point control
+mode is a system variable whose value may be set by the user to affect
+the subsequent behavior of floating-point arithmetic.
+.sp
+.LP
+The \fI<fenv.h>\fP header shall define the following constants if
+and only if the implementation supports the
+floating-point exception by means of the floating-point functions
+\fIfeclearexcept\fP(), \fIfegetexceptflag\fP(), \fIferaiseexcept\fP(),
+\fIfesetexceptflag\fP(), and \fIfetestexcept\fP(). Each expands to
+an integer constant expression with values such that
+bitwise-inclusive ORs of all combinations of the constants result
+in distinct values.
+.sp
+.RS
+.nf
+
+FE_DIVBYZERO
+FE_INEXACT
+FE_INVALID
+FE_OVERFLOW
+FE_UNDERFLOW
+.fi
+.RE
+.LP
+The \fI<fenv.h>\fP header shall define the following constant, which
+is simply the bitwise-inclusive OR of all
+floating-point exception constants defined above:
+.sp
+.RS
+.nf
+
+FE_ALL_EXCEPT
+.fi
+.RE
+.LP
+The \fI<fenv.h>\fP header shall define the following constants if
+and only if the implementation supports getting and
+setting the represented rounding direction by means of the \fIfegetround\fP()
+and \fIfesetround\fP() functions. Each expands to an integer constant
+expression whose values
+are distinct non-negative vales.
+.sp
+.RS
+.nf
+
+FE_DOWNWARD
+FE_TONEAREST
+FE_TOWARDZERO
+FE_UPWARD
+.fi
+.RE
+.LP
+The \fI<fenv.h>\fP header shall define the following constant, which
+represents the default floating-point environment
+(that is, the one installed at program startup) and has type pointer
+to const-qualified \fBfenv_t\fP. It can be used as an
+argument to the functions within the \fI<fenv.h>\fP header that manage
+the floating-point environment.
+.sp
+.RS
+.nf
+
+FE_DFL_ENV
+.fi
+.RE
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBint feclearexcept(int);
+int fegetexceptflag(fexcept_t *, int);
+int feraiseexcept(int);
+int fesetexceptflag(const fexcept_t *, int);
+int fetestexcept(int);
+int fegetround(void);
+int fesetround(int);
+int fegetenv(fenv_t *);
+int feholdexcept(fenv_t *);
+int fesetenv(const fenv_t *);
+int feupdateenv(const fenv_t *);
+\fP
+.fi
+.RE
+.LP
+The FENV_ACCESS pragma provides a means to inform the implementation
+when an application might access the floating-point
+environment to test floating-point status flags or run under non-default
+floating-point control modes. The pragma shall occur
+either outside external declarations or preceding all explicit declarations
+and statements inside a compound statement. When
+outside external declarations, the pragma takes effect from its occurrence
+until another FENV_ACCESS pragma is encountered, or
+until the end of the translation unit. When inside a compound statement,
+the pragma takes effect from its occurrence until another
+FENV_ACCESS pragma is encountered (including within a nested compound
+statement), or until the end of the compound statement; at
+the end of a compound statement the state for the pragma is restored
+to its condition just before the compound statement. If this
+pragma is used in any other context, the behavior is undefined. If
+part of an application tests floating-point status flags, sets
+floating-point control modes, or runs under non-default mode settings,
+but was translated with the state for the FENV_ACCESS pragma
+off, the behavior is undefined. The default state (on or off) for
+the pragma is implementation-defined. (When execution passes from
+a part of the application translated with FENV_ACCESS off to a part
+translated with FENV_ACCESS on, the state of the floating-point
+status flags is unspecified and the floating-point control modes have
+their default settings.)
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+This header is designed to support the floating-point exception status
+flags and directed-rounding control modes required by the
+IEC\ 60559:1989 standard, and other similar floating-point state information.
+Also it is designed to facilitate code
+portability among all systems.
+.LP
+Certain application programming conventions support the intended model
+of use for the floating-point environment:
+.IP " *" 3
+A function call does not alter its caller's floating-point control
+modes, clear its caller's floating-point status flags, nor
+depend on the state of its caller's floating-point status flags unless
+the function is so documented.
+.LP
+.IP " *" 3
+A function call is assumed to require default floating-point control
+modes, unless its documentation promises otherwise.
+.LP
+.IP " *" 3
+A function call is assumed to have the potential for raising floating-point
+exceptions, unless its documentation promises
+otherwise.
+.LP
+.LP
+With these conventions, an application can safely assume default floating-point
+control modes (or be unaware of them). The
+responsibilities associated with accessing the floating-point environment
+fall on the application that does so explicitly.
+.LP
+Even though the rounding direction macros may expand to constants
+corresponding to the values of FLT_ROUNDS, they are not
+required to do so.
+.LP
+For example:
+.sp
+.RS
+.nf
+
+\fB#include <fenv.h>
+void f(double x)
+{
+ #pragma STDC FENV_ACCESS ON
+ void g(double);
+ void h(double);
+ /* ... */
+ g(x + 1);
+ h(x + 1);
+ /* ... */
+}
+\fP
+.fi
+.RE
+.LP
+If the function \fIg\fP() might depend on status flags set as a side
+effect of the first \fIx\fP+1, or if the second
+\fIx\fP+1 might depend on control modes set as a side effect of the
+call to function \fIg\fP(), then the application shall
+contain an appropriately placed invocation as follows:
+.sp
+.RS
+.nf
+
+\fB#pragma STDC FENV_ACCESS ON
+\fP
+.fi
+.RE
+.SH RATIONALE
+.SS The fexcept_t Type
+.LP
+\fBfexcept_t\fP does not have to be an integer type. Its values must
+be obtained by a call to \fIfegetexceptflag\fP(), and cannot be created
+by logical operations from the exception
+macros. An implementation might simply implement \fBfexcept_t\fP as
+an \fBint\fP and use the representations reflected by the
+exception macros, but is not required to; other representations might
+contain extra information about the exceptions.
+\fBfexcept_t\fP might be a \fBstruct\fP with a member for each exception
+(that might hold the address of the first or last
+floating-point instruction that caused that exception). The ISO/IEC\ 9899:1999
+standard makes no claims about the internals of
+an \fBfexcept_t\fP, and so the user cannot inspect it.
+.SS Exception and Rounding Macros
+.LP
+Macros corresponding to unsupported modes and rounding directions
+are not defined by the implementation and must not be defined
+by the application. An application might use \fB#ifdef\fP to test
+for this.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIfeclearexcept\fP(),
+\fIfegetenv\fP(), \fIfegetexceptflag\fP(), \fIfegetround\fP(),
+\fIfeholdexcept\fP(), \fIferaiseexcept\fP(), \fIfesetenv\fP(), \fIfesetexceptflag\fP(),
+\fIfesetround\fP(),
+\fIfetestexcept\fP(), \fIfeupdateenv\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/float.h.0p b/man-pages-posix-2003/man0p/float.h.0p
new file mode 100644
index 0000000..34ed261
--- /dev/null
+++ b/man-pages-posix-2003/man0p/float.h.0p
@@ -0,0 +1,328 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<float.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <float.h>
+.SH NAME
+float.h \- floating types
+.SH SYNOPSIS
+.LP
+\fB#include <float.h>\fP
+.SH DESCRIPTION
+.LP
+The characteristics of floating types are defined in terms of a model
+that describes a representation of floating-point numbers
+and values that provide information about an implementation's floating-point
+arithmetic.
+.LP
+The following parameters are used to define the model for each floating-point
+type:
+.TP 7
+\fIs\fP
+Sign (\(+-1).
+.TP 7
+\fIb\fP
+Base or radix of exponent representation (an integer >1).
+.TP 7
+\fIe\fP
+Exponent (an integer between a minimum \fIe\fP_min and a maximum \fIe\fP_max).
+.TP 7
+\fIp\fP
+Precision (the number of base-\fIb\fP digits in the significand).
+.TP 7
+\fIf\fP_k
+Non-negative integers less than \fIb\fP (the significand digits).
+.sp
+.LP
+A floating-point number \fIx\fP is defined by the following model:
+.LP
+.LP
+In addition to normalized floating-point numbers (\fIf\fP_1>0 if \fIx\fP!=0),
+floating types may be able to contain other
+kinds of floating-point numbers, such as subnormal floating-point
+numbers ( \fIx\fP!=0, \fIe\fP= \fIe\fP_min, \fIf\fP_1=0) and
+unnormalized floating-point numbers ( \fIx\fP!=0, \fIe\fP> \fIe\fP_min,
+\fIf\fP_1=0), and values that are not floating-point
+numbers, such as infinities and NaNs. A \fINaN\fP is an encoding signifying
+Not-a-Number. A \fIquiet NaN\fP propagates through
+almost every arithmetic operation without raising a floating-point
+exception; a \fIsignaling NaN\fP generally raises a
+floating-point exception when occurring as an arithmetic operand.
+.LP
+The accuracy of the floating-point operations ( \fB'+'\fP, \fB'-'\fP,
+\fB'*'\fP, \fB'/'\fP ) and of the library
+functions in \fI<math.h>\fP and \fI<complex.h>\fP that return floating-point
+results is implementation-defined. The
+implementation may state that the accuracy is unknown.
+.LP
+All integer values in the \fI<float.h>\fP header, except FLT_ROUNDS,
+shall be constant expressions suitable for use in
+\fB#if\fP preprocessing directives; all floating values shall be constant
+expressions. All except DECIMAL_DIG, FLT_EVAL_METHOD,
+FLT_RADIX, and FLT_ROUNDS have separate names for all three floating-point
+types. The floating-point model representation is
+provided for all values except FLT_EVAL_METHOD and FLT_ROUNDS.
+.LP
+The rounding mode for floating-point addition is characterized by
+the implementation-defined value of FLT_ROUNDS:
+.TP 7
+-1
+Indeterminable.
+.TP 7
+\ 0
+Toward zero.
+.TP 7
+\ 1
+To nearest.
+.TP 7
+\ 2
+Toward positive infinity.
+.TP 7
+\ 3
+Toward negative infinity.
+.sp
+.LP
+All other values for FLT_ROUNDS characterize implementation-defined
+rounding behavior.
+.LP
+The values of operations with floating operands and values subject
+to the usual arithmetic conversions and of floating constants
+are evaluated to a format whose range and precision may be greater
+than required by the type. The use of evaluation formats is
+characterized by the implementation-defined value of FLT_EVAL_METHOD:
+.TP 7
+-1
+Indeterminable.
+.TP 7
+\ 0
+Evaluate all operations and constants just to the range and precision
+of the type.
+.TP 7
+\ 1
+Evaluate operations and constants of type \fBfloat\fP and \fBdouble\fP
+to the range and precision of the \fBdouble\fP type;
+evaluate \fBlong double\fP operations and constants to the range and
+precision of the \fBlong double\fP type.
+.TP 7
+\ 2
+Evaluate all operations and constants to the range and precision of
+the \fBlong double\fP type.
+.sp
+.LP
+All other negative values for FLT_EVAL_METHOD characterize implementation-defined
+behavior.
+.LP
+The values given in the following list shall be defined as constant
+expressions with implementation-defined values that are
+greater or equal in magnitude (absolute value) to those shown, with
+the same sign.
+.IP " *" 3
+Radix of exponent representation, \fIb\fP.
+.TP 7
+FLT_RADIX
+.RS
+2
+.RE
+.sp
+.LP
+.IP " *" 3
+Number of base-FLT_RADIX digits in the floating-point significand,
+\fIp\fP.
+.TP 7
+FLT_MANT_DIG
+.TP 7
+DBL_MANT_DIG
+.TP 7
+LDBL_MANT_DIG
+.sp
+.LP
+.IP " *" 3
+Number of decimal digits, \fIn\fP, such that any floating-point number
+in the widest supported floating type with \fIp\fP_max
+radix \fIb\fP digits can be rounded to a floating-point number with
+\fIn\fP decimal digits and back again without change to the
+value.
+.LP
+.TP 7
+DECIMAL_DIG
+.RS
+10
+.RE
+.sp
+.LP
+.IP " *" 3
+Number of decimal digits, \fIq\fP, such that any floating-point number
+with \fIq\fP decimal digits can be rounded into a
+floating-point number with \fIp\fP radix \fIb\fP digits and back again
+without change to the \fIq\fP decimal digits.
+.LP
+.TP 7
+FLT_DIG
+.RS
+6
+.RE
+.TP 7
+DBL_DIG
+.RS
+10
+.RE
+.TP 7
+LDBL_DIG
+.RS
+10
+.RE
+.sp
+.LP
+.IP " *" 3
+Minimum negative integer such that FLT_RADIX raised to that power
+minus 1 is a normalized floating-point number, \fIe\fP_min.
+.TP 7
+FLT_MIN_EXP
+.TP 7
+DBL_MIN_EXP
+.TP 7
+LDBL_MIN_EXP
+.sp
+.LP
+.IP " *" 3
+Minimum negative integer such that 10 raised to that power is in the
+range of normalized floating-point numbers.
+.LP
+.TP 7
+FLT_MIN_10_EXP
+.RS
+-37
+.RE
+.TP 7
+DBL_MIN_10_EXP
+.RS
+-37
+.RE
+.TP 7
+LDBL_MIN_10_EXP
+.RS
+-37
+.RE
+.sp
+.LP
+.IP " *" 3
+Maximum integer such that FLT_RADIX raised to that power minus 1 is
+a representable finite floating-point number, \fIe\fP_max.
+.TP 7
+FLT_MAX_EXP
+.TP 7
+DBL_MAX_EXP
+.TP 7
+LDBL_MAX_EXP
+.sp
+.LP
+.IP " *" 3
+Maximum integer such that 10 raised to that power is in the range
+of representable finite floating-point numbers.
+.LP
+.TP 7
+FLT_MAX_10_EXP
+.RS
++37
+.RE
+.TP 7
+DBL_MAX_10_EXP
+.RS
++37
+.RE
+.TP 7
+LDBL_MAX_10_EXP
+.RS
++37
+.RE
+.sp
+.LP
+.LP
+The values given in the following list shall be defined as constant
+expressions with implementation-defined values that are
+greater than or equal to those shown:
+.IP " *" 3
+Maximum representable finite floating-point number.
+.LP
+.TP 7
+FLT_MAX
+.RS
+1E+37
+.RE
+.TP 7
+DBL_MAX
+.RS
+1E+37
+.RE
+.TP 7
+LDBL_MAX
+.RS
+1E+37
+.RE
+.sp
+.LP
+.LP
+The values given in the following list shall be defined as constant
+expressions with implementation-defined (positive) values
+that are less than or equal to those shown:
+.IP " *" 3
+The difference between 1 and the least value greater than 1 that is
+representable in the given floating-point type, \fIb\fP**1-\fIp\fP.
+.TP 7
+FLT_EPSILON
+.RS
+1E-5
+.RE
+.TP 7
+DBL_EPSILON
+.RS
+1E-9
+.RE
+.TP 7
+LDBL_EPSILON
+.RS
+1E-9
+.RE
+.sp
+.LP
+.IP " *" 3
+Minimum normalized positive floating-point number, \fIb\fP**\fIe\fP_min.
+.TP 7
+FLT_MIN
+.RS
+1E-37
+.RE
+.TP 7
+DBL_MIN
+.RS
+1E-37
+.RE
+.TP 7
+LDBL_MIN
+.RS
+1E-37
+.RE
+.sp
+.LP
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<complex.h>\fP, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/fmtmsg.h.0p b/man-pages-posix-2003/man0p/fmtmsg.h.0p
new file mode 100644
index 0000000..350eadd
--- /dev/null
+++ b/man-pages-posix-2003/man0p/fmtmsg.h.0p
@@ -0,0 +1,129 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<fmtmsg.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <fmtmsg.h>
+.SH NAME
+fmtmsg.h \- message display structures
+.SH SYNOPSIS
+.LP
+\fB#include <fmtmsg.h> \fP
+.SH DESCRIPTION
+.LP
+The \fI<fmtmsg.h>\fP header shall define the following macros, which
+expand to constant integer expressions:
+.TP 7
+MM_HARD
+Source of the condition is hardware.
+.TP 7
+MM_SOFT
+Source of the condition is software.
+.TP 7
+MM_FIRM
+Source of the condition is firmware.
+.TP 7
+MM_APPL
+Condition detected by application.
+.TP 7
+MM_UTIL
+Condition detected by utility.
+.TP 7
+MM_OPSYS
+Condition detected by operating system.
+.TP 7
+MM_RECOVER
+Recoverable error.
+.TP 7
+MM_NRECOV
+Non-recoverable error.
+.TP 7
+MM_HALT
+Error causing application to halt.
+.TP 7
+MM_ERROR
+Application has encountered a non-fatal fault.
+.TP 7
+MM_WARNING
+Application has detected unusual non-error condition.
+.TP 7
+MM_INFO
+Informative message.
+.TP 7
+MM_NOSEV
+No severity level provided for the message.
+.TP 7
+MM_PRINT
+Display message on standard error.
+.TP 7
+MM_CONSOLE
+Display message on system console.
+.sp
+.LP
+The table below indicates the null values and identifiers for \fIfmtmsg\fP()
+arguments.
+The \fI<fmtmsg.h>\fP header shall define the macros in the \fBIdentifier\fP
+column, which expand to constant expressions
+that expand to expressions of the type indicated in the \fBType\fP
+column:
+.TS C
+center; l l l l.
+\fBArgument\fP \fBType\fP \fBNull-Value\fP \fBIdentifier\fP
+\fIlabel\fP \fBchar *\fP (\fBchar\fP*)0 MM_NULLLBL
+\fIseverity\fP \fBint\fP 0 MM_NULLSEV
+\fIclass\fP \fBlong\fP \fB0L\fP MM_NULLMC
+\fItext\fP \fBchar *\fP (\fBchar\fP*)0 MM_NULLTXT
+\fIaction\fP \fBchar *\fP (\fBchar\fP*)0 MM_NULLACT
+\fItag\fP \fBchar *\fP (\fBchar\fP*)0 MM_NULLTAG
+.TE
+.LP
+The \fI<fmtmsg.h>\fP header shall also define the following macros
+for use as return values for \fIfmtmsg\fP():
+.TP 7
+MM_OK
+The function succeeded.
+.TP 7
+MM_NOTOK
+The function failed completely.
+.TP 7
+MM_NOMSG
+The function was unable to generate a message on standard error, but
+otherwise succeeded.
+.TP 7
+MM_NOCON
+The function was unable to generate a console message, but otherwise
+succeeded.
+.sp
+.LP
+The following shall be declared as a function and may also be defined
+as a macro. A function prototype shall be provided.
+.sp
+.RS
+.nf
+
+\fBint fmtmsg(long, const char *, int,
+ const char *, const char *, const char *);
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIfmtmsg\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/fnmatch.h.0p b/man-pages-posix-2003/man0p/fnmatch.h.0p
new file mode 100644
index 0000000..7d08f21
--- /dev/null
+++ b/man-pages-posix-2003/man0p/fnmatch.h.0p
@@ -0,0 +1,65 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<fnmatch.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <fnmatch.h>
+.SH NAME
+fnmatch.h \- filename-matching types
+.SH SYNOPSIS
+.LP
+\fB#include <fnmatch.h>\fP
+.SH DESCRIPTION
+.LP
+The \fI<fnmatch.h>\fP header shall define the following constants:
+.TP 7
+FNM_NOMATCH
+The string does not match the specified pattern.
+.TP 7
+FNM_PATHNAME
+Slash in \fIstring\fP only matches slash in \fIpattern\fP.
+.TP 7
+FNM_PERIOD
+Leading period in \fIstring\fP must be exactly matched by period in
+\fIpattern\fP.
+.TP 7
+FNM_NOESCAPE
+Disable backslash escaping.
+.TP 7
+FNM_NOSYS
+Reserved.
+.sp
+.LP
+The following shall be declared as a function and may also be defined
+as a macro. A function prototype shall be provided.
+.sp
+.RS
+.nf
+
+\fBint fnmatch(const char *, const char *, int);
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIfnmatch\fP(),
+the
+Shell and Utilities volume of IEEE\ Std\ 1003.1-2001
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/ftw.h.0p b/man-pages-posix-2003/man0p/ftw.h.0p
new file mode 100644
index 0000000..6067cff
--- /dev/null
+++ b/man-pages-posix-2003/man0p/ftw.h.0p
@@ -0,0 +1,111 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<ftw.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <ftw.h>
+.SH NAME
+ftw.h \- file tree traversal
+.SH SYNOPSIS
+.LP
+\fB#include <ftw.h> \fP
+.SH DESCRIPTION
+.LP
+The \fI<ftw.h>\fP header shall define the \fBFTW\fP structure that
+includes at least the following members:
+.sp
+.RS
+.nf
+
+\fBint base
+int level
+\fP
+.fi
+.RE
+.LP
+The \fI<ftw.h>\fP header shall define macros for use as values of
+the third argument to the application-supplied function
+that is passed as the second argument to \fIftw\fP() and \fInftw\fP():
+.TP 7
+FTW_F
+File.
+.TP 7
+FTW_D
+Directory.
+.TP 7
+FTW_DNR
+Directory without read permission.
+.TP 7
+FTW_DP
+Directory with subdirectories visited.
+.TP 7
+FTW_NS
+Unknown type; \fIstat\fP() failed.
+.TP 7
+FTW_SL
+Symbolic link.
+.TP 7
+FTW_SLN
+Symbolic link that names a nonexistent file.
+.sp
+.LP
+The \fI<ftw.h>\fP header shall define macros for use as values of
+the fourth argument to \fInftw\fP():
+.TP 7
+FTW_PHYS
+Physical walk, does not follow symbolic links. Otherwise, \fInftw\fP()
+follows links but
+does not walk down any path that crosses itself.
+.TP 7
+FTW_MOUNT
+The walk does not cross a mount point.
+.TP 7
+FTW_DEPTH
+All subdirectories are visited before the directory itself.
+.TP 7
+FTW_CHDIR
+The walk changes to each directory before reading it.
+.sp
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBint ftw(const char *, int (*)(const char *, const struct stat *,
+ int), int);
+int nftw(const char *, int (*)(const char *, const struct stat *,
+ int, struct FTW*), int, int);
+\fP
+.fi
+.RE
+.LP
+The \fI<ftw.h>\fP header shall define the \fBstat\fP structure and
+the symbolic names for \fIst_mode\fP and the file
+type test macros as described in \fI<sys/stat.h>\fP .
+.LP
+Inclusion of the \fI<ftw.h>\fP header may also make visible all symbols
+from \fI<sys/stat.h>\fP.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<sys/stat.h>\fP, the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+\fIftw\fP(), \fInftw\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/glob.h.0p b/man-pages-posix-2003/man0p/glob.h.0p
new file mode 100644
index 0000000..f3a8c06
--- /dev/null
+++ b/man-pages-posix-2003/man0p/glob.h.0p
@@ -0,0 +1,111 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<glob.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <glob.h>
+.SH NAME
+glob.h \- pathname pattern-matching types
+.SH SYNOPSIS
+.LP
+\fB#include <glob.h>\fP
+.SH DESCRIPTION
+.LP
+The \fI<glob.h>\fP header shall define the structures and symbolic
+constants used by the \fIglob\fP() function.
+.LP
+The structure type \fBglob_t\fP shall contain at least the following
+members:
+.sp
+.RS
+.nf
+
+\fBsize_t gl_pathc\fP Count of paths matched by \fIpattern.\fP \fB
+char **gl_pathv\fP Pointer to a list of matched pathnames. \fB
+size_t gl_offs \fP Slots to reserve at the beginning of \fIgl_pathv.\fP \fB
+\fP
+.fi
+.RE
+.LP
+The following constants shall be provided as values for the \fIflags\fP
+argument:
+.TP 7
+GLOB_APPEND
+Append generated pathnames to those previously obtained.
+.TP 7
+GLOB_DOOFFS
+Specify how many null pointers to add to the beginning of \fIgl_pathv\fP.
+.TP 7
+GLOB_ERR
+Cause \fIglob\fP() to return on error.
+.TP 7
+GLOB_MARK
+Each pathname that is a directory that matches \fIpattern\fP has a
+slash appended.
+.TP 7
+GLOB_NOCHECK
+If \fIpattern\fP does not match any pathname, then return a list consisting
+of only \fIpattern\fP.
+.TP 7
+GLOB_NOESCAPE
+Disable backslash escaping.
+.TP 7
+GLOB_NOSORT
+Do not sort the pathnames returned.
+.sp
+.LP
+The following constants shall be defined as error return values:
+.TP 7
+GLOB_ABORTED
+The scan was stopped because GLOB_ERR was set or (*\fIerrfunc\fP)()
+returned non-zero.
+.TP 7
+GLOB_NOMATCH
+The pattern does not match any existing pathname, and GLOB_NOCHECK
+was not set in \fIflags\fP.
+.TP 7
+GLOB_NOSPACE
+An attempt to allocate memory failed.
+.TP 7
+GLOB_NOSYS
+Reserved.
+.sp
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBint glob(const char *restrict, int, int (*)(const char *, int),
+ glob_t *restrict);
+void globfree (glob_t *);
+\fP
+.fi
+.RE
+.LP
+The implementation may define additional macros or constants using
+names beginning with GLOB_.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIglob\fP(),
+the Shell
+and Utilities volume of IEEE\ Std\ 1003.1-2001
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/grp.h.0p b/man-pages-posix-2003/man0p/grp.h.0p
new file mode 100644
index 0000000..f952418
--- /dev/null
+++ b/man-pages-posix-2003/man0p/grp.h.0p
@@ -0,0 +1,74 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<grp.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <grp.h>
+.SH NAME
+grp.h \- group structure
+.SH SYNOPSIS
+.LP
+\fB#include <grp.h>\fP
+.SH DESCRIPTION
+.LP
+The \fI<grp.h>\fP header shall declare the structure \fBgroup\fP which
+shall include the following members:
+.sp
+.RS
+.nf
+
+\fBchar *gr_name\fP The name of the group. \fB
+gid_t gr_gid \fP Numerical group ID. \fB
+char **gr_mem \fP Pointer to a null-terminated array of character \fB
+ \fP pointers to member names. \fB
+\fP
+.fi
+.RE
+.LP
+The \fBgid_t\fP type shall be defined as described in \fI<sys/types.h>\fP
+\&.
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBstruct group *getgrgid(gid_t);
+struct group *getgrnam(const char *);
+
+int getgrgid_r(gid_t, struct group *, char *,
+ size_t, struct group **);
+int getgrnam_r(const char *, struct group *, char *,
+ size_t, struct group **);
+
+
+struct group *getgrent(void);
+void endgrent(void);
+void setgrent(void);
+
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<sys/types.h>\fP, the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+\fIendgrent\fP(), \fIgetgrgid\fP(), \fIgetgrnam\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/iconv.h.0p b/man-pages-posix-2003/man0p/iconv.h.0p
new file mode 100644
index 0000000..7a0d32a
--- /dev/null
+++ b/man-pages-posix-2003/man0p/iconv.h.0p
@@ -0,0 +1,54 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<iconv.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <iconv.h>
+.SH NAME
+iconv.h \- codeset conversion facility
+.SH SYNOPSIS
+.LP
+\fB#include <iconv.h> \fP
+.SH DESCRIPTION
+.LP
+The \fI<iconv.h>\fP header shall define the following type:
+.TP 7
+\fBiconv_t\fP
+Identifies the conversion from one codeset to another.
+.sp
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBiconv_t iconv_open(const char *, const char *);
+size_t iconv(iconv_t, char **restrict, size_t *restrict,
+ char **restrict, size_t *restrict);
+int iconv_close(iconv_t);
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIiconv\fP(),
+\fIiconv_close\fP(), \fIiconv_open\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/if.h.0p b/man-pages-posix-2003/man0p/if.h.0p
new file mode 100644
index 0000000..b8b129c
--- /dev/null
+++ b/man-pages-posix-2003/man0p/if.h.0p
@@ -0,0 +1,69 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<net/if.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <net/if.h>
+.SH NAME
+net/if.h \- sockets local interfaces
+.SH SYNOPSIS
+.LP
+\fB#include <net/if.h>\fP
+.SH DESCRIPTION
+.LP
+The \fI<net/if.h>\fP header shall define the \fBif_nameindex\fP structure
+that includes at least the following
+members:
+.sp
+.RS
+.nf
+
+\fBunsigned if_index \fP Numeric index of the interface. \fB
+char *if_name \fP Null-terminated name of the interface. \fB
+\fP
+.fi
+.RE
+.LP
+The \fI<net/if.h>\fP header shall define the following macro for the
+length of a buffer containing an interface name
+(including the terminating NULL character):
+.TP 7
+IF_NAMESIZE
+Interface name length.
+.sp
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBunsigned if_nametoindex(const char *);
+char *if_indextoname(unsigned, char *);
+struct if_nameindex *if_nameindex(void);
+void if_freenameindex(struct if_nameindex *);
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIif_freenameindex\fP(),
+\fIif_indextoname\fP(), \fIif_nameindex\fP(), \fIif_nametoindex\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/in.h.0p b/man-pages-posix-2003/man0p/in.h.0p
new file mode 100644
index 0000000..bf37e6a
--- /dev/null
+++ b/man-pages-posix-2003/man0p/in.h.0p
@@ -0,0 +1,315 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<netinet/in.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <netinet/in.h>
+.SH NAME
+netinet/in.h \- Internet address family
+.SH SYNOPSIS
+.LP
+\fB#include <netinet/in.h>\fP
+.SH DESCRIPTION
+.LP
+The \fI<netinet/in.h>\fP header shall define the following types:
+.TP 7
+\fBin_port_t\fP
+Equivalent to the type \fBuint16_t\fP as defined in \fI<inttypes.h>\fP
+\&.
+.TP 7
+\fBin_addr_t\fP
+Equivalent to the type \fBuint32_t\fP as defined in \fI<inttypes.h>\fP
+\&.
+.sp
+.LP
+The \fBsa_family_t\fP type shall be defined as described in \fI<sys/socket.h>\fP
+\&.
+.LP
+The \fBuint8_t\fP and \fBuint32_t\fP type shall be defined as described
+in \fI<inttypes.h>\fP. Inclusion of the \fI<netinet/in.h>\fP header
+may also make
+visible all symbols from \fI<inttypes.h>\fP and \fI<sys/socket.h>\fP.
+.LP
+The \fI<netinet/in.h>\fP header shall define the \fBin_addr\fP structure
+that includes at least the following
+member:
+.sp
+.RS
+.nf
+
+\fBin_addr_t s_addr
+\fP
+.fi
+.RE
+.LP
+The \fI<netinet/in.h>\fP header shall define the \fBsockaddr_in\fP
+structure that includes at least the following
+members (all in network byte order):
+.sp
+.RS
+.nf
+
+\fBsa_family_t sin_family \fP AF_INET. \fB
+in_port_t sin_port \fP Port number. \fB
+struct in_addr sin_addr \fP IP address. \fB
+\fP
+.fi
+.RE
+.LP
+The \fBsockaddr_in\fP structure is used to store addresses for the
+Internet address family. Values of this type shall be cast
+by applications to \fBstruct sockaddr\fP for use with socket functions.
+.LP
+The \fI<netinet/in.h>\fP header shall define the \fBin6_addr\fP structure
+that contains at least the following
+member:
+.sp
+.RS
+.nf
+
+\fBuint8_t s6_addr[16]
+\fP
+.fi
+.RE
+.LP
+This array is used to contain a 128-bit IPv6 address, stored in network
+byte order.
+.LP
+The \fI<netinet/in.h>\fP header shall define the \fBsockaddr_in6\fP
+structure that includes at least the following
+members (all in network byte order):
+.sp
+.RS
+.nf
+
+\fBsa_family_t sin6_family \fP AF_INET6. \fB
+in_port_t sin6_port \fP Port number. \fB
+uint32_t sin6_flowinfo \fP IPv6 traffic class and flow information. \fB
+struct in6_addr sin6_addr \fP IPv6 address. \fB
+uint32_t sin6_scope_id \fP Set of interfaces for a scope. \fB
+\fP
+.fi
+.RE
+.LP
+The \fBsockaddr_in6\fP structure shall be set to zero by an application
+prior to using it, since implementations are free to
+have additional, implementation-defined fields in \fBsockaddr_in6\fP.
+.LP
+The \fIsin6_scope_id\fP field is a 32-bit integer that identifies
+a set of interfaces as appropriate for the scope of the
+address carried in the \fIsin6_addr\fP field. For a link scope \fIsin6_addr\fP,
+the application shall ensure that
+\fIsin6_scope_id\fP is a link index. For a site scope \fIsin6_addr\fP,
+the application shall ensure that \fIsin6_scope_id\fP is
+a site index. The mapping of \fIsin6_scope_id\fP to an interface or
+set of interfaces is implementation-defined.
+.LP
+The \fI<netinet/in.h>\fP header shall declare the following external
+variable:
+.sp
+.RS
+.nf
+
+\fBconst struct in6_addr in6addr_any
+\fP
+.fi
+.RE
+.LP
+This variable is initialized by the system to contain the wildcard
+IPv6 address. The \fI<netinet/in.h>\fP header also
+defines the IN6ADDR_ANY_INIT macro. This macro must be constant at
+compile time and can be used to initialize a variable of type
+\fBstruct in6_addr\fP to the IPv6 wildcard address.
+.LP
+The \fI<netinet/in.h>\fP header shall declare the following external
+variable:
+.sp
+.RS
+.nf
+
+\fBconst struct in6_addr in6addr_loopback
+\fP
+.fi
+.RE
+.LP
+This variable is initialized by the system to contain the loopback
+IPv6 address. The \fI<netinet/in.h>\fP header also
+defines the IN6ADDR_LOOPBACK_INIT macro. This macro must be constant
+at compile time and can be used to initialize a variable of
+type \fBstruct in6_addr\fP to the IPv6 loopback address.
+.LP
+The \fI<netinet/in.h>\fP header shall define the \fBipv6_mreq\fP structure
+that includes at least the following
+members:
+.sp
+.RS
+.nf
+
+\fBstruct in6_addr ipv6mr_multiaddr \fP IPv6 multicast address. \fB
+unsigned ipv6mr_interface \fP Interface index. \fB
+\fP
+.fi
+.RE
+.LP
+The \fI<netinet/in.h>\fP header shall define the following macros
+for use as values of the \fIlevel\fP argument of \fIgetsockopt\fP()
+and \fIsetsockopt\fP():
+.TP 7
+IPPROTO_IP
+Internet protocol.
+.TP 7
+IPPROTO_IPV6
+Internet Protocol Version 6.
+.TP 7
+IPPROTO_ICMP
+Control message protocol.
+.TP 7
+IPPROTO_RAW
+Raw IP Packets Protocol.
+.TP 7
+IPPROTO_TCP
+Transmission control protocol.
+.TP 7
+IPPROTO_UDP
+User datagram protocol.
+.sp
+.LP
+The \fI<netinet/in.h>\fP header shall define the following macros
+for use as destination addresses for \fIconnect\fP(), \fIsendmsg\fP(),
+and \fIsendto\fP():
+.TP 7
+INADDR_ANY
+IPv4 local host address.
+.TP 7
+INADDR_BROADCAST
+IPv4 broadcast address.
+.sp
+.LP
+The \fI<netinet/in.h>\fP header shall define the following macro to
+help applications declare buffers of the proper size
+to store IPv4 addresses in string form:
+.TP 7
+INET_ADDRSTRLEN
+16. Length of the string form for IP.
+.sp
+.LP
+The \fIhtonl\fP(), \fIhtons\fP(), \fIntohl\fP(), and \fIntohs\fP()
+functions shall be
+available as defined in \fI<arpa/inet.h>\fP . Inclusion of the
+\fI<netinet/in.h>\fP header may also make visible all symbols from
+\fI<arpa/inet.h>\fP .
+.LP
+The \fI<netinet/in.h>\fP header shall define the following macro to
+help applications declare buffers of the proper
+size to store IPv6 addresses in string form:
+.TP 7
+INET6_ADDRSTRLEN
+46. Length of the string form for IPv6.
+.sp
+.LP
+The \fI<netinet/in.h>\fP header shall define the following macros,
+with distinct integer values, for use in the
+\fIoption_name\fP argument in the \fIgetsockopt\fP() or \fIsetsockopt\fP()
+functions at protocol level IPPROTO_IPV6:
+.TP 7
+IPV6_JOIN_GROUP
+Join a multicast group.
+.TP 7
+IPV6_LEAVE_GROUP
+Quit a multicast group.
+.TP 7
+IPV6_MULTICAST_HOPS
+.sp
+Multicast hop limit.
+.TP 7
+IPV6_MULTICAST_IF
+Interface to use for outgoing multicast packets.
+.TP 7
+IPV6_MULTICAST_LOOP
+.sp
+Multicast packets are delivered back to the local application.
+.TP 7
+IPV6_UNICAST_HOPS
+Unicast hop limit.
+.TP 7
+IPV6_V6ONLY
+Restrict AF_INET6 socket to IPv6 communications only.
+.sp
+.LP
+The \fI<netinet/in.h>\fP header shall define the following macros
+that test for special IPv6 addresses. Each macro is of
+type \fBint\fP and takes a single argument of type \fBconst struct
+in6_addr *\fP:
+.TP 7
+IN6_IS_ADDR_UNSPECIFIED
+.sp
+Unspecified address.
+.TP 7
+IN6_IS_ADDR_LOOPBACK
+.sp
+Loopback address.
+.TP 7
+IN6_IS_ADDR_MULTICAST
+.sp
+Multicast address.
+.TP 7
+IN6_IS_ADDR_LINKLOCAL
+.sp
+Unicast link-local address.
+.TP 7
+IN6_IS_ADDR_SITELOCAL
+.sp
+Unicast site-local address.
+.TP 7
+IN6_IS_ADDR_V4MAPPED
+.sp
+IPv4 mapped address.
+.TP 7
+IN6_IS_ADDR_V4COMPAT
+.sp
+IPv4-compatible address.
+.TP 7
+IN6_IS_ADDR_MC_NODELOCAL
+.sp
+Multicast node-local address.
+.TP 7
+IN6_IS_ADDR_MC_LINKLOCAL
+.sp
+Multicast link-local address.
+.TP 7
+IN6_IS_ADDR_MC_SITELOCAL
+.sp
+Multicast site-local address.
+.TP 7
+IN6_IS_ADDR_MC_ORGLOCAL
+.sp
+Multicast organization-local address.
+.TP 7
+IN6_IS_ADDR_MC_GLOBAL
+.sp
+Multicast global address.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIHost and Network Byte Orders\fP, \fI<arpa/inet.h>\fP, \fI<inttypes.h>\fP,
+\fI<sys/socket.h>\fP, the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+\fIconnect\fP(), \fIgetsockopt\fP(), \fIhtonl\fP(), \fIhtons\fP(),
+\fIntohl\fP(), \fIntohs\fP(), \fIsendmsg\fP(), \fIsendto\fP(), \fIsetsockopt\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/inet.h.0p b/man-pages-posix-2003/man0p/inet.h.0p
new file mode 100644
index 0000000..569b669
--- /dev/null
+++ b/man-pages-posix-2003/man0p/inet.h.0p
@@ -0,0 +1,79 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<arpa/inet.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <arpa/inet.h>
+.SH NAME
+arpa/inet.h \- definitions for internet operations
+.SH SYNOPSIS
+.LP
+\fB#include <arpa/inet.h>\fP
+.SH DESCRIPTION
+.LP
+The \fBin_port_t\fP and \fBin_addr_t\fP types shall be defined as
+described in \fI<netinet/in.h>\fP .
+.LP
+The \fBin_addr\fP structure shall be defined as described in \fI<netinet/in.h>\fP
+\&.
+.LP
+The INET_ADDRSTRLEN and INET6_ADDRSTRLEN macros
+shall be defined as described in \fI<netinet/in.h>\fP .
+.LP
+The following shall either be declared as functions, defined as macros,
+or both. If functions are declared, function prototypes
+shall be provided.
+.sp
+.RS
+.nf
+
+\fBuint32_t htonl(uint32_t);
+uint16_t htons(uint16_t);
+uint32_t ntohl(uint32_t);
+uint16_t ntohs(uint16_t);
+\fP
+.fi
+.RE
+.LP
+The \fBuint32_t\fP and \fBuint16_t\fP types shall be defined as described
+in \fI<inttypes.h>\fP .
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBin_addr_t inet_addr(const char *);
+char *inet_ntoa(struct in_addr);
+const char *inet_ntop(int, const void *restrict, char *restrict,
+ socklen_t);
+int inet_pton(int, const char *restrict, void *restrict);
+\fP
+.fi
+.RE
+.LP
+Inclusion of the \fI<arpa/inet.h>\fP header may also make visible
+all symbols from \fI<netinet/in.h>\fP and \fI<inttypes.h>\fP.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<netinet/in.h>\fP, \fI<inttypes.h>\fP, the System Interfaces
+volume of IEEE\ Std\ 1003.1-2001, \fIhtonl\fP(), \fIinet_addr\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/inttypes.h.0p b/man-pages-posix-2003/man0p/inttypes.h.0p
new file mode 100644
index 0000000..3412f10
--- /dev/null
+++ b/man-pages-posix-2003/man0p/inttypes.h.0p
@@ -0,0 +1,163 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<inttypes.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <inttypes.h>
+.SH NAME
+inttypes.h \- fixed size integer types
+.SH SYNOPSIS
+.LP
+\fB#include <inttypes.h>\fP
+.SH DESCRIPTION
+.LP
+Some of the functionality described on this reference page extends
+the ISO\ C standard. Applications shall define
+the appropriate feature test macro (see the System Interfaces volume
+of IEEE\ Std\ 1003.1-2001, Section 2.2, The Compilation Environment)
+to enable the visibility of these symbols in this
+header.
+.LP
+The \fI<inttypes.h>\fP header shall include the \fI<stdint.h>\fP
+header.
+.LP
+The \fI<inttypes.h>\fP header shall include a definition of at least
+the following type:
+.TP 7
+\fBimaxdiv_t\fP
+Structure type that is the type of the value returned by the \fIimaxdiv\fP()
+function.
+.sp
+.LP
+The following macros shall be defined. Each expands to a character
+string literal containing a conversion specifier, possibly
+modified by a length modifier, suitable for use within the \fIformat\fP
+argument of a formatted input/output function when
+converting the corresponding integer type. These macros have the general
+form of PRI (character string literals for the \fIfprintf\fP() and
+\fIfwprintf\fP() family of
+functions) or SCN (character string literals for the \fIfscanf\fP()
+and \fIfwscanf\fP() family of functions), followed by the conversion
+specifier, followed by a name
+corresponding to a similar type name in \fI<stdint.h>\fP. In these
+names, \fIN\fP
+represents the width of the type as described in \fI<stdint.h>\fP.
+For example,
+\fIPRIdFAST32\fP can be used in a format string to print the value
+of an integer of type \fBint_fast32_t\fP.
+.LP
+The \fIfprintf\fP() macros for signed integers are:
+.TS C
+center; l2 l2 l2 l2 l.
+PRId\fIN\fP PRIdLEAST\fIN\fP PRIdFAST\fIN\fP PRIdMAX PRIdPTR
+PRIi\fIN\fP PRIiLEAST\fIN\fP PRIiFAST\fIN\fP PRIiMAX PRIiPTR
+.TE
+.LP
+The \fIfprintf\fP() macros for unsigned integers are:
+.TS C
+center; l2 l2 l2 l2 l.
+PRIo\fIN\fP PRIoLEAST\fIN\fP PRIoFAST\fIN\fP PRIoMAX PRIoPTR
+PRIu\fIN\fP PRIuLEAST\fIN\fP PRIuFAST\fIN\fP PRIuMAX PRIuPTR
+PRIx\fIN\fP PRIxLEAST\fIN\fP PRIxFAST\fIN\fP PRIxMAX PRIxPTR
+PRIX\fIN\fP PRIXLEAST\fIN\fP PRIXFAST\fIN\fP PRIXMAX PRIXPTR
+.TE
+.LP
+The \fIfscanf\fP() macros for signed integers are:
+.TS C
+center; l2 l2 l2 l2 l.
+SCNd\fIN\fP SCNdLEAST\fIN\fP SCNdFAST\fIN\fP SCNdMAX SCNdPTR
+SCNi\fIN\fP SCNiLEAST\fIN\fP SCNiFAST\fIN\fP SCNiMAX SCNiPTR
+.TE
+.LP
+The \fIfscanf\fP() macros for unsigned integers are:
+.TS C
+center; l2 l2 l2 l2 l.
+SCNo\fIN\fP SCNoLEAST\fIN\fP SCNoFAST\fIN\fP SCNoMAX SCNoPTR
+SCNu\fIN\fP SCNuLEAST\fIN\fP SCNuFAST\fIN\fP SCNuMAX SCNuPTR
+SCNx\fIN\fP SCNxLEAST\fIN\fP SCNxFAST\fIN\fP SCNxMAX SCNxPTR
+.TE
+.LP
+For each type that the implementation provides in \fI<stdint.h>\fP,
+the
+corresponding \fIfprintf\fP() and \fIfwprintf\fP() macros shall be
+defined and the corresponding \fIfscanf\fP() and \fIfwscanf\fP() macros
+shall be defined
+unless the implementation does not have a suitable modifier for the
+type.
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBintmax_t imaxabs(intmax_t);
+imaxdiv_t imaxdiv(intmax_t, intmax_t);
+intmax_t strtoimax(const char *restrict, char **restrict, int);
+uintmax_t strtoumax(const char *restrict, char **restrict, int);
+intmax_t wcstoimax(const wchar_t *restrict, wchar_t **restrict, int);
+uintmax_t wcstoumax(const wchar_t *restrict, wchar_t **restrict, int);
+\fP
+.fi
+.RE
+.SH EXAMPLES
+.sp
+.RS
+.nf
+
+\fB#include <inttypes.h>
+#include <wchar.h>
+int main(void)
+{
+ uintmax_t i = UINTMAX_MAX; // This type always exists.
+ wprintf(L"The largest integer value is %020"
+ PRIxMAX "\\n", i);
+ return 0;
+}
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The purpose of \fI<inttypes.h>\fP is to provide a set of integer types
+whose definitions are consistent across machines
+and independent of operating systems and other implementation idiosyncrasies.
+It defines, via \fBtypedef\fP, integer types of
+various sizes. Implementations are free to \fBtypedef\fP them as ISO\ C
+standard integer types or extensions that they
+support. Consistent use of this header will greatly increase the portability
+of applications across platforms.
+.SH RATIONALE
+.LP
+The ISO/IEC\ 9899:1990 standard specified that the language should
+support four signed and unsigned integer data types-
+\fBchar\fP, \fBshort\fP, \fBint\fP, and \fBlong\fP- but placed very
+little requirement on their size other than that \fBint\fP
+and \fBshort\fP be at least 16 bits and \fBlong\fP be at least as
+long as \fBint\fP and not smaller than 32 bits. For 16-bit
+systems, most implementations assigned 8, 16, 16, and 32 bits to \fBchar\fP,
+\fBshort\fP, \fBint\fP, and \fBlong\fP,
+respectively. For 32-bit systems, the common practice has been to
+assign 8, 16, 32, and 32 bits to these types. This difference in
+\fBint\fP size can create some problems for users who migrate from
+one system to another which assigns different sizes to integer
+types, because the ISO\ C standard integer promotion rule can produce
+silent changes unexpectedly. The need for defining an
+extended integer type increased with the introduction of 64-bit systems.
+.SH FUTURE DIRECTIONS
+.LP
+Macro names beginning with PRI or SCN followed by any lowercase letter
+or \fB'X'\fP may be added to the macros defined in the
+\fI<inttypes.h>\fP header.
+.SH SEE ALSO
+.LP
+The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIimaxdiv\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/ipc.h.0p b/man-pages-posix-2003/man0p/ipc.h.0p
new file mode 100644
index 0000000..5342855
--- /dev/null
+++ b/man-pages-posix-2003/man0p/ipc.h.0p
@@ -0,0 +1 @@
+.so man0p/sys_ipc.h.0p
diff --git a/man-pages-posix-2003/man0p/iso646.h.0p b/man-pages-posix-2003/man0p/iso646.h.0p
new file mode 100644
index 0000000..8f23289
--- /dev/null
+++ b/man-pages-posix-2003/man0p/iso646.h.0p
@@ -0,0 +1,71 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<iso646.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <iso646.h>
+.SH NAME
+iso646.h \- alternative spellings
+.SH SYNOPSIS
+.LP
+\fB#include <iso646.h>\fP
+.SH DESCRIPTION
+.LP
+The \fI<iso646.h>\fP header shall define the following eleven macros
+(on the left) that expand to the corresponding
+tokens (on the right):
+.TP 7
+and
+\fB&&\fP
+.TP 7
+and_eq
+\fB&=\fP
+.TP 7
+bitand
+\fB&\fP
+.TP 7
+bitor
+\fB|\fP
+.TP 7
+compl
+\fB~\fP
+.TP 7
+not
+\fB!\fP
+.TP 7
+not_eq
+\fB!=\fP
+.TP 7
+or
+\fB||\fP
+.TP 7
+or_eq
+\fB|=\fP
+.TP 7
+xor
+\fB^\fP
+.TP 7
+xor_eq
+\fB^=\fP
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+None.
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/langinfo.h.0p b/man-pages-posix-2003/man0p/langinfo.h.0p
new file mode 100644
index 0000000..5af6e08
--- /dev/null
+++ b/man-pages-posix-2003/man0p/langinfo.h.0p
@@ -0,0 +1,360 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<langinfo.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <langinfo.h>
+.SH NAME
+langinfo.h \- language information constants
+.SH SYNOPSIS
+.LP
+\fB#include <langinfo.h> \fP
+.SH DESCRIPTION
+.LP
+The \fI<langinfo.h>\fP header contains the constants used to identify
+items of \fIlanginfo\fP data (see \fInl_langinfo\fP()). The type of
+the constant, \fBnl_item\fP, shall be defined as described
+in \fI<nl_types.h>\fP .
+.LP
+The following constants shall be defined. The entries under \fBCategory\fP
+indicate in which \fIsetlocale\fP() category each item is defined.
+.TS C
+center; l1 l1 lw(40).
+\fBConstant\fP \fBCategory\fP T{
+.na
+\fBMeaning\fP
+.ad
+T}
+CODESET \fILC_CTYPE\fP T{
+.na
+Codeset name.
+.ad
+T}
+D_T_FMT \fILC_TIME\fP T{
+.na
+String for formatting date and time.
+.ad
+T}
+D_FMT \fILC_TIME\fP T{
+.na
+Date format string.
+.ad
+T}
+T_FMT \fILC_TIME\fP T{
+.na
+Time format string.
+.ad
+T}
+T_FMT_AMPM \fILC_TIME\fP T{
+.na
+a.m. or p.m. time format string.
+.ad
+T}
+AM_STR \fILC_TIME\fP T{
+.na
+Ante-meridiem affix.
+.ad
+T}
+PM_STR \fILC_TIME\fP T{
+.na
+Post-meridiem affix.
+.ad
+T}
+DAY_1 \fILC_TIME\fP T{
+.na
+Name of the first day of the week (for example, Sunday).
+.ad
+T}
+DAY_2 \fILC_TIME\fP T{
+.na
+Name of the second day of the week (for example, Monday).
+.ad
+T}
+DAY_3 \fILC_TIME\fP T{
+.na
+Name of the third day of the week (for example, Tuesday).
+.ad
+T}
+DAY_4 \fILC_TIME\fP T{
+.na
+Name of the fourth day of the week
+.ad
+T}
+ \fI\ \fP T{
+.na
+(for example, Wednesday).
+.ad
+T}
+DAY_5 \fILC_TIME\fP T{
+.na
+Name of the fifth day of the week (for example, Thursday).
+.ad
+T}
+DAY_6 \fILC_TIME\fP T{
+.na
+Name of the sixth day of the week (for example, Friday).
+.ad
+T}
+DAY_7 \fILC_TIME\fP T{
+.na
+Name of the seventh day of the week
+.ad
+T}
+ \fI\ \fP T{
+.na
+(for example, Saturday).
+.ad
+T}
+ABDAY_1 \fILC_TIME\fP T{
+.na
+Abbreviated name of the first day of the week.
+.ad
+T}
+ABDAY_2 \fILC_TIME\fP T{
+.na
+Abbreviated name of the second day of the week.
+.ad
+T}
+ABDAY_3 \fILC_TIME\fP T{
+.na
+Abbreviated name of the third day of the week.
+.ad
+T}
+ABDAY_4 \fILC_TIME\fP T{
+.na
+Abbreviated name of the fourth day of the week.
+.ad
+T}
+ABDAY_5 \fILC_TIME\fP T{
+.na
+Abbreviated name of the fifth day of the week.
+.ad
+T}
+ABDAY_6 \fILC_TIME\fP T{
+.na
+Abbreviated name of the sixth day of the week.
+.ad
+T}
+ABDAY_7 \fILC_TIME\fP T{
+.na
+Abbreviated name of the seventh day of the week.
+.ad
+T}
+MON_1 \fILC_TIME\fP T{
+.na
+Name of the first month of the year.
+.ad
+T}
+MON_2 \fILC_TIME\fP T{
+.na
+Name of the second month.
+.ad
+T}
+MON_3 \fILC_TIME\fP T{
+.na
+Name of the third month.
+.ad
+T}
+MON_4 \fILC_TIME\fP T{
+.na
+Name of the fourth month.
+.ad
+T}
+MON_5 \fILC_TIME\fP T{
+.na
+Name of the fifth month.
+.ad
+T}
+MON_6 \fILC_TIME\fP T{
+.na
+Name of the sixth month.
+.ad
+T}
+MON_7 \fILC_TIME\fP T{
+.na
+Name of the seventh month.
+.ad
+T}
+MON_8 \fILC_TIME\fP T{
+.na
+Name of the eighth month.
+.ad
+T}
+MON_9 \fILC_TIME\fP T{
+.na
+Name of the ninth month.
+.ad
+T}
+MON_10 \fILC_TIME\fP T{
+.na
+Name of the tenth month.
+.ad
+T}
+MON_11 \fILC_TIME\fP T{
+.na
+Name of the eleventh month.
+.ad
+T}
+MON_12 \fILC_TIME\fP T{
+.na
+Name of the twelfth month.
+.ad
+T}
+ABMON_1 \fILC_TIME\fP T{
+.na
+Abbreviated name of the first month.
+.ad
+T}
+ABMON_2 \fILC_TIME\fP T{
+.na
+Abbreviated name of the second month.
+.ad
+T}
+ABMON_3 \fILC_TIME\fP T{
+.na
+Abbreviated name of the third month.
+.ad
+T}
+ABMON_4 \fILC_TIME\fP T{
+.na
+Abbreviated name of the fourth month.
+.ad
+T}
+ABMON_5 \fILC_TIME\fP T{
+.na
+Abbreviated name of the fifth month.
+.ad
+T}
+ABMON_6 \fILC_TIME\fP T{
+.na
+Abbreviated name of the sixth month.
+.ad
+T}
+ABMON_7 \fILC_TIME\fP T{
+.na
+Abbreviated name of the seventh month.
+.ad
+T}
+ABMON_8 \fILC_TIME\fP T{
+.na
+Abbreviated name of the eighth month.
+.ad
+T}
+ABMON_9 \fILC_TIME\fP T{
+.na
+Abbreviated name of the ninth month.
+.ad
+T}
+ABMON_10 \fILC_TIME\fP T{
+.na
+Abbreviated name of the tenth month.
+.ad
+T}
+ABMON_11 \fILC_TIME\fP T{
+.na
+Abbreviated name of the eleventh month.
+.ad
+T}
+ABMON_12 \fILC_TIME\fP T{
+.na
+Abbreviated name of the twelfth month.
+.ad
+T}
+ERA \fILC_TIME\fP T{
+.na
+Era description segments.
+.ad
+T}
+ERA_D_FMT \fILC_TIME\fP T{
+.na
+Era date format string.
+.ad
+T}
+ERA_D_T_FMT \fILC_TIME\fP T{
+.na
+Era date and time format string.
+.ad
+T}
+ERA_T_FMT \fILC_TIME\fP T{
+.na
+Era time format string.
+.ad
+T}
+ALT_DIGITS \fILC_TIME\fP T{
+.na
+Alternative symbols for digits.
+.ad
+T}
+RADIXCHAR \fILC_NUMERIC\fP T{
+.na
+Radix character.
+.ad
+T}
+THOUSEP \fILC_NUMERIC\fP T{
+.na
+Separator for thousands.
+.ad
+T}
+YESEXPR \fILC_MESSAGES\fP T{
+.na
+Affirmative response expression.
+.ad
+T}
+NOEXPR \fILC_MESSAGES\fP T{
+.na
+Negative response expression.
+.ad
+T}
+CRNCYSTR \fILC_MONETARY\fP T{
+.na
+Local currency symbol, preceded by \fB'-'\fP if the symbol should appear before the value, \fB'+'\fP if the symbol should appear after the value, or \fB'.'\fP if the symbol should replace the radix character. If the local currency symbol is the empty string, implementations may return the empty string ( \fB""\fP ).
+.ad
+T}
+.TE
+.LP
+If the locale's values for \fBp_cs_precedes\fP and \fBn_cs_precedes\fP
+do not match, the value of \fInl_langinfo\fP(CRNCYSTR)
+is unspecified.
+.LP
+The following shall be declared as a function and may also be defined
+as a macro. A function prototype shall be provided.
+.sp
+.RS
+.nf
+
+\fBchar *nl_langinfo(nl_item);
+\fP
+.fi
+.RE
+.LP
+Inclusion of the \fI<langinfo.h>\fP header may also make visible all
+symbols from \fI<nl_types.h>\fP.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Wherever possible, users are advised to use functions compatible with
+those in the ISO\ C standard to access items of
+\fIlanginfo\fP data. In particular, the \fIstrftime\fP() function
+should be used to
+access date and time information defined in category \fILC_TIME\fP.
+The \fIlocaleconv\fP() function should be used to access information
+corresponding to RADIXCHAR,
+THOUSEP, and CRNCYSTR.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fInl_langinfo\fP(),
+\fIlocaleconv\fP(), \fIstrfmon\fP(), \fIstrftime\fP(), \fILocale\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/libgen.h.0p b/man-pages-posix-2003/man0p/libgen.h.0p
new file mode 100644
index 0000000..e5c698c
--- /dev/null
+++ b/man-pages-posix-2003/man0p/libgen.h.0p
@@ -0,0 +1,46 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<libgen.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <libgen.h>
+.SH NAME
+libgen.h \- definitions for pattern matching functions
+.SH SYNOPSIS
+.LP
+\fB#include <libgen.h> \fP
+.SH DESCRIPTION
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBchar *basename(char *);
+char *dirname(char *);
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIbasename\fP(),
+\fIdirname\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/limits.h.0p b/man-pages-posix-2003/man0p/limits.h.0p
new file mode 100644
index 0000000..a100e35
--- /dev/null
+++ b/man-pages-posix-2003/man0p/limits.h.0p
@@ -0,0 +1,1044 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<limits.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <limits.h>
+.SH NAME
+limits.h \- implementation-defined constants
+.SH SYNOPSIS
+.LP
+\fB#include <limits.h>\fP
+.SH DESCRIPTION
+.LP
+Some of the functionality described on this reference page extends
+the ISO\ C standard. Applications shall define
+the appropriate feature test macro (see the System Interfaces volume
+of IEEE\ Std\ 1003.1-2001, Section 2.2, The Compilation Environment)
+to enable the visibility of these symbols in this
+header.
+.LP
+Many of the symbols listed here are not defined by the ISO/IEC\ 9899:1999
+standard. Such symbols are not shown as CX shaded.
+.LP
+The \fI<limits.h>\fP header shall define various symbolic names. Different
+categories of names are described below.
+.LP
+The names represent various limits on resources that the implementation
+imposes on applications.
+.LP
+Implementations may choose any appropriate value for each limit, provided
+it is not more restrictive than the Minimum Acceptable
+Values listed below. Symbolic constant names beginning with _POSIX
+may be found in \fI<unistd.h>\fP .
+.LP
+Applications should not assume any particular value for a limit. To
+achieve maximum portability, an application should not
+require more resource than the Minimum Acceptable Value quantity.
+However, an application wishing to avail itself of the full
+amount of a resource available on an implementation may make use of
+the value given in \fI<limits.h>\fP on that particular
+implementation, by using the symbolic names listed below. It should
+be noted, however, that many of the listed limits are not
+invariant, and at runtime, the value of the limit may differ from
+those given in this header, for the following reasons:
+.IP " *" 3
+The limit is pathname-dependent.
+.LP
+.IP " *" 3
+The limit differs between the compile and runtime machines.
+.LP
+.LP
+For these reasons, an application may use the \fIfpathconf\fP(), \fIpathconf\fP(),
+and \fIsysconf\fP() functions to
+determine the actual value of a limit at runtime.
+.LP
+The items in the list ending in _MIN give the most negative values
+that the mathematical types are guaranteed to be capable of
+representing. Numbers of a more negative value may be supported on
+some implementations, as indicated by the
+\fI<limits.h>\fP header on the implementation, but applications requiring
+such numbers are not guaranteed to be portable to
+all implementations. For positive constants ending in _MIN, this indicates
+the minimum acceptable value.
+.SS Runtime Invariant Values (Possibly Indeterminate)
+.LP
+A definition of one of the symbolic names in the following list shall
+be omitted from \fI<limits.h>\fP on specific
+implementations where the corresponding value is equal to or greater
+than the stated minimum, but is unspecified.
+.LP
+This indetermination might depend on the amount of available memory
+space on a specific instance of a specific implementation.
+The actual value supported by a specific instance shall be provided
+by the \fIsysconf\fP()
+function.
+.TP 7
+{AIO_LISTIO_MAX}
+.sp
+Maximum number of I/O operations in a single list I/O call supported
+by the implementation.
+.br
+Minimum Acceptable Value: {_POSIX_AIO_LISTIO_MAX}
+.TP 7
+{AIO_MAX}
+.sp
+Maximum number of outstanding asynchronous I/O operations supported
+by the implementation.
+.br
+Minimum Acceptable Value: {_POSIX_AIO_MAX}
+.TP 7
+{AIO_PRIO_DELTA_MAX}
+.sp
+The maximum amount by which a process can decrease its asynchronous
+I/O priority level from its own scheduling priority.
+.br
+Minimum Acceptable Value: 0
+.TP 7
+{ARG_MAX}
+Maximum length of argument to the \fIexec\fP functions including environment
+data.
+.br
+Minimum Acceptable Value: {_POSIX_ARG_MAX}
+.TP 7
+{ATEXIT_MAX}
+.sp
+Maximum number of functions that may be registered with \fIatexit\fP().
+.br
+Minimum Acceptable Value: 32
+.TP 7
+{CHILD_MAX}
+Maximum number of simultaneous processes per real user ID.
+.br
+Minimum Acceptable Value: {_POSIX_CHILD_MAX}
+.TP 7
+{DELAYTIMER_MAX}
+.sp
+Maximum number of timer expiration overruns.
+.br
+Minimum Acceptable Value: {_POSIX_DELAYTIMER_MAX}
+.TP 7
+{HOST_NAME_MAX}
+Maximum length of a host name (not including the terminating null)
+as returned from the \fIgethostname\fP() function.
+.br
+Minimum Acceptable Value: {_POSIX_HOST_NAME_MAX}
+.TP 7
+{IOV_MAX}
+.sp
+Maximum number of \fBiovec\fP structures that one process has available
+for use with \fIreadv\fP() or \fIwritev\fP().
+.br
+Minimum Acceptable Value: {_XOPEN_IOV_MAX}
+.TP 7
+{LOGIN_NAME_MAX}
+Maximum length of a login name.
+.br
+Minimum Acceptable Value: {_POSIX_LOGIN_NAME_MAX}
+.TP 7
+{MQ_OPEN_MAX}
+.sp
+The maximum number of open message queue descriptors a process may
+hold.
+.br
+Minimum Acceptable Value: {_POSIX_MQ_OPEN_MAX}
+.TP 7
+{MQ_PRIO_MAX}
+.sp
+The maximum number of message priorities supported by the implementation.
+.br
+Minimum Acceptable Value: {_POSIX_MQ_PRIO_MAX}
+.TP 7
+{OPEN_MAX}
+Maximum number of files that one process can have open at any one
+time.
+.br
+Minimum Acceptable Value: {_POSIX_OPEN_MAX}
+.TP 7
+{PAGESIZE}
+Size in bytes of a page.
+.br
+Minimum Acceptable Value: 1
+.TP 7
+{PAGE_SIZE}
+.sp
+Equivalent to {PAGESIZE}. If either {PAGESIZE} or {PAGE_SIZE} is defined,
+the other is defined with the same value.
+.TP 7
+{PTHREAD_DESTRUCTOR_ITERATIONS}
+.sp
+Maximum number of attempts made to destroy a thread's thread-specific
+data values on thread exit.
+.br
+Minimum Acceptable Value: {_POSIX_THREAD_DESTRUCTOR_ITERATIONS}
+.TP 7
+{PTHREAD_KEYS_MAX}
+.sp
+Maximum number of data keys that can be created by a process.
+.br
+Minimum Acceptable Value: {_POSIX_THREAD_KEYS_MAX}
+.TP 7
+{PTHREAD_STACK_MIN}
+.sp
+Minimum size in bytes of thread stack storage.
+.br
+Minimum Acceptable Value: 0
+.TP 7
+{PTHREAD_THREADS_MAX}
+.sp
+Maximum number of threads that can be created per process.
+.br
+Minimum Acceptable Value: {_POSIX_THREAD_THREADS_MAX}
+.TP 7
+{RE_DUP_MAX}
+The number of repeated occurrences of a BRE permitted by the \fIregexec\fP()
+and \fIregcomp\fP() functions when using the interval notation {\\(\fIm\fP,\fIn\fP\\};
+see \fIBREs Matching Multiple Characters\fP .
+.br
+Minimum Acceptable Value: {_POSIX2_RE_DUP_MAX}
+.TP 7
+{RTSIG_MAX}
+.sp
+Maximum number of realtime signals reserved for application use in
+this implementation.
+.br
+Minimum Acceptable Value: {_POSIX_RTSIG_MAX}
+.TP 7
+{SEM_NSEMS_MAX}
+.sp
+Maximum number of semaphores that a process may have.
+.br
+Minimum Acceptable Value: {_POSIX_SEM_NSEMS_MAX}
+.TP 7
+{SEM_VALUE_MAX}
+.sp
+The maximum value a semaphore may have.
+.br
+Minimum Acceptable Value: {_POSIX_SEM_VALUE_MAX}
+.TP 7
+{SIGQUEUE_MAX}
+.sp
+Maximum number of queued signals that a process may send and have
+pending at the receiver(s) at any time.
+.br
+Minimum Acceptable Value: {_POSIX_SIGQUEUE_MAX}
+.TP 7
+{SS_REPL_MAX}
+.sp
+The maximum number of replenishment operations that may be simultaneously
+pending for a particular sporadic server scheduler.
+.br
+Minimum Acceptable Value: {_POSIX_SS_REPL_MAX}
+.TP 7
+{STREAM_MAX}
+The number of streams that one process can have open at one time.
+If defined, it has the same value as {FOPEN_MAX} (see \fI<stdio.h>\fP
+).
+.br
+Minimum Acceptable Value: {_POSIX_STREAM_MAX}
+.TP 7
+{SYMLOOP_MAX}
+Maximum number of symbolic links that can be reliably traversed in
+the resolution of a pathname in the absence of a loop.
+.br
+Minimum Acceptable Value: {_POSIX_SYMLOOP_MAX}
+.TP 7
+{TIMER_MAX}
+.sp
+Maximum number of timers per process supported by the implementation.
+.br
+Minimum Acceptable Value: {_POSIX_TIMER_MAX}
+.TP 7
+{TRACE_EVENT_NAME_MAX}
+.sp
+Maximum length of the trace event name.
+.br
+Minimum Acceptable Value: {_POSIX_TRACE_EVENT_NAME_MAX}
+.TP 7
+{TRACE_NAME_MAX}
+.sp
+Maximum length of the trace generation version string or of the trace
+stream name.
+.br
+Minimum Acceptable Value: {_POSIX_TRACE_NAME_MAX}
+.TP 7
+{TRACE_SYS_MAX}
+.sp
+Maximum number of trace streams that may simultaneously exist in the
+system.
+.br
+Minimum Acceptable Value: {_POSIX_TRACE_SYS_MAX}
+.TP 7
+{TRACE_USER_EVENT_MAX}
+.sp
+Maximum number of user trace event type identifiers that may simultaneously
+exist in a traced process, including the predefined
+user trace event POSIX_TRACE_UNNAMED_USER_EVENT.
+.br
+Minimum Acceptable Value: {_POSIX_TRACE_USER_EVENT_MAX}
+.TP 7
+{TTY_NAME_MAX}
+Maximum length of terminal device name.
+.br
+Minimum Acceptable Value: {_POSIX_TTY_NAME_MAX}
+.TP 7
+{TZNAME_MAX}
+Maximum number of bytes supported for the name of a timezone (not
+of the \fITZ\fP variable).
+.br
+Minimum Acceptable Value: {_POSIX_TZNAME_MAX}
+.sp
+.TP 7
+\fBNote:\fP
+The length given by {TZNAME_MAX} does not include the quoting characters
+mentioned in \fIOther Environment Variables\fP .
+.sp
+.SS Pathname Variable Values
+.LP
+The values in the following list may be constants within an implementation
+or may vary from one pathname to another. For
+example, file systems or directories may have different characteristics.
+.LP
+A definition of one of the values shall be omitted from the \fI<limits.h>\fP
+header on specific implementations where the
+corresponding value is equal to or greater than the stated minimum,
+but where the value can vary depending on the file to which it
+is applied. The actual value supported for a specific pathname shall
+be provided by the \fIpathconf\fP() function.
+.TP 7
+{FILESIZEBITS}
+Minimum number of bits needed to represent, as a signed integer value,
+the maximum size of a regular file allowed in the specified
+directory.
+.br
+Minimum Acceptable Value: 32
+.TP 7
+{LINK_MAX}
+Maximum number of links to a single file.
+.br
+Minimum Acceptable Value: {_POSIX_LINK_MAX}
+.TP 7
+{MAX_CANON}
+Maximum number of bytes in a terminal canonical input line.
+.br
+Minimum Acceptable Value: {_POSIX_MAX_CANON}
+.TP 7
+{MAX_INPUT}
+Minimum number of bytes for which space is available in a terminal
+input queue; therefore, the maximum number of bytes a conforming
+application may require to be typed as input before reading them.
+.br
+Minimum Acceptable Value: {_POSIX_MAX_INPUT}
+.TP 7
+{NAME_MAX}
+Maximum number of bytes in a filename (not including terminating null).
+.br
+Minimum Acceptable Value: {_POSIX_NAME_MAX}
+.br
+Minimum Acceptable Value: {_XOPEN_NAME_MAX}
+.TP 7
+{PATH_MAX}
+Maximum number of bytes in a pathname, including the terminating null
+character.
+.br
+Minimum Acceptable Value: {_POSIX_PATH_MAX}
+.br
+Minimum Acceptable Value: {_XOPEN_PATH_MAX}
+.TP 7
+{PIPE_BUF}
+Maximum number of bytes that is guaranteed to be atomic when writing
+to a pipe.
+.br
+Minimum Acceptable Value: {_POSIX_PIPE_BUF}
+.TP 7
+{POSIX_ALLOC_SIZE_MIN}
+.sp
+Minimum number of bytes of storage actually allocated for any portion
+of a file.
+.br
+Minimum Acceptable Value: Not specified.
+.TP 7
+{POSIX_REC_INCR_XFER_SIZE}
+.sp
+Recommended increment for file transfer sizes between the {POSIX_REC_MIN_XFER_SIZE}
+and {POSIX_REC_MAX_XFER_SIZE} values.
+.br
+Minimum Acceptable Value: Not specified.
+.TP 7
+{POSIX_REC_MAX_XFER_SIZE}
+.sp
+Maximum recommended file transfer size.
+.br
+Minimum Acceptable Value: Not specified.
+.TP 7
+{POSIX_REC_MIN_XFER_SIZE}
+.sp
+Minimum recommended file transfer size.
+.br
+Minimum Acceptable Value: Not specified.
+.TP 7
+{POSIX_REC_XFER_ALIGN}
+.sp
+Recommended file transfer buffer alignment.
+.br
+Minimum Acceptable Value: Not specified.
+.TP 7
+{SYMLINK_MAX}
+Maximum number of bytes in a symbolic link.
+.br
+Minimum Acceptable Value: {_POSIX_SYMLINK_MAX}
+.sp
+.SS Runtime Increasable Values
+.LP
+The magnitude limitations in the following list shall be fixed by
+specific implementations. An application should assume that
+the value supplied by \fI<limits.h>\fP in a specific implementation
+is the minimum that pertains whenever the application is
+run under that implementation. A specific instance of a specific implementation
+may increase the value relative to that supplied by
+\fI<limits.h>\fP for that implementation. The actual value supported
+by a specific instance shall be provided by the \fIsysconf\fP() function.
+.TP 7
+{BC_BASE_MAX}
+Maximum \fIobase\fP values allowed by the \fIbc\fP utility.
+.br
+Minimum Acceptable Value: {_POSIX2_BC_BASE_MAX}
+.TP 7
+{BC_DIM_MAX}
+Maximum number of elements permitted in an array by the \fIbc\fP utility.
+.br
+Minimum Acceptable Value: {_POSIX2_BC_DIM_MAX}
+.TP 7
+{BC_SCALE_MAX}
+Maximum \fIscale\fP value allowed by the \fIbc\fP utility.
+.br
+Minimum Acceptable Value: {_POSIX2_BC_SCALE_MAX}
+.TP 7
+{BC_STRING_MAX}
+Maximum length of a string constant accepted by the \fIbc\fP utility.
+.br
+Minimum Acceptable Value: {_POSIX2_BC_STRING_MAX}
+.TP 7
+{CHARCLASS_NAME_MAX}
+Maximum number of bytes in a character class name.
+.br
+Minimum Acceptable Value: {_POSIX2_CHARCLASS_NAME_MAX}
+.TP 7
+{COLL_WEIGHTS_MAX}
+Maximum number of weights that can be assigned to an entry of the
+\fILC_COLLATE\fP \fBorder\fP keyword in the locale definition
+file; see \fILocale\fP .
+.br
+Minimum Acceptable Value: {_POSIX2_COLL_WEIGHTS_MAX}
+.TP 7
+{EXPR_NEST_MAX}
+Maximum number of expressions that can be nested within parentheses
+by the \fIexpr\fP
+utility.
+.br
+Minimum Acceptable Value: {_POSIX2_EXPR_NEST_MAX}
+.TP 7
+{LINE_MAX}
+Unless otherwise noted, the maximum length, in bytes, of a utility's
+input line (either standard input or another file), when the
+utility is described as processing text files. The length includes
+room for the trailing <newline>.
+.br
+Minimum Acceptable Value: {_POSIX2_LINE_MAX}
+.TP 7
+{NGROUPS_MAX}
+Maximum number of simultaneous supplementary group IDs per process.
+.br
+Minimum Acceptable Value: {_POSIX_NGROUPS_MAX}
+.TP 7
+{RE_DUP_MAX}
+Maximum number of repeated occurrences of a regular expression permitted
+when using the interval notation \\{\fIm\fP,\fIn\fP\\};
+see \fIRegular Expressions\fP .
+.br
+Minimum Acceptable Value: {_POSIX2_RE_DUP_MAX}
+.sp
+.SS Maximum Values
+.LP
+The symbolic constants in the following list shall be defined in \fI<limits.h>\fP
+with the values shown. These are symbolic
+names for the most restrictive value for certain features on an implementation
+supporting the Timers option. A conforming
+implementation shall provide values no larger than these values. A
+conforming application must not require a smaller value for
+correct operation.
+.TP 7
+{_POSIX_CLOCKRES_MIN}
+.sp
+The resolution of the CLOCK_REALTIME clock, in nanoseconds.
+.br
+Value: 20 000 000
+.LP
+If the Monotonic Clock option is supported, the resolution of the
+CLOCK_MONOTONIC clock, in nanoseconds, is represented by
+{_POSIX_CLOCKRES_MIN}.
+.sp
+.SS Minimum Values
+.LP
+The symbolic constants in the following list shall be defined in \fI<limits.h>\fP
+with the values shown. These are
+symbolic names for the most restrictive value for certain features
+on an implementation conforming to this volume of
+IEEE\ Std\ 1003.1-2001. Related symbolic constants are defined elsewhere
+in this volume of IEEE\ Std\ 1003.1-2001
+which reflect the actual implementation and which need not be as restrictive.
+A conforming implementation shall provide values at
+least this large. A strictly conforming application must not require
+a larger value for correct operation.
+.TP 7
+{_POSIX_AIO_LISTIO_MAX}
+.sp
+The number of I/O operations that can be specified in a list I/O call.
+.br
+Value: 2
+.TP 7
+{_POSIX_AIO_MAX}
+.sp
+The number of outstanding asynchronous I/O operations.
+.br
+Value: 1
+.TP 7
+{_POSIX_ARG_MAX}
+Maximum length of argument to the \fIexec\fP functions including environment
+data.
+.br
+Value: 4 096
+.TP 7
+{_POSIX_CHILD_MAX}
+Maximum number of simultaneous processes per real user ID.
+.br
+Value: 25
+.TP 7
+{_POSIX_DELAYTIMER_MAX}
+.sp
+The number of timer expiration overruns.
+.br
+Value: 32
+.TP 7
+{_POSIX_HOST_NAME_MAX}
+Maximum length of a host name (not including the terminating null)
+as returned from the \fIgethostname\fP() function.
+.br
+Value: 255
+.TP 7
+{_POSIX_LINK_MAX}
+Maximum number of links to a single file.
+.br
+Value: 8
+.TP 7
+{_POSIX_LOGIN_NAME_MAX}
+The size of the storage required for a login name, in bytes, including
+the terminating null.
+.br
+Value: 9
+.TP 7
+{_POSIX_MAX_CANON}
+Maximum number of bytes in a terminal canonical input queue.
+.br
+Value: 255
+.TP 7
+{_POSIX_MAX_INPUT}
+Maximum number of bytes allowed in a terminal input queue.
+.br
+Value: 255
+.TP 7
+{_POSIX_MQ_OPEN_MAX}
+.sp
+The number of message queues that can be open for a single process.
+.br
+Value: 8
+.TP 7
+{_POSIX_MQ_PRIO_MAX}
+.sp
+The maximum number of message priorities supported by the implementation.
+.br
+Value: 32
+.TP 7
+{_POSIX_NAME_MAX}
+Maximum number of bytes in a filename (not including terminating null).
+.br
+Value: 14
+.TP 7
+{_POSIX_NGROUPS_MAX}
+Maximum number of simultaneous supplementary group IDs per process.
+.br
+Value: 8
+.TP 7
+{_POSIX_OPEN_MAX}
+Maximum number of files that one process can have open at any one
+time.
+.br
+Value: 20
+.TP 7
+{_POSIX_PATH_MAX}
+Maximum number of bytes in a pathname.
+.br
+Value: 256
+.TP 7
+{_POSIX_PIPE_BUF}
+Maximum number of bytes that is guaranteed to be atomic when writing
+to a pipe.
+.br
+Value: 512
+.TP 7
+{_POSIX_RE_DUP_MAX}
+The number of repeated occurrences of a BRE permitted by the \fIregexec\fP()
+and \fIregcomp\fP() functions when using the interval notation {\\(\fIm\fP,\fIn\fP\\};
+see \fIBREs Matching Multiple Characters\fP .
+.br
+Value: 255
+.TP 7
+{_POSIX_RTSIG_MAX}
+.sp
+The number of realtime signal numbers reserved for application use.
+.br
+Value: 8
+.TP 7
+{_POSIX_SEM_NSEMS_MAX}
+.sp
+The number of semaphores that a process may have.
+.br
+Value: 256
+.TP 7
+{_POSIX_SEM_VALUE_MAX}
+.sp
+The maximum value a semaphore may have.
+.br
+Value: 32 767
+.TP 7
+{_POSIX_SIGQUEUE_MAX}
+.sp
+The number of queued signals that a process may send and have pending
+at the receiver(s) at any time.
+.br
+Value: 32
+.TP 7
+{_POSIX_SSIZE_MAX}
+The value that can be stored in an object of type \fBssize_t\fP.
+.br
+Value: 32 767
+.TP 7
+{_POSIX_STREAM_MAX}
+The number of streams that one process can have open at one time.
+.br
+Value: 8
+.TP 7
+{_POSIX_SS_REPL_MAX}
+.sp
+The number of replenishment operations that may be simultaneously
+pending for a particular sporadic server scheduler.
+.br
+Value: 4
+.TP 7
+{_POSIX_SYMLINK_MAX}
+The number of bytes in a symbolic link.
+.br
+Value: 255
+.TP 7
+{_POSIX_SYMLOOP_MAX}
+The number of symbolic links that can be traversed in the resolution
+of a pathname in the absence of a loop.
+.br
+Value: 8
+.TP 7
+{_POSIX_THREAD_DESTRUCTOR_ITERATIONS}
+.sp
+The number of attempts made to destroy a thread's thread-specific
+data values on thread exit.
+.br
+Value: 4
+.TP 7
+{_POSIX_THREAD_KEYS_MAX}
+.sp
+The number of data keys per process.
+.br
+Value: 128
+.TP 7
+{_POSIX_THREAD_THREADS_MAX}
+.sp
+The number of threads per process.
+.br
+Value: 64
+.TP 7
+{_POSIX_TIMER_MAX}
+.sp
+The per-process number of timers.
+.br
+Value: 32
+.TP 7
+{_POSIX_TRACE_EVENT_NAME_MAX}
+.sp
+The length in bytes of a trace event name.
+.br
+Value: 30
+.TP 7
+{_POSIX_TRACE_NAME_MAX}
+.sp
+The length in bytes of a trace generation version string or a trace
+stream name.
+.br
+Value: 8
+.TP 7
+{_POSIX_TRACE_SYS_MAX}
+.sp
+The number of trace streams that may simultaneously exist in the system.
+.br
+Value: 8
+.TP 7
+{_POSIX_TRACE_USER_EVENT_MAX}
+.sp
+The number of user trace event type identifiers that may simultaneously
+exist in a traced process, including the predefined user
+trace event POSIX_TRACE_UNNAMED_USER_EVENT.
+.br
+Value: 32
+.TP 7
+{_POSIX_TTY_NAME_MAX}
+The size of the storage required for a terminal device name, in bytes,
+including the terminating null.
+.br
+Value: 9
+.TP 7
+{_POSIX_TZNAME_MAX}
+Maximum number of bytes supported for the name of a timezone (not
+of the \fITZ\fP variable).
+.br
+Value: 6
+.TP 7
+\fBNote:\fP
+.RS
+The length given by {_POSIX_TZNAME_MAX} does not include the quoting
+characters mentioned in \fIOther Environment Variables\fP .
+.RE
+.sp
+.TP 7
+{_POSIX2_BC_BASE_MAX}
+Maximum \fIobase\fP values allowed by the \fIbc\fP utility.
+.br
+Value: 99
+.TP 7
+{_POSIX2_BC_DIM_MAX}
+Maximum number of elements permitted in an array by the \fIbc\fP utility.
+.br
+Value: 2 048
+.TP 7
+{_POSIX2_BC_SCALE_MAX}
+Maximum \fIscale\fP value allowed by the \fIbc\fP utility.
+.br
+Value: 99
+.TP 7
+{_POSIX2_BC_STRING_MAX}
+Maximum length of a string constant accepted by the \fIbc\fP utility.
+.br
+Value: 1 000
+.TP 7
+{_POSIX2_CHARCLASS_NAME_MAX}
+Maximum number of bytes in a character class name.
+.br
+Value: 14
+.TP 7
+{_POSIX2_COLL_WEIGHTS_MAX}
+Maximum number of weights that can be assigned to an entry of the
+\fILC_COLLATE\fP \fBorder\fP keyword in the locale definition
+file; see \fILocale\fP .
+.br
+Value: 2
+.TP 7
+{_POSIX2_EXPR_NEST_MAX}
+Maximum number of expressions that can be nested within parentheses
+by the \fIexpr\fP
+utility.
+.br
+Value: 32
+.TP 7
+{_POSIX2_LINE_MAX}
+Unless otherwise noted, the maximum length, in bytes, of a utility's
+input line (either standard input or another file), when the
+utility is described as processing text files. The length includes
+room for the trailing <newline>.
+.br
+Value: 2 048
+.TP 7
+{_POSIX2_RE_DUP_MAX
+Maximum number of repeated occurrences of a regular expression permitted
+when using the interval notation \\{\fIm\fP,\fIn\fP\\};
+see \fIRegular Expressions\fP .
+.br
+Value: 255
+.TP 7
+{_XOPEN_IOV_MAX}
+.sp
+Maximum number of \fBiovec\fP structures that one process has available
+for use with \fIreadv\fP() or \fIwritev\fP().
+.br
+Value: 16
+.TP 7
+{_XOPEN_NAME_MAX}
+.sp
+Maximum number of bytes in a filename (not including the terminating
+null).
+.br
+Value: 255
+.TP 7
+{_XOPEN_PATH_MAX}
+.sp
+Maximum number of bytes in a pathname.
+.br
+Value: 1024
+.sp
+.SS Numerical Limits
+.LP
+The values in the following lists shall be defined in \fI<limits.h>\fP
+and are constant expressions suitable for use in
+\fB#if\fP preprocessing directives. Moreover, except for {CHAR_BIT},
+{DBL_DIG}, {DBL_MAX}, {FLT_DIG}, {FLT_MAX}, {LONG_BIT},
+{WORD_BIT}, and {MB_LEN_MAX}, the symbolic names are defined as
+expressions of the correct type.
+.LP
+If the value of an object of type \fBchar\fP is treated as a signed
+integer when used in an expression, the value of {CHAR_MIN}
+is the same as that of {SCHAR_MIN} and the value of {CHAR_MAX} is
+the same as that of {SCHAR_MAX}. Otherwise, the value of
+{CHAR_MIN} is 0 and the value of {CHAR_MAX} is the same as that of
+{UCHAR_MAX}.
+.TP 7
+{CHAR_BIT}
+Number of bits in a type \fBchar\fP.
+.br
+Value:
+8
+.TP 7
+{CHAR_MAX}
+Maximum value of type \fBchar\fP.
+.br
+Value: {UCHAR_MAX} or {SCHAR_MAX}
+.TP 7
+{CHAR_MIN}
+Minimum value of type \fBchar\fP.
+.br
+Value: {SCHAR_MIN} or 0
+.TP 7
+{INT_MAX}
+Maximum value of an \fBint\fP.
+.br
+Minimum Acceptable Value: 2 147 483 647
+.TP 7
+{LONG_BIT}
+.sp
+Number of bits in a \fBlong\fP.
+.br
+Minimum Acceptable Value: 32
+.TP 7
+{LONG_MAX}
+Maximum value of a \fBlong\fP.
+.br
+Minimum Acceptable Value: +2 147 483 647
+.TP 7
+{MB_LEN_MAX}
+Maximum number of bytes in a character, for any supported locale.
+.br
+Minimum Acceptable Value: 1
+.TP 7
+{SCHAR_MAX}
+Maximum value of type \fBsigned char\fP.
+.br
+Value:
++127
+.TP 7
+{SHRT_MAX}
+Maximum value of type \fBshort\fP.
+.br
+Minimum Acceptable Value: +32 767
+.TP 7
+{SSIZE_MAX}
+Maximum value of an object of type \fBssize_t\fP.
+.br
+Minimum Acceptable Value: {_POSIX_SSIZE_MAX}
+.TP 7
+{UCHAR_MAX}
+Maximum value of type \fBunsigned char\fP.
+.br
+Value:
+255
+.TP 7
+{UINT_MAX}
+Maximum value of type \fBunsigned\fP.
+.br
+Minimum Acceptable Value: 4 294 967 295
+.TP 7
+{ULONG_MAX}
+Maximum value of type \fBunsigned long\fP.
+.br
+Minimum Acceptable Value: 4 294 967 295
+.TP 7
+{USHRT_MAX}
+Maximum value for a type \fBunsigned short\fP.
+.br
+Minimum Acceptable Value: 65 535
+.TP 7
+{WORD_BIT}
+.sp
+Number of bits in a word or type \fBint\fP.
+.br
+Minimum Acceptable Value: 16
+.TP 7
+{INT_MIN}
+Minimum value of type \fBint\fP.
+.br
+Maximum Acceptable Value: -2 147 483 647
+.TP 7
+{LONG_MIN}
+Minimum value of type \fBlong\fP.
+.br
+Maximum Acceptable Value: -2 147 483 647
+.TP 7
+{SCHAR_MIN}
+Minimum value of type \fBsigned char\fP.
+.br
+Value:
+-128
+.TP 7
+{SHRT_MIN}
+Minimum value of type \fBshort\fP.
+.br
+Maximum Acceptable Value: -32 767
+.TP 7
+{LLONG_MIN}
+Minimum value of type \fBlong long\fP.
+.br
+Maximum Acceptable Value: -9223372036854775807
+.TP 7
+{LLONG_MAX}
+Maximum value of type \fBlong long\fP.
+.br
+Minimum Acceptable Value: +9223372036854775807
+.TP 7
+{ULLONG_MAX}
+Maximum value of type \fBunsigned long long\fP.
+.br
+Minimum Acceptable Value: 18446744073709551615
+.sp
+.SS Other Invariant Values
+.LP
+The following constants shall be defined on all implementations in
+\fI<limits.h>\fP:
+.TP 7
+{CHARCLASS_NAME_MAX}
+.sp
+Maximum number of bytes in a character class name.
+.br
+Minimum Acceptable Value: 14
+.TP 7
+{NL_ARGMAX}
+.sp
+Maximum value of \fIdigit\fP in calls to the \fIprintf\fP() and \fIscanf\fP()
+functions.
+.br
+Minimum Acceptable Value: 9
+.TP 7
+{NL_LANGMAX}
+.sp
+Maximum number of bytes in a \fILANG\fP name.
+.br
+Minimum Acceptable Value: 14
+.TP 7
+{NL_MSGMAX}
+.sp
+Maximum message number.
+.br
+Minimum Acceptable Value: 32 767
+.TP 7
+{NL_NMAX}
+.sp
+Maximum number of bytes in an N-to-1 collation mapping.
+.br
+Minimum Acceptable Value: No guaranteed value across all conforming
+implementations.
+.TP 7
+{NL_SETMAX}
+.sp
+Maximum set number.
+.br
+Minimum Acceptable Value: 255
+.TP 7
+{NL_TEXTMAX}
+.sp
+Maximum number of bytes in a message string.
+.br
+Minimum Acceptable Value: {_POSIX2_LINE_MAX}
+.TP 7
+{NZERO}
+.sp
+Default process priority.
+.br
+Minimum Acceptable Value: 20
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+A request was made to reduce the value of {_POSIX_LINK_MAX} from the
+value of 8 specified for it in the POSIX.1-1990 standard to
+2. The standard developers decided to deny this request for several
+reasons:
+.IP " *" 3
+They wanted to avoid making any changes to the standard that could
+break conforming applications, and the requested change could
+have that effect.
+.LP
+.IP " *" 3
+The use of multiple hard links to a file cannot always be replaced
+with use of symbolic links. Symbolic links are semantically
+different from hard links in that they associate a pathname with another
+pathname rather than a pathname with a file. This has
+implications for access control, file permanence, and transparency.
+.LP
+.IP " *" 3
+The original standard developers had considered the issue of allowing
+for implementations that did not in general support hard
+links, and decided that this would reduce consensus on the standard.
+.LP
+.LP
+Systems that support historical versions of the development option
+of the ISO\ POSIX-2 standard retain the name
+{_POSIX2_RE_DUP_MAX} as an alias for {_POSIX_RE_DUP_MAX}.
+.TP 7
+{PATH_MAX}
+IEEE PASC Interpretation 1003.1 #15 addressed the inconsistency in
+the standard with the definition of pathname and the description
+of {PATH_MAX}, allowing application writers to allocate either {PATH_MAX}
+or {PATH_MAX}+1 bytes. The inconsistency has been removed
+by correction to the {PATH_MAX} definition to include the null character.
+With this change, applications that previously allocated
+{PATH_MAX} bytes will continue to succeed.
+.TP 7
+{SYMLINK_MAX}
+This symbol refers to space for data that is stored in the file system,
+as opposed to {PATH_MAX} which is the length of a name that
+can be passed to a function. In some existing implementations, the
+filenames pointed to by symbolic links are stored in the inodes
+of the links, so it is important that {SYMLINK_MAX} not be constrained
+to be as large as {PATH_MAX}.
+.sp
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIfpathconf\fP(),
+\fIpathconf\fP(), \fIsysconf\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/locale.h.0p b/man-pages-posix-2003/man0p/locale.h.0p
new file mode 100644
index 0000000..72ef560
--- /dev/null
+++ b/man-pages-posix-2003/man0p/locale.h.0p
@@ -0,0 +1,117 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<locale.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <locale.h>
+.SH NAME
+locale.h \- category macros
+.SH SYNOPSIS
+.LP
+\fB#include <locale.h>\fP
+.SH DESCRIPTION
+.LP
+Some of the functionality described on this reference page extends
+the ISO\ C standard. Any conflict between the
+requirements described here and the ISO\ C standard is unintentional.
+This volume of IEEE\ Std\ 1003.1-2001 defers to
+the ISO\ C standard.
+.LP
+The \fI<locale.h>\fP header shall provide a definition for \fBlconv\fP
+structure, which shall include at least the
+following members. (See the definitions of \fILC_MONETARY\fP in \fILC_MONETARY\fP
+and
+\fILC_NUMERIC\fP .)
+.sp
+.RS
+.nf
+
+\fBchar *currency_symbol
+char *decimal_point
+char frac_digits
+char *grouping
+char *int_curr_symbol
+char int_frac_digits
+char int_n_cs_precedes
+char int_n_sep_by_space
+char int_n_sign_posn
+char int_p_cs_precedes
+char int_p_sep_by_space
+char int_p_sign_posn
+char *mon_decimal_point
+char *mon_grouping
+char *mon_thousands_sep
+char *negative_sign
+char n_cs_precedes
+char n_sep_by_space
+char n_sign_posn
+char *positive_sign
+char p_cs_precedes
+char p_sep_by_space
+char p_sign_posn
+char *thousands_sep
+\fP
+.fi
+.RE
+.LP
+The \fI<locale.h>\fP header shall define NULL (as defined in \fI<stddef.h>\fP
+) and at
+least the following as macros:
+.LP
+.sp
+\fILC_ALL\fP
+.br
+\fILC_COLLATE\fP
+.br
+\fILC_CTYPE\fP
+.br
+.sp
+\fILC_MESSAGES\fP
+.br
+.sp
+\fILC_MONETARY\fP
+.br
+\fILC_NUMERIC\fP
+.br
+\fILC_TIME\fP
+.br
+.LP
+which shall expand to distinct integer constant expressions, for use
+as the first argument to the \fIsetlocale\fP() function.
+.LP
+Additional macro definitions, beginning with the characters \fILC_\fP
+and an uppercase letter, may also be given here.
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBstruct lconv *localeconv (void);
+char *setlocale(int, const char *);
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIlocaleconv\fP(),
+\fIsetlocale\fP(), \fIEnvironment Variables\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/math.h.0p b/man-pages-posix-2003/man0p/math.h.0p
new file mode 100644
index 0000000..92ff7b0
--- /dev/null
+++ b/man-pages-posix-2003/man0p/math.h.0p
@@ -0,0 +1,487 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<math.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <math.h>
+.SH NAME
+math.h \- mathematical declarations
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>\fP
+.SH DESCRIPTION
+.LP
+Some of the functionality described on this reference page extends
+the ISO\ C standard. Applications shall define
+the appropriate feature test macro (see the System Interfaces volume
+of IEEE\ Std\ 1003.1-2001, Section 2.2, The Compilation Environment)
+to enable the visibility of these symbols in this
+header.
+.LP
+The \fI<math.h>\fP header shall include definitions for at least the
+following types:
+.TP 7
+\fBfloat_t\fP
+A real-floating type at least as wide as \fBfloat\fP.
+.TP 7
+\fBdouble_t\fP
+A real-floating type at least as wide as \fBdouble\fP, and at least
+as wide as \fBfloat_t\fP.
+.sp
+.LP
+If FLT_EVAL_METHOD equals 0, \fBfloat_t\fP and \fBdouble_t\fP shall
+be \fBfloat\fP and \fBdouble\fP, respectively; if
+FLT_EVAL_METHOD equals 1, they shall both be \fBdouble\fP; if FLT_EVAL_METHOD
+equals 2, they shall both be \fBlong double\fP; for
+other values of FLT_EVAL_METHOD, they are otherwise implementation-defined.
+.LP
+The \fI<math.h>\fP header shall define the following macros, where
+real-floating indicates that the argument shall be an
+expression of real-floating type:
+.sp
+.RS
+.nf
+
+\fBint fpclassify(real-floating x);
+int isfinite(real-floating x);
+int isinf(real-floating x);
+int isnan(real-floating x);
+int isnormal(real-floating x);
+int signbit(real-floating x);
+int isgreater(real-floating x, real-floating y);
+int isgreaterequal(real-floating x, real-floating y);
+int isless(real-floating x, real-floating y);
+int islessequal(real-floating x, real-floating y);
+int islessgreater(real-floating x, real-floating y);
+int isunordered(real-floating x, real-floating y);
+\fP
+.fi
+.RE
+.LP
+The \fI<math.h>\fP header shall provide for the following constants.
+The values are of type \fBdouble\fP and are
+accurate within the precision of the \fBdouble\fP type.
+.TP 7
+M_E
+Value of \fIe\fP
+.TP 7
+M_LOG2E
+Value of log_2\fIe\fP
+.TP 7
+M_LOG10E
+Value of log_10\fIe\fP
+.TP 7
+M_LN2
+Value of log_e2
+.TP 7
+M_LN10
+Value of log_e10
+.TP 7
+M_PI
+Value of pi
+.TP 7
+M_PI_2
+Value of pi/2
+.TP 7
+M_PI_4
+Value of pi/4
+.TP 7
+M_1_PI
+Value of 1/pi
+.TP 7
+M_2_PI
+Value of 2/pi
+.TP 7
+M_2_SQRTPI
+Value of 2/ sqrt pi
+.TP 7
+M_SQRT2
+Value of sqrt 2
+.TP 7
+M_SQRT1_2
+Value of 1/sqrt 2
+.sp
+.LP
+The header shall define the following symbolic constants:
+.TP 7
+MAXFLOAT
+Value of maximum non-infinite single-precision floating-point number.
+.TP 7
+HUGE_VAL
+A positive \fBdouble\fP expression, not necessarily representable
+as a \fBfloat\fP. Used as an error value returned by the
+mathematics library. HUGE_VAL evaluates to +infinity on systems supporting
+IEEE\ Std\ 754-1985.
+.TP 7
+HUGE_VALF
+A positive \fBfloat\fP constant expression. Used as an error value
+returned by the mathematics library. HUGE_VALF evaluates to
++infinity on systems supporting IEEE\ Std\ 754-1985.
+.TP 7
+HUGE_VALL
+A positive \fBlong double\fP constant expression. Used as an error
+value returned by the mathematics library. HUGE_VALL
+evaluates to +infinity on systems supporting IEEE\ Std\ 754-1985.
+.TP 7
+INFINITY
+A constant expression of type \fBfloat\fP representing positive or
+unsigned infinity, if available; else a positive constant
+of type \fBfloat\fP that overflows at translation time.
+.TP 7
+NAN
+A constant expression of type \fBfloat\fP representing a quiet NaN.
+This symbolic constant is only defined if the
+implementation supports quiet NaNs for the \fBfloat\fP type.
+.sp
+.LP
+The following macros shall be defined for number classification. They
+represent the mutually-exclusive kinds of floating-point
+values. They expand to integer constant expressions with distinct
+values. Additional implementation-defined floating-point
+classifications, with macro definitions beginning with FP_ and an
+uppercase letter, may also be specified by the
+implementation.
+.sp
+.RS
+.nf
+
+FP_INFINITE
+FP_NAN
+FP_NORMAL
+FP_SUBNORMAL
+FP_ZERO
+.fi
+.RE
+.LP
+The following optional macros indicate whether the \fIfma\fP() family
+of functions are fast
+compared with direct code:
+.sp
+.RS
+.nf
+
+FP_FAST_FMA
+FP_FAST_FMAF
+FP_FAST_FMAL
+.fi
+.RE
+.LP
+The FP_FAST_FMA macro shall be defined to indicate that the \fIfma\fP()
+function generally
+executes about as fast as, or faster than, a multiply and an add of
+\fBdouble\fP operands. The other macros have the equivalent
+meaning for the \fBfloat\fP and \fBlong double\fP versions.
+.LP
+The following macros shall expand to integer constant expressions
+whose values are returned by \fIilogb\fP( \fIx\fP) if
+\fIx\fP is zero or NaN, respectively. The value of FP_ILOGB0 shall
+be either {INT_MIN} or - {INT_MAX}. The value of FP_ILOGBNAN
+shall be either {INT_MAX} or {INT_MIN}.
+.sp
+.RS
+.nf
+
+FP_ILOGB0
+FP_ILOGBNAN
+.fi
+.RE
+.LP
+The following macros shall expand to the integer constants 1 and 2,
+respectively;
+.sp
+.RS
+.nf
+
+MATH_ERRNO
+MATH_ERREXCEPT
+.fi
+.RE
+.LP
+The following macro shall expand to an expression that has type \fBint\fP
+and the value MATH_ERRNO, MATH_ERREXCEPT, or the
+bitwise-inclusive OR of both:
+.sp
+.RS
+.nf
+
+math_errhandling
+.fi
+.RE
+.LP
+The value of math_errhandling is constant for the duration of the
+program. It is unspecified whether math_errhandling is a macro
+or an identifier with external linkage. If a macro definition is suppressed
+or a program defines an identifier with the name
+math_errhandling, the behavior is undefined. If the expression (math_errhandling
+& MATH_ERREXCEPT) can be non-zero, the
+implementation shall define the macros FE_DIVBYZERO, FE_INVALID, and
+FE_OVERFLOW in \fI<fenv.h>\fP.
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBdouble acos(double);
+float acosf(float);
+double acosh(double);
+float acoshf(float);
+long double acoshl(long double);
+long double acosl(long double);
+double asin(double);
+float asinf(float);
+double asinh(double);
+float asinhf(float);
+long double asinhl(long double);
+long double asinl(long double);
+double atan(double);
+double atan2(double, double);
+float atan2f(float, float);
+long double atan2l(long double, long double);
+float atanf(float);
+double atanh(double);
+float atanhf(float);
+long double atanhl(long double);
+long double atanl(long double);
+double cbrt(double);
+float cbrtf(float);
+long double cbrtl(long double);
+double ceil(double);
+float ceilf(float);
+long double ceill(long double);
+double copysign(double, double);
+float copysignf(float, float);
+long double copysignl(long double, long double);
+double cos(double);
+float cosf(float);
+double cosh(double);
+float coshf(float);
+long double coshl(long double);
+long double cosl(long double);
+double erf(double);
+double erfc(double);
+float erfcf(float);
+long double erfcl(long double);
+float erff(float);
+long double erfl(long double);
+double exp(double);
+double exp2(double);
+float exp2f(float);
+long double exp2l(long double);
+float expf(float);
+long double expl(long double);
+double expm1(double);
+float expm1f(float);
+long double expm1l(long double);
+double fabs(double);
+float fabsf(float);
+long double fabsl(long double);
+double fdim(double, double);
+float fdimf(float, float);
+long double fdiml(long double, long double);
+double floor(double);
+float floorf(float);
+long double floorl(long double);
+double fma(double, double, double);
+float fmaf(float, float, float);
+long double fmal(long double, long double, long double);
+double fmax(double, double);
+float fmaxf(float, float);
+long double fmaxl(long double, long double);
+double fmin(double, double);
+float fminf(float, float);
+long double fminl(long double, long double);
+double fmod(double, double);
+float fmodf(float, float);
+long double fmodl(long double, long double);
+double frexp(double, int *);
+float frexpf(float value, int *);
+long double frexpl(long double value, int *);
+double hypot(double, double);
+float hypotf(float, float);
+long double hypotl(long double, long double);
+int ilogb(double);
+int ilogbf(float);
+int ilogbl(long double);
+
+double j0(double);
+double j1(double);
+double jn(int, double);
+
+double ldexp(double, int);
+float ldexpf(float, int);
+long double ldexpl(long double, int);
+double lgamma(double);
+float lgammaf(float);
+long double lgammal(long double);
+long long llrint(double);
+long long llrintf(float);
+long long llrintl(long double);
+long long llround(double);
+long long llroundf(float);
+long long llroundl(long double);
+double log(double);
+double log10(double);
+float log10f(float);
+long double log10l(long double);
+double log1p(double);
+float log1pf(float);
+long double log1pl(long double);
+double log2(double);
+float log2f(float);
+long double log2l(long double);
+double logb(double);
+float logbf(float);
+long double logbl(long double);
+float logf(float);
+long double logl(long double);
+long lrint(double);
+long lrintf(float);
+long lrintl(long double);
+long lround(double);
+long lroundf(float);
+long lroundl(long double);
+double modf(double, double *);
+float modff(float, float *);
+long double modfl(long double, long double *);
+double nan(const char *);
+float nanf(const char *);
+long double nanl(const char *);
+double nearbyint(double);
+float nearbyintf(float);
+long double nearbyintl(long double);
+double nextafter(double, double);
+float nextafterf(float, float);
+long double nextafterl(long double, long double);
+double nexttoward(double, long double);
+float nexttowardf(float, long double);
+long double nexttowardl(long double, long double);
+double pow(double, double);
+float powf(float, float);
+long double powl(long double, long double);
+double remainder(double, double);
+float remainderf(float, float);
+long double remainderl(long double, long double);
+double remquo(double, double, int *);
+float remquof(float, float, int *);
+long double remquol(long double, long double, int *);
+double rint(double);
+float rintf(float);
+long double rintl(long double);
+double round(double);
+float roundf(float);
+long double roundl(long double);
+
+double scalb(double, double);
+
+double scalbln(double, long);
+float scalblnf(float, long);
+long double scalblnl(long double, long);
+double scalbn(double, int);
+float scalbnf(float, int);
+long double scalbnl(long double, int);
+double sin(double);
+float sinf(float);
+double sinh(double);
+float sinhf(float);
+long double sinhl(long double);
+long double sinl(long double);
+double sqrt(double);
+float sqrtf(float);
+long double sqrtl(long double);
+double tan(double);
+float tanf(float);
+double tanh(double);
+float tanhf(float);
+long double tanhl(long double);
+long double tanl(long double);
+double tgamma(double);
+float tgammaf(float);
+long double tgammal(long double);
+double trunc(double);
+float truncf(float);
+long double truncl(long double);
+
+double y0(double);
+double y1(double);
+double yn(int, double);
+
+\fP
+.fi
+.RE
+.LP
+The following external variable shall be defined:
+.sp
+.RS
+.nf
+
+\fB
+extern int signgam;
+
+\fP
+.fi
+.RE
+.LP
+The behavior of each of the functions defined in \fI<math.h>\fP is
+specified in the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001 for all representable values of its input arguments,
+except where stated otherwise. Each function
+shall execute as if it were a single operation without generating
+any externally visible exceptional conditions.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The FP_CONTRACT pragma can be used to allow (if the state is on) or
+disallow (if the state is off) the implementation to
+contract expressions. Each pragma can occur either outside external
+declarations or preceding all explicit declarations and
+statements inside a compound statement. When outside external declarations,
+the pragma takes effect from its occurrence until
+another FP_CONTRACT pragma is encountered, or until the end of the
+translation unit. When inside a compound statement, the pragma
+takes effect from its occurrence until another FP_CONTRACT pragma
+is encountered (including within a nested compound statement), or
+until the end of the compound statement; at the end of a compound
+statement the state for the pragma is restored to its condition
+just before the compound statement. If this pragma is used in any
+other context, the behavior is undefined. The default state (on
+or off) for the pragma is implementation-defined.
+.SH RATIONALE
+.LP
+Before the ISO/IEC\ 9899:1999 standard, the math library was defined
+only for the floating type \fBdouble\fP. All the names
+formed by appending \fB'f'\fP or \fB'l'\fP to a name in \fI<math.h>\fP
+were reserved to allow for the definition of
+\fBfloat\fP and \fBlong double\fP libraries; and the ISO/IEC\ 9899:1999
+standard provides for all three versions of math
+functions.
+.LP
+The functions \fIecvt\fP(), \fIfcvt\fP(), and \fIgcvt\fP() have been
+dropped from the ISO\ C standard since their capability is available
+through \fIsprintf\fP(). These are provided on XSI-conformant systems
+supporting the
+Legacy Option Group.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<stddef.h>\fP, \fI<sys/types.h>\fP, the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIacos\fP(), \fIacosh\fP(),
+\fIasin\fP(), \fIatan\fP(), \fIatan2\fP(), \fIcbrt\fP(), \fIceil\fP(),
+\fIcos\fP(), \fIcosh\fP(), \fIerf\fP(), \fIexp\fP(), \fIexpm1\fP(),
+\fIfabs\fP(), \fIfloor\fP(), \fIfmod\fP(), \fIfrexp\fP(), \fIhypot\fP(),
+\fIilogb\fP(), \fIisnan\fP(), \fIj0\fP(), \fIldexp\fP(), \fIlgamma\fP(),
+\fIlog\fP(), \fIlog10\fP(), \fIlog1p\fP(), \fIlogb\fP(), \fImodf\fP(),
+\fInextafter\fP(), \fIpow\fP(), \fIremainder\fP(), \fIrint\fP(), \fIscalb\fP(),
+\fIsin\fP(), \fIsinh\fP(), \fIsqrt\fP(), \fItan\fP(), \fItanh\fP(),
+\fIy0\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/mman.h.0p b/man-pages-posix-2003/man0p/mman.h.0p
new file mode 100644
index 0000000..96c6717
--- /dev/null
+++ b/man-pages-posix-2003/man0p/mman.h.0p
@@ -0,0 +1 @@
+.so man0p/sys_mman.h.0p
diff --git a/man-pages-posix-2003/man0p/monetary.h.0p b/man-pages-posix-2003/man0p/monetary.h.0p
new file mode 100644
index 0000000..cc4ce38
--- /dev/null
+++ b/man-pages-posix-2003/man0p/monetary.h.0p
@@ -0,0 +1,53 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<monetary.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <monetary.h>
+.SH NAME
+monetary.h \- monetary types
+.SH SYNOPSIS
+.LP
+\fB#include <monetary.h> \fP
+.SH DESCRIPTION
+.LP
+The \fI<monetary.h>\fP header shall define the following types:
+.TP 7
+\fBsize_t\fP
+As described in \fI<stddef.h>\fP .
+.TP 7
+\fBssize_t\fP
+As described in \fI<sys/types.h>\fP .
+.sp
+.LP
+The following shall be declared as a function and may also be defined
+as a macro. A function prototype shall be provided.
+.sp
+.RS
+.nf
+
+\fBssize_t strfmon(char *restrict, size_t, const char *restrict, ...);
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIstrfmon\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/mqueue.h.0p b/man-pages-posix-2003/man0p/mqueue.h.0p
new file mode 100644
index 0000000..89674e5
--- /dev/null
+++ b/man-pages-posix-2003/man0p/mqueue.h.0p
@@ -0,0 +1,88 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<mqueue.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <mqueue.h>
+.SH NAME
+mqueue.h \- message queues (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <mqueue.h> \fP
+.SH DESCRIPTION
+.LP
+The \fI<mqueue.h>\fP header shall define the \fBmqd_t\fP type, which
+is used for message queue descriptors. This is not
+an array type.
+.LP
+The \fI<mqueue.h>\fP header shall define the \fBsigevent\fP structure
+(as described in \fI<signal.h>\fP ) and the \fBmq_attr\fP structure,
+which is used in getting and setting the attributes
+of a message queue. Attributes are initially set when the message
+queue is created. An \fBmq_attr\fP structure shall have at least
+the following fields:
+.sp
+.RS
+.nf
+
+\fBlong mq_flags \fP Message queue flags. \fB
+long mq_maxmsg \fP Maximum number of messages. \fB
+long mq_msgsize \fP Maximum message size. \fB
+long mq_curmsgs \fP Number of messages currently queued. \fB
+\fP
+.fi
+.RE
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBint mq_close(mqd_t);
+int mq_getattr(mqd_t, struct mq_attr *);
+int mq_notify(mqd_t, const struct sigevent *);
+mqd_t mq_open(const char *, int, ...);
+ssize_t mq_receive(mqd_t, char *, size_t, unsigned *);
+int mq_send(mqd_t, const char *, size_t, unsigned );
+int mq_setattr(mqd_t, const struct mq_attr *restrict,
+ struct mq_attr *restrict);
+
+ssize_t mq_timedreceive(mqd_t, char *restrict, size_t,
+ unsigned *restrict, const struct timespec *restrict);
+int mq_timedsend(mqd_t, const char *, size_t, unsigned,
+ const struct timespec *);
+
+int mq_unlink(const char *);
+\fP
+.fi
+.RE
+.LP
+Inclusion of the \fI<mqueue.h>\fP header may make visible symbols
+defined in the headers \fI<fcntl.h>\fP, \fI<signal.h>\fP, \fI<sys/types.h>\fP,
+and \fI<time.h>\fP.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<fcntl.h>\fP, \fI<signal.h>\fP, \fI<sys/types.h>\fP, \fI<time.h>\fP,
+the System Interfaces volume
+of IEEE\ Std\ 1003.1-2001, \fImq_close\fP(), \fImq_getattr\fP(), \fImq_notify\fP(),
+\fImq_open\fP(), \fImq_receive\fP(), \fImq_send\fP(), \fImq_setattr\fP(),
+\fImq_timedreceive\fP(), \fImq_timedsend\fP(), \fImq_unlink\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/msg.h.0p b/man-pages-posix-2003/man0p/msg.h.0p
new file mode 100644
index 0000000..e905a24
--- /dev/null
+++ b/man-pages-posix-2003/man0p/msg.h.0p
@@ -0,0 +1 @@
+.so man0p/sys_msg.h.0p
diff --git a/man-pages-posix-2003/man0p/ndbm.h.0p b/man-pages-posix-2003/man0p/ndbm.h.0p
new file mode 100644
index 0000000..9b55f68
--- /dev/null
+++ b/man-pages-posix-2003/man0p/ndbm.h.0p
@@ -0,0 +1,84 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<ndbm.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <ndbm.h>
+.SH NAME
+ndbm.h \- definitions for ndbm database operations
+.SH SYNOPSIS
+.LP
+\fB#include <ndbm.h> \fP
+.SH DESCRIPTION
+.LP
+The \fI<ndbm.h>\fP header shall define the \fBdatum\fP type as a structure
+that includes at least the following
+members:
+.sp
+.RS
+.nf
+
+\fBvoid *dptr \fP A pointer to the application's data. \fB
+size_t dsize\fP The size of the object pointed to by \fIdptr.\fP \fB
+\fP
+.fi
+.RE
+.LP
+The \fBsize_t\fP type shall be defined as described in \fI<stddef.h>\fP
+\&.
+.LP
+The \fI<ndbm.h>\fP header shall define the \fBDBM\fP type.
+.LP
+The following constants shall be defined as possible values for the
+\fIstore_mode\fP argument to \fIdbm_store\fP():
+.TP 7
+DBM_INSERT
+Insertion of new entries only.
+.TP 7
+DBM_REPLACE
+Allow replacing existing entries.
+.sp
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBint dbm_clearerr(DBM *);
+void dbm_close(DBM *);
+int dbm_delete(DBM *, datum);
+int dbm_error(DBM *);
+datum dbm_fetch(DBM *, datum);
+datum dbm_firstkey(DBM *);
+datum dbm_nextkey(DBM *);
+DBM *dbm_open(const char *, int, mode_t);
+int dbm_store(DBM *, datum, datum, int);
+\fP
+.fi
+.RE
+.LP
+The \fBmode_t\fP type shall be defined through \fBtypedef\fP as described
+in \fI<sys/types.h>\fP .
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<stddef.h>\fP, \fI<sys/types.h>\fP, the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIdbm_clearerr\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/netdb.h.0p b/man-pages-posix-2003/man0p/netdb.h.0p
new file mode 100644
index 0000000..c1b6c93
--- /dev/null
+++ b/man-pages-posix-2003/man0p/netdb.h.0p
@@ -0,0 +1,298 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<netdb.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <netdb.h>
+.SH NAME
+netdb.h \- definitions for network database operations
+.SH SYNOPSIS
+.LP
+\fB#include <netdb.h>\fP
+.SH DESCRIPTION
+.LP
+The \fI<netdb.h>\fP header may define the \fBin_port_t\fP type and
+the \fBin_addr_t\fP type as described in \fI<netinet/in.h>\fP .
+.LP
+The \fI<netdb.h>\fP header shall define the \fBhostent\fP structure
+that includes at least the following members:
+.sp
+.RS
+.nf
+
+\fBchar *h_name \fP Official name of the host. \fB
+char **h_aliases \fP A pointer to an array of pointers to \fB
+ \fP alternative host names, terminated by a \fB
+ \fP null pointer. \fB
+int h_addrtype \fP Address type. \fB
+int h_length \fP The length, in bytes, of the address. \fB
+char **h_addr_list \fP A pointer to an array of pointers to network \fB
+ \fP addresses (in network byte order) for the host, \fB
+ \fP terminated by a null pointer. \fB
+\fP
+.fi
+.RE
+.LP
+The \fI<netdb.h>\fP header shall define the \fBnetent\fP structure
+that includes at least the following members:
+.sp
+.RS
+.nf
+
+\fBchar *n_name \fP Official, fully-qualified (including the \fB
+ \fP domain) name of the host. \fB
+char **n_aliases \fP A pointer to an array of pointers to \fB
+ \fP alternative network names, terminated by a \fB
+ \fP null pointer. \fB
+int n_addrtype \fP The address type of the network. \fB
+uint32_t n_net \fP The network number, in host byte order. \fB
+\fP
+.fi
+.RE
+.LP
+The \fBuint32_t\fP type shall be defined as described in \fI<inttypes.h>\fP
+\&.
+.LP
+The \fI<netdb.h>\fP header shall define the \fBprotoent\fP structure
+that includes at least the following members:
+.sp
+.RS
+.nf
+
+\fBchar *p_name \fP Official name of the protocol. \fB
+char **p_aliases \fP A pointer to an array of pointers to \fB
+ \fP alternative protocol names, terminated by \fB
+ \fP a null pointer. \fB
+int p_proto \fP The protocol number. \fB
+\fP
+.fi
+.RE
+.LP
+The \fI<netdb.h>\fP header shall define the \fBservent\fP structure
+that includes at least the following members:
+.sp
+.RS
+.nf
+
+\fBchar *s_name \fP Official name of the service. \fB
+char **s_aliases \fP A pointer to an array of pointers to \fB
+ \fP alternative service names, terminated by \fB
+ \fP a null pointer. \fB
+int s_port \fP The port number at which the service \fB
+ \fP resides, in network byte order. \fB
+char *s_proto \fP The name of the protocol to use when \fB
+ \fP contacting the service. \fB
+\fP
+.fi
+.RE
+.LP
+The \fI<netdb.h>\fP header shall define the IPPORT_RESERVED macro
+with the value of the highest reserved Internet port
+number.
+.LP
+When the \fI<netdb.h>\fP header is included, \fIh_errno\fP shall be
+available as a modifiable lvalue of type \fBint\fP. It
+is unspecified whether \fIh_errno\fP is a macro or an identifier declared
+with external linkage.
+.LP
+The \fI<netdb.h>\fP header shall define the following macros for use
+as error values for \fIgethostbyaddr\fP() and \fIgethostbyname\fP():
+.sp
+.RS
+.nf
+
+HOST_NOT_FOUND
+NO_DATA
+NO_RECOVERY
+TRY_AGAIN
+.fi
+.RE
+.SS Address Information Structure
+.LP
+The \fI<netdb.h>\fP header shall define the \fBaddrinfo\fP structure
+that includes at least the following members:
+.sp
+.RS
+.nf
+
+\fBint ai_flags \fP Input flags. \fB
+int ai_family \fP Address family of socket. \fB
+int ai_socktype \fP Socket type. \fB
+int ai_protocol \fP Protocol of socket. \fB
+socklen_t ai_addrlen \fP Length of socket address. \fB
+struct sockaddr *ai_addr \fP Socket address of socket. \fB
+char *ai_canonname \fP Canonical name of service location. \fB
+struct addrinfo *ai_next \fP Pointer to next in list. \fB
+\fP
+.fi
+.RE
+.LP
+The \fI<netdb.h>\fP header shall define the following macros that
+evaluate to bitwise-distinct integer constants for use
+in the \fIflags\fP field of the \fBaddrinfo\fP structure:
+.TP 7
+AI_PASSIVE
+Socket address is intended for \fIbind\fP().
+.TP 7
+AI_CANONNAME
+.sp
+Request for canonical name.
+.TP 7
+AI_NUMERICHOST
+.sp
+Return numeric host address as name.
+.TP 7
+AI_NUMERICSERV
+.sp
+Inhibit service name resolution.
+.TP 7
+AI_V4MAPPED
+If no IPv6 addresses are found, query for IPv4 addresses and return
+them to the caller as IPv4-mapped IPv6 addresses.
+.TP 7
+AI_ALL
+Query for both IPv4 and IPv6 addresses.
+.TP 7
+AI_ADDRCONFIG
+.sp
+Query for IPv4 addresses only when an IPv4 address is configured;
+query for IPv6 addresses only when an IPv6 address is
+configured.
+.sp
+.LP
+The \fI<netdb.h>\fP header shall define the following macros that
+evaluate to bitwise-distinct integer constants for use
+in the \fIflags\fP argument to \fIgetnameinfo\fP():
+.TP 7
+NI_NOFQDN
+Only the nodename portion of the FQDN is returned for local hosts.
+.TP 7
+NI_NUMERICHOST
+.sp
+The numeric form of the node's address is returned instead of its
+name.
+.TP 7
+NI_NAMEREQD
+Return an error if the node's name cannot be located in the database.
+.TP 7
+NI_NUMERICSERV
+.sp
+The numeric form of the service address is returned instead of its
+name.
+.TP 7
+NI_NUMERICSCOPE
+.sp
+For IPv6 addresses, the numeric form of the scope identifier is returned
+instead of its name.
+.TP 7
+NI_DGRAM
+Indicates that the service is a datagram service (SOCK_DGRAM).
+.sp
+.SS Address Information Errors
+.LP
+The \fI<netdb.h>\fP header shall define the following macros for use
+as error values for \fIgetaddrinfo\fP() and \fIgetnameinfo\fP():
+.TP 7
+EAI_AGAIN
+The name could not be resolved at this time. Future attempts may succeed.
+.TP 7
+EAI_BADFLAGS
+The flags had an invalid value.
+.TP 7
+EAI_FAIL
+A non-recoverable error occurred.
+.TP 7
+EAI_FAMILY
+The address family was not recognized or the address length was invalid
+for the specified family.
+.TP 7
+EAI_MEMORY
+There was a memory allocation failure.
+.TP 7
+EAI_NONAME
+The name does not resolve for the supplied parameters.
+.LP
+NI_NAMEREQD is set and the host's name cannot be located, or both
+\fInodename\fP and \fIservname\fP were null.
+.TP 7
+EAI_SERVICE
+The service passed was not recognized for the specified socket type.
+.TP 7
+EAI_SOCKTYPE
+The intended socket type was not recognized.
+.TP 7
+EAI_SYSTEM
+A system error occurred. The error code can be found in \fIerrno\fP.
+.TP 7
+EAI_OVERFLOW
+.sp
+An argument buffer overflowed.
+.sp
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBvoid endhostent(void);
+void endnetent(void);
+void endprotoent(void);
+void endservent(void);
+void freeaddrinfo(struct addrinfo *);
+const char *gai_strerror(int);
+int getaddrinfo(const char *restrict, const char *restrict,
+ const struct addrinfo *restrict,
+ struct addrinfo **restrict);
+struct hostent *gethostbyaddr(const void *, socklen_t, int);
+struct hostent *gethostbyname(const char *);
+struct hostent *gethostent(void);
+int getnameinfo(const struct sockaddr *restrict, socklen_t,
+ char *restrict, socklen_t, char *restrict,
+ socklen_t, int);
+struct netent *getnetbyaddr(uint32_t, int);
+struct netent *getnetbyname(const char *);
+struct netent *getnetent(void);
+struct protoent *getprotobyname(const char *);
+struct protoent *getprotobynumber(int);
+struct protoent *getprotoent(void);
+struct servent *getservbyname(const char *, const char *);
+struct servent *getservbyport(int, const char *);
+struct servent *getservent(void);
+void sethostent(int);
+void setnetent(int);
+void setprotoent(int);
+void setservent(int);
+\fP
+.fi
+.RE
+.LP
+The type \fBsocklen_t\fP shall be defined through \fBtypedef\fP as
+described in \fI<sys/socket.h>\fP.
+.LP
+Inclusion of the \fI<netdb.h>\fP header may also make visible all
+symbols from \fI<netinet/in.h>\fP, \fI<sys/socket.h>\fP, and \fI<inttypes.h>\fP.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<netinet/in.h>\fP, \fI<inttypes.h>\fP, \fI<sys/socket.h>\fP,
+the System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIbind\fP(),
+\fIendhostent\fP(), \fIendnetent\fP(), \fIendprotoent\fP(), \fIendservent\fP(),
+\fIgetaddrinfo\fP(), \fIgetnameinfo\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/nl_types.h.0p b/man-pages-posix-2003/man0p/nl_types.h.0p
new file mode 100644
index 0000000..7e9f0b9
--- /dev/null
+++ b/man-pages-posix-2003/man0p/nl_types.h.0p
@@ -0,0 +1,82 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<nl_types.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <nl_types.h>
+.SH NAME
+nl_types.h \- data types
+.SH SYNOPSIS
+.LP
+\fB#include <nl_types.h> \fP
+.SH DESCRIPTION
+.LP
+The \fI<nl_types.h>\fP header shall contain definitions of at least
+the following types:
+.TP 7
+\fBnl_catd\fP
+Used by the message catalog functions \fIcatopen\fP(), \fIcatgets\fP(),
+and \fIcatclose\fP() to identify a
+catalog descriptor.
+.TP 7
+\fBnl_item\fP
+Used by \fInl_langinfo\fP() to identify items of \fIlanginfo\fP data.
+Values of
+objects of type \fBnl_item\fP are defined in \fI<langinfo.h>\fP .
+.sp
+.LP
+The \fI<nl_types.h>\fP header shall contain definitions of at least
+the following constants:
+.TP 7
+NL_SETD
+Used by \fIgencat\fP when no $\fIset\fP directive is specified in
+a message text source file; see the Internationalization
+Guide. This constant can be passed as the value of \fIset_id\fP on
+subsequent calls to \fIcatgets\fP() (that is, to retrieve messages
+from the default message set). The value of NL_SETD
+is implementation-defined.
+.TP 7
+NL_CAT_LOCALE
+Value that must be passed as the \fIoflag\fP argument to \fIcatopen\fP()
+to ensure
+that message catalog selection depends on the \fILC_MESSAGES\fP locale
+category, rather than directly on the \fILANG\fP
+environment variable.
+.sp
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBint catclose(nl_catd);
+char *catgets(nl_catd, int, int, const char *);
+nl_catd catopen(const char *, int);
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<langinfo.h>\fP, the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+\fIcatclose\fP(), \fIcatgets\fP(), \fIcatopen\fP(), \fInl_langinfo\fP(),
+the Shell and
+Utilities volume of IEEE\ Std\ 1003.1-2001, \fIgencat\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/poll.h.0p b/man-pages-posix-2003/man0p/poll.h.0p
new file mode 100644
index 0000000..3a9dd8b
--- /dev/null
+++ b/man-pages-posix-2003/man0p/poll.h.0p
@@ -0,0 +1,110 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<poll.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <poll.h>
+.SH NAME
+poll.h \- definitions for the poll() function
+.SH SYNOPSIS
+.LP
+\fB#include <poll.h> \fP
+.SH DESCRIPTION
+.LP
+The \fI<poll.h>\fP header shall define the \fBpollfd\fP structure
+that includes at least the following members:
+.sp
+.RS
+.nf
+
+\fBint fd \fP The following descriptor being polled. \fB
+short events \fP The input event flags (see below). \fB
+short revents \fP The output event flags (see below). \fB
+\fP
+.fi
+.RE
+.LP
+The \fI<poll.h>\fP header shall define the following type through
+\fBtypedef\fP:
+.TP 7
+\fBnfds_t\fP
+An unsigned integer type used for the number of file descriptors.
+.sp
+.LP
+The implementation shall support one or more programming environments
+in which the width of \fBnfds_t\fP is no greater than the
+width of type \fBlong\fP. The names of these programming environments
+can be obtained using the \fIconfstr\fP() function or the \fIgetconf\fP
+utility.
+.LP
+The following symbolic constants shall be defined, zero or more of
+which may be OR'ed together to form the \fIevents\fP or
+\fIrevents\fP members in the \fBpollfd\fP structure:
+.TP 7
+POLLIN
+Data other than high-priority data may be read without blocking.
+.TP 7
+POLLRDNORM
+Normal data may be read without blocking.
+.TP 7
+POLLRDBAND
+Priority data may be read without blocking.
+.TP 7
+POLLPRI
+High priority data may be read without blocking.
+.TP 7
+POLLOUT
+Normal data may be written without blocking.
+.TP 7
+POLLWRNORM
+Equivalent to POLLOUT.
+.TP 7
+POLLWRBAND
+Priority data may be written.
+.TP 7
+POLLERR
+An error has occurred ( \fIrevents\fP only).
+.TP 7
+POLLHUP
+Device has been disconnected ( \fIrevents\fP only).
+.TP 7
+POLLNVAL
+Invalid \fIfd\fP member ( \fIrevents\fP only).
+.sp
+.LP
+The significance and semantics of normal, priority, and high-priority
+data are file and device-specific.
+.LP
+The following shall be declared as a function and may also be defined
+as a macro. A function prototype shall be provided.
+.sp
+.RS
+.nf
+
+\fBint poll(struct pollfd[], nfds_t, int);
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIconfstr\fP(),
+\fIpoll\fP(), the Shell and Utilities volume of IEEE\ Std\ 1003.1-2001,
+\fIgetconf\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/pthread.h.0p b/man-pages-posix-2003/man0p/pthread.h.0p
new file mode 100644
index 0000000..4a0ef14
--- /dev/null
+++ b/man-pages-posix-2003/man0p/pthread.h.0p
@@ -0,0 +1,385 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<pthread.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <pthread.h>
+.SH NAME
+pthread.h \- threads
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h> \fP
+.SH DESCRIPTION
+.LP
+The \fI<pthread.h>\fP header shall define the following symbols:
+.LP
+.sp
+.sp
+PTHREAD_BARRIER_SERIAL_THREAD
+.br
+.sp
+PTHREAD_CANCEL_ASYNCHRONOUS
+.br
+PTHREAD_CANCEL_ENABLE
+.br
+PTHREAD_CANCEL_DEFERRED
+.br
+PTHREAD_CANCEL_DISABLE
+.br
+PTHREAD_CANCELED
+.br
+PTHREAD_COND_INITIALIZER
+.br
+PTHREAD_CREATE_DETACHED
+.br
+PTHREAD_CREATE_JOINABLE
+.br
+PTHREAD_EXPLICIT_SCHED
+.br
+PTHREAD_INHERIT_SCHED
+.br
+.sp
+PTHREAD_MUTEX_DEFAULT
+.br
+PTHREAD_MUTEX_ERRORCHECK
+.br
+.sp
+PTHREAD_MUTEX_INITIALIZER
+.br
+.sp
+PTHREAD_MUTEX_NORMAL
+.br
+PTHREAD_MUTEX_RECURSIVE
+.br
+.sp
+PTHREAD_ONCE_INIT
+.br
+.sp
+PTHREAD_PRIO_INHERIT
+.br
+.sp
+.sp
+PTHREAD_PRIO_NONE
+.br
+.sp
+.sp
+PTHREAD_PRIO_PROTECT
+.br
+.sp
+PTHREAD_PROCESS_SHARED
+.br
+PTHREAD_PROCESS_PRIVATE
+.br
+.sp
+PTHREAD_SCOPE_PROCESS
+.br
+PTHREAD_SCOPE_SYSTEM
+.br
+.sp
+.LP
+The following types shall be defined as described in \fI<sys/types.h>\fP
+:
+.LP
+.sp
+\fBpthread_attr_t\fP
+.br
+.sp
+\fBpthread_barrier_t\fP
+.br
+\fBpthread_barrierattr_t\fP
+.br
+.sp
+\fBpthread_cond_t\fP
+.br
+\fBpthread_condattr_t\fP
+.br
+\fBpthread_key_t\fP
+.br
+\fBpthread_mutex_t\fP
+.br
+\fBpthread_mutexattr_t\fP
+.br
+\fBpthread_once_t\fP
+.br
+\fBpthread_rwlock_t\fP
+.br
+\fBpthread_rwlockattr_t\fP
+.br
+.sp
+\fBpthread_spinlock_t\fP
+.br
+.sp
+\fBpthread_t\fP
+.br
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBint pthread_atfork(void (*)(void), void (*)(void),
+ void(*)(void));
+int pthread_attr_destroy(pthread_attr_t *);
+int pthread_attr_getdetachstate(const pthread_attr_t *, int *);
+
+int pthread_attr_getguardsize(const pthread_attr_t *restrict,
+ size_t *restrict);
+
+
+int pthread_attr_getinheritsched(const pthread_attr_t *restrict,
+ int *restrict);
+
+int pthread_attr_getschedparam(const pthread_attr_t *restrict,
+ struct sched_param *restrict);
+
+int pthread_attr_getschedpolicy(const pthread_attr_t *restrict,
+ int *restrict);
+
+
+int pthread_attr_getscope(const pthread_attr_t *restrict,
+ int *restrict);
+
+
+int pthread_attr_getstack(const pthread_attr_t *restrict,
+ void **restrict, size_t *restrict);
+
+
+int pthread_attr_getstackaddr(const pthread_attr_t *restrict,
+ void **restrict);
+
+
+int pthread_attr_getstacksize(const pthread_attr_t *restrict,
+ size_t *restrict);
+
+int pthread_attr_init(pthread_attr_t *);
+int pthread_attr_setdetachstate(pthread_attr_t *, int);
+
+int pthread_attr_setguardsize(pthread_attr_t *, size_t);
+
+
+int pthread_attr_setinheritsched(pthread_attr_t *, int);
+
+int pthread_attr_setschedparam(pthread_attr_t *restrict,
+ const struct sched_param *restrict);
+
+int pthread_attr_setschedpolicy(pthread_attr_t *, int);
+int pthread_attr_setscope(pthread_attr_t *, int);
+
+
+int pthread_attr_setstack(pthread_attr_t *, void *, size_t);
+
+
+int pthread_attr_setstackaddr(pthread_attr_t *, void *);
+
+
+int pthread_attr_setstacksize(pthread_attr_t *, size_t);
+
+
+int pthread_barrier_destroy(pthread_barrier_t *);
+int pthread_barrier_init(pthread_barrier_t *restrict,
+ const pthread_barrierattr_t *restrict, unsigned);
+int pthread_barrier_wait(pthread_barrier_t *);
+int pthread_barrierattr_destroy(pthread_barrierattr_t *);
+
+
+int pthread_barrierattr_getpshared(
+ const pthread_barrierattr_t *restrict, int *restrict);
+
+
+int pthread_barrierattr_init(pthread_barrierattr_t *);
+
+
+int pthread_barrierattr_setpshared(pthread_barrierattr_t *, int);
+
+int pthread_cancel(pthread_t);
+void pthread_cleanup_push(void (*)(void *), void *);
+void pthread_cleanup_pop(int);
+int pthread_cond_broadcast(pthread_cond_t *);
+int pthread_cond_destroy(pthread_cond_t *);
+int pthread_cond_init(pthread_cond_t *restrict,
+ const pthread_condattr_t *restrict);
+int pthread_cond_signal(pthread_cond_t *);
+int pthread_cond_timedwait(pthread_cond_t *restrict,
+ pthread_mutex_t *restrict, const struct timespec *restrict);
+int pthread_cond_wait(pthread_cond_t *restrict,
+ pthread_mutex_t *restrict);
+int pthread_condattr_destroy(pthread_condattr_t *);
+
+int pthread_condattr_getclock(const pthread_condattr_t *restrict,
+ clockid_t *restrict);
+
+
+int pthread_condattr_getpshared(const pthread_condattr_t *restrict,
+ int *restrict);
+
+int pthread_condattr_init(pthread_condattr_t *);
+
+int pthread_condattr_setclock(pthread_condattr_t *, clockid_t);
+
+
+int pthread_condattr_setpshared(pthread_condattr_t *, int);
+
+int pthread_create(pthread_t *restrict, const pthread_attr_t *restrict,
+ void *(*)(void *), void *restrict);
+int pthread_detach(pthread_t);
+int pthread_equal(pthread_t, pthread_t);
+void pthread_exit(void *);
+
+int pthread_getconcurrency(void);
+
+
+int pthread_getcpuclockid(pthread_t, clockid_t *);
+
+
+int pthread_getschedparam(pthread_t, int *restrict,
+ struct sched_param *restrict);
+
+void *pthread_getspecific(pthread_key_t);
+int pthread_join(pthread_t, void **);
+int pthread_key_create(pthread_key_t *, void (*)(void *));
+int pthread_key_delete(pthread_key_t);
+int pthread_mutex_destroy(pthread_mutex_t *);
+
+int pthread_mutex_getprioceiling(const pthread_mutex_t *restrict,
+ int *restrict);
+
+int pthread_mutex_init(pthread_mutex_t *restrict,
+ const pthread_mutexattr_t *restrict);
+int pthread_mutex_lock(pthread_mutex_t *);
+
+int pthread_mutex_setprioceiling(pthread_mutex_t *restrict, int,
+ int *restrict);
+
+
+int pthread_mutex_timedlock(pthread_mutex_t *,
+ const struct timespec *);
+
+int pthread_mutex_trylock(pthread_mutex_t *);
+int pthread_mutex_unlock(pthread_mutex_t *);
+int pthread_mutexattr_destroy(pthread_mutexattr_t *);
+
+int pthread_mutexattr_getprioceiling(
+ const pthread_mutexattr_t *restrict, int *restrict);
+
+
+int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *restrict,
+ int *restrict);
+
+
+int pthread_mutexattr_getpshared(const pthread_mutexattr_t *restrict,
+ int *restrict);
+
+
+int pthread_mutexattr_gettype(const pthread_mutexattr_t *restrict,
+ int *restrict);
+
+int pthread_mutexattr_init(pthread_mutexattr_t *);
+
+int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *, int);
+
+
+int pthread_mutexattr_setprotocol(pthread_mutexattr_t *, int);
+
+
+int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int);
+
+
+int pthread_mutexattr_settype(pthread_mutexattr_t *, int);
+
+int pthread_once(pthread_once_t *, void (*)(void));
+int pthread_rwlock_destroy(pthread_rwlock_t *);
+int pthread_rwlock_init(pthread_rwlock_t *restrict,
+ const pthread_rwlockattr_t *restrict);
+int pthread_rwlock_rdlock(pthread_rwlock_t *);
+
+int pthread_rwlock_timedrdlock(pthread_rwlock_t *restrict,
+ const struct timespec *restrict);
+int pthread_rwlock_timedwrlock(pthread_rwlock_t *restrict,
+ const struct timespec *restrict);
+
+int pthread_rwlock_tryrdlock(pthread_rwlock_t *);
+int pthread_rwlock_trywrlock(pthread_rwlock_t *);
+int pthread_rwlock_unlock(pthread_rwlock_t *);
+int pthread_rwlock_wrlock(pthread_rwlock_t *);
+int pthread_rwlockattr_destroy(pthread_rwlockattr_t *);
+
+int pthread_rwlockattr_getpshared(
+ const pthread_rwlockattr_t *restrict, int *restrict);
+
+int pthread_rwlockattr_init(pthread_rwlockattr_t *);
+
+int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int);
+
+pthread_t
+ pthread_self(void);
+int pthread_setcancelstate(int, int *);
+int pthread_setcanceltype(int, int *);
+
+int pthread_setconcurrency(int);
+
+
+int pthread_setschedparam(pthread_t, int,
+ const struct sched_param *);
+
+
+int pthread_setschedprio(pthread_t, int);
+
+int pthread_setspecific(pthread_key_t, const void *);
+
+int pthread_spin_destroy(pthread_spinlock_t *);
+int pthread_spin_init(pthread_spinlock_t *, int);
+int pthread_spin_lock(pthread_spinlock_t *);
+int pthread_spin_trylock(pthread_spinlock_t *);
+int pthread_spin_unlock(pthread_spinlock_t *);
+
+void pthread_testcancel(void);
+\fP
+.fi
+.RE
+.LP
+Inclusion of the \fI<pthread.h>\fP header shall make symbols defined
+in the headers \fI<sched.h>\fP and \fI<time.h>\fP visible.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<sched.h>\fP, \fI<sys/types.h>\fP, \fI<time.h>\fP, the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIpthread_attr_getguardsize\fP(),
+\fIpthread_attr_init\fP(), \fIpthread_attr_setscope\fP(), \fIpthread_barrier_destroy\fP(),
+\fIpthread_barrier_init\fP(), \fIpthread_barrier_wait\fP(), \fIpthread_barrierattr_destroy\fP(),
+\fIpthread_barrierattr_getpshared\fP(), \fIpthread_barrierattr_init\fP(),
+\fIpthread_barrierattr_setpshared\fP(), \fIpthread_cancel\fP(), \fIpthread_cleanup_pop\fP(),
+\fIpthread_cond_init\fP(), \fIpthread_cond_signal\fP(), \fIpthread_cond_wait\fP(),
+\fIpthread_condattr_getclock\fP(), \fIpthread_condattr_init\fP(),
+\fIpthread_condattr_setclock\fP(), \fIpthread_create\fP(), \fIpthread_detach\fP(),
+\fIpthread_equal\fP(), \fIpthread_exit\fP(),
+\fIpthread_getconcurrency\fP(), \fIpthread_getcpuclockid\fP(), \fIpthread_getschedparam\fP(),
+\fIpthread_join\fP(), \fIpthread_key_create\fP(), \fIpthread_key_delete\fP(),
+\fIpthread_mutex_init\fP(), \fIpthread_mutex_lock\fP(), \fIpthread_mutex_setprioceiling\fP(),
+\fIpthread_mutex_timedlock\fP(), \fIpthread_mutexattr_init\fP(), \fIpthread_mutexattr_gettype\fP(),
+\fIpthread_mutexattr_setprotocol\fP(), \fIpthread_once\fP(), \fIpthread_rwlock_destroy\fP(),
+\fIpthread_rwlock_init\fP(), \fIpthread_rwlock_rdlock\fP(), \fIpthread_rwlock_timedrdlock\fP(),
+\fIpthread_rwlock_timedwrlock\fP(), \fIpthread_rwlock_tryrdlock\fP(),
+\fIpthread_rwlock_trywrlock\fP(), \fIpthread_rwlock_unlock\fP(), \fIpthread_rwlock_wrlock\fP(),
+\fIpthread_rwlockattr_destroy\fP(), \fIpthread_rwlockattr_getpshared\fP(),
+\fIpthread_rwlockattr_init\fP(), \fIpthread_rwlockattr_setpshared\fP(),
+\fIpthread_self\fP(), \fIpthread_setcancelstate\fP(), \fIpthread_setspecific\fP(),
+\fIpthread_spin_destroy\fP(), \fIpthread_spin_init\fP(), \fIpthread_spin_lock\fP(),
+\fIpthread_spin_trylock\fP(), \fIpthread_spin_unlock\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/pwd.h.0p b/man-pages-posix-2003/man0p/pwd.h.0p
new file mode 100644
index 0000000..0dcb3ff
--- /dev/null
+++ b/man-pages-posix-2003/man0p/pwd.h.0p
@@ -0,0 +1,76 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<pwd.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <pwd.h>
+.SH NAME
+pwd.h \- password structure
+.SH SYNOPSIS
+.LP
+\fB#include <pwd.h>\fP
+.SH DESCRIPTION
+.LP
+The \fI<pwd.h>\fP header shall provide a definition for \fBstruct
+passwd\fP, which shall include at least the following
+members:
+.sp
+.RS
+.nf
+
+\fBchar *pw_name \fP User's login name. \fB
+uid_t pw_uid \fP Numerical user ID. \fB
+gid_t pw_gid \fP Numerical group ID. \fB
+char *pw_dir \fP Initial working directory. \fB
+char *pw_shell \fP Program to use as shell. \fB
+\fP
+.fi
+.RE
+.LP
+The \fBgid_t\fP and \fBuid_t\fP types shall be defined as described
+in \fI<sys/types.h>\fP .
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBstruct passwd *getpwnam(const char *);
+struct passwd *getpwuid(uid_t);
+
+int getpwnam_r(const char *, struct passwd *, char *,
+ size_t, struct passwd **);
+int getpwuid_r(uid_t, struct passwd *, char *,
+ size_t, struct passwd **);
+
+
+void endpwent(void);
+struct passwd *getpwent(void);
+void setpwent(void);
+
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<sys/types.h>\fP, the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+\fIendpwent\fP(), \fIgetpwnam\fP(), \fIgetpwuid\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/regex.h.0p b/man-pages-posix-2003/man0p/regex.h.0p
new file mode 100644
index 0000000..cd6e74a
--- /dev/null
+++ b/man-pages-posix-2003/man0p/regex.h.0p
@@ -0,0 +1,164 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<regex.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <regex.h>
+.SH NAME
+regex.h \- regular expression matching types
+.SH SYNOPSIS
+.LP
+\fB#include <regex.h>\fP
+.SH DESCRIPTION
+.LP
+The \fI<regex.h>\fP header shall define the structures and symbolic
+constants used by the \fIregcomp\fP(), \fIregexec\fP(), \fIregerror\fP(),
+and \fIregfree\fP() functions.
+.LP
+The structure type \fBregex_t\fP shall contain at least the following
+member:
+.sp
+.RS
+.nf
+
+\fBsize_t re_nsub \fP Number of parenthesized subexpressions. \fB
+\fP
+.fi
+.RE
+.LP
+The type \fBsize_t\fP shall be defined as described in \fI<sys/types.h>\fP
+\&.
+.LP
+The type \fBregoff_t\fP shall be defined as a signed integer type
+that can hold the largest value that can be stored in either
+a type \fBoff_t\fP or type \fBssize_t\fP. The structure type \fBregmatch_t\fP
+shall contain at least the following members:
+.sp
+.RS
+.nf
+
+\fBregoff_t rm_so \fP Byte offset from start of string \fB
+ \fP to start of substring. \fB
+regoff_t rm_eo \fP Byte offset from start of string of the \fB
+ \fP first character after the end of substring. \fB
+\fP
+.fi
+.RE
+.LP
+Values for the \fIcflags\fP parameter to the \fIregcomp\fP() function
+are as
+follows:
+.TP 7
+REG_EXTENDED
+Use Extended Regular Expressions.
+.TP 7
+REG_ICASE
+Ignore case in match.
+.TP 7
+REG_NOSUB
+Report only success or fail in \fIregexec\fP().
+.TP 7
+REG_NEWLINE
+Change the handling of <newline>.
+.sp
+.LP
+Values for the \fIeflags\fP parameter to the \fIregexec\fP() function
+are as
+follows:
+.TP 7
+REG_NOTBOL
+The circumflex character ( \fB'^'\fP ), when taken as a special character,
+does not match the beginning of
+\fIstring\fP.
+.TP 7
+REG_NOTEOL
+The dollar sign ( \fB'$'\fP ), when taken as a special character,
+does not match the end of \fIstring\fP.
+.sp
+.LP
+The following constants shall be defined as error return values:
+.TP 7
+REG_NOMATCH
+\fIregexec\fP() failed to match.
+.TP 7
+REG_BADPAT
+Invalid regular expression.
+.TP 7
+REG_ECOLLATE
+Invalid collating element referenced.
+.TP 7
+REG_ECTYPE
+Invalid character class type referenced.
+.TP 7
+REG_EESCAPE
+Trailing \fB'\\'\fP in pattern.
+.TP 7
+REG_ESUBREG
+Number in \\\fIdigit\fP invalid or in error.
+.TP 7
+REG_EBRACK
+\fB"[]"\fP imbalance.
+.TP 7
+REG_EPAREN
+\fB"\\(\\)"\fP or \fB"()"\fP imbalance.
+.TP 7
+REG_EBRACE
+\fB"\\{\\}"\fP imbalance.
+.TP 7
+REG_BADBR
+Content of \fB"\\{\\}"\fP invalid: not a number, number too large,
+more than two numbers, first larger than second.
+.TP 7
+REG_ERANGE
+Invalid endpoint in range expression.
+.TP 7
+REG_ESPACE
+Out of memory.
+.TP 7
+REG_BADRPT
+\fB'?'\fP, \fB'*'\fP, or \fB'+'\fP not preceded by valid regular
+expression.
+.TP 7
+REG_ENOSYS
+Reserved.
+.sp
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBint regcomp(regex_t *restrict, const char *restrict, int);
+size_t regerror(int, const regex_t *restrict, char *restrict, size_t);
+int regexec(const regex_t *restrict, const char *restrict, size_t,
+ regmatch_t[restrict], int);
+void regfree(regex_t *);
+\fP
+.fi
+.RE
+.LP
+The implementation may define additional macros or constants using
+names beginning with REG_.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<sys/types.h>\fP, the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+\fIregcomp\fP(), the Shell and Utilities volume of IEEE\ Std\ 1003.1-2001
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/resource.h.0p b/man-pages-posix-2003/man0p/resource.h.0p
new file mode 100644
index 0000000..8790e2d
--- /dev/null
+++ b/man-pages-posix-2003/man0p/resource.h.0p
@@ -0,0 +1 @@
+.so man0p/sys_resource.h.0p
diff --git a/man-pages-posix-2003/man0p/sched.h.0p b/man-pages-posix-2003/man0p/sched.h.0p
new file mode 100644
index 0000000..a2d8b5a
--- /dev/null
+++ b/man-pages-posix-2003/man0p/sched.h.0p
@@ -0,0 +1,118 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<sched.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <sched.h>
+.SH NAME
+sched.h \- execution scheduling (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <sched.h> \fP
+.SH DESCRIPTION
+.LP
+The \fI<sched.h>\fP header shall define the \fBsched_param\fP structure,
+which contains the scheduling parameters
+required for implementation of each supported scheduling policy. This
+structure shall contain at least the following member:
+.sp
+.RS
+.nf
+
+\fBint sched_priority \fP Process execution scheduling priority. \fB
+\fP
+.fi
+.RE
+.LP
+In addition, if _POSIX_SPORADIC_SERVER or _POSIX_THREAD_SPORADIC_SERVER
+is defined, the \fBsched_param\fP structure defined in
+\fI<sched.h>\fP shall contain the following members in addition to
+those specified above:
+.sp
+.RS
+.nf
+
+\fBint sched_ss_low_priority\fP Low scheduling priority for \fB
+ \fP sporadic server. \fB
+struct timespec sched_ss_repl_period \fP Replenishment period for \fB
+ \fP sporadic server. \fB
+struct timespec sched_ss_init_budget \fP Initial budget for sporadic server. \fB
+int sched_ss_max_repl \fP Maximum pending replenishments for \fB
+ \fP sporadic server. \fB
+\fP
+.fi
+.RE
+.LP
+Each process is controlled by an associated scheduling policy and
+priority. Associated with each policy is a priority range.
+Each policy definition specifies the minimum priority range for that
+policy. The priority ranges for each policy may overlap the
+priority ranges of other policies.
+.LP
+Four scheduling policies are defined; others may be defined by the
+implementation. The four standard policies are indicated by
+the values of the following symbolic constants:
+.TP 7
+SCHED_FIFO
+First in-first out (FIFO) scheduling policy.
+.TP 7
+SCHED_RR
+Round robin scheduling policy.
+.TP 7
+SCHED_SPORADIC
+Sporadic server scheduling policy.
+.TP 7
+SCHED_OTHER
+Another scheduling policy.
+.sp
+.LP
+The values of these constants are distinct.
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fB
+int sched_get_priority_max(int);
+int sched_get_priority_min(int);
+
+int sched_getparam(pid_t, struct sched_param *);
+int sched_getscheduler(pid_t);
+
+int sched_rr_get_interval(pid_t, struct timespec *);
+
+int sched_setparam(pid_t, const struct sched_param *);
+int sched_setscheduler(pid_t, int, const struct sched_param *);
+
+int sched_yield(void);
+
+
+\fP
+.fi
+.RE
+.LP
+Inclusion of the \fI<sched.h>\fP header may make visible all symbols
+from the \fI<time.h>\fP header.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<time.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/search.h.0p b/man-pages-posix-2003/man0p/search.h.0p
new file mode 100644
index 0000000..64682b2
--- /dev/null
+++ b/man-pages-posix-2003/man0p/search.h.0p
@@ -0,0 +1,90 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<search.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <search.h>
+.SH NAME
+search.h \- search tables
+.SH SYNOPSIS
+.LP
+\fB#include <search.h> \fP
+.SH DESCRIPTION
+.LP
+The \fI<search.h>\fP header shall define the \fBENTRY\fP type for
+structure \fBentry\fP which shall include the
+following members:
+.sp
+.RS
+.nf
+
+\fBchar *key
+void *data
+\fP
+.fi
+.RE
+.LP
+and shall define \fBACTION\fP and \fBVISIT\fP as enumeration data
+types through type definitions as follows:
+.sp
+.RS
+.nf
+
+\fBenum { FIND, ENTER } ACTION;
+enum { preorder, postorder, endorder, leaf } VISIT;
+\fP
+.fi
+.RE
+.LP
+The \fBsize_t\fP type shall be defined as described in \fI<sys/types.h>\fP
+\&.
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBint hcreate(size_t);
+void hdestroy(void);
+ENTRY *hsearch(ENTRY, ACTION);
+void insque(void *, void *);
+void *lfind(const void *, const void *, size_t *,
+ size_t, int (*)(const void *, const void *));
+void *lsearch(const void *, void *, size_t *,
+ size_t, int (*)(const void *, const void *));
+void remque(void *);
+void *tdelete(const void *restrict, void **restrict,
+ int(*)(const void *, const void *));
+void *tfind(const void *, void *const *,
+ int(*)(const void *, const void *));
+void *tsearch(const void *, void **,
+ int(*)(const void *, const void *));
+void twalk(const void *,
+ void (*)(const void *, VISIT, int ));
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<sys/types.h>\fP, the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+\fIhcreate\fP(), \fIinsque\fP(), \fIlsearch\fP(), \fIremque\fP(),
+\fItsearch\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/select.h.0p b/man-pages-posix-2003/man0p/select.h.0p
new file mode 100644
index 0000000..622fe52
--- /dev/null
+++ b/man-pages-posix-2003/man0p/select.h.0p
@@ -0,0 +1 @@
+.so man0p/sys_select.h.0p
diff --git a/man-pages-posix-2003/man0p/sem.h.0p b/man-pages-posix-2003/man0p/sem.h.0p
new file mode 100644
index 0000000..779dc52
--- /dev/null
+++ b/man-pages-posix-2003/man0p/sem.h.0p
@@ -0,0 +1 @@
+.so man0p/sys_sem.h.0p
diff --git a/man-pages-posix-2003/man0p/semaphore.h.0p b/man-pages-posix-2003/man0p/semaphore.h.0p
new file mode 100644
index 0000000..ae8017a
--- /dev/null
+++ b/man-pages-posix-2003/man0p/semaphore.h.0p
@@ -0,0 +1,67 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<semaphore.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <semaphore.h>
+.SH NAME
+semaphore.h \- semaphores (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <semaphore.h> \fP
+.SH DESCRIPTION
+.LP
+The \fI<semaphore.h>\fP header shall define the \fBsem_t\fP type,
+used in performing semaphore operations. The semaphore
+may be implemented using a file descriptor, in which case applications
+are able to open up at least a total of {OPEN_MAX} files and
+semaphores. The symbol SEM_FAILED shall be defined (see \fIsem_open\fP()).
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBint sem_close(sem_t *);
+int sem_destroy(sem_t *);
+int sem_getvalue(sem_t *restrict, int *restrict);
+int sem_init(sem_t *, int, unsigned);
+sem_t *sem_open(const char *, int, ...);
+int sem_post(sem_t *);
+
+int sem_timedwait(sem_t *restrict, const struct timespec *restrict);
+
+int sem_trywait(sem_t *);
+int sem_unlink(const char *);
+int sem_wait(sem_t *);
+\fP
+.fi
+.RE
+.LP
+Inclusion of the \fI<semaphore.h>\fP header may make visible symbols
+defined in the headers \fI<fcntl.h>\fP and \fI<sys/types.h>\fP.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<fcntl.h>\fP, \fI<sys/types.h>\fP, the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIsem_destroy\fP(),
+\fIsem_getvalue\fP(), \fIsem_init\fP(), \fIsem_open\fP(), \fIsem_post\fP(),
+\fIsem_timedwait\fP(), \fIsem_trywait\fP(), \fIsem_unlink\fP(), \fIsem_wait\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/setjmp.h.0p b/man-pages-posix-2003/man0p/setjmp.h.0p
new file mode 100644
index 0000000..56c979e
--- /dev/null
+++ b/man-pages-posix-2003/man0p/setjmp.h.0p
@@ -0,0 +1,78 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<setjmp.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <setjmp.h>
+.SH NAME
+setjmp.h \- stack environment declarations
+.SH SYNOPSIS
+.LP
+\fB#include <setjmp.h>\fP
+.SH DESCRIPTION
+.LP
+Some of the functionality described on this reference page extends
+the ISO\ C standard. Applications shall define
+the appropriate feature test macro (see the System Interfaces volume
+of IEEE\ Std\ 1003.1-2001, Section 2.2, The Compilation Environment)
+to enable the visibility of these symbols in this
+header.
+.LP
+The \fI<setjmp.h>\fP header shall define the array types \fBjmp_buf\fP
+and \fBsigjmp_buf\fP.
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBvoid longjmp(jmp_buf, int);
+
+void siglongjmp(sigjmp_buf, int);
+
+
+void _longjmp(jmp_buf, int);
+
+\fP
+.fi
+.RE
+.LP
+The following may be declared as a function, or defined as a macro,
+or both. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBint setjmp(jmp_buf);
+
+int sigsetjmp(sigjmp_buf, int);
+
+
+int _setjmp(jmp_buf);
+
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIlongjmp\fP(),
+\fI_longjmp\fP(), \fIsetjmp\fP(), \fIsiglongjmp\fP(), \fIsigsetjmp\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/shm.h.0p b/man-pages-posix-2003/man0p/shm.h.0p
new file mode 100644
index 0000000..7d34a0d
--- /dev/null
+++ b/man-pages-posix-2003/man0p/shm.h.0p
@@ -0,0 +1 @@
+.so man0p/sys_shm.h.0p
diff --git a/man-pages-posix-2003/man0p/signal.h.0p b/man-pages-posix-2003/man0p/signal.h.0p
new file mode 100644
index 0000000..01248a6
--- /dev/null
+++ b/man-pages-posix-2003/man0p/signal.h.0p
@@ -0,0 +1,788 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<signal.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <signal.h>
+.SH NAME
+signal.h \- signals
+.SH SYNOPSIS
+.LP
+\fB#include <signal.h>\fP
+.SH DESCRIPTION
+.LP
+Some of the functionality described on this reference page extends
+the ISO\ C standard. Applications shall define
+the appropriate feature test macro (see the System Interfaces volume
+of IEEE\ Std\ 1003.1-2001, Section 2.2, The Compilation Environment)
+to enable the visibility of these symbols in this
+header.
+.LP
+The \fI<signal.h>\fP header shall define the following symbolic constants,
+each of which expands to a distinct constant
+expression of the type:
+.sp
+.RS
+.nf
+
+\fBvoid (*)(int)
+\fP
+.fi
+.RE
+.LP
+whose value matches no declarable function.
+.TP 7
+SIG_DFL
+Request for default signal handling.
+.TP 7
+SIG_ERR
+Return value from \fIsignal\fP() in case of error.
+.TP 7
+SIG_HOLD
+Request that signal be held.
+.TP 7
+SIG_IGN
+Request that signal be ignored.
+.sp
+.LP
+The following data types shall be defined through \fBtypedef\fP:
+.TP 7
+\fBsig_atomic_t\fP
+Possibly volatile-qualified integer type of an object that can be
+accessed as an atomic entity, even in the presence of
+asynchronous interrupts.
+.TP 7
+\fBsigset_t\fP
+Integer or structure type of an object used to represent sets of signals.
+.TP 7
+\fBpid_t\fP
+As
+described in \fI<sys/types.h>\fP .
+.sp
+.LP
+The \fI<signal.h>\fP header shall define the \fBsigevent\fP structure,
+which has at least the following members:
+.sp
+.RS
+.nf
+
+\fBint sigev_notify \fP Notification type. \fB
+int sigev_signo \fP Signal number. \fB
+union sigval sigev_value \fP Signal value. \fB
+void(*)(union sigval) sigev_notify_function \fP Notification function. \fB
+(pthread_attr_t *) sigev_notify_attributes\fP Notification attributes. \fB
+\fP
+.fi
+.RE
+.LP
+The following values of \fIsigev_notify\fP shall be defined:
+.TP 7
+SIGEV_NONE
+No asynchronous notification is delivered when the event of interest
+occurs.
+.TP 7
+SIGEV_SIGNAL
+A queued signal, with an application-defined value, is generated when
+the event of interest occurs.
+.TP 7
+SIGEV_THREAD
+A notification function is called to perform notification.
+.sp
+.LP
+The \fBsigval\fP union shall be defined as:
+.sp
+.RS
+.nf
+
+\fBint sival_int \fP Integer signal value. \fB
+void *sival_ptr \fP Pointer signal value. \fB
+\fP
+.fi
+.RE
+.LP
+This header shall also declare the macros SIGRTMIN and SIGRTMAX, which
+evaluate to integer expressions, and specify a range of
+signal numbers that are reserved for application use and for which
+the realtime signal behavior specified in this volume of
+IEEE\ Std\ 1003.1-2001 is supported. The signal numbers in this range
+do not overlap any of the signals specified in the
+following table.
+.LP
+The range SIGRTMIN through SIGRTMAX inclusive shall include at least
+{RTSIG_MAX} signal numbers.
+.LP
+It is implementation-defined whether realtime signal behavior is supported
+for other signals.
+.LP
+This header also declares the constants that are used to refer to
+the signals that occur in the system. Signals defined here
+begin with the letters SIG. Each of the signals have distinct positive
+integer values. The value 0 is reserved for use as the null
+signal (see \fIkill\fP()). Additional implementation-defined signals
+may occur in the
+system.
+.LP
+The
+ISO\ C standard only requires the signal names SIGABRT, SIGFPE, SIGILL,
+SIGINT, SIGSEGV, and SIGTERM to be defined.
+.LP
+The following signals shall be supported on all implementations (default
+actions are explained below the table):
+.TS C
+center; l1 l1 lw(40).
+\fBSignal\fP \fBDefault Action\fP T{
+.na
+\fBDescription\fP
+.ad
+T}
+SIGABRT A T{
+.na
+Process abort signal.
+.ad
+T}
+SIGALRM T T{
+.na
+Alarm clock.
+.ad
+T}
+SIGBUS A T{
+.na
+Access to an undefined portion of a memory object.
+.ad
+T}
+SIGCHLD I T{
+.na
+Child process terminated, stopped,
+.ad
+T}
+\ \ T{
+.na
+or continued.
+.ad
+T}
+SIGCONT C T{
+.na
+Continue executing, if stopped.
+.ad
+T}
+SIGFPE A T{
+.na
+Erroneous arithmetic operation.
+.ad
+T}
+SIGHUP T T{
+.na
+Hangup.
+.ad
+T}
+SIGILL A T{
+.na
+Illegal instruction.
+.ad
+T}
+SIGINT T T{
+.na
+Terminal interrupt signal.
+.ad
+T}
+SIGKILL T T{
+.na
+Kill (cannot be caught or ignored).
+.ad
+T}
+SIGPIPE T T{
+.na
+Write on a pipe with no one to read it.
+.ad
+T}
+SIGQUIT A T{
+.na
+Terminal quit signal.
+.ad
+T}
+SIGSEGV A T{
+.na
+Invalid memory reference.
+.ad
+T}
+SIGSTOP S T{
+.na
+Stop executing (cannot be caught or ignored).
+.ad
+T}
+SIGTERM T T{
+.na
+Termination signal.
+.ad
+T}
+SIGTSTP S T{
+.na
+Terminal stop signal.
+.ad
+T}
+SIGTTIN S T{
+.na
+Background process attempting read.
+.ad
+T}
+SIGTTOU S T{
+.na
+Background process attempting write.
+.ad
+T}
+SIGUSR1 T T{
+.na
+User-defined signal 1.
+.ad
+T}
+SIGUSR2 T T{
+.na
+User-defined signal 2.
+.ad
+T}
+SIGPOLL T T{
+.na
+Pollable event.
+.ad
+T}
+SIGPROF T T{
+.na
+Profiling timer expired.
+.ad
+T}
+SIGSYS A T{
+.na
+Bad system call.
+.ad
+T}
+SIGTRAP A T{
+.na
+Trace/breakpoint trap.
+.ad
+T}
+SIGURG I T{
+.na
+High bandwidth data is available at a socket.
+.ad
+T}
+SIGVTALRM T T{
+.na
+Virtual timer expired.
+.ad
+T}
+SIGXCPU A T{
+.na
+CPU time limit exceeded.
+.ad
+T}
+SIGXFSZ A T{
+.na
+File size limit exceeded.
+.ad
+T}
+.TE
+.LP
+The default actions are as follows:
+.TP 7
+T
+Abnormal termination of the process. The process is terminated with
+all the consequences of \fI_exit\fP() except that the status made
+available to \fIwait\fP() and \fIwaitpid\fP() indicates abnormal
+termination by the specified signal.
+.TP 7
+A
+Abnormal termination of the process.
+.br
+Additionally, implementation-defined abnormal termination actions,
+such as creation of a \fBcore\fP file, may occur.
+.TP 7
+I
+Ignore the signal.
+.TP 7
+S
+Stop the process.
+.TP 7
+C
+Continue the process, if it is stopped; otherwise, ignore the signal.
+.sp
+.sp
+.LP
+The
+header shall provide a declaration of \fBstruct sigaction\fP, including
+at least the following members:
+.sp
+.RS
+.nf
+
+\fBvoid (*sa_handler)(int) \fP Pointer to a signal-catching function or one of the macros \fB
+ \fP SIG_IGN or SIG_DFL. \fB
+sigset_t sa_mask \fP Set of signals to be blocked during execution of the signal \fB
+ \fP handling function. \fB
+int sa_flags \fP Special flags. \fB
+void (*sa_sigaction)(int, siginfo_t *, void *)
+ \fP Pointer to a signal-catching function. \fB
+\fP
+.fi
+.RE
+.LP
+The storage occupied by \fIsa_handler\fP and \fIsa_sigaction\fP may
+overlap, and a conforming application shall not use both
+simultaneously.
+.LP
+The following shall be declared as constants:
+.TP 7
+SA_NOCLDSTOP
+Do
+not generate SIGCHLD when children stop
+.br
+or
+stopped children continue.
+.TP 7
+SIG_BLOCK
+The resulting set is the union of the current set and the signal set
+pointed to by the argument \fIset\fP.
+.TP 7
+SIG_UNBLOCK
+The resulting set is the intersection of the current set and the complement
+of the signal set pointed to by the argument
+\fIset\fP.
+.TP 7
+SIG_SETMASK
+The resulting set is the signal set pointed to by the argument \fIset\fP.
+.TP 7
+SA_ONSTACK
+Causes signal delivery to occur on an alternate stack.
+.TP 7
+SA_RESETHAND
+Causes signal dispositions to be set to SIG_DFL on entry to signal
+handlers.
+.TP 7
+SA_RESTART
+Causes certain functions to become restartable.
+.TP 7
+SA_SIGINFO
+Causes extra information to be passed to signal handlers at the time
+of receipt of a signal.
+.TP 7
+SA_NOCLDWAIT
+Causes implementations not to create zombie processes on child death.
+.TP 7
+SA_NODEFER
+Causes signal not to be automatically blocked on entry to signal handler.
+.TP 7
+SS_ONSTACK
+Process is executing on an alternate signal stack.
+.TP 7
+SS_DISABLE
+Alternate signal stack is disabled.
+.TP 7
+MINSIGSTKSZ
+Minimum stack size for a signal handler.
+.TP 7
+SIGSTKSZ
+Default size in bytes for the alternate signal stack.
+.sp
+.LP
+The \fBucontext_t\fP structure shall be defined through \fBtypedef\fP
+as described in \fI<ucontext.h>\fP.
+.LP
+The \fBmcontext_t\fP type shall be defined through \fBtypedef\fP as
+described in \fI<ucontext.h>\fP.
+.LP
+The \fI<signal.h>\fP header shall define the \fBstack_t\fP type as
+a structure that includes at least the following
+members:
+.sp
+.RS
+.nf
+
+\fBvoid *ss_sp \fP Stack base or pointer. \fB
+size_t ss_size \fP Stack size. \fB
+int ss_flags \fP Flags. \fB
+\fP
+.fi
+.RE
+.LP
+The \fI<signal.h>\fP header shall define the \fBsigstack\fP structure
+that includes at least the following members:
+.sp
+.RS
+.nf
+
+\fBint ss_onstack \fP Non-zero when signal stack is in use. \fB
+void *ss_sp \fP Signal stack pointer. \fB
+\fP
+.fi
+.RE
+.LP
+The
+\fI<signal.h>\fP header shall define the \fBsiginfo_t\fP type as a
+structure that includes at least the following members:
+.sp
+.RS
+.nf
+
+\fB
+int si_signo \fP Signal number. \fB
+
+
+int si_errno \fP If non-zero, an \fIerrno\fP value associated with \fB
+ \fP this signal, as defined in \fB<errno.h>.\fP \fB
+
+
+int si_code \fP Signal code. \fB
+
+
+pid_t si_pid \fP Sending process ID. \fB
+uid_t si_uid \fP Real user ID of sending process. \fB
+void *si_addr \fP Address of faulting instruction. \fB
+int si_status\fP Exit value or signal. \fB
+long si_band \fP Band event for SIGPOLL. \fB
+
+
+union sigval si_value \fP Signal value. \fB
+
+\fP
+.fi
+.RE
+.LP
+The macros specified in the \fBCode\fP column of the following table
+are defined for use as values of \fIsi_code\fP that are
+\ signal-specific or non-signal-specific reasons why the signal
+was generated.
+.TS C
+center; l l lw(40).
+\fBSignal\fP \fBCode\fP T{
+.na
+\fBReason\fP
+.ad
+T}
+SIGILL ILL_ILLOPC T{
+.na
+Illegal opcode.
+.ad
+T}
+\ ILL_ILLOPN T{
+.na
+Illegal operand.
+.ad
+T}
+\ ILL_ILLADR T{
+.na
+Illegal addressing mode.
+.ad
+T}
+\ ILL_ILLTRP T{
+.na
+Illegal trap.
+.ad
+T}
+\ ILL_PRVOPC T{
+.na
+Privileged opcode.
+.ad
+T}
+\ ILL_PRVREG T{
+.na
+Privileged register.
+.ad
+T}
+\ ILL_COPROC T{
+.na
+Coprocessor error.
+.ad
+T}
+\ ILL_BADSTK T{
+.na
+Internal stack error.
+.ad
+T}
+SIGFPE FPE_INTDIV T{
+.na
+Integer divide by zero.
+.ad
+T}
+\ FPE_INTOVF T{
+.na
+Integer overflow.
+.ad
+T}
+\ FPE_FLTDIV T{
+.na
+Floating-point divide by zero.
+.ad
+T}
+\ FPE_FLTOVF T{
+.na
+Floating-point overflow.
+.ad
+T}
+\ FPE_FLTUND T{
+.na
+Floating-point underflow.
+.ad
+T}
+\ FPE_FLTRES T{
+.na
+Floating-point inexact result.
+.ad
+T}
+\ FPE_FLTINV T{
+.na
+Invalid floating-point operation.
+.ad
+T}
+\ FPE_FLTSUB T{
+.na
+Subscript out of range.
+.ad
+T}
+SIGSEGV SEGV_MAPERR T{
+.na
+Address not mapped to object.
+.ad
+T}
+\ SEGV_ACCERR T{
+.na
+Invalid permissions for mapped object.
+.ad
+T}
+SIGBUS BUS_ADRALN T{
+.na
+Invalid address alignment.
+.ad
+T}
+\ BUS_ADRERR T{
+.na
+Nonexistent physical address.
+.ad
+T}
+\ BUS_OBJERR T{
+.na
+Object-specific hardware error.
+.ad
+T}
+SIGTRAP TRAP_BRKPT T{
+.na
+Process breakpoint.
+.ad
+T}
+\ TRAP_TRACE T{
+.na
+Process trace trap.
+.ad
+T}
+SIGCHLD CLD_EXITED T{
+.na
+Child has exited.
+.ad
+T}
+\ CLD_KILLED T{
+.na
+Child has terminated abnormally and did not create a \fBcore\fP file.
+.ad
+T}
+\ CLD_DUMPED T{
+.na
+Child has terminated abnormally and created a \fBcore\fP file.
+.ad
+T}
+\ CLD_TRAPPED T{
+.na
+Traced child has trapped.
+.ad
+T}
+\ CLD_STOPPED T{
+.na
+Child has stopped.
+.ad
+T}
+\ CLD_CONTINUED T{
+.na
+Stopped child has continued.
+.ad
+T}
+SIGPOLL POLL_IN T{
+.na
+Data input available.
+.ad
+T}
+\ POLL_OUT T{
+.na
+Output buffers available.
+.ad
+T}
+\ POLL_MSG T{
+.na
+Input message available.
+.ad
+T}
+\ POLL_ERR T{
+.na
+I/O error.
+.ad
+T}
+\ POLL_PRI T{
+.na
+High priority input available.
+.ad
+T}
+\ POLL_HUP T{
+.na
+Device disconnected.
+.ad
+T}
+Any SI_USER T{
+.na
+Signal sent by \fIkill\fP().
+.ad
+T}
+\ SI_QUEUE T{
+.na
+Signal sent by the \fIsigqueue\fP().
+.ad
+T}
+\ SI_TIMER T{
+.na
+Signal generated by expiration of a timer set by \fItimer_settime\fP().
+.ad
+T}
+\ SI_ASYNCIO T{
+.na
+Signal generated by completion of an asynchronous I/O request.
+.ad
+T}
+\ SI_MESGQ T{
+.na
+Signal generated by arrival of a message on an empty message queue.
+.ad
+T}
+.TE
+.LP
+Implementations may support additional \fIsi_code\fP values not included
+in this list, may generate values included in this list
+under circumstances other than those described in this list, and may
+contain extensions or limitations that prevent some values
+from being generated. Implementations do not generate a different
+value from the ones described in this list for circumstances
+described in this list.
+.LP
+In addition, the following signal-specific information shall be available:
+.TS C
+center; l1 l1 l.
+\fBSignal\fP \fBMember\fP \fBValue\fP
+SIGILL \fBvoid * \fIsi_addr\fP\fP Address of faulting instruction.
+SIGFPE \fB\ \fP \
+SIGSEGV \fBvoid * \fIsi_addr\fP\fP Address of faulting memory reference.
+SIGBUS \fB\ \fP \
+SIGCHLD \fBpid_t \fIsi_pid\fP\fP Child process ID.
+\ \fBint \fIsi_status\fP\fP Exit value or signal.
+\ \fBuid_t \fIsi_uid\fP\fP Real user ID of the process that sent the signal.
+SIGPOLL \fBlong \fIsi_band\fP\fP Band event for POLL_IN, POLL_OUT, or POLL_MSG.
+.TE
+.LP
+For some implementations, the value of \fIsi_addr\fP may be inaccurate.
+.LP
+The following shall be declared as functions and may also be defined
+as macros:
+.sp
+.RS
+.nf
+
+\fB
+void (*bsd_signal(int, void (*)(int)))(int);
+
+
+int kill(pid_t, int);
+
+
+int killpg(pid_t, int);
+
+
+int pthread_kill(pthread_t, int);
+int pthread_sigmask(int, const sigset_t *, sigset_t *);
+
+int raise(int);
+
+int sigaction(int, const struct sigaction *restrict,
+ struct sigaction *restrict);
+int sigaddset(sigset_t *, int);
+
+
+int sigaltstack(const stack_t *restrict, stack_t *restrict);
+
+
+int sigdelset(sigset_t *, int);
+int sigemptyset(sigset_t *);
+int sigfillset(sigset_t *);
+
+
+int sighold(int);
+int sigignore(int);
+int siginterrupt(int, int);
+
+
+int sigismember(const sigset_t *, int);
+
+void (*signal(int, void (*)(int)))(int);
+
+int sigpause(int);
+
+
+int sigpending(sigset_t *);
+int sigprocmask(int, const sigset_t *restrict, sigset_t *restrict);
+
+
+int sigqueue(pid_t, int, const union sigval);
+
+
+int sigrelse(int);
+void (*sigset(int, void (*)(int)))(int);
+
+
+int sigsuspend(const sigset_t *);
+
+
+int sigtimedwait(const sigset_t *restrict, siginfo_t *restrict,
+ const struct timespec *restrict);
+
+
+int sigwait(const sigset_t *restrict, int *restrict);
+
+
+int sigwaitinfo(const sigset_t *restrict, siginfo_t *restrict);
+
+\fP
+.fi
+.RE
+.LP
+Inclusion of the \fI<signal.h>\fP header may make visible all symbols
+from the \fI<time.h>\fP header.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<errno.h>\fP, \fI<stropts.h>\fP, \fI<sys/types.h>\fP, \fI<time.h>\fP,
+\fI<ucontext.h>\fP, the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+\fIalarm\fP(), \fIbsd_signal\fP(), \fIioctl\fP(), \fIkill\fP(), \fIkillpg\fP(),
+\fIraise\fP(), \fIsigaction\fP(), \fIsigaddset\fP(), \fIsigaltstack\fP(),
+\fIsigdelset\fP(), \fIsigemptyset\fP(), \fIsigfillset\fP(), \fIsiginterrupt\fP(),
+\fIsigismember\fP(), \fIsignal\fP(), \fIsigpending\fP(), \fIsigprocmask\fP(),
+\fIsigqueue\fP(), \fIsigsuspend\fP(), \fIsigwaitinfo\fP(), \fIwait\fP(),
+\fIwaitid\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/socket.h.0p b/man-pages-posix-2003/man0p/socket.h.0p
new file mode 100644
index 0000000..0249e23
--- /dev/null
+++ b/man-pages-posix-2003/man0p/socket.h.0p
@@ -0,0 +1 @@
+.so man0p/sys_socket.h.0p
diff --git a/man-pages-posix-2003/man0p/spawn.h.0p b/man-pages-posix-2003/man0p/spawn.h.0p
new file mode 100644
index 0000000..b1f0b7b
--- /dev/null
+++ b/man-pages-posix-2003/man0p/spawn.h.0p
@@ -0,0 +1,128 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<spawn.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <spawn.h>
+.SH NAME
+spawn.h \- spawn (\fBADVANCED REALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <spawn.h> \fP
+.SH DESCRIPTION
+.LP
+The \fI<spawn.h>\fP header shall define the \fBposix_spawnattr_t\fP
+and \fBposix_spawn_file_actions_t\fP types used in
+performing spawn operations.
+.LP
+The \fI<spawn.h>\fP header shall define the flags that may be set
+in a \fBposix_spawnattr_t\fP object using the \fIposix_spawnattr_setflags\fP()
+function:
+.LP
+.sp
+POSIX_SPAWN_RESETIDS
+.br
+POSIX_SPAWN_SETPGROUP
+.br
+.sp
+POSIX_SPAWN_SETSCHEDPARAM
+.br
+POSIX_SPAWN_SETSCHEDULER
+.br
+.sp
+POSIX_SPAWN_SETSIGDEF
+.br
+POSIX_SPAWN_SETSIGMASK
+.br
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBint posix_spawn(pid_t *restrict, const char *restrict,
+ const posix_spawn_file_actions_t *,
+ const posix_spawnattr_t *restrict, char *const [restrict],
+ char *const [restrict]);
+int posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *,
+ int);
+int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *,
+ int, int);
+int posix_spawn_file_actions_addopen(posix_spawn_file_actions_t *restrict,
+ int, const char *restrict, int, mode_t);
+int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *);
+int posix_spawn_file_actions_init(posix_spawn_file_actions_t *);
+int posix_spawnattr_destroy(posix_spawnattr_t *);
+int posix_spawnattr_getsigdefault(const posix_spawnattr_t *restrict,
+ sigset_t *restrict);
+int posix_spawnattr_getflags(const posix_spawnattr_t *restrict,
+ short *restrict);
+int posix_spawnattr_getpgroup(const posix_spawnattr_t *restrict,
+ pid_t *restrict);
+
+int posix_spawnattr_getschedparam(const posix_spawnattr_t *restrict,
+ struct sched_param *restrict);
+int posix_spawnattr_getschedpolicy(const posix_spawnattr_t *restrict,
+ int *restrict);
+
+int posix_spawnattr_getsigmask(const posix_spawnattr_t *restrict,
+ sigset_t *restrict);
+int posix_spawnattr_init(posix_spawnattr_t *);
+int posix_spawnattr_setsigdefault(posix_spawnattr_t *restrict,
+ const sigset_t *restrict);
+int posix_spawnattr_setflags(posix_spawnattr_t *, short);
+int posix_spawnattr_setpgroup(posix_spawnattr_t *, pid_t);
+.sp
+
+
+int posix_spawnattr_setschedparam(posix_spawnattr_t *restrict,
+ const struct sched_param *restrict);
+int posix_spawnattr_setschedpolicy(posix_spawnattr_t *, int);
+
+int posix_spawnattr_setsigmask(posix_spawnattr_t *restrict,
+ const sigset_t *restrict);
+int posix_spawnp(pid_t *restrict, const char *restrict,
+ const posix_spawn_file_actions_t *,
+ const posix_spawnattr_t *restrict,
+ char *const [restrict], char *const [restrict]);
+\fP
+.fi
+.RE
+.LP
+Inclusion of the \fI<spawn.h>\fP header may make visible symbols defined
+in the \fI<sched.h>\fP, \fI<signal.h>\fP, and \fI<sys/types.h>\fP
+headers.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<sched.h>\fP, \fI<semaphore.h>\fP, \fI<signal.h>\fP, \fI<sys/types.h>\fP,
+the System Interfaces
+volume of IEEE\ Std\ 1003.1-2001, \fIposix_spawnattr_destroy\fP(),
+\fIposix_spawnattr_getsigdefault\fP(), \fIposix_spawnattr_getflags\fP(),
+\fIposix_spawnattr_getpgroup\fP(), \fIposix_spawnattr_getschedparam\fP(),
+\fIposix_spawnattr_getschedpolicy\fP(), \fIposix_spawnattr_getsigmask\fP(),
+\fIposix_spawnattr_init\fP(), \fIposix_spawnattr_setsigdefault\fP(),
+\fIposix_spawnattr_setflags\fP(), \fIposix_spawnattr_setpgroup\fP(),
+\fIposix_spawnattr_setschedparam\fP(), \fIposix_spawnattr_setschedpolicy\fP(),
+\fIposix_spawnattr_setsigmask\fP(), \fIposix_spawn\fP(), \fIposix_spawn_file_actions_addclose\fP(),
+\fIposix_spawn_file_actions_adddup2\fP(), \fIposix_spawn_file_actions_addopen\fP(),
+\fIposix_spawn_file_actions_destroy\fP(), \fIposix_spawn_file_actions_init\fP(),
+\fIposix_spawnp\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/stat.h.0p b/man-pages-posix-2003/man0p/stat.h.0p
new file mode 100644
index 0000000..1cec65d
--- /dev/null
+++ b/man-pages-posix-2003/man0p/stat.h.0p
@@ -0,0 +1 @@
+.so man0p/sys_stat.h.0p
diff --git a/man-pages-posix-2003/man0p/statvfs.h.0p b/man-pages-posix-2003/man0p/statvfs.h.0p
new file mode 100644
index 0000000..2150e28
--- /dev/null
+++ b/man-pages-posix-2003/man0p/statvfs.h.0p
@@ -0,0 +1 @@
+.so man0p/sys_statvfs.h.0p
diff --git a/man-pages-posix-2003/man0p/stdarg.h.0p b/man-pages-posix-2003/man0p/stdarg.h.0p
new file mode 100644
index 0000000..d84bf1c
--- /dev/null
+++ b/man-pages-posix-2003/man0p/stdarg.h.0p
@@ -0,0 +1,161 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<stdarg.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <stdarg.h>
+.SH NAME
+stdarg.h \- handle variable argument list
+.SH SYNOPSIS
+.LP
+\fB#include <stdarg.h>
+.br
+.sp
+void va_start(va_list\fP \fIap\fP\fB,\fP \fIargN\fP\fB);
+.br
+void va_copy(va_list\fP \fIdest\fP\fB, va_list\fP \fIsrc\fP\fB);
+.br
+type va_arg(va_list\fP \fIap\fP\fB,\fP \fItype\fP\fB);
+.br
+void va_end(va_list\fP \fIap\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fI<stdarg.h>\fP header shall contain a set of macros which allows
+portable functions that accept variable argument
+lists to be written. Functions that have variable argument lists (such
+as \fIprintf\fP())
+but do not use these macros are inherently non-portable, as different
+systems use different argument-passing conventions.
+.LP
+The type \fBva_list\fP shall be defined for variables used to traverse
+the list.
+.LP
+The \fIva_start\fP() macro is invoked to initialize \fIap\fP to the
+beginning of the list before any calls to
+\fIva_arg\fP().
+.LP
+The \fIva_copy\fP() macro initializes \fIdest\fP as a copy of \fIsrc\fP,
+as if the \fIva_start\fP() macro had been applied
+to \fIdest\fP followed by the same sequence of uses of the \fIva_arg\fP()
+macro as had previously been used to reach the present
+state of \fIsrc\fP. Neither the \fIva_copy\fP() nor \fIva_start\fP()
+macro shall be invoked to reinitialize \fIdest\fP without
+an intervening invocation of the \fIva_end\fP() macro for the same
+\fIdest\fP.
+.LP
+The object \fIap\fP may be passed as an argument to another function;
+if that function invokes the \fIva_arg\fP() macro with
+parameter \fIap\fP, the value of \fIap\fP in the calling function
+is unspecified and shall be passed to the \fIva_end\fP() macro
+prior to any further reference to \fIap\fP. The parameter \fIargN\fP
+is the identifier of the rightmost parameter in the variable
+parameter list in the function definition (the one just before the
+\&...). If the parameter \fIargN\fP is declared with the
+\fBregister\fP storage class, with a function type or array type,
+or with a type that is not compatible with the type that results
+after application of the default argument promotions, the behavior
+is undefined.
+.LP
+The \fIva_arg\fP() macro shall return the next argument in the list
+pointed to by \fIap\fP. Each invocation of \fIva_arg\fP()
+modifies \fIap\fP so that the values of successive arguments are returned
+in turn. The \fItype\fP parameter shall be a type name
+specified such that the type of a pointer to an object that has the
+specified type can be obtained simply by postfixing a
+\fB'*'\fP to type. If there is no actual next argument, or if \fItype\fP
+is not compatible with the type of the actual next
+argument (as promoted according to the default argument promotions),
+the behavior is undefined, except for the following cases:
+.IP " *" 3
+One type is a signed integer type, the other type is the corresponding
+unsigned integer type, and the value is representable in
+both types.
+.LP
+.IP " *" 3
+One type is a pointer to \fBvoid\fP and the other is a pointer to
+a character type.
+.LP
+.IP " *" 3
+Both types are pointers.
+.LP
+.LP
+Different types can be mixed, but it is up to the routine to know
+what type of argument is expected.
+.LP
+The \fIva_end\fP() macro is used to clean up; it invalidates \fIap\fP
+for use (unless \fIva_start\fP() or \fIva_copy\fP() is
+invoked again).
+.LP
+Each invocation of the \fIva_start\fP() and \fIva_copy\fP() macros
+shall be matched by a corresponding invocation of the
+\fIva_end\fP() macro in the same function.
+.LP
+Multiple traversals, each bracketed by \fIva_start\fP() ... \fIva_end\fP(),
+are possible.
+.SH EXAMPLES
+.LP
+This example is a possible implementation of \fIexecl\fP():
+.sp
+.RS
+.nf
+
+\fB#include <stdarg.h>
+.sp
+
+#define MAXARGS 31
+
+.sp
+
+/*
+ * execl is called by
+ * execl(file, arg1, arg2, ..., (char *)(0));
+ */
+int execl(const char *file, const char *args, ...)
+{
+ va_list ap;
+ char *array[MAXARGS +1];
+ int argno = 0;
+.sp
+
+ va_start(ap, args);
+ while (args != 0 && argno < MAXARGS)
+ {
+ array[argno++] = args;
+ args = va_arg(ap, const char *);
+ }
+ array[argno] = (char *) 0;
+ va_end(ap);
+ return execv(file, array);
+}
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+It is up to the calling routine to communicate to the called routine
+how many arguments there are, since it is not always
+possible for the called routine to determine this in any other way.
+For example, \fIexecl\fP() is passed a null pointer to signal the
+end of the list. The \fIprintf\fP() function can tell how many arguments
+are there by the \fIformat\fP argument.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIexec\fP,
+\fIprintf\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/stdbool.h.0p b/man-pages-posix-2003/man0p/stdbool.h.0p
new file mode 100644
index 0000000..307d6cc
--- /dev/null
+++ b/man-pages-posix-2003/man0p/stdbool.h.0p
@@ -0,0 +1,54 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<stdbool.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <stdbool.h>
+.SH NAME
+stdbool.h \- boolean type and values
+.SH SYNOPSIS
+.LP
+\fB#include <stdbool.h>\fP
+.SH DESCRIPTION
+.LP
+The \fI<stdbool.h>\fP header shall define the following macros:
+.TP 7
+bool
+Expands to \fB_Bool\fP.
+.TP 7
+true
+Expands to the integer constant 1.
+.TP 7
+false
+Expands to the integer constant 0.
+.TP 7
+__bool_true_false_are_defined
+.sp
+Expands to the integer constant 1.
+.sp
+.LP
+An application may undefine and then possibly redefine the macros
+bool, true, and false.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+The ability to undefine and redefine the macros bool, true, and false
+is an obsolescent feature and may be withdrawn in a future
+version.
+.SH SEE ALSO
+.LP
+None.
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/stddef.h.0p b/man-pages-posix-2003/man0p/stddef.h.0p
new file mode 100644
index 0000000..1886ca5
--- /dev/null
+++ b/man-pages-posix-2003/man0p/stddef.h.0p
@@ -0,0 +1,72 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<stddef.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <stddef.h>
+.SH NAME
+stddef.h \- standard type definitions
+.SH SYNOPSIS
+.LP
+\fB#include <stddef.h>\fP
+.SH DESCRIPTION
+.LP
+The \fI<stddef.h>\fP header shall define the following macros:
+.TP 7
+NULL
+Null pointer constant.
+.TP 7
+offsetof(\fItype\fP, \fImember-designator\fP)
+.sp
+Integer constant expression of type \fBsize_t\fP, the value of which
+is the offset in bytes to the structure member
+(\fImember-designator\fP), from the beginning of its structure (\fItype\fP).
+.sp
+.LP
+The \fI<stddef.h>\fP header shall define the following types:
+.TP 7
+\fBptrdiff_t\fP
+Signed integer type of the result of subtracting two pointers.
+.TP 7
+\fBwchar_t\fP
+Integer type whose range of values can represent distinct wide-character
+codes for all members of the largest character set
+specified among the locales supported by the compilation environment:
+the null character has the code value 0 and each member of
+the portable character set has a code value equal to its value when
+used as the lone character in an integer character
+constant.
+.TP 7
+\fBsize_t\fP
+Unsigned integer type of the result of the \fIsizeof\fP operator.
+.sp
+.LP
+The implementation shall support one or more programming environments
+in which the widths of \fBptrdiff_t\fP, \fBsize_t\fP,
+and \fBwchar_t\fP are no greater than the width of type \fBlong\fP.
+The names of these programming environments can be obtained
+using the \fIconfstr\fP() function or the \fIgetconf\fP utility.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<wchar.h>\fP, \fI<sys/types.h>\fP, the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIconfstr\fP(), the
+Shell and
+Utilities volume of IEEE\ Std\ 1003.1-2001, \fIgetconf\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/stdint.h.0p b/man-pages-posix-2003/man0p/stdint.h.0p
new file mode 100644
index 0000000..bdb7c00
--- /dev/null
+++ b/man-pages-posix-2003/man0p/stdint.h.0p
@@ -0,0 +1,578 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<stdint.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <stdint.h>
+.SH NAME
+stdint.h \- integer types
+.SH SYNOPSIS
+.LP
+\fB#include <stdint.h>\fP
+.SH DESCRIPTION
+.LP
+Some of the functionality described on this reference page extends
+the ISO\ C standard. Applications shall define
+the appropriate feature test macro (see the System Interfaces volume
+of IEEE\ Std\ 1003.1-2001, Section 2.2, The Compilation Environment)
+to enable the visibility of these symbols in this
+header.
+.LP
+The \fI<stdint.h>\fP header shall declare sets of integer types having
+specified widths, and shall define corresponding
+sets of macros. It shall also define macros that specify limits of
+integer types corresponding to types defined in other standard
+headers.
+.TP 7
+\fBNote:\fP
+The "width" of an integer type is the number of bits used to store
+its value in a pure binary system; the actual type may use
+more bits than that (for example, a 28-bit type could be stored in
+32 bits of actual storage). An \fIN\fP-bit signed type has
+values in the range -2**\fIN\fP-1 or 1-2**\fIN\fP-1 to
+2**\fIN\fP-1-1, while an \fIN\fP-bit unsigned type has values in the
+range 0 to
+2**\fIN\fP-1.
+.sp
+.LP
+Types are defined in the following categories:
+.IP " *" 3
+Integer types having certain exact widths
+.LP
+.IP " *" 3
+Integer types having at least certain specified widths
+.LP
+.IP " *" 3
+Fastest integer types having at least certain specified widths
+.LP
+.IP " *" 3
+Integer types wide enough to hold pointers to objects
+.LP
+.IP " *" 3
+Integer types having greatest width
+.LP
+.LP
+(Some of these types may denote the same type.)
+.LP
+Corresponding macros specify limits of the declared types and construct
+suitable constants.
+.LP
+For each type described herein that the implementation provides, the
+\fI<stdint.h>\fP header shall declare that
+\fBtypedef\fP name and define the associated macros. Conversely, for
+each type described herein that the implementation does not
+provide, the \fI<stdint.h>\fP header shall not declare that \fBtypedef\fP
+name, nor shall it define the associated macros.
+An implementation shall provide those types described as required,
+but need not provide any of the others (described as
+optional).
+.SS Integer Types
+.LP
+When \fBtypedef\fP names differing only in the absence or presence
+of the initial \fIu\fP are defined, they shall denote
+corresponding signed and unsigned types as described in the ISO/IEC\ 9899:1999
+standard, Section 6.2.5; an implementation
+providing one of these corresponding types shall also provide the
+other.
+.LP
+In the following descriptions, the symbol \fIN\fP represents an unsigned
+decimal integer with no leading zeros (for example, 8
+or 24, but not 04 or 048).
+.IP " *" 3
+Exact-width integer types
+.LP
+The \fBtypedef\fP name \fBint\fP \fIN\fP \fB_t\fP designates a signed
+integer type with width \fIN\fP, no padding bits, and
+a two's-complement representation. Thus, \fBint8_t\fP denotes a signed
+integer type with a width of exactly 8 bits.
+.LP
+The \fBtypedef\fP name \fBuint\fP \fIN\fP \fB_t\fP designates an unsigned
+integer type with width \fIN\fP. Thus,
+\fBuint24_t\fP denotes an unsigned integer type with a width of exactly
+24 bits.
+.LP
+The
+following types are required:
+.LP
+.sp
+\fBint8_t\fP
+.br
+\fBint16_t\fP
+.br
+\fBint32_t\fP
+.br
+\fBuint8_t\fP
+.br
+\fBuint16_t\fP
+.br
+\fBuint32_t\fP
+.br
+.LP
+If an implementation provides integer types with width 64 that meet
+these requirements, then the following types are required:
+\fBint64_t\fP \fBuint64_t\fP
+.LP
+In
+particular, this will be the case if any of the following are true:
+.RS
+.IP " *" 3
+The implementation supports the _POSIX_V6_ILP32_OFFBIG programming
+environment and the application is being built in the
+_POSIX_V6_ILP32_OFFBIG programming environment (see the Shell and
+Utilities volume of IEEE\ Std\ 1003.1-2001, \fIc99\fP, Programming
+Environments).
+.LP
+.IP " *" 3
+The implementation supports the _POSIX_V6_LP64_OFF64 programming environment
+and the application is being built in the
+_POSIX_V6_LP64_OFF64 programming environment.
+.LP
+.IP " *" 3
+The implementation supports the _POSIX_V6_LPBIG_OFFBIG programming
+environment and the application is being built in the
+_POSIX_V6_LPBIG_OFFBIG programming environment.
+.LP
+.RE
+.LP
+All other types of this form are optional.
+.LP
+.IP " *" 3
+Minimum-width integer types
+.LP
+The \fBtypedef\fP name \fBint_least\fP \fIN\fP \fB_t\fP designates
+a signed integer type with a width of at least \fIN\fP,
+such that no signed integer type with lesser size has at least the
+specified width. Thus, \fBint_least32_t\fP denotes a signed
+integer type with a width of at least 32 bits.
+.LP
+The \fBtypedef\fP name \fBuint_least\fP \fIN\fP \fB_t\fP designates
+an unsigned integer type with a width of at least
+\fIN\fP, such that no unsigned integer type with lesser size has at
+least the specified width. Thus, \fBuint_least16_t\fP denotes
+an unsigned integer type with a width of at least 16 bits.
+.LP
+The following types are required: \fBint_least8_t\fP \fBint_least16_t\fP
+\fBint_least32_t\fP \fBint_least64_t\fP
+\fBuint_least8_t\fP \fBuint_least16_t\fP \fBuint_least32_t\fP \fBuint_least64_t\fP
+.LP
+All other types of this form are optional.
+.LP
+.IP " *" 3
+Fastest minimum-width integer types
+.LP
+Each of the following types designates an integer type that is usually
+fastest to operate with among all integer types that have
+at least the specified width.
+.LP
+The designated type is not guaranteed to be fastest for all purposes;
+if the implementation has no clear grounds for choosing
+one type over another, it will simply pick some integer type satisfying
+the signedness and width requirements.
+.LP
+The \fBtypedef\fP name \fBint_fast\fP \fIN\fP \fB_t\fP designates
+the fastest signed integer type with a width of at least
+\fIN\fP. The \fBtypedef\fP name \fBuint_fast\fP \fIN\fP \fB_t\fP designates
+the fastest unsigned integer type with a width of
+at least \fIN\fP.
+.LP
+The following types are required: \fBint_fast8_t\fP \fBint_fast16_t\fP
+\fBint_fast32_t\fP \fBint_fast64_t\fP
+\fBuint_fast8_t\fP \fBuint_fast16_t\fP \fBuint_fast32_t\fP \fBuint_fast64_t\fP
+.LP
+All other types of this form are optional.
+.LP
+.IP " *" 3
+Integer types capable of holding object pointers
+.LP
+The following type designates a signed integer type with the property
+that any valid pointer to \fBvoid\fP can be converted to
+this type, then converted back to a pointer to \fBvoid\fP, and the
+result will compare equal to the original pointer:
+\fBintptr_t\fP
+.LP
+The following type designates an unsigned integer type with the property
+that any valid pointer to \fBvoid\fP can be converted
+to this type, then converted back to a pointer to \fBvoid\fP, and
+the result will compare equal to the original pointer:
+\fBuintptr_t\fP
+.LP
+On XSI-conformant systems, the \fBintptr_t\fP and \fBuintptr_t\fP
+types are required; otherwise, they are optional.
+.LP
+.IP " *" 3
+Greatest-width integer types
+.LP
+The following type designates a signed integer type capable of representing
+any value of any signed integer type:
+\fBintmax_t\fP
+.LP
+The following type designates an unsigned integer type capable of
+representing any value of any unsigned integer type:
+\fBuintmax_t\fP
+.LP
+These types are required.
+.LP
+.TP 7
+\fBNote:\fP
+Applications can test for optional types by using the corresponding
+limit macro from Limits of
+Specified-Width Integer Types .
+.sp
+.SS Limits of Specified-Width Integer Types
+.LP
+The following macros specify the minimum and maximum limits of the
+types declared in the \fI<stdint.h>\fP header. Each
+macro name corresponds to a similar type name in Integer Types .
+.LP
+Each instance of any defined macro shall be replaced by a constant
+expression suitable for use in \fB#if\fP preprocessing
+directives, and this expression shall have the same type as would
+an expression that is an object of the corresponding type
+converted according to the integer promotions. Its implementation-defined
+value shall be equal to or greater in magnitude (absolute
+value) than the corresponding value given below, with the same sign,
+except where stated to be exactly the given value.
+.IP " *" 3
+Limits of exact-width integer types
+.RS
+.IP " *" 3
+Minimum values of exact-width signed integer types:
+.TP 7
+{INT\fIN\fP_MIN}
+.RS
+Exactly -(2 **N-1)
+.RE
+.sp
+.LP
+.IP " *" 3
+Maximum values of exact-width signed integer types:
+.TP 7
+{INT\fIN\fP_MAX}
+.RS
+Exactly 2**N-1 -1
+.RE
+.sp
+.LP
+.IP " *" 3
+Maximum values of exact-width unsigned integer types:
+.TP 7
+{UINT\fIN\fP_MAX}
+.RS
+Exactly 2 **N -1
+.RE
+.sp
+.LP
+.RE
+.LP
+.IP " *" 3
+Limits of minimum-width integer types
+.RS
+.IP " *" 3
+Minimum values of minimum-width signed integer types:
+.TP 7
+{INT_LEAST\fIN\fP_MIN}
+.RS
+-(2 ** N-1 -1)
+.RE
+.sp
+.LP
+.IP " *" 3
+Maximum values of minimum-width signed integer types:
+.TP 7
+{INT_LEAST\fIN\fP_MAX}
+.RS
+2 ** N-1 -1
+.RE
+.sp
+.LP
+.IP " *" 3
+Maximum values of minimum-width unsigned integer types:
+.TP 7
+{UINT_LEAST\fIN\fP_MAX}
+.RS
+2 ** N -1
+.RE
+.sp
+.LP
+.RE
+.LP
+.IP " *" 3
+Limits of fastest minimum-width integer types
+.RS
+.IP " *" 3
+Minimum values of fastest minimum-width signed integer types:
+.TP 7
+{INT_FAST\fIN\fP_MIN}
+.RS
+-(2 ** N-1 -1)
+.RE
+.sp
+.LP
+.IP " *" 3
+Maximum values of fastest minimum-width signed integer types:
+.TP 7
+{INT_FAST\fIN\fP_MAX}
+.RS
+2 ** N-1 -1
+.RE
+.sp
+.LP
+.IP " *" 3
+Maximum values of fastest minimum-width unsigned integer types:
+.TP 7
+{UINT_FAST\fIN\fP_MAX}
+.RS
+2 ** N -1
+.RE
+.sp
+.LP
+.RE
+.LP
+.IP " *" 3
+Limits of integer types capable of holding object pointers
+.RS
+.IP " *" 3
+Minimum value of pointer-holding signed integer type:
+.TP 7
+{INTPTR_MIN}
+.RS
+-(2 ** 15 -1)
+.RE
+.sp
+.LP
+.IP " *" 3
+Maximum value of pointer-holding signed integer type:
+.TP 7
+{INTPTR_MAX}
+.RS
+2 ** 15 -1
+.RE
+.sp
+.LP
+.IP " *" 3
+Maximum value of pointer-holding unsigned integer type:
+.TP 7
+{UINTPTR_MAX}
+.RS
+2 ** 16 -1
+.RE
+.sp
+.LP
+.RE
+.LP
+.IP " *" 3
+Limits of greatest-width integer types
+.RS
+.IP " *" 3
+Minimum value of greatest-width signed integer type:
+.TP 7
+{INTMAX_MIN}
+.RS
+-(2 ** 63 -1)
+.RE
+.sp
+.LP
+.IP " *" 3
+Maximum value of greatest-width signed integer type:
+.TP 7
+{INTMAX_MAX}
+.RS
+2 ** 63 -1
+.RE
+.sp
+.LP
+.IP " *" 3
+Maximum value of greatest-width unsigned integer type:
+.TP 7
+{UINTMAX_MAX}
+.RS
+2 ** 64 -1
+.RE
+.sp
+.LP
+.RE
+.LP
+.SS Limits of Other Integer Types
+.LP
+The following macros specify the minimum and maximum limits of integer
+types corresponding to types defined in other standard
+headers.
+.LP
+Each instance of these macros shall be replaced by a constant expression
+suitable for use in \fB#if\fP preprocessing
+directives, and this expression shall have the same type as would
+an expression that is an object of the corresponding type
+converted according to the integer promotions. Its implementation-defined
+value shall be equal to or greater in magnitude (absolute
+value) than the corresponding value given below, with the same sign.
+.IP " *" 3
+Limits of \fBptrdiff_t\fP:
+.TP 7
+{PTRDIFF_MIN}
+.RS
+-65535
+.RE
+.TP 7
+{PTRDIFF_MAX}
+.RS
++65535
+.RE
+.sp
+.LP
+.IP " *" 3
+Limits of \fBsig_atomic_t\fP:
+.TP 7
+{SIG_ATOMIC_MIN}
+.RS
+See below.
+.RE
+.TP 7
+{SIG_ATOMIC_MAX}
+.RS
+See below.
+.RE
+.sp
+.LP
+.IP " *" 3
+Limit of \fBsize_t\fP:
+.TP 7
+{SIZE_MAX}
+.RS
+65535
+.RE
+.sp
+.LP
+.IP " *" 3
+Limits of \fBwchar_t\fP:
+.TP 7
+{WCHAR_MIN}
+.RS
+See below.
+.RE
+.TP 7
+{WCHAR_MAX}
+.RS
+See below.
+.RE
+.sp
+.LP
+.IP " *" 3
+Limits of \fBwint_t\fP:
+.TP 7
+{WINT_MIN}
+.RS
+See below.
+.RE
+.TP 7
+{WINT_MAX}
+.RS
+See below.
+.RE
+.sp
+.LP
+.LP
+If \fBsig_atomic_t\fP (see the \fI<signal.h>\fP header) is defined
+as a signed
+integer type, the value of {SIG_ATOMIC_MIN} shall be no greater than
+-127 and the value of {SIG_ATOMIC_MAX} shall be no less than
+127; otherwise, \fBsig_atomic_t\fP shall be defined as an unsigned
+integer type, and the value of {SIG_ATOMIC_MIN} shall be 0 and
+the value of {SIG_ATOMIC_MAX} shall be no less than 255.
+.LP
+If \fBwchar_t\fP (see the \fI<stddef.h>\fP header) is defined as a
+signed
+integer type, the value of {WCHAR_MIN} shall be no greater than -127
+and the value of {WCHAR_MAX} shall be no less than 127;
+otherwise, \fBwchar_t\fP shall be defined as an unsigned integer type,
+and the value of {WCHAR_MIN} shall be 0 and the value of
+{WCHAR_MAX} shall be no less than 255.
+.LP
+If \fBwint_t\fP (see the \fI<wchar.h>\fP header) is defined as a signed
+integer
+type, the value of {WINT_MIN} shall be no greater than -32767 and
+the value of {WINT_MAX} shall be no less than 32767; otherwise,
+\fBwint_t\fP shall be defined as an unsigned integer type, and the
+value of {WINT_MIN} shall be 0 and the value of {WINT_MAX}
+shall be no less than 65535.
+.SS Macros for Integer Constant Expressions
+.LP
+The following macros expand to integer constant expressions suitable
+for initializing objects that have integer types
+corresponding to types defined in the \fI<stdint.h>\fP header. Each
+macro name corresponds to a similar type name listed
+under \fIMinimum-width integer types\fP and \fIGreatest-width integer
+types\fP.
+.LP
+Each invocation of one of these macros shall expand to an integer
+constant expression suitable for use in \fB#if\fP
+preprocessing directives. The type of the expression shall have the
+same type as would an expression that is an object of the
+corresponding type converted according to the integer promotions.
+The value of the expression shall be that of the argument.
+.LP
+The argument in any instance of these macros shall be a decimal, octal,
+or hexadecimal constant with a value that does not
+exceed the limits for the corresponding type.
+.IP " *" 3
+Macros for minimum-width integer constant expressions
+.LP
+The macro \fIINTN_C\fP( \fIvalue\fP) shall expand to an integer constant
+expression corresponding to the type \fBint_least\fP
+\fIN\fP \fB_t\fP. The macro \fIUINTN_C\fP( \fIvalue\fP) shall expand
+to an integer constant expression corresponding to the
+type \fBuint_least\fP \fIN\fP \fB_t\fP. For example, if \fBuint_least64_t\fP
+is a name for the type \fBunsigned long long\fP,
+then \fIUINT64_C\fP(0x123) might expand to the integer constant 0x123ULL.
+.LP
+.IP " *" 3
+Macros for greatest-width integer constant expressions
+.LP
+The following macro expands to an integer constant expression having
+the value specified by its argument and the type
+\fBintmax_t\fP: INTMAX_C(\fIvalue\fP)
+.LP
+The following macro expands to an integer constant expression having
+the value specified by its argument and the type
+\fBuintmax_t\fP: UINTMAX_C(\fIvalue\fP)
+.LP
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fI<stdint.h>\fP header is a subset of the \fI<inttypes.h>\fP
+header
+more suitable for use in freestanding environments, which might not
+support the formatted I/O functions. In some environments, if
+the formatted conversion support is not wanted, using this header
+instead of the \fI<inttypes.h>\fP header avoids defining such a large
+number of macros.
+.LP
+As a consequence of adding \fBint8_t\fP, the following are true:
+.IP " *" 3
+A byte is exactly 8 bits.
+.LP
+.IP " *" 3
+{CHAR_BIT} has the value 8, {SCHAR_MAX} has the value 127, {SCHAR_MIN}
+has the value -127 or -128, and {UCHAR_MAX} has the value
+255.
+.LP
+.SH FUTURE DIRECTIONS
+.LP
+\fBtypedef\fP names beginning with \fBint\fP or \fBuint\fP and ending
+with _t may be added to the types defined in the
+\fI<stdint.h>\fP header. Macro names beginning with INT or UINT and
+ending with _MAX, _MIN, or _C may be added to the macros
+defined in the \fI<stdint.h>\fP header.
+.SH SEE ALSO
+.LP
+\fI<inttypes.h>\fP, \fI<signal.h>\fP, \fI<stddef.h>\fP, \fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/stdio.h.0p b/man-pages-posix-2003/man0p/stdio.h.0p
new file mode 100644
index 0000000..93ab3f4
--- /dev/null
+++ b/man-pages-posix-2003/man0p/stdio.h.0p
@@ -0,0 +1,251 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<stdio.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <stdio.h>
+.SH NAME
+stdio.h \- standard buffered input/output
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>\fP
+.SH DESCRIPTION
+.LP
+Some of the functionality described on this reference page extends
+the ISO\ C standard. Applications shall define
+the appropriate feature test macro (see the System Interfaces volume
+of IEEE\ Std\ 1003.1-2001, Section 2.2, The Compilation Environment)
+to enable the visibility of these symbols in this
+header.
+.LP
+The \fI<stdio.h>\fP header shall define the following macros as positive
+integer constant expressions:
+.TP 7
+BUFSIZ
+Size of \fI<stdio.h>\fP buffers.
+.TP 7
+_IOFBF
+Input/output fully buffered.
+.TP 7
+_IOLBF
+Input/output line buffered.
+.TP 7
+_IONBF
+Input/output unbuffered.
+.TP 7
+L_ctermid
+Maximum size of character array to hold \fIctermid\fP() output.
+.TP 7
+L_tmpnam
+Maximum size of character array to hold \fItmpnam\fP() output.
+.TP 7
+SEEK_CUR
+Seek relative to current position.
+.TP 7
+SEEK_END
+Seek relative to end-of-file.
+.TP 7
+SEEK_SET
+Seek relative to start-of-file.
+.sp
+.LP
+The following macros shall be defined as positive integer constant
+expressions which denote implementation limits:
+.TP 7
+{FILENAME_MAX}
+Maximum size in bytes of the longest filename string that the implementation
+guarantees can be opened.
+.TP 7
+{FOPEN_MAX}
+Number of streams which the implementation guarantees can be open
+simultaneously. The value is at least eight.
+.TP 7
+{TMP_MAX}
+Minimum number of unique filenames generated by \fItmpnam\fP(). Maximum
+number of times
+an application can call \fItmpnam\fP() reliably. The value of {TMP_MAX}
+is at least 25.
+\ On XSI-conformant systems, the value of {TMP_MAX} is at least 10000.
+.sp
+.LP
+The following macro name shall be defined as a negative integer constant
+expression:
+.TP 7
+EOF
+End-of-file return value.
+.sp
+.LP
+The following macro name shall be defined as a null pointer constant:
+.TP 7
+NULL
+Null pointer.
+.sp
+.LP
+The following macro name shall be defined as a string constant:
+.TP 7
+P_tmpdir
+Default directory prefix for \fItempnam\fP().
+.sp
+.LP
+The following shall be defined as expressions of type "pointer to
+\fBFILE\fP" that point to the \fBFILE\fP objects
+associated, respectively, with the standard error, input, and output
+streams:
+.TP 7
+\fIstderr\fP
+Standard error output stream.
+.TP 7
+\fIstdin\fP
+Standard input stream.
+.TP 7
+\fIstdout\fP
+Standard output stream.
+.sp
+.LP
+The following data types shall be defined through \fBtypedef\fP:
+.TP 7
+\fBFILE\fP
+A structure containing information about a file.
+.TP 7
+\fBfpos_t\fP
+A non-array type containing all information needed to specify uniquely
+every position within a file.
+.TP 7
+\fBva_list\fP
+As described in \fI<stdarg.h>\fP .
+.TP 7
+\fBsize_t\fP
+As described in \fI<stddef.h>\fP .
+.sp
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBvoid clearerr(FILE *);
+
+char *ctermid(char *);
+
+int fclose(FILE *);
+
+FILE *fdopen(int, const char *);
+
+int feof(FILE *);
+int ferror(FILE *);
+int fflush(FILE *);
+int fgetc(FILE *);
+int fgetpos(FILE *restrict, fpos_t *restrict);
+char *fgets(char *restrict, int, FILE *restrict);
+
+int fileno(FILE *);
+
+
+void flockfile(FILE *);
+
+FILE *fopen(const char *restrict, const char *restrict);
+int fprintf(FILE *restrict, const char *restrict, ...);
+int fputc(int, FILE *);
+int fputs(const char *restrict, FILE *restrict);
+size_t fread(void *restrict, size_t, size_t, FILE *restrict);
+FILE *freopen(const char *restrict, const char *restrict,
+ FILE *restrict);
+int fscanf(FILE *restrict, const char *restrict, ...);
+int fseek(FILE *, long, int);
+
+int fseeko(FILE *, off_t, int);
+
+int fsetpos(FILE *, const fpos_t *);
+long ftell(FILE *);
+
+off_t ftello(FILE *);
+
+
+int ftrylockfile(FILE *);
+void funlockfile(FILE *);
+
+size_t fwrite(const void *restrict, size_t, size_t, FILE *restrict);
+int getc(FILE *);
+int getchar(void);
+
+int getc_unlocked(FILE *);
+int getchar_unlocked(void);
+
+char *gets(char *);
+
+int pclose(FILE *);
+
+void perror(const char *);
+
+FILE *popen(const char *, const char *);
+
+int printf(const char *restrict, ...);
+int putc(int, FILE *);
+int putchar(int);
+
+int putc_unlocked(int, FILE *);
+int putchar_unlocked(int);
+
+int puts(const char *);
+int remove(const char *);
+int rename(const char *, const char *);
+void rewind(FILE *);
+int scanf(const char *restrict, ...);
+void setbuf(FILE *restrict, char *restrict);
+int setvbuf(FILE *restrict, char *restrict, int, size_t);
+int snprintf(char *restrict, size_t, const char *restrict, ...);
+int sprintf(char *restrict, const char *restrict, ...);
+int sscanf(const char *restrict, const char *restrict, int ...);
+
+char *tempnam(const char *, const char *);
+
+FILE *tmpfile(void);
+char *tmpnam(char *);
+int ungetc(int, FILE *);
+int vfprintf(FILE *restrict, const char *restrict, va_list);
+int vfscanf(FILE *restrict, const char *restrict, va_list);
+int vprintf(const char *restrict, va_list);
+int vscanf(const char *restrict, va_list);
+int vsnprintf(char *restrict, size_t, const char *restrict, va_list;
+int vsprintf(char *restrict, const char *restrict, va_list);
+int vsscanf(const char *restrict, const char *restrict, va_list arg);
+\fP
+.fi
+.RE
+.LP
+Inclusion of the \fI<stdio.h>\fP header may also make visible all
+symbols from \fI<stddef.h>\fP.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<stdarg.h>\fP, \fI<stddef.h>\fP, \fI<sys/types.h>\fP, the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIclearerr\fP(), \fIctermid\fP(),
+\fIfclose\fP(), \fIfdopen\fP(), \fIfgetc\fP(), \fIfgetpos\fP(), \fIferror\fP(),
+\fIfeof\fP(), \fIfflush\fP(), \fIfgets\fP(), \fIfileno\fP(), \fIflockfile\fP(),
+\fIfopen\fP(), \fIfputc\fP(), \fIfputs\fP(), \fIfread\fP(), \fIfreopen\fP(),
+\fIfseek\fP(), \fIfsetpos\fP(), \fIftell\fP(), \fIfwrite\fP(), \fIgetc\fP(),
+\fIgetc_unlocked\fP(), \fIgetwchar\fP(), \fIgetchar\fP(), \fIgetopt\fP(),
+\fIgets\fP(), \fIpclose\fP(), \fIperror\fP(), \fIpopen\fP(), \fIprintf\fP(),
+\fIputc\fP(), \fIputchar\fP(), \fIputs\fP(), \fIputwchar\fP(), \fIremove\fP(),
+\fIrename\fP(), \fIrewind\fP(), \fIscanf\fP(), \fIsetbuf\fP(), \fIsetvbuf\fP(),
+\fIsscanf\fP(), \fIstdin\fP, \fIsystem\fP(), \fItempnam\fP(), \fItmpfile\fP(),
+\fItmpnam\fP(), \fIungetc\fP(), \fIvfscanf\fP(), \fIvscanf\fP(), \fIvprintf\fP(),
+\fIvsscanf\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/stdlib.h.0p b/man-pages-posix-2003/man0p/stdlib.h.0p
new file mode 100644
index 0000000..a50e814
--- /dev/null
+++ b/man-pages-posix-2003/man0p/stdlib.h.0p
@@ -0,0 +1,237 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<stdlib.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <stdlib.h>
+.SH NAME
+stdlib.h \- standard library definitions
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>\fP
+.SH DESCRIPTION
+.LP
+Some of the functionality described on this reference page extends
+the ISO\ C standard. Applications shall define
+the appropriate feature test macro (see the System Interfaces volume
+of IEEE\ Std\ 1003.1-2001, Section 2.2, The Compilation Environment)
+to enable the visibility of these symbols in this
+header.
+.LP
+The \fI<stdlib.h>\fP header shall define the following macros:
+.TP 7
+EXIT_FAILURE
+Unsuccessful termination for \fIexit\fP(); evaluates to a non-zero
+value.
+.TP 7
+EXIT_SUCCESS
+Successful termination for \fIexit\fP(); evaluates to 0.
+.TP 7
+NULL
+Null pointer.
+.TP 7
+{RAND_MAX}
+Maximum value returned by \fIrand\fP(); at least 32767.
+.TP 7
+{MB_CUR_MAX}
+Integer expression whose value is the maximum number of bytes in a
+character specified by the current locale.
+.sp
+.LP
+The following data types shall be defined through \fBtypedef\fP:
+.TP 7
+\fBdiv_t\fP
+Structure type returned by the \fIdiv\fP() function.
+.TP 7
+\fBldiv_t\fP
+Structure type returned by the \fIldiv\fP() function.
+.TP 7
+\fBlldiv_t\fP
+Structure type returned by the \fIlldiv\fP() function.
+.TP 7
+\fBsize_t\fP
+As described in \fI<stddef.h>\fP .
+.TP 7
+\fBwchar_t\fP
+As described in \fI<stddef.h>\fP .
+.sp
+.LP
+In addition, the following symbolic names and macros shall be defined
+as in \fI<sys/wait.h>\fP, for use in decoding the return value from
+\fIsystem\fP():
+.LP
+.sp
+.sp
+WNOHANG
+.br
+WUNTRACED
+.br
+WEXITSTATUS
+.br
+WIFEXITED
+.br
+WIFSIGNALED
+.br
+WIFSTOPPED
+.br
+WSTOPSIG
+.br
+WTERMSIG
+.br
+.sp
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBvoid _Exit(int);
+
+long a64l(const char *);
+
+void abort(void);
+int abs(int);
+int atexit(void (*)(void));
+double atof(const char *);
+int atoi(const char *);
+long atol(const char *);
+long long atoll(const char *);
+void *bsearch(const void *, const void *, size_t, size_t,
+ int (*)(const void *, const void *));
+void *calloc(size_t, size_t);
+div_t div(int, int);
+
+double drand48(void);
+char *ecvt(double, int, int *restrict, int *restrict); (\fP\fBLEGACY\fP \fB)
+double erand48(unsigned short[3]);
+
+void exit(int);
+
+char *fcvt(double, int, int *restrict, int *restrict); (\fP\fBLEGACY\fP \fB)
+
+void free(void *);
+
+char *gcvt(double, int, char *); (\fP\fBLEGACY\fP \fB)
+
+char *getenv(const char *);
+
+int getsubopt(char **, char *const *, char **);
+int grantpt(int);
+char *initstate(unsigned, char *, size_t);
+long jrand48(unsigned short[3]);
+char *l64a(long);
+
+long labs(long);
+
+void lcong48(unsigned short[7]);
+
+ldiv_t ldiv(long, long);
+long long llabs(long long);
+lldiv_t lldiv(long long, long long);
+
+long lrand48(void);
+
+void *malloc(size_t);
+int mblen(const char *, size_t);
+size_t mbstowcs(wchar_t *restrict, const char *restrict, size_t);
+int mbtowc(wchar_t *restrict, const char *restrict, size_t);
+
+char *mktemp(char *); (\fP\fBLEGACY\fP \fB)
+int mkstemp(char *);
+long mrand48(void);
+long nrand48(unsigned short[3]);
+
+
+int posix_memalign(void **, size_t, size_t);
+
+
+int posix_openpt(int);
+char *ptsname(int);
+int putenv(char *);
+
+void qsort(void *, size_t, size_t, int (*)(const void *,
+ const void *));
+int rand(void);
+
+int rand_r(unsigned *);
+
+
+long random(void);
+
+void *realloc(void *, size_t);
+
+char *realpath(const char *restrict, char *restrict);
+unsigned short seed48(unsigned short[3]);
+
+
+int setenv(const char *, const char *, int);
+
+
+void setkey(const char *);
+char *setstate(const char *);
+
+void srand(unsigned);
+
+void srand48(long);
+void srandom(unsigned);
+
+double strtod(const char *restrict, char **restrict);
+float strtof(const char *restrict, char **restrict);
+long strtol(const char *restrict, char **restrict, int);
+long double strtold(const char *restrict, char **restrict);
+long long strtoll(const char *restrict, char **restrict, int);
+unsigned long strtoul(const char *restrict, char **restrict, int);
+unsigned long long
+ strtoull(const char *restrict, char **restrict, int);
+int system(const char *);
+
+int unlockpt(int);
+
+
+int unsetenv(const char *);
+
+size_t wcstombs(char *restrict, const wchar_t *restrict, size_t);
+int wctomb(char *, wchar_t);
+\fP
+.fi
+.RE
+.LP
+Inclusion of the \fI<stdlib.h>\fP header may also make visible all
+symbols from \fI<stddef.h>\fP, \fI<limits.h>\fP, \fI<math.h>\fP, and
+\fI<sys/wait.h>\fP.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<limits.h>\fP, \fI<math.h>\fP, \fI<stddef.h>\fP, \fI<sys/types.h>\fP,
+\fI<sys/wait.h>\fP, the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+\fI_Exit\fP(), \fIa64l\fP(), \fIabort\fP(), \fIabs\fP(), \fIatexit\fP(),
+\fIatof\fP(), \fIatoi\fP(), \fIatol\fP(), \fIatoll\fP(), \fIbsearch\fP(),
+\fIcalloc\fP(), \fIdiv\fP(), \fIdrand48\fP(), \fIerand48\fP(), \fIexit\fP(),
+\fIfree\fP(), \fIgetenv\fP(), \fIgetsubopt\fP(), \fIgrantpt\fP(),
+\fIinitstate\fP(), \fIjrand48\fP(), \fIl64a\fP(), \fIlabs\fP(), \fIlcong48\fP(),
+\fIldiv\fP(), \fIllabs\fP(), \fIlldiv\fP(), \fIlrand48\fP(), \fImalloc\fP(),
+\fImblen\fP(), \fImbstowcs\fP(), \fImbtowc\fP(), \fImkstemp\fP(),
+\fImrand48\fP(), \fInrand48\fP(), \fIposix_memalign\fP(), \fIptsname\fP(),
+\fIputenv\fP(), \fIqsort\fP(), \fIrand\fP(), \fIrealloc\fP(), \fIrealpath\fP(),
+\fIsetstate\fP(), \fIsrand\fP(), \fIsrand48\fP(), \fIsrandom\fP(),
+\fIstrtod\fP(), \fIstrtof\fP(), \fIstrtol\fP(), \fIstrtold\fP(), \fIstrtoll\fP(),
+\fIstrtoul\fP(), \fIstrtoull\fP(), \fIunlockpt\fP(), \fIwcstombs\fP(),
+\fIwctomb\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/string.h.0p b/man-pages-posix-2003/man0p/string.h.0p
new file mode 100644
index 0000000..6e4e484
--- /dev/null
+++ b/man-pages-posix-2003/man0p/string.h.0p
@@ -0,0 +1,102 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<string.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <string.h>
+.SH NAME
+string.h \- string operations
+.SH SYNOPSIS
+.LP
+\fB#include <string.h>\fP
+.SH DESCRIPTION
+.LP
+Some of the functionality described on this reference page extends
+the ISO\ C standard. Applications shall define
+the appropriate feature test macro (see the System Interfaces volume
+of IEEE\ Std\ 1003.1-2001, Section 2.2, The Compilation Environment)
+to enable the visibility of these symbols in this
+header.
+.LP
+The \fI<string.h>\fP header shall define the following:
+.TP 7
+NULL
+Null pointer constant.
+.TP 7
+\fBsize_t\fP
+As described in \fI<stddef.h>\fP .
+.sp
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fB
+void *memccpy(void *restrict, const void *restrict, int, size_t);
+
+void *memchr(const void *, int, size_t);
+int memcmp(const void *, const void *, size_t);
+void *memcpy(void *restrict, const void *restrict, size_t);
+void *memmove(void *, const void *, size_t);
+void *memset(void *, int, size_t);
+char *strcat(char *restrict, const char *restrict);
+char *strchr(const char *, int);
+int strcmp(const char *, const char *);
+int strcoll(const char *, const char *);
+char *strcpy(char *restrict, const char *restrict);
+size_t strcspn(const char *, const char *);
+
+char *strdup(const char *);
+
+char *strerror(int);
+
+int *strerror_r(int, char *, size_t);
+
+size_t strlen(const char *);
+char *strncat(char *restrict, const char *restrict, size_t);
+int strncmp(const char *, const char *, size_t);
+char *strncpy(char *restrict, const char *restrict, size_t);
+char *strpbrk(const char *, const char *);
+char *strrchr(const char *, int);
+size_t strspn(const char *, const char *);
+char *strstr(const char *, const char *);
+char *strtok(char *restrict, const char *restrict);
+
+char *strtok_r(char *, const char *, char **);
+
+size_t strxfrm(char *restrict, const char *restrict, size_t);
+\fP
+.fi
+.RE
+.LP
+Inclusion of the \fI<string.h>\fP header may also make visible all
+symbols from \fI<stddef.h>\fP.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<stddef.h>\fP, \fI<sys/types.h>\fP, the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001, \fImemccpy\fP(), \fImemchr\fP(),
+\fImemcmp\fP(), \fImemcpy\fP(), \fImemmove\fP(), \fImemset\fP(), \fIstrcat\fP(),
+\fIstrchr\fP(), \fIstrcmp\fP(), \fIstrcoll\fP(), \fIstrcpy\fP(), \fIstrcspn\fP(),
+\fIstrdup\fP(), \fIstrerror\fP(), \fIstrlen\fP(), \fIstrncat\fP(),
+\fIstrncmp\fP(), \fIstrncpy\fP(), \fIstrpbrk\fP(), \fIstrrchr\fP(),
+\fIstrspn\fP(), \fIstrstr\fP(), \fIstrtok\fP(), \fIstrxfrm\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/strings.h.0p b/man-pages-posix-2003/man0p/strings.h.0p
new file mode 100644
index 0000000..8ca8a15
--- /dev/null
+++ b/man-pages-posix-2003/man0p/strings.h.0p
@@ -0,0 +1,55 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<strings.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <strings.h>
+.SH NAME
+strings.h \- string operations
+.SH SYNOPSIS
+.LP
+\fB#include <strings.h> \fP
+.SH DESCRIPTION
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBint bcmp(const void *, const void *, size_t); (\fP\fBLEGACY\fP \fB)
+void bcopy(const void *, void *, size_t); (\fP\fBLEGACY\fP \fB)
+void bzero(void *, size_t); (\fP\fBLEGACY\fP \fB)
+int ffs(int);
+char *index(const char *, int); (\fP\fBLEGACY\fP \fB)
+char *rindex(const char *, int); (\fP\fBLEGACY\fP \fB)
+int strcasecmp(const char *, const char *);
+int strncasecmp(const char *, const char *, size_t);
+\fP
+.fi
+.RE
+.LP
+The \fBsize_t\fP type shall be defined through \fBtypedef\fP as described
+in \fI<stddef.h>\fP .
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<stddef.h>\fP, the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+\fIffs\fP(), \fIstrcasecmp\fP(), \fIstrncasecmp\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/stropts.h.0p b/man-pages-posix-2003/man0p/stropts.h.0p
new file mode 100644
index 0000000..bbb5f4e
--- /dev/null
+++ b/man-pages-posix-2003/man0p/stropts.h.0p
@@ -0,0 +1,399 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<stropts.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <stropts.h>
+.SH NAME
+stropts.h \- STREAMS interface (\fBSTREAMS\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <stropts.h> \fP
+.SH DESCRIPTION
+.LP
+The \fI<stropts.h>\fP header shall define the \fBbandinfo\fP structure
+that includes at least the following members:
+.sp
+.RS
+.nf
+
+\fBunsigned char bi_pri \fP Priority band. \fB
+int bi_flag \fP Flushing type. \fB
+\fP
+.fi
+.RE
+.LP
+The \fI<stropts.h>\fP header shall define the \fBstrpeek\fP structure
+that includes at least the following members:
+.sp
+.RS
+.nf
+
+\fBstruct strbuf ctlbuf \fP The control portion of the message. \fB
+struct strbuf databuf \fP The data portion of the message. \fB
+t_uscalar_t flags \fP RS_HIPRI or 0. \fB
+\fP
+.fi
+.RE
+.LP
+The \fI<stropts.h>\fP header shall define the \fBstrbuf\fP structure
+that includes at least the following members:
+.sp
+.RS
+.nf
+
+\fBint maxlen \fP Maximum buffer length. \fB
+int len \fP Length of data. \fB
+char *buf \fP Pointer to buffer. \fB
+\fP
+.fi
+.RE
+.LP
+The \fI<stropts.h>\fP header shall define the \fBstrfdinsert\fP structure
+that includes at least the following
+members:
+.sp
+.RS
+.nf
+
+\fBstruct strbuf ctlbuf \fP The control portion of the message. \fB
+struct strbuf databuf \fP The data portion of the message. \fB
+t_uscalar_t flags \fP RS_HIPRI or 0. \fB
+int fildes \fP File descriptor of the other STREAM. \fB
+int offset \fP Relative location of the stored value. \fB
+\fP
+.fi
+.RE
+.LP
+The \fI<stropts.h>\fP header shall define the \fBstrioctl\fP structure
+that includes at least the following members:
+.sp
+.RS
+.nf
+
+\fBint ic_cmd \fP \fIioctl\fP() command. \fB
+int ic_timout \fP Timeout for response. \fB
+int ic_len \fP Length of data. \fB
+char *ic_dp \fP Pointer to buffer. \fB
+\fP
+.fi
+.RE
+.LP
+The \fI<stropts.h>\fP header shall define the \fBstrrecvfd\fP structure
+that includes at least the following
+members:
+.sp
+.RS
+.nf
+
+\fBint fda \fP Received file descriptor. \fB
+uid_t uid \fP UID of sender. \fB
+gid_t gid \fP GID of sender. \fB
+\fP
+.fi
+.RE
+.LP
+The \fBuid_t\fP and \fBgid_t\fP types shall be defined through \fBtypedef\fP
+as described in \fI<sys/types.h>\fP .
+.LP
+The \fI<stropts.h>\fP header shall define the \fBt_scalar_t\fP and
+\fBt_uscalar_t\fP types, respectively, as signed and
+unsigned opaque types of equal length of at least 32 bits.
+.LP
+The \fI<stropts.h>\fP header shall define the \fBstr_list\fP structure
+that includes at least the following members:
+.sp
+.RS
+.nf
+
+\fBint sl_nmods \fP Number of STREAMS module names. \fB
+struct str_mlist *sl_modlist \fP STREAMS module names. \fB
+\fP
+.fi
+.RE
+.LP
+The \fI<stropts.h>\fP header shall define the \fBstr_mlist\fP structure
+that includes at least the following member:
+.sp
+.RS
+.nf
+
+\fBchar l_name[FMNAMESZ+1] \fP A STREAMS module name. \fB
+\fP
+.fi
+.RE
+.LP
+At least the following macros shall be defined for use as the \fIrequest\fP
+argument to \fIioctl\fP():
+.TP 7
+I_PUSH
+Push a STREAMS module.
+.TP 7
+I_POP
+Pop a STREAMS module.
+.TP 7
+I_LOOK
+Get the top module name.
+.TP 7
+I_FLUSH
+Flush a STREAM.
+.TP 7
+I_FLUSHBAND
+Flush one band of a STREAM.
+.TP 7
+I_SETSIG
+Ask for notification signals.
+.TP 7
+I_GETSIG
+Retrieve current notification signals.
+.TP 7
+I_FIND
+Look for a STREAMS module.
+.TP 7
+I_PEEK
+Peek at the top message on a STREAM.
+.TP 7
+I_SRDOPT
+Set the read mode.
+.TP 7
+I_GRDOPT
+Get the read mode.
+.TP 7
+I_NREAD
+Size the top message.
+.TP 7
+I_FDINSERT
+Send implementation-defined information about another STREAM.
+.TP 7
+I_STR
+Send a STREAMS \fIioctl\fP().
+.TP 7
+I_SWROPT
+Set the write mode.
+.TP 7
+I_GWROPT
+Get the write mode.
+.TP 7
+I_SENDFD
+Pass a file descriptor through a STREAMS pipe.
+.TP 7
+I_RECVFD
+Get a file descriptor sent via I_SENDFD.
+.TP 7
+I_LIST
+Get all the module names on a STREAM.
+.TP 7
+I_ATMARK
+Is the top message "marked''?
+.TP 7
+I_CKBAND
+See if any messages exist in a band.
+.TP 7
+I_GETBAND
+Get the band of the top message on a STREAM.
+.TP 7
+I_CANPUT
+Is a band writable?
+.TP 7
+I_SETCLTIME
+Set close time delay.
+.TP 7
+I_GETCLTIME
+Get close time delay.
+.TP 7
+I_LINK
+Connect two STREAMs.
+.TP 7
+I_UNLINK
+Disconnect two STREAMs.
+.TP 7
+I_PLINK
+Persistently connect two STREAMs.
+.TP 7
+I_PUNLINK
+Dismantle a persistent STREAMS link.
+.sp
+.LP
+At least the following macros shall be defined for use with I_LOOK:
+.TP 7
+FMNAMESZ
+The minimum size in bytes of the buffer referred to by the \fIarg\fP
+argument.
+.sp
+.LP
+At least the following macros shall be defined for use with I_FLUSH:
+.TP 7
+FLUSHR
+Flush read queues.
+.TP 7
+FLUSHW
+Flush write queues.
+.TP 7
+FLUSHRW
+Flush read and write queues.
+.sp
+.LP
+At least the following macros shall be defined for use with I_SETSIG:
+.TP 7
+S_RDNORM
+A normal (priority band set to 0) message has arrived at the head
+of a STREAM head read queue.
+.TP 7
+S_RDBAND
+A message with a non-zero priority band has arrived at the head of
+a STREAM head read queue.
+.TP 7
+S_INPUT
+A message, other than a high-priority message, has arrived at the
+head of a STREAM head read queue.
+.TP 7
+S_HIPRI
+A high-priority message is present on a STREAM head read queue.
+.TP 7
+S_OUTPUT
+The write queue for normal data (priority band 0) just below the STREAM
+head is no longer full. This notifies the process that
+there is room on the queue for sending (or writing) normal data downstream.
+.TP 7
+S_WRNORM
+Equivalent to S_OUTPUT.
+.TP 7
+S_WRBAND
+The write queue for a non-zero priority band just below the STREAM
+head is no longer full.
+.TP 7
+S_MSG
+A STREAMS signal message that contains the SIGPOLL signal reaches
+the front of the STREAM head read queue.
+.TP 7
+S_ERROR
+Notification of an error condition reaches the STREAM head.
+.TP 7
+S_HANGUP
+Notification of a hangup reaches the STREAM head.
+.TP 7
+S_BANDURG
+When used in conjunction with S_RDBAND, SIGURG is generated instead
+of SIGPOLL when a priority message reaches the front of the
+STREAM head read queue.
+.sp
+.LP
+At least the following macros shall be defined for use with I_PEEK:
+.TP 7
+RS_HIPRI
+Only look for high-priority messages.
+.sp
+.LP
+At least the following macros shall be defined for use with I_SRDOPT:
+.TP 7
+RNORM
+Byte-STREAM mode, the default.
+.TP 7
+RMSGD
+Message-discard mode.
+.TP 7
+RMSGN
+Message-non-discard mode.
+.TP 7
+RPROTNORM
+Fail \fIread\fP() with [EBADMSG] if a message containing a control
+part is at the front
+of the STREAM head read queue.
+.TP 7
+RPROTDAT
+Deliver the control part of a message as data when a process issues
+a \fIread\fP().
+.TP 7
+RPROTDIS
+Discard the control part of a message, delivering any data part, when
+a process issues a \fIread\fP().
+.sp
+.LP
+At least the following macros shall be defined for use with I_SWOPT:
+.TP 7
+SNDZERO
+Send a zero-length message downstream when a \fIwrite\fP() of 0 bytes
+occurs.
+.sp
+.LP
+At least the following macros shall be defined for use with I_ATMARK:
+.TP 7
+ANYMARK
+Check if the message is marked.
+.TP 7
+LASTMARK
+Check if the message is the last one marked on the queue.
+.sp
+.LP
+At least the following macros shall be defined for use with I_UNLINK:
+.TP 7
+MUXID_ALL
+Unlink all STREAMs linked to the STREAM associated with \fIfildes\fP.
+.sp
+.LP
+The following macros shall be defined for \fIgetmsg\fP(), \fIgetpmsg\fP(),
+\fIputmsg\fP(), and \fIputpmsg\fP():
+.TP 7
+MSG_ANY
+Receive any message.
+.TP 7
+MSG_BAND
+Receive message from specified band.
+.TP 7
+MSG_HIPRI
+Send/receive high-priority message.
+.TP 7
+MORECTL
+More control information is left in message.
+.TP 7
+MOREDATA
+More data is left in message.
+.sp
+.LP
+The \fI<stropts.h>\fP header may make visible all of the symbols from
+\fI<unistd.h>\fP.
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBint isastream(int);
+int getmsg(int, struct strbuf *restrict, struct strbuf *restrict,
+ int *restrict);
+int getpmsg(int, struct strbuf *restrict, struct strbuf *restrict,
+ int *restrict, int *restrict);
+int ioctl(int, int, ... );
+int putmsg(int, const struct strbuf *, const struct strbuf *, int);
+int putpmsg(int, const struct strbuf *, const struct strbuf *, int,
+ int);
+int fattach(int, const char *);
+int fdetach(const char *);
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<sys/types.h>\fP, \fI<unistd.h>\fP, the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIclose\fP(), \fIfcntl\fP(),
+\fIgetmsg\fP(), \fIioctl\fP(), \fIopen\fP(), \fIpipe\fP(), \fIread\fP(),
+\fIpoll\fP(), \fIputmsg\fP(), \fIsignal\fP(), \fIwrite\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/sys_ipc.h.0p b/man-pages-posix-2003/man0p/sys_ipc.h.0p
new file mode 100644
index 0000000..25caf87
--- /dev/null
+++ b/man-pages-posix-2003/man0p/sys_ipc.h.0p
@@ -0,0 +1,100 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<sys/ipc.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <sys/ipc.h>
+.SH NAME
+sys/ipc.h \- XSI interprocess communication access structure
+.SH SYNOPSIS
+.LP
+\fB#include <sys/ipc.h> \fP
+.SH DESCRIPTION
+.LP
+The \fI<sys/ipc.h>\fP header is used by three mechanisms for XSI interprocess
+communication (IPC): messages, semaphores,
+and shared memory. All use a common structure type, \fBipc_perm\fP,
+to pass information used in determining permission to perform
+an IPC operation.
+.LP
+The \fBipc_perm\fP structure shall contain the following members:
+.sp
+.RS
+.nf
+
+\fBuid_t uid \fP Owner's user ID. \fB
+gid_t gid \fP Owner's group ID. \fB
+uid_t cuid \fP Creator's user ID. \fB
+gid_t cgid \fP Creator's group ID. \fB
+mode_t mode \fP Read/write permission. \fB
+\fP
+.fi
+.RE
+.LP
+The \fBuid_t\fP, \fBgid_t\fP, \fBmode_t\fP, and \fBkey_t\fP types
+shall be defined as described in \fI<sys/types.h>\fP .
+.LP
+Definitions shall be provided for the following constants:
+.LP
+Mode bits:
+.TP 7
+IPC_CREAT
+Create entry if key does not exist.
+.TP 7
+IPC_EXCL
+Fail if key exists.
+.TP 7
+IPC_NOWAIT
+Error if request must wait.
+.sp
+.LP
+Keys:
+.TP 7
+IPC_PRIVATE
+Private key.
+.sp
+.LP
+Control commands:
+.TP 7
+IPC_RMID
+Remove identifier.
+.TP 7
+IPC_SET
+Set options.
+.TP 7
+IPC_STAT
+Get options.
+.sp
+.LP
+The following shall be declared as a function and may also be defined
+as a macro. A function prototype shall be provided.
+.sp
+.RS
+.nf
+
+\fBkey_t ftok(const char *, int);
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<sys/types.h>\fP, the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001, \fIftok\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/sys_mman.h.0p b/man-pages-posix-2003/man0p/sys_mman.h.0p
new file mode 100644
index 0000000..e822d74
--- /dev/null
+++ b/man-pages-posix-2003/man0p/sys_mman.h.0p
@@ -0,0 +1,229 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<sys/mman.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <sys/mman.h>
+.SH NAME
+sys/mman.h \- memory management declarations
+.SH SYNOPSIS
+.LP
+\fB#include <sys/mman.h>\fP
+.SH DESCRIPTION
+.LP
+The \fI<sys/mman.h>\fP header shall be supported if the implementation
+supports at least one of the following
+options:
+.IP " *" 3
+The Memory Mapped Files option
+.LP
+.IP " *" 3
+The Shared Memory Objects option
+.LP
+.IP " *" 3
+The Process Memory Locking option
+.LP
+.IP " *" 3
+The Memory Protection option
+.LP
+.IP " *" 3
+The Typed Memory Objects option
+.LP
+.IP " *" 3
+The Synchronized Input and Output option
+.LP
+.IP " *" 3
+The Advisory Information option
+.LP
+.IP " *" 3
+The Typed Memory Objects option
+.LP
+.LP
+If one or more of the Advisory Information, Memory Mapped Files, or
+Shared Memory Objects options are supported, the following
+protection options shall be defined:
+.TP 7
+PROT_READ
+Page can be read.
+.TP 7
+PROT_WRITE
+Page can be written.
+.TP 7
+PROT_EXEC
+Page can be executed.
+.TP 7
+PROT_NONE
+Page cannot be accessed.
+.sp
+.LP
+The following \fIflag\fP options shall be defined:
+.TP 7
+MAP_SHARED
+Share changes.
+.TP 7
+MAP_PRIVATE
+Changes are private.
+.TP 7
+MAP_FIXED
+Interpret \fIaddr\fP exactly.
+.sp
+.LP
+The following flags shall be defined for \fImsync\fP():
+.TP 7
+MS_ASYNC
+Perform asynchronous writes.
+.TP 7
+MS_SYNC
+Perform synchronous writes.
+.TP 7
+MS_INVALIDATE
+Invalidate mappings.
+.sp
+.LP
+The following symbolic constants shall be defined for the \fImlockall\fP()
+function:
+.TP 7
+MCL_CURRENT
+Lock currently mapped pages.
+.TP 7
+MCL_FUTURE
+Lock pages that become mapped.
+.sp
+.LP
+The symbolic constant MAP_FAILED shall be defined to indicate a failure
+from the \fImmap\fP() function.
+.LP
+If the Advisory Information and either the Memory Mapped Files or
+Shared Memory Objects options are supported, values for
+\fIadvice\fP used by \fIposix_madvise\fP() shall be defined as follows:
+.TP 7
+POSIX_MADV_NORMAL
+.sp
+The application has no advice to give on its behavior with respect
+to the specified range. It is the default characteristic if no
+advice is given for a range of memory.
+.TP 7
+POSIX_MADV_SEQUENTIAL
+.sp
+The application expects to access the specified range sequentially
+from lower addresses to higher addresses.
+.TP 7
+POSIX_MADV_RANDOM
+.sp
+The application expects to access the specified range in a random
+order.
+.TP 7
+POSIX_MADV_WILLNEED
+.sp
+The application expects to access the specified range in the near
+future.
+.TP 7
+POSIX_MADV_DONTNEED
+.sp
+The application expects that it will not access the specified range
+in the near future.
+.sp
+.LP
+The following flags shall be defined for \fIposix_typed_mem_open\fP():
+.TP 7
+POSIX_TYPED_MEM_ALLOCATE
+.sp
+Allocate on \fImmap\fP().
+.TP 7
+POSIX_TYPED_MEM_ALLOCATE_CONTIG
+.sp
+Allocate contiguously on \fImmap\fP().
+.TP 7
+POSIX_TYPED_MEM_MAP_ALLOCATABLE
+.sp
+Map on \fImmap\fP(), without affecting allocatability.
+.sp
+.LP
+The \fBmode_t\fP, \fBoff_t\fP, and \fBsize_t\fP types shall be defined
+as described in \fI<sys/types.h>\fP .
+.LP
+The \fI<sys/mman.h>\fP header shall define the structure \fBposix_typed_mem_info\fP,
+which includes at least the
+following member:
+.sp
+.RS
+.nf
+
+\fBsize_t posix_tmi_length \fP Maximum length which may be allocated \fB
+ \fP from a typed memory object. \fB
+\fP
+.fi
+.RE
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fB
+int mlock(const void *, size_t);
+
+
+int mlockall(int);
+
+
+void *mmap(void *, size_t, int, int, int, off_t);
+
+
+int mprotect(void *, size_t, int);
+
+
+int msync(void *, size_t, int);
+
+
+int munlock(const void *, size_t);
+
+
+int munlockall(void);
+
+
+int munmap(void *, size_t);
+
+
+int posix_madvise(void *, size_t, int);
+
+
+int posix_mem_offset(const void *restrict, size_t, off_t *restrict,
+ size_t *restrict, int *restrict);
+int posix_typed_mem_get_info(int, struct posix_typed_mem_info *);
+int posix_typed_mem_open(const char *, int, int);
+
+
+int shm_open(const char *, int, mode_t);
+int shm_unlink(const char *);
+
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<sys/types.h>\fP, the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001, \fImlock\fP(), \fImlockall\fP(), \fImmap\fP(),
+\fImprotect\fP(), \fImsync\fP(), \fImunlock\fP(), \fImunlockall\fP(),
+\fImunmap\fP(), \fIposix_mem_offset\fP(),
+\fIposix_typed_mem_get_info\fP(), \fIposix_typed_mem_open\fP(), \fIshm_open\fP(),
+\fIshm_unlink\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/sys_msg.h.0p b/man-pages-posix-2003/man0p/sys_msg.h.0p
new file mode 100644
index 0000000..3263c2f
--- /dev/null
+++ b/man-pages-posix-2003/man0p/sys_msg.h.0p
@@ -0,0 +1,96 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<sys/msg.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <sys/msg.h>
+.SH NAME
+sys/msg.h \- XSI message queue structures
+.SH SYNOPSIS
+.LP
+\fB#include <sys/msg.h> \fP
+.SH DESCRIPTION
+.LP
+The \fI<sys/msg.h>\fP header shall define the following data types
+through \fBtypedef\fP:
+.TP 7
+\fBmsgqnum_t\fP
+Used for the number of messages in the message queue.
+.TP 7
+\fBmsglen_t\fP
+Used for the number of bytes allowed in a message queue.
+.sp
+.LP
+These types shall be unsigned integer types that are able to store
+values at least as large as a type \fBunsigned short\fP.
+.LP
+The \fI<sys/msg.h>\fP header shall define the following constant as
+a message operation flag:
+.TP 7
+MSG_NOERROR
+No error if big message.
+.sp
+.LP
+The \fBmsqid_ds\fP structure shall contain the following members:
+.sp
+.RS
+.nf
+
+\fBstruct ipc_perm msg_perm \fP Operation permission structure. \fB
+msgqnum_t msg_qnum \fP Number of messages currently on queue. \fB
+msglen_t msg_qbytes\fP Maximum number of bytes allowed on queue. \fB
+pid_t msg_lspid \fP Process ID of last \fImsgsnd\fP
+ (). \fB
+pid_t msg_lrpid \fP Process ID of last \fImsgrcv\fP
+ (). \fB
+time_t msg_stime \fP Time of last \fImsgsnd\fP
+ (). \fB
+time_t msg_rtime \fP Time of last \fImsgrcv\fP
+ (). \fB
+time_t msg_ctime \fP Time of last change. \fB
+\fP
+.fi
+.RE
+.LP
+The \fBpid_t\fP, \fBtime_t\fP, \fBkey_t\fP, \fBsize_t\fP, and \fBssize_t\fP
+types shall be defined as described in \fI<sys/types.h>\fP .
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBint msgctl(int, int, struct msqid_ds *);
+int msgget(key_t, int);
+ssize_t msgrcv(int, void *, size_t, long, int);
+int msgsnd(int, const void *, size_t, int);
+\fP
+.fi
+.RE
+.LP
+In addition, all of the symbols from \fI<sys/ipc.h>\fP shall be defined
+when
+this header is included.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<sys/ipc.h>\fP, \fI<sys/types.h>\fP, \fImsgctl\fP(), \fImsgget\fP(),
+\fImsgrcv\fP(), \fImsgsnd\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/sys_resource.h.0p b/man-pages-posix-2003/man0p/sys_resource.h.0p
new file mode 100644
index 0000000..ffdf461
--- /dev/null
+++ b/man-pages-posix-2003/man0p/sys_resource.h.0p
@@ -0,0 +1,158 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<sys/resource.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <sys/resource.h>
+.SH NAME
+sys/resource.h \- definitions for XSI resource operations
+.SH SYNOPSIS
+.LP
+\fB#include <sys/resource.h> \fP
+.SH DESCRIPTION
+.LP
+The \fI<sys/resource.h>\fP header shall define the following symbolic
+constants as possible values of the \fIwhich\fP
+argument of \fIgetpriority\fP() and \fIsetpriority\fP():
+.TP 7
+PRIO_PROCESS
+Identifies the \fIwho\fP argument as a process ID.
+.TP 7
+PRIO_PGRP
+Identifies the \fIwho\fP argument as a process group ID.
+.TP 7
+PRIO_USER
+Identifies the \fIwho\fP argument as a user ID.
+.sp
+.LP
+The following type shall be defined through \fBtypedef\fP:
+.TP 7
+\fBrlim_t\fP
+Unsigned integer type used for limit values.
+.sp
+.LP
+The following symbolic constants shall be defined:
+.TP 7
+RLIM_INFINITY
+A value of \fBrlim_t\fP indicating no limit.
+.TP 7
+RLIM_SAVED_MAX
+A value of type \fBrlim_t\fP indicating an unrepresentable saved hard
+limit.
+.TP 7
+RLIM_SAVED_CUR
+A value of type \fBrlim_t\fP indicating an unrepresentable saved soft
+limit.
+.sp
+.LP
+On implementations where all resource limits are representable in
+an object of type \fBrlim_t\fP, RLIM_SAVED_MAX and
+RLIM_SAVED_CUR need not be distinct from RLIM_INFINITY.
+.LP
+The following symbolic constants shall be defined as possible values
+of the \fIwho\fP parameter of \fIgetrusage\fP():
+.TP 7
+RUSAGE_SELF
+Returns information about the current process.
+.TP 7
+RUSAGE_CHILDREN
+Returns information about children of the current process.
+.sp
+.LP
+The \fI<sys/resource.h>\fP header shall define the \fBrlimit\fP structure
+that includes at least the following
+members:
+.sp
+.RS
+.nf
+
+\fBrlim_t rlim_cur \fP The current (soft) limit. \fB
+rlim_t rlim_max \fP The hard limit. \fB
+\fP
+.fi
+.RE
+.LP
+The \fI<sys/resource.h>\fP header shall define the \fBrusage\fP structure
+that includes at least the following
+members:
+.sp
+.RS
+.nf
+
+\fBstruct timeval ru_utime \fP User time used. \fB
+struct timeval ru_stime \fP System time used. \fB
+\fP
+.fi
+.RE
+.LP
+The \fBtimeval\fP structure shall be defined as described in \fI<sys/time.h>\fP
+\&.
+.LP
+The following symbolic constants shall be defined as possible values
+for the \fIresource\fP argument of \fIgetrlimit\fP() and \fIsetrlimit\fP():
+.TP 7
+RLIMIT_CORE
+Limit on size of \fBcore\fP file.
+.TP 7
+RLIMIT_CPU
+Limit on CPU time per process.
+.TP 7
+RLIMIT_DATA
+Limit on data segment size.
+.TP 7
+RLIMIT_FSIZE
+Limit on file size.
+.TP 7
+RLIMIT_NOFILE
+Limit on number of open files.
+.TP 7
+RLIMIT_STACK
+Limit on stack size.
+.TP 7
+RLIMIT_AS
+Limit on address space size.
+.sp
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBint getpriority(int, id_t);
+int getrlimit(int, struct rlimit *);
+int getrusage(int, struct rusage *);
+int setpriority(int, id_t, int);
+int setrlimit(int, const struct rlimit *);
+\fP
+.fi
+.RE
+.LP
+The \fBid_t\fP type shall be defined through \fBtypedef\fP as described
+in \fI<sys/types.h>\fP .
+.LP
+Inclusion of the \fI<sys/resource.h>\fP header may also make visible
+all symbols from \fI<sys/time.h>\fP.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<sys/time.h>\fP, \fI<sys/types.h>\fP, the System Interfaces volume
+of IEEE\ Std\ 1003.1-2001, \fIgetpriority\fP(), \fIgetrusage\fP(),
+\fIgetrlimit\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/sys_select.h.0p b/man-pages-posix-2003/man0p/sys_select.h.0p
new file mode 100644
index 0000000..5ea026c
--- /dev/null
+++ b/man-pages-posix-2003/man0p/sys_select.h.0p
@@ -0,0 +1,115 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<sys/select.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <sys/select.h>
+.SH NAME
+sys/select.h \- select types
+.SH SYNOPSIS
+.LP
+\fB#include <sys/select.h>\fP
+.SH DESCRIPTION
+.LP
+The \fI<sys/select.h>\fP header shall define the \fBtimeval\fP structure
+that includes at least the following
+members:
+.sp
+.RS
+.nf
+
+\fBtime_t tv_sec \fP Seconds. \fB
+suseconds_t tv_usec \fP Microseconds. \fB
+\fP
+.fi
+.RE
+.LP
+The \fBtime_t\fP and \fBsuseconds_t\fP types shall be defined as described
+in \fI<sys/types.h>\fP .
+.LP
+The \fBsigset_t\fP type shall be defined as described in \fI<signal.h>\fP
+\&.
+.LP
+The \fBtimespec\fP structure shall be defined as described in \fI<time.h>\fP
+\&.
+.LP
+The \fI<sys/select.h>\fP header shall define the \fBfd_set\fP type
+as a structure.
+.LP
+Each of the following may be declared as a function, or defined as
+a macro, or both:
+.TP 7
+\fBvoid\fP \fIFD_CLR\fP(\fBint\fP \fIfd\fP, \fBfd_set *\fP\fIfdset\fP)
+.sp
+Clears the bit for the file descriptor \fIfd\fP in the file descriptor
+set \fIfdset\fP.
+.TP 7
+\fBint\fP \fIFD_ISSET\fP(\fBint\fP \fIfd\fP, \fBfd_set *\fP\fIfdset\fP)
+.sp
+Returns a non-zero value if the bit for the file descriptor \fIfd\fP
+is set in the file descriptor set by \fIfdset\fP, and 0
+otherwise.
+.TP 7
+\fBvoid\fP \fIFD_SET\fP(\fBint\fP \fIfd\fP, \fBfd_set *\fP\fIfdset\fP)
+.sp
+Sets the bit for the file descriptor \fIfd\fP in the file descriptor
+set \fIfdset\fP.
+.TP 7
+\fBvoid\fP \fIFD_ZERO\fP(\fBfd_set *\fP\fIfdset\fP)
+.sp
+Initializes the file descriptor set \fIfdset\fP to have zero bits
+for all file descriptors.
+.sp
+.LP
+If implemented as macros, these may evaluate their arguments more
+than once, so applications should ensure that the arguments
+they supply are never expressions with side effects.
+.LP
+The following shall be defined as a macro:
+.TP 7
+FD_SETSIZE
+.sp
+Maximum number of file descriptors in an \fBfd_set\fP structure.
+.sp
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBint pselect(int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
+ const struct timespec *restrict, const sigset_t *restrict);
+int select(int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
+ struct timeval *restrict);
+\fP
+.fi
+.RE
+.LP
+Inclusion of the \fI<sys/select.h>\fP header may make visible all
+symbols from the headers \fI<signal.h>\fP, \fI<sys/time.h>\fP,
+and \fI<time.h>\fP.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<signal.h>\fP, \fI<sys/time.h>\fP,
+\fI<sys/types.h>\fP, \fI<time.h>\fP, the
+System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIpselect\fP(),
+\fIselect\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/sys_sem.h.0p b/man-pages-posix-2003/man0p/sys_sem.h.0p
new file mode 100644
index 0000000..13120f4
--- /dev/null
+++ b/man-pages-posix-2003/man0p/sys_sem.h.0p
@@ -0,0 +1,131 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<sys/sem.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <sys/sem.h>
+.SH NAME
+sys/sem.h \- XSI semaphore facility
+.SH SYNOPSIS
+.LP
+\fB#include <sys/sem.h> \fP
+.SH DESCRIPTION
+.LP
+The \fI<sys/sem.h>\fP header shall define the following constants
+and structures.
+.LP
+Semaphore operation flags:
+.TP 7
+SEM_UNDO
+Set up adjust on exit entry.
+.sp
+.LP
+Command definitions for the \fIsemctl\fP() function shall be provided
+as follows:
+.TP 7
+GETNCNT
+Get \fIsemncnt\fP.
+.TP 7
+GETPID
+Get \fIsempid\fP.
+.TP 7
+GETVAL
+Get \fIsemval\fP.
+.TP 7
+GETALL
+Get all cases of \fIsemval\fP.
+.TP 7
+GETZCNT
+Get \fIsemzcnt\fP.
+.TP 7
+SETVAL
+Set \fIsemval\fP.
+.TP 7
+SETALL
+Set all cases of \fIsemval\fP.
+.sp
+.LP
+The \fBsemid_ds\fP structure shall contain the following members:
+.sp
+.RS
+.nf
+
+\fBstruct ipc_perm sem_perm \fP Operation permission structure. \fB
+unsigned short sem_nsems\fP Number of semaphores in set. \fB
+time_t sem_otime\fP Last \fIsemop\fP
+ () time. \fB
+time_t sem_ctime\fP Last time changed by \fIsemctl\fP
+ (). \fB
+\fP
+.fi
+.RE
+.LP
+The \fBpid_t\fP, \fBtime_t\fP, \fBkey_t\fP, and \fBsize_t\fP types
+shall be defined as described in \fI<sys/types.h>\fP .
+.LP
+A semaphore shall be represented by an anonymous structure containing
+the following members:
+.sp
+.RS
+.nf
+
+\fBunsigned short semval \fP Semaphore value. \fB
+pid_t sempid \fP Process ID of last operation. \fB
+unsigned short semncnt \fP Number of processes waiting for \fIsemval\fP \fB
+ \fP to become greater than current value. \fB
+unsigned short semzcnt \fP Number of processes waiting for \fIsemval\fP \fB
+ \fP to become 0. \fB
+\fP
+.fi
+.RE
+.LP
+The \fBsembuf\fP structure shall contain the following members:
+.sp
+.RS
+.nf
+
+\fBunsigned short sem_num \fP Semaphore number. \fB
+short sem_op \fP Semaphore operation. \fB
+short sem_flg \fP Operation flags. \fB
+\fP
+.fi
+.RE
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBint semctl(int, int, int, ...);
+int semget(key_t, int, int);
+int semop(int, struct sembuf *, size_t);
+\fP
+.fi
+.RE
+.LP
+In addition, all of the symbols from \fI<sys/ipc.h>\fP shall be defined
+when
+this header is included.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<sys/ipc.h>\fP, \fI<sys/types.h>\fP, \fIsemctl\fP(), \fIsemget\fP(),
+\fIsemop\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/sys_shm.h.0p b/man-pages-posix-2003/man0p/sys_shm.h.0p
new file mode 100644
index 0000000..75c6b8a
--- /dev/null
+++ b/man-pages-posix-2003/man0p/sys_shm.h.0p
@@ -0,0 +1,99 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<sys/shm.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <sys/shm.h>
+.SH NAME
+sys/shm.h \- XSI shared memory facility
+.SH SYNOPSIS
+.LP
+\fB#include <sys/shm.h> \fP
+.SH DESCRIPTION
+.LP
+The \fI<sys/shm.h>\fP header shall define the following symbolic constants:
+.TP 7
+SHM_RDONLY
+Attach read-only (else read-write).
+.TP 7
+SHM_RND
+Round attach address to SHMLBA.
+.sp
+.LP
+The \fI<sys/shm.h>\fP header shall define the following symbolic value:
+.TP 7
+SHMLBA
+Segment low boundary address multiple.
+.sp
+.LP
+The following data types shall be defined through \fBtypedef\fP:
+.TP 7
+\fBshmatt_t\fP
+Unsigned integer used for the number of current attaches that must
+be able to store values at least as large as a type
+\fBunsigned short\fP.
+.sp
+.LP
+The \fBshmid_ds\fP structure shall contain the following members:
+.sp
+.RS
+.nf
+
+\fBstruct ipc_perm shm_perm \fP Operation permission structure. \fB
+size_t shm_segsz \fP Size of segment in bytes. \fB
+pid_t shm_lpid \fP Process ID of last shared memory operation. \fB
+pid_t shm_cpid \fP Process ID of creator. \fB
+shmatt_t shm_nattch\fP Number of current attaches. \fB
+time_t shm_atime \fP Time of last \fIshmat\fP
+ (). \fB
+time_t shm_dtime \fP Time of last \fIshmdt\fP
+ (). \fB
+time_t shm_ctime \fP Time of last change by \fIshmctl\fP
+ (). \fB
+\fP
+.fi
+.RE
+.LP
+The \fBpid_t\fP, \fBtime_t\fP, \fBkey_t\fP, and \fBsize_t\fP types
+shall be defined as described in \fI<sys/types.h>\fP .
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBvoid *shmat(int, const void *, int);
+int shmctl(int, int, struct shmid_ds *);
+int shmdt(const void *);
+int shmget(key_t, size_t, int);
+\fP
+.fi
+.RE
+.LP
+In addition, all of the symbols from \fI<sys/ipc.h>\fP shall be defined
+when
+this header is included.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<sys/ipc.h>\fP, \fI<sys/types.h>\fP, the System Interfaces volume
+of IEEE\ Std\ 1003.1-2001, \fIshmat\fP(), \fIshmctl\fP(), \fIshmdt\fP(),
+\fIshmget\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/sys_socket.h.0p b/man-pages-posix-2003/man0p/sys_socket.h.0p
new file mode 100644
index 0000000..abf5553
--- /dev/null
+++ b/man-pages-posix-2003/man0p/sys_socket.h.0p
@@ -0,0 +1,446 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<sys/socket.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <sys/socket.h>
+.SH NAME
+sys/socket.h \- main sockets header
+.SH SYNOPSIS
+.LP
+\fB#include <sys/socket.h>\fP
+.SH DESCRIPTION
+.LP
+The \fI<sys/socket.h>\fP header shall define the type \fBsocklen_t\fP,
+which is an integer type of width of at least 32
+bits; see APPLICATION USAGE.
+.LP
+The \fI<sys/socket.h>\fP header shall define the unsigned integer
+type \fBsa_family_t\fP.
+.LP
+The \fI<sys/socket.h>\fP header shall define the \fBsockaddr\fP structure
+that includes at least the following
+members:
+.sp
+.RS
+.nf
+
+\fBsa_family_t sa_family \fP Address family. \fB
+char sa_data[] \fP Socket address (variable-length data). \fB
+\fP
+.fi
+.RE
+.LP
+The \fBsockaddr\fP structure is used to define a socket address which
+is used in the \fIbind\fP(), \fIconnect\fP(), \fIgetpeername\fP(),
+\fIgetsockname\fP(),
+\fIrecvfrom\fP(), and \fIsendto\fP()
+functions.
+.LP
+The \fI<sys/socket.h>\fP header shall define the \fBsockaddr_storage\fP
+structure. This structure shall be:
+.IP " *" 3
+Large enough to accommodate all supported protocol-specific address
+structures
+.LP
+.IP " *" 3
+Aligned at an appropriate boundary so that pointers to it can be cast
+as pointers to protocol-specific address structures and
+used to access the fields of those structures without alignment problems
+.LP
+.LP
+The \fBsockaddr_storage\fP structure shall contain at least the following
+members:
+.sp
+.RS
+.nf
+
+\fBsa_family_t ss_family
+\fP
+.fi
+.RE
+.LP
+When a \fBsockaddr_storage\fP structure is cast as a \fBsockaddr\fP
+structure, the \fIss_family\fP field of the
+\fBsockaddr_storage\fP structure shall map onto the \fIsa_family\fP
+field of the \fBsockaddr\fP structure. When a
+\fBsockaddr_storage\fP structure is cast as a protocol-specific address
+structure, the \fIss_family\fP field shall map onto a
+field of that structure that is of type \fBsa_family_t\fP and that
+identifies the protocol's address family.
+.LP
+The \fI<sys/socket.h>\fP header shall define the \fBmsghdr\fP structure
+that includes at least the following
+members:
+.sp
+.RS
+.nf
+
+\fBvoid *msg_name \fP Optional address. \fB
+socklen_t msg_namelen \fP Size of address. \fB
+struct iovec *msg_iov \fP Scatter/gather array. \fB
+int msg_iovlen \fP Members in \fImsg_iov\fP. \fB
+void *msg_control \fP Ancillary data; see below. \fB
+socklen_t msg_controllen \fP Ancillary data buffer \fIlen\fP. \fB
+int msg_flags \fP Flags on received message. \fB
+\fP
+.fi
+.RE
+.LP
+The \fBmsghdr\fP structure is used to minimize the number of directly
+supplied parameters to the \fIrecvmsg\fP() and \fIsendmsg\fP() functions.
+This
+structure is used as a \fIvalue\fP- \fIresult\fP parameter in the
+\fIrecvmsg\fP()
+function and \fIvalue\fP only for the \fIsendmsg\fP() function.
+.LP
+The \fBiovec\fP structure shall be defined as described in \fI<sys/uio.h>\fP
+\&.
+.LP
+The \fI<sys/socket.h>\fP header shall define the \fBcmsghdr\fP structure
+that includes at least the following
+members:
+.sp
+.RS
+.nf
+
+\fBsocklen_t cmsg_len \fP Data byte count, including the \fBcmsghdr\fP. \fB
+int cmsg_level \fP Originating protocol. \fB
+int cmsg_type \fP Protocol-specific type. \fB
+\fP
+.fi
+.RE
+.LP
+The \fBcmsghdr\fP structure is used for storage of ancillary data
+object information.
+.LP
+Ancillary data consists of a sequence of pairs, each consisting of
+a \fBcmsghdr\fP structure followed by a data array. The data
+array contains the ancillary data message, and the \fBcmsghdr\fP structure
+contains descriptive information that allows an
+application to correctly parse the data.
+.LP
+The values for \fIcmsg_level\fP shall be legal values for the \fIlevel\fP
+argument to the \fIgetsockopt\fP() and \fIsetsockopt\fP()
+functions. The system documentation shall specify the \fIcmsg_type\fP
+definitions for the supported protocols.
+.LP
+Ancillary data is also possible at the socket level. The \fI<sys/socket.h>\fP
+header defines the following macro for use
+as the \fIcmsg_type\fP value when \fIcmsg_level\fP is SOL_SOCKET:
+.TP 7
+SCM_RIGHTS
+Indicates that the data array contains the access rights to be sent
+or received.
+.sp
+.LP
+The \fI<sys/socket.h>\fP header defines the following macros to gain
+access to the data arrays in the ancillary data
+associated with a message header:
+.TP 7
+CMSG_DATA(\fIcmsg\fP)
+.sp
+If the argument is a pointer to a \fBcmsghdr\fP structure, this macro
+shall return an unsigned character pointer to the data array
+associated with the \fBcmsghdr\fP structure.
+.TP 7
+CMSG_NXTHDR(\fImhdr,cmsg\fP)
+.sp
+If the first argument is a pointer to a \fBmsghdr\fP structure and
+the second argument is a pointer to a \fBcmsghdr\fP structure
+in the ancillary data pointed to by the \fImsg_control\fP field of
+that \fBmsghdr\fP structure, this macro shall return a pointer
+to the next \fBcmsghdr\fP structure, or a null pointer if this structure
+is the last \fBcmsghdr\fP in the ancillary data.
+.TP 7
+CMSG_FIRSTHDR(\fImhdr\fP)
+.sp
+If the argument is a pointer to a \fBmsghdr\fP structure, this macro
+shall return a pointer to the first \fBcmsghdr\fP structure
+in the ancillary data associated with this \fBmsghdr\fP structure,
+or a null pointer if there is no ancillary data associated with
+the \fBmsghdr\fP structure.
+.sp
+.LP
+The \fI<sys/socket.h>\fP header shall define the \fBlinger\fP structure
+that includes at least the following
+members:
+.sp
+.RS
+.nf
+
+\fBint l_onoff \fP Indicates whether linger option is enabled. \fB
+int l_linger \fP Linger time, in seconds. \fB
+\fP
+.fi
+.RE
+.LP
+The \fI<sys/socket.h>\fP header shall define the following macros,
+with distinct integer values:
+.TP 7
+SOCK_DGRAM
+Datagram socket.
+.TP 7
+SOCK_RAW
+Raw Protocol Interface.
+.TP 7
+SOCK_SEQPACKET
+Sequenced-packet socket.
+.TP 7
+SOCK_STREAM
+Byte-stream socket.
+.sp
+.LP
+The \fI<sys/socket.h>\fP header shall define the following macro for
+use as the \fIlevel\fP argument of \fIsetsockopt\fP() and \fIgetsockopt\fP().
+.TP 7
+SOL_SOCKET
+Options to be accessed at socket level, not protocol level.
+.sp
+.LP
+The \fI<sys/socket.h>\fP header shall define the following macros,
+with distinct integer values, for use as the
+\fIoption_name\fP argument in \fIgetsockopt\fP() or \fIsetsockopt\fP()
+calls:
+.TP 7
+SO_ACCEPTCONN
+Socket is accepting connections.
+.TP 7
+SO_BROADCAST
+Transmission of broadcast messages is supported.
+.TP 7
+SO_DEBUG
+Debugging information is being recorded.
+.TP 7
+SO_DONTROUTE
+Bypass normal routing.
+.TP 7
+SO_ERROR
+Socket error status.
+.TP 7
+SO_KEEPALIVE
+Connections are kept alive with periodic messages.
+.TP 7
+SO_LINGER
+Socket lingers on close.
+.TP 7
+SO_OOBINLINE
+Out-of-band data is transmitted in line.
+.TP 7
+SO_RCVBUF
+Receive buffer size.
+.TP 7
+SO_RCVLOWAT
+Receive ``low water mark''.
+.TP 7
+SO_RCVTIMEO
+Receive timeout.
+.TP 7
+SO_REUSEADDR
+Reuse of local addresses is supported.
+.TP 7
+SO_SNDBUF
+Send buffer size.
+.TP 7
+SO_SNDLOWAT
+Send ``low water mark''.
+.TP 7
+SO_SNDTIMEO
+Send timeout.
+.TP 7
+SO_TYPE
+Socket type.
+.sp
+.LP
+The \fI<sys/socket.h>\fP header shall define the following macro as
+the maximum \fIbacklog\fP queue length which may be
+specified by the \fIbacklog\fP field of the \fIlisten\fP() function:
+.TP 7
+SOMAXCONN
+The maximum \fIbacklog\fP queue length.
+.sp
+.LP
+The \fI<sys/socket.h>\fP header shall define the following macros,
+with distinct integer values, for use as the valid
+values for the \fImsg_flags\fP field in the \fBmsghdr\fP structure,
+or the \fIflags\fP parameter in \fIrecvfrom\fP(), \fIrecvmsg\fP(),
+\fIsendmsg\fP(), or \fIsendto\fP() calls:
+.TP 7
+MSG_CTRUNC
+Control data truncated.
+.TP 7
+MSG_DONTROUTE
+Send without using routing tables.
+.TP 7
+MSG_EOR
+Terminates a record (if supported by the protocol).
+.TP 7
+MSG_OOB
+Out-of-band data.
+.TP 7
+MSG_PEEK
+Leave received data in queue.
+.TP 7
+MSG_TRUNC
+Normal data truncated.
+.TP 7
+MSG_WAITALL
+Attempt to fill the read buffer.
+.sp
+.LP
+The \fI<sys/socket.h>\fP header shall define the following macros,
+with distinct integer values:
+.TP 7
+AF_INET
+Internet domain sockets for use with IPv4 addresses.
+.TP 7
+AF_INET6
+Internet domain sockets for use with IPv6 addresses.
+.TP 7
+AF_UNIX
+UNIX domain sockets.
+.TP 7
+AF_UNSPEC
+Unspecified.
+.sp
+.LP
+The \fI<sys/socket.h>\fP header shall define the following macros,
+with distinct integer values:
+.TP 7
+SHUT_RD
+Disables further receive operations.
+.TP 7
+SHUT_RDWR
+Disables further send and receive operations.
+.TP 7
+SHUT_WR
+Disables further send operations.
+.sp
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBint accept(int, struct sockaddr *restrict, socklen_t *restrict);
+int bind(int, const struct sockaddr *, socklen_t);
+int connect(int, const struct sockaddr *, socklen_t);
+int getpeername(int, struct sockaddr *restrict, socklen_t *restrict);
+int getsockname(int, struct sockaddr *restrict, socklen_t *restrict);
+int getsockopt(int, int, int, void *restrict, socklen_t *restrict);
+int listen(int, int);
+ssize_t recv(int, void *, size_t, int);
+ssize_t recvfrom(int, void *restrict, size_t, int,
+ struct sockaddr *restrict, socklen_t *restrict);
+ssize_t recvmsg(int, struct msghdr *, int);
+ssize_t send(int, const void *, size_t, int);
+ssize_t sendmsg(int, const struct msghdr *, int);
+ssize_t sendto(int, const void *, size_t, int, const struct sockaddr *,
+ socklen_t);
+int setsockopt(int, int, int, const void *, socklen_t);
+int shutdown(int, int);
+int socket(int, int, int);
+int sockatmark(int);
+int socketpair(int, int, int, int[2]);
+\fP
+.fi
+.RE
+.LP
+Inclusion of \fI<sys/socket.h>\fP may also make visible all symbols
+from \fI<sys/uio.h>\fP.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+To forestall portability problems, it is recommended that applications
+not use values larger than 2**31
+-1 for the \fBsocklen_t\fP type.
+.LP
+The \fBsockaddr_storage\fP structure solves the problem of declaring
+storage for automatic variables which is both large enough
+and aligned enough for storing the socket address data structure of
+any family. For example, code with a file descriptor and
+without the context of the address family can pass a pointer to a
+variable of this type, where a pointer to a socket address
+structure is expected in calls such as \fIgetpeername\fP(), and determine
+the
+address family by accessing the received content after the call.
+.LP
+The example below illustrates a data structure which aligns on a 64-bit
+boundary. An implementation-defined field
+\fI_ss_align\fP following \fI_ss_pad1\fP is used to force a 64-bit
+alignment which covers proper alignment good enough for needs
+of at least \fBsockaddr_in6\fP (IPv6) and \fBsockaddr_in\fP (IPv4)
+address data structures. The size of padding field
+\fI_ss_pad1\fP depends on the chosen alignment boundary. The size
+of padding field \fI_ss_pad2\fP depends on the value of overall
+size chosen for the total size of the structure. This size and alignment
+are represented in the above example by
+implementation-defined (not required) constants _SS_MAXSIZE (chosen
+value 128) and _SS_ALIGNMENT (with chosen value 8). Constants
+_SS_PAD1SIZE (derived value 6) and _SS_PAD2SIZE (derived value 112)
+are also for illustration and not required. The
+implementation-defined definitions and structure field names above
+start with an underscore to denote implementation private name
+space. Portable code is not expected to access or reference those
+fields or constants.
+.sp
+.RS
+.nf
+
+\fB/*
+ * Desired design of maximum size and alignment.
+ */
+#define _SS_MAXSIZE 128
+ /* Implementation-defined maximum size. */
+#define _SS_ALIGNSIZE (sizeof(int64_t))
+ /* Implementation-defined desired alignment. */
+.sp
+
+/*
+ * Definitions used for sockaddr_storage structure paddings design.
+ */
+#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(sa_family_t))
+#define _SS_PAD2SIZE (_SS_MAXSIZE - (sizeof(sa_family_t)+ \\
+ _SS_PAD1SIZE + _SS_ALIGNSIZE))
+struct sockaddr_storage {
+ sa_family_t ss_family; /* Address family. */
+/*
+ * Following fields are implementation-defined.
+ */
+ char _ss_pad1[_SS_PAD1SIZE];
+ /* 6-byte pad; this is to make implementation-defined
+ pad up to alignment field that follows explicit in
+ the data structure. */
+ int64_t _ss_align; /* Field to force desired structure
+ storage alignment. */
+ char _ss_pad2[_SS_PAD2SIZE];
+ /* 112-byte pad to achieve desired size,
+ _SS_MAXSIZE value minus size of ss_family
+ __ss_pad1, __ss_align fields is 112. */
+};
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<sys/uio.h>\fP, the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001, \fIaccept\fP(), \fIbind\fP(), \fIconnect\fP(),
+\fIgetpeername\fP(), \fIgetsockname\fP(),
+\fIgetsockopt\fP(), \fIlisten\fP(), \fIrecv\fP(), \fIrecvfrom\fP(),
+\fIrecvmsg\fP(), \fIsend\fP(), \fIsendmsg\fP(), \fIsendto\fP(), \fIsetsockopt\fP(),
+\fIshutdown\fP(), \fIsocket\fP(), \fIsocketpair\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/sys_stat.h.0p b/man-pages-posix-2003/man0p/sys_stat.h.0p
new file mode 100644
index 0000000..234f871
--- /dev/null
+++ b/man-pages-posix-2003/man0p/sys_stat.h.0p
@@ -0,0 +1,355 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<sys/stat.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <sys/stat.h>
+.SH NAME
+sys/stat.h \- data returned by the stat() function
+.SH SYNOPSIS
+.LP
+\fB#include <sys/stat.h>\fP
+.SH DESCRIPTION
+.LP
+The \fI<sys/stat.h>\fP header shall define the structure of the data
+returned by the functions \fIfstat\fP(), \fIlstat\fP(), and \fIstat\fP().
+.LP
+The \fBstat\fP structure shall contain at least the following members:
+.sp
+.RS
+.nf
+
+\fBdev_t st_dev \fP Device ID of device containing file. \fB
+ino_t st_ino \fP File serial number. \fB
+mode_t st_mode \fP Mode of file (see below). \fB
+nlink_t st_nlink \fP Number of hard links to the file. \fB
+uid_t st_uid \fP User ID of file. \fB
+gid_t st_gid \fP Group ID of file. \fB
+
+dev_t st_rdev \fP Device ID (if file is character or block special). \fB
+
+off_t st_size \fP For regular files, the file size in bytes. \fB
+ \fP For symbolic links, the length in bytes of the \fB
+ \fP pathname contained in the symbolic link. \fB
+
+ \fP For a shared memory object, the length in bytes. \fB
+
+
+ \fP For a typed memory object, the length in bytes. \fB
+
+ \fP For other file types, the use of this field is \fB
+ \fP unspecified. \fB
+time_t st_atime \fP Time of last access. \fB
+time_t st_mtime \fP Time of last data modification. \fB
+time_t st_ctime \fP Time of last status change. \fB
+
+blksize_t st_blksize\fP A file system-specific preferred I/O block size for \fB
+ \fP this object. In some file system types, this may \fB
+ \fP vary from file to file. \fB
+blkcnt_t st_blocks \fP Number of blocks allocated for this object. \fB
+
+\fP
+.fi
+.RE
+.LP
+The \fIst_ino\fP and \fIst_dev\fP fields taken together uniquely identify
+the file within the system. The \fBblkcnt_t\fP,
+\fBblksize_t\fP, \fBdev_t\fP, \fBino_t\fP, \fBmode_t\fP, \fBnlink_t\fP,
+\fBuid_t\fP, \fBgid_t\fP, \fBoff_t\fP, and
+\fBtime_t\fP types shall be defined as described in \fI<sys/types.h>\fP
+\&. Times
+shall be given in seconds since the Epoch.
+.LP
+Unless otherwise specified, the structure members \fIst_mode\fP, \fIst_ino\fP,
+\fIst_dev\fP, \fIst_uid\fP, \fIst_gid\fP,
+\fIst_atime\fP, \fIst_ctime\fP, and \fIst_mtime\fP shall have meaningful
+values for all file types defined in
+IEEE\ Std\ 1003.1-2001.
+.LP
+For symbolic links, the \fIst_mode\fP member shall contain meaningful
+information, which can be used with the file type macros
+described below, that take a \fImode\fP argument. The \fIst_size\fP
+member shall contain the length, in bytes, of the pathname
+contained in the symbolic link. File mode bits and the contents of
+the remaining members of the \fBstat\fP structure are
+unspecified. The value returned in the \fIst_size\fP field shall be
+the length of the contents of the symbolic link, and shall not
+count a trailing null if one is present.
+.LP
+The following symbolic names for the values of type \fBmode_t\fP shall
+also be defined.
+.LP
+File type:
+.TP 7
+S_IFMT
+Type of file.
+.TP 7
+S_IFBLK
+.RS
+Block special.
+.RE
+.TP 7
+S_IFCHR
+.RS
+Character special.
+.RE
+.TP 7
+S_IFIFO
+.RS
+FIFO special.
+.RE
+.TP 7
+S_IFREG
+.RS
+Regular.
+.RE
+.TP 7
+S_IFDIR
+.RS
+Directory.
+.RE
+.TP 7
+S_IFLNK
+.RS
+Symbolic link.
+.RE
+.TP 7
+S_IFSOCK
+.RS
+Socket.
+.RE
+.sp
+.sp
+.LP
+File mode bits:
+.TP 7
+S_IRWXU
+Read, write, execute/search by owner.
+.TP 7
+S_IRUSR
+.RS
+Read permission, owner.
+.RE
+.TP 7
+S_IWUSR
+.RS
+Write permission, owner.
+.RE
+.TP 7
+S_IXUSR
+.RS
+Execute/search permission, owner.
+.RE
+.sp
+.TP 7
+S_IRWXG
+Read, write, execute/search by group.
+.TP 7
+S_IRGRP
+.RS
+Read permission, group.
+.RE
+.TP 7
+S_IWGRP
+.RS
+Write permission, group.
+.RE
+.TP 7
+S_IXGRP
+.RS
+Execute/search permission, group.
+.RE
+.sp
+.TP 7
+S_IRWXO
+Read, write, execute/search by others.
+.TP 7
+S_IROTH
+.RS
+Read permission, others.
+.RE
+.TP 7
+S_IWOTH
+.RS
+Write permission, others.
+.RE
+.TP 7
+S_IXOTH
+.RS
+Execute/search permission, others.
+.RE
+.sp
+.TP 7
+S_ISUID
+Set-user-ID on execution.
+.TP 7
+S_ISGID
+Set-group-ID on execution.
+.TP 7
+S_ISVTX
+On directories, restricted deletion flag.
+.sp
+.LP
+The bits defined by S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IWGRP, S_IXGRP,
+S_IROTH, S_IWOTH, S_IXOTH, S_ISUID, S_ISGID, and
+S_ISVTX shall be unique.
+.LP
+S_IRWXU is the bitwise-inclusive OR of S_IRUSR, S_IWUSR, and S_IXUSR.
+.LP
+S_IRWXG is the bitwise-inclusive OR of S_IRGRP, S_IWGRP, and S_IXGRP.
+.LP
+S_IRWXO is the bitwise-inclusive OR of S_IROTH, S_IWOTH, and S_IXOTH.
+.LP
+Implementations may OR other implementation-defined bits into S_IRWXU,
+S_IRWXG, and S_IRWXO, but they shall not overlap any of
+the other bits defined in this volume of IEEE\ Std\ 1003.1-2001. The
+\fIfile permission bits\fP are defined to be those
+corresponding to the bitwise-inclusive OR of S_IRWXU, S_IRWXG, and
+S_IRWXO.
+.LP
+The following macros shall be provided to test whether a file is of
+the specified type. The value \fIm\fP supplied to the
+macros is the value of \fIst_mode\fP from a \fBstat\fP structure.
+The macro shall evaluate to a non-zero value if the test is
+true; 0 if the test is false.
+.TP 7
+S_ISBLK(\fIm\fP)
+Test for a block special file.
+.TP 7
+S_ISCHR(\fIm\fP)
+Test for a character special file.
+.TP 7
+S_ISDIR(\fIm\fP)
+Test for a directory.
+.TP 7
+S_ISFIFO(\fIm\fP)
+Test for a pipe or FIFO special file.
+.TP 7
+S_ISREG(\fIm\fP)
+Test for a regular file.
+.TP 7
+S_ISLNK(\fIm\fP)
+Test for a symbolic link.
+.TP 7
+S_ISSOCK(\fIm\fP)
+Test for a socket.
+.sp
+.LP
+The implementation may implement message queues, semaphores, or shared
+memory objects as distinct file types. The following
+macros shall be provided to test whether a file is of the specified
+type. The value of the \fIbuf\fP argument supplied to the
+macros is a pointer to a \fBstat\fP structure. The macro shall evaluate
+to a non-zero value if the specified object is implemented
+as a distinct file type and the specified file type is contained in
+the \fBstat\fP structure referenced by \fIbuf\fP. Otherwise,
+the macro shall evaluate to zero.
+.TP 7
+S_TYPEISMQ(\fIbuf\fP)
+Test for a message queue.
+.TP 7
+S_TYPEISSEM(\fIbuf\fP)
+Test for a semaphore.
+.TP 7
+S_TYPEISSHM(\fIbuf\fP)
+Test for a shared memory object.
+.sp
+.LP
+The implementation may implement typed memory objects as distinct
+file types, and the following macro shall test whether a
+file is of the specified type. The value of the \fIbuf\fP argument
+supplied to the macros is a pointer to a \fBstat\fP structure.
+The macro shall evaluate to a non-zero value if the specified object
+is implemented as a distinct file type and the specified file
+type is contained in the \fBstat\fP structure referenced by \fIbuf\fP.
+Otherwise, the macro shall evaluate to zero.
+.TP 7
+S_TYPEISTMO(\fIbuf\fP)
+Test macro for a typed memory object.
+.sp
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBint chmod(const char *, mode_t);
+int fchmod(int, mode_t);
+int fstat(int, struct stat *);
+int lstat(const char *restrict, struct stat *restrict);
+int mkdir(const char *, mode_t);
+int mkfifo(const char *, mode_t);
+
+int mknod(const char *, mode_t, dev_t);
+
+int stat(const char *restrict, struct stat *restrict);
+mode_t umask(mode_t);
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Use of the macros is recommended for determining the type of a file.
+.SH RATIONALE
+.LP
+A conforming C-language application must include \fI<sys/stat.h>\fP
+for functions that have arguments or return values of
+type \fBmode_t\fP, so that symbolic values for that type can be used.
+An alternative would be to require that these constants are
+also defined by including \fI<sys/types.h>\fP.
+.LP
+The S_ISUID and S_ISGID bits may be cleared on any write, not just
+on \fIopen\fP(), as
+some historical implementations do.
+.LP
+System calls that update the time entry fields in the \fBstat\fP structure
+must be documented by the implementors.
+POSIX-conforming systems should not update the time entry fields for
+functions listed in the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001 unless the standard requires that they do,
+except in the case of documented extensions to the
+standard.
+.LP
+Note that \fIst_dev\fP must be unique within a Local Area Network
+(LAN) in a ``system'' made up of multiple computers' file
+systems connected by a LAN.
+.LP
+Networked implementations of a POSIX-conforming system must guarantee
+that all files visible within the file tree (including
+parts of the tree that may be remotely mounted from other machines
+on the network) on each individual processor are uniquely
+identified by the combination of the \fIst_ino\fP and \fIst_dev\fP
+fields.
+.LP
+The unit for the \fIst_blocks\fP member of the \fBstat\fP structure
+is not defined within IEEE\ Std\ 1003.1-2001. In
+some implementations it is 512 bytes. It may differ on a file system
+basis. There is no correlation between values of the
+\fIst_blocks\fP and \fIst_blksize\fP, and the \fIf_bsize\fP (from
+\fI<sys/statvfs.h>\fP) structure members.
+.LP
+Traditionally, some implementations defined the multiplier for \fIst_blocks\fP
+in
+\fI<sys/param.h>\fP as the symbol DEV_BSIZE.
+.SH FUTURE DIRECTIONS
+.LP
+No new S_IFMT symbolic names for the file type values of \fBmode_t\fP
+will be defined by IEEE\ Std\ 1003.1-2001; if new
+file types are required, they will only be testable through \fIS_ISxx\fP()
+or \fIS_TYPEISxxx\fP() macros instead.
+.SH SEE ALSO
+.LP
+\fI<sys/statvfs.h>\fP, \fI<sys/types.h>\fP, the System Interfaces
+volume of IEEE\ Std\ 1003.1-2001, \fIchmod\fP(), \fIfchmod\fP(), \fIfstat\fP(),
+\fIlstat\fP(), \fImkdir\fP(), \fImkfifo\fP(), \fImknod\fP(), \fIstat\fP(),
+\fIumask\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/sys_statvfs.h.0p b/man-pages-posix-2003/man0p/sys_statvfs.h.0p
new file mode 100644
index 0000000..71edc1e
--- /dev/null
+++ b/man-pages-posix-2003/man0p/sys_statvfs.h.0p
@@ -0,0 +1,83 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<sys/statvfs.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <sys/statvfs.h>
+.SH NAME
+sys/statvfs.h \- VFS File System information structure
+.SH SYNOPSIS
+.LP
+\fB#include <sys/statvfs.h> \fP
+.SH DESCRIPTION
+.LP
+The \fI<sys/statvfs.h>\fP header shall define the \fBstatvfs\fP structure
+that includes at least the following
+members:
+.sp
+.RS
+.nf
+
+\fBunsigned long f_bsize \fP File system block size. \fB
+unsigned long f_frsize \fP Fundamental file system block size. \fB
+fsblkcnt_t f_blocks \fP Total number of blocks on file system in units of \fIf_frsize.\fP \fB
+fsblkcnt_t f_bfree \fP Total number of free blocks. \fB
+fsblkcnt_t f_bavail \fP Number of free blocks available to \fB
+ \fP non-privileged process. \fB
+fsfilcnt_t f_files \fP Total number of file serial numbers. \fB
+fsfilcnt_t f_ffree \fP Total number of free file serial numbers. \fB
+fsfilcnt_t f_favail \fP Number of file serial numbers available to \fB
+ \fP non-privileged process. \fB
+unsigned long f_fsid \fP File system ID. \fB
+unsigned long f_flag \fP Bit mask of \fIf_flag\fP values. \fB
+unsigned long f_namemax \fP Maximum filename length. \fB
+\fP
+.fi
+.RE
+.LP
+The \fBfsblkcnt_t\fP and \fBfsfilcnt_t\fP types shall be defined as
+described in \fI<sys/types.h>\fP .
+.LP
+The following flags for the \fIf_flag\fP member shall be defined:
+.TP 7
+ST_RDONLY
+Read-only file system.
+.TP 7
+ST_NOSUID
+Does not support the semantics of the ST_ISUID and ST_ISGID file mode
+bits.
+.sp
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBint statvfs(const char *restrict, struct statvfs *restrict);
+int fstatvfs(int, struct statvfs *);
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<sys/types.h>\fP, the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001, \fIfstatvfs\fP(), \fIstatvfs\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/sys_time.h.0p b/man-pages-posix-2003/man0p/sys_time.h.0p
new file mode 100644
index 0000000..7d7f84c
--- /dev/null
+++ b/man-pages-posix-2003/man0p/sys_time.h.0p
@@ -0,0 +1,103 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<sys/time.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <sys/time.h>
+.SH NAME
+sys/time.h \- time types
+.SH SYNOPSIS
+.LP
+\fB#include <sys/time.h> \fP
+.SH DESCRIPTION
+.LP
+The \fI<sys/time.h>\fP header shall define the \fBtimeval\fP structure
+that includes at least the following members:
+.sp
+.RS
+.nf
+
+\fBtime_t tv_sec \fP Seconds. \fB
+suseconds_t tv_usec \fP Microseconds. \fB
+\fP
+.fi
+.RE
+.LP
+The \fI<sys/time.h>\fP header shall define the \fBitimerval\fP structure
+that includes at least the following
+members:
+.sp
+.RS
+.nf
+
+\fBstruct timeval it_interval\fP Timer interval. \fB
+struct timeval it_value \fP Current value. \fB
+\fP
+.fi
+.RE
+.LP
+The \fBtime_t\fP and \fBsuseconds_t\fP types shall be defined as described
+in \fI<sys/types.h>\fP .
+.LP
+The \fBfd_set\fP type shall be defined as described in \fI<sys/select.h>\fP
+\&.
+.LP
+The \fI<sys/time.h>\fP header shall define the following values for
+the \fIwhich\fP argument of \fIgetitimer\fP() and \fIsetitimer\fP():
+.TP 7
+ITIMER_REAL
+Decrements in real time.
+.TP 7
+ITIMER_VIRTUAL
+Decrements in process virtual time.
+.TP 7
+ITIMER_PROF
+Decrements both in process virtual time and when the system is running
+on behalf of the process.
+.sp
+.LP
+The following shall be defined as described in \fI<sys/select.h>\fP
+: \fIFD_CLR\fP() \fIFD_ISSET\fP() \fIFD_SET\fP() \fIFD_ZERO\fP() FD_SETSIZE
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBint getitimer(int, struct itimerval *);
+int gettimeofday(struct timeval *restrict, void *restrict);
+int select(int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
+ struct timeval *restrict);
+int setitimer(int, const struct itimerval *restrict,
+ struct itimerval *restrict);
+int utimes(const char *, const struct timeval [2]); (\fP\fBLEGACY\fP \fB)
+\fP
+.fi
+.RE
+.LP
+Inclusion of the \fI<sys/time.h>\fP header may make visible all symbols
+from the \fI<sys/select.h>\fP header.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<sys/select.h>\fP, \fI<sys/types.h>\fP, the System Interfaces
+volume of IEEE\ Std\ 1003.1-2001, \fIgetitimer\fP(), \fIgettimeofday\fP(),
+\fIselect\fP(), \fIsetitimer\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/sys_timeb.h.0p b/man-pages-posix-2003/man0p/sys_timeb.h.0p
new file mode 100644
index 0000000..033cd2b
--- /dev/null
+++ b/man-pages-posix-2003/man0p/sys_timeb.h.0p
@@ -0,0 +1,61 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<sys/timeb.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <sys/timeb.h>
+.SH NAME
+sys/timeb.h \- additional definitions for date and time
+.SH SYNOPSIS
+.LP
+\fB#include <sys/timeb.h> \fP
+.SH DESCRIPTION
+.LP
+The \fI<sys/timeb.h>\fP header shall define the \fBtimeb\fP structure
+that includes at least the following members:
+.sp
+.RS
+.nf
+
+\fBtime_t time \fP The seconds portion of the current time. \fB
+unsigned short millitm \fP The milliseconds portion of the current time. \fB
+short timezone\fP The local timezone in minutes west of Greenwich. \fB
+short dstflag \fP TRUE if Daylight Savings Time is in effect. \fB
+\fP
+.fi
+.RE
+.LP
+The \fBtime_t\fP type shall be defined as described in \fI<sys/types.h>\fP
+\&.
+.LP
+The following shall be declared as a function and may also be defined
+as a macro. A function prototype shall be provided.
+.sp
+.RS
+.nf
+
+\fBint ftime(struct timeb *); (\fP\fBLEGACY\fP \fB)
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<sys/types.h>\fP, \fI<time.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/sys_times.h.0p b/man-pages-posix-2003/man0p/sys_times.h.0p
new file mode 100644
index 0000000..028b2c7
--- /dev/null
+++ b/man-pages-posix-2003/man0p/sys_times.h.0p
@@ -0,0 +1,63 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<sys/times.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <sys/times.h>
+.SH NAME
+sys/times.h \- file access and modification times structure
+.SH SYNOPSIS
+.LP
+\fB#include <sys/times.h>\fP
+.SH DESCRIPTION
+.LP
+The \fI<sys/times.h>\fP header shall define the structure \fBtms\fP,
+which is returned by \fItimes\fP() and includes at least the following
+members:
+.sp
+.RS
+.nf
+
+\fBclock_t tms_utime \fP User CPU time. \fB
+clock_t tms_stime \fP System CPU time. \fB
+clock_t tms_cutime\fP User CPU time of terminated child processes. \fB
+clock_t tms_cstime\fP System CPU time of terminated child processes. \fB
+\fP
+.fi
+.RE
+.LP
+The \fBclock_t\fP type shall be defined as described in \fI<sys/types.h>\fP
+\&.
+.LP
+The following shall be declared as a function and may also be defined
+as a macro. A function prototype shall be provided.
+.sp
+.RS
+.nf
+
+\fBclock_t times(struct tms *);
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<sys/types.h>\fP, the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001, \fItimes\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/sys_types.h.0p b/man-pages-posix-2003/man0p/sys_types.h.0p
new file mode 100644
index 0000000..4a0529c
--- /dev/null
+++ b/man-pages-posix-2003/man0p/sys_types.h.0p
@@ -0,0 +1,291 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<sys/types.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <sys/types.h>
+.SH NAME
+sys/types.h \- data types
+.SH SYNOPSIS
+.LP
+\fB#include <sys/types.h>\fP
+.SH DESCRIPTION
+.LP
+The \fI<sys/types.h>\fP header shall include definitions for at least
+the following types:
+.TP 7
+\fBblkcnt_t\fP
+Used for file block counts.
+.TP 7
+\fBblksize_t\fP
+Used for block sizes.
+.TP 7
+\fBclock_t\fP
+Used for system times in clock ticks or CLOCKS_PER_SEC; see \fI<time.h>\fP
+\&.
+.TP 7
+\fBclockid_t\fP
+Used for clock ID type in the clock and timer functions.
+.TP 7
+\fBdev_t\fP
+Used for device IDs.
+.TP 7
+\fBfsblkcnt_t\fP
+Used for file system block counts.
+.TP 7
+\fBfsfilcnt_t\fP
+Used for file system file counts.
+.TP 7
+\fBgid_t\fP
+Used for group IDs.
+.TP 7
+\fBid_t\fP
+Used as a general identifier; can be used to contain at least a \fBpid_t\fP,
+\fBuid_t\fP, or \fBgid_t\fP.
+.TP 7
+\fBino_t\fP
+Used for file serial numbers.
+.TP 7
+\fBkey_t\fP
+Used for XSI interprocess communication.
+.TP 7
+\fBmode_t\fP
+Used for some file attributes.
+.TP 7
+\fBnlink_t\fP
+Used for link counts.
+.TP 7
+\fBoff_t\fP
+Used for file sizes.
+.TP 7
+\fBpid_t\fP
+Used for process IDs and process group IDs.
+.TP 7
+\fBpthread_attr_t\fP
+Used to identify a thread attribute object.
+.TP 7
+\fBpthread_barrier_t\fP
+Used to identify a barrier.
+.TP 7
+\fBpthread_barrierattr_t\fP
+Used to define a barrier attributes object.
+.TP 7
+\fBpthread_cond_t\fP
+Used for condition variables.
+.TP 7
+\fBpthread_condattr_t\fP
+Used to identify a condition attribute object.
+.TP 7
+\fBpthread_key_t\fP
+Used for thread-specific data keys.
+.TP 7
+\fBpthread_mutex_t\fP
+Used for mutexes.
+.TP 7
+\fBpthread_mutexattr_t\fP
+Used to identify a mutex attribute object.
+.TP 7
+\fBpthread_once_t\fP
+Used for dynamic package initialization.
+.TP 7
+\fBpthread_rwlock_t\fP
+Used for read-write locks.
+.TP 7
+\fBpthread_rwlockattr_t\fP
+Used for read-write lock attributes.
+.TP 7
+\fBpthread_spinlock_t\fP
+Used to identify a spin lock.
+.TP 7
+\fBpthread_t\fP
+Used to identify a thread.
+.TP 7
+\fBsize_t\fP
+Used for sizes of objects.
+.TP 7
+\fBssize_t\fP
+Used for a count of bytes or an error indication.
+.TP 7
+\fBsuseconds_t\fP
+Used for time in microseconds.
+.TP 7
+\fBtime_t\fP
+Used for time in seconds.
+.TP 7
+\fBtimer_t\fP
+Used for timer ID returned by \fItimer_create\fP().
+.TP 7
+\fBtrace_attr_t\fP
+Used to identify a trace stream attributes object.
+.TP 7
+\fBtrace_event_id_t\fP
+Used to identify a trace event type.
+.TP 7
+\fBtrace_event_set_t\fP
+Used to identify a trace event type set.
+.TP 7
+\fBtrace_id_t\fP
+Used to identify a trace stream.
+.TP 7
+\fBuid_t\fP
+Used for user IDs.
+.TP 7
+\fBuseconds_t\fP
+Used for time in microseconds.
+.sp
+.LP
+All of the types shall be defined as arithmetic types of an appropriate
+length, with the following exceptions:
+.LP
+.sp
+.sp
+\fBkey_t\fP
+.br
+.sp
+.sp
+\fBpthread_attr_t\fP
+.br
+.sp
+.sp
+\fBpthread_barrier_t\fP
+.br
+\fBpthread_barrierattr_t\fP
+.br
+.sp
+.sp
+\fBpthread_cond_t\fP
+.br
+\fBpthread_condattr_t\fP
+.br
+\fBpthread_key_t\fP
+.br
+\fBpthread_mutex_t\fP
+.br
+\fBpthread_mutexattr_t\fP
+.br
+\fBpthread_once_t\fP
+.br
+\fBpthread_rwlock_t\fP
+.br
+\fBpthread_rwlockattr_t\fP
+.br
+.sp
+.sp
+\fBpthread_spinlock_t\fP
+.br
+.sp
+.sp
+\fBtrace_attr_t\fP
+.br
+\fBtrace_event_id_t\fP
+.br
+.sp
+.sp
+\fBtrace_event_set_t\fP
+.br
+.sp
+.sp
+\fBtrace_id_t\fP
+.br
+.sp
+.LP
+Additionally:
+.IP " *" 3
+\fBmode_t\fP shall be an integer type.
+.LP
+.IP " *" 3
+\fBnlink_t\fP, \fBuid_t\fP, \fBgid_t\fP, and \fBid_t\fP shall be integer
+types.
+.LP
+.IP " *" 3
+\fBblkcnt_t\fP and \fBoff_t\fP shall be signed integer types.
+.LP
+.IP " *" 3
+\fBfsblkcnt_t\fP, \fBfsfilcnt_t\fP, and
+\fBino_t\fP shall be defined as unsigned integer types.
+.LP
+.IP " *" 3
+\fBsize_t\fP shall be an unsigned integer type.
+.LP
+.IP " *" 3
+\fBblksize_t\fP, \fBpid_t\fP, and \fBssize_t\fP shall be signed integer
+types.
+.LP
+.IP " *" 3
+\fBtime_t\fP and \fBclock_t\fP shall be integer or real-floating types.
+.LP
+.LP
+The type \fBssize_t\fP shall be capable of storing values at least
+in the range [-1,\ {SSIZE_MAX}]. The type
+\fBuseconds_t\fP shall be an unsigned integer type capable of storing
+values at least in the range [0,\ 1000000]. The type
+\fBsuseconds_t\fP shall be a signed integer type capable of storing
+values at least in the range [-1,\ 1000000].
+.LP
+The implementation shall support one or more programming environments
+in which the widths of \fBblksize_t\fP, \fBpid_t\fP,
+\fBsize_t\fP, \fBssize_t\fP, \fBsuseconds_t\fP, and \fBuseconds_t\fP
+are no greater than the width of type \fBlong\fP. The
+names of these programming environments can be obtained using the
+\fIconfstr\fP()
+function or the \fIgetconf\fP utility.
+.LP
+There are no defined comparison or assignment operators for the following
+types:
+.LP
+.sp
+.sp
+\fBpthread_attr_t\fP
+.br
+.sp
+.sp
+\fBpthread_barrier_t\fP
+.br
+\fBpthread_barrierattr_t\fP
+.br
+.sp
+.sp
+\fBpthread_cond_t\fP
+.br
+\fBpthread_condattr_t\fP
+.br
+\fBpthread_mutex_t\fP
+.br
+\fBpthread_mutexattr_t\fP
+.br
+\fBpthread_rwlock_t\fP
+.br
+\fBpthread_rwlockattr_t\fP
+.br
+.sp
+.sp
+\fBpthread_spinlock_t\fP
+.br
+.sp
+.sp
+\fBtrace_attr_t\fP
+.br
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<time.h>\fP, the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+\fIconfstr\fP(), the Shell and Utilities volume of IEEE\ Std\ 1003.1-2001,
+\fIgetconf\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/sys_uio.h.0p b/man-pages-posix-2003/man0p/sys_uio.h.0p
new file mode 100644
index 0000000..1b02410
--- /dev/null
+++ b/man-pages-posix-2003/man0p/sys_uio.h.0p
@@ -0,0 +1,71 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<sys/uio.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <sys/uio.h>
+.SH NAME
+sys/uio.h \- definitions for vector I/O operations
+.SH SYNOPSIS
+.LP
+\fB#include <sys/uio.h> \fP
+.SH DESCRIPTION
+.LP
+The \fI<sys/uio.h>\fP header shall define the \fBiovec\fP structure
+that includes at least the following members:
+.sp
+.RS
+.nf
+
+\fBvoid *iov_base \fP Base address of a memory region for input or output. \fB
+size_t iov_len \fP The size of the memory pointed to by \fIiov_base.\fP \fB
+\fP
+.fi
+.RE
+.LP
+The \fI<sys/uio.h>\fP header uses the \fBiovec\fP structure for scatter/gather
+I/O.
+.LP
+The \fBssize_t\fP and \fBsize_t\fP types shall be defined as described
+in \fI<sys/types.h>\fP.
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBssize_t readv(int, const struct iovec *, int);
+ssize_t writev(int, const struct iovec *, int);
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The implementation can put a limit on the number of scatter/gather
+elements which can be processed in one call. The symbol
+{IOV_MAX} defined in \fI<limits.h>\fP should always be used to learn
+about the
+limits instead of assuming a fixed value.
+.SH RATIONALE
+.LP
+Traditionally, the maximum number of scatter/gather elements the system
+can process in one call were described by the symbolic
+value {UIO_MAXIOV}. In IEEE\ Std\ 1003.1-2001 this value is replaced
+by the constant {IOV_MAX} which can be found in \fI<limits.h>\fP.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<limits.h>\fP, \fI<sys/types.h>\fP, the System Interfaces volume
+of IEEE\ Std\ 1003.1-2001, \fIread\fP(), \fIwrite\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/sys_un.h.0p b/man-pages-posix-2003/man0p/sys_un.h.0p
new file mode 100644
index 0000000..59e435a
--- /dev/null
+++ b/man-pages-posix-2003/man0p/sys_un.h.0p
@@ -0,0 +1,62 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<sys/un.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <sys/un.h>
+.SH NAME
+sys/un.h \- definitions for UNIX domain sockets
+.SH SYNOPSIS
+.LP
+\fB#include <sys/un.h>\fP
+.SH DESCRIPTION
+.LP
+The \fI<sys/un.h>\fP header shall define the \fBsockaddr_un\fP structure
+that includes at least the following
+members:
+.sp
+.RS
+.nf
+
+\fBsa_family_t sun_family \fP Address family. \fB
+char sun_path[] \fP Socket pathname. \fB
+\fP
+.fi
+.RE
+.LP
+The \fBsockaddr_un\fP structure is used to store addresses for UNIX
+domain sockets. Values of this type shall be cast by
+applications to \fBstruct sockaddr\fP for use with socket functions.
+.LP
+The \fBsa_family_t\fP type shall be defined as described in \fI<sys/socket.h>\fP
+\&.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The size of \fIsun_path\fP has intentionally been left undefined.
+This is because different implementations use different
+sizes. For example, 4.3 BSD uses a size of 108, and 4.4 BSD uses a
+size of 104. Since most implementations originate from BSD
+versions, the size is typically in the range 92 to 108.
+.LP
+Applications should not assume a particular length for \fIsun_path\fP
+or assume that it can hold {_POSIX_PATH_MAX} characters
+(255).
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<sys/socket.h>\fP, the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001, \fIbind\fP(), \fIsocket\fP(), \fIsocketpair\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/sys_utsname.h.0p b/man-pages-posix-2003/man0p/sys_utsname.h.0p
new file mode 100644
index 0000000..08eed4c
--- /dev/null
+++ b/man-pages-posix-2003/man0p/sys_utsname.h.0p
@@ -0,0 +1,64 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<sys/utsname.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <sys/utsname.h>
+.SH NAME
+sys/utsname.h \- system name structure
+.SH SYNOPSIS
+.LP
+\fB#include <sys/utsname.h>\fP
+.SH DESCRIPTION
+.LP
+The \fI<sys/utsname.h>\fP header shall define the structure \fButsname\fP
+which shall include at least the following
+members:
+.sp
+.RS
+.nf
+
+\fBchar sysname[] \fP Name of this implementation of the operating system. \fB
+char nodename[]\fP Name of this node within an implementation-defined \fB
+ \fP communications network. \fB
+char release[] \fP Current release level of this implementation. \fB
+char version[] \fP Current version level of this release. \fB
+char machine[] \fP Name of the hardware type on which the system is running. \fB
+\fP
+.fi
+.RE
+.LP
+The character arrays are of unspecified size, but the data stored
+in them shall be terminated by a null byte.
+.LP
+The following shall be declared as a function and may also be defined
+as a macro:
+.sp
+.RS
+.nf
+
+\fBint uname(struct utsname *);
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIuname\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/sys_wait.h.0p b/man-pages-posix-2003/man0p/sys_wait.h.0p
new file mode 100644
index 0000000..b381cc6
--- /dev/null
+++ b/man-pages-posix-2003/man0p/sys_wait.h.0p
@@ -0,0 +1,122 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<sys/wait.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <sys/wait.h>
+.SH NAME
+sys/wait.h \- declarations for waiting
+.SH SYNOPSIS
+.LP
+\fB#include <sys/wait.h>\fP
+.SH DESCRIPTION
+.LP
+The \fI<sys/wait.h>\fP header shall define the following symbolic
+constants for use with \fIwaitpid\fP():
+.TP 7
+WNOHANG
+Do not hang if no status is available; return immediately.
+.TP 7
+WUNTRACED
+Report status of stopped child process.
+.sp
+.LP
+The \fI<sys/wait.h>\fP header shall define the following macros for
+analysis of process status values:
+.TP 7
+WEXITSTATUS
+Return exit status.
+.TP 7
+WIFCONTINUED
+True if child has been continued.
+.TP 7
+WIFEXITED
+True if child exited normally.
+.TP 7
+WIFSIGNALED
+True if child exited due to uncaught signal.
+.TP 7
+WIFSTOPPED
+True if child is currently stopped.
+.TP 7
+WSTOPSIG
+Return signal number that caused process to stop.
+.TP 7
+WTERMSIG
+Return signal number that caused process to terminate.
+.sp
+.LP
+The following symbolic constants shall be defined as possible values
+for the \fIoptions\fP argument to \fIwaitid\fP():
+.TP 7
+WEXITED
+Wait for processes that have exited.
+.TP 7
+WSTOPPED
+Status is returned for any child that has stopped upon receipt of
+a signal.
+.TP 7
+WCONTINUED
+Status is returned for any child that was stopped and has been continued.
+.TP 7
+WNOHANG
+Return immediately if there are no children to wait for.
+.TP 7
+WNOWAIT
+Keep the process whose status is returned in \fIinfop\fP in a waitable
+state.
+.sp
+.LP
+The type \fBidtype_t\fP shall be defined as an enumeration type whose
+possible values shall include at least the following:
+P_ALL P_PID P_PGID
+.LP
+The \fBid_t\fP and \fBpid_t\fP types shall be defined as described
+in \fI<sys/types.h>\fP .
+.LP
+The \fBsiginfo_t\fP type shall be defined as described in \fI<signal.h>\fP
+\&.
+.LP
+The \fBrusage\fP structure shall be defined as described in \fI<sys/resource.h>\fP
+\&.
+.LP
+Inclusion of the \fI<sys/wait.h>\fP header may also make visible all
+symbols from \fI<signal.h>\fP and \fI<sys/resource.h>\fP.
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBpid_t wait(int *);
+
+int waitid(idtype_t, id_t, siginfo_t *, int);
+
+pid_t waitpid(pid_t, int *, int);
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<signal.h>\fP, \fI<sys/resource.h>\fP, \fI<sys/types.h>\fP,
+the System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIwait\fP(),
+\fIwaitid\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/syslog.h.0p b/man-pages-posix-2003/man0p/syslog.h.0p
new file mode 100644
index 0000000..352409b
--- /dev/null
+++ b/man-pages-posix-2003/man0p/syslog.h.0p
@@ -0,0 +1,159 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<syslog.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <syslog.h>
+.SH NAME
+syslog.h \- definitions for system error logging
+.SH SYNOPSIS
+.LP
+\fB#include <syslog.h> \fP
+.SH DESCRIPTION
+.LP
+The \fI<syslog.h>\fP header shall define the following symbolic constants,
+zero or more of which may be OR'ed together to
+form the \fIlogopt\fP option of \fIopenlog\fP():
+.TP 7
+LOG_PID
+Log the process ID with each message.
+.TP 7
+LOG_CONS
+Log to the system console on error.
+.TP 7
+LOG_NDELAY
+Connect to syslog daemon immediately.
+.TP 7
+LOG_ODELAY
+Delay open until \fIsyslog\fP() is called.
+.TP 7
+LOG_NOWAIT
+Do not wait for child processes.
+.sp
+.LP
+The following symbolic constants shall be defined as possible values
+of the \fIfacility\fP argument to \fIopenlog\fP():
+.TP 7
+LOG_KERN
+Reserved for message generated by the system.
+.TP 7
+LOG_USER
+Message generated by a process.
+.TP 7
+LOG_MAIL
+Reserved for message generated by mail system.
+.TP 7
+LOG_NEWS
+Reserved for message generated by news system.
+.TP 7
+LOG_UUCP
+Reserved for message generated by UUCP system.
+.TP 7
+LOG_DAEMON
+Reserved for message generated by system daemon.
+.TP 7
+LOG_AUTH
+Reserved for message generated by authorization daemon.
+.TP 7
+LOG_CRON
+Reserved for message generated by clock daemon.
+.TP 7
+LOG_LPR
+Reserved for message generated by printer system.
+.TP 7
+LOG_LOCAL0
+Reserved for local use.
+.TP 7
+LOG_LOCAL1
+Reserved for local use.
+.TP 7
+LOG_LOCAL2
+Reserved for local use.
+.TP 7
+LOG_LOCAL3
+Reserved for local use.
+.TP 7
+LOG_LOCAL4
+Reserved for local use.
+.TP 7
+LOG_LOCAL5
+Reserved for local use.
+.TP 7
+LOG_LOCAL6
+Reserved for local use.
+.TP 7
+LOG_LOCAL7
+Reserved for local use.
+.sp
+.LP
+The following shall be declared as macros for constructing the \fImaskpri\fP
+argument to \fIsetlogmask\fP(). The following macros expand to an
+expression of type \fBint\fP when the
+argument \fIpri\fP is an expression of type \fBint\fP:
+.TP 7
+LOG_MASK(\fIpri\fP)
+A mask for priority \fIpri\fP.
+.sp
+.LP
+The following constants shall be defined as possible values for the
+\fIpriority\fP argument of \fIsyslog\fP():
+.TP 7
+LOG_EMERG
+A panic condition was reported to all processes.
+.TP 7
+LOG_ALERT
+A condition that should be corrected immediately.
+.TP 7
+LOG_CRIT
+A critical condition.
+.TP 7
+LOG_ERR
+An error message.
+.TP 7
+LOG_WARNING
+A warning message.
+.TP 7
+LOG_NOTICE
+A condition requiring special handling.
+.TP 7
+LOG_INFO
+A general information message.
+.TP 7
+LOG_DEBUG
+A message useful for debugging programs.
+.sp
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBvoid closelog(void);
+void openlog(const char *, int, int);
+int setlogmask(int);
+void syslog(int, const char *, ...);
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIcloselog\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/tar.h.0p b/man-pages-posix-2003/man0p/tar.h.0p
new file mode 100644
index 0000000..375272a
--- /dev/null
+++ b/man-pages-posix-2003/man0p/tar.h.0p
@@ -0,0 +1,79 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<tar.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <tar.h>
+.SH NAME
+tar.h \- extended tar definitions
+.SH SYNOPSIS
+.LP
+\fB#include <tar.h>\fP
+.SH DESCRIPTION
+.LP
+The \fI<tar.h>\fP header shall define header block definitions as
+follows.
+.LP
+General definitions:
+.TS C
+center; l2 l2 l.
+\fBName\fP \fBDescription\fP \fBValue\fP
+TMAGIC "ustar" ustar plus null byte.
+TMAGLEN 6 Length of the above.
+TVERSION "00" 00 without a null byte.
+TVERSLEN 2 Length of the above.
+.TE
+.LP
+\fITypeflag\fP field definitions:
+.TS C
+center; l l l.
+\fBName\fP \fBDescription\fP \fBValue\fP
+REGTYPE '0' Regular file.
+AREGTYPE '\\0' Regular file.
+LNKTYPE '1' Link.
+SYMTYPE '2' Symbolic link.
+CHRTYPE '3' Character special.
+BLKTYPE '4' Block special.
+DIRTYPE '5' Directory.
+FIFOTYPE '6' FIFO special.
+CONTTYPE '7' Reserved.
+.TE
+.LP
+\fIMode\fP field bit definitions (octal):
+.TS C
+center; l1 l1 l.
+\fBName\fP \fBDescription\fP \fBValue\fP
+TSUID 04000 Set UID on execution.
+TSGID 02000 Set GID on execution.
+TSVTX 01000 On directories, restricted deletion flag.\ \ \
+TUREAD 00400 Read by owner.
+TUWRITE 00200 Write by owner special.
+TUEXEC 00100 Execute/search by owner.
+TGREAD 00040 Read by group.
+TGWRITE 00020 Write by group.
+TGEXEC 00010 Execute/search by group.
+TOREAD 00004 Read by other.
+TOWRITE 00002 Write by other.
+TOEXEC 00001 Execute/search by other.
+.TE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Shell and Utilities volume of IEEE\ Std\ 1003.1-2001, \fIpax\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/tcp.h.0p b/man-pages-posix-2003/man0p/tcp.h.0p
new file mode 100644
index 0000000..e048750
--- /dev/null
+++ b/man-pages-posix-2003/man0p/tcp.h.0p
@@ -0,0 +1,47 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<netinet/tcp.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <netinet/tcp.h>
+.SH NAME
+netinet/tcp.h \- definitions for the Internet Transmission Control
+Protocol (TCP)
+.SH SYNOPSIS
+.LP
+\fB#include <netinet/tcp.h>\fP
+.SH DESCRIPTION
+.LP
+The \fI<netinet/tcp.h>\fP header shall define the following macro
+for use as a socket option at the IPPROTO_TCP
+level:
+.TP 7
+TCP_NODELAY
+Avoid coalescing of small segments.
+.sp
+.LP
+The macro shall be defined in the header. The implementation need
+not allow the value of the option to be set via \fIsetsockopt\fP()
+or retrieved via \fIgetsockopt\fP().
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<sys/socket.h>\fP, the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001, \fIgetsockopt\fP(), \fIsetsockopt\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/termios.h.0p b/man-pages-posix-2003/man0p/termios.h.0p
new file mode 100644
index 0000000..019bdce
--- /dev/null
+++ b/man-pages-posix-2003/man0p/termios.h.0p
@@ -0,0 +1,492 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<termios.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <termios.h>
+.SH NAME
+termios.h \- define values for termios
+.SH SYNOPSIS
+.LP
+\fB#include <termios.h>\fP
+.SH DESCRIPTION
+.LP
+The \fI<termios.h>\fP header contains the definitions used by the
+terminal I/O interfaces (see \fIGeneral Terminal Interface\fP for
+the structures and names defined).
+.SS The termios Structure
+.LP
+The following data types shall be defined through \fBtypedef\fP:
+.TP 7
+\fBcc_t\fP
+Used for terminal special characters.
+.TP 7
+\fBspeed_t\fP
+Used for terminal baud rates.
+.TP 7
+\fBtcflag_t\fP
+Used for terminal modes.
+.sp
+.LP
+The above types shall be all unsigned integer types.
+.LP
+The implementation shall support one or more programming environments
+in which the widths of \fBcc_t\fP, \fBspeed_t\fP, and
+\fBtcflag_t\fP are no greater than the width of type \fBlong\fP. The
+names of these programming environments can be obtained
+using the \fIconfstr\fP() function or the \fIgetconf\fP utility.
+.LP
+The \fBtermios\fP structure shall be defined, and shall include at
+least the following members:
+.sp
+.RS
+.nf
+
+\fBtcflag_t c_iflag \fP Input modes. \fB
+tcflag_t c_oflag \fP Output modes. \fB
+tcflag_t c_cflag \fP Control modes. \fB
+tcflag_t c_lflag \fP Local modes. \fB
+cc_t c_cc[NCCS] \fP Control characters. \fB
+\fP
+.fi
+.RE
+.LP
+A definition shall be provided for:
+.TP 7
+NCCS
+Size of the array \fIc_cc\fP for control characters.
+.sp
+.LP
+The following subscript names for the array \fIc_cc\fP shall be defined:
+.TS C
+center;c s l.
+\fBSubscript Usage\fP \
+.T&
+l l l.
+\fBCanonical Mode\fP \fBNon-Canonical Mode\fP \fBDescription\fP
+VEOF \ EOF character.
+VEOL \ EOL character.
+VERASE \ ERASE character.
+VINTR VINTR INTR character.
+VKILL \ KILL character.
+\ VMIN MIN value.
+VQUIT VQUIT QUIT character.
+VSTART VSTART START character.
+VSTOP VSTOP STOP character.
+VSUSP VSUSP SUSP character.
+\ VTIME TIME value.
+.TE
+.LP
+The subscript values shall be unique, except that the VMIN and VTIME
+subscripts may have the same values as the VEOF and VEOL
+subscripts, respectively.
+.LP
+The following flags shall be provided.
+.SS Input Modes
+.LP
+The \fIc_iflag\fP field describes the basic terminal input control:
+.TP 7
+BRKINT
+Signal interrupt on break.
+.TP 7
+ICRNL
+Map CR to NL on input.
+.TP 7
+IGNBRK
+Ignore break condition.
+.TP 7
+IGNCR
+Ignore CR.
+.TP 7
+IGNPAR
+Ignore characters with parity errors.
+.TP 7
+INLCR
+Map NL to CR on input.
+.TP 7
+INPCK
+Enable input parity check.
+.TP 7
+ISTRIP
+Strip character.
+.TP 7
+IXANY
+Enable any character to restart output.
+.TP 7
+IXOFF
+Enable start/stop input control.
+.TP 7
+IXON
+Enable start/stop output control.
+.TP 7
+PARMRK
+Mark parity errors.
+.sp
+.SS Output Modes
+.LP
+The \fIc_oflag\fP field specifies the system treatment of output:
+.TP 7
+OPOST
+Post-process output.
+.TP 7
+ONLCR
+Map NL to CR-NL on output.
+.TP 7
+OCRNL
+Map CR to NL on output.
+.TP 7
+ONOCR
+No CR output at column 0.
+.TP 7
+ONLRET
+NL performs CR function.
+.TP 7
+OFILL
+Use fill characters for delay.
+.TP 7
+NLDLY
+Select newline delays:
+.TP 7
+NL0
+.RS
+Newline type 0.
+.RE
+.TP 7
+NL1
+.RS
+Newline type 1.
+.RE
+.sp
+.TP 7
+CRDLY
+Select carriage-return delays:
+.TP 7
+CR0
+.RS
+Carriage-return delay type 0.
+.RE
+.TP 7
+CR1
+.RS
+Carriage-return delay type 1.
+.RE
+.TP 7
+CR2
+.RS
+Carriage-return delay type 2.
+.RE
+.TP 7
+CR3
+.RS
+Carriage-return delay type 3.
+.RE
+.sp
+.TP 7
+TABDLY
+Select horizontal-tab delays:
+.TP 7
+TAB0
+.RS
+Horizontal-tab delay type 0.
+.RE
+.TP 7
+TAB1
+.RS
+Horizontal-tab delay type 1.
+.RE
+.TP 7
+TAB2
+.RS
+Horizontal-tab delay type 2.
+.RE
+.TP 7
+TAB3
+.RS
+Expand tabs to spaces.
+.RE
+.sp
+.TP 7
+BSDLY
+Select backspace delays:
+.TP 7
+BS0
+.RS
+Backspace-delay type 0.
+.RE
+.TP 7
+BS1
+.RS
+Backspace-delay type 1.
+.RE
+.sp
+.TP 7
+VTDLY
+Select vertical-tab delays:
+.TP 7
+VT0
+.RS
+Vertical-tab delay type 0.
+.RE
+.TP 7
+VT1
+.RS
+Vertical-tab delay type 1.
+.RE
+.sp
+.TP 7
+FFDLY
+Select form-feed delays:
+.TP 7
+FF0
+.RS
+Form-feed delay type 0.
+.RE
+.TP 7
+FF1
+.RS
+Form-feed delay type 1.
+.RE
+.sp
+.sp
+.SS Baud Rate Selection
+.LP
+The input and output baud rates are stored in the \fBtermios\fP structure.
+These are the valid values for objects of type
+\fBspeed_t\fP. The following values shall be defined, but not all
+baud rates need be supported by the underlying hardware.
+.TP 7
+B0
+Hang up
+.TP 7
+B50
+50 baud
+.TP 7
+B75
+75 baud
+.TP 7
+B110
+110 baud
+.TP 7
+B134
+134.5 baud
+.TP 7
+B150
+150 baud
+.TP 7
+B200
+200 baud
+.TP 7
+B300
+300 baud
+.TP 7
+B600
+600 baud
+.TP 7
+B1200
+1200 baud
+.TP 7
+B1800
+1800 baud
+.TP 7
+B2400
+2400 baud
+.TP 7
+B4800
+4800 baud
+.TP 7
+B9600
+9600 baud
+.TP 7
+B19200
+19200 baud
+.TP 7
+B38400
+38400 baud
+.sp
+.SS Control Modes
+.LP
+The \fIc_cflag\fP field describes the hardware control of the terminal;
+not all values specified are required to be supported
+by the underlying hardware:
+.TP 7
+CSIZE
+Character size:
+.TP 7
+CS5
+.RS
+5 bits
+.RE
+.TP 7
+CS6
+.RS
+6 bits
+.RE
+.TP 7
+CS7
+.RS
+7 bits
+.RE
+.TP 7
+CS8
+.RS
+8 bits
+.RE
+.sp
+.TP 7
+CSTOPB
+Send two stop bits, else one.
+.TP 7
+CREAD
+Enable receiver.
+.TP 7
+PARENB
+Parity enable.
+.TP 7
+PARODD
+Odd parity, else even.
+.TP 7
+HUPCL
+Hang up on last close.
+.TP 7
+CLOCAL
+Ignore modem status lines.
+.sp
+.LP
+The implementation shall support the functionality associated with
+the symbols CS7, CS8, CSTOPB, PARODD, and PARENB.
+.SS Local Modes
+.LP
+The \fIc_lflag\fP field of the argument structure is used to control
+various terminal functions:
+.TP 7
+ECHO
+Enable echo.
+.TP 7
+ECHOE
+Echo erase character as error-correcting backspace.
+.TP 7
+ECHOK
+Echo KILL.
+.TP 7
+ECHONL
+Echo NL.
+.TP 7
+ICANON
+Canonical input (erase and kill processing).
+.TP 7
+IEXTEN
+Enable extended input character processing.
+.TP 7
+ISIG
+Enable signals.
+.TP 7
+NOFLSH
+Disable flush after interrupt or quit.
+.TP 7
+TOSTOP
+Send SIGTTOU for background output.
+.sp
+.SS Attribute Selection
+.LP
+The following symbolic constants for use with \fItcsetattr\fP() are
+defined:
+.TP 7
+TCSANOW
+Change attributes immediately.
+.TP 7
+TCSADRAIN
+Change attributes when output has drained.
+.TP 7
+TCSAFLUSH
+Change attributes when output has drained; also flush pending input.
+.sp
+.SS Line Control
+.LP
+The following symbolic constants for use with \fItcflush\fP() shall
+be defined:
+.TP 7
+TCIFLUSH
+Flush pending input.
+.TP 7
+TCIOFLUSH
+Flush both pending input and untransmitted output.
+.TP 7
+TCOFLUSH
+Flush untransmitted output.
+.sp
+.LP
+The following symbolic constants for use with \fItcflow\fP() shall
+be defined:
+.TP 7
+TCIOFF
+Transmit a STOP character, intended to suspend input data.
+.TP 7
+TCION
+Transmit a START character, intended to restart input data.
+.TP 7
+TCOOFF
+Suspend output.
+.TP 7
+TCOON
+Restart output.
+.sp
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBspeed_t cfgetispeed(const struct termios *);
+speed_t cfgetospeed(const struct termios *);
+int cfsetispeed(struct termios *, speed_t);
+int cfsetospeed(struct termios *, speed_t);
+int tcdrain(int);
+int tcflow(int, int);
+int tcflush(int, int);
+int tcgetattr(int, struct termios *);
+
+pid_t tcgetsid(int);
+
+int tcsendbreak(int, int);
+int tcsetattr(int, int, const struct termios *);
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The following names are reserved for XSI-conformant systems to use
+as an extension to the above; therefore strictly conforming
+applications shall not use them:
+.TS C
+center; l l l.
+CBAUD EXTB VDSUSP
+DEFECHO FLUSHO VLNEXT
+ECHOCTL LOBLK VREPRINT
+ECHOKE PENDIN VSTATUS
+ECHOPRT SWTCH VWERASE
+EXTA VDISCARD \
+.TE
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIcfgetispeed\fP(),
+\fIcfgetospeed\fP(), \fIcfsetispeed\fP(), \fIcfsetospeed\fP(), \fIconfstr\fP(),
+\fItcdrain\fP(), \fItcflow\fP(), \fItcflush\fP(), \fItcgetattr\fP(),
+\fItcgetsid\fP(), \fItcsendbreak\fP(), \fItcsetattr\fP(), the Shell
+and Utilities volume of IEEE\ Std\ 1003.1-2001, \fIgetconf\fP, \fIGeneral
+Terminal Interface\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/tgmath.h.0p b/man-pages-posix-2003/man0p/tgmath.h.0p
new file mode 100644
index 0000000..076fb65
--- /dev/null
+++ b/man-pages-posix-2003/man0p/tgmath.h.0p
@@ -0,0 +1,345 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<tgmath.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <tgmath.h>
+.SH NAME
+tgmath.h \- type-generic macros
+.SH SYNOPSIS
+.LP
+\fB#include <tgmath.h>\fP
+.SH DESCRIPTION
+.LP
+The \fI<tgmath.h>\fP header shall include the headers \fI<math.h>\fP
+and \fI<complex.h>\fP and shall define several type-generic macros.
+.LP
+Of the functions contained within the \fI<math.h>\fP and \fI<complex.h>\fP
+headers without an \fIf\fP ( \fBfloat\fP) or \fIl\fP ( \fBlong
+double\fP) suffix, several have one or more parameters whose corresponding
+real type is \fBdouble\fP. For each such function,
+except \fImodf\fP(), there shall be a corresponding type-generic macro.
+The parameters whose
+corresponding real type is \fBdouble\fP in the function synopsis are
+generic parameters. Use of the macro invokes a function whose
+corresponding real type and type domain are determined by the arguments
+for the generic parameters.
+.LP
+Use of the macro invokes a function whose generic parameters have
+the corresponding real type determined as follows:
+.IP " *" 3
+First, if any argument for generic parameters has type \fBlong double\fP,
+the type determined is \fBlong double\fP.
+.LP
+.IP " *" 3
+Otherwise, if any argument for generic parameters has type \fBdouble\fP
+or is of integer type, the type determined is
+\fBdouble\fP.
+.LP
+.IP " *" 3
+Otherwise, the type determined is \fBfloat\fP.
+.LP
+.LP
+For each unsuffixed function in the \fI<math.h>\fP header for which
+there is a
+function in the \fI<complex.h>\fP header with the same name except
+for a \fIc\fP
+prefix, the corresponding type-generic macro (for both functions)
+has the same name as the function in the \fI<math.h>\fP header. The
+corresponding type-generic macro for \fIfabs\fP() and \fIcabs\fP()
+is \fIfabs\fP().
+.TS C
+center; l l l.
+\fB<math.h>\fP \fB<complex.h>\fP \fBType-Generic\fP
+\fBFunction\fP \fBFunction\fP \fBMacro\fP
+\fIacos\fP() \fIcacos\fP() \fIacos\fP()
+\fIasin\fP() \fIcasin\fP() \fIasin\fP()
+\fIatan\fP() \fIcatan\fP() \fIatan\fP()
+\fIacosh\fP() \fIcacosh\fP() \fIacosh\fP()
+\fIasinh\fP() \fIcasinh\fP() \fIasinh\fP()
+\fIatanh\fP() \fIcatanh\fP() \fIatanh\fP()
+\fIcos\fP() \fIccos\fP() \fIcos\fP()
+\fIsin\fP() \fIcsin\fP() \fIsin\fP()
+\fItan\fP() \fIctan\fP() \fItan\fP()
+\fIcosh\fP() \fIccosh\fP() \fIcosh\fP()
+\fIsinh\fP() \fIcsinh\fP() \fIsinh\fP()
+\fItanh\fP() \fIctanh\fP() \fItanh\fP()
+\fIexp\fP() \fIcexp\fP() \fIexp\fP()
+\fIlog\fP() \fIclog\fP() \fIlog\fP()
+\fIpow\fP() \fIcpow\fP() \fIpow\fP()
+\fIsqrt\fP() \fIcsqrt\fP() \fIsqrt\fP()
+\fIfabs\fP() \fIcabs\fP() \fIfabs\fP()
+.TE
+.LP
+If at least one argument for a generic parameter is complex, then
+use of the macro invokes a complex function; otherwise, use of
+the macro invokes a real function.
+.LP
+For each unsuffixed function in the \fI<math.h>\fP header without
+a
+\fIc\fP-prefixed counterpart in the \fI<complex.h>\fP header, the
+corresponding
+type-generic macro has the same name as the function. These type-generic
+macros are:
+.TS C
+center; lw(19) lw(19) lw(19) lw(19).
+T{
+.br
+\fIatan2\fP()
+.br
+\fIcbrt\fP()
+.br
+\fIceil\fP()
+.br
+\fIcopysign\fP()
+.br
+\fIerf\fP()
+.br
+\fIerfc\fP()
+.br
+\fIexp2\fP()
+.br
+\fIexpm1\fP()
+.br
+\fIfdim\fP()
+.br
+\fIfloor\fP()
+.br
+\
+T} T{
+.br
+\fIfma\fP()
+.br
+\fIfmax\fP()
+.br
+\fIfmin\fP()
+.br
+\fIfmod\fP()
+.br
+\fIfrexp\fP()
+.br
+\fIhypot\fP()
+.br
+\fIilogb\fP()
+.br
+\fIldexp\fP()
+.br
+\fIlgamma\fP()
+.br
+\fIllrint\fP()
+.br
+\
+T} T{
+.br
+\fIllround\fP()
+.br
+\fIlog10\fP()
+.br
+\fIlog1p\fP()
+.br
+\fIlog2\fP()
+.br
+\fIlogb\fP()
+.br
+\fIlrint\fP()
+.br
+\fIlround\fP()
+.br
+\fInearbyint\fP()
+.br
+\fInextafter\fP()
+.br
+\fInexttoward\fP()
+.br
+\
+T} T{
+.br
+\fIremainder\fP()
+.br
+\fIremquo\fP()
+.br
+\fIrint\fP()
+.br
+\fIround\fP()
+.br
+\fIscalbn\fP()
+.br
+\fIscalbln\fP()
+.br
+\fItgamma\fP()
+.br
+\fItrunc\fP()
+.br
+\
+T}
+.TE
+.LP
+If all arguments for generic parameters are real, then use of the
+macro invokes a real function; otherwise, use of the macro
+results in undefined behavior.
+.LP
+For each unsuffixed function in the \fI<complex.h>\fP header that
+is not a
+\fIc\fP-prefixed counterpart to a function in the \fI<math.h>\fP header,
+the
+corresponding type-generic macro has the same name as the function.
+These type-generic macros are:
+.sp
+.RS
+.nf
+
+\fIcarg\fP()
+\fIcimag\fP()
+\fIconj\fP()
+\fIcproj\fP()
+\fIcreal\fP()
+.fi
+.RE
+.LP
+Use of the macro with any real or complex argument invokes a complex
+function.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+With the declarations:
+.sp
+.RS
+.nf
+
+\fB#include <tgmath.h>
+int n;
+float f;
+double d;
+long double ld;
+float complex fc;
+double complex dc;
+long double complex ldc;
+\fP
+.fi
+.RE
+.LP
+functions invoked by use of type-generic macros are shown in the following
+table:
+.TS C
+center; l2 l.
+\fBMacro\fP \fBUse Invokes\fP
+\fIexp\fP(\fIn\fP) \fIexp\fP(\fIn\fP), the function
+\fIacosh\fP(\fIf\fP) \fIacoshf\fP(\fIf\fP)
+\fIsin\fP(\fId\fP) \fIsin\fP(\fId\fP), the function
+\fIatan\fP(\fIld\fP) \fIatanl\fP(\fIld\fP)
+\fIlog\fP(\fIfc\fP) \fIclogf\fP(\fIfc\fP)
+\fIsqrt\fP(\fIdc\fP) \fIcsqrt\fP(\fIdc\fP)
+\fIpow\fP(\fIldc,f\fP) \fIcpowl\fP(\fIldc, f\fP)
+\fIremainder\fP(\fIn,n\fP) \fIremainder\fP(\fIn, n\fP), the function
+\fInextafter\fP(\fId,f\fP) \fInextafter\fP(\fId, f\fP), the function
+\fInexttoward\fP(\fIf,ld\fP) \fInexttowardf\fP(\fIf, ld\fP)
+\fIcopysign\fP(\fIn,ld\fP) \fIcopysignl\fP(\fIn, ld\fP)
+\fIceil\fP(\fIfc\fP) Undefined behavior
+\fIrint\fP(\fIdc\fP) Undefined behavior
+\fIfmax\fP(\fIldc,ld\fP) Undefined behavior
+\fIcarg\fP(\fIn\fP) \fIcarg\fP(\fIn\fP), the function
+\fIcproj\fP(\fIf\fP) \fIcprojf\fP(\fIf\fP)
+\fIcreal\fP(\fId\fP) \fIcreal\fP(\fId\fP), the function
+\fIcimag\fP(\fIld\fP) \fIcimagl\fP(\fIld\fP)
+\fIcabs\fP(\fIfc\fP) \fIcabsf\fP(\fIfc\fP)
+\fIcarg\fP(\fIdc\fP) \fIcarg\fP(\fIdc\fP), the function
+\fIcproj\fP(\fIldc\fP) \fIcprojl\fP(\fIldc\fP)
+.TE
+.SH RATIONALE
+.LP
+Type-generic macros allow calling a function whose type is determined
+by the argument type, as is the case for C operators such
+as \fB'+'\fP and \fB'*'\fP . For example, with a type-generic \fIcos\fP()
+macro, the
+expression \fIcos\fP(( \fBfloat\fP) \fIx\fP) will have type \fBfloat\fP.
+This feature enables writing more portably efficient
+code and alleviates need for awkward casting and suffixing in the
+process of porting or adjusting precision. Generic math functions
+are a widely appreciated feature of Fortran.
+.LP
+The only arguments that affect the type resolution are the arguments
+corresponding to the parameters that have type
+\fBdouble\fP in the synopsis. Hence the type of a type-generic call
+to \fInexttoward\fP(), whose second parameter is \fBlong double\fP
+in the synopsis, is determined
+solely by the type of the first argument.
+.LP
+The term "type-generic" was chosen over the proposed alternatives
+of intrinsic and overloading. The term is more specific than
+intrinsic, which already is widely used with a more general meaning,
+and reflects a closer match to Fortran's generic functions
+than to C++ overloading.
+.LP
+The macros are placed in their own header in order not to silently
+break old programs that include the \fI<math.h>\fP header; for example,
+with:
+.sp
+.RS
+.nf
+
+\fBprintf ("%e", sin(x))
+\fP
+.fi
+.RE
+.LP
+\fImodf\fP( \fBdouble\fP, \fBdouble *\fP) is excluded because no way
+was seen to make it safe without complicating the type
+resolution.
+.LP
+The implementation might, as an extension, endow appropriate ones
+of the macros that IEEE\ Std\ 1003.1-2001 specifies
+only for real arguments with the ability to invoke the complex functions.
+.LP
+IEEE\ Std\ 1003.1-2001 does not prescribe any particular implementation
+mechanism for generic macros. It could be
+implemented simply with built-in macros. The generic macro for \fIsqrt\fP(),
+for example,
+could be implemented with:
+.sp
+.RS
+.nf
+
+\fB#undef sqrt
+#define sqrt(x) __BUILTIN_GENERIC_sqrt(x)
+\fP
+.fi
+.RE
+.LP
+Generic macros are designed for a useful level of consistency with
+C++ overloaded math functions.
+.LP
+The great majority of existing C programs are expected to be unaffected
+when the \fI<tgmath.h>\fP header is included
+instead of the \fI<math.h>\fP or \fI<complex.h>\fP headers. Generic
+macros are similar to the ISO/IEC\ 9899:1999
+standard library masking macros, though the semantic types of return
+values differ.
+.LP
+The ability to overload on integer as well as floating types would
+have been useful for some functions; for example, \fIcopysign\fP().
+Overloading with different numbers of arguments would have allowed
+reusing
+names; for example, \fIremainder\fP() for \fIremquo\fP(). However,
+these facilities would have complicated the specification; and their
+natural consistent use, such as for a floating \fIabs\fP() or a two-argument
+\fIatan\fP(), would have introduced further inconsistencies with the
+ISO/IEC\ 9899:1999 standard
+for insufficient benefit.
+.LP
+The ISO\ C standard in no way limits the implementation's options
+for efficiency, including inlining library functions.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<math.h>\fP, \fI<complex.h>\fP, the System Interfaces
+volume of IEEE\ Std\ 1003.1-2001, \fIcabs\fP(), \fIfabs\fP(), \fImodf\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/time.h.0p b/man-pages-posix-2003/man0p/time.h.0p
new file mode 100644
index 0000000..ce64368
--- /dev/null
+++ b/man-pages-posix-2003/man0p/time.h.0p
@@ -0,0 +1,244 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<time.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <time.h>
+.SH NAME
+time.h \- time types
+.SH SYNOPSIS
+.LP
+\fB#include <time.h>\fP
+.SH DESCRIPTION
+.LP
+Some of the functionality described on this reference page extends
+the ISO\ C standard. Applications shall define
+the appropriate feature test macro (see the System Interfaces volume
+of IEEE\ Std\ 1003.1-2001, Section 2.2, The Compilation Environment)
+to enable the visibility of these symbols in this
+header.
+.LP
+The \fI<time.h>\fP header shall declare the structure \fBtm\fP, which
+shall include at least the following members:
+.sp
+.RS
+.nf
+
+\fBint tm_sec \fP Seconds [0,60]. \fB
+int tm_min \fP Minutes [0,59]. \fB
+int tm_hour \fP Hour [0,23]. \fB
+int tm_mday \fP Day of month [1,31]. \fB
+int tm_mon \fP Month of year [0,11]. \fB
+int tm_year \fP Years since 1900. \fB
+int tm_wday \fP Day of week [0,6] (Sunday =0). \fB
+int tm_yday \fP Day of year [0,365]. \fB
+int tm_isdst\fP Daylight Savings flag. \fB
+\fP
+.fi
+.RE
+.LP
+The value of \fItm_isdst\fP shall be positive if Daylight Savings
+Time is in effect, 0 if Daylight Savings Time is not in
+effect, and negative if the information is not available.
+.LP
+The \fI<time.h>\fP header shall define the following symbolic names:
+.TP 7
+NULL
+Null pointer constant.
+.TP 7
+CLOCKS_PER_SEC
+A number used to convert the value returned by the \fIclock\fP() function
+into
+seconds.
+.TP 7
+CLOCK_PROCESS_CPUTIME_ID
+.sp
+The identifier of the CPU-time clock associated with the process making
+a \fIclock\fP() or
+\fItimer*\fP() function call.
+.TP 7
+CLOCK_THREAD_CPUTIME_ID
+.sp
+The identifier of the CPU-time clock associated with the thread making
+a \fIclock\fP() or \fItimer*\fP() function call.
+.sp
+.LP
+The \fI<time.h>\fP header shall declare the structure \fBtimespec\fP,
+which has at least the following members:
+.sp
+.RS
+.nf
+
+\fBtime_t tv_sec \fP Seconds. \fB
+long tv_nsec \fP Nanoseconds. \fB
+\fP
+.fi
+.RE
+.LP
+The \fI<time.h>\fP header shall also declare the \fBitimerspec\fP
+structure, which has at least the following
+members:
+.sp
+.RS
+.nf
+
+\fBstruct timespec it_interval \fP Timer period. \fB
+struct timespec it_value \fP Timer expiration. \fB
+\fP
+.fi
+.RE
+.LP
+The following manifest constants shall be defined:
+.TP 7
+CLOCK_REALTIME
+The identifier of the system-wide realtime clock.
+.TP 7
+TIMER_ABSTIME
+Flag indicating time is absolute. For functions taking timer objects,
+this refers to the clock associated with the timer.
+.TP 7
+CLOCK_MONOTONIC
+.sp
+The identifier for the system-wide monotonic clock, which is defined
+as a clock whose value cannot be set via \fIclock_settime\fP() and
+which cannot have backward clock jumps. The maximum possible clock
+jump shall be implementation-defined.
+.sp
+.LP
+The \fBclock_t\fP, \fBsize_t\fP, \fBtime_t\fP, \fBclockid_t\fP,
+and \fBtimer_t\fP types shall be defined as described in \fI<sys/types.h>\fP
+\&.
+.LP
+Although the value of CLOCKS_PER_SEC is required to be 1 million on
+all XSI-conformant systems, it may be variable on other
+systems, and it should not be assumed that CLOCKS_PER_SEC is a compile-time
+constant.
+.LP
+The \fI<time.h>\fP header shall provide a declaration for \fIgetdate_err\fP.
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBchar *asctime(const struct tm *);
+
+char *asctime_r(const struct tm *restrict, char *restrict);
+
+clock_t clock(void);
+
+int clock_getcpuclockid(pid_t, clockid_t *);
+
+
+int clock_getres(clockid_t, struct timespec *);
+int clock_gettime(clockid_t, struct timespec *);
+
+
+int clock_nanosleep(clockid_t, int, const struct timespec *,
+ struct timespec *);
+
+
+int clock_settime(clockid_t, const struct timespec *);
+
+char *ctime(const time_t *);
+
+char *ctime_r(const time_t *, char *);
+
+double difftime(time_t, time_t);
+
+struct tm *getdate(const char *);
+
+struct tm *gmtime(const time_t *);
+
+struct tm *gmtime_r(const time_t *restrict, struct tm *restrict);
+
+struct tm *localtime(const time_t *);
+
+struct tm *localtime_r(const time_t *restrict, struct tm *restrict);
+
+time_t mktime(struct tm *);
+
+int nanosleep(const struct timespec *, struct timespec *);
+
+size_t strftime(char *restrict, size_t, const char *restrict,
+ const struct tm *restrict);
+
+char *strptime(const char *restrict, const char *restrict,
+ struct tm *restrict);
+
+time_t time(time_t *);
+
+int timer_create(clockid_t, struct sigevent *restrict,
+ timer_t *restrict);
+int timer_delete(timer_t);
+int timer_gettime(timer_t, struct itimerspec *);
+int timer_getoverrun(timer_t);
+int timer_settime(timer_t, int, const struct itimerspec *restrict,
+ struct itimerspec *restrict);
+
+
+void tzset(void);
+
+\fP
+.fi
+.RE
+.sp
+.LP
+The following shall be declared as variables:
+.sp
+.RS
+.nf
+
+\fB
+extern int daylight;
+extern long timezone;
+
+
+extern char *tzname[];
+
+\fP
+.fi
+.RE
+.LP
+Inclusion of the \fI<time.h>\fP header may make visible all symbols
+from the \fI<signal.h>\fP header.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The range [0,60] for \fItm_sec\fP allows for the occasional leap second.
+.LP
+\fItm_year\fP is a signed value; therefore, years before 1900 may
+be represented.
+.LP
+To obtain the number of clock ticks per second returned by the \fItimes\fP()
+function,
+applications should call \fIsysconf\fP(_SC_CLK_TCK).
+.SH RATIONALE
+.LP
+The range [0,60] seconds allows for positive or negative leap seconds.
+The formal definition of UTC does not permit double leap
+seconds, so all mention of double leap seconds has been removed, and
+the range shortened from the former [0,61] seconds seen in
+previous versions of POSIX.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<signal.h>\fP, \fI<sys/types.h>\fP, the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIasctime\fP(), \fIclock\fP(),
+\fIclock_getcpuclockid\fP(), \fIclock_getres\fP(), \fIclock_nanosleep\fP(),
+\fIctime\fP(), \fIdifftime\fP(), \fIgetdate\fP(), \fIgmtime\fP(),
+\fIlocaltime\fP(), \fImktime\fP(), \fInanosleep\fP(), \fIstrftime\fP(),
+\fIstrptime\fP(), \fIsysconf\fP(), \fItime\fP(), \fItimer_create\fP(),
+\fItimer_delete\fP(), \fItimer_getoverrun\fP(), \fItzname\fP, \fItzset\fP(),
+\fIutime\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/timeb.h.0p b/man-pages-posix-2003/man0p/timeb.h.0p
new file mode 100644
index 0000000..a8f53e5
--- /dev/null
+++ b/man-pages-posix-2003/man0p/timeb.h.0p
@@ -0,0 +1 @@
+.so man0p/sys_timeb.h.0p
diff --git a/man-pages-posix-2003/man0p/times.h.0p b/man-pages-posix-2003/man0p/times.h.0p
new file mode 100644
index 0000000..d7e1e3c
--- /dev/null
+++ b/man-pages-posix-2003/man0p/times.h.0p
@@ -0,0 +1 @@
+.so man0p/sys_times.h.0p
diff --git a/man-pages-posix-2003/man0p/trace.h.0p b/man-pages-posix-2003/man0p/trace.h.0p
new file mode 100644
index 0000000..0510168
--- /dev/null
+++ b/man-pages-posix-2003/man0p/trace.h.0p
@@ -0,0 +1,293 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<trace.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <trace.h>
+.SH NAME
+trace.h \- tracing
+.SH SYNOPSIS
+.LP
+\fB#include <trace.h> \fP
+.SH DESCRIPTION
+.LP
+The \fI<trace.h>\fP header shall define the \fBposix_trace_event_info\fP
+structure that includes at least the following
+members:
+.sp
+.RS
+.nf
+
+\fBtrace_event_id_t posix_event_id
+pid_t posix_pid
+void *posix_prog_address
+int posix_truncation_status
+struct timespec posix_timestamp
+
+pthread_t posix_thread_id
+
+\fP
+.fi
+.RE
+.LP
+The \fI<trace.h>\fP header shall define the \fBposix_trace_status_info\fP
+structure that includes at least the following
+members:
+.sp
+.RS
+.nf
+
+\fBint posix_stream_status
+int posix_stream_full_status
+int posix_stream_overrun_status
+
+int posix_stream_flush_status
+int posix_stream_flush_error
+int posix_log_overrun_status
+int posix_log_full_status
+
+\fP
+.fi
+.RE
+.LP
+The \fI<trace.h>\fP header shall define the following symbols:
+.LP
+.sp
+POSIX_TRACE_ALL_EVENTS
+.br
+.sp
+POSIX_TRACE_APPEND
+.br
+.sp
+.sp
+POSIX_TRACE_CLOSE_FOR_CHILD
+.br
+.sp
+.sp
+POSIX_TRACE_FILTER
+.br
+.sp
+.sp
+POSIX_TRACE_FLUSH
+.br
+POSIX_TRACE_FLUSH_START
+.br
+POSIX_TRACE_FLUSH_STOP
+.br
+POSIX_TRACE_FLUSHING
+.br
+.sp
+POSIX_TRACE_FULL
+.br
+POSIX_TRACE_LOOP
+.br
+POSIX_TRACE_NO_OVERRUN
+.br
+.sp
+POSIX_TRACE_NOT_FLUSHING
+.br
+.sp
+POSIX_TRACE_NOT_FULL
+.br
+.sp
+POSIX_TRACE_INHERITED
+.br
+.sp
+POSIX_TRACE_NOT_TRUNCATED
+.br
+POSIX_TRACE_OVERFLOW
+.br
+POSIX_TRACE_OVERRUN
+.br
+POSIX_TRACE_RESUME
+.br
+POSIX_TRACE_RUNNING
+.br
+POSIX_TRACE_START
+.br
+POSIX_TRACE_STOP
+.br
+POSIX_TRACE_SUSPENDED
+.br
+POSIX_TRACE_SYSTEM_EVENTS
+.br
+POSIX_TRACE_TRUNCATED_READ
+.br
+POSIX_TRACE_TRUNCATED_RECORD
+.br
+POSIX_TRACE_UNNAMED_USER_EVENT
+.br
+POSIX_TRACE_UNTIL_FULL
+.br
+POSIX_TRACE_WOPID_EVENTS
+.br
+.LP
+The following types shall be defined as described in \fI<sys/types.h>\fP
+:
+.LP
+.sp
+\fBtrace_attr_t\fP
+.br
+\fBtrace_id_t\fP
+.br
+\fBtrace_event_id_t\fP
+.br
+.sp
+\fBtrace_event_set_t\fP
+.br
+.sp
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBint posix_trace_attr_destroy(trace_attr_t *);
+int posix_trace_attr_getclockres(const trace_attr_t *,
+ struct timespec *);
+int posix_trace_attr_getcreatetime(const trace_attr_t *,
+ struct timespec *);
+int posix_trace_attr_getgenversion(const trace_attr_t *, char *);
+
+int posix_trace_attr_getinherited(const trace_attr_t *restrict,
+ int *restrict);
+
+
+int posix_trace_attr_getlogfullpolicy(const trace_attr_t *restrict,
+ int *restrict);
+int posix_trace_attr_getlogsize(const trace_attr_t *restrict,
+ size_t *restrict);
+
+int posix_trace_attr_getmaxdatasize(const trace_attr_t *restrict,
+ size_t *restrict);
+int posix_trace_attr_getmaxsystemeventsize(const trace_attr_t *restrict,
+ size_t *restrict);
+int posix_trace_attr_getmaxusereventsize(const trace_attr_t *restrict,
+ size_t, size_t *restrict);
+int posix_trace_attr_getname(const trace_attr_t *, char *);
+int posix_trace_attr_getstreamfullpolicy(const trace_attr_t *restrict,
+ int *restrict);
+int posix_trace_attr_getstreamsize(const trace_attr_t *restrict,
+ size_t *restrict);
+int posix_trace_attr_init(trace_attr_t *);
+
+int posix_trace_attr_setinherited(trace_attr_t *, int);
+
+
+int posix_trace_attr_setlogfullpolicy(trace_attr_t *, int);
+int posix_trace_attr_setlogsize(trace_attr_t *, size_t);
+
+int posix_trace_attr_setmaxdatasize(trace_attr_t *, size_t);
+int posix_trace_attr_setname(trace_attr_t *, const char *);
+int posix_trace_attr_setstreamsize(trace_attr_t *, size_t);
+int posix_trace_attr_setstreamfullpolicy(trace_attr_t *, int);
+int posix_trace_clear(trace_id_t);
+
+int posix_trace_close(trace_id_t);
+
+int posix_trace_create(pid_t, const trace_attr_t *restrict,
+ trace_id_t *restrict);
+
+int posix_trace_create_withlog(pid_t, const trace_attr_t *restrict,
+ int, trace_id_t *restrict);
+
+void posix_trace_event(trace_event_id_t, const void *restrict, size_t);
+int posix_trace_eventid_equal(trace_id_t, trace_event_id_t,
+ trace_event_id_t);
+int posix_trace_eventid_get_name(trace_id_t, trace_event_id_t, char *);
+int posix_trace_eventid_open(const char *restrict,
+ trace_event_id_t *restrict);
+
+int posix_trace_eventset_add(trace_event_id_t, trace_event_set_t *);
+int posix_trace_eventset_del(trace_event_id_t, trace_event_set_t *);
+int posix_trace_eventset_empty(trace_event_set_t *);
+int posix_trace_eventset_fill(trace_event_set_t *, int);
+int posix_trace_eventset_ismember(trace_event_id_t,
+ const trace_event_set_t *restrict, int *restrict);
+
+int posix_trace_eventtypelist_getnext_id(trace_id_t,
+ trace_event_id_t *restrict, int *restrict);
+int posix_trace_eventtypelist_rewind(trace_id_t);
+
+int posix_trace_flush(trace_id_t);
+
+int posix_trace_get_attr(trace_id_t, trace_attr_t *);
+
+int posix_trace_get_filter(trace_id_t, trace_event_set_t *);
+
+int posix_trace_get_status(trace_id_t,
+ struct posix_trace_status_info *);
+int posix_trace_getnext_event(trace_id_t,
+ struct posix_trace_event_info *restrict, void *restrict,
+ size_t, size_t *restrict, int *restrict);
+
+int posix_trace_open(int, trace_id_t *);
+int posix_trace_rewind(trace_id_t);
+
+
+int posix_trace_set_filter(trace_id_t, const trace_event_set_t *, int);
+
+int posix_trace_shutdown(trace_id_t);
+int posix_trace_start(trace_id_t);
+int posix_trace_stop(trace_id_t);
+
+int posix_trace_timedgetnext_event(trace_id_t,
+ struct posix_trace_event_info *restrict, void *restrict,
+ size_t, size_t *restrict, int *restrict,
+ const struct timespec *restrict);
+
+
+int posix_trace_trid_eventid_open(trace_id_t, const char *restrict,
+ trace_event_id_t *restrict);
+
+int posix_trace_trygetnext_event(trace_id_t,
+ struct posix_trace_event_info *restrict, void *restrict, size_t,
+ size_t *restrict, int *restrict);
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<sys/types.h>\fP, the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+Section 2.11, Tracing, \fIposix_trace_attr_destroy\fP(), \fIposix_trace_attr_getclockres\fP(),
+\fIposix_trace_attr_getcreatetime\fP(), \fIposix_trace_attr_getgenversion\fP(),
+\fIposix_trace_attr_getinherited\fP(), \fIposix_trace_attr_getlogfullpolicy\fP(),
+\fIposix_trace_attr_getlogsize\fP(), \fIposix_trace_attr_getmaxdatasize\fP(),
+\fIposix_trace_attr_getmaxsystemeventsize\fP(), \fIposix_trace_attr_getmaxusereventsize\fP(),
+\fIposix_trace_attr_getname\fP(), \fIposix_trace_attr_getstreamfullpolicy\fP(),
+\fIposix_trace_attr_getstreamsize\fP(), \fIposix_trace_attr_init\fP(),
+\fIposix_trace_attr_setinherited\fP(), \fIposix_trace_attr_setlogfullpolicy\fP(),
+\fIposix_trace_attr_setlogsize\fP(), \fIposix_trace_attr_setmaxdatasize\fP(),
+\fIposix_trace_attr_setname\fP(), \fIposix_trace_attr_setstreamsize\fP(),
+\fIposix_trace_attr_setstreamfullpolicy\fP(), \fIposix_trace_clear\fP(),
+\fIposix_trace_close\fP(), \fIposix_trace_create\fP(), \fIposix_trace_create_withlog\fP(),
+\fIposix_trace_event\fP(), \fIposix_trace_eventid_equal\fP(), \fIposix_trace_eventid_get_name\fP(),
+\fIposix_trace_eventid_open\fP(), \fIposix_trace_eventtypelist_getnext_id\fP(),
+\fIposix_trace_eventtypelist_rewind\fP(), \fIposix_trace_eventset_add\fP(),
+\fIposix_trace_eventset_del\fP(), \fIposix_trace_eventset_empty\fP(),
+\fIposix_trace_eventset_fill\fP(), \fIposix_trace_eventset_ismember\fP(),
+\fIposix_trace_flush\fP(), \fIposix_trace_get_attr\fP(), \fIposix_trace_get_filter\fP(),
+\fIposix_trace_get_status\fP(), \fIposix_trace_getnext_event\fP(),
+\fIposix_trace_open\fP(), \fIposix_trace_rewind\fP(), \fIposix_trace_set_filter\fP(),
+\fIposix_trace_shutdown\fP(), \fIposix_trace_start\fP(), \fIposix_trace_stop\fP(),
+\fIposix_trace_timedgetnext_event\fP(), \fIposix_trace_trid_eventid_open\fP(),
+\fIposix_trace_trygetnext_event\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/types.h.0p b/man-pages-posix-2003/man0p/types.h.0p
new file mode 100644
index 0000000..b33c1ff
--- /dev/null
+++ b/man-pages-posix-2003/man0p/types.h.0p
@@ -0,0 +1 @@
+.so man0p/sys_types.h.0p
diff --git a/man-pages-posix-2003/man0p/ucontext.h.0p b/man-pages-posix-2003/man0p/ucontext.h.0p
new file mode 100644
index 0000000..5e540d9
--- /dev/null
+++ b/man-pages-posix-2003/man0p/ucontext.h.0p
@@ -0,0 +1,73 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<ucontext.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <ucontext.h>
+.SH NAME
+ucontext.h \- user context
+.SH SYNOPSIS
+.LP
+\fB#include <ucontext.h> \fP
+.SH DESCRIPTION
+.LP
+The \fI<ucontext.h>\fP header shall define the \fBmcontext_t\fP type
+through \fBtypedef\fP.
+.LP
+The \fI<ucontext.h>\fP header shall define the \fBucontext_t\fP type
+as a structure that shall include at least the
+following members:
+.sp
+.RS
+.nf
+
+\fBucontext_t *uc_link \fP Pointer to the context that is resumed \fB
+ \fP when this context returns. \fB
+sigset_t uc_sigmask \fP The set of signals that are blocked when this \fB
+ \fP context is active. \fB
+stack_t uc_stack \fP The stack used by this context. \fB
+mcontext_t uc_mcontext\fP A machine-specific representation of the saved \fB
+ \fP context. \fB
+\fP
+.fi
+.RE
+.LP
+The types \fBsigset_t\fP and \fBstack_t\fP shall be defined as in
+\fI<signal.h>\fP .
+.LP
+The following shall be declared as functions and may also be defined
+as macros, Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBint getcontext(ucontext_t *);
+int setcontext(const ucontext_t *);
+void makecontext(ucontext_t *, void (*)(void), int, ...);
+int swapcontext(ucontext_t *restrict, const ucontext_t *restrict);
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<signal.h>\fP, the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+\fIgetcontext\fP(), \fImakecontext\fP(), \fIsigaction\fP(), \fIsigprocmask\fP(),
+\fIsigaltstack\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/uio.h.0p b/man-pages-posix-2003/man0p/uio.h.0p
new file mode 100644
index 0000000..78a3ab8
--- /dev/null
+++ b/man-pages-posix-2003/man0p/uio.h.0p
@@ -0,0 +1 @@
+.so man0p/sys_uio.h.0p
diff --git a/man-pages-posix-2003/man0p/ulimit.h.0p b/man-pages-posix-2003/man0p/ulimit.h.0p
new file mode 100644
index 0000000..4a98e38
--- /dev/null
+++ b/man-pages-posix-2003/man0p/ulimit.h.0p
@@ -0,0 +1,56 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<ulimit.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <ulimit.h>
+.SH NAME
+ulimit.h \- ulimit commands
+.SH SYNOPSIS
+.LP
+\fB#include <ulimit.h> \fP
+.SH DESCRIPTION
+.LP
+The \fI<ulimit.h>\fP header shall define the symbolic constants used
+by the \fIulimit\fP() function.
+.LP
+Symbolic constants:
+.TP 7
+UL_GETFSIZE
+Get maximum file size.
+.TP 7
+UL_SETFSIZE
+Set maximum file size.
+.sp
+.LP
+The following shall be declared as a function and may also be defined
+as a macro. A function prototype shall be provided.
+.sp
+.RS
+.nf
+
+\fBlong ulimit(int, ...);
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIulimit\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/un.h.0p b/man-pages-posix-2003/man0p/un.h.0p
new file mode 100644
index 0000000..f216564
--- /dev/null
+++ b/man-pages-posix-2003/man0p/un.h.0p
@@ -0,0 +1 @@
+.so man0p/sys_un.h.0p
diff --git a/man-pages-posix-2003/man0p/unistd.h.0p b/man-pages-posix-2003/man0p/unistd.h.0p
new file mode 100644
index 0000000..13062c7
--- /dev/null
+++ b/man-pages-posix-2003/man0p/unistd.h.0p
@@ -0,0 +1,1396 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<unistd.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <unistd.h>
+.SH NAME
+unistd.h \- standard symbolic constants and types
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>\fP
+.SH DESCRIPTION
+.LP
+The \fI<unistd.h>\fP header defines miscellaneous symbolic constants
+and types, and declares miscellaneous functions. The
+actual values of the constants are unspecified except as shown. The
+contents of this header are shown below.
+.SS Version Test Macros
+.LP
+The following symbolic constants shall be defined:
+.TP 7
+_POSIX_VERSION
+Integer value indicating version of IEEE\ Std\ 1003.1 (C-language
+binding) to which the implementation conforms. For
+implementations conforming to IEEE\ Std\ 1003.1-2001, the value shall
+be 200112L.
+.TP 7
+_POSIX2_VERSION
+Integer value indicating version of the Shell and Utilities volume
+of IEEE\ Std\ 1003.1 to which the implementation
+conforms. For implementations conforming to IEEE\ Std\ 1003.1-2001,
+the value shall be 200112L.
+.sp
+.LP
+The following symbolic constant shall be defined only if the implementation
+supports the XSI option; see \fIXSI Conformance\fP .
+.TP 7
+_XOPEN_VERSION
+.sp
+Integer value indicating version of the X/Open Portability Guide to
+which the implementation conforms. The value shall be 600.
+.sp
+.SS Constants for Options and Option Groups
+.LP
+The following symbolic constants, if defined in \fI<unistd.h>\fP,
+shall have a value of -1, 0, or greater, unless
+otherwise specified below. If these are undefined, the \fIfpathconf\fP(),
+\fIpathconf\fP(), or \fIsysconf\fP() functions can be
+used to determine whether the option is provided for a particular
+invocation of the application.
+.LP
+If a symbolic constant is defined with the value -1, the option is
+not supported. Headers, data types, and function interfaces
+required only for the option need not be supplied. An application
+that attempts to use anything associated only with the option is
+considered to be requiring an extension.
+.LP
+If a symbolic constant is defined with a value greater than zero,
+the option shall always be supported when the application is
+executed. All headers, data types, and functions shall be present
+and shall operate as specified.
+.LP
+If a symbolic constant is defined with the value zero, all headers,
+data types, and functions shall be present. The application
+can check at runtime to see whether the option is supported by calling
+\fIfpathconf\fP(), \fIpathconf\fP(), or \fIsysconf\fP() with the indicated
+\fIname\fP parameter.
+.LP
+Unless explicitly specified otherwise, the behavior of functions associated
+with an unsupported option is unspecified, and an
+application that uses such functions without first checking \fIfpathconf\fP(),
+\fIpathconf\fP(), or \fIsysconf\fP() is considered to be
+requiring an extension.
+.LP
+For conformance requirements, refer to \fIConformance\fP .
+.TP 7
+_POSIX_ADVISORY_INFO
+.sp
+The implementation supports the Advisory Information option. If this
+symbol has a value other than -1 or 0, it shall have the value
+200112L.
+.TP 7
+_POSIX_ASYNCHRONOUS_IO
+.sp
+The implementation supports the Asynchronous Input and Output option.
+If this symbol has a value other than -1 or 0, it shall have
+the value 200112L.
+.TP 7
+_POSIX_BARRIERS
+.sp
+The implementation supports the Barriers option. If this symbol has
+a value other than -1 or 0, it shall have the value 200112L.
+.TP 7
+_POSIX_CHOWN_RESTRICTED
+The use of \fIchown\fP() and \fIfchown\fP() is
+restricted to a process with appropriate privileges, and to changing
+the group ID of a file only to the effective group ID of the
+process or to one of its supplementary group IDs. This symbol shall
+always be set to a value other than -1.
+.TP 7
+_POSIX_CLOCK_SELECTION
+.sp
+The implementation supports the Clock Selection option. If this symbol
+has a value other than -1 or 0, it shall have the value
+200112L.
+.TP 7
+_POSIX_CPUTIME
+.sp
+The implementation supports the Process CPU-Time Clocks option. If
+this symbol has a value other than -1 or 0, it shall have the
+value 200112L.
+.TP 7
+_POSIX_FSYNC
+.sp
+The implementation supports the File Synchronization option. If this
+symbol has a value other than -1 or 0, it shall have the value
+200112L.
+.TP 7
+_POSIX_IPV6
+The implementation supports the IPv6 option. If this symbol has a
+value other than -1 or 0, it shall have the value 200112L.
+.TP 7
+_POSIX_JOB_CONTROL
+The implementation supports job control. This symbol shall always
+be set to a value greater than zero.
+.TP 7
+_POSIX_MAPPED_FILES
+.sp
+The implementation supports the Memory Mapped Files option. If this
+symbol has a value other than -1 or 0, it shall have the value
+200112L.
+.TP 7
+_POSIX_MEMLOCK
+.sp
+The implementation supports the Process Memory Locking option. If
+this symbol has a value other than -1 or 0, it shall have the
+value 200112L.
+.TP 7
+_POSIX_MEMLOCK_RANGE
+.sp
+The implementation supports the Range Memory Locking option. If this
+symbol has a value other than -1 or 0, it shall have the value
+200112L.
+.TP 7
+_POSIX_MEMORY_PROTECTION
+.sp
+The implementation supports the Memory Protection option. If this
+symbol has a value other than -1 or 0, it shall have the value
+200112L.
+.TP 7
+_POSIX_MESSAGE_PASSING
+.sp
+The implementation supports the Message Passing option. If this symbol
+has a value other than -1 or 0, it shall have the value
+200112L.
+.TP 7
+_POSIX_MONOTONIC_CLOCK
+.sp
+The implementation supports the Monotonic Clock option. If this symbol
+has a value other than -1 or 0, it shall have the value
+200112L.
+.TP 7
+_POSIX_NO_TRUNC
+Pathname components longer than {NAME_MAX} generate an error. This
+symbol shall always be set to a value other than -1.
+.TP 7
+_POSIX_PRIORITIZED_IO
+.sp
+The implementation supports the Prioritized Input and Output option.
+If this symbol has a value other than -1 or 0, it shall have
+the value 200112L.
+.TP 7
+_POSIX_PRIORITY_SCHEDULING
+.sp
+The implementation supports the Process Scheduling option. If this
+symbol has a value other than -1 or 0, it shall have the value
+200112L.
+.TP 7
+_POSIX_RAW_SOCKETS
+.sp
+The implementation supports the Raw Sockets option. If this symbol
+has a value other than -1 or 0, it shall have the value 200112L.
+.TP 7
+_POSIX_READER_WRITER_LOCKS
+.sp
+The implementation supports the Read-Write Locks option. This is always
+set to a value greater than zero if the Threads option is
+supported. If this symbol has a value other than -1 or 0, it shall
+have the value 200112L.
+.TP 7
+_POSIX_REALTIME_SIGNALS
+.sp
+The implementation supports the Realtime Signals Extension option.
+If this symbol has a value other than -1 or 0, it shall have the
+value 200112L.
+.TP 7
+_POSIX_REGEXP
+The implementation supports the Regular Expression Handling option.
+This symbol shall always be set to a value greater than
+zero.
+.TP 7
+_POSIX_SAVED_IDS
+Each process has a saved set-user-ID and a saved set-group-ID. This
+symbol shall always be set to a value greater than zero.
+.TP 7
+_POSIX_SEMAPHORES
+.sp
+The implementation supports the Semaphores option. If this symbol
+has a value other than -1 or 0, it shall have the value 200112L.
+.TP 7
+_POSIX_SHARED_MEMORY_OBJECTS
+.sp
+The implementation supports the Shared Memory Objects option. If this
+symbol has a value other than -1 or 0, it shall have the
+value 200112L.
+.TP 7
+_POSIX_SHELL
+The implementation supports the POSIX shell. This symbol shall always
+be set to a value greater than zero.
+.TP 7
+_POSIX_SPAWN
+.sp
+The implementation supports the Spawn option. If this symbol has a
+value other than -1 or 0, it shall have the value 200112L.
+.TP 7
+_POSIX_SPIN_LOCKS
+.sp
+The implementation supports the Spin Locks option. If this symbol
+has a value other than -1 or 0, it shall have the value 200112L.
+.TP 7
+_POSIX_SPORADIC_SERVER
+.sp
+The implementation supports the Process Sporadic Server option. If
+this symbol has a value other than -1 or 0, it shall have the
+value 200112L.
+.TP 7
+_POSIX_SYNCHRONIZED_IO
+.sp
+The implementation supports the Synchronized Input and Output option.
+If this symbol has a value other than -1 or 0, it shall have
+the value 200112L.
+.TP 7
+_POSIX_THREAD_ATTR_STACKADDR
+.sp
+The implementation supports the Thread Stack Address Attribute option.
+If this symbol has a value other than -1 or 0, it shall have
+the value 200112L.
+.TP 7
+_POSIX_THREAD_ATTR_STACKSIZE
+.sp
+The implementation supports the Thread Stack Size Attribute option.
+If this symbol has a value other than -1 or 0, it shall have
+the value 200112L.
+.TP 7
+_POSIX_THREAD_CPUTIME
+.sp
+The implementation supports the Thread CPU-Time Clocks option. If
+this symbol has a value other than -1 or 0, it shall have the
+value 200112L.
+.TP 7
+_POSIX_THREAD_PRIO_INHERIT
+.sp
+The implementation supports the Thread Priority Inheritance option.
+If this symbol has a value other than -1 or 0, it shall have
+the value 200112L.
+.TP 7
+_POSIX_THREAD_PRIO_PROTECT
+.sp
+The implementation supports the Thread Priority Protection option.
+If this symbol has a value other than -1 or 0, it shall have the
+value 200112L.
+.TP 7
+_POSIX_THREAD_PRIORITY_SCHEDULING
+.sp
+The implementation supports the Thread Execution Scheduling option.
+If this symbol has a value other than -1 or 0, it shall have
+the value 200112L.
+.TP 7
+_POSIX_THREAD_PROCESS_SHARED
+.sp
+The implementation supports the Thread Process-Shared Synchronization
+option. If this symbol has a value other than -1 or 0, it
+shall have the value 200112L.
+.TP 7
+_POSIX_THREAD_SAFE_FUNCTIONS
+.sp
+The implementation supports the Thread-Safe Functions option. If this
+symbol has a value other than -1 or 0, it shall have the
+value 200112L.
+.TP 7
+_POSIX_THREAD_SPORADIC_SERVER
+.sp
+The implementation supports the Thread Sporadic Server option. If
+this symbol has a value other than -1 or 0, it shall have the
+value 200112L.
+.TP 7
+_POSIX_THREADS
+.sp
+The implementation supports the Threads option. If this symbol has
+a value other than -1 or 0, it shall have the value 200112L.
+.TP 7
+_POSIX_TIMEOUTS
+.sp
+The implementation supports the Timeouts option. If this symbol has
+a value other than -1 or 0, it shall have the value 200112L.
+.TP 7
+_POSIX_TIMERS
+.sp
+The implementation supports the Timers option. If this symbol has
+a value other than -1 or 0, it shall have the value 200112L.
+.TP 7
+_POSIX_TRACE
+.sp
+The implementation supports the Trace option. If this symbol has a
+value other than -1 or 0, it shall have the value 200112L.
+.TP 7
+_POSIX_TRACE_EVENT_FILTER
+.sp
+The implementation supports the Trace Event Filter option. If this
+symbol has a value other than -1 or 0, it shall have the value
+200112L.
+.TP 7
+_POSIX_TRACE_INHERIT
+.sp
+The implementation supports the Trace Inherit option. If this symbol
+has a value other than -1 or 0, it shall have the value
+200112L.
+.TP 7
+_POSIX_TRACE_LOG
+.sp
+The implementation supports the Trace Log option. If this symbol has
+a value other than -1 or 0, it shall have the value 200112L.
+.TP 7
+_POSIX_TYPED_MEMORY_OBJECTS
+.sp
+The implementation supports the Typed Memory Objects option. If this
+symbol has a value other than -1 or 0, it shall have the value
+200112L.
+.TP 7
+_POSIX_VDISABLE
+This symbol shall be defined to be the value of a character that shall
+disable terminal special character handling as described in
+\fI<termios.h>\fP . This symbol shall always be set to a value other
+than -1.
+.TP 7
+_POSIX2_C_BIND
+The implementation supports the C-Language Binding option. This symbol
+shall always have the value 200112L.
+.TP 7
+_POSIX2_C_DEV
+.sp
+The implementation supports the C-Language Development Utilities option.
+If this symbol has a value other than -1 or 0, it shall
+have the value 200112L.
+.TP 7
+_POSIX2_CHAR_TERM
+The implementation supports at least one terminal type.
+.TP 7
+_POSIX2_FORT_DEV
+.sp
+The implementation supports the FORTRAN Development Utilities option.
+If this symbol has a value other than -1 or 0, it shall have
+the value 200112L.
+.TP 7
+_POSIX2_FORT_RUN
+.sp
+The implementation supports the FORTRAN Runtime Utilities option.
+If this symbol has a value other than -1 or 0, it shall have the
+value 200112L.
+.TP 7
+_POSIX2_LOCALEDEF
+The implementation supports the creation of locales by the \fIlocaledef\fP
+utility. If
+this symbol has a value other than -1 or 0, it shall have the value
+200112L.
+.TP 7
+_POSIX2_PBS
+.sp
+The implementation supports the Batch Environment Services and Utilities
+option. If this symbol has a value other than -1 or 0, it
+shall have the value 200112L.
+.TP 7
+_POSIX2_PBS_ACCOUNTING
+.sp
+The implementation supports the Batch Accounting option. If this symbol
+has a value other than -1 or 0, it shall have the value
+200112L.
+.TP 7
+_POSIX2_PBS_CHECKPOINT
+.sp
+The implementation supports the Batch Checkpoint/Restart option. If
+this symbol has a value other than -1 or 0, it shall have the
+value 200112L.
+.TP 7
+_POSIX2_PBS_LOCATE
+.sp
+The implementation supports the Locate Batch Job Request option. If
+this symbol has a value other than -1 or 0, it shall have the
+value 200112L.
+.TP 7
+_POSIX2_PBS_MESSAGE
+.sp
+The implementation supports the Batch Job Message Request option.
+If this symbol has a value other than -1 or 0, it shall have the
+value 200112L.
+.TP 7
+_POSIX2_PBS_TRACK
+.sp
+The implementation supports the Track Batch Job Request option. If
+this symbol has a value other than -1 or 0, it shall have the
+value 200112L.
+.TP 7
+_POSIX2_SW_DEV
+.sp
+The implementation supports the Software Development Utilities option.
+If this symbol has a value other than -1 or 0, it shall have
+the value 200112L.
+.TP 7
+_POSIX2_UPE
+.sp
+The implementation supports the User Portability Utilities option.
+If this symbol has a value other than -1 or 0, it shall have the
+value 200112L.
+.TP 7
+_V6_ILP32_OFF32
+The implementation provides a C-language compilation environment with
+32-bit \fBint\fP, \fBlong\fP, \fBpointer\fP, and
+\fBoff_t\fP types.
+.TP 7
+_V6_ILP32_OFFBIG
+The implementation provides a C-language compilation environment with
+32-bit \fBint\fP, \fBlong\fP, and \fBpointer\fP types and
+an \fBoff_t\fP type using at least 64 bits.
+.TP 7
+_V6_LP64_OFF64
+The implementation provides a C-language compilation environment with
+32-bit \fBint\fP and 64-bit \fBlong\fP, \fBpointer\fP, and
+\fBoff_t\fP types.
+.TP 7
+_V6_LPBIG_OFFBIG
+The implementation provides a C-language compilation environment with
+an \fBint\fP type using at least 32 bits and \fBlong\fP,
+\fBpointer\fP, and \fBoff_t\fP types using at least 64 bits.
+.TP 7
+_XBS5_ILP32_OFF32 (\fBLEGACY\fP)
+.sp
+The implementation provides a C-language compilation environment with
+32-bit \fBint\fP, \fBlong\fP, \fBpointer\fP, and
+\fBoff_t\fP types.
+.TP 7
+_XBS5_ILP32_OFFBIG (\fBLEGACY\fP)
+.sp
+The implementation provides a C-language compilation environment with
+32-bit \fBint\fP, \fBlong\fP, and \fBpointer\fP types and
+an \fBoff_t\fP type using at least 64 bits.
+.TP 7
+_XBS5_LP64_OFF64 (\fBLEGACY\fP)
+.sp
+The implementation provides a C-language compilation environment with
+32-bit \fBint\fP and 64-bit \fBlong\fP, \fBpointer\fP, and
+\fBoff_t\fP types.
+.TP 7
+_XBS5_LPBIG_OFFBIG (\fBLEGACY\fP)
+.sp
+The implementation provides a C-language compilation environment with
+an \fBint\fP type using at least 32 bits and \fBlong\fP,
+\fBpointer\fP, and \fBoff_t\fP types using at least 64 bits.
+.TP 7
+_XOPEN_CRYPT
+.sp
+The implementation supports the X/Open Encryption Option Group.
+.TP 7
+_XOPEN_ENH_I18N
+The implementation supports the Issue 4, Version 2 Enhanced Internationalization
+Option Group. This symbol shall always be set to a
+value other than -1.
+.TP 7
+_XOPEN_LEGACY
+The implementation supports the Legacy Option Group.
+.TP 7
+_XOPEN_REALTIME
+The implementation supports the X/Open Realtime Option Group.
+.TP 7
+_XOPEN_REALTIME_THREADS
+The implementation supports the X/Open Realtime Threads Option Group.
+.TP 7
+_XOPEN_SHM
+The implementation supports the Issue 4, Version 2 Shared Memory Option
+Group. This symbol shall always be set to a value other
+than -1.
+.TP 7
+_XOPEN_STREAMS
+The implementation supports the XSI STREAMS Option Group.
+.TP 7
+_XOPEN_UNIX
+.sp
+The implementation supports the XSI extension.
+.sp
+.SS Execution-Time Symbolic Constants
+.LP
+If any of the following constants are not defined in the \fI<unistd.h>\fP
+header, the value shall vary depending on the
+file to which it is applied.
+.LP
+If any of the following constants are defined to have value -1 in
+the \fI<unistd.h>\fP header, the implementation shall
+not provide the option on any file; if any are defined to have a value
+other than -1 in the \fI<unistd.h>\fP header, the
+implementation shall provide the option on all applicable files.
+.LP
+All of the following constants, whether defined in \fI<unistd.h>\fP
+or not, may be queried with respect to a specific
+file using the \fIpathconf\fP() or \fIfpathconf\fP() functions:
+.TP 7
+_POSIX_ASYNC_IO
+Asynchronous input or output operations may be performed for the associated
+file.
+.TP 7
+_POSIX_PRIO_IO
+Prioritized input or output operations may be performed for the associated
+file.
+.TP 7
+_POSIX_SYNC_IO
+Synchronized input or output operations may be performed for the associated
+file.
+.sp
+.SS Constants for Functions
+.LP
+The following symbolic constant shall be defined:
+.TP 7
+NULL
+Null pointer
+.sp
+.LP
+The following symbolic constants shall be defined for the \fIaccess\fP()
+function:
+.TP 7
+F_OK
+Test for existence of file.
+.TP 7
+R_OK
+Test for read permission.
+.TP 7
+W_OK
+Test for write permission.
+.TP 7
+X_OK
+Test for execute (search) permission.
+.sp
+.LP
+The constants F_OK, R_OK, W_OK, and X_OK and the expressions \fIR_OK\fP|\fIW_OK\fP,
+\fIR_OK\fP|\fIX_OK\fP, and
+\fIR_OK\fP|\fIW_OK\fP|\fIX_OK\fP shall all have distinct values.
+.LP
+The following symbolic constants shall be defined for the \fIconfstr\fP()
+function:
+.TP 7
+_CS_PATH
+This is the value for the \fIPATH\fP environment variable that finds
+all standard utilities.
+.TP 7
+_CS_POSIX_V6_ILP32_OFF32_CFLAGS
+If \fIsysconf\fP(_SC_V6_ILP32_OFF32) returns -1, the meaning of this
+value is unspecified. Otherwise, this value is the set of
+initial options to be given to the \fIc99\fP utility to build an application
+using a
+programming model with 32-bit \fBint\fP, \fBlong\fP, \fBpointer\fP,
+and \fBoff_t\fP types.
+.TP 7
+_CS_POSIX_V6_ILP32_OFF32_LDFLAGS
+If \fIsysconf\fP(_SC_V6_ILP32_OFF32) returns -1, the meaning of this
+value is unspecified. Otherwise, this value is the set of
+final options to be given to the \fIc99\fP utility to build an application
+using a programming
+model with 32-bit \fBint\fP, \fBlong\fP, \fBpointer\fP, and \fBoff_t\fP
+types.
+.TP 7
+_CS_POSIX_V6_ILP32_OFF32_LIBS
+If \fIsysconf\fP(_SC_V6_ILP32_OFF32) returns -1, the meaning of this
+value is unspecified. Otherwise, this value is the set of
+libraries to be given to the \fIc99\fP utility to build an application
+using a programming
+model with 32-bit \fBint\fP, \fBlong\fP, \fBpointer\fP, and \fBoff_t\fP
+types.
+.TP 7
+_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS
+If \fIsysconf\fP(_SC_V6_ILP32_OFFBIG) returns -1, the meaning of this
+value is unspecified. Otherwise, this value is the set of
+initial options to be given to the \fIc99\fP utility to build an application
+using a
+programming model with 32-bit \fBint\fP, \fBlong\fP, and \fBpointer\fP
+types, and an \fBoff_t\fP type using at least 64
+bits.
+.TP 7
+_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS
+If \fIsysconf\fP(_SC_V6_ILP32_OFFBIG) returns -1, the meaning of this
+value is unspecified. Otherwise, this value is the set of
+final options to be given to the \fIc99\fP utility to build an application
+using a programming
+model with 32-bit \fBint\fP, \fBlong\fP, and \fBpointer\fP types,
+and an \fBoff_t\fP type using at least 64 bits.
+.TP 7
+_CS_POSIX_V6_ILP32_OFFBIG_LIBS
+If \fIsysconf\fP(_SC_V6_ILP32_OFFBIG) returns -1, the meaning of this
+value is unspecified. Otherwise, this value is the set of
+libraries to be given to the \fIc99\fP utility to build an application
+using a programming
+model with 32-bit \fBint\fP, \fBlong\fP, and \fBpointer\fP types,
+and an \fBoff_t\fP type using at least 64 bits.
+.TP 7
+_CS_POSIX_V6_LP64_OFF64_CFLAGS
+If \fIsysconf\fP(_SC_V6_LP64_OFF64) returns -1, the meaning of this
+value is unspecified. Otherwise, this value is the set of
+initial options to be given to the \fIc99\fP utility to build an application
+using a
+programming model with 32-bit \fBint\fP and 64-bit \fBlong\fP, \fBpointer\fP,
+and \fBoff_t\fP types.
+.TP 7
+_CS_POSIX_V6_LP64_OFF64_LDFLAGS
+If \fIsysconf\fP(_SC_V6_LP64_OFF64) returns -1, the meaning of this
+value is unspecified. Otherwise, this value is the set of
+final options to be given to the \fIc99\fP utility to build an application
+using a programming
+model with 32-bit \fBint\fP and 64-bit \fBlong\fP, \fBpointer\fP,
+and \fBoff_t\fP types.
+.TP 7
+_CS_POSIX_V6_LP64_OFF64_LIBS
+If \fIsysconf\fP(_SC_V6_LP64_OFF64) returns -1, the meaning of this
+value is unspecified. Otherwise, this value is the set of
+libraries to be given to the \fIc99\fP utility to build an application
+using a programming
+model with 32-bit \fBint\fP and 64-bit \fBlong\fP, \fBpointer\fP,
+and \fBoff_t\fP types.
+.TP 7
+_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS
+If \fIsysconf\fP(_SC_V6_LPBIG_OFFBIG) returns -1, the meaning of this
+value is unspecified. Otherwise, this value is the set of
+initial options to be given to the \fIc99\fP utility to build an application
+using a
+programming model with an \fBint\fP type using at least 32 bits and
+\fBlong\fP, \fBpointer\fP, and \fBoff_t\fP types using at
+least 64 bits.
+.TP 7
+_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS
+If \fIsysconf\fP(_SC_V6_LPBIG_OFFBIG) returns -1, the meaning of this
+value is unspecified. Otherwise, this value is the set of
+final options to be given to the \fIc99\fP utility to build an application
+using a programming
+model with an \fBint\fP type using at least 32 bits and \fBlong\fP,
+\fBpointer\fP, and \fBoff_t\fP types using at least 64
+bits.
+.TP 7
+_CS_POSIX_V6_LPBIG_OFFBIG_LIBS
+If \fIsysconf\fP(_SC_V6_LPBIG_OFFBIG) returns -1, the meaning of this
+value is unspecified. Otherwise, this value is the set of
+libraries to be given to the \fIc99\fP utility to build an application
+using a programming
+model with an \fBint\fP type using at least 32 bits and \fBlong\fP,
+\fBpointer\fP, and \fBoff_t\fP types using at least 64
+bits.
+.TP 7
+_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS
+This value is a <newline>-separated list of names of programming environments
+supported by the implementation in which the
+widths of the \fBblksize_t\fP, \fBcc_t\fP, \fBmode_t\fP, \fBnfds_t\fP,
+\fBpid_t\fP, \fBptrdiff_t\fP, \fBsize_t\fP,
+\fBspeed_t\fP, \fBssize_t\fP, \fBsuseconds_t\fP, \fBtcflag_t\fP, \fBuseconds_t\fP,
+\fBwchar_t\fP, and \fBwint_t\fP types are
+no greater than the width of type \fBlong\fP.
+.sp
+.LP
+The following symbolic constants are reserved for compatibility with
+Issue 5:
+.LP
+.sp
+_CS_XBS5_ILP32_OFF32_CFLAGS (\fBLEGACY\fP)
+.br
+_CS_XBS5_ILP32_OFF32_LDFLAGS (\fBLEGACY\fP)
+.br
+_CS_XBS5_ILP32_OFF32_LIBS (\fBLEGACY\fP)
+.br
+_CS_XBS5_ILP32_OFF32_LINTFLAGS (\fBLEGACY\fP)
+.br
+_CS_XBS5_ILP32_OFFBIG_CFLAGS (\fBLEGACY\fP)
+.br
+_CS_XBS5_ILP32_OFFBIG_LDFLAGS (\fBLEGACY\fP)
+.br
+_CS_XBS5_ILP32_OFFBIG_LIBS (\fBLEGACY\fP)
+.br
+_CS_XBS5_ILP32_OFFBIG_LINTFLAGS (\fBLEGACY\fP)
+.br
+_CS_XBS5_LP64_OFF64_CFLAGS (\fBLEGACY\fP)
+.br
+_CS_XBS5_LP64_OFF64_LDFLAGS (\fBLEGACY\fP)
+.br
+_CS_XBS5_LP64_OFF64_LIBS (\fBLEGACY\fP)
+.br
+_CS_XBS5_LP64_OFF64_LINTFLAGS (\fBLEGACY\fP)
+.br
+_CS_XBS5_LPBIG_OFFBIG_CFLAGS (\fBLEGACY\fP)
+.br
+_CS_XBS5_LPBIG_OFFBIG_LDFLAGS (\fBLEGACY\fP)
+.br
+_CS_XBS5_LPBIG_OFFBIG_LIBS (\fBLEGACY\fP)
+.br
+_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS (\fBLEGACY\fP)
+.br
+.sp
+.LP
+The following symbolic constants shall be defined for the \fIlseek\fP()
+and \fIfcntl\fP() functions and shall have distinct values:
+.TP 7
+SEEK_CUR
+Set file offset to current plus \fIoffset\fP.
+.TP 7
+SEEK_END
+Set file offset to EOF plus \fIoffset\fP.
+.TP 7
+SEEK_SET
+Set file offset to \fIoffset\fP.
+.sp
+.LP
+The following symbolic constants shall be defined as possible values
+for the \fIfunction\fP argument to the \fIlockf\fP() function:
+.TP 7
+F_LOCK
+Lock a section for exclusive use.
+.TP 7
+F_TEST
+Test section for locks by other processes.
+.TP 7
+F_TLOCK
+Test and lock a section for exclusive use.
+.TP 7
+F_ULOCK
+Unlock locked sections.
+.sp
+.LP
+The following symbolic constants shall be defined for \fIpathconf\fP():
+.LP
+.sp
+_PC_ALLOC_SIZE_MIN
+.br
+_PC_ASYNC_IO
+.br
+_PC_CHOWN_RESTRICTED
+.br
+_PC_FILESIZEBITS
+.br
+_PC_LINK_MAX
+.br
+_PC_MAX_CANON
+.br
+_PC_MAX_INPUT
+.br
+_PC_NAME_MAX
+.br
+_PC_NO_TRUNC
+.br
+_PC_PATH_MAX
+.br
+_PC_PIPE_BUF
+.br
+_PC_PRIO_IO
+.br
+_PC_REC_INCR_XFER_SIZE
+.br
+_PC_REC_MIN_XFER_SIZE
+.br
+_PC_REC_XFER_ALIGN
+.br
+_PC_SYMLINK_MAX
+.br
+_PC_SYNC_IO
+.br
+_PC_VDISABLE
+.br
+.LP
+The following symbolic constants shall be defined for \fIsysconf\fP():
+.LP
+.sp
+_SC_2_C_BIND
+.br
+_SC_2_C_DEV
+.br
+_SC_2_C_VERSION
+.br
+_SC_2_CHAR_TERM
+.br
+_SC_2_FORT_DEV
+.br
+_SC_2_FORT_RUN
+.br
+_SC_2_LOCALEDEF
+.br
+_SC_2_PBS
+.br
+_SC_2_PBS_ACCOUNTING
+.br
+_SC_2_PBS_CHECKPOINT
+.br
+_SC_2_PBS_LOCATE
+.br
+_SC_2_PBS_MESSAGE
+.br
+_SC_2_PBS_TRACK
+.br
+_SC_2_SW_DEV
+.br
+_SC_2_UPE
+.br
+_SC_2_VERSION
+.br
+_SC_ADVISORY_INFO
+.br
+_SC_ARG_MAX
+.br
+_SC_AIO_LISTIO_MAX
+.br
+_SC_AIO_MAX
+.br
+_SC_AIO_PRIO_DELTA_MAX
+.br
+_SC_ASYNCHRONOUS_IO
+.br
+_SC_ATEXIT_MAX
+.br
+_SC_BARRIERS
+.br
+_SC_BC_BASE_MAX
+.br
+_SC_BC_DIM_MAX
+.br
+_SC_BC_SCALE_MAX
+.br
+_SC_BC_STRING_MAX
+.br
+_SC_CHILD_MAX
+.br
+_SC_CLK_TCK
+.br
+_SC_CLOCK_SELECTION
+.br
+_SC_COLL_WEIGHTS_MAX
+.br
+_SC_CPUTIME
+.br
+_SC_DELAYTIMER_MAX
+.br
+_SC_EXPR_NEST_MAX
+.br
+_SC_FILE_LOCKING
+.br
+_SC_FSYNC
+.br
+_SC_GETGR_R_SIZE_MAX
+.br
+_SC_GETPW_R_SIZE_MAX
+.br
+_SC_HOST_NAME_MAX
+.br
+_SC_IOV_MAX
+.br
+_SC_IPV6
+.br
+_SC_JOB_CONTROL
+.br
+_SC_LINE_MAX
+.br
+_SC_LOGIN_NAME_MAX
+.br
+_SC_MAPPED_FILES
+.br
+_SC_MEMLOCK
+.br
+_SC_MEMLOCK_RANGE
+.br
+_SC_MEMORY_PROTECTION
+.br
+_SC_MESSAGE_PASSING
+.br
+_SC_MONOTONIC_CLOCK
+.br
+_SC_MQ_OPEN_MAX
+.br
+_SC_MQ_PRIO_MAX
+.br
+_SC_NGROUPS_MAX
+.br
+_SC_OPEN_MAX
+.br
+_SC_PAGE_SIZE
+.br
+_SC_PAGESIZE
+.br
+_SC_PRIORITIZED_IO
+.br
+_SC_PRIORITY_SCHEDULING
+.br
+_SC_RAW_SOCKETS
+.br
+_SC_RE_DUP_MAX
+.br
+_SC_READER_WRITER_LOCKS
+.br
+_SC_REALTIME_SIGNALS
+.br
+_SC_REGEXP
+.br
+_SC_RTSIG_MAX
+.br
+_SC_SAVED_IDS
+.br
+_SC_SEMAPHORES
+.br
+_SC_SEM_NSEMS_MAX
+.br
+_SC_SEM_VALUE_MAX
+.br
+_SC_SHARED_MEMORY_OBJECTS
+.br
+_SC_SHELL
+.br
+_SC_SIGQUEUE_MAX
+.br
+_SC_SPAWN
+.br
+_SC_SPIN_LOCKS
+.br
+_SC_SPORADIC_SERVER
+.br
+_SC_STREAM_MAX
+.br
+_SC_SYMLOOP_MAX
+.br
+_SC_SYNCHRONIZED_IO
+.br
+_SC_THREAD_ATTR_STACKADDR
+.br
+_SC_THREAD_ATTR_STACKSIZE
+.br
+_SC_THREAD_CPUTIME
+.br
+_SC_THREAD_DESTRUCTOR_ITERATIONS
+.br
+_SC_THREAD_KEYS_MAX
+.br
+_SC_THREAD_PRIO_INHERIT
+.br
+_SC_THREAD_PRIO_PROTECT
+.br
+_SC_THREAD_PRIORITY_SCHEDULING
+.br
+_SC_THREAD_PROCESS_SHARED
+.br
+_SC_THREAD_SAFE_FUNCTIONS
+.br
+_SC_THREAD_SPORADIC_SERVER
+.br
+_SC_THREAD_STACK_MIN
+.br
+_SC_THREAD_THREADS_MAX
+.br
+_SC_TIMEOUTS
+.br
+_SC_THREADS
+.br
+_SC_TIMER_MAX
+.br
+_SC_TIMERS
+.br
+_SC_TRACE
+.br
+_SC_TRACE_EVENT_FILTER
+.br
+_SC_TRACE_INHERIT
+.br
+_SC_TRACE_LOG
+.br
+_SC_TTY_NAME_MAX
+.br
+_SC_TYPED_MEMORY_OBJECTS
+.br
+_SC_TZNAME_MAX
+.br
+_SC_V6_ILP32_OFF32
+.br
+_SC_V6_ILP32_OFFBIG
+.br
+_SC_V6_LP64_OFF64
+.br
+_SC_V6_LPBIG_OFFBIG
+.br
+_SC_VERSION
+.br
+_SC_XBS5_ILP32_OFF32 (\fBLEGACY\fP)
+.br
+_SC_XBS5_ILP32_OFFBIG (\fBLEGACY\fP)
+.br
+_SC_XBS5_LP64_OFF64 (\fBLEGACY\fP)
+.br
+_SC_XBS5_LPBIG_OFFBIG (\fBLEGACY\fP)
+.br
+_SC_XOPEN_CRYPT
+.br
+_SC_XOPEN_ENH_I18N
+.br
+_SC_XOPEN_LEGACY
+.br
+_SC_XOPEN_REALTIME
+.br
+_SC_XOPEN_REALTIME_THREADS
+.br
+_SC_XOPEN_SHM
+.br
+_SC_XOPEN_STREAMS
+.br
+_SC_XOPEN_UNIX
+.br
+_SC_XOPEN_VERSION
+.br
+_SC_XOPEN_XCU_VERSION
+.br
+.LP
+The two constants _SC_PAGESIZE and _SC_PAGE_SIZE may be defined to
+have the same value.
+.LP
+The following symbolic constants shall be defined for file streams:
+.TP 7
+STDERR_FILENO
+File number of \fIstderr\fP; 2.
+.TP 7
+STDIN_FILENO
+File number of \fIstdin\fP; 0.
+.TP 7
+STDOUT_FILENO
+File number of \fIstdout\fP; 1.
+.sp
+.SS Type Definitions
+.LP
+The \fBsize_t\fP, \fBssize_t\fP, \fBuid_t\fP, \fBgid_t\fP, \fBoff_t\fP,
+\fBpid_t\fP, and \fBuseconds_t\fP types shall be
+defined as described in \fI<sys/types.h>\fP.
+.LP
+The \fBintptr_t\fP type shall be defined as described in \fI<inttypes.h>\fP.
+.SS Declarations
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBint access(const char *, int);
+unsigned alarm(unsigned);
+int chdir(const char *);
+int chown(const char *, uid_t, gid_t);
+int close(int);
+size_t confstr(int, char *, size_t);
+.sp
+
+
+char *crypt(const char *, const char *);
+char *ctermid(char *);
+
+int dup(int);
+.sp
+
+int dup2(int, int);
+
+void encrypt(char[64], int);
+
+int execl(const char *, const char *, ...);
+int execle(const char *, const char *, ...);
+int execlp(const char *, const char *, ...);
+int execv(const char *, char *const []);
+int execve(const char *, char *const [], char *const []);
+int execvp(const char *, char *const []);
+void _exit(int);
+int fchown(int, uid_t, gid_t);
+
+int fchdir(int);
+
+
+int fdatasync(int);
+
+pid_t fork(void);
+long fpathconf(int, int);
+
+int fsync(int);
+
+int ftruncate(int, off_t);
+char *getcwd(char *, size_t);
+gid_t getegid(void);
+uid_t geteuid(void);
+gid_t getgid(void);
+int getgroups(int, gid_t []);
+
+long gethostid(void);
+
+int gethostname(char *, size_t);
+char *getlogin(void);
+int getlogin_r(char *, size_t);
+int getopt(int, char * const [], const char *);
+
+pid_t getpgid(pid_t);
+
+pid_t getpgrp(void);
+pid_t getpid(void);
+pid_t getppid(void);
+
+pid_t getsid(pid_t);
+
+uid_t getuid(void);
+
+char *getwd(char *); (\fP\fBLEGACY\fP \fB)
+
+int isatty(int);
+
+int lchown(const char *, uid_t, gid_t);
+
+int link(const char *, const char *);
+
+int lockf(int, int, off_t);
+
+off_t lseek(int, off_t, int);
+
+int nice(int);
+
+long pathconf(const char *, int);
+int pause(void);
+int pipe(int [2]);
+
+ssize_t pread(int, void *, size_t, off_t);
+ssize_t pwrite(int, const void *, size_t, off_t);
+
+ssize_t read(int, void *, size_t);
+ssize_t readlink(const char *restrict, char *restrict, size_t);
+int rmdir(const char *);
+int setegid(gid_t);
+int seteuid(uid_t);
+int setgid(gid_t);
+.sp
+
+int setpgid(pid_t, pid_t);
+
+pid_t setpgrp(void);
+int setregid(gid_t, gid_t);
+int setreuid(uid_t, uid_t);
+
+pid_t setsid(void);
+int setuid(uid_t);
+unsigned sleep(unsigned);
+
+void swab(const void *restrict, void *restrict, ssize_t);
+int symlink(const char *, const char *);
+void sync(void);
+
+long sysconf(int);
+pid_t tcgetpgrp(int);
+int tcsetpgrp(int, pid_t);
+
+int truncate(const char *, off_t);
+
+char *ttyname(int);
+int ttyname_r(int, char *, size_t);
+
+useconds_t ualarm(useconds_t, useconds_t);
+
+int unlink(const char *);
+
+int usleep(useconds_t);
+pid_t vfork(void);
+
+ssize_t write(int, const void *, size_t);
+\fP
+.fi
+.RE
+.LP
+Implementations may also include the \fIpthread_atfork\fP() prototype
+as defined
+in \fI<pthread.h>\fP .
+.LP
+The following external variables shall be declared:
+.sp
+.RS
+.nf
+
+\fBextern char *optarg;
+extern int optind, opterr, optopt;
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+IEEE\ Std\ 1003.1-2001 only describes the behavior of systems that
+claim conformance to it. However, application
+developers who want to write applications that adapt to other versions
+of IEEE\ Std\ 1003.1 (or to systems that do not
+conform to any POSIX standard) may find it useful to code them so
+as to conditionally compile different code depending on the value
+of _POSIX_VERSION, for example:
+.sp
+.RS
+.nf
+
+\fB#if _POSIX_VERSION >= 200112L
+/* Use the newer function that copes with large files. */
+off_t pos=ftello(fp);
+#else
+/* Either this is an old version of POSIX, or _POSIX_VERSION is
+ not even defined, so use the traditional function. */
+long pos=ftell(fp);
+#endif
+\fP
+.fi
+.RE
+.LP
+Earlier versions of IEEE\ Std\ 1003.1 and of the Single UNIX Specification
+can be identified by the following
+macros:
+.TP 7
+POSIX.1-1988 standard
+_POSIX_VERSION==198808L
+.TP 7
+POSIX.1-1990 standard
+_POSIX_VERSION==199009L
+.TP 7
+ISO\ POSIX-1:1996 standard
+_POSIX_VERSION==199506L
+.TP 7
+Single UNIX Specification, Version 1
+_XOPEN_UNIX and _XOPEN_VERSION==4
+.TP 7
+Single UNIX Specification, Version 2
+_XOPEN_UNIX and _XOPEN_VERSION==500
+.sp
+.LP
+IEEE\ Std\ 1003.1-2001 does not make any attempt to define application
+binary interaction with the underlying operating
+system. However, application developers may find it useful to query
+_SC_VERSION at runtime via \fIsysconf\fP() to determine whether the
+current version of the operating system supports the
+necessary functionality as in the following program fragment:
+.sp
+.RS
+.nf
+
+\fBif (sysconf(_SC_VERSION) < 200112L) {
+ fprintf(stderr, "POSIX.1-2001 system required, terminating \\n");
+ exit(1);
+}
+\fP
+.fi
+.RE
+.LP
+New applications should not use _XOPEN_SHM or _XOPEN_ENH_I18N.
+.SH RATIONALE
+.LP
+As IEEE\ Std\ 1003.1-2001 evolved, certain options became sufficiently
+standardized that it was concluded that simply
+requiring one of the option choices was simpler than retaining the
+option. However, for backwards-compatibility, the option flags
+(with required constant values) are retained.
+.SS Version Test Macros
+.LP
+The standard developers considered altering the definition of _POSIX_VERSION
+and removing _SC_VERSION from the specification of
+\fIsysconf\fP() since the utility to an application was deemed by
+some to be minimal, and
+since the implementation of the functionality is potentially problematic.
+However, they recognized that support for existing
+application binaries is a concern to manufacturers, application developers,
+and the users of implementations conforming to
+IEEE\ Std\ 1003.1-2001.
+.LP
+While the example using _SC_VERSION in the APPLICATION USAGE section
+does not provide the greatest degree of imaginable utility
+to the application developer or user, it is arguably better than a
+\fBcore\fP file or some other equally obscure result. (It is
+also possible for implementations to encode and recognize application
+binaries compiled in various POSIX.1-conforming environments,
+and modify the semantics of the underlying system to conform to the
+expectations of the application.) For the reasons outlined in
+the preceding paragraphs and in the APPLICATION USAGE section, the
+standard developers elected to retain the _POSIX_VERSION and
+_SC_VERSION functionality.
+.SS Compile-Time Symbolic Constants for System-Wide Options
+.LP
+IEEE\ Std\ 1003.1-2001 now includes support in certain areas for the
+newly adopted policy governing options and
+stubs.
+.LP
+This policy provides flexibility for implementations in how they support
+options. It also specifies how conforming applications
+can adapt to different implementations that support different sets
+of options. It allows the following:
+.IP " 1." 4
+If an implementation has no interest in supporting an option, it does
+not have to provide anything associated with that option
+beyond the announcement that it does not support it.
+.LP
+.IP " 2." 4
+An implementation can support a partial or incompatible version of
+an option (as a non-standard extension) as long as it does
+not claim to support the option.
+.LP
+.IP " 3." 4
+An application can determine whether the option is supported. A strictly
+conforming application must check this announcement
+mechanism before first using anything associated with the option.
+.LP
+.LP
+There is an important implication of this policy. IEEE\ Std\ 1003.1-2001
+cannot dictate the behavior of interfaces
+associated with an option when the implementation does not claim to
+support the option. In particular, it cannot require that a
+function associated with an unsupported option will fail if it does
+not perform as specified. However, this policy does not prevent
+a standard from requiring certain functions to always be present,
+but that they shall always fail on some implementations. The \fIsetpgid\fP()
+function in the POSIX.1-1990 standard, for example, is considered
+appropriate.
+.LP
+The POSIX standards include various options, and the C-language binding
+support for an option implies that the implementation
+must supply data types and function interfaces. An application must
+be able to discover whether the implementation supports each
+option.
+.LP
+Any application must consider the following three cases for each option:
+.IP " 1." 4
+Option never supported.
+.LP
+The implementation advertises at compile time that the option will
+never be supported. In this case, it is not necessary for the
+implementation to supply any of the data types or function interfaces
+that are provided only as part of the option. The
+implementation might provide data types and functions that are similar
+to those defined by IEEE\ Std\ 1003.1-2001, but
+there is no guarantee for any particular behavior.
+.LP
+.IP " 2." 4
+Option always supported.
+.LP
+The implementation advertises at compile time that the option will
+always be supported. In this case, all data types and
+function interfaces shall be available and shall operate as specified.
+.LP
+.IP " 3." 4
+Option might or might not be supported.
+.LP
+Some implementations might not provide a mechanism to specify support
+of options at compile time. In addition, the
+implementation might be unable or unwilling to specify support or
+non-support at compile time. In either case, any application that
+might use the option at runtime must be able to compile and execute.
+The implementation must provide, at compile time, all data
+types and function interfaces that are necessary to allow this. In
+this situation, there must be a mechanism that allows the
+application to query, at runtime, whether the option is supported.
+If the application attempts to use the option when it is not
+supported, the result is unspecified unless explicitly specified otherwise
+in IEEE\ Std\ 1003.1-2001.
+.LP
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<inttypes.h>\fP, \fI<limits.h>\fP, \fI<sys/socket.h>\fP, \fI<sys/types.h>\fP,
+\fI<termios.h>\fP, \fI<wctype.h>\fP, the System Interfaces volume
+of IEEE\ Std\ 1003.1-2001, \fIaccess\fP(), \fIalarm\fP(), \fIchdir\fP(),
+\fIchown\fP(), \fIclose\fP(), \fIcrypt\fP(), \fIctermid\fP(), \fIdup\fP(),
+\fIencrypt\fP(), \fIenviron\fP, \fIexec\fP, \fIexit\fP(), \fIfchdir\fP(),
+\fIfchown\fP(), \fIfcntl\fP(), \fIfork\fP(), \fIfpathconf\fP(), \fIfsync\fP(),
+\fIftruncate\fP(), \fIgetcwd\fP(), \fIgetegid\fP(), \fIgeteuid\fP(),
+\fIgetgid\fP(), \fIgetgroups\fP(), \fIgethostid\fP(), \fIgethostname\fP(),
+\fIgetlogin\fP(), \fIgetpgid\fP(), \fIgetpgrp\fP(), \fIgetpid\fP(),
+\fIgetppid\fP(), \fIgetsid\fP(), \fIgetuid\fP(), \fIisatty\fP(), \fIlchown\fP(),
+\fIlink\fP(), \fIlockf\fP(), \fIlseek\fP(), \fInice\fP(), \fIpathconf\fP(),
+\fIpause\fP(), \fIpipe\fP(), \fIread\fP(), \fIreadlink\fP(), \fIrmdir\fP(),
+\fIsetgid\fP(), \fIsetpgid\fP(), \fIsetpgrp\fP(), \fIsetregid\fP(),
+\fIsetreuid\fP(), \fIsetsid\fP(), \fIsetuid\fP(), \fIsleep\fP(), \fIswab\fP(),
+\fIsymlink\fP(), \fIsync\fP(), \fIsysconf\fP(), \fItcgetpgrp\fP(),
+\fItcsetpgrp\fP(), \fItruncate\fP(), \fIttyname\fP(), \fIualarm\fP(),
+\fIunlink\fP(), \fIusleep\fP(), \fIvfork\fP(), \fIwrite\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/utime.h.0p b/man-pages-posix-2003/man0p/utime.h.0p
new file mode 100644
index 0000000..eca6731
--- /dev/null
+++ b/man-pages-posix-2003/man0p/utime.h.0p
@@ -0,0 +1,62 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<utime.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <utime.h>
+.SH NAME
+utime.h \- access and modification times structure
+.SH SYNOPSIS
+.LP
+\fB#include <utime.h>\fP
+.SH DESCRIPTION
+.LP
+The \fI<utime.h>\fP header shall declare the structure \fButimbuf\fP,
+which shall include the following members:
+.sp
+.RS
+.nf
+
+\fBtime_t actime \fP Access time. \fB
+time_t modtime \fP Modification time. \fB
+\fP
+.fi
+.RE
+.LP
+The times shall be measured in seconds since the Epoch.
+.LP
+The type \fBtime_t\fP shall be defined as described in \fI<sys/types.h>\fP
+\&.
+.LP
+The following shall be declared as a function and may also be defined
+as a macro. A function prototype shall be provided.
+.sp
+.RS
+.nf
+
+\fBint utime(const char *, const struct utimbuf *);
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<sys/types.h>\fP, the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+\fIutime\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/utmpx.h.0p b/man-pages-posix-2003/man0p/utmpx.h.0p
new file mode 100644
index 0000000..2840706
--- /dev/null
+++ b/man-pages-posix-2003/man0p/utmpx.h.0p
@@ -0,0 +1,104 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<utmpx.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <utmpx.h>
+.SH NAME
+utmpx.h \- user accounting database definitions
+.SH SYNOPSIS
+.LP
+\fB#include <utmpx.h> \fP
+.SH DESCRIPTION
+.LP
+The \fI<utmpx.h>\fP header shall define the \fButmpx\fP structure
+that shall include at least the following members:
+.sp
+.RS
+.nf
+
+\fBchar ut_user[] \fP User login name. \fB
+char ut_id[] \fP Unspecified initialization process identifier. \fB
+char ut_line[] \fP Device name. \fB
+pid_t ut_pid \fP Process ID. \fB
+short ut_type \fP Type of entry. \fB
+struct timeval ut_tv \fP Time entry was made. \fB
+\fP
+.fi
+.RE
+.LP
+The \fBpid_t\fP type shall be defined through \fBtypedef\fP as described
+in \fI<sys/types.h>\fP .
+.LP
+The \fBtimeval\fP structure shall be defined as described in \fI<sys/time.h>\fP
+\&.
+.LP
+Inclusion of the \fI<utmpx.h>\fP header may also make visible all
+symbols from \fI<sys/time.h>\fP.
+.LP
+The following symbolic constants shall be defined as possible values
+for the \fIut_type\fP member of the \fButmpx\fP
+structure:
+.TP 7
+EMPTY
+No valid user accounting information.
+.TP 7
+BOOT_TIME
+Identifies time of system boot.
+.TP 7
+OLD_TIME
+Identifies time when system clock changed.
+.TP 7
+NEW_TIME
+Identifies time after system clock changed.
+.TP 7
+USER_PROCESS
+Identifies a process.
+.TP 7
+INIT_PROCESS
+Identifies a process spawned by the init process.
+.TP 7
+LOGIN_PROCESS
+Identifies the session leader of a logged-in user.
+.TP 7
+DEAD_PROCESS
+Identifies a session leader who has exited.
+.sp
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBvoid endutxent(void);
+struct utmpx *getutxent(void);
+struct utmpx *getutxid(const struct utmpx *);
+struct utmpx *getutxline(const struct utmpx *);
+struct utmpx *pututxline(const struct utmpx *);
+void setutxent(void);
+\fP
+.fi
+.RE
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<sys/time.h>\fP, \fI<sys/types.h>\fP, the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIendutxent\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/utsname.h.0p b/man-pages-posix-2003/man0p/utsname.h.0p
new file mode 100644
index 0000000..ee3a176
--- /dev/null
+++ b/man-pages-posix-2003/man0p/utsname.h.0p
@@ -0,0 +1 @@
+.so man0p/sys_utsname.h.0p
diff --git a/man-pages-posix-2003/man0p/wait.h.0p b/man-pages-posix-2003/man0p/wait.h.0p
new file mode 100644
index 0000000..e312224
--- /dev/null
+++ b/man-pages-posix-2003/man0p/wait.h.0p
@@ -0,0 +1 @@
+.so man0p/sys_wait.h.0p
diff --git a/man-pages-posix-2003/man0p/wchar.h.0p b/man-pages-posix-2003/man0p/wchar.h.0p
new file mode 100644
index 0000000..1c415e3
--- /dev/null
+++ b/man-pages-posix-2003/man0p/wchar.h.0p
@@ -0,0 +1,242 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<wchar.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <wchar.h>
+.SH NAME
+wchar.h \- wide-character handling
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>\fP
+.SH DESCRIPTION
+.LP
+Some of the functionality described on this reference page extends
+the ISO\ C standard. Applications shall define
+the appropriate feature test macro (see the System Interfaces volume
+of IEEE\ Std\ 1003.1-2001, Section 2.2, The Compilation Environment)
+to enable the visibility of these symbols in this
+header.
+.LP
+The \fI<wchar.h>\fP header shall define the following types:
+.TP 7
+\fBwchar_t\fP
+As described in \fI<stddef.h>\fP .
+.TP 7
+\fBwint_t\fP
+An integer type capable of storing any valid value of \fBwchar_t\fP
+or WEOF.
+.TP 7
+\fBwctype_t\fP
+A scalar type of a data object that can hold values which represent
+locale-specific character classification.
+.TP 7
+\fBmbstate_t\fP
+An object type other than an array type that can hold the conversion
+state information necessary to convert between sequences
+of (possibly multi-byte) characters and wide characters. If a
+codeset is being used such that an \fBmbstate_t\fP needs to
+preserve more than 2 levels of reserved state, the results are unspecified.
+.TP 7
+\fBFILE\fP
+As described in \fI<stdio.h>\fP .
+.TP 7
+\fBsize_t\fP
+As described in \fI<stddef.h>\fP .
+.TP 7
+\fBva_list\fP
+As described in \fI<stdarg.h>\fP .
+.sp
+.LP
+The implementation shall support one or more programming environments
+in which the width of \fBwint_t\fP is no greater than the
+width of type \fBlong\fP. The names of these programming environments
+can be obtained using the \fIconfstr\fP() function or the \fIgetconf\fP
+utility.
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBwint_t btowc(int);
+wint_t fgetwc(FILE *);
+wchar_t *fgetws(wchar_t *restrict, int, FILE *restrict);
+wint_t fputwc(wchar_t, FILE *);
+int fputws(const wchar_t *restrict, FILE *restrict);
+int fwide(FILE *, int);
+int fwprintf(FILE *restrict, const wchar_t *restrict, ...);
+int fwscanf(FILE *restrict, const wchar_t *restrict, ...);
+wint_t getwc(FILE *);
+wint_t getwchar(void);
+
+int iswalnum(wint_t);
+int iswalpha(wint_t);
+int iswcntrl(wint_t);
+int iswctype(wint_t, wctype_t);
+int iswdigit(wint_t);
+int iswgraph(wint_t);
+int iswlower(wint_t);
+int iswprint(wint_t);
+int iswpunct(wint_t);
+int iswspace(wint_t);
+int iswupper(wint_t);
+int iswxdigit(wint_t);
+
+size_t mbrlen(const char *restrict, size_t, mbstate_t *restrict);
+size_t mbrtowc(wchar_t *restrict, const char *restrict, size_t,
+ mbstate_t *restrict);
+int mbsinit(const mbstate_t *);
+size_t mbsrtowcs(wchar_t *restrict, const char **restrict, size_t,
+ mbstate_t *restrict);
+wint_t putwc(wchar_t, FILE *);
+wint_t putwchar(wchar_t);
+int swprintf(wchar_t *restrict, size_t,
+ const wchar_t *restrict, ...);
+int swscanf(const wchar_t *restrict,
+ const wchar_t *restrict, ...);
+
+wint_t towlower(wint_t);
+wint_t towupper(wint_t);
+
+wint_t ungetwc(wint_t, FILE *);
+int vfwprintf(FILE *restrict, const wchar_t *restrict, va_list);
+int vfwscanf(FILE *restrict, const wchar_t *restrict, va_list);
+int vwprintf(const wchar_t *restrict, va_list);
+int vswprintf(wchar_t *restrict, size_t,
+ const wchar_t *restrict, va_list);
+int vswscanf(const wchar_t *restrict, const wchar_t *restrict,
+ va_list);
+int vwscanf(const wchar_t *restrict, va_list);
+size_t wcrtomb(char *restrict, wchar_t, mbstate_t *restrict);
+wchar_t *wcscat(wchar_t *restrict, const wchar_t *restrict);
+wchar_t *wcschr(const wchar_t *, wchar_t);
+int wcscmp(const wchar_t *, const wchar_t *);
+int wcscoll(const wchar_t *, const wchar_t *);
+wchar_t *wcscpy(wchar_t *restrict, const wchar_t *restrict);
+size_t wcscspn(const wchar_t *, const wchar_t *);
+size_t wcsftime(wchar_t *restrict, size_t,
+ const wchar_t *restrict, const struct tm *restrict);
+size_t wcslen(const wchar_t *);
+wchar_t *wcsncat(wchar_t *restrict, const wchar_t *restrict, size_t);
+int wcsncmp(const wchar_t *, const wchar_t *, size_t);
+wchar_t *wcsncpy(wchar_t *restrict, const wchar_t *restrict, size_t);
+wchar_t *wcspbrk(const wchar_t *, const wchar_t *);
+wchar_t *wcsrchr(const wchar_t *, wchar_t);
+size_t wcsrtombs(char *restrict, const wchar_t **restrict,
+ size_t, mbstate_t *restrict);
+size_t wcsspn(const wchar_t *, const wchar_t *);
+wchar_t *wcsstr(const wchar_t *restrict, const wchar_t *restrict);
+double wcstod(const wchar_t *restrict, wchar_t **restrict);
+float wcstof(const wchar_t *restrict, wchar_t **restrict);
+wchar_t *wcstok(wchar_t *restrict, const wchar_t *restrict,
+ wchar_t **restrict);
+long wcstol(const wchar_t *restrict, wchar_t **restrict, int);
+long double wcstold(const wchar_t *restrict, wchar_t **restrict);
+long long wcstoll(const wchar_t *restrict, wchar_t **restrict, int);
+unsigned long wcstoul(const wchar_t *restrict, wchar_t **restrict, int);
+unsigned long long
+ wcstoull(const wchar_t *restrict, wchar_t **restrict, int);
+
+wchar_t *wcswcs(const wchar_t *, const wchar_t *);
+int wcswidth(const wchar_t *, size_t);
+
+size_t wcsxfrm(wchar_t *restrict, const wchar_t *restrict, size_t);
+int wctob(wint_t);
+
+wctype_t wctype(const char *);
+int wcwidth(wchar_t);
+
+wchar_t *wmemchr(const wchar_t *, wchar_t, size_t);
+int wmemcmp(const wchar_t *, const wchar_t *, size_t);
+wchar_t *wmemcpy(wchar_t *restrict, const wchar_t *restrict, size_t);
+wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t);
+wchar_t *wmemset(wchar_t *, wchar_t, size_t);
+int wprintf(const wchar_t *restrict, ...);
+int wscanf(const wchar_t *restrict, ...);
+\fP
+.fi
+.RE
+.LP
+The \fI<wchar.h>\fP header shall define the following macros:
+.TP 7
+WCHAR_MAX
+The maximum value representable by an object of type \fBwchar_t\fP.
+.TP 7
+WCHAR_MIN
+The minimum value representable by an object of type \fBwchar_t\fP.
+.TP 7
+WEOF
+Constant expression of type \fBwint_t\fP that is returned by several
+WP functions to indicate end-of-file.
+.TP 7
+NULL
+As described in \fI<stddef.h>\fP .
+.sp
+.LP
+The tag \fBtm\fP shall be declared as naming an incomplete structure
+type, the contents of which are described in the header \fI<time.h>\fP
+\&.
+.LP
+Inclusion of the \fI<wchar.h>\fP header may make visible all symbols
+from the headers \fI<ctype.h>\fP, \fI<string.h>\fP, \fI<stdarg.h>\fP,
+\fI<stddef.h>\fP, \fI<stdio.h>\fP, \fI<stdlib.h>\fP, and \fI<time.h>\fP.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The \fIiswblank\fP() function was a late addition to the ISO\ C standard
+and was
+introduced at the same time as the ISO\ C standard introduced \fI<wctype.h>\fP,
+which contains all of the \fIisw*\fP() functions. The Open Group Base
+Specifications had
+previously aligned with the MSE working draft and had introduced the
+rest of the \fIisw*\fP()
+functions into \fI<wchar.h>\fP. For backwards-compatibility, the original
+set of
+\fIisw*\fP() functions, without \fIiswblank\fP(), are
+permitted (as an XSI extension) in \fI<wchar.h>\fP. For maximum portability,
+applications should include \fI<wctype.h>\fP in order to obtain declarations
+for the
+\fIisw*\fP() functions.
+.SH RATIONALE
+.LP
+In the ISO\ C standard, the symbols referenced as XSI extensions are
+in \fI<wctype.h>\fP. Their presence here is thus an extension.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<ctype.h>\fP, \fI<stdarg.h>\fP, \fI<stddef.h>\fP, \fI<stdio.h>\fP,
+\fI<stdlib.h>\fP, \fI<string.h>\fP, \fI<time.h>\fP, \fI<wctype.h>\fP,
+the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001, \fIbtowc\fP(), \fIconfstr\fP(), \fIfgetwc\fP(),
+\fIfgetws\fP(), \fIfputwc\fP(), \fIfputws\fP(), \fIfwide\fP(), \fIfwprintf\fP(),
+\fIfwscanf\fP(), \fIgetwc\fP(), \fIgetwchar\fP(), \fIiswalnum\fP(),
+\fIiswalpha\fP(), \fIiswcntrl\fP(), \fIiswctype\fP(), \fIiswdigit\fP(),
+\fIiswgraph\fP(), \fIiswlower\fP(), \fIiswprint\fP(), \fIiswpunct\fP(),
+\fIiswspace\fP(), \fIiswupper\fP(), \fIiswxdigit\fP(), \fIiswctype\fP(),
+\fImbsinit\fP(), \fImbrlen\fP(), \fImbrtowc\fP(), \fImbsrtowcs\fP(),
+\fIputwc\fP(), \fIputwchar\fP(), \fIswprintf\fP(), \fIswscanf\fP(),
+\fItowlower\fP(), \fItowupper\fP(), \fIungetwc\fP(), \fIvfwprintf\fP(),
+\fIvfwscanf\fP(), \fIvswprintf\fP(), \fIvswscanf\fP(), \fIvwscanf\fP(),
+\fIwcrtomb\fP(), \fIwcsrtombs\fP(), \fIwcscat\fP(), \fIwcschr\fP(),
+\fIwcscmp\fP(), \fIwcscoll\fP(), \fIwcscpy\fP(), \fIwcscspn\fP(),
+\fIwcsftime\fP(), \fIwcslen\fP(), \fIwcsncat\fP(), \fIwcsncmp\fP(),
+\fIwcsncpy\fP(), \fIwcspbrk\fP(), \fIwcsrchr\fP(), \fIwcsspn\fP(),
+\fIwcsstr\fP(), \fIwcstod\fP(), \fIwcstof\fP(), \fIwcstok\fP(), \fIwcstol\fP(),
+\fIwcstold\fP(), \fIwcstoll\fP(), \fIwcstoul\fP(), \fIwcstoull\fP(),
+\fIwcswcs\fP(), \fIwcswidth\fP(), \fIwcsxfrm\fP(), \fIwctob\fP(),
+\fIwctype\fP(), \fIwcwidth\fP(), \fIwmemchr\fP(), \fIwmemcmp\fP(),
+\fIwmemcpy\fP(), \fIwmemmove\fP(), \fIwmemset\fP(), \fIwprintf\fP(),
+\fIwscanf\fP(), the Shell and Utilities volume of IEEE\ Std\ 1003.1-2001,
+\fIgetconf\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/wctype.h.0p b/man-pages-posix-2003/man0p/wctype.h.0p
new file mode 100644
index 0000000..90d3128
--- /dev/null
+++ b/man-pages-posix-2003/man0p/wctype.h.0p
@@ -0,0 +1,108 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<wctype.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <wctype.h>
+.SH NAME
+wctype.h \- wide-character classification and mapping utilities
+.SH SYNOPSIS
+.LP
+\fB#include <wctype.h>\fP
+.SH DESCRIPTION
+.LP
+Some of the functionality described on this reference page extends
+the ISO\ C standard. Applications shall define
+the appropriate feature test macro (see the System Interfaces volume
+of IEEE\ Std\ 1003.1-2001, Section 2.2, The Compilation Environment)
+to enable the visibility of these symbols in this
+header.
+.LP
+The \fI<wctype.h>\fP header shall define the following types:
+.TP 7
+\fBwint_t\fP
+As described in \fI<wchar.h>\fP .
+.TP 7
+\fBwctrans_t\fP
+A scalar type that can hold values which represent locale-specific
+character mappings.
+.TP 7
+\fBwctype_t\fP
+As described in \fI<wchar.h>\fP .
+.sp
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBint iswalnum(wint_t);
+int iswalpha(wint_t);
+int iswblank(wint_t);
+int iswcntrl(wint_t);
+int iswdigit(wint_t);
+int iswgraph(wint_t);
+int iswlower(wint_t);
+int iswprint(wint_t);
+int iswpunct(wint_t);
+int iswspace(wint_t);
+int iswupper(wint_t);
+int iswxdigit(wint_t);
+int iswctype(wint_t, wctype_t);
+wint_t towctrans(wint_t, wctrans_t);
+wint_t towlower(wint_t);
+wint_t towupper(wint_t);
+wctrans_t wctrans(const char *);
+wctype_t wctype(const char *);
+\fP
+.fi
+.RE
+.LP
+The \fI<wctype.h>\fP header shall define the following macro name:
+.TP 7
+WEOF
+Constant expression of type \fBwint_t\fP that is returned by several
+MSE functions to indicate end-of-file.
+.sp
+.LP
+For all functions described in this header that accept an argument
+of type \fBwint_t\fP, the value is representable as a
+\fBwchar_t\fP or equals the value of WEOF. If this argument has any
+other value, the behavior is undefined.
+.LP
+The behavior of these functions shall be affected by the \fILC_CTYPE\fP
+category of the current locale.
+.LP
+Inclusion of the \fI<wctype.h>\fP header may make visible all symbols
+from the headers \fI<ctype.h>\fP, \fI<stdarg.h>\fP, \fI<stddef.h>\fP,
+\fI<stdio.h>\fP, \fI<stdlib.h>\fP, \fI<string.h>\fP, \fI<time.h>\fP,
+and \fI<wchar.h>\fP.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<ctype.h>\fP, \fI<locale.h>\fP, \fI<stdarg.h>\fP, \fI<stddef.h>\fP,
+\fI<stdio.h>\fP, \fI<stdlib.h>\fP, \fI<string.h>\fP, \fI<time.h>\fP,
+\fI<wchar.h>\fP, the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+\fIiswalnum\fP(), \fIiswalpha\fP(), \fIiswblank\fP(), \fIiswcntrl\fP(),
+\fIiswctype\fP(), \fIiswdigit\fP(), \fIiswgraph\fP(), \fIiswlower\fP(),
+\fIiswprint\fP(), \fIiswpunct\fP(), \fIiswspace\fP(), \fIiswupper\fP(),
+\fIiswxdigit\fP(), \fIsetlocale\fP(), \fItowctrans\fP(), \fItowlower\fP(),
+\fItowupper\fP(), \fIwctrans\fP(), \fIwctype\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man0p/wordexp.h.0p b/man-pages-posix-2003/man0p/wordexp.h.0p
new file mode 100644
index 0000000..c8698b1
--- /dev/null
+++ b/man-pages-posix-2003/man0p/wordexp.h.0p
@@ -0,0 +1,124 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "<wordexp.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" <wordexp.h>
+.SH NAME
+wordexp.h \- word-expansion types
+.SH SYNOPSIS
+.LP
+\fB#include <wordexp.h>\fP
+.SH DESCRIPTION
+.LP
+The \fI<wordexp.h>\fP header shall define the structures and symbolic
+constants used by the \fIwordexp\fP() and \fIwordfree\fP() functions.
+.LP
+The structure type \fBwordexp_t\fP shall contain at least the following
+members:
+.sp
+.RS
+.nf
+
+\fBsize_t we_wordc \fP Count of words matched by \fIwords.\fP \fB
+char **we_wordv \fP Pointer to list of expanded words. \fB
+size_t we_offs \fP Slots to reserve at the beginning of \fIwe_wordv.\fP \fB
+\fP
+.fi
+.RE
+.LP
+The \fIflags\fP argument to the \fIwordexp\fP() function shall be
+the
+bitwise-inclusive OR of the following flags:
+.TP 7
+WRDE_APPEND
+Append words to those previously generated.
+.TP 7
+WRDE_DOOFFS
+Number of null pointers to prepend to \fIwe_wordv\fP.
+.TP 7
+WRDE_NOCMD
+Fail if command substitution is requested.
+.TP 7
+WRDE_REUSE
+The \fIpwordexp\fP argument was passed to a previous successful call
+to \fIwordexp\fP(), and has not been passed to \fIwordfree\fP(). The
+result is the same as if the application had called \fIwordfree\fP()
+and then called \fIwordexp\fP() without
+WRDE_REUSE.
+.TP 7
+WRDE_SHOWERR
+Do not redirect \fIstderr\fP to \fB/dev/null\fP.
+.TP 7
+WRDE_UNDEF
+Report error on an attempt to expand an undefined shell variable.
+.sp
+.LP
+The following constants shall be defined as error return values:
+.TP 7
+WRDE_BADCHAR
+One of the unquoted characters- <newline>, \fB'|'\fP, \fB'&'\fP,
+\fB';'\fP, \fB'<'\fP,
+\fB'>'\fP, \fB'('\fP, \fB')'\fP, \fB'{'\fP, \fB'}'\fP - appears
+in \fIwords\fP in an inappropriate
+context.
+.TP 7
+WRDE_BADVAL
+Reference to undefined shell variable when WRDE_UNDEF is set in \fIflags\fP.
+.TP 7
+WRDE_CMDSUB
+Command substitution requested when WRDE_NOCMD was set in \fIflags\fP.
+.TP 7
+WRDE_NOSPACE
+Attempt to allocate memory failed.
+.TP 7
+WRDE_NOSYS
+Reserved.
+.TP 7
+WRDE_SYNTAX
+Shell syntax error, such as unbalanced parentheses or unterminated
+string.
+.sp
+.LP
+The \fI<wordexp.h>\fP header shall define the following type:
+.TP 7
+\fBsize_t\fP
+As described in \fI<stddef.h>\fP .
+.sp
+.LP
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS
+.nf
+
+\fBint wordexp(const char *restrict, wordexp_t *restrict, int);
+void wordfree(wordexp_t *);
+\fP
+.fi
+.RE
+.LP
+The implementation may define additional macros or constants using
+names beginning with WRDE_.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fI<stddef.h>\fP, the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+\fIwordexp\fP(), the Shell and Utilities volume of IEEE\ Std\ 1003.1-2001
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/admin.1p b/man-pages-posix-2003/man1p/admin.1p
new file mode 100644
index 0000000..f374273
--- /dev/null
+++ b/man-pages-posix-2003/man1p/admin.1p
@@ -0,0 +1,441 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ADMIN" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" admin
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+admin \- create and administer SCCS files (\fBDEVELOPMENT\fP)
+.SH SYNOPSIS
+.LP
+\fBadmin -i\fP\fB[\fP\fIname\fP\fB][\fP\fB-n\fP\fB][\fP\fB-a\fP
+\fIlogin\fP\fB][\fP\fB-d\fP \fIflag\fP\fB][\fP\fB-e\fP \fIlogin\fP\fB][\fP\fB-f\fP
+\fIflag\fP\fB][\fP\fB-m\fP
+\fImrlist\fP\fB]
+.br
+\fP \fB\ \ \ \ \ \ \fP \fB[\fP\fB-r\fP
+\fIrel\fP\fB][\fP\fB-t\fP\fB[\fP\fIname\fP\fB][\fP\fB-y\fP\fB[\fP\fIcomment\fP\fB]]\fP
+\fInewfile\fP\fB
+.br
+.sp
+admin -n\fP\fB[\fP\fB-a\fP \fIlogin\fP\fB][\fP\fB-d\fP \fIflag\fP\fB][\fP\fB-e\fP
+\fIlogin\fP\fB][\fP\fB-f\fP
+\fIflag\fP\fB][\fP\fB-m\fP \fImrlist\fP\fB][\fP\fB-t\fP\fB[\fP\fIname\fP\fB]]\fP\fB
+.br
+\ \ \ \ \ \ \fP \fB[\fP\fB-y\fP\fB[\fP\fIcomment\fP\fB]]\fP \fInewfile\fP
+\fB\&...
+.br
+.sp
+admin\fP \fB[\fP\fB-a\fP \fIlogin\fP\fB][\fP\fB-d\fP \fIflag\fP\fB][\fP\fB-m\fP
+\fImrlist\fP\fB][\fP\fB-r\fP
+\fIrel\fP\fB][\fP\fB-t\fP\fB[\fP\fIname\fP\fB]]\fP \fB\fP\fIfile\fP
+\fB\&...
+.br
+.sp
+admin -h\fP \fIfile\fP \fB...
+.br
+.sp
+admin -z\fP \fIfile\fP \fB... \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIadmin\fP utility shall create new SCCS files or change parameters
+of existing ones. If a named file does not exist, it
+shall be created, and its parameters shall be initialized according
+to the specified options. Parameters not initialized by an
+option shall be assigned a default value. If a named file does exist,
+parameters corresponding to specified options shall be
+changed, and other parameters shall be left as is.
+.LP
+All SCCS filenames supplied by the application shall be of the form
+s.\fIfilename\fP. New SCCS files shall be given read-only
+permission mode. Write permission in the parent directory is required
+to create a file. All writing done by \fIadmin\fP shall be
+to a temporary \fIx-file\fP, named x.\fIfilename\fP (see \fIget\fP
+) created with read-only mode if
+\fIadmin\fP is creating a new SCCS file, or created with the same
+mode as that of the SCCS file if the file already exists. After
+successful execution of \fIadmin\fP, the SCCS file shall be removed
+(if it exists), and the \fIx-file\fP shall be renamed with
+the name of the SCCS file. This ensures that changes are made to the
+SCCS file only if no errors occur.
+.LP
+The \fIadmin\fP utility shall also use a transient lock file (named
+z.\fIfilename\fP), which is used to prevent simultaneous
+updates to the SCCS file; see \fIget\fP .
+.SH OPTIONS
+.LP
+The \fIadmin\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines,
+except that the \fB-i\fP, \fB-t\fP, and
+\fB-y\fP options have optional option-arguments. These optional option-arguments
+shall not be presented as separate arguments. The
+following options are supported:
+.TP 7
+\fB-n\fP
+Create a new SCCS file. When \fB-n\fP is used without \fB-i\fP, the
+SCCS file shall be created with control information but
+without any file data.
+.TP 7
+\fB-i[\fP\fIname\fP\fB]\fP
+Specify the \fIname\fP of a file from which the text for a new SCCS
+file shall be taken. The text constitutes the first delta
+of the file (see the \fB-r\fP option for the delta numbering scheme).
+If the \fB-i\fP option is used, but the \fIname\fP
+option-argument is omitted, the text shall be obtained by reading
+the standard input. If this option is omitted, the SCCS file
+shall be created with control information but without any file data.
+The \fB-i\fP option implies the \fB-n\fP option.
+.TP 7
+\fB-r\ \fP \fISID\fP
+Specify the SID of the initial delta to be inserted. This SID shall
+be a trunk SID; that is, the branch and sequence numbers
+shall be zero or missing. The level number is optional, and defaults
+to 1.
+.TP 7
+\fB-t[\fP\fIname\fP\fB]\fP
+Specify the \fIname\fP of a file from which descriptive text for the
+SCCS file shall be taken. In the case of existing SCCS
+files (neither \fB-i\fP nor \fB-n\fP is specified):
+.RS
+.IP " *" 3
+A \fB-t\fP option without a \fIname\fP option-argument shall cause
+the removal of descriptive text (if any) currently in the
+SCCS file.
+.LP
+.IP " *" 3
+A \fB-t\fP option with a \fIname\fP option-argument shall cause the
+text (if any) in the named file to replace the descriptive
+text (if any) currently in the SCCS file.
+.LP
+.RE
+.TP 7
+\fB-f\ \fP \fIflag\fP
+Specify a \fIflag\fP, and, possibly, a value for the \fIflag\fP, to
+be placed in the SCCS file. Several \fB-f\fP options may
+be supplied on a single \fIadmin\fP command line. Implementations
+shall recognize the following flags and associated values:
+.TP 7
+\fBb\fP
+.RS
+Allow use of the \fB-b\fP option on a \fIget\fP command to create
+branch deltas.
+.RE
+.TP 7
+\fBc\fP\fIceil\fP
+.RS
+Specify the highest release (that is, ceiling), a number less than
+or equal to 9999, which may be retrieved by a \fIget\fP command for
+editing. The default value for an unspecified \fBc\fP flag shall be
+9999.
+.RE
+.TP 7
+\fBf\fP\fIfloor\fP
+.RS
+Specify the lowest release (that is, floor), a number greater than
+0 but less than 9999, which may be retrieved by a \fIget\fP command
+for editing. The default value for an unspecified \fBf\fP flag shall
+be 1.
+.RE
+.TP 7
+\fBd\fP\fISID\fP
+.RS
+Specify the default delta number (SID) to be used by a \fIget\fP command.
+.RE
+.TP 7
+\fBi\fP\fIstr\fP
+.RS
+Treat the "No ID keywords" message issued by \fIget\fP or \fIdelta\fP
+as a fatal error. In the absence of this flag, the message is only
+a warning. The
+message is issued if no SCCS identification keywords (see \fIget\fP
+) are found in the text retrieved or
+stored in the SCCS file. If a value is supplied, the application shall
+ensure that the keywords exactly match the given string;
+however, the string shall contain a keyword, and no embedded <newline>s.
+.RE
+.TP 7
+\fBj\fP
+.RS
+Allow concurrent \fIget\fP commands for editing on the same SID of
+an SCCS file. This
+allows multiple concurrent updates to the same version of the SCCS
+file.
+.RE
+.TP 7
+\fBl\fP\fIlist\fP
+.RS
+Specify a \fIlist\fP of releases to which deltas can no longer be
+made (that is, \fIget\fP \fB-e\fP against one of these locked releases
+fails). Conforming applications shall use the
+following syntax to specify a \fIlist\fP. Implementations may accept
+additional forms as an extension:
+.sp
+.RS
+.nf
+
+\fB<list> ::= a | <range-list>
+<range-list> ::= <range> | <range-list>, <range>
+<range> ::= <SID>
+\fP
+.fi
+.RE
+.LP
+The character \fIa\fP in the \fIlist\fP shall be equivalent to specifying
+all releases for the named SCCS file. The
+non-terminal <\fISID\fP> in range shall be the delta number of an
+existing delta associated with the SCCS file.
+.RE
+.TP 7
+\fBn\fP
+.RS
+Cause \fIdelta\fP to create a null delta in each of those releases
+(if any) being
+skipped when a delta is made in a new release (for example, in making
+delta 5.1 after delta 2.7, releases 3 and 4 are skipped).
+These null deltas shall serve as anchor points so that branch deltas
+may later be created from them. The absence of this flag shall
+cause skipped releases to be nonexistent in the SCCS file, preventing
+branch deltas from being created from them in the future.
+During the initial creation of an SCCS file, the \fBn\fP flag may
+be ignored; that is, if the \fB-r\fP option is used to set the
+release number of the initial SID to a value greater than 1, null
+deltas need not be created for the "skipped" releases.
+.RE
+.TP 7
+\fBq\fP\fItext\fP
+.RS
+Substitute user-definable \fItext\fP for all occurrences of the %\fBQ\fP%
+keyword in the SCCS file text retrieved by \fIget\fP.
+.RE
+.TP 7
+\fBm\fP\fImod\fP
+.RS
+Specify the module name of the SCCS file substituted for all occurrences
+of the %\fBM\fP% keyword in the SCCS file text
+retrieved by \fIget\fP. If the \fBm\fP flag is not specified, the
+value assigned shall be the
+name of the SCCS file with the leading \fB'.'\fP removed.
+.RE
+.TP 7
+\fBt\fP\fItype\fP
+.RS
+Specify the \fItype\fP of module in the SCCS file substituted for
+all occurrences of the %\fBY\fP% keyword in the SCCS file
+text retrieved by \fIget\fP.
+.RE
+.TP 7
+\fBv\fP\fIpgm\fP
+.RS
+Cause \fIdelta\fP to prompt for modification request (MR) numbers
+as the reason for
+creating a delta. The optional value specifies the name of an MR number
+validation program. (If this flag is set when creating an
+SCCS file, the application shall ensure that the \fBm\fP option is
+also used even if its value is null.)
+.RE
+.sp
+.TP 7
+\fB-d\ \fP \fIflag\fP
+Remove (delete) the specified \fIflag\fP from an SCCS file. Several
+\fB-d\fP options may be supplied on a single \fIadmin\fP
+command. See the \fB-f\fP option for allowable \fIflag\fP names. (The
+\fBl\fP \fIlist\fP flag gives a \fIlist\fP of releases
+to be unlocked. See the \fB-f\fP option for further description of
+the \fBl\fP flag and the syntax of a \fIlist\fP.)
+.TP 7
+\fB-a\ \fP \fIlogin\fP
+Specify a \fIlogin\fP name, or numerical group ID, to be added to
+the list of users who may make deltas (changes) to the SCCS
+file. A group ID shall be equivalent to specifying all \fIlogin\fP
+names common to that group ID. Several \fB-a\fP options may be
+used on a single \fIadmin\fP command line. As many \fIlogin\fPs, or
+numerical group IDs, as desired may be on the list
+simultaneously. If the list of users is empty, then anyone may add
+deltas. If \fIlogin\fP or group ID is preceded by a
+\fB'!'\fP, the users so specified shall be denied permission to make
+deltas.
+.TP 7
+\fB-e\ \fP \fIlogin\fP
+Specify a \fIlogin\fP name, or numerical group ID, to be erased from
+the list of users allowed to make deltas (changes) to the
+SCCS file. Specifying a group ID is equivalent to specifying all \fIlogin\fP
+names common to that group ID. Several \fB-e\fP
+options may be used on a single \fIadmin\fP command line.
+.TP 7
+\fB-y[\fP\fIcomment\fP\fB]\fP
+Insert the \fIcomment\fP text into the SCCS file as a comment for
+the initial delta in a manner identical to that of \fIdelta\fP. In
+the POSIX locale, omission of the \fB-y\fP option shall result in
+a default comment
+line being inserted in the form:
+.sp
+.RS
+.nf
+
+\fB"date and time created %s %s by %s", <\fP\fIdate\fP\fB>, <\fP\fItime\fP\fB>, <\fP\fIlogin\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where <\fIdate\fP> is expressed in the format of the \fIdate\fP utility's
+\fB%y\fP / \fB%m\fP / \fB%d\fP conversion specification, <\fItime\fP>
+in the format of the \fIdate\fP utility's \fB%T\fP conversion specification
+format, and <\fIlogin\fP> is the
+login name of the user creating the file.
+.TP 7
+\fB-m\ \fP \fImrlist\fP
+Insert the list of modification request (MR) numbers into the SCCS
+file as the reason for creating the initial delta in a
+manner identical to \fIdelta\fP. The application shall ensure that
+the \fBv\fP flag is set
+and the MR numbers are validated if the \fBv\fP flag has a value (the
+name of an MR number validation program). A diagnostic
+message shall be written if the \fBv\fP flag is not set or MR validation
+fails.
+.TP 7
+\fB-h\fP
+Check the structure of the SCCS file and compare the newly computed
+checksum with the checksum that is stored in the SCCS file.
+If the newly computed checksum does not match the checksum in the
+SCCS file, a diagnostic message shall be written.
+.TP 7
+\fB-z\fP
+Recompute the SCCS file checksum and store it in the first line of
+the SCCS file (see the \fB-h\fP option above). Note that
+use of this option on a truly corrupted file may prevent future detection
+of the corruption.
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of an existing SCCS file or a directory. If \fIfile\fP
+is a directory, the \fIadmin\fP utility shall behave as
+though each file in the directory were specified as a named file,
+except that non-SCCS files (last component of the pathname does
+not begin with \fBs.\fP) and unreadable files shall be silently ignored.
+.TP 7
+\fInewfile\fP
+A pathname of an SCCS file to be created.
+.sp
+.LP
+If exactly one \fIfile\fP or \fInewfile\fP operand appears, and it
+is \fB'-'\fP, the standard input shall be read; each
+line of the standard input shall be taken to be the name of an SCCS
+file to be processed. Non-SCCS files and unreadable files shall
+be silently ignored.
+.SH STDIN
+.LP
+The standard input shall be a text file used only if \fB-i\fP is specified
+without an option-argument or if a \fIfile\fP or
+\fInewfile\fP operand is specified as \fB'-'\fP . If the first character
+of any standard input line is <SOH> in the POSIX
+locale, the results are unspecified.
+.SH INPUT FILES
+.LP
+The existing SCCS files shall be text files of an unspecified format.
+.LP
+The application shall ensure that the file named by the \fB-i\fP option's
+\fIname\fP option-argument shall be a text file; if
+the first character of any line in this file is <SOH> in the POSIX
+locale, the results are unspecified. If this file contains
+more than 99999 lines, the number of lines recorded in the header
+for this file shall be 99999 for this delta.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIadmin\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard error and
+the contents of the default \fB-y\fP comment.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+Any SCCS files created shall be text files of an unspecified format.
+During processing of a \fIfile\fP, a locking
+\fIz-file\fP, as described in \fIget\fP, may be created and deleted.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+It is recommended that directories containing SCCS files be writable
+by the owner only, and that SCCS files themselves be
+read-only. The mode of the directories should allow only the owner
+to modify SCCS files contained in the directories. The mode of
+the SCCS files prevents any modification at all except by SCCS commands.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIdelta\fP, \fIget\fP, \fIprs\fP, \fIwhat\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/alias.1p b/man-pages-posix-2003/man1p/alias.1p
new file mode 100644
index 0000000..ad616a4
--- /dev/null
+++ b/man-pages-posix-2003/man1p/alias.1p
@@ -0,0 +1,217 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ALIAS" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" alias
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+alias \- define or display aliases
+.SH SYNOPSIS
+.LP
+\fBalias\fP \fB[\fP\fIalias-name\fP\fB[\fP\fB=\fP\fIstring\fP\fB]\fP
+\fB\&...\fP\fB]\fP\fB\fP
+.SH DESCRIPTION
+.LP
+The \fIalias\fP utility shall create or redefine alias definitions
+or write the values of existing alias definitions to
+standard output. An alias definition provides a string value that
+shall replace a command name when it is encountered; see \fIAlias
+Substitution\fP .
+.LP
+An alias definition shall affect the current shell execution environment
+and the execution environments of the subshells of the
+current shell. When used as specified by this volume of IEEE\ Std\ 1003.1-2001,
+the alias definition shall not affect the
+parent process of the current shell nor any utility environment invoked
+by the shell; see \fIShell Execution Environment\fP .
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIalias-name\fP
+Write the alias definition to standard output.
+.TP 7
+\fIalias-name\fP=\fIstring\fP
+.sp
+Assign the value of \fIstring\fP to the alias \fIalias-name\fP.
+.sp
+.LP
+If no operands are given, all alias definitions shall be written to
+standard output.
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIalias\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The format for displaying aliases (when no operands or only \fIname\fP
+operands are specified) shall be:
+.sp
+.RS
+.nf
+
+\fB"%s=%s\\n",\fP \fIname\fP\fB,\fP \fIvalue\fP
+.fi
+.RE
+.LP
+The \fIvalue\fP string shall be written with appropriate quoting so
+that it is suitable for reinput to the shell. See the
+description of shell quoting in \fIQuoting\fP .
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+One of the \fIname\fP operands specified did not have an alias definition,
+or an error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.IP " 1." 4
+Change \fIls\fP to give a columnated, more annotated output:
+.sp
+.RS
+.nf
+
+\fBalias ls="ls -CF"
+\fP
+.fi
+.RE
+.LP
+.IP " 2." 4
+Create a simple "redo" command to repeat previous entries in the command
+history file:
+.sp
+.RS
+.nf
+
+\fBalias r='fc -s'
+\fP
+.fi
+.RE
+.LP
+.IP " 3." 4
+Use 1K units for \fIdu\fP:
+.sp
+.RS
+.nf
+
+\fBalias du=du\\ -k
+\fP
+.fi
+.RE
+.LP
+.IP " 4." 4
+Set up \fInohup\fP so that it can deal with an argument that is itself
+an alias name:
+.sp
+.RS
+.nf
+
+\fBalias nohup="nohup "
+\fP
+.fi
+.RE
+.LP
+.SH RATIONALE
+.LP
+The \fIalias\fP description is based on historical KornShell implementations.
+Known differences exist between that and the C
+shell. The KornShell version was adopted to be consistent with all
+the other KornShell features in this volume of
+IEEE\ Std\ 1003.1-2001, such as command line editing.
+.LP
+Since \fIalias\fP affects the current shell execution environment,
+it is generally provided as a shell regular built-in.
+.LP
+Historical versions of the KornShell have allowed aliases to be exported
+to scripts that are invoked by the same shell. This is
+triggered by the \fIalias\fP \fB-x\fP flag; it is allowed by this
+volume of IEEE\ Std\ 1003.1-2001 only when an explicit
+extension such as \fB-x\fP is used. The standard developers considered
+that aliases were of use primarily to interactive users and
+that they should normally not affect shell scripts called by those
+users; functions are available to such scripts.
+.LP
+Historical versions of the KornShell had not written aliases in a
+quoted manner suitable for reentry to the shell, but this
+volume of IEEE\ Std\ 1003.1-2001 has made this a requirement for all
+similar output. Therefore, consistency with this
+volume of IEEE\ Std\ 1003.1-2001 was chosen over this detail of historical
+practice.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIFunction Definition Command\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/ar.1p b/man-pages-posix-2003/man1p/ar.1p
new file mode 100644
index 0000000..c66ee18
--- /dev/null
+++ b/man-pages-posix-2003/man1p/ar.1p
@@ -0,0 +1,608 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "AR" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ar
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ar \- create and maintain library archives
+.SH SYNOPSIS
+.LP
+\fBar -d\fP\fB[\fP\fB-v\fP\fB]\fP \fIarchive file\fP \fB... \fP
+\fB
+.br
+.sp
+\fP
+.LP
+\fBar -m\fP \fB[\fP\fB-v\fP\fB]\fP \fIarchive file\fP \fB...
+.br
+.sp
+ar -m -a\fP\fB[\fP\fB-v\fP\fB]\fP \fIposname archive file\fP \fB...
+.br
+.sp
+ar -m -b\fP\fB[\fP\fB-v\fP\fB]\fP \fIposname archive file\fP \fB...
+.br
+.sp
+ar -m -i\fP\fB[\fP\fB-v\fP\fB]\fP \fIposname archive file\fP \fB...
+\fP
+\fB
+.br
+.sp
+ar -p\fP\fB[\fP\fB-v\fP\fB][\fP\fB-s\fP\fB]\fP\fIarchive\fP \fB[\fP\fIfile\fP
+\fB\&...\fP\fB]\fP\fB
+.br
+.sp
+\fP
+.LP
+\fBar -q\fP\fB[\fP\fB-cv\fP\fB]\fP \fIarchive file\fP \fB... \fP
+\fB
+.br
+.sp
+ar -r\fP\fB[\fP\fB-cuv\fP\fB]\fP \fIarchive file\fP \fB...
+.br
+.sp
+\fP
+.LP
+\fBar -r -a\fP\fB[\fP\fB-cuv\fP\fB]\fP \fIposname archive file\fP
+\fB\&...
+.br
+.sp
+ar -r -b\fP\fB[\fP\fB-cuv\fP\fB]\fP \fIposname archive file\fP \fB...
+.br
+.sp
+ar -r -i\fP\fB[\fP\fB-cuv\fP\fB]\fP \fIposname archive file\fP \fB...
+\fP
+\fB
+.br
+.sp
+ar -t\fP\fB[\fP\fB-v\fP\fB][\fP\fB-s\fP\fB]\fP\fIarchive\fP \fB[\fP\fIfile\fP
+\fB\&...\fP\fB]\fP\fB
+.br
+.sp
+ar -x\fP\fB[\fP\fB-v\fP\fB][\fP\fB-sCT\fP\fB]\fP\fIarchive\fP \fB[\fP\fIfile\fP
+\fB\&...\fP\fB]\fP\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIar\fP utility is part of the Software Development Utilities
+option.
+.LP
+The \fIar\fP utility can be used to create and maintain groups of
+files combined into an archive. Once an archive has been
+created, new files can be added, and existing files in an archive
+can be extracted, deleted, or replaced. When an archive consists
+entirely of valid object files, the implementation shall format the
+archive so that it is usable as a library for link editing (see
+\fIc99\fP and \fIfort77\fP). When some of the archived
+files are not valid object files, the suitability of the archive for
+library use is undefined. If an
+archive consists entirely of printable files, the entire archive shall
+be printable.
+.LP
+When \fIar\fP creates an archive, it creates administrative information
+indicating whether a symbol table is present in the
+archive. When there is at least one object file that \fIar\fP recognizes
+as such in the archive, an archive symbol table shall be
+created in the archive and maintained by \fIar\fP; it is used by the
+link editor to search the archive. Whenever the \fIar\fP
+utility is used to create or update the contents of such an archive,
+the symbol table shall be rebuilt. The \fB-s\fP option shall
+force the symbol table to be rebuilt.
+.LP
+All \fIfile\fP operands can be pathnames. However, files within archives
+shall be named by a filename, which is the last
+component of the pathname used when the file was entered into the
+archive. The comparison of \fIfile\fP operands to the names of
+files in archives shall be performed by comparing the last component
+of the operand to the name of the file in the archive.
+.LP
+It is unspecified whether multiple files in the archive may be identically
+named. In the case of such files, however, each
+\fIfile\fP and \fIposname\fP operand shall match only the
+first file in the archive having a name that is the same as the last
+component of the operand.
+.SH OPTIONS
+.LP
+The \fIar\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-a\fP
+Position new files in the archive after the file named by the \fIposname\fP
+operand.
+.TP 7
+\fB-b\fP
+Position new files in the archive before the file named by the \fIposname\fP
+operand.
+.TP 7
+\fB-c\fP
+Suppress the diagnostic message that is written to standard error
+by default when the archive \fIarchive\fP is created.
+.TP 7
+\fB-C\fP
+Prevent extracted files from replacing like-named files in the file
+system. This option is useful when \fB-T\fP is also used, to
+prevent truncated filenames from replacing files with the same prefix.
+.TP 7
+\fB-d\fP
+Delete one or more \fIfile\fPs from \fIarchive\fP.
+.TP 7
+\fB-i\fP
+Position new files in the archive before the file in the archive named
+by the \fIposname\fP operand (equivalent to \fB-b\fP).
+.TP 7
+\fB-m\fP
+Move the named files in the archive. The \fB-a\fP, \fB-b\fP, or \fB-i\fP
+options with the \fIposname\fP operand indicate the
+position; otherwise, move the names files in the archive to the end
+of the archive.
+.TP 7
+\fB-p\fP
+Write the contents of the \fIfile\fPs in the archive named by \fIfile\fP
+operands from \fIarchive\fP to the standard output.
+If no \fIfile\fP operands are specified, the contents of all files
+in the archive shall be written in the order of the
+archive.
+.TP 7
+\fB-q\fP
+Append the named files to the end of the archive. In this case \fIar\fP
+does not check whether the added files are already in the
+archive. This is useful to bypass the searching otherwise done when
+creating a large archive piece by piece.
+.TP 7
+\fB-r\fP
+Replace or add \fIfile\fPs to \fIarchive\fP. If the archive named
+by \fIarchive\fP does not exist, a new archive shall be
+created and a diagnostic message shall be written to standard error
+(unless the \fB-c\fP option is specified). If no \fIfile\fPs
+are specified and the \fIarchive\fP exists, the results are undefined.
+Files that replace existing files in the archive shall not
+change the order of the archive. Files that do not replace existing
+files in the archive shall be appended to the archive unless
+a \fB-a\fP, \fB-b\fP, or \fB-i\fP option specifies another position.
+.TP 7
+\fB-s\fP
+Force the regeneration of the archive symbol table even if \fIar\fP
+is not invoked with an option that modifies the archive
+contents. This option is useful to restore the archive symbol table
+after it has been stripped; see \fIstrip\fP.
+.TP 7
+\fB-t\fP
+Write a table of contents of \fIarchive\fP to the standard output.
+The files specified by the \fIfile\fP operands shall be
+included in the written list. If no \fIfile\fP operands are specified,
+all files in \fIarchive\fP shall be included in the order
+of the archive.
+.TP 7
+\fB-T\fP
+Allow filename truncation of extracted files whose archive names are
+longer than the file system can support. By default,
+extracting a file with a name that is too long shall be an error;
+a diagnostic message shall be written and the file shall not be
+extracted.
+.TP 7
+\fB-u\fP
+Update older files in the archive. When used with the \fB-r\fP option,
+files in the archive shall be replaced only if the
+corresponding \fIfile\fP has a modification time that is at least
+as new as the modification time of the file in the archive.
+.TP 7
+\fB-v\fP
+Give verbose output. When used with the option characters \fB-d\fP,
+\fB-r\fP, or \fB-x\fP, write a detailed file-by-file
+description of the archive creation and maintenance activity, as described
+in the STDOUT section.
+.LP
+When used with \fB-p\fP, write the name of the file in the archive
+to the standard output before writing the file in the
+archive itself to the standard output, as described in the STDOUT
+section.
+.LP
+When used with \fB-t\fP, include a long listing of information about
+the files in the archive, as described in the STDOUT
+section.
+.TP 7
+\fB-x\fP
+Extract the files in the archive named by the \fIfile\fP operands
+from \fIarchive\fP. The contents of the archive shall not
+be changed. If no \fIfile\fP operands are given, all files in the
+archive shall be extracted. The modification time of each file
+extracted shall be set to the time the file is extracted from the
+archive.
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIarchive\fP
+A pathname of the archive.
+.TP 7
+\fIfile\fP
+A pathname. Only the last component shall be used when comparing against
+the names of files in the archive. If two or more
+\fIfile\fP operands have the same last pathname component (basename),
+the results are unspecified. The implementation's archive
+format shall not truncate valid filenames of files added to or replaced
+in the archive.
+.TP 7
+\fIposname\fP
+The name of a file in the archive, used for relative positioning;
+see options \fB-m\fP and \fB-r\fP.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+The archive named by \fIarchive\fP shall be a file in the format created
+by \fIar\fP \fB-r\fP.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIar\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fILC_TIME\fP
+Determine the format and content for date and time strings written
+by \fIar\fP \fB-tv\fP.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fITMPDIR\fP
+Determine the pathname that overrides the default directory for temporary
+files, if any.
+.TP 7
+\fITZ\fP
+Determine the timezone used to calculate date and time strings written
+by \fIar\fP \fB-tv\fP. If \fITZ\fP is unset or null,
+an unspecified default timezone shall be used.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+If the \fB-d\fP option is used with the \fB-v\fP option, the standard
+output format shall be:
+.sp
+.RS
+.nf
+
+\fB"d - %s\\n", <\fP\fIfile\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where \fIfile\fP is the operand specified on the command line.
+.LP
+If the \fB-p\fP option is used with the \fB-v\fP option, \fIar\fP
+shall precede the contents of each file with:
+.sp
+.RS
+.nf
+
+\fB"\\n<%s>\\n\\n", <\fP\fIfile\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where \fIfile\fP is the operand specified on the command line, if
+\fIfile\fP operands were specified, and the name of the file
+in the archive if they were not.
+.LP
+If the \fB-r\fP option is used with the \fB-v\fP option:
+.IP " *" 3
+If \fIfile\fP is already in the archive, the standard output format
+shall be:
+.sp
+.RS
+.nf
+
+\fB"r - %s\\n", <\fP\fIfile\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where <\fIfile\fP> is the operand specified on the command line.
+.LP
+.IP " *" 3
+If \fIfile\fP is not already in the archive, the standard output format
+shall be:
+.sp
+.RS
+.nf
+
+\fB"a - %s\\n", <\fP\fIfile\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where <\fIfile\fP> is the operand specified on the command line.
+.LP
+.LP
+If the \fB-t\fP option is used, \fIar\fP shall write the names of
+the files in the archive to the standard output in the
+format:
+.sp
+.RS
+.nf
+
+\fB"%s\\n", <\fP\fIfile\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where \fIfile\fP is the operand specified on the command line, if
+\fIfile\fP operands were specified, or the name of the file
+in the archive if they were not.
+.LP
+If the \fB-t\fP option is used with the \fB-v\fP option, the standard
+output format shall be:
+.sp
+.RS
+.nf
+
+\fB"%s %u/%u %u %s %d %d:%d %d %s\\n", <\fP\fImember mode\fP\fB>, <\fP\fIuser ID\fP\fB>,
+ <\fP\fIgroup ID\fP\fB>, <\fP\fInumber of bytes in member\fP\fB>,
+ <\fP\fIabbreviated month\fP\fB>, <\fP\fIday-of-month\fP\fB>, <\fP\fIhour\fP\fB>,
+ <\fP\fIminute\fP\fB>, <\fP\fIyear\fP\fB>, <\fP\fIfile\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where:
+.TP 7
+<\fIfile\fP>
+Shall be the operand specified on the command line, if \fIfile\fP
+operands were specified, or the name of the file in the
+archive if they were not.
+.TP 7
+<\fImember\ mode\fP>
+.sp
+Shall be formatted the same as the <\fIfile\ mode\fP> string defined
+in the STDOUT section of \fIls\fP, except that the first character,
+the <\fIentry\ type\fP>, is not used; the string
+represents the file mode of the file in the archive at the time it
+was added to or replaced in the archive.
+.sp
+.LP
+The following represent the last-modification time of a file when
+it was most recently added to or replaced in the archive:
+.TP 7
+<\fIabbreviated\ month\fP>
+.sp
+Equivalent to the format of the \fB%b\fP conversion specification
+format in \fIdate\fP.
+.TP 7
+<\fIday-of-month\fP>
+.sp
+Equivalent to the format of the \fB%e\fP conversion specification
+format in \fIdate\fP.
+.TP 7
+<\fIhour\fP>
+Equivalent to the format of the \fB%H\fP conversion specification
+format in \fIdate\fP.
+.TP 7
+<\fIminute\fP>
+Equivalent to the format of the \fB%M\fP conversion specification
+format in \fIdate\fP.
+.TP 7
+<\fIyear\fP>
+Equivalent to the format of the \fB%Y\fP conversion specification
+format in \fIdate\fP.
+.sp
+.LP
+When \fILC_TIME\fP does not specify the POSIX locale, a different
+format and order of presentation of these fields relative to
+each other may be used in a format appropriate in the specified locale.
+.LP
+If the \fB-x\fP option is used with the \fB-v\fP option, the standard
+output format shall be:
+.sp
+.RS
+.nf
+
+\fB"x - %s\\n", <\fP\fIfile\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where \fIfile\fP is the operand specified on the command line, if
+\fIfile\fP operands were specified, or the name of the file
+in the archive if they were not.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages. The
+diagnostic message about creating a new archive when
+\fB-c\fP is not specified shall not modify the exit status.
+.SH OUTPUT FILES
+.LP
+Archives are files with unspecified formats.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The archive format is not described. It is recognized that there are
+several known \fIar\fP formats, which are not compatible.
+The \fIar\fP utility is included, however, to allow creation of archives
+that are intended for use only on one machine. The
+archive is specified as a file, and it can be moved as a file. This
+does allow an archive to be moved from one machine to another
+machine that uses the same implementation of \fIar\fP.
+.LP
+Utilities such as \fIpax\fP (and its forebears \fItar\fP and \fIcpio\fP)
+also provide
+portable "archives". This is a not a duplication; the \fIar\fP utility
+is included to provide an interface primarily for \fImake\fP and the
+compilers, based on a historical model.
+.LP
+In historical implementations, the \fB-q\fP option (available on XSI-conforming
+systems) is known to execute quickly because
+\fIar\fP does not check on whether the added members are already in
+the archive. This is useful to bypass the searching otherwise
+done when creating a large archive piece-by-piece. These remarks may
+but need not remain true for a brand new implementation of
+this utility; hence, these remarks have been moved into the RATIONALE.
+.LP
+BSD implementations historically required applications to provide
+the \fB-s\fP option whenever the archive was supposed to
+contain a symbol table. As in this volume of IEEE\ Std\ 1003.1-2001,
+System V historically creates or updates an archive
+symbol table whenever an object file is removed from, added to, or
+updated in the archive.
+.LP
+The OPERANDS section requires what might seem to be true without specifying
+it: the archive cannot truncate the filenames below
+{NAME_MAX}. Some historical implementations do so, however, causing
+unexpected results for the application. Therefore, this volume
+of IEEE\ Std\ 1003.1-2001 makes the requirement explicit to avoid
+misunderstandings.
+.LP
+According to the System V documentation, the options \fB-dmpqrtx\fP
+are not required to begin with a hyphen ( \fB'-'\fP ).
+This volume of IEEE\ Std\ 1003.1-2001 requires that a conforming application
+use the leading hyphen.
+.LP
+The archive format used by the 4.4 BSD implementation is documented
+in this RATIONALE as an example:
+A file created by \fIar\fP begins with the "magic" string \fB"!<arch>\\n"\fP
+\&. The rest of the archive is
+made up of objects, each of which is composed of a header for a file,
+a possible filename, and the file contents. The header is
+portable between machine architectures, and, if the file contents
+are printable, the archive is itself printable.
+.LP
+The header is made up of six ASCII fields, followed by a two-character
+trailer. The fields are the object name (16 characters),
+the file last modification time (12 characters), the user and group
+IDs (each 6 characters), the file mode (8 characters), and the
+file size (10 characters). All numeric fields are in decimal, except
+for the file mode, which is in octal.
+.LP
+The modification time is the file \fIst_mtime\fP field. The user and
+group IDs are the file \fIst_uid\fP and \fIst_gid\fP
+fields. The file mode is the file \fIst_mode\fP field. The file size
+is the file \fIst_size\fP field. The two-byte trailer is the
+string \fB"`<newline>"\fP .
+.LP
+Only the name field has any provision for overflow. If any filename
+is more than 16 characters in length or contains an embedded
+space, the string \fB"#1/"\fP followed by the ASCII length of the
+name is written in the name field. The file size (stored in
+the archive header) is incremented by the length of the name. The
+name is then written immediately following the archive
+header.
+.LP
+Any unused characters in any of these fields are written as <space>s.
+If any fields are their particular maximum number of
+characters in length, there is no separation between the fields.
+.LP
+Objects in the archive are always an even number of bytes long; files
+that are an odd number of bytes long are padded with a
+<newline>, although the size in the header does not reflect this.
+.LP
+The \fIar\fP utility description requires that (when all its members
+are valid object files) \fIar\fP produce an object code
+library, which the linkage editor can use to extract object modules.
+If the linkage editor needs a symbol table to permit random
+access to the archive, \fIar\fP must provide it; however, \fIar\fP
+does not require a symbol table.
+.LP
+The BSD \fB-o\fP option was omitted. It is a rare conforming application
+that uses \fIar\fP to extract object code from a
+library with concern for its modification time, since this can only
+be of importance to \fImake\fP. Hence, since this functionality is
+not deemed important for applications portability, the
+modification time of the extracted files is set to the current time.
+.LP
+There is at least one known implementation (for a small computer)
+that can accommodate only object files for that system,
+disallowing mixed object and other files. The ability to handle any
+type of file is not only historical practice for most
+implementations, but is also a reasonable expectation.
+.LP
+Consideration was given to changing the output format of \fIar\fP
+\fB-tv\fP to the same format as the output of \fIls\fP \fB-l\fP. This
+would have made parsing the output of \fIar\fP the same as that of
+\fIls\fP. This was rejected in part because the current \fIar\fP format
+is commonly used and changes
+would break historical usage. Second, \fIar\fP gives the user ID and
+group ID in numeric format separated by a slash. Changing
+this to be the user name and group name would not be correct if the
+archive were moved to a machine that contained a different user
+database. Since \fIar\fP cannot know whether the archive was generated
+on the same machine, it cannot tell what to report.
+.LP
+The text on the \fB-ur\fP option combination is historical practice-since
+one filename can easily represent two different files
+(for example, \fB/a/foo\fP and \fB/b/foo\fP), it is reasonable to
+replace the file in the archive even when the modification time
+in the archive is identical to that in the file system.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIc99\fP, \fIdate\fP, \fIfort77\fP, \fIpax\fP, \fIstrip\fP the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 13, Headers,
+\fI<unistd.h>\fP
+description of {POSIX_NO_TRUNC}
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/asa.1p b/man-pages-posix-2003/man1p/asa.1p
new file mode 100644
index 0000000..a324e4a
--- /dev/null
+++ b/man-pages-posix-2003/man1p/asa.1p
@@ -0,0 +1,192 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ASA" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" asa
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+asa \- interpret carriage-control characters
+.SH SYNOPSIS
+.LP
+\fBasa\fP \fB[\fP \fIfile\fP \fB...\fP \fB]\fP\fB\fP
+.SH DESCRIPTION
+.LP
+The \fIasa\fP utility shall write its input files to standard output,
+mapping carriage-control characters from the text files
+to line-printer control sequences in an implementation-defined manner.
+.LP
+The first character of every line shall be removed from the input,
+and the following actions are performed.
+.LP
+If the character removed is:
+.TP 7
+<space>
+The rest of the line is output without change.
+.TP 7
+0
+A <newline> is output, then the rest of the input line.
+.TP 7
+1
+One or more implementation-defined characters that causes an advance
+to the next page shall be output, followed by the rest of
+the input line.
+.TP 7
+\fB+\fP
+The <newline> of the previous line shall be replaced with one or more
+implementation-defined characters that causes
+printing to return to column position 1, followed by the rest of the
+input line. If the \fB'+'\fP is the first character in the
+input, it shall be equivalent to <space>.
+.sp
+.LP
+The action of the \fIasa\fP utility is unspecified upon encountering
+any character other than those listed above as the first
+character in a line.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.TP 7
+\fIfile\fP
+A pathname of a text file used for input. If no \fIfile\fP operands
+are specified, the standard input shall be used.
+.sp
+.SH STDIN
+.LP
+The standard input shall be used only if no \fIfile\fP operands are
+specified; see the INPUT FILES section.
+.SH INPUT FILES
+.LP
+The input files shall be text files.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIasa\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The standard output shall be the text from the input file modified
+as described in the DESCRIPTION section.
+.SH STDERR
+.LP
+None.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+All input files were output successfully.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.IP " 1." 4
+The following command:
+.sp
+.RS
+.nf
+
+\fBasa\fP \fIfile\fP
+.fi
+.RE
+.LP
+permits the viewing of \fIfile\fP (created by a program using FORTRAN-style
+carriage-control characters) on a terminal.
+.LP
+.IP " 2." 4
+The following command:
+.sp
+.RS
+.nf
+
+\fBa.out | asa | lp
+\fP
+.fi
+.RE
+.LP
+formats the FORTRAN output of \fBa.out\fP and directs it to the printer.
+.LP
+.SH RATIONALE
+.LP
+The \fIasa\fP utility is needed to map "standard" FORTRAN 77 output
+into a form acceptable to contemporary printers. Usually,
+\fIasa\fP is used to pipe data to the \fIlp\fP utility; see \fIlp\fP.
+.LP
+This utility is generally used only by FORTRAN programs. The standard
+developers decided to retain \fIasa\fP to avoid breaking
+the historical large base of FORTRAN applications that put carriage-control
+characters in their output files. There is no
+requirement that a system have a FORTRAN compiler in order to run
+applications that need \fIasa\fP.
+.LP
+Historical implementations have used an ASCII <form-feed> in response
+to a 1 and an ASCII <carriage-return> in
+response to a \fB'+'\fP . It is suggested that implementations treat
+characters other than 0, 1, and \fB'+'\fP as
+<space> in the absence of any compelling reason to do otherwise. However,
+the action is listed here as "unspecified",
+permitting an implementation to provide extensions to access fast
+multiple-line slewing and channel seeking in a non-portable
+manner.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfort77\fP, \fIlp\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/at.1p b/man-pages-posix-2003/man1p/at.1p
new file mode 100644
index 0000000..a12eba2
--- /dev/null
+++ b/man-pages-posix-2003/man1p/at.1p
@@ -0,0 +1,711 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "AT" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" at
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+at \- execute commands at a later time
+.SH SYNOPSIS
+.LP
+\fBat\fP \fB[\fP\fB-m\fP\fB][\fP\fB-f\fP \fIfile\fP\fB][\fP\fB-q\fP
+\fIqueuename\fP\fB]\fP \fB-t\fP \fItime_arg\fP\fB
+.br
+.sp
+at\fP \fB[\fP\fB-m\fP\fB][\fP\fB-f\fP \fIfile\fP\fB][\fP\fB-q\fP \fIqueuename\fP\fB]\fP
+\fItimespec\fP
+\fB\&...
+.br
+.sp
+at -r\fP \fIat_job_id\fP \fB...
+.br
+.sp
+at -l -q\fP \fIqueuename\fP\fB
+.br
+.sp
+at -l\fP \fB[\fP\fIat_job_id\fP \fB...\fP\fB]\fP\fB\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIat\fP utility shall read commands from standard input and group
+them together as an \fIat-job\fP, to be executed at a
+later time.
+.LP
+The at-job shall be executed in a separate invocation of the shell,
+running in a separate process group with no controlling
+terminal, except that the environment variables, current working directory,
+file creation mask, and other implementation-defined
+execution-time attributes in effect when the \fIat\fP utility is executed
+shall be retained and used when the at-job is
+executed.
+.LP
+When the at-job is submitted, the \fIat_job_id\fP and scheduled time
+shall be written to standard error. The \fIat_job_id\fP
+is an identifier that shall be a string consisting solely of alphanumeric
+characters and the period character. The \fIat_job_id\fP
+shall be assigned by the system when the job is scheduled such that
+it uniquely identifies a particular job.
+.LP
+User notification and the processing of the job's standard output
+and standard error are described under the \fB-m\fP
+option.
+.LP
+Users shall be permitted to use \fIat\fP if their name appears in
+the file \fB/usr/lib/cron/at.allow\fP. If that file does not
+exist, the file \fB/usr/lib/cron/at.deny\fP shall be checked to determine
+whether the user shall be denied access to \fIat\fP. If
+neither file exists, only a process with the appropriate privileges
+shall be allowed to submit a job. If only \fBat.deny\fP exists
+and is empty, global usage shall be permitted. The \fBat.allow\fP
+and \fBat.deny\fP files shall consist of one user name per
+line.
+.SH OPTIONS
+.LP
+The \fIat\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-f\ \fP \fIfile\fP
+Specify the pathname of a file to be used as the source of the at-job,
+instead of standard input.
+.TP 7
+\fB-l\fP
+(The letter ell.) Report all jobs scheduled for the invoking user
+if no \fIat_job_id\fP operands are specified. If
+\fIat_job_id\fPs are specified, report only information for these
+jobs. The output shall be written to standard output.
+.TP 7
+\fB-m\fP
+Send mail to the invoking user after the at-job has run, announcing
+its completion. Standard output and standard error produced
+by the at-job shall be mailed to the user as well, unless redirected
+elsewhere. Mail shall be sent even if the job produces no
+output.
+.LP
+If \fB-m\fP is not used, the job's standard output and standard error
+shall be provided to the user by means of mail, unless
+they are redirected elsewhere; if there is no such output to provide,
+the implementation need not notify the user of the job's
+completion.
+.TP 7
+\fB-q\ \fP \fIqueuename\fP
+.sp
+Specify in which queue to schedule a job for submission. When used
+with the \fB-l\fP option, limit the search to that particular
+queue. By default, at-jobs shall be scheduled in queue \fIa\fP. In
+contrast, queue \fIb\fP shall be reserved for batch jobs; see
+\fIbatch\fP. The meanings of all other \fIqueuename\fPs are implementation-defined.
+If
+\fB-q\fP is specified along with either of the \fB-t\fP \fItime_arg\fP
+or \fItimespec\fP arguments, the results are
+unspecified.
+.TP 7
+\fB-r\fP
+Remove the jobs with the specified \fIat_job_id\fP operands that were
+previously scheduled by the \fIat\fP utility.
+.TP 7
+\fB-t\ \fP \fItime_arg\fP
+Submit the job to be run at the time specified by the \fItime\fP option-argument,
+which the application shall ensure has the
+format as specified by the \fItouch\fP \fB-t\fP \fItime\fP utility.
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIat_job_id\fP
+The name reported by a previous invocation of the \fIat\fP utility
+at the time the job was scheduled.
+.TP 7
+\fItimespec\fP
+Submit the job to be run at the date and time specified. All of the
+\fItimespec\fP operands are interpreted as if they were
+separated by <space>s and concatenated, and shall be parsed as described
+in the grammar at the end of this section. The date
+and time shall be interpreted as being in the timezone of the user
+(as determined by the \fITZ\fP variable), unless a timezone
+name appears as part of \fItime\fP, below.
+.LP
+In the POSIX locale, the following describes the three parts of the
+time specification string. All of the values from the
+\fILC_TIME\fP categories in the POSIX locale shall be recognized in
+a case-insensitive manner.
+.TP 7
+\fItime\fP
+.RS
+The time can be specified as one, two, or four digits. One-digit and
+two-digit numbers shall be taken to be hours; four-digit
+numbers to be hours and minutes. The time can alternatively be specified
+as two numbers separated by a colon, meaning
+\fIhour\fP:\fIminute\fP. An AM/PM indication (one of the values from
+the \fBam_pm\fP keywords in the \fILC_TIME\fP locale
+category) can follow the time; otherwise, a 24-hour clock time shall
+be understood. A timezone name can also follow to further
+qualify the time. The acceptable timezone names are implementation-defined,
+except that they shall be case-insensitive and the
+string \fButc\fP is supported to indicate the time is in Coordinated
+Universal Time. In the POSIX locale, the \fItime\fP field
+can also be one of the following tokens:
+.TP 7
+\fBmidnight\fP
+.RS
+Indicates the time 12:00 am (00:00).
+.RE
+.TP 7
+\fBnoon\fP
+.RS
+Indicates the time 12:00 pm.
+.RE
+.TP 7
+\fBnow\fP
+.RS
+Indicates the current day and time. Invoking \fIat\fP <\fBnow\fP>
+shall submit an at-job for potentially immediate
+execution (that is, subject only to unspecified scheduling delays).
+.RE
+.sp
+.RE
+.TP 7
+\fIdate\fP
+.RS
+An optional \fIdate\fP can be specified as either a month name (one
+of the values from the \fBmon\fP or \fBabmon\fP keywords
+in the \fILC_TIME\fP locale category) followed by a day number (and
+possibly year number preceded by a comma), or a day of the
+week (one of the values from the \fBday\fP or \fBabday\fP keywords
+in the \fILC_TIME\fP locale category). In the POSIX locale,
+two special days shall be recognized:
+.TP 7
+\fBtoday\fP
+.RS
+Indicates the current day.
+.RE
+.TP 7
+\fBtomorrow\fP
+.RS
+Indicates the day following the current day.
+.RE
+.sp
+.LP
+If no \fIdate\fP is given, \fBtoday\fP shall be assumed if the given
+time is greater than the current time, and
+\fBtomorrow\fP shall be assumed if it is less. If the given month
+is less than the current month (and no year is given), next year
+shall be assumed.
+.RE
+.TP 7
+\fIincrement\fP
+.RS
+The optional \fIincrement\fP shall be a number preceded by a plus
+sign ( \fB'+'\fP ) and suffixed by one of the following:
+\fBminutes\fP, \fBhours\fP, \fBdays\fP, \fBweeks\fP, \fBmonths\fP,
+or \fByears\fP. (The singular forms shall also be
+accepted.) The keyword \fBnext\fP shall be equivalent to an increment
+number of +1. For example, the following are equivalent
+commands:
+.sp
+.RS
+.nf
+
+\fBat 2pm + 1 week
+at 2pm next week
+\fP
+.fi
+.RE
+.RE
+.sp
+.sp
+.LP
+The following grammar describes the precise format of \fItimespec\fP
+in the POSIX locale. The general conventions for this
+style of grammar are described in \fIGrammar Conventions\fP . This
+formal syntax shall
+take precedence over the preceding text syntax description. The longest
+possible token or delimiter shall be recognized at a given
+point. When used in a \fItimespec\fP, white space shall also delimit
+tokens.
+.sp
+.RS
+.nf
+
+\fB%token hr24clock_hr_min
+%token hr24clock_hour
+/*
+ An hr24clock_hr_min is a one, two, or four-digit number. A one-digit
+ or two-digit number constitutes an hr24clock_hour. An hr24clock_hour
+ may be any of the single digits [0,9], or may be double digits, ranging
+ from [00,23]. If an hr24clock_hr_min is a four-digit number, the
+ first two digits shall be a valid hr24clock_hour, while the last two
+ represent the number of minutes, from [00,59].
+*/
+.sp
+
+%token wallclock_hr_min
+%token wallclock_hour
+/*
+ A wallclock_hr_min is a one, two-digit, or four-digit number.
+ A one-digit or two-digit number constitutes a wallclock_hour.
+ A wallclock_hour may be any of the single digits [1,9], or may
+ be double digits, ranging from [01,12]. If a wallclock_hr_min
+ is a four-digit number, the first two digits shall be a valid
+ wallclock_hour, while the last two represent the number of
+ minutes, from [00,59].
+*/
+.sp
+
+%token minute
+/*
+ A minute is a one or two-digit number whose value can be [0,9]
+ or [00,59].
+*/
+.sp
+
+%token day_number
+/*
+ A day_number is a number in the range appropriate for the particular
+ month and year specified by month_name and year_number, respectively.
+ If no year_number is given, the current year is assumed if the given
+ date and time are later this year. If no year_number is given and
+ the date and time have already occurred this year and the month is
+ not the current month, next year is the assumed year.
+*/
+.sp
+
+%token year_number
+/*
+ A year_number is a four-digit number representing the year A.D., in
+ which the at_job is to be run.
+*/
+.sp
+
+%token inc_number
+/*
+ The inc_number is the number of times the succeeding increment
+ period is to be added to the specified date and time.
+*/
+.sp
+
+%token timezone_name
+/*
+ The name of an optional timezone suffix to the time field, in an
+ implementation-defined format.
+*/
+.sp
+
+%token month_name
+/*
+ One of the values from the mon or abmon keywords in the LC_TIME
+ locale category.
+*/
+.sp
+
+%token day_of_week
+/*
+ One of the values from the day or abday keywords in the LC_TIME
+ locale category.
+*/
+.sp
+
+%token am_pm
+/*
+ One of the values from the am_pm keyword in the LC_TIME locale
+ category.
+*/
+.sp
+
+%start timespec
+%%
+timespec : time
+ | time date
+ | time increment
+ | time date increment
+ | nowspec
+ ;
+.sp
+
+nowspec : "now"
+ | "now" increment
+ ;
+.sp
+
+time : hr24clock_hr_min
+ | hr24clock_hr_min timezone_name
+ | hr24clock_hour ":" minute
+ | hr24clock_hour ":" minute timezone_name
+ | wallclock_hr_min am_pm
+ | wallclock_hr_min am_pm timezone_name
+ | wallclock_hour ":" minute am_pm
+ | wallclock_hour ":" minute am_pm timezone_name
+ | "noon"
+ | "midnight"
+ ;
+.sp
+
+date : month_name day_number
+ | month_name day_number "," year_number
+ | day_of_week
+ | "today"
+ | "tomorrow"
+ ;
+.sp
+
+increment : "+" inc_number inc_period
+ | "next" inc_period
+ ;
+.sp
+
+inc_period : "minute" | "minutes"
+ | "hour" | "hours"
+ | "day" | "days"
+ | "week" | "weeks"
+ | "month" | "months"
+ | "year" | "years"
+ ;
+\fP
+.fi
+.RE
+.SH STDIN
+.LP
+The standard input shall be a text file consisting of commands acceptable
+to the shell command language described in \fIShell Command Language\fP
+\&. The standard input shall only be used if no \fB-f\fP \fIfile\fP
+option is specified.
+.SH INPUT FILES
+.LP
+See the STDIN section.
+.LP
+The text files \fB/usr/lib/cron/at.allow\fP and \fB/usr/lib/cron/at.deny\fP
+shall contain zero or more user names, one per line,
+of users who are, respectively, authorized or denied access to the
+\fIat\fP and \fIbatch\fP
+utilities.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIat\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard error and
+informative messages written to standard output.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fILC_TIME\fP
+Determine the format and contents for date and time strings written
+and accepted by \fIat\fP.
+.TP 7
+\fISHELL\fP
+Determine a name of a command interpreter to be used to invoke the
+at-job. If the variable is unset or null, \fIsh\fP shall be used.
+If it is set to a value other than a name for \fIsh\fP, the implementation
+shall do one of the following: use that shell; use \fIsh\fP; use the
+login shell from the user database; or any of the preceding accompanied
+by a warning
+diagnostic about which was chosen.
+.TP 7
+\fITZ\fP
+Determine the timezone. The job shall be submitted for execution at
+the time specified by \fItimespec\fP or \fB-t\fP
+\fItime\fP relative to the timezone specified by the \fITZ\fP variable.
+If \fItimespec\fP specifies a timezone, it shall
+override \fITZ\fP. If \fItimespec\fP does not specify a timezone
+and \fITZ\fP is unset or null, an unspecified default timezone
+shall be used.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+When standard input is a terminal, prompts of unspecified format for
+each line of the user input described in the STDIN section
+may be written to standard output.
+.LP
+In the POSIX locale, the following shall be written to the standard
+output for each job when jobs are listed in response to the
+\fB-l\fP option:
+.sp
+.RS
+.nf
+
+\fB"%s\\t%s\\n",\fP \fIat_job_id\fP\fB, <\fP\fIdate\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where \fIdate\fP shall be equivalent in format to the output of:
+.sp
+.RS
+.nf
+
+\fBdate +"%a %b %e %T %Y"
+\fP
+.fi
+.RE
+.LP
+The date and time written shall be adjusted so that they appear in
+the timezone of the user (as determined by the \fITZ\fP
+variable).
+.SH STDERR
+.LP
+In the POSIX locale, the following shall be written to standard error
+when a job has been successfully submitted:
+.sp
+.RS
+.nf
+
+\fB"job %s at %s\\n",\fP \fIat_job_id\fP\fB, <\fP\fIdate\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where \fIdate\fP has the same format as that described in the STDOUT
+section. Neither this, nor warning messages concerning the
+selection of the command interpreter, shall be considered a diagnostic
+that changes the exit status.
+.LP
+Diagnostic messages, if any, shall be written to standard error.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+The \fIat\fP utility successfully submitted, removed, or listed a
+job or jobs.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+The job shall not be scheduled, removed, or listed.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The format of the \fIat\fP command line shown here is guaranteed only
+for the POSIX locale. Other cultures may be supported
+with substantially different interfaces, although implementations
+are encouraged to provide comparable levels of functionality.
+.LP
+Since the commands run in a separate shell invocation, running in
+a separate process group with no controlling terminal, open
+file descriptors, traps, and priority inherited from the invoking
+environment are lost.
+.LP
+Some implementations do not allow substitution of different shells
+using \fISHELL\fP. System V systems, for example, have used
+the login shell value for the user in \fB/etc/passwd\fP. To select
+reliably another command interpreter, the user must include it
+as part of the script, such as:
+.sp
+.RS
+.nf
+
+\fB$\fP \fBat 1800
+myshell myscript
+EOT
+\fP\fBjob ... at ...
+$\fP
+.fi
+.RE
+.SH EXAMPLES
+.IP " 1." 4
+This sequence can be used at a terminal:
+.sp
+.RS
+.nf
+
+\fBat -m 0730 tomorrow
+sort < file >outfile
+EOT
+\fP
+.fi
+.RE
+.LP
+.IP " 2." 4
+This sequence, which demonstrates redirecting standard error to a
+pipe, is useful in a command procedure (the sequence of output
+redirection specifications is significant):
+.sp
+.RS
+.nf
+
+\fBat now + 1 hour <<!
+diff file1 file2 2>&1 >outfile | mailx mygroup
+!
+\fP
+.fi
+.RE
+.LP
+.IP " 3." 4
+To have a job reschedule itself, \fIat\fP can be invoked from within
+the at-job. For example, this daily processing script
+named \fBmy.daily\fP runs every day (although \fIcrontab\fP is a more
+appropriate vehicle
+for such work):
+.sp
+.RS
+.nf
+
+\fB# my.daily runs every day
+\fP\fIdaily processing\fP\fBat now tomorrow < my.daily
+\fP
+.fi
+.RE
+.LP
+.IP " 4." 4
+The spacing of the three portions of the POSIX locale \fItimespec\fP
+is quite flexible as long as there are no ambiguities.
+Examples of various times and operand presentation include:
+.sp
+.RS
+.nf
+
+\fBat 0815am Jan 24
+at 8 :15amjan24
+at now "+ 1day"
+at 5 pm FRIday
+at '17
+ utc+
+ 30minutes'
+\fP
+.fi
+.RE
+.LP
+.SH RATIONALE
+.LP
+The \fIat\fP utility reads from standard input the commands to be
+executed at a later time. It may be useful to redirect
+standard output and standard error within the specified commands.
+.LP
+The \fB-t\fP \fItime\fP option was added as a new capability to support
+an internationalized way of specifying a time for
+execution of the submitted job.
+.LP
+Early proposals added a "jobname" concept as a way of giving submitted
+jobs names that are meaningful to the user submitting
+them. The historical, system-specified \fIat_job_id\fP gives no indication
+of what the job is. Upon further reflection, it was
+decided that the benefit of this was not worth the change in historical
+interface. The \fIat\fP functionality is useful in simple
+environments, but in large or complex situations, the functionality
+provided by the Batch Services option is more suitable.
+.LP
+The \fB-q\fP option historically has been an undocumented option,
+used mainly by the \fIbatch\fP utility.
+.LP
+The System V \fB-m\fP option was added to provide a method for informing
+users that an at-job had completed. Otherwise, users
+are only informed when output to standard error or standard output
+are not redirected.
+.LP
+The behavior of \fIat\fP <\fBnow\fP> was changed in an early proposal
+from being unspecified to submitting a job for
+potentially immediate execution. Historical BSD \fIat\fP implementations
+support this. Historical System V implementations give an
+error in that case, but a change to the System V versions should have
+no backwards-compatibility ramifications.
+.LP
+On BSD-based systems, a \fB-u\fP \fIuser\fP option has allowed those
+with appropriate privileges to access the work of other
+users. Since this is primarily a system administration feature and
+is not universally implemented, it has been omitted. Similarly,
+a specification for the output format for a user with appropriate
+privileges viewing the queues of other users has been
+omitted.
+.LP
+The \fB-f\fP \fIfile\fP option from System V is used instead of the
+BSD method of using the last operand as the pathname. The
+BSD method is ambiguous-does:
+.sp
+.RS
+.nf
+
+\fBat 1200 friday
+\fP
+.fi
+.RE
+.LP
+mean the same thing if there is a file named \fBfriday\fP in the current
+directory?
+.LP
+The \fIat_job_id\fP is composed of a limited character set in historical
+practice, and it is mandated here to invalidate
+systems that might try using characters that require shell quoting
+or that could not be easily parsed by shell scripts.
+.LP
+The \fIat\fP utility varies between System V and BSD systems in the
+way timezones are used. On System V systems, the \fITZ\fP
+variable affects the at-job submission times and the times displayed
+for the user. On BSD systems, \fITZ\fP is not taken into
+account. The BSD behavior is easily achieved with the current specification.
+If the user wishes to have the timezone default to
+that of the system, they merely need to issue the \fIat\fP command
+immediately following an unsetting or null assignment to \fITZ
+\&.\fP For example:
+.sp
+.RS
+.nf
+
+\fBTZ= at noon ...
+\fP
+.fi
+.RE
+.LP
+gives the desired BSD result.
+.LP
+While the \fIyacc\fP-like grammar specified in the OPERANDS section
+is lexically
+unambiguous with respect to the digit strings, a lexical analyzer
+would probably be written to look for and return digit strings in
+those cases. The parser could then check whether the digit string
+returned is a valid \fIday_number\fP, \fIyear_number\fP, and so
+on, based on the context.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIbatch\fP, \fIcrontab\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/awk.1p b/man-pages-posix-2003/man1p/awk.1p
new file mode 100644
index 0000000..bff43ce
--- /dev/null
+++ b/man-pages-posix-2003/man1p/awk.1p
@@ -0,0 +1,2989 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "AWK" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" awk
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+awk \- pattern scanning and processing language
+.SH SYNOPSIS
+.LP
+\fBawk\fP \fB[\fP\fB-F\fP \fIERE\fP\fB][\fP\fB-v\fP \fIassignment\fP\fB]\fP
+\fB\&...\fP \fIprogram\fP
+\fB[\fP\fIargument\fP \fB...\fP\fB]\fP\fB
+.br
+.sp
+awk\fP \fB[\fP\fB-F\fP \fIERE\fP\fB]\fP \fB-f\fP \fIprogfile\fP \fB...\fP
+\fB[\fP\fB-v\fP
+\fIassignment\fP\fB]\fP \fB...\fP\fB[\fP\fIargument\fP \fB...\fP\fB]\fP\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIawk\fP utility shall execute programs written in the \fIawk\fP
+programming language, which is specialized for textual
+data manipulation. An \fIawk\fP program is a sequence of patterns
+and corresponding actions. When input is read that matches a
+pattern, the action associated with that pattern is carried out.
+.LP
+Input shall be interpreted as a sequence of records. By default, a
+record is a line, less its terminating <newline>, but
+this can be changed by using the \fBRS\fP built-in variable. Each
+record of input shall be matched in turn against each pattern in
+the program. For each pattern matched, the associated action shall
+be executed.
+.LP
+The \fIawk\fP utility shall interpret each input record as a sequence
+of fields where, by default, a field is a string of non-
+<blank>s. This default white-space field delimiter can be changed
+by using the \fBFS\fP built-in variable or \fB-F\fP
+\fIERE\fP. The \fIawk\fP utility shall denote the first field in a
+record $1, the second $2, and so on. The symbol $0 shall refer
+to the entire record; setting any other field causes the re-evaluation
+of $0. Assigning to $0 shall reset the values of all other
+fields and the \fBNF\fP built-in variable.
+.SH OPTIONS
+.LP
+The \fIawk\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-F\ \fP \fIERE\fP
+Define the input field separator to be the extended regular expression
+\fIERE\fP, before any input is read; see Regular Expressions .
+.TP 7
+\fB-f\ \fP \fIprogfile\fP
+Specify the pathname of the file \fIprogfile\fP containing an \fIawk\fP
+program. If multiple instances of this option are
+specified, the concatenation of the files specified as \fIprogfile\fP
+in the order specified shall be the \fIawk\fP program. The
+\fIawk\fP program can alternatively be specified in the command line
+as a single argument.
+.TP 7
+\fB-v\ \fP \fIassignment\fP
+The application shall ensure that the \fIassignment\fP argument is
+in the same form as an \fIassignment\fP operand. The specified
+variable assignment shall occur prior to executing the \fIawk\fP program,
+including the actions associated with \fBBEGIN\fP
+patterns (if any). Multiple occurrences of this option can be specified.
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIprogram\fP
+If no \fB-f\fP option is specified, the first operand to \fIawk\fP
+shall be the text of the \fIawk\fP program. The
+application shall supply the \fIprogram\fP operand as a single argument
+to \fIawk\fP. If the text does not end in a
+<newline>, \fIawk\fP shall interpret the text as if it did.
+.TP 7
+\fIargument\fP
+Either of the following two types of \fIargument\fP can be intermixed:
+.TP 7
+\fIfile\fP
+.RS
+A pathname of a file that contains the input to be read, which is
+matched against the set of patterns in the program. If no
+\fIfile\fP operands are specified, or if a \fIfile\fP operand is \fB'-'\fP,
+the standard input shall be used.
+.RE
+.TP 7
+\fIassignment\fP
+.RS
+An operand that begins with an underscore or alphabetic character
+from the portable character set (see the table in the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Section 6.1, Portable
+Character Set), followed by a sequence of underscores, digits, and
+alphabetics from the portable character set, followed by the
+\fB'='\fP character, shall specify a variable assignment rather than
+a pathname. The characters before the \fB'='\fP
+represent the name of an \fIawk\fP variable; if that name is an \fIawk\fP
+reserved word (see Grammar ) the behavior is undefined. The characters
+following the equal sign shall be interpreted as if they
+appeared in the \fIawk\fP program preceded and followed by a double-quote
+( \fB' )'\fP character, as a \fBSTRING\fP token (see
+Grammar ), except that if the last character is an unescaped backslash,
+it shall be interpreted as a
+literal backslash rather than as the first character of the sequence
+\fB"\\""\fP . The variable shall be assigned the value of
+that \fBSTRING\fP token and, if appropriate, shall be considered a
+\fInumeric string\fP (see Expressions in awk ), the variable shall
+also be assigned its numeric value. Each such variable assignment
+shall occur just prior to the processing of the following \fIfile\fP,
+if any. Thus, an assignment before the first \fIfile\fP
+argument shall be executed after the \fBBEGIN\fP actions (if any),
+while an assignment after the last \fIfile\fP argument shall
+occur before the \fBEND\fP actions (if any). If there are no \fIfile\fP
+arguments, assignments shall be executed before
+processing the standard input.
+.RE
+.sp
+.sp
+.SH STDIN
+.LP
+The standard input shall be used only if no \fIfile\fP operands are
+specified, or if a \fIfile\fP operand is \fB'-'\fP ;
+see the INPUT FILES section. If the \fIawk\fP program contains no
+actions and no patterns, but is otherwise a valid \fIawk\fP
+program, standard input and any \fIfile\fP operands shall not be read
+and \fIawk\fP shall exit with a return status of zero.
+.SH INPUT FILES
+.LP
+Input files to the \fIawk\fP program from any of the following sources
+shall be text files:
+.IP " *" 3
+Any \fIfile\fP operands or their equivalents, achieved by modifying
+the \fIawk\fP variables \fBARGV\fP and \fBARGC\fP
+.LP
+.IP " *" 3
+Standard input in the absence of any \fIfile\fP operands
+.LP
+.IP " *" 3
+Arguments to the \fBgetline\fP function
+.LP
+.LP
+Whether the variable \fBRS\fP is set to a value other than a <newline>
+or not, for these files, implementations shall
+support records terminated with the specified separator up to {LINE_MAX}
+bytes and may support longer records.
+.LP
+If \fB-f\fP \fIprogfile\fP is specified, the application shall ensure
+that the files named by each of the \fIprogfile\fP
+option-arguments are text files and their concatenation, in the same
+order as they appear in the arguments, is an \fIawk\fP
+program.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIawk\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_COLLATE\fP
+Determine the locale for the behavior of ranges, equivalence classes,
+and multi-character collating elements within regular
+expressions and in comparisons of string values.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files), the
+behavior of character classes within regular expressions, the
+identification of characters as letters, and the mapping of uppercase
+and lowercase characters for the \fBtoupper\fP and
+\fBtolower\fP functions.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fILC_NUMERIC\fP
+Determine the radix character used when interpreting numeric input,
+performing conversions between numeric and string values, and
+formatting numeric output. Regardless of locale, the period character
+(the decimal-point character of the POSIX locale) is the
+decimal-point character recognized in processing \fIawk\fP programs
+(including assignments in command line arguments).
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fIPATH\fP
+Determine the search path when looking for commands executed by \fIsystem\fP(\fIexpr\fP),
+or input and output pipes; see the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 8, Environment
+Variables.
+.sp
+.LP
+In addition, all environment variables shall be visible via the \fIawk\fP
+variable \fBENVIRON\fP.
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The nature of the output files depends on the \fIawk\fP program.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+The nature of the output files depends on the \fIawk\fP program.
+.SH EXTENDED DESCRIPTION
+.SS Overall Program Structure
+.LP
+An \fIawk\fP program is composed of pairs of the form:
+.sp
+.RS
+.nf
+
+\fIpattern\fP \fB{\fP \fIaction\fP \fB}
+\fP
+.fi
+.RE
+.LP
+Either the pattern or the action (including the enclosing brace characters)
+can be omitted.
+.LP
+A missing pattern shall match any record of input, and a missing action
+shall be equivalent to:
+.sp
+.RS
+.nf
+
+\fB{ print }
+\fP
+.fi
+.RE
+.LP
+Execution of the \fIawk\fP program shall start by first executing
+the actions associated with all \fBBEGIN\fP patterns in the
+order they occur in the program. Then each \fIfile\fP operand (or
+standard input if no files were specified) shall be processed in
+turn by reading data from the file until a record separator is seen
+( <newline> by default). Before the first reference to a
+field in the record is evaluated, the record shall be split into fields,
+according to the rules in Regular Expressions, using the value of
+\fBFS\fP that was current at the time the record was read. Each
+pattern in the program then shall be evaluated in the order of occurrence,
+and the action associated with each pattern that matches
+the current record executed. The action for a matching pattern shall
+be executed before evaluating subsequent patterns. Finally,
+the actions associated with all \fBEND\fP patterns shall be executed
+in the order they occur in the program.
+.SS Expressions in awk
+.LP
+Expressions describe computations used in \fIpatterns\fP and \fIactions\fP.
+In the following table, valid expression
+operations are given in groups from highest precedence first to lowest
+precedence last, with equal-precedence operators grouped
+between horizontal lines. In expression evaluation, where the grammar
+is formally ambiguous, higher precedence operators shall be
+evaluated before lower precedence operators. In this table \fIexpr\fP,
+\fIexpr1\fP, \fIexpr2\fP, and \fIexpr3\fP represent any
+expression, while lvalue represents any entity that can be assigned
+to (that is, on the left side of an assignment operator). The
+precise syntax of expressions is given in Grammar .
+.sp
+.ce 1
+\fBTable: Expressions in Decreasing Precedence in \fIawk\fP\fP
+.TS C
+center; l1 l1 l1 l.
+\fBSyntax\fP \fBName\fP \fBType of Result\fP \fBAssociativity\fP
+( \fIexpr\fP ) Grouping Type of \fIexpr\fP N/A
+$\fIexpr\fP Field reference String N/A
+++ lvalue Pre-increment Numeric N/A
+-- lvalue Pre-decrement Numeric N/A
+lvalue ++ Post-increment Numeric N/A
+lvalue -- Post-decrement Numeric N/A
+\fIexpr\fP ^ \fIexpr\fP Exponentiation Numeric Right
+! \fIexpr\fP Logical not Numeric N/A
++ \fIexpr\fP Unary plus Numeric N/A
+- \fIexpr\fP Unary minus Numeric N/A
+\fIexpr\fP * \fIexpr\fP Multiplication Numeric Left
+\fIexpr\fP / \fIexpr\fP Division Numeric Left
+\fIexpr\fP % \fIexpr\fP Modulus Numeric Left
+\fIexpr\fP + \fIexpr\fP Addition Numeric Left
+\fIexpr\fP - \fIexpr\fP Subtraction Numeric Left
+\fIexpr\fP \fIexpr\fP String concatenation String Left
+\fIexpr\fP < \fIexpr\fP Less than Numeric None
+\fIexpr\fP <= \fIexpr\fP Less than or equal to Numeric None
+\fIexpr\fP != \fIexpr\fP Not equal to Numeric None
+\fIexpr\fP == \fIexpr\fP Equal to Numeric None
+\fIexpr\fP > \fIexpr\fP Greater than Numeric None
+\fIexpr\fP >= \fIexpr\fP Greater than or equal to Numeric None
+\fIexpr\fP ~ \fIexpr\fP ERE match Numeric None
+\fIexpr\fP !~ \fIexpr\fP ERE non-match Numeric None
+\fIexpr\fP in array Array membership Numeric Left
+( \fIindex\fP ) in \fIarray\fP Multi-dimension array Numeric Left
+\ membership \ \
+\fIexpr\fP && \fIexpr\fP Logical AND Numeric Left
+\fIexpr\fP || \fIexpr\fP Logical OR Numeric Left
+\fIexpr1\fP ? \fIexpr2\fP : \fIexpr3\fP Conditional expression Type of selected Right
+\ \ \fIexpr2\fP or \fIexpr3\fP \
+lvalue ^= \fIexpr\fP Exponentiation assignment Numeric Right
+lvalue %= \fIexpr\fP Modulus assignment Numeric Right
+lvalue *= \fIexpr\fP Multiplication assignment Numeric Right
+lvalue /= \fIexpr\fP Division assignment Numeric Right
+lvalue += \fIexpr\fP Addition assignment Numeric Right
+lvalue -= \fIexpr\fP Subtraction assignment Numeric Right
+lvalue = \fIexpr\fP Assignment Type of \fIexpr\fP Right
+.TE
+.LP
+Each expression shall have either a string value, a numeric value,
+or both. Except as stated for specific contexts, the value of
+an expression shall be implicitly converted to the type needed for
+the context in which it is used. A string value shall be
+converted to a numeric value by the equivalent of the following calls
+to functions defined by the ISO\ C standard:
+.sp
+.RS
+.nf
+
+\fBsetlocale(LC_NUMERIC, "");
+\fP\fInumeric_value\fP \fB= atof(\fP\fIstring_value\fP\fB);
+\fP
+.fi
+.RE
+.LP
+A numeric value that is exactly equal to the value of an integer (see
+\fIConcepts Derived
+from the ISO C Standard\fP ) shall be converted to a string by the
+equivalent of a call to the \fBsprintf\fP function (see String Functions
+) with the string \fB"%d"\fP as the \fIfmt\fP argument and the numeric
+value being
+converted as the first and only \fIexpr\fP argument. Any other numeric
+value shall be converted to a string by the equivalent of a
+call to the \fBsprintf\fP function with the value of the variable
+\fBCONVFMT\fP as the \fIfmt\fP argument and the numeric value
+being converted as the first and only \fIexpr\fP argument. The result
+of the conversion is unspecified if the value of
+\fBCONVFMT\fP is not a floating-point format specification. This volume
+of IEEE\ Std\ 1003.1-2001 specifies no explicit
+conversions between numbers and strings. An application can force
+an expression to be treated as a number by adding zero to it, or
+can force it to be treated as a string by concatenating the null string
+( \fB""\fP ) to it.
+.LP
+A string value shall be considered a \fInumeric string\fP if it comes
+from one of the following:
+.IP " 1." 4
+Field variables
+.LP
+.IP " 2." 4
+Input from the \fIgetline\fP() function
+.LP
+.IP " 3." 4
+\fBFILENAME\fP
+.LP
+.IP " 4." 4
+\fBARGV\fP array elements
+.LP
+.IP " 5." 4
+\fBENVIRON\fP array elements
+.LP
+.IP " 6." 4
+Array elements created by the \fIsplit\fP() function
+.LP
+.IP " 7." 4
+A command line variable assignment
+.LP
+.IP " 8." 4
+Variable assignment from another numeric string variable
+.LP
+.LP
+and after all the following conversions have been applied, the resulting
+string would lexically be recognized as a \fBNUMBER\fP
+token as described by the lexical conventions in Grammar :
+.IP " *" 3
+All leading and trailing <blank>s are discarded.
+.LP
+.IP " *" 3
+If the first non- <blank> is \fB'+'\fP or \fB'-'\fP, it is discarded.
+.LP
+.IP " *" 3
+Changing each occurrence of the decimal point character from the current
+locale to a period.
+.LP
+.LP
+If a \fB'-'\fP character is ignored in the preceding description,
+the numeric value of the \fInumeric string\fP shall be the
+negation of the numeric value of the recognized \fBNUMBER\fP token.
+Otherwise, the numeric value of the \fInumeric string\fP
+shall be the numeric value of the recognized \fBNUMBER\fP token. Whether
+or not a string is a \fInumeric string\fP shall be
+relevant only in contexts where that term is used in this section.
+.LP
+When an expression is used in a Boolean context, if it has a numeric
+value, a value of zero shall be treated as false and any
+other value shall be treated as true. Otherwise, a string value of
+the null string shall be treated as false and any other value
+shall be treated as true. A Boolean context shall be one of the following:
+.IP " *" 3
+The first subexpression of a conditional expression
+.LP
+.IP " *" 3
+An expression operated on by logical NOT, logical AND, or logical
+OR
+.LP
+.IP " *" 3
+The second expression of a \fBfor\fP statement
+.LP
+.IP " *" 3
+The expression of an \fBif\fP statement
+.LP
+.IP " *" 3
+The expression of the \fBwhile\fP clause in either a \fBwhile\fP or
+\fBdo\fP... \fBwhile\fP statement
+.LP
+.IP " *" 3
+An expression used as a pattern (as in Overall Program Structure)
+.LP
+.LP
+All arithmetic shall follow the semantics of floating-point arithmetic
+as specified by the ISO\ C standard (see \fIConcepts Derived from
+the ISO C Standard\fP ).
+.LP
+The value of the expression:
+.sp
+.RS
+.nf
+
+\fIexpr1\fP \fB^\fP \fIexpr2\fP
+.fi
+.RE
+.LP
+shall be equivalent to the value returned by the ISO\ C standard function
+call:
+.sp
+.RS
+.nf
+
+\fBpow(\fP\fIexpr1\fP\fB,\fP \fIexpr2\fP\fB)
+\fP
+.fi
+.RE
+.LP
+The expression:
+.sp
+.RS
+.nf
+
+\fBlvalue ^=\fP \fIexpr\fP
+.fi
+.RE
+.LP
+shall be equivalent to the ISO\ C standard expression:
+.sp
+.RS
+.nf
+
+\fBlvalue = pow(lvalue,\fP \fIexpr\fP\fB)
+\fP
+.fi
+.RE
+.LP
+except that lvalue shall be evaluated only once. The value of the
+expression:
+.sp
+.RS
+.nf
+
+\fIexpr1\fP \fB%\fP \fIexpr2\fP
+.fi
+.RE
+.LP
+shall be equivalent to the value returned by the ISO\ C standard function
+call:
+.sp
+.RS
+.nf
+
+\fBfmod(\fP\fIexpr1\fP\fB,\fP \fIexpr2\fP\fB)
+\fP
+.fi
+.RE
+.LP
+The expression:
+.sp
+.RS
+.nf
+
+\fBlvalue %=\fP \fIexpr\fP
+.fi
+.RE
+.LP
+shall be equivalent to the ISO\ C standard expression:
+.sp
+.RS
+.nf
+
+\fBlvalue = fmod(lvalue,\fP \fIexpr\fP\fB)
+\fP
+.fi
+.RE
+.LP
+except that lvalue shall be evaluated only once.
+.LP
+Variables and fields shall be set by the assignment statement:
+.sp
+.RS
+.nf
+
+\fBlvalue =\fP \fIexpression\fP
+.fi
+.RE
+.LP
+and the type of \fIexpression\fP shall determine the resulting variable
+type. The assignment includes the arithmetic
+assignments ( \fB"+="\fP, \fB"-="\fP, \fB"*="\fP, \fB"/="\fP,
+\fB"%="\fP, \fB"^="\fP, \fB"++"\fP,
+\fB"--"\fP ) all of which shall produce a numeric result. The left-hand
+side of an assignment and the target of increment and
+decrement operators can be one of a variable, an array with index,
+or a field selector.
+.LP
+The \fIawk\fP language supplies arrays that are used for storing numbers
+or strings. Arrays need not be declared. They shall
+initially be empty, and their sizes shall change dynamically. The
+subscripts, or element identifiers, are strings, providing a type
+of associative array capability. An array name followed by a subscript
+within square brackets can be used as an lvalue and thus as
+an expression, as described in the grammar; see Grammar . Unsubscripted
+array names can be used in
+only the following contexts:
+.IP " *" 3
+A parameter in a function definition or function call
+.LP
+.IP " *" 3
+The \fBNAME\fP token following any use of the keyword \fBin\fP as
+specified in the grammar (see Grammar ); if the name used in this
+context is not an array name, the behavior is undefined
+.LP
+.LP
+A valid array \fIindex\fP shall consist of one or more comma-separated
+expressions, similar to the way in which
+multi-dimensional arrays are indexed in some programming languages.
+Because \fIawk\fP arrays are really one-dimensional, such a
+comma-separated list shall be converted to a single string by concatenating
+the string values of the separate expressions, each
+separated from the other by the value of the \fBSUBSEP\fP variable.
+Thus, the following two index operations shall be
+equivalent:
+.sp
+.RS
+.nf
+
+\fIvar\fP\fB[\fP\fIexpr1\fP\fB,\fP \fIexpr2\fP\fB, ...\fP \fIexprn\fP\fB]
+.sp
+
+\fP\fIvar\fP\fB[\fP\fIexpr1\fP \fBSUBSEP\fP \fIexpr2\fP \fBSUBSEP ... SUBSEP\fP \fIexprn\fP\fB]\fP
+.fi
+.RE
+.LP
+The application shall ensure that a multi-dimensioned \fIindex\fP
+used with the \fBin\fP operator is parenthesized. The
+\fBin\fP operator, which tests for the existence of a particular array
+element, shall not cause that element to exist. Any other
+reference to a nonexistent array element shall automatically create
+it.
+.LP
+Comparisons (with the \fB'<'\fP, \fB"<="\fP, \fB"!="\fP, \fB"=="\fP,
+\fB'>'\fP, and
+\fB">="\fP operators) shall be made numerically if both operands are
+numeric, if one is numeric and the other has a string
+value that is a numeric string, or if one is numeric and the other
+has the uninitialized value. Otherwise, operands shall be
+converted to strings as required and a string comparison shall be
+made using the locale-specific collation sequence. The value of
+the comparison expression shall be 1 if the relation is true, or 0
+if the relation is false.
+.SS Variables and Special Variables
+.LP
+Variables can be used in an \fIawk\fP program by referencing them.
+With the exception of function parameters (see User-Defined Functions
+), they are not explicitly declared. Function parameter names shall
+be local to the
+function; all other variable names shall be global. The same name
+shall not be used as both a function parameter name and as the
+name of a function or a special \fIawk\fP variable. The same name
+shall not be used both as a variable name with global scope and
+as the name of a function. The same name shall not be used within
+the same scope both as a scalar variable and as an array.
+Uninitialized variables, including scalar variables, array elements,
+and field variables, shall have an uninitialized value. An
+uninitialized value shall have both a numeric value of zero and a
+string value of the empty string. Evaluation of variables with an
+uninitialized value, to either string or numeric, shall be determined
+by the context in which they are used.
+.LP
+Field variables shall be designated by a \fB'$'\fP followed by a number
+or numerical expression. The effect of the field
+number \fIexpression\fP evaluating to anything other than a non-negative
+integer is unspecified; uninitialized variables or string
+values need not be converted to numeric values in this context. New
+field variables can be created by assigning a value to them.
+References to nonexistent fields (that is, fields after $\fBNF\fP),
+shall evaluate to the uninitialized value. Such references
+shall not create new fields. However, assigning to a nonexistent field
+(for example, $(\fBNF\fP+2)=5) shall increase the value of
+\fBNF\fP; create any intervening fields with the uninitialized value;
+and cause the value of $0 to be recomputed, with the fields
+being separated by the value of \fBOFS\fP. Each field variable shall
+have a string value or an uninitialized value when created.
+Field variables shall have the uninitialized value when created from
+$0 using \fBFS\fP and the variable does not contain any
+characters. If appropriate, the field variable shall be considered
+a numeric string (see Expressions in
+awk ).
+.LP
+Implementations shall support the following other special variables
+that are set by \fIawk\fP:
+.TP 7
+\fBARGC\fP
+The number of elements in the \fBARGV\fP array.
+.TP 7
+\fBARGV\fP
+An array of command line arguments, excluding options and the \fIprogram\fP
+argument, numbered from zero to \fBARGC\fP-1.
+.LP
+The arguments in \fBARGV\fP can be modified or added to; \fBARGC\fP
+can be altered. As each input file ends, \fIawk\fP shall
+treat the next non-null element of \fBARGV\fP, up to the current value
+of \fBARGC\fP-1, inclusive, as the name of the next input
+file. Thus, setting an element of \fBARGV\fP to null means that it
+shall not be treated as an input file. The name \fB'-'\fP
+indicates the standard input. If an argument matches the format of
+an \fIassignment\fP operand, this argument shall be treated as
+an \fIassignment\fP rather than a \fIfile\fP argument.
+.TP 7
+\fBCONVFMT\fP
+The \fBprintf\fP format for converting numbers to strings (except
+for output statements, where \fBOFMT\fP is used);
+\fB"%.6g"\fP by default.
+.TP 7
+\fBENVIRON\fP
+An array representing the value of the environment, as described in
+the \fIexec\fP functions defined in the System Interfaces
+volume of IEEE\ Std\ 1003.1-2001. The indices of the array shall be
+strings consisting of the names of the environment
+variables, and the value of each array element shall be a string consisting
+of the value of that variable. If appropriate, the
+environment variable shall be considered a \fInumeric string\fP (see
+Expressions in awk ); the
+array element shall also have its numeric value.
+.LP
+In all cases where the behavior of \fIawk\fP is affected by environment
+variables (including the environment of any commands
+that \fIawk\fP executes via the \fBsystem\fP function or via pipeline
+redirections with the \fBprint\fP statement, the
+\fBprintf\fP statement, or the \fBgetline\fP function), the environment
+used shall be the environment at the time \fIawk\fP
+began executing; it is implementation-defined whether any modification
+of \fBENVIRON\fP affects this environment.
+.TP 7
+\fBFILENAME\fP
+A pathname of the current input file. Inside a \fBBEGIN\fP action
+the value is undefined. Inside an \fBEND\fP action the
+value shall be the name of the last input file processed.
+.TP 7
+\fBFNR\fP
+The ordinal number of the current record in the current file. Inside
+a \fBBEGIN\fP action the value shall be zero. Inside an
+\fBEND\fP action the value shall be the number of the last record
+processed in the last file processed.
+.TP 7
+\fBFS\fP
+Input field separator regular expression; a <space> by default.
+.TP 7
+\fBNF\fP
+The number of fields in the current record. Inside a \fBBEGIN\fP action,
+the use of \fBNF\fP is undefined unless a
+\fBgetline\fP function without a \fIvar\fP argument is executed previously.
+Inside an \fBEND\fP action, \fBNF\fP shall retain
+the value it had for the last record read, unless a subsequent, redirected,
+\fBgetline\fP function without a \fIvar\fP argument
+is performed prior to entering the \fBEND\fP action.
+.TP 7
+\fBNR\fP
+The ordinal number of the current record from the start of input.
+Inside a \fBBEGIN\fP action the value shall be zero. Inside
+an \fBEND\fP action the value shall be the number of the last record
+processed.
+.TP 7
+\fBOFMT\fP
+The \fBprintf\fP format for converting numbers to strings in output
+statements (see Output
+Statements ); \fB"%.6g"\fP by default. The result of the conversion
+is unspecified if the value of \fBOFMT\fP is not a
+floating-point format specification.
+.TP 7
+\fBOFS\fP
+The \fBprint\fP statement output field separation; <space> by default.
+.TP 7
+\fBORS\fP
+The \fBprint\fP statement output record separator; a <newline> by
+default.
+.TP 7
+\fBRLENGTH\fP
+The length of the string matched by the \fBmatch\fP function.
+.TP 7
+\fBRS\fP
+The first character of the string value of \fBRS\fP shall be the input
+record separator; a <newline> by default. If
+\fBRS\fP contains more than one character, the results are unspecified.
+If \fBRS\fP is null, then records are separated by
+sequences consisting of a <newline> plus one or more blank lines,
+leading or trailing blank lines shall not result in empty
+records at the beginning or end of the input, and a <newline> shall
+always be a field separator, no matter what the value of
+\fBFS\fP is.
+.TP 7
+\fBRSTART\fP
+The starting position of the string matched by the \fBmatch\fP function,
+numbering from 1. This shall always be equivalent to
+the return value of the \fBmatch\fP function.
+.TP 7
+\fBSUBSEP\fP
+The subscript separator string for multi-dimensional arrays; the default
+value is implementation-defined.
+.sp
+.SS Regular Expressions
+.LP
+The \fIawk\fP utility shall make use of the extended regular expression
+notation (see the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 9.4, Extended Regular Expressions)
+except that it shall allow the use of C-language conventions for escaping
+special characters within the EREs, as specified in the
+table in the Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter
+5, File
+Format Notation ( \fB'\\\\'\fP, \fB'\\a'\fP, \fB'\\b'\fP, \fB'\\f'\fP,
+\fB'\\n'\fP, \fB'\\r'\fP, \fB'\\t'\fP,
+\fB'\\v'\fP ) and the following table; these escape sequences shall
+be recognized both inside and outside bracket expressions.
+Note that records need not be separated by <newline>s and string constants
+can contain <newline>s, so even the
+\fB"\\n"\fP sequence is valid in \fIawk\fP EREs. Using a slash character
+within an ERE requires the escaping shown in the
+following table.
+.br
+.sp
+.ce 1
+\fBTable: Escape Sequences in \fIawk\fP\fP
+.TS C
+center; l1 lw(30)1 lw(30).
+\fBEscape\fP T{
+.na
+\fB\ \fP
+.ad
+T} T{
+.na
+\fB\ \fP
+.ad
+T}
+\fBSequence\fP T{
+.na
+\fBDescription\fP
+.ad
+T} T{
+.na
+\fBMeaning\fP
+.ad
+T}
+\\" T{
+.na
+Backslash quotation-mark
+.ad
+T} T{
+.na
+Quotation-mark character
+.ad
+T}
+\\/ T{
+.na
+Backslash slash
+.ad
+T} T{
+.na
+Slash character
+.ad
+T}
+\\ddd T{
+.na
+A backslash character followed by the longest sequence of one, two, or three octal-digit characters (01234567). If all of the digits are 0 (that is, representation of the NUL character), the behavior is undefined.
+.ad
+T} T{
+.na
+The character whose encoding is represented by the one, two, or three-digit octal integer. Multi-byte characters require multiple, concatenated escape sequences of this type, including the leading \fB'\\'\fP for each byte.
+.ad
+T}
+\\c T{
+.na
+A backslash character followed by any character not described in this table or in the table in the Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 5, File Format Notation ( \fB'\\\\'\fP, \fB'\\a'\fP, \fB'\\b'\fP, \fB'\\f'\fP, \fB'\\n'\fP, \fB'\\r'\fP, \fB'\\t'\fP, \fB'\\v'\fP ).
+.ad
+T} T{
+.na
+Undefined
+.ad
+T}
+.TE
+.LP
+A regular expression can be matched against a specific field or string
+by using one of the two regular expression matching
+operators, \fB'~'\fP and \fB"!~"\fP . These operators shall interpret
+their right-hand operand as a regular
+expression and their left-hand operand as a string. If the regular
+expression matches the string, the \fB'~'\fP expression
+shall evaluate to a value of 1, and the \fB"!~"\fP expression shall
+evaluate to a value of 0. (The regular expression
+matching operation is as defined by the term matched in the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Section 9.1, Regular Expression
+Definitions, where a match occurs on any part of the
+string unless the regular expression is limited with the circumflex
+or dollar sign special characters.) If the regular expression
+does not match the string, the \fB'~'\fP expression shall evaluate
+to a value of 0, and the \fB"!~"\fP expression
+shall evaluate to a value of 1. If the right-hand operand is any expression
+other than the lexical token \fBERE\fP, the string
+value of the expression shall be interpreted as an extended regular
+expression, including the escape conventions described above.
+Note that these same escape conventions shall also be applied in determining
+the value of a string literal (the lexical token
+\fBSTRING\fP), and thus shall be applied a second time when a string
+literal is used in this context.
+.LP
+When an \fBERE\fP token appears as an expression in any context other
+than as the right-hand of the \fB'~'\fP or
+\fB"!~"\fP operator or as one of the built-in function arguments described
+below, the value of the resulting expression
+shall be the equivalent of:
+.sp
+.RS
+.nf
+
+\fB$0 ~ /\fP\fIere\fP\fB/
+\fP
+.fi
+.RE
+.LP
+The \fIere\fP argument to the \fBgsub\fP, \fBmatch\fP, \fBsub\fP functions,
+and the \fIfs\fP argument to the \fBsplit\fP
+function (see String Functions ) shall be interpreted as extended
+regular expressions. These can be
+either \fBERE\fP tokens or arbitrary expressions, and shall be interpreted
+in the same manner as the right-hand side of the
+\fB'~'\fP or \fB"!~"\fP operator.
+.LP
+An extended regular expression can be used to separate fields by using
+the \fB-F\fP \fIERE\fP option or by assigning a string
+containing the expression to the built-in variable \fBFS\fP. The default
+value of the \fBFS\fP variable shall be a single
+<space>. The following describes \fBFS\fP behavior:
+.IP " 1." 4
+If \fBFS\fP is a null string, the behavior is unspecified.
+.LP
+.IP " 2." 4
+If \fBFS\fP is a single character:
+.RS
+.IP " a." 4
+If \fBFS\fP is <space>, skip leading and trailing <blank>s; fields
+shall be delimited by sets of one or more
+<blank>s.
+.LP
+.IP " b." 4
+Otherwise, if \fBFS\fP is any other character \fIc\fP, fields shall
+be delimited by each single occurrence of \fIc\fP.
+.LP
+.RE
+.LP
+.IP " 3." 4
+Otherwise, the string value of \fBFS\fP shall be considered to be
+an extended regular expression. Each occurrence of a sequence
+matching the extended regular expression shall delimit fields.
+.LP
+.LP
+Except for the \fB'~'\fP and \fB"!~"\fP operators, and in the \fBgsub\fP,
+\fBmatch\fP, \fBsplit\fP, and
+\fBsub\fP built-in functions, ERE matching shall be based on input
+records; that is, record separator characters (the first
+character of the value of the variable \fBRS\fP, <newline> by default)
+cannot be embedded in the expression, and no
+expression shall match the record separator character. If the record
+separator is not <newline>, <newline>s embedded in
+the expression can be matched. For the \fB'~'\fP and \fB"!~"\fP operators,
+and in those four built-in functions,
+ERE matching shall be based on text strings; that is, any character
+(including <newline> and the record separator) can be
+embedded in the pattern, and an appropriate pattern shall match any
+character. However, in all \fIawk\fP ERE matching, the use of
+one or more NUL characters in the pattern, input record, or text string
+produces undefined results.
+.SS Patterns
+.LP
+A \fIpattern\fP is any valid \fIexpression\fP, a range specified by
+two expressions separated by a comma, or one of the two
+special patterns \fBBEGIN\fP or \fBEND\fP.
+.SS Special Patterns
+.LP
+The \fIawk\fP utility shall recognize two special patterns, \fBBEGIN\fP
+and \fBEND\fP. Each \fBBEGIN\fP pattern shall be
+matched once and its associated action executed before the first record
+of input is read (except possibly by use of the
+\fBgetline\fP function-see Input/Output and General Functions - in
+a prior \fBBEGIN\fP action) and
+before command line assignment is done. Each \fBEND\fP pattern shall
+be matched once and its associated action executed after the
+last record of input has been read. These two patterns shall have
+associated actions.
+.LP
+\fBBEGIN\fP and \fBEND\fP shall not combine with other patterns. Multiple
+\fBBEGIN\fP and \fBEND\fP patterns shall be
+allowed. The actions associated with the \fBBEGIN\fP patterns shall
+be executed in the order specified in the program, as are the
+\fBEND\fP actions. An \fBEND\fP pattern can precede a \fBBEGIN\fP
+pattern in a program.
+.LP
+If an \fIawk\fP program consists of only actions with the pattern
+\fBBEGIN\fP, and the \fBBEGIN\fP action contains no
+\fBgetline\fP function, \fIawk\fP shall exit without reading its input
+when the last statement in the last \fBBEGIN\fP action is
+executed. If an \fIawk\fP program consists of only actions with the
+pattern \fBEND\fP or only actions with the patterns
+\fBBEGIN\fP and \fBEND\fP, the input shall be read before the statements
+in the \fBEND\fP actions are executed.
+.SS Expression Patterns
+.LP
+An expression pattern shall be evaluated as if it were an expression
+in a Boolean context. If the result is true, the pattern
+shall be considered to match, and the associated action (if any) shall
+be executed. If the result is false, the action shall not be
+executed.
+.SS Pattern Ranges
+.LP
+A pattern range consists of two expressions separated by a comma;
+in this case, the action shall be performed for all records
+between a match of the first expression and the following match of
+the second expression, inclusive. At this point, the pattern
+range can be repeated starting at input records subsequent to the
+end of the matched range.
+.SS Actions
+.LP
+An action is a sequence of statements as shown in the grammar in Grammar
+\&. Any single statement
+can be replaced by a statement list enclosed in braces. The application
+shall ensure that statements in a statement list are
+separated by <newline>s or semicolons. Statements in a statement list
+shall be executed sequentially in the order that they
+appear.
+.LP
+The \fIexpression\fP acting as the conditional in an \fBif\fP statement
+shall be evaluated and if it is non-zero or non-null,
+the following statement shall be executed; otherwise, if \fBelse\fP
+is present, the statement following the \fBelse\fP shall be
+executed.
+.LP
+The \fBif\fP, \fBwhile\fP, \fBdo\fP... \fBwhile\fP, \fBfor\fP, \fBbreak\fP,
+and \fBcontinue\fP statements are based on
+the ISO\ C standard (see \fIConcepts Derived from the ISO C Standard\fP
+), except
+that the Boolean expressions shall be treated as described in Expressions
+in awk , and except in the
+case of:
+.sp
+.RS
+.nf
+
+\fBfor (\fP\fIvariable\fP \fBin\fP \fIarray\fP\fB)
+\fP
+.fi
+.RE
+.LP
+which shall iterate, assigning each \fIindex\fP of \fIarray\fP to
+\fIvariable\fP in an unspecified order. The results of
+adding new elements to \fIarray\fP within such a \fBfor\fP loop are
+undefined. If a \fBbreak\fP or \fBcontinue\fP statement
+occurs outside of a loop, the behavior is undefined.
+.LP
+The \fBdelete\fP statement shall remove an individual array element.
+Thus, the following code deletes an entire array:
+.sp
+.RS
+.nf
+
+\fBfor (index in array)
+ delete array[index]
+\fP
+.fi
+.RE
+.LP
+The \fBnext\fP statement shall cause all further processing of the
+current input record to be abandoned. The behavior is
+undefined if a \fBnext\fP statement appears or is invoked in a \fBBEGIN\fP
+or \fBEND\fP action.
+.LP
+The \fBexit\fP statement shall invoke all \fBEND\fP actions in the
+order in which they occur in the program source and then
+terminate the program without reading further input. An \fBexit\fP
+statement inside an \fBEND\fP action shall terminate the
+program without further execution of \fBEND\fP actions. If an expression
+is specified in an \fBexit\fP statement, its numeric
+value shall be the exit status of \fIawk\fP, unless subsequent errors
+are encountered or a subsequent \fBexit\fP statement with
+an expression is executed.
+.SS Output Statements
+.LP
+Both \fBprint\fP and \fBprintf\fP statements shall write to standard
+output by default. The output shall be written to the
+location specified by \fIoutput_redirection\fP if one is supplied,
+as follows:
+.sp
+.RS
+.nf
+
+\fB>\fP \fIexpression\fP\fB>>\fP \fIexpression\fP\fB|\fP \fIexpression\fP
+.fi
+.RE
+.LP
+In all cases, the \fIexpression\fP shall be evaluated to produce a
+string that is used as a pathname into which to write (for
+\fB'>'\fP or \fB">>"\fP ) or as a command to be executed (for \fB'|'\fP
+). Using the first two forms, if the file
+of that name is not currently open, it shall be opened, creating it
+if necessary and using the first form, truncating the file. The
+output then shall be appended to the file. As long as the file remains
+open, subsequent calls in which \fIexpression\fP evaluates
+to the same string value shall simply append output to the file. The
+file remains open until the \fBclose\fP function (see Input/Output
+and General Functions ) is called with an expression that evaluates
+to the same string
+value.
+.LP
+The third form shall write output onto a stream piped to the input
+of a command. The stream shall be created if no stream is
+currently open with the value of \fIexpression\fP as its command name.
+The stream created shall be equivalent to one created by a
+call to the \fIpopen\fP() function defined in the System Interfaces
+volume of
+IEEE\ Std\ 1003.1-2001 with the value of \fIexpression\fP as the \fIcommand\fP
+argument and a value of \fIw\fP as the
+\fImode\fP argument. As long as the stream remains open, subsequent
+calls in which \fIexpression\fP evaluates to the same string
+value shall write output to the existing stream. The stream shall
+remain open until the \fBclose\fP function (see Input/Output and General
+Functions ) is called with an expression that evaluates to the same
+string value.
+At that time, the stream shall be closed as if by a call to the \fIpclose\fP()
+function
+defined in the System Interfaces volume of IEEE\ Std\ 1003.1-2001.
+.LP
+As described in detail by the grammar in Grammar , these output statements
+shall take a
+comma-separated list of \fIexpression\fPs referred to in the grammar
+by the non-terminal symbols \fBexpr_list\fP,
+\fBprint_expr_list\fP, or \fBprint_expr_list_opt\fP. This list is
+referred to here as the \fIexpression list\fP, and each member
+is referred to as an \fIexpression argument\fP.
+.LP
+The \fBprint\fP statement shall write the value of each expression
+argument onto the indicated output stream separated by the
+current output field separator (see variable \fBOFS\fP above), and
+terminated by the output record separator (see variable
+\fBORS\fP above). All expression arguments shall be taken as strings,
+being converted if necessary; this conversion shall be as
+described in Expressions in awk , with the exception that the \fBprintf\fP
+format in \fBOFMT\fP
+shall be used instead of the value in \fBCONVFMT\fP. An empty expression
+list shall stand for the whole input record ($0).
+.LP
+The \fBprintf\fP statement shall produce output based on a notation
+similar to the File Format Notation used to describe file
+formats in this volume of IEEE\ Std\ 1003.1-2001 (see the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 5, File Format Notation).
+Output shall be produced as specified with the first
+\fIexpression\fP argument as the string \fIformat\fP and subsequent
+\fIexpression\fP arguments as the strings \fIarg1\fP to
+\fIargn\fP, inclusive, with the following exceptions:
+.IP " 1." 4
+The \fIformat\fP shall be an actual character string rather than a
+graphical representation. Therefore, it cannot contain empty
+character positions. The <space> in the \fIformat\fP string, in any
+context other than a \fIflag\fP of a conversion
+specification, shall be treated as an ordinary character that is copied
+to the output.
+.LP
+.IP " 2." 4
+If the character set contains a \fB' '\fP character and that character
+appears in
+the \fIformat\fP string, it shall be treated as an ordinary character
+that is copied to the output.
+.LP
+.IP " 3." 4
+The \fIescape sequences\fP beginning with a backslash character shall
+be treated as sequences of ordinary characters that are
+copied to the output. Note that these same sequences shall be interpreted
+lexically by \fIawk\fP when they appear in literal
+strings, but they shall not be treated specially by the \fBprintf\fP
+statement.
+.LP
+.IP " 4." 4
+A \fIfield width\fP or \fIprecision\fP can be specified as the \fB'*'\fP
+character instead of a digit string. In this case
+the next argument from the expression list shall be fetched and its
+numeric value taken as the field width or precision.
+.LP
+.IP " 5." 4
+The implementation shall not precede or follow output from the \fBd\fP
+or \fBu\fP conversion specifier characters with
+<blank>s not specified by the \fIformat\fP string.
+.LP
+.IP " 6." 4
+The implementation shall not precede output from the \fBo\fP conversion
+specifier character with leading zeros not specified
+by the \fIformat\fP string.
+.LP
+.IP " 7." 4
+For the \fBc\fP conversion specifier character: if the argument has
+a numeric value, the character whose encoding is that
+value shall be output. If the value is zero or is not the encoding
+of any character in the character set, the behavior is
+undefined. If the argument does not have a numeric value, the first
+character of the string value shall be output; if the string
+does not contain any characters, the behavior is undefined.
+.LP
+.IP " 8." 4
+For each conversion specification that consumes an argument, the next
+expression argument shall be evaluated. With the exception
+of the \fBc\fP conversion specifier character, the value shall be
+converted (according to the rules specified in Expressions in awk
+) to the appropriate type for the conversion specification.
+.LP
+.IP " 9." 4
+If there are insufficient expression arguments to satisfy all the
+conversion specifications in the \fIformat\fP string, the
+behavior is undefined.
+.LP
+.IP "10." 4
+If any character sequence in the \fIformat\fP string begins with a
+\fB'%'\fP character, but does not form a valid conversion
+specification, the behavior is unspecified.
+.LP
+.LP
+Both \fBprint\fP and \fBprintf\fP can output at least {LINE_MAX} bytes.
+.SS Functions
+.LP
+The \fIawk\fP language has a variety of built-in functions: arithmetic,
+string, input/output, and general.
+.SS Arithmetic Functions
+.LP
+The arithmetic functions, except for \fBint\fP, shall be based on
+the ISO\ C standard (see \fIConcepts Derived from the ISO C Standard\fP
+). The behavior is undefined in cases where the
+ISO\ C standard specifies that an error be returned or that the behavior
+is undefined. Although the grammar (see Grammar ) permits built-in
+functions to appear with no arguments or parentheses, unless the argument
+or
+parentheses are indicated as optional in the following list (by displaying
+them within the \fB"[]"\fP brackets), such use is
+undefined.
+.TP 7
+\fBatan2\fP(\fIy\fP,\fIx\fP)
+Return arctangent of \fIy\fP/\fIx\fP in radians in the range [-pi,pi].
+.TP 7
+\fBcos\fP(\fIx\fP)
+Return cosine of \fIx\fP, where \fIx\fP is in radians.
+.TP 7
+\fBsin\fP(\fIx\fP)
+Return sine of \fIx\fP, where \fIx\fP is in radians.
+.TP 7
+\fBexp\fP(\fIx\fP)
+Return the exponential function of \fIx\fP.
+.TP 7
+\fBlog\fP(\fIx\fP)
+Return the natural logarithm of \fIx\fP.
+.TP 7
+\fBsqrt\fP(\fIx\fP)
+Return the square root of \fIx\fP.
+.TP 7
+\fBint\fP(\fIx\fP)
+Return the argument truncated to an integer. Truncation shall be toward
+0 when \fIx\fP>0.
+.TP 7
+\fBrand\fP()
+Return a random number \fIn\fP, such that 0<=\fIn\fP<1.
+.TP 7
+\fBsrand\fP(\fB[\fP\fIexpr\fP\fB]\fP)
+Set the seed value for \fIrand\fP to \fIexpr\fP or use the time of
+day if \fIexpr\fP is omitted. The previous seed value
+shall be returned.
+.sp
+.SS String Functions
+.LP
+The string functions in the following list shall be supported. Although
+the grammar (see Grammar
+) permits built-in functions to appear with no arguments or parentheses,
+unless the argument or parentheses are indicated as
+optional in the following list (by displaying them within the \fB"[]"\fP
+brackets), such use is undefined.
+.TP 7
+\fBgsub\fP(\fIere\fP,\ \fIrepl\fP\fB[\fP,\ \fIin\fP\fB]\fP)
+Behave like \fBsub\fP (see below), except that it shall replace all
+occurrences of the regular expression (like the \fIed\fP utility global
+substitute) in $0 or in the \fIin\fP argument, when specified.
+.TP 7
+\fBindex\fP(\fIs\fP,\ \fIt\fP)
+Return the position, in characters, numbering from 1, in string \fIs\fP
+where string \fIt\fP first occurs, or zero if it does
+not occur at all.
+.TP 7
+\fBlength[\fP(\fB[\fP\fIs\fP\fB]\fP)\fB]\fP
+Return the length, in characters, of its argument taken as a string,
+or of the whole record, $0, if there is no argument.
+.TP 7
+\fBmatch\fP(\fIs\fP,\ \fIere\fP)
+Return the position, in characters, numbering from 1, in string \fIs\fP
+where the extended regular expression \fIere\fP
+occurs, or zero if it does not occur at all. RSTART shall be set to
+the starting position (which is the same as the returned
+value), zero if no match is found; RLENGTH shall be set to the length
+of the matched string, -1 if no match is found.
+.TP 7
+\fBsplit\fP(\fIs\fP,\ \fIa\fP\fB[\fP,\ \fIfs\ \fP \fB]\fP)
+Split the string \fIs\fP into array elements \fIa\fP[1], \fIa\fP[2],
+\&..., \fIa\fP[\fIn\fP], and return \fIn\fP. All elements
+of the array shall be deleted before the split is performed. The separation
+shall be done with the ERE \fIfs\fP or with the field
+separator \fBFS\fP if \fIfs\fP is not given. Each array element shall
+have a string value when created and, if appropriate, the
+array element shall be considered a numeric string (see Expressions
+in awk ). The effect of a null
+string as the value of \fIfs\fP is unspecified.
+.TP 7
+\fBsprintf\fP(\fIfmt\fP,\ \fIexpr\fP,\ \fIexpr\fP,\ ...)
+Format the expressions according to the \fBprintf\fP format given
+by \fIfmt\fP and return the resulting string.
+.TP 7
+\fBsub(\fP\fIere\fP,\ \fIrepl\fP\fB[\fP,\ \fIin\ \fP \fB]\fP)
+Substitute the string \fIrepl\fP in place of the first instance of
+the extended regular expression \fIERE\fP in string \fIin\fP
+and return the number of substitutions. An ampersand ( \fB'&'\fP )
+appearing in the string \fIrepl\fP shall be replaced by
+the string from \fIin\fP that matches the ERE. An ampersand preceded
+with a backslash ( \fB'\\'\fP ) shall be interpreted as the
+literal ampersand character. An occurrence of two consecutive backslashes
+shall be interpreted as just a single literal backslash
+character. Any other occurrence of a backslash (for example, preceding
+any other character) shall be treated as a literal backslash
+character. Note that if \fIrepl\fP is a string literal (the lexical
+token \fBSTRING\fP; see Grammar ), the handling of the ampersand character
+occurs after any lexical processing, including any
+lexical backslash escape sequence processing. If \fIin\fP is specified
+and it is not an lvalue (see Expressions in awk ), the behavior is
+undefined. If \fIin\fP is omitted, \fIawk\fP shall use the current
+record ($0) in its place.
+.TP 7
+\fBsubstr\fP(\fIs\fP,\ \fIm\fP\fB[\fP,\ \fIn\ \fP \fB]\fP)
+Return the at most \fIn\fP-character substring of \fIs\fP that begins
+at position \fIm\fP, numbering from 1. If \fIn\fP is
+omitted, or if \fIn\fP specifies more characters than are left in
+the string, the length of the substring shall be limited by the
+length of the string \fIs\fP.
+.TP 7
+\fBtolower\fP(\fIs\fP)
+Return a string based on the string \fIs\fP. Each character in \fIs\fP
+that is an uppercase letter specified to have a
+\fBtolower\fP mapping by the \fILC_CTYPE\fP category of the current
+locale shall be replaced in the returned string by the
+lowercase letter specified by the mapping. Other characters in \fIs\fP
+shall be unchanged in the returned string.
+.TP 7
+\fBtoupper\fP(\fIs\fP)
+Return a string based on the string \fIs\fP. Each character in \fIs\fP
+that is a lowercase letter specified to have a
+\fBtoupper\fP mapping by the \fILC_CTYPE\fP category of the current
+locale is replaced in the returned string by the uppercase
+letter specified by the mapping. Other characters in \fIs\fP are unchanged
+in the returned string.
+.sp
+.LP
+All of the preceding functions that take \fIERE\fP as a parameter
+expect a pattern or a string valued expression that is a
+regular expression as defined in Regular Expressions .
+.SS Input/Output and General Functions
+.LP
+The input/output and general functions are:
+.TP 7
+\fBclose\fP(\fIexpression\fP)
+Close the file or pipe opened by a \fBprint\fP or \fBprintf\fP statement
+or a call to \fBgetline\fP with the same string-valued
+\fIexpression\fP. The limit on the number of open \fIexpression\fP
+arguments is implementation-defined. If the close was
+successful, the function shall return zero; otherwise, it shall return
+non-zero.
+.TP 7
+\fIexpression\ |\ \fP \fBgetline\ [\fP\fIvar\fP\fB]\fP
+Read a record of input from a stream piped from the output of a command.
+The stream shall be created if no stream is currently open
+with the value of \fIexpression\fP as its command name. The stream
+created shall be equivalent to one created by a call to the \fIpopen\fP()
+function with the value of \fIexpression\fP as the \fIcommand\fP argument
+and a
+value of \fIr\fP as the \fImode\fP argument. As long as the stream
+remains open, subsequent calls in which \fIexpression\fP
+evaluates to the same string value shall read subsequent records from
+the stream. The stream shall remain open until the
+\fBclose\fP function is called with an expression that evaluates to
+the same string value. At that time, the stream shall be
+closed as if by a call to the \fIpclose\fP() function. If \fIvar\fP
+is omitted, $0 and
+\fBNF\fP shall be set; otherwise, \fIvar\fP shall be set and, if appropriate,
+it shall be considered a numeric string (see Expressions in awk ).
+.LP
+The \fBgetline\fP operator can form ambiguous constructs when there
+are unparenthesized operators (including concatenate) to
+the left of the \fB'|'\fP (to the beginning of the expression containing
+\fBgetline\fP). In the context of the \fB'$'\fP
+operator, \fB'|'\fP shall behave as if it had a lower precedence than
+\fB'$'\fP . The result of evaluating other operators is
+unspecified, and conforming applications shall parenthesize properly
+all such usages.
+.TP 7
+\fBgetline\fP
+Set $0 to the next input record from the current input file. This
+form of \fBgetline\fP shall set the \fBNF\fP, \fBNR\fP,
+and \fBFNR\fP variables.
+.TP 7
+\fBgetline\ \fP \fIvar\fP
+Set variable \fIvar\fP to the next input record from the current input
+file and, if appropriate, \fIvar\fP shall be
+considered a numeric string (see Expressions in awk ). This form of
+\fBgetline\fP shall set the
+\fBFNR\fP and \fBNR\fP variables.
+.TP 7
+\fBgetline\ [\fP\fIvar\fP\fB]\ \fP <\ \fIexpression\fP
+Read the next record of input from a named file. The \fIexpression\fP
+shall be evaluated to produce a string that is used as a
+pathname. If the file of that name is not currently open, it shall
+be opened. As long as the stream remains open, subsequent calls
+in which \fIexpression\fP evaluates to the same string value shall
+read subsequent records from the file. The file shall remain
+open until the \fBclose\fP function is called with an expression that
+evaluates to the same string value. If \fIvar\fP is
+omitted, $0 and \fBNF\fP shall be set; otherwise, \fIvar\fP shall
+be set and, if appropriate, it shall be considered a numeric
+string (see Expressions in awk ).
+.LP
+The \fBgetline\fP operator can form ambiguous constructs when there
+are unparenthesized binary operators (including
+concatenate) to the right of the \fB'<'\fP (up to the end of the expression
+containing the \fBgetline\fP). The result of
+evaluating such a construct is unspecified, and conforming applications
+shall parenthesize properly all such usages.
+.TP 7
+\fBsystem\fP(\fIexpression\fP)
+Execute the command given by \fIexpression\fP in a manner equivalent
+to the \fIsystem\fP()
+function defined in the System Interfaces volume of IEEE\ Std\ 1003.1-2001
+and return the exit status of the command.
+.sp
+.LP
+All forms of \fBgetline\fP shall return 1 for successful input, zero
+for end-of-file, and -1 for an error.
+.LP
+Where strings are used as the name of a file or pipeline, the application
+shall ensure that the strings are textually identical.
+The terminology "same string value" implies that "equivalent strings",
+even those that differ only by <space>s, represent
+different files.
+.SS User-Defined Functions
+.LP
+The \fIawk\fP language also provides user-defined functions. Such
+functions can be defined as:
+.sp
+.RS
+.nf
+
+\fBfunction\fP \fIname\fP\fB(\fP\fB[\fP\fIparameter\fP\fB, ...\fP\fB]\fP\fB) {\fP \fIstatements\fP \fB}
+\fP
+.fi
+.RE
+.LP
+A function can be referred to anywhere in an \fIawk\fP program; in
+particular, its use can precede its definition. The scope of
+a function is global.
+.LP
+Function parameters, if present, can be either scalars or arrays;
+the behavior is undefined if an array name is passed as a
+parameter that the function uses as a scalar, or if a scalar expression
+is passed as a parameter that the function uses as an
+array. Function parameters shall be passed by value if scalar and
+by reference if array name.
+.LP
+The number of parameters in the function definition need not match
+the number of parameters in the function call. Excess formal
+parameters can be used as local variables. If fewer arguments are
+supplied in a function call than are in the function definition,
+the extra parameters that are used in the function body as scalars
+shall evaluate to the uninitialized value until they are
+otherwise initialized, and the extra parameters that are used in the
+function body as arrays shall be treated as uninitialized
+arrays where each element evaluates to the uninitialized value until
+otherwise initialized.
+.LP
+When invoking a function, no white space can be placed between the
+function name and the opening parenthesis. Function calls can
+be nested and recursive calls can be made upon functions. Upon return
+from any nested or recursive function call, the values of all
+of the calling function's parameters shall be unchanged, except for
+array parameters passed by reference. The \fBreturn\fP
+statement can be used to return a value. If a \fBreturn\fP statement
+appears outside of a function definition, the behavior is
+undefined.
+.LP
+In the function definition, <newline>s shall be optional before the
+opening brace and after the closing brace. Function
+definitions can appear anywhere in the program where a \fIpattern-action\fP
+pair is allowed.
+.SS Grammar
+.LP
+The grammar in this section and the lexical conventions in the following
+section shall together describe the syntax for
+\fIawk\fP programs. The general conventions for this style of grammar
+are described in \fIGrammar Conventions\fP . A valid program can be
+represented as the non-terminal symbol
+\fIprogram\fP in the grammar. This formal syntax shall take precedence
+over the preceding text syntax description.
+.sp
+.RS
+.nf
+
+\fB%token NAME NUMBER STRING ERE
+%token FUNC_NAME /* Name followed by '(' without white space. */
+.sp
+
+/* Keywords */
+%token Begin End
+/* 'BEGIN' 'END' */
+.sp
+
+%token Break Continue Delete Do Else
+/* 'break' 'continue' 'delete' 'do' 'else' */
+.sp
+
+%token Exit For Function If In
+/* 'exit' 'for' 'function' 'if' 'in' */
+.sp
+
+%token Next Print Printf Return While
+/* 'next' 'print' 'printf' 'return' 'while' */
+.sp
+
+/* Reserved function names */
+%token BUILTIN_FUNC_NAME
+ /* One token for the following:
+ * atan2 cos sin exp log sqrt int rand srand
+ * gsub index length match split sprintf sub
+ * substr tolower toupper close system
+ */
+%token GETLINE
+ /* Syntactically different from other built-ins. */
+.sp
+
+/* Two-character tokens. */
+%token ADD_ASSIGN SUB_ASSIGN MUL_ASSIGN DIV_ASSIGN MOD_ASSIGN POW_ASSIGN
+/* '+=' '-=' '*=' '/=' '%=' '^=' */
+.sp
+
+%token OR AND NO_MATCH EQ LE GE NE INCR DECR APPEND
+/* '||' '&&' '!~' '==' '<=' '>=' '!=' '++' '--' '>>' */
+.sp
+
+/* One-character tokens. */
+%token '{' '}' '(' ')' '[' ']' ',' ';' NEWLINE
+%token '+' '-' '*' '%' '^' '!' '>' '<' '|' '?' ':' '~' '$' '='
+.sp
+
+%start program
+%%
+.sp
+
+program : item_list
+ | actionless_item_list
+ ;
+.sp
+
+item_list : newline_opt
+ | actionless_item_list item terminator
+ | item_list item terminator
+ | item_list action terminator
+ ;
+.sp
+
+actionless_item_list : item_list pattern terminator
+ | actionless_item_list pattern terminator
+ ;
+.sp
+
+item : pattern action
+ | Function NAME '(' param_list_opt ')'
+ newline_opt action
+ | Function FUNC_NAME '(' param_list_opt ')'
+ newline_opt action
+ ;
+.sp
+
+param_list_opt : /* empty */
+ | param_list
+ ;
+.sp
+
+param_list : NAME
+ | param_list ',' NAME
+ ;
+.sp
+
+pattern : Begin
+ | End
+ | expr
+ | expr ',' newline_opt expr
+ ;
+.sp
+
+action : '{' newline_opt '}'
+ | '{' newline_opt terminated_statement_list '}'
+ | '{' newline_opt unterminated_statement_list '}'
+ ;
+.sp
+
+terminator : terminator ';'
+ | terminator NEWLINE
+ | ';'
+ | NEWLINE
+ ;
+.sp
+
+terminated_statement_list : terminated_statement
+ | terminated_statement_list terminated_statement
+ ;
+.sp
+
+unterminated_statement_list : unterminated_statement
+ | terminated_statement_list unterminated_statement
+ ;
+.sp
+
+terminated_statement : action newline_opt
+ | If '(' expr ')' newline_opt terminated_statement
+ | If '(' expr ')' newline_opt terminated_statement
+ Else newline_opt terminated_statement
+ | While '(' expr ')' newline_opt terminated_statement
+ | For '(' simple_statement_opt ';'
+ expr_opt ';' simple_statement_opt ')' newline_opt
+ terminated_statement
+ | For '(' NAME In NAME ')' newline_opt
+ terminated_statement
+ | ';' newline_opt
+ | terminatable_statement NEWLINE newline_opt
+ | terminatable_statement ';' newline_opt
+ ;
+.sp
+
+unterminated_statement : terminatable_statement
+ | If '(' expr ')' newline_opt unterminated_statement
+ | If '(' expr ')' newline_opt terminated_statement
+ Else newline_opt unterminated_statement
+ | While '(' expr ')' newline_opt unterminated_statement
+ | For '(' simple_statement_opt ';'
+ expr_opt ';' simple_statement_opt ')' newline_opt
+ unterminated_statement
+ | For '(' NAME In NAME ')' newline_opt
+ unterminated_statement
+ ;
+.sp
+
+terminatable_statement : simple_statement
+ | Break
+ | Continue
+ | Next
+ | Exit expr_opt
+ | Return expr_opt
+ | Do newline_opt terminated_statement While '(' expr ')'
+ ;
+.sp
+
+simple_statement_opt : /* empty */
+ | simple_statement
+ ;
+.sp
+
+simple_statement : Delete NAME '[' expr_list ']'
+ | expr
+ | print_statement
+ ;
+.sp
+
+print_statement : simple_print_statement
+ | simple_print_statement output_redirection
+ ;
+.sp
+
+simple_print_statement : Print print_expr_list_opt
+ | Print '(' multiple_expr_list ')'
+ | Printf print_expr_list
+ | Printf '(' multiple_expr_list ')'
+ ;
+.sp
+
+output_redirection : '>' expr
+ | APPEND expr
+ | '|' expr
+ ;
+.sp
+
+expr_list_opt : /* empty */
+ | expr_list
+ ;
+.sp
+
+expr_list : expr
+ | multiple_expr_list
+ ;
+.sp
+
+multiple_expr_list : expr ',' newline_opt expr
+ | multiple_expr_list ',' newline_opt expr
+ ;
+.sp
+
+expr_opt : /* empty */
+ | expr
+ ;
+.sp
+
+expr : unary_expr
+ | non_unary_expr
+ ;
+.sp
+
+unary_expr : '+' expr
+ | '-' expr
+ | unary_expr '^' expr
+ | unary_expr '*' expr
+ | unary_expr '/' expr
+ | unary_expr '%' expr
+ | unary_expr '+' expr
+ | unary_expr '-' expr
+ | unary_expr non_unary_expr
+ | unary_expr '<' expr
+ | unary_expr LE expr
+ | unary_expr NE expr
+ | unary_expr EQ expr
+ | unary_expr '>' expr
+ | unary_expr GE expr
+ | unary_expr '~' expr
+ | unary_expr NO_MATCH expr
+ | unary_expr In NAME
+ | unary_expr AND newline_opt expr
+ | unary_expr OR newline_opt expr
+ | unary_expr '?' expr ':' expr
+ | unary_input_function
+ ;
+.sp
+
+non_unary_expr : '(' expr ')'
+ | '!' expr
+ | non_unary_expr '^' expr
+ | non_unary_expr '*' expr
+ | non_unary_expr '/' expr
+ | non_unary_expr '%' expr
+ | non_unary_expr '+' expr
+ | non_unary_expr '-' expr
+ | non_unary_expr non_unary_expr
+ | non_unary_expr '<' expr
+ | non_unary_expr LE expr
+ | non_unary_expr NE expr
+ | non_unary_expr EQ expr
+ | non_unary_expr '>' expr
+ | non_unary_expr GE expr
+ | non_unary_expr '~' expr
+ | non_unary_expr NO_MATCH expr
+ | non_unary_expr In NAME
+ | '(' multiple_expr_list ')' In NAME
+ | non_unary_expr AND newline_opt expr
+ | non_unary_expr OR newline_opt expr
+ | non_unary_expr '?' expr ':' expr
+ | NUMBER
+ | STRING
+ | lvalue
+ | ERE
+ | lvalue INCR
+ | lvalue DECR
+ | INCR lvalue
+ | DECR lvalue
+ | lvalue POW_ASSIGN expr
+ | lvalue MOD_ASSIGN expr
+ | lvalue MUL_ASSIGN expr
+ | lvalue DIV_ASSIGN expr
+ | lvalue ADD_ASSIGN expr
+ | lvalue SUB_ASSIGN expr
+ | lvalue '=' expr
+ | FUNC_NAME '(' expr_list_opt ')'
+ /* no white space allowed before '(' */
+ | BUILTIN_FUNC_NAME '(' expr_list_opt ')'
+ | BUILTIN_FUNC_NAME
+ | non_unary_input_function
+ ;
+.sp
+
+print_expr_list_opt : /* empty */
+ | print_expr_list
+ ;
+.sp
+
+print_expr_list : print_expr
+ | print_expr_list ',' newline_opt print_expr
+ ;
+.sp
+
+print_expr : unary_print_expr
+ | non_unary_print_expr
+ ;
+.sp
+
+unary_print_expr : '+' print_expr
+ | '-' print_expr
+ | unary_print_expr '^' print_expr
+ | unary_print_expr '*' print_expr
+ | unary_print_expr '/' print_expr
+ | unary_print_expr '%' print_expr
+ | unary_print_expr '+' print_expr
+ | unary_print_expr '-' print_expr
+ | unary_print_expr non_unary_print_expr
+ | unary_print_expr '~' print_expr
+ | unary_print_expr NO_MATCH print_expr
+ | unary_print_expr In NAME
+ | unary_print_expr AND newline_opt print_expr
+ | unary_print_expr OR newline_opt print_expr
+ | unary_print_expr '?' print_expr ':' print_expr
+ ;
+.sp
+
+non_unary_print_expr : '(' expr ')'
+ | '!' print_expr
+ | non_unary_print_expr '^' print_expr
+ | non_unary_print_expr '*' print_expr
+ | non_unary_print_expr '/' print_expr
+ | non_unary_print_expr '%' print_expr
+ | non_unary_print_expr '+' print_expr
+ | non_unary_print_expr '-' print_expr
+ | non_unary_print_expr non_unary_print_expr
+ | non_unary_print_expr '~' print_expr
+ | non_unary_print_expr NO_MATCH print_expr
+ | non_unary_print_expr In NAME
+ | '(' multiple_expr_list ')' In NAME
+ | non_unary_print_expr AND newline_opt print_expr
+ | non_unary_print_expr OR newline_opt print_expr
+ | non_unary_print_expr '?' print_expr ':' print_expr
+ | NUMBER
+ | STRING
+ | lvalue
+ | ERE
+ | lvalue INCR
+ | lvalue DECR
+ | INCR lvalue
+ | DECR lvalue
+ | lvalue POW_ASSIGN print_expr
+ | lvalue MOD_ASSIGN print_expr
+ | lvalue MUL_ASSIGN print_expr
+ | lvalue DIV_ASSIGN print_expr
+ | lvalue ADD_ASSIGN print_expr
+ | lvalue SUB_ASSIGN print_expr
+ | lvalue '=' print_expr
+ | FUNC_NAME '(' expr_list_opt ')'
+ /* no white space allowed before '(' */
+ | BUILTIN_FUNC_NAME '(' expr_list_opt ')'
+ | BUILTIN_FUNC_NAME
+ ;
+.sp
+
+lvalue : NAME
+ | NAME '[' expr_list ']'
+ | '$' expr
+ ;
+.sp
+
+non_unary_input_function : simple_get
+ | simple_get '<' expr
+ | non_unary_expr '|' simple_get
+ ;
+.sp
+
+unary_input_function : unary_expr '|' simple_get
+ ;
+.sp
+
+simple_get : GETLINE
+ | GETLINE lvalue
+ ;
+.sp
+
+newline_opt : /* empty */
+ | newline_opt NEWLINE
+ ;
+\fP
+.fi
+.RE
+.LP
+This grammar has several ambiguities that shall be resolved as follows:
+.IP " *" 3
+Operator precedence and associativity shall be as described in Expressions
+in Decreasing Precedence in \fIawk\fP .
+.LP
+.IP " *" 3
+In case of ambiguity, an \fBelse\fP shall be associated with the most
+immediately preceding \fBif\fP that would satisfy the
+grammar.
+.LP
+.IP " *" 3
+In some contexts, a slash ( \fB'/'\fP ) that is used to surround an
+ERE could also be the division operator. This shall be
+resolved in such a way that wherever the division operator could appear,
+a slash is assumed to be the division operator. (There is
+no unary division operator.)
+.LP
+.LP
+One convention that might not be obvious from the formal grammar is
+where <newline>s are acceptable. There are several
+obvious placements such as terminating a statement, and a backslash
+can be used to escape <newline>s between any lexical
+tokens. In addition, <newline>s without backslashes can follow a comma,
+an open brace, logical AND operator (
+\fB"&&"\fP ), logical OR operator ( \fB"||"\fP ), the \fBdo\fP keyword,
+the \fBelse\fP keyword, and the closing
+parenthesis of an \fBif\fP, \fBfor\fP, or \fBwhile\fP statement. For
+example:
+.sp
+.RS
+.nf
+
+\fB{ print $1,
+ $2 }
+\fP
+.fi
+.RE
+.SS Lexical Conventions
+.LP
+The lexical conventions for \fIawk\fP programs, with respect to the
+preceding grammar, shall be as follows:
+.IP " 1." 4
+Except as noted, \fIawk\fP shall recognize the longest possible token
+or delimiter beginning at a given point.
+.LP
+.IP " 2." 4
+A comment shall consist of any characters beginning with the number
+sign character and terminated by, but excluding the next
+occurrence of, a <newline>. Comments shall have no effect, except
+to delimit lexical tokens.
+.LP
+.IP " 3." 4
+The <newline> shall be recognized as the token \fBNEWLINE\fP.
+.LP
+.IP " 4." 4
+A backslash character immediately followed by a <newline> shall have
+no effect.
+.LP
+.IP " 5." 4
+The token \fBSTRING\fP shall represent a string constant. A string
+constant shall begin with the character \fB' .'\fP Within
+a string constant, a backslash character shall be considered to begin
+an escape sequence as specified in the table in the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 5, File Format
+Notation (
+\fB'\\\\'\fP, \fB'\\a'\fP, \fB'\\b'\fP, \fB'\\f'\fP, \fB'\\n'\fP,
+\fB'\\r'\fP, \fB'\\t'\fP, \fB'\\v'\fP ). In
+addition, the escape sequences in Expressions in Decreasing Precedence
+in \fIawk\fP shall be recognized. A <newline> shall not
+occur within a string constant. A string constant shall be terminated
+by the first unescaped occurrence of the character
+\fB''\fP after the one that begins the string constant. The value
+of the string shall be the sequence of all unescaped
+characters and values of escape sequences between, but not including,
+the two delimiting \fB''\fP characters.
+.LP
+.IP " 6." 4
+The token \fBERE\fP represents an extended regular expression constant.
+An ERE constant shall begin with the slash character.
+Within an ERE constant, a backslash character shall be considered
+to begin an escape sequence as specified in the table in the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 5, File Format
+Notation. In
+addition, the escape sequences in Expressions in Decreasing Precedence
+in \fIawk\fP shall be recognized. The application shall
+ensure that a <newline> does not occur within an ERE constant. An
+ERE constant shall be terminated by the first unescaped
+occurrence of the slash character after the one that begins the ERE
+constant. The extended regular expression represented by the
+ERE constant shall be the sequence of all unescaped characters and
+values of escape sequences between, but not including, the two
+delimiting slash characters.
+.LP
+.IP " 7." 4
+A <blank> shall have no effect, except to delimit lexical tokens or
+within \fBSTRING\fP or \fBERE\fP tokens.
+.LP
+.IP " 8." 4
+The token \fBNUMBER\fP shall represent a numeric constant. Its form
+and numeric value shall be equivalent to either of the
+tokens \fBfloating-constant\fP or \fBinteger-constant\fP as specified
+by the ISO\ C standard, with the following
+exceptions:
+.RS
+.IP " a." 4
+An integer constant cannot begin with 0x or include the hexadecimal
+digits \fB'a'\fP, \fB'b'\fP, \fB'c'\fP,
+\fB'd'\fP, \fB'e'\fP, \fB'f'\fP, \fB'A'\fP, \fB'B'\fP, \fB'C'\fP,
+\fB'D'\fP, \fB'E'\fP, or
+\fB'F'\fP .
+.LP
+.IP " b." 4
+The value of an integer constant beginning with 0 shall be taken in
+decimal rather than octal.
+.LP
+.IP " c." 4
+An integer constant cannot include a suffix ( \fB'u'\fP, \fB'U'\fP,
+\fB'l'\fP, or \fB'L'\fP ).
+.LP
+.IP " d." 4
+A floating constant cannot include a suffix ( \fB'f'\fP, \fB'F'\fP,
+\fB'l'\fP, or \fB'L'\fP ).
+.LP
+.RE
+.LP
+If the value is too large or too small to be representable (see \fIConcepts
+Derived from
+the ISO C Standard\fP ), the behavior is undefined.
+.LP
+.IP " 9." 4
+A sequence of underscores, digits, and alphabetics from the portable
+character set (see the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 6.1, Portable Character Set), beginning
+with an underscore or alphabetic, shall be considered a word.
+.LP
+.IP "10." 4
+The following words are keywords that shall be recognized as individual
+tokens; the name of the token is the same as the
+keyword:
+.TS C
+center; lw(13) lw(13) lw(13) lw(13) lw(13) lw(13).
+T{
+\fB
+.br
+BEGIN
+.br
+break
+.br
+continue
+.br
+\fP
+T} T{
+\fB
+.br
+delete
+.br
+do
+.br
+else
+.br
+\fP
+T} T{
+\fB
+.br
+END
+.br
+exit
+.br
+for
+.br
+\fP
+T} T{
+\fB
+.br
+function
+.br
+getline
+.br
+if
+.br
+\fP
+T} T{
+\fB
+.br
+in
+.br
+next
+.br
+print
+.br
+\fP
+T} T{
+\fB
+.br
+printf
+.br
+return
+.br
+while
+.br
+\fP
+T}
+.TE
+.LP
+.IP "11." 4
+The following words are names of built-in functions and shall be recognized
+as the token \fBBUILTIN_FUNC_NAME\fP:
+.TS C
+center; lw(13) lw(13) lw(13) lw(13) lw(13) lw(13).
+T{
+\fB
+.br
+atan2
+.br
+close
+.br
+cos
+.br
+exp
+.br
+\fP
+T} T{
+\fB
+.br
+gsub
+.br
+index
+.br
+int
+.br
+length
+.br
+\fP
+T} T{
+\fB
+.br
+log
+.br
+match
+.br
+rand
+.br
+sin
+.br
+\fP
+T} T{
+\fB
+.br
+split
+.br
+sprintf
+.br
+sqrt
+.br
+srand
+.br
+\fP
+T} T{
+\fB
+.br
+sub
+.br
+substr
+.br
+system
+.br
+tolower
+.br
+\fP
+T} T{
+\fB
+.br
+toupper
+.br
+\fP
+T}
+.TE
+.LP
+The above-listed keywords and names of built-in functions are considered
+reserved words.
+.LP
+.IP "12." 4
+The token \fBNAME\fP shall consist of a word that is not a keyword
+or a name of a built-in function and is not followed
+immediately (without any delimiters) by the \fB'('\fP character.
+.LP
+.IP "13." 4
+The token \fBFUNC_NAME\fP shall consist of a word that is not a keyword
+or a name of a built-in function, followed immediately
+(without any delimiters) by the \fB'('\fP character. The \fB'('\fP
+character shall not be included as part of the token.
+.LP
+.IP "14." 4
+The following two-character sequences shall be recognized as the named
+tokens:
+.TS C
+center; l l l l.
+\fBToken Name\fP \fBSequence\fP \fBToken Name\fP \fBSequence\fP
+\fBADD_ASSIGN\fP += \fBNO_MATCH\fP !~
+\fBSUB_ASSIGN\fP -= \fBEQ\fP ==
+\fBMUL_ASSIGN\fP *= \fBLE\fP <=
+\fBDIV_ASSIGN\fP /= \fBGE\fP >=
+\fBMOD_ASSIGN\fP %= \fBNE\fP !=
+\fBPOW_ASSIGN\fP ^= \fBINCR\fP ++
+\fBOR\fP || \fBDECR\fP --
+\fBAND\fP && \fBAPPEND\fP >>
+.TE
+.LP
+.IP "15." 4
+The following single characters shall be recognized as tokens whose
+names are the character:
+.sp
+.RS
+.nf
+
+\fB<newline> { } ( ) [ ] , ; + - * % ^ ! > < | ? : ~ $ =
+\fP
+.fi
+.RE
+.LP
+.LP
+There is a lexical ambiguity between the token \fBERE\fP and the tokens
+\fB'/'\fP and \fBDIV_ASSIGN\fP. When an input
+sequence begins with a slash character in any syntactic context where
+the token \fB'/'\fP or \fBDIV_ASSIGN\fP could appear as
+the next token in a valid program, the longer of those two tokens
+that can be recognized shall be recognized. In any other
+syntactic context where the token \fBERE\fP could appear as the next
+token in a valid program, the token \fBERE\fP shall be
+recognized.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+All input files were processed successfully.
+.TP 7
+>0
+An error occurred.
+.sp
+.LP
+The exit status can be altered within the program by using an \fBexit\fP
+expression.
+.SH CONSEQUENCES OF ERRORS
+.LP
+If any \fIfile\fP operand is specified and the named file cannot be
+accessed, \fIawk\fP shall write a diagnostic message to
+standard error and terminate without any further action.
+.LP
+If the program specified by either the \fIprogram\fP operand or a
+\fIprogfile\fP operand is not a valid \fIawk\fP program (as
+specified in the EXTENDED DESCRIPTION section), the behavior is undefined.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The \fBindex\fP, \fBlength\fP, \fBmatch\fP, and \fBsubstr\fP functions
+should not be confused with similar functions in the
+ISO\ C standard; the \fIawk\fP versions deal with characters, while
+the ISO\ C standard deals with bytes.
+.LP
+Because the concatenation operation is represented by adjacent expressions
+rather than an explicit operator, it is often
+necessary to use parentheses to enforce the proper evaluation precedence.
+.SH EXAMPLES
+.LP
+The \fIawk\fP program specified in the command line is most easily
+specified within single-quotes (for example,
+'\fIprogram\fP') for applications using \fIsh\fP, because \fIawk\fP
+programs commonly contain
+characters that are special to the shell, including double-quotes.
+In the cases where an \fIawk\fP program contains single-quote
+characters, it is usually easiest to specify most of the program as
+strings within single-quotes concatenated by the shell with
+quoted single-quote characters. For example:
+.sp
+.RS
+.nf
+
+\fBawk '/'\\''/ { print "quote:", $0 }'
+\fP
+.fi
+.RE
+.LP
+prints all lines from the standard input containing a single-quote
+character, prefixed with \fIquote\fP:.
+.LP
+The following are examples of simple \fIawk\fP programs:
+.IP " 1." 4
+Write to the standard output all input lines for which field 3 is
+greater than 5:
+.sp
+.RS
+.nf
+
+\fB$3 > 5
+\fP
+.fi
+.RE
+.LP
+.IP " 2." 4
+Write every tenth line:
+.sp
+.RS
+.nf
+
+\fB(NR % 10) == 0
+\fP
+.fi
+.RE
+.LP
+.IP " 3." 4
+Write any line with a substring matching the regular expression:
+.sp
+.RS
+.nf
+
+\fB/(G|D)(2[0-9][[:alpha:]]*)/
+\fP
+.fi
+.RE
+.LP
+.IP " 4." 4
+Print any line with a substring containing a \fB'G'\fP or \fB'D'\fP,
+followed by a sequence of digits and characters.
+This example uses character classes \fBdigit\fP and \fBalpha\fP to
+match language-independent digit and alphabetic characters
+respectively:
+.sp
+.RS
+.nf
+
+\fB/(G|D)([[:digit:][:alpha:]]*)/
+\fP
+.fi
+.RE
+.LP
+.IP " 5." 4
+Write any line in which the second field matches the regular expression
+and the fourth field does not:
+.sp
+.RS
+.nf
+
+\fB$2 ~ /xyz/ && $4 !~ /xyz/
+\fP
+.fi
+.RE
+.LP
+.IP " 6." 4
+Write any line in which the second field contains a backslash:
+.sp
+.RS
+.nf
+
+\fB$2 ~ /\\\\/
+\fP
+.fi
+.RE
+.LP
+.IP " 7." 4
+Write any line in which the second field contains a backslash. Note
+that backslash escapes are interpreted twice; once in
+lexical processing of the string and once in processing the regular
+expression:
+.sp
+.RS
+.nf
+
+\fB$2 ~ "\\\\\\\\"
+\fP
+.fi
+.RE
+.LP
+.IP " 8." 4
+Write the second to the last and the last field in each line. Separate
+the fields by a colon:
+.sp
+.RS
+.nf
+
+\fB{OFS=":";print $(NF-1), $NF}
+\fP
+.fi
+.RE
+.LP
+.IP " 9." 4
+Write the line number and number of fields in each line. The three
+strings representing the line number, the colon, and the
+number of fields are concatenated and that string is written to standard
+output:
+.sp
+.RS
+.nf
+
+\fB{print NR ":" NF}
+\fP
+.fi
+.RE
+.LP
+.IP "10." 4
+Write lines longer than 72 characters:
+.sp
+.RS
+.nf
+
+\fBlength($0) > 72
+\fP
+.fi
+.RE
+.LP
+.IP "11." 4
+Write the first two fields in opposite order separated by \fBOFS\fP:
+.sp
+.RS
+.nf
+
+\fB{ print $2, $1 }
+\fP
+.fi
+.RE
+.LP
+.IP "12." 4
+Same, with input fields separated by a comma or <space>s and <tab>s,
+or both:
+.sp
+.RS
+.nf
+
+\fBBEGIN { FS = ",[ \\t]*|[ \\t]+" }
+ { print $2, $1 }
+\fP
+.fi
+.RE
+.LP
+.IP "13." 4
+Add up the first column, print sum, and average:
+.sp
+.RS
+.nf
+
+\fB {s += $1 }
+END {print "sum is ", s, " average is", s/NR}
+\fP
+.fi
+.RE
+.LP
+.IP "14." 4
+Write fields in reverse order, one per line (many lines out for each
+line in):
+.sp
+.RS
+.nf
+
+\fB{ for (i = NF; i > 0; --i) print $i }
+\fP
+.fi
+.RE
+.LP
+.IP "15." 4
+Write all lines between occurrences of the strings \fBstart\fP and
+\fBstop\fP:
+.sp
+.RS
+.nf
+
+\fB/start/, /stop/
+\fP
+.fi
+.RE
+.LP
+.IP "16." 4
+Write all lines whose first field is different from the previous one:
+.sp
+.RS
+.nf
+
+\fB$1 != prev { print; prev = $1 }
+\fP
+.fi
+.RE
+.LP
+.IP "17." 4
+Simulate \fIecho\fP:
+.sp
+.RS
+.nf
+
+\fBBEGIN {
+ for (i = 1; i < ARGC; ++i)
+ printf("%s%s", ARGV[i], i==ARGC-1?"\\n":" ")
+}
+\fP
+.fi
+.RE
+.LP
+.IP "18." 4
+Write the path prefixes contained in the \fIPATH\fP environment variable,
+one per line:
+.sp
+.RS
+.nf
+
+\fBBEGIN {
+ n = split (ENVIRON["PATH"], path, ":")
+ for (i = 1; i <= n; ++i)
+ print path[i]
+}
+\fP
+.fi
+.RE
+.LP
+.IP "19." 4
+If there is a file named \fBinput\fP containing page headers of the
+form:
+.sp
+.RS
+.nf
+
+Page #
+.fi
+.RE
+.LP
+and a file named \fBprogram\fP that contains:
+.sp
+.RS
+.nf
+
+\fB/Page/ { $2 = n++; }
+ { print }
+\fP
+.fi
+.RE
+.LP
+then the command line:
+.sp
+.RS
+.nf
+
+\fBawk -f program n=5 input
+\fP
+.fi
+.RE
+.LP
+prints the file \fBinput\fP, filling in page numbers starting at 5.
+.LP
+.SH RATIONALE
+.LP
+This description is based on the new \fIawk\fP, "nawk", (see the referenced
+\fIThe AWK Programming Language\fP), which
+introduced a number of new features to the historical \fIawk\fP:
+.IP " 1." 4
+New keywords: \fBdelete\fP, \fBdo\fP, \fBfunction\fP, \fBreturn\fP
+.LP
+.IP " 2." 4
+New built-in functions: \fBatan2\fP, \fBclose\fP, \fBcos\fP, \fBgsub\fP,
+\fBmatch\fP, \fBrand\fP, \fBsin\fP,
+\fBsrand\fP, \fBsub\fP, \fBsystem\fP
+.LP
+.IP " 3." 4
+New predefined variables: \fBFNR\fP, \fBARGC\fP, \fBARGV\fP, \fBRSTART\fP,
+\fBRLENGTH\fP, \fBSUBSEP\fP
+.LP
+.IP " 4." 4
+New expression operators: \fB?\fP, \fB:\fP, \fB,\fP, \fB^\fP
+.LP
+.IP " 5." 4
+The \fBFS\fP variable and the third argument to \fBsplit\fP, now treated
+as extended regular expressions.
+.LP
+.IP " 6." 4
+The operator precedence, changed to more closely match the C language.
+Two examples of code that operate differently are:
+.sp
+.RS
+.nf
+
+\fBwhile ( n /= 10 > 1) ...
+if (!"wk" ~ /bwk/) ...
+\fP
+.fi
+.RE
+.LP
+.LP
+Several features have been added based on newer implementations of
+\fIawk\fP:
+.IP " *" 3
+Multiple instances of \fB-f\fP \fIprogfile\fP are permitted.
+.LP
+.IP " *" 3
+The new option \fB-v\fP \fIassignment.\fP
+.LP
+.IP " *" 3
+The new predefined variable \fBENVIRON\fP.
+.LP
+.IP " *" 3
+New built-in functions \fBtoupper\fP and \fBtolower\fP.
+.LP
+.IP " *" 3
+More formatting capabilities are added to \fBprintf\fP to match the
+ISO\ C standard.
+.LP
+.LP
+The overall \fIawk\fP syntax has always been based on the C language,
+with a few features from the shell command language and
+other sources. Because of this, it is not completely compatible with
+any other language, which has caused confusion for some users.
+It is not the intent of the standard developers to address such issues.
+A few relatively minor changes toward making the language
+more compatible with the ISO\ C standard were made; most of these
+changes are based on similar changes in recent
+implementations, as described above. There remain several C-language
+conventions that are not in \fIawk\fP. One of the notable
+ones is the comma operator, which is commonly used to specify multiple
+expressions in the C language \fBfor\fP statement. Also,
+there are various places where \fIawk\fP is more restrictive than
+the C language regarding the type of expression that can be used
+in a given context. These limitations are due to the different features
+that the \fIawk\fP language does provide.
+.LP
+Regular expressions in \fIawk\fP have been extended somewhat from
+historical implementations to make them a pure superset of
+extended regular expressions, as defined by IEEE\ Std\ 1003.1-2001
+(see the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 9.4, Extended Regular Expressions).
+The
+main extensions are internationalization features and interval expressions.
+Historical implementations of \fIawk\fP have long
+supported backslash escape sequences as an extension to extended regular
+expressions, and this extension has been retained despite
+inconsistency with other utilities. The number of escape sequences
+recognized in both extended regular expressions and strings has
+varied (generally increasing with time) among implementations. The
+set specified by IEEE\ Std\ 1003.1-2001 includes most
+sequences known to be supported by popular implementations and by
+the ISO\ C standard. One sequence that is not supported is
+hexadecimal value escapes beginning with \fB'\\x'\fP . This would
+allow values expressed in more than 9 bits to be used within
+\fIawk\fP as in the ISO\ C standard. However, because this syntax
+has a non-deterministic length, it does not permit the
+subsequent character to be a hexadecimal digit. This limitation can
+be dealt with in the C language by the use of lexical string
+concatenation. In the \fIawk\fP language, concatenation could also
+be a solution for strings, but not for extended regular
+expressions (either lexical ERE tokens or strings used dynamically
+as regular expressions). Because of this limitation, the feature
+has not been added to IEEE\ Std\ 1003.1-2001.
+.LP
+When a string variable is used in a context where an extended regular
+expression normally appears (where the lexical token ERE
+is used in the grammar) the string does not contain the literal slashes.
+.LP
+Some versions of \fIawk\fP allow the form:
+.sp
+.RS
+.nf
+
+\fBfunc name(args, ... ) { statements }
+\fP
+.fi
+.RE
+.LP
+This has been deprecated by the authors of the language, who asked
+that it not be specified.
+.LP
+Historical implementations of \fIawk\fP produce an error if a \fBnext\fP
+statement is executed in a \fBBEGIN\fP action, and
+cause \fIawk\fP to terminate if a \fBnext\fP statement is executed
+in an \fBEND\fP action. This behavior has not been
+documented, and it was not believed that it was necessary to standardize
+it.
+.LP
+The specification of conversions between string and numeric values
+is much more detailed than in the documentation of historical
+implementations or in the referenced \fIThe AWK Programming Language\fP.
+Although most of the behavior is designed to be
+intuitive, the details are necessary to ensure compatible behavior
+from different implementations. This is especially important in
+relational expressions since the types of the operands determine whether
+a string or numeric comparison is performed. From the
+perspective of an application writer, it is usually sufficient to
+expect intuitive behavior and to force conversions (by adding
+zero or concatenating a null string) when the type of an expression
+does not obviously match what is needed. The intent has been to
+specify historical practice in almost all cases. The one exception
+is that, in historical implementations, variables and constants
+maintain both string and numeric values after their original value
+is converted by any use. This means that referencing a variable
+or constant can have unexpected side effects. For example, with historical
+implementations the following program:
+.sp
+.RS
+.nf
+
+\fB{
+ a = "+2"
+ b = 2
+ if (NR % 2)
+ c = a + b
+ if (a == b)
+ print "numeric comparison"
+ else
+ print "string comparison"
+}
+\fP
+.fi
+.RE
+.LP
+would perform a numeric comparison (and output numeric comparison)
+for each odd-numbered line, but perform a string comparison
+(and output string comparison) for each even-numbered line. IEEE\ Std\ 1003.1-2001
+ensures that comparisons will be numeric
+if necessary. With historical implementations, the following program:
+.sp
+.RS
+.nf
+
+\fBBEGIN {
+ OFMT = "%e"
+ print 3.14
+ OFMT = "%f"
+ print 3.14
+}
+\fP
+.fi
+.RE
+.LP
+would output \fB"3.140000e+00"\fP twice, because in the second \fBprint\fP
+statement the constant \fB"3.14"\fP would have
+a string value from the previous conversion. IEEE\ Std\ 1003.1-2001
+requires that the output of the second \fBprint\fP
+statement be \fB"3.140000"\fP . The behavior of historical implementations
+was seen as too unintuitive and unpredictable.
+.LP
+It was pointed out that with the rules contained in early drafts,
+the following script would print nothing:
+.sp
+.RS
+.nf
+
+\fBBEGIN {
+ y[1.5] = 1
+ OFMT = "%e"
+ print y[1.5]
+}
+\fP
+.fi
+.RE
+.LP
+Therefore, a new variable, \fBCONVFMT\fP, was introduced. The \fBOFMT\fP
+variable is now restricted to affecting output
+conversions of numbers to strings and \fBCONVFMT\fP is used for internal
+conversions, such as comparisons or array indexing. The
+default value is the same as that for \fBOFMT\fP, so unless a program
+changes \fBCONVFMT\fP (which no historical program would
+do), it will receive the historical behavior associated with internal
+string conversions.
+.LP
+The POSIX \fIawk\fP lexical and syntactic conventions are specified
+more formally than in other sources. Again the intent has
+been to specify historical practice. One convention that may not be
+obvious from the formal grammar as in other verbal descriptions
+is where <newline>s are acceptable. There are several obvious placements
+such as terminating a statement, and a backslash can
+be used to escape <newline>s between any lexical tokens. In addition,
+<newline>s without backslashes can follow a
+comma, an open brace, a logical AND operator ( \fB"&&"\fP ), a logical
+OR operator ( \fB"||"\fP ), the \fBdo\fP
+keyword, the \fBelse\fP keyword, and the closing parenthesis of an
+\fBif\fP, \fBfor\fP, or \fBwhile\fP statement. For
+example:
+.sp
+.RS
+.nf
+
+\fB{ print $1,
+ $2 }
+\fP
+.fi
+.RE
+.LP
+The requirement that \fIawk\fP add a trailing <newline> to the program
+argument text is to simplify the grammar, making
+it match a text file in form. There is no way for an application or
+test suite to determine whether a literal <newline> is
+added or whether \fIawk\fP simply acts as if it did.
+.LP
+IEEE\ Std\ 1003.1-2001 requires several changes from historical implementations
+in order to support
+internationalization. Probably the most subtle of these is the use
+of the decimal-point character, defined by the \fILC_NUMERIC\fP
+category of the locale, in representations of floating-point numbers.
+This locale-specific character is used in recognizing numeric
+input, in converting between strings and numeric values, and in formatting
+output. However, regardless of locale, the period
+character (the decimal-point character of the POSIX locale) is the
+decimal-point character recognized in processing \fIawk\fP
+programs (including assignments in command line arguments). This is
+essentially the same convention as the one used in the
+ISO\ C standard. The difference is that the C language includes the
+\fIsetlocale\fP() function, which permits an application to modify
+its locale. Because of this
+capability, a C application begins executing with its locale set to
+the C locale, and only executes in the environment-specified
+locale after an explicit call to \fIsetlocale\fP(). However, adding
+such an elaborate
+new feature to the \fIawk\fP language was seen as inappropriate for
+IEEE\ Std\ 1003.1-2001. It is possible to execute an
+\fIawk\fP program explicitly in any desired locale by setting the
+environment in the shell.
+.LP
+The undefined behavior resulting from NULs in extended regular expressions
+allows future extensions for the GNU \fIgawk\fP
+program to process binary data.
+.LP
+The behavior in the case of invalid \fIawk\fP programs (including
+lexical, syntactic, and semantic errors) is undefined because
+it was considered overly limiting on implementations to specify. In
+most cases such errors can be expected to produce a diagnostic
+and a non-zero exit status. However, some implementations may choose
+to extend the language in ways that make use of certain
+invalid constructs. Other invalid constructs might be deemed worthy
+of a warning, but otherwise cause some reasonable behavior.
+Still other constructs may be very difficult to detect in some implementations.
+Also, different implementations might detect a
+given error during an initial parsing of the program (before reading
+any input files) while others might detect it when executing
+the program after reading some input. Implementors should be aware
+that diagnosing errors as early as possible and producing useful
+diagnostics can ease debugging of applications, and thus make an implementation
+more usable.
+.LP
+The unspecified behavior from using multi-character \fBRS\fP values
+is to allow possible future extensions based on extended
+regular expressions used for record separators. Historical implementations
+take the first character of the string and ignore the
+others.
+.LP
+Unspecified behavior when \fIsplit\fP( \fIstring\fP, \fIarray\fP,
+<null>) is used
+is to allow a proposed future extension that would split up a string
+into an array of individual characters.
+.LP
+In the context of the \fBgetline\fP function, equally good arguments
+for different precedences of the \fB|\fP and \fB<\fP
+operators can be made. Historical practice has been that:
+.sp
+.RS
+.nf
+
+\fBgetline < "a" "b"
+\fP
+.fi
+.RE
+.LP
+is parsed as:
+.sp
+.RS
+.nf
+
+\fB( getline < "a" ) "b"
+\fP
+.fi
+.RE
+.LP
+although many would argue that the intent was that the file \fBab\fP
+should be read. However:
+.sp
+.RS
+.nf
+
+\fBgetline < "x" + 1
+\fP
+.fi
+.RE
+.LP
+parses as:
+.sp
+.RS
+.nf
+
+\fBgetline < ( "x" + 1 )
+\fP
+.fi
+.RE
+.LP
+Similar problems occur with the \fB|\fP version of \fBgetline\fP,
+particularly in combination with \fB$\fP. For example:
+.sp
+.RS
+.nf
+
+\fB$"echo hi" | getline
+\fP
+.fi
+.RE
+.LP
+(This situation is particularly problematic when used in a \fBprint\fP
+statement, where the \fB|getline\fP part might be a
+redirection of the \fBprint\fP.)
+.LP
+Since in most cases such constructs are not (or at least should not)
+be used (because they have a natural ambiguity for which
+there is no conventional parsing), the meaning of these constructs
+has been made explicitly unspecified. (The effect is that a
+conforming application that runs into the problem must parenthesize
+to resolve the ambiguity.) There appeared to be few if any
+actual uses of such constructs.
+.LP
+Grammars can be written that would cause an error under these circumstances.
+Where backwards-compatibility is not a large
+consideration, implementors may wish to use such grammars.
+.LP
+Some historical implementations have allowed some built-in functions
+to be called without an argument list, the result being a
+default argument list chosen in some "reasonable" way. Use of \fBlength\fP
+as a synonym for \fBlength($0)\fP is the only one of
+these forms that is thought to be widely known or widely used; this
+particular form is documented in various places (for example,
+most historical \fIawk\fP reference pages, although not in the referenced
+\fIThe AWK Programming Language\fP) as legitimate
+practice. With this exception, default argument lists have always
+been undocumented and vaguely defined, and it is not at all clear
+how (or if) they should be generalized to user-defined functions.
+They add no useful functionality and preclude possible future
+extensions that might need to name functions without calling them.
+Not standardizing them seems the simplest course. The standard
+developers considered that \fBlength\fP merited special treatment,
+however, since it has been documented in the past and sees
+possibly substantial use in historical programs. Accordingly, this
+usage has been made legitimate, but Issue\ 5 removed the
+obsolescent marking for XSI-conforming implementations and many otherwise
+conforming applications depend on this feature.
+.LP
+In \fBsub\fP and \fBgsub\fP, if \fIrepl\fP is a string literal (the
+lexical token \fBSTRING\fP), then two consecutive
+backslash characters should be used in the string to ensure a single
+backslash will precede the ampersand when the resultant string
+is passed to the function. (For example, to specify one literal ampersand
+in the replacement string, use \fBgsub\fP( \fBERE\fP,
+\fB"\\\\&"\fP ).)
+.LP
+Historically the only special character in the \fIrepl\fP argument
+of \fBsub\fP and \fBgsub\fP string functions was the
+ampersand ( \fB'&'\fP ) character and preceding it with the backslash
+character was used to turn off its special
+meaning.
+.LP
+The description in the ISO\ POSIX-2:1993 standard introduced behavior
+such that the backslash character was another special
+character and it was unspecified whether there were any other special
+characters. This description introduced several portability
+problems, some of which are described below, and so it has been replaced
+with the more historical description. Some of the problems
+include:
+.IP " *" 3
+Historically, to create the replacement string, a script could use
+\fBgsub\fP( \fBERE\fP, \fB"\\\\&"\fP ), but with the
+ISO\ POSIX-2:1993 standard wording, it was necessary to use \fBgsub\fP(
+\fBERE\fP, \fB"\\\\\\\\&"\fP ). Backslash
+characters are doubled here because all string literals are subject
+to lexical analysis, which would reduce each pair of backslash
+characters to a single backslash before being passed to \fBgsub\fP.
+.LP
+.IP " *" 3
+Since it was unspecified what the special characters were, for portable
+scripts to guarantee that characters are printed
+literally, each character had to be preceded with a backslash. (For
+example, a portable script had to use \fBgsub\fP( \fBERE\fP,
+\fB"\\\\h\\\\i"\fP ) to produce a replacement string of \fB"hi"\fP
+\&.)
+.LP
+.LP
+The description for comparisons in the ISO\ POSIX-2:1993 standard
+did not properly describe historical practice because of
+the way numeric strings are compared as numbers. The current rules
+cause the following code:
+.sp
+.RS
+.nf
+
+\fBif (0 == "000")
+ print "strange, but true"
+else
+ print "not true"
+\fP
+.fi
+.RE
+.LP
+to do a numeric comparison, causing the \fBif\fP to succeed. It should
+be intuitively obvious that this is incorrect behavior,
+and indeed, no historical implementation of \fIawk\fP actually behaves
+this way.
+.LP
+To fix this problem, the definition of \fInumeric string\fP was enhanced
+to include only those values obtained from specific
+circumstances (mostly external sources) where it is not possible to
+determine unambiguously whether the value is intended to be a
+string or a numeric.
+.LP
+Variables that are assigned to a numeric string shall also be treated
+as a numeric string. (For example, the notion of a numeric
+string can be propagated across assignments.) In comparisons, all
+variables having the uninitialized value are to be treated as a
+numeric operand evaluating to the numeric value zero.
+.LP
+Uninitialized variables include all types of variables including scalars,
+array elements, and fields. The definition of an
+uninitialized value in Variables and Special Variables is necessary
+to describe the value placed on
+uninitialized variables and on fields that are valid (for example,
+\fB<\fP \fB$NF\fP) but have no characters in them and to
+describe how these variables are to be used in comparisons. A valid
+field, such as \fB$1\fP, that has no characters in it can be
+obtained from an input line of \fB"\\t\\t"\fP when \fBFS=\fP \fB'\\t'\fP
+\&. Historically, the comparison ( \fB$1<\fP10) was
+done numerically after evaluating \fB$1\fP to the value zero.
+.LP
+The phrase "... also shall have the numeric value of the numeric string"
+was removed from several sections of the
+ISO\ POSIX-2:1993 standard because is specifies an unnecessary implementation
+detail. It is not necessary for
+IEEE\ Std\ 1003.1-2001 to specify that these objects be assigned two
+different values. It is only necessary to specify that
+these objects may evaluate to two different values depending on context.
+.LP
+The description of numeric string processing is based on the behavior
+of the \fIatof\fP()
+function in the ISO\ C standard. While it is not a requirement for
+an implementation to use this function, many historical
+implementations of \fIawk\fP do. In the ISO\ C standard, floating-point
+constants use a period as a decimal point character
+for the language itself, independent of the current locale, but the
+\fIatof\fP() function and
+the associated \fIstrtod\fP() function use the decimal point character
+of the current
+locale when converting strings to numeric values. Similarly in \fIawk\fP,
+floating-point constants in an \fIawk\fP script use a
+period independent of the locale, but input strings use the decimal
+point character of the locale.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIGrammar Conventions\fP, \fIgrep\fP, \fIlex\fP, \fIsed\fP, the
+System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIatof\fP(),
+\fIexec\fP, \fIpopen\fP(), \fIsetlocale\fP(), \fIstrtod\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/basename.1p b/man-pages-posix-2003/man1p/basename.1p
new file mode 100644
index 0000000..da024af
--- /dev/null
+++ b/man-pages-posix-2003/man1p/basename.1p
@@ -0,0 +1,244 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "BASENAME" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" basename
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+basename \- return non-directory portion of a pathname
+.SH SYNOPSIS
+.LP
+\fBbasename\fP \fIstring\fP \fB[\fP\fIsuffix\fP\fB]\fP
+.SH DESCRIPTION
+.LP
+The \fIstring\fP operand shall be treated as a pathname, as defined
+in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 3.266, Pathname. The string
+\fIstring\fP shall be converted to the filename corresponding to the
+last pathname component in \fIstring\fP and then the suffix
+string \fIsuffix\fP, if present, shall be removed. This shall be done
+by performing actions equivalent to the following steps in
+order:
+.IP " 1." 4
+If \fIstring\fP is a null string, it is unspecified whether the resulting
+string is \fB'.'\fP or a null string. In either
+case, skip steps 2 through 6.
+.LP
+.IP " 2." 4
+If \fIstring\fP is \fB"//"\fP, it is implementation-defined whether
+steps 3 to 6 are skipped or processed.
+.LP
+.IP " 3." 4
+If \fIstring\fP consists entirely of slash characters, \fIstring\fP
+shall be set to a single slash character. In this case,
+skip steps 4 to 6.
+.LP
+.IP " 4." 4
+If there are any trailing slash characters in \fIstring\fP, they shall
+be removed.
+.LP
+.IP " 5." 4
+If there are any slash characters remaining in \fIstring\fP, the prefix
+of \fIstring\fP up to and including the last slash
+character in \fIstring\fP shall be removed.
+.LP
+.IP " 6." 4
+If the \fIsuffix\fP operand is present, is not identical to the characters
+remaining in \fIstring\fP, and is identical to a
+suffix of the characters remaining in \fIstring\fP, the suffix \fIsuffix\fP
+shall be removed from \fIstring\fP. Otherwise,
+\fIstring\fP is not modified by this step. It shall not be considered
+an error if \fIsuffix\fP is not found in \fIstring\fP.
+.LP
+.LP
+The resulting string shall be written to standard output.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIstring\fP
+A string.
+.TP 7
+\fIsuffix\fP
+A string.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIbasename\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The \fIbasename\fP utility shall write a line to the standard output
+in the following format:
+.sp
+.RS
+.nf
+
+\fB"%s\\n", <\fP\fIresulting string\fP\fB>
+\fP
+.fi
+.RE
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The definition of \fIpathname\fP specifies implementation-defined
+behavior for pathnames starting with two slash characters.
+Therefore, applications shall not arbitrarily add slashes to the beginning
+of a pathname unless they can ensure that there are more
+or less than two or are prepared to deal with the implementation-defined
+consequences.
+.SH EXAMPLES
+.LP
+If the string \fIstring\fP is a valid pathname:
+.sp
+.RS
+.nf
+
+\fB$(basename "\fP\fIstring\fP\fB")
+\fP
+.fi
+.RE
+.LP
+produces a filename that could be used to open the file named by \fIstring\fP
+in the directory returned by:
+.sp
+.RS
+.nf
+
+\fB$(dirname "\fP\fIstring\fP\fB")
+\fP
+.fi
+.RE
+.LP
+If the string \fIstring\fP is not a valid pathname, the same algorithm
+is used, but the result need not be a valid filename.
+The \fIbasename\fP utility is not expected to make any judgements
+about the validity of \fIstring\fP as a pathname; it just
+follows the specified algorithm to produce a result string.
+.LP
+The following shell script compiles \fB/usr/src/cmd/cat.c\fP and moves
+the output to a file named \fBcat\fP in the current
+directory when invoked with the argument \fB/usr/src/cmd/cat\fP or
+with the argument \fB/usr/src/cmd/cat.c\fP:
+.sp
+.RS
+.nf
+
+\fBc99 $(dirname "$1")/$(basename "$1" .c).c
+mv a.out $(basename "$1" .c)
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+The behaviors of \fIbasename\fP and \fIdirname\fP have been coordinated
+so that when
+\fIstring\fP is a valid pathname:
+.sp
+.RS
+.nf
+
+\fB$(basename "\fP\fIstring\fP\fB")
+\fP
+.fi
+.RE
+.LP
+would be a valid filename for the file in the directory:
+.sp
+.RS
+.nf
+
+\fB$(dirname "\fP\fIstring\fP\fB")
+\fP
+.fi
+.RE
+.LP
+This would not work for the early proposal versions of these utilities
+due to the way it specified handling of trailing
+slashes.
+.LP
+Since the definition of \fIpathname\fP specifies implementation-defined
+behavior for pathnames starting with two slash
+characters, this volume of IEEE\ Std\ 1003.1-2001 specifies similar
+implementation-defined behavior for the \fIbasename\fP
+and \fIdirname\fP utilities.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIParameters and Variables\fP, \fIdirname\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/batch.1p b/man-pages-posix-2003/man1p/batch.1p
new file mode 100644
index 0000000..8c14c14
--- /dev/null
+++ b/man-pages-posix-2003/man1p/batch.1p
@@ -0,0 +1,243 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "BATCH" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" batch
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+batch \- schedule commands to be executed in a batch queue
+.SH SYNOPSIS
+.LP
+\fB\fP \fIbatch\fP\fB\fP
+.SH DESCRIPTION
+.LP
+The \fIbatch\fP utility shall read commands from standard input and
+schedule them for execution in a batch queue. It shall be
+the equivalent of the command:
+.sp
+.RS
+.nf
+
+\fBat -q b -m now
+\fP
+.fi
+.RE
+.LP
+where queue \fIb\fP is a special \fIat\fP queue, specifically for
+batch jobs. Batch jobs
+shall be submitted to the batch queue with no time constraints and
+shall be run by the system using algorithms, based on
+unspecified factors, that may vary with each invocation of \fIbatch\fP.
+.LP
+Users shall be permitted to use \fIbatch\fP if their name appears
+in the file \fB/usr/lib/cron/at.allow\fP. If that file does not
+exist, the file \fB/usr/lib/cron/at.deny\fP shall be checked to determine
+whether the user shall be denied access to \fIbatch\fP.
+If neither file exists, only a process with the appropriate privileges
+shall be allowed to submit a job. If only \fBat.deny\fP
+exists and is empty, global usage shall be permitted. The \fBat.allow\fP
+and \fBat.deny\fP files shall consist of one user name
+per line.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+None.
+.SH STDIN
+.LP
+The standard input shall be a text file consisting of commands acceptable
+to the shell command language described in \fIShell Command Language\fP
+\&.
+.SH INPUT FILES
+.LP
+The text files \fB/usr/lib/cron/at.allow\fP and \fB/usr/lib/cron/at.deny\fP
+shall contain zero or more user names, one per line,
+of users who are, respectively, authorized or denied access to the
+\fIat\fP and \fIbatch\fP
+utilities.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIbatch\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard error and
+informative messages written to standard output.
+.TP 7
+\fILC_TIME\fP
+Determine the format and contents for date and time strings written
+by \fIbatch\fP.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fISHELL\fP
+Determine the name of a command interpreter to be used to invoke the
+at-job. If the variable is unset or null, \fIsh\fP shall be used.
+If it is set to a value other than a name for \fIsh\fP, the implementation
+shall do one of the following: use that shell; use \fIsh\fP; use the
+login shell from the user database; any of the preceding accompanied
+by a warning
+diagnostic about which was chosen.
+.TP 7
+\fITZ\fP
+Determine the timezone. The job shall be submitted for execution at
+the time specified by \fItimespec\fP or \fB-t\fP
+\fItime\fP relative to the timezone specified by the \fITZ\fP variable.
+If \fItimespec\fP specifies a timezone, it overrides
+\fITZ\fP. If \fItimespec\fP does not specify a timezone and \fITZ\fP
+is unset or null, an unspecified default timezone shall be
+used.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+When standard input is a terminal, prompts of unspecified format for
+each line of the user input described in the STDIN section
+may be written to standard output.
+.SH STDERR
+.LP
+The following shall be written to standard error when a job has been
+successfully submitted:
+.sp
+.RS
+.nf
+
+\fB"job %s at %s\\n",\fP \fIat_job_id\fP\fB, <\fP\fIdate\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where \fIdate\fP shall be equivalent in format to the output of:
+.sp
+.RS
+.nf
+
+\fBdate +"%a %b %e %T %Y"
+\fP
+.fi
+.RE
+.LP
+The date and time written shall be adjusted so that they appear in
+the timezone of the user (as determined by the \fITZ\fP
+variable).
+.LP
+Neither this, nor warning messages concerning the selection of the
+command interpreter, are considered a diagnostic that changes
+the exit status.
+.LP
+Diagnostic messages, if any, shall be written to standard error.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+The job shall not be scheduled.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+It may be useful to redirect standard output within the specified
+commands.
+.SH EXAMPLES
+.IP " 1." 4
+This sequence can be used at a terminal:
+.sp
+.RS
+.nf
+
+\fBbatch
+sort < file >outfile
+EOT
+\fP
+.fi
+.RE
+.LP
+.IP " 2." 4
+This sequence, which demonstrates redirecting standard error to a
+pipe, is useful in a command procedure (the sequence of output
+redirection specifications is significant):
+.sp
+.RS
+.nf
+
+\fBbatch <<
+! diff file1 file2 2>&1 >outfile | mailx mygroup
+!
+\fP
+.fi
+.RE
+.LP
+.SH RATIONALE
+.LP
+Early proposals described \fIbatch\fP in a manner totally separated
+from \fIat\fP, even
+though the historical model treated it almost as a synonym for \fIat\fP
+\fB-qb\fP. A number of
+features were added to list and control batch work separately from
+those in \fIat\fP. Upon
+further reflection, it was decided that the benefit of this did not
+merit the change to the historical interface.
+.LP
+The \fB-m\fP option was included on the equivalent \fIat\fP command
+because it is
+historical practice to mail results to the submitter, even if all
+job-produced output is redirected. As explained in the RATIONALE
+for \fIat\fP, the \fBnow\fP keyword submits the job for immediate
+execution (after scheduling
+delays), despite some historical systems where \fIat\fP \fBnow\fP
+would have been considered
+an error.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIat\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/bc.1p b/man-pages-posix-2003/man1p/bc.1p
new file mode 100644
index 0000000..ca2aa0f
--- /dev/null
+++ b/man-pages-posix-2003/man1p/bc.1p
@@ -0,0 +1,1359 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "BC" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" bc
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+bc \- arbitrary-precision arithmetic language
+.SH SYNOPSIS
+.LP
+\fBbc\fP \fB[\fP\fB-l\fP\fB] [\fP\fIfile\fP \fB...\fP\fB]\fP
+.SH DESCRIPTION
+.LP
+The \fIbc\fP utility shall implement an arbitrary precision calculator.
+It shall take input from any files given, then read
+from the standard input. If the standard input and standard output
+to \fIbc\fP are attached to a terminal, the invocation of
+\fIbc\fP shall be considered to be \fIinteractive\fP, causing behavioral
+constraints described in the following sections.
+.SH OPTIONS
+.LP
+The \fIbc\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following option shall be supported:
+.TP 7
+\fB-l\fP
+(The letter ell.) Define the math functions and initialize \fIscale\fP
+to 20, instead of the default zero; see the EXTENDED
+DESCRIPTION section.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of a text file containing \fIbc\fP program statements.
+After all \fIfile\fPs have been read, \fIbc\fP shall read
+the standard input.
+.sp
+.SH STDIN
+.LP
+See the INPUT FILES section.
+.SH INPUT FILES
+.LP
+Input files shall be text files containing a sequence of comments,
+statements, and function definitions that shall be executed
+as they are read.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIbc\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The output of the \fIbc\fP utility shall be controlled by the program
+read, and consist of zero or more lines containing the
+value of all executed expressions without assignments. The radix and
+precision of the output shall be controlled by the values of
+the \fBobase\fP and \fBscale\fP variables; see the EXTENDED DESCRIPTION
+section.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.SS Grammar
+.LP
+The grammar in this section and the lexical conventions in the following
+section shall together describe the syntax for
+\fIbc\fP programs. The general conventions for this style of grammar
+are described in \fIGrammar Conventions\fP . A valid program can be
+represented as the non-terminal symbol
+\fBprogram\fP in the grammar. This formal syntax shall take precedence
+over the text syntax description.
+.sp
+.RS
+.nf
+
+\fB%token EOF NEWLINE STRING LETTER NUMBER
+.sp
+
+%token MUL_OP
+/* '*', '/', '%' */
+.sp
+
+%token ASSIGN_OP
+/* '=', '+=', '-=', '*=', '/=', '%=', '^=' */
+.sp
+
+%token REL_OP
+/* '==', '<=', '>=', '!=', '<', '>' */
+.sp
+
+%token INCR_DECR
+/* '++', '--' */
+.sp
+
+%token Define Break Quit Length
+/* 'define', 'break', 'quit', 'length' */
+.sp
+
+%token Return For If While Sqrt
+/* 'return', 'for', 'if', 'while', 'sqrt' */
+.sp
+
+%token Scale Ibase Obase Auto
+/* 'scale', 'ibase', 'obase', 'auto' */
+.sp
+
+%start program
+.sp
+
+%%
+.sp
+
+program : EOF
+ | input_item program
+ ;
+.sp
+
+input_item : semicolon_list NEWLINE
+ | function
+ ;
+.sp
+
+semicolon_list : /* empty */
+ | statement
+ | semicolon_list ';' statement
+ | semicolon_list ';'
+ ;
+.sp
+
+statement_list : /* empty */
+ | statement
+ | statement_list NEWLINE
+ | statement_list NEWLINE statement
+ | statement_list ';'
+ | statement_list ';' statement
+ ;
+.sp
+
+statement : expression
+ | STRING
+ | Break
+ | Quit
+ | Return
+ | Return '(' return_expression ')'
+ | For '(' expression ';'
+ relational_expression ';'
+ expression ')' statement
+ | If '(' relational_expression ')' statement
+ | While '(' relational_expression ')' statement
+ | '{' statement_list '}'
+ ;
+.sp
+
+function : Define LETTER '(' opt_parameter_list ')'
+ '{' NEWLINE opt_auto_define_list
+ statement_list '}'
+ ;
+.sp
+
+opt_parameter_list : /* empty */
+ | parameter_list
+ ;
+.sp
+
+parameter_list : LETTER
+ | define_list ',' LETTER
+ ;
+.sp
+
+opt_auto_define_list : /* empty */
+ | Auto define_list NEWLINE
+ | Auto define_list ';'
+ ;
+.sp
+
+define_list : LETTER
+ | LETTER '[' ']'
+ | define_list ',' LETTER
+ | define_list ',' LETTER '[' ']'
+ ;
+.sp
+
+opt_argument_list : /* empty */
+ | argument_list
+ ;
+.sp
+
+argument_list : expression
+ | LETTER '[' ']' ',' argument_list
+ ;
+.sp
+
+relational_expression : expression
+ | expression REL_OP expression
+ ;
+.sp
+
+return_expression : /* empty */
+ | expression
+ ;
+.sp
+
+expression : named_expression
+ | NUMBER
+ | '(' expression ')'
+ | LETTER '(' opt_argument_list ')'
+ | '-' expression
+ | expression '+' expression
+ | expression '-' expression
+ | expression MUL_OP expression
+ | expression '^' expression
+ | INCR_DECR named_expression
+ | named_expression INCR_DECR
+ | named_expression ASSIGN_OP expression
+ | Length '(' expression ')'
+ | Sqrt '(' expression ')'
+ | Scale '(' expression ')'
+ ;
+.sp
+
+named_expression : LETTER
+ | LETTER '[' expression ']'
+ | Scale
+ | Ibase
+ | Obase
+ ;
+\fP
+.fi
+.RE
+.SS Lexical Conventions in bc
+.LP
+The lexical conventions for \fIbc\fP programs, with respect to the
+preceding grammar, shall be as follows:
+.IP " 1." 4
+Except as noted, \fIbc\fP shall recognize the longest possible token
+or delimiter beginning at a given point.
+.LP
+.IP " 2." 4
+A comment shall consist of any characters beginning with the two adjacent
+characters \fB"/*"\fP and terminated by the next
+occurrence of the two adjacent characters \fB"*/"\fP . Comments shall
+have no effect except to delimit lexical tokens.
+.LP
+.IP " 3." 4
+The <newline> shall be recognized as the token \fBNEWLINE\fP.
+.LP
+.IP " 4." 4
+The token \fBSTRING\fP shall represent a string constant; it shall
+consist of any characters beginning with the double-quote
+character ( \fB' )'\fP and terminated by another occurrence of the
+double-quote character. The value of the string is the
+sequence of all characters between, but not including, the two double-quote
+characters. All characters shall be taken literally
+from the input, and there is no way to specify a string containing
+a double-quote character. The length of the value of each string
+shall be limited to {BC_STRING_MAX} bytes.
+.LP
+.IP " 5." 4
+A <blank> shall have no effect except as an ordinary character if
+it appears within a \fBSTRING\fP token, or to delimit a
+lexical token other than \fBSTRING\fP.
+.LP
+.IP " 6." 4
+The combination of a backslash character immediately followed by a
+<newline> shall have no effect other than to delimit
+lexical tokens with the following exceptions:
+.RS
+.IP " *" 3
+It shall be interpreted as the character sequence \fB"\\<newline>"\fP
+in \fBSTRING\fP tokens.
+.LP
+.IP " *" 3
+It shall be ignored as part of a multi-line \fBNUMBER\fP token.
+.LP
+.RE
+.LP
+.IP " 7." 4
+The token \fBNUMBER\fP shall represent a numeric constant. It shall
+be recognized by the following grammar:
+.sp
+.RS
+.nf
+
+\fBNUMBER : integer
+ | '.' integer
+ | integer '.'
+ | integer '.' integer
+ ;
+.sp
+
+integer : digit
+ | integer digit
+ ;
+.sp
+
+digit : 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7
+ | 8 | 9 | A | B | C | D | E | F
+ ;
+\fP
+.fi
+.RE
+.LP
+.IP " 8." 4
+The value of a \fBNUMBER\fP token shall be interpreted as a numeral
+in the base specified by the value of the internal register
+\fBibase\fP (described below). Each of the \fBdigit\fP characters
+shall have the value from 0 to 15 in the order listed here, and
+the period character shall represent the radix point. The behavior
+is undefined if digits greater than or equal to the value of
+\fBibase\fP appear in the token. However, note the exception for single-digit
+values being assigned to \fBibase\fP and
+\fBobase\fP themselves, in Operations in bc .
+.LP
+.IP " 9." 4
+The following keywords shall be recognized as tokens:
+.TS C
+center; lw(15) lw(15) lw(15) lw(15) lw(15).
+T{
+\fB
+.br
+auto
+.br
+break
+.br
+define
+.br
+\fP
+T} T{
+\fB
+.br
+ibase
+.br
+if
+.br
+for
+.br
+\fP
+T} T{
+\fB
+.br
+length
+.br
+obase
+.br
+quit
+.br
+\fP
+T} T{
+\fB
+.br
+return
+.br
+scale
+.br
+sqrt
+.br
+\fP
+T} T{
+\fB
+.br
+while
+.br
+\fP
+T}
+.TE
+.LP
+.IP "10." 4
+Any of the following characters occurring anywhere except within a
+keyword shall be recognized as the token \fBLETTER\fP:
+.sp
+.RS
+.nf
+
+\fBa 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
+\fP
+.fi
+.RE
+.LP
+.IP "11." 4
+The following single-character and two-character sequences shall be
+recognized as the token \fBASSIGN_OP\fP:
+.sp
+.RS
+.nf
+
+\fB= += -= *= /= %= ^=
+\fP
+.fi
+.RE
+.LP
+.IP "12." 4
+If an \fB'='\fP character, as the beginning of a token, is followed
+by a \fB'-'\fP character with no intervening
+delimiter, the behavior is undefined.
+.LP
+.IP "13." 4
+The following single-characters shall be recognized as the token \fBMUL_OP\fP:
+.sp
+.RS
+.nf
+
+\fB* / %
+\fP
+.fi
+.RE
+.LP
+.IP "14." 4
+The following single-character and two-character sequences shall be
+recognized as the token \fBREL_OP\fP:
+.sp
+.RS
+.nf
+
+\fB== <= >= != < >
+\fP
+.fi
+.RE
+.LP
+.IP "15." 4
+The following two-character sequences shall be recognized as the token
+\fBINCR_DECR\fP:
+.sp
+.RS
+.nf
+
+\fB++ --
+\fP
+.fi
+.RE
+.LP
+.IP "16." 4
+The following single characters shall be recognized as tokens whose
+names are the character:
+.sp
+.RS
+.nf
+
+\fB<newline> ( ) , + - ; [ ] ^ { }
+\fP
+.fi
+.RE
+.LP
+.IP "17." 4
+The token \fBEOF\fP is returned when the end of input is reached.
+.LP
+.SS Operations in bc
+.LP
+There are three kinds of identifiers: ordinary identifiers, array
+identifiers, and function identifiers. All three types consist
+of single lowercase letters. Array identifiers shall be followed by
+square brackets ( \fB"[]"\fP ). An array subscript is
+required except in an argument or auto list. Arrays are singly dimensioned
+and can contain up to {BC_DIM_MAX} elements. Indexing
+shall begin at zero so an array is indexed from 0 to {BC_DIM_MAX}-1.
+Subscripts shall be truncated to integers. The application
+shall ensure that function identifiers are followed by parentheses,
+possibly enclosing arguments. The three types of identifiers do
+not conflict.
+.LP
+The following table summarizes the rules for precedence and associativity
+of all operators. Operators on the same line shall
+have the same precedence; rows are in order of decreasing precedence.
+.sp
+.ce 1
+\fBTable: Operators in \fIbc\fP\fP
+.TS C
+center; l l.
+\fBOperator\fP \fBAssociativity\fP
+++, -- N/A
+unary - N/A
+^ Right to left
+*, /, % Left to right
++, binary - Left to right
+=, +=, -=, *=, /=, %=, ^= Right to left
+==, <=, >=, !=, <, > None
+.TE
+.LP
+Each expression or named expression has a \fIscale\fP, which is the
+number of decimal digits that shall be maintained as the
+fractional portion of the expression.
+.LP
+\fINamed expressions\fP are places where values are stored. Named
+expressions shall be valid on the left side of an assignment.
+The value of a named expression shall be the value stored in the place
+named. Simple identifiers and array elements are named
+expressions; they have an initial value of zero and an initial scale
+of zero.
+.LP
+The internal registers \fBscale\fP, \fBibase\fP, and \fBobase\fP are
+all named expressions. The scale of an expression
+consisting of the name of one of these registers shall be zero; values
+assigned to any of these registers are truncated to
+integers. The \fBscale\fP register shall contain a global value used
+in computing the scale of expressions (as described below).
+The value of the register \fBscale\fP is limited to 0 <= \fBscale\fP
+<= {BC_SCALE_MAX} and shall have a default value of
+zero. The \fBibase\fP and \fBobase\fP registers are the input and
+output number radix, respectively. The value of \fBibase\fP
+shall be limited to:
+.sp
+.RS
+.nf
+
+\fB2 <= ibase <= 16
+\fP
+.fi
+.RE
+.LP
+The value of \fBobase\fP shall be limited to:
+.sp
+.RS
+.nf
+
+\fB2 <= obase <= {BC_BASE_MAX}
+\fP
+.fi
+.RE
+.LP
+When either \fBibase\fP or \fBobase\fP is assigned a single \fBdigit\fP
+value from the list in Lexical Conventions in bc, the value shall
+be assumed in hexadecimal. (For example, \fBibase\fP=A sets to
+base ten, regardless of the current \fBibase\fP value.) Otherwise,
+the behavior is undefined when digits greater than or equal to
+the value of \fBibase\fP appear in the input. Both \fBibase\fP and
+\fBobase\fP shall have initial values of 10.
+.LP
+Internal computations shall be conducted as if in decimal, regardless
+of the input and output bases, to the specified number of
+decimal digits. When an exact result is not achieved (for example,
+\fBscale\fP=0;\ 3.2/1)\fB,\fP the result shall be
+truncated.
+.LP
+For all values of \fBobase\fP specified by this volume of IEEE\ Std\ 1003.1-2001,
+\fIbc\fP shall output numeric values
+by performing each of the following steps in order:
+.IP " 1." 4
+If the value is less than zero, a hyphen ( \fB'-'\fP ) character shall
+be output.
+.LP
+.IP " 2." 4
+One of the following is output, depending on the numerical value:
+.RS
+.IP " *" 3
+If the absolute value of the numerical value is greater than or equal
+to one, the integer portion of the value shall be output
+as a series of digits appropriate to \fBobase\fP (as described below),
+most significant digit first. The most significant non-zero
+digit shall be output next, followed by each successively less significant
+digit.
+.LP
+.IP " *" 3
+If the absolute value of the numerical value is less than one but
+greater than zero and the scale of the numerical value is
+greater than zero, it is unspecified whether the character 0 is output.
+.LP
+.IP " *" 3
+If the numerical value is zero, the character 0 shall be output.
+.LP
+.RE
+.LP
+.IP " 3." 4
+If the scale of the value is greater than zero and the numeric value
+is not zero, a period character shall be output, followed
+by a series of digits appropriate to \fBobase\fP (as described below)
+representing the most significant portion of the fractional
+part of the value. If \fIs\fP represents the scale of the value being
+output, the number of digits output shall be \fIs\fP if
+\fBobase\fP is 10, less than or equal to \fIs\fP if \fBobase\fP is
+greater than 10, or greater than or equal to \fIs\fP if
+\fBobase\fP is less than 10. For \fBobase\fP values other than 10,
+this should be the number of digits needed to represent a
+precision of 10**\fIs\fP.
+.LP
+.LP
+For \fBobase\fP values from 2 to 16, valid digits are the first \fBobase\fP
+of the single characters:
+.sp
+.RS
+.nf
+
+\fB0 1 2 3 4 5 6 7 8 9 A B C D E F
+\fP
+.fi
+.RE
+.LP
+which represent the values zero to 15, inclusive, respectively.
+.LP
+For bases greater than 16, each digit shall be written as a separate
+multi-digit decimal number. Each digit except the most
+significant fractional digit shall be preceded by a single <space>.
+For bases from 17 to 100, \fIbc\fP shall write two-digit
+decimal numbers; for bases from 101 to 1000, three-digit decimal strings,
+and so on. For example, the decimal number 1024 in base
+25 would be written as:
+.sp
+.RS
+.nf
+
+\fB 01 15 24
+\fP
+.fi
+.RE
+.LP
+and in base 125, as:
+.sp
+.RS
+.nf
+
+\fB 008 024
+\fP
+.fi
+.RE
+.LP
+Very large numbers shall be split across lines with 70 characters
+per line in the POSIX locale; other locales may split at
+different character boundaries. Lines that are continued shall end
+with a backslash ( \fB'\\'\fP ).
+.LP
+A function call shall consist of a function name followed by parentheses
+containing a comma-separated list of expressions, which
+are the function arguments. A whole array passed as an argument shall
+be specified by the array name followed by empty square
+brackets. All function arguments shall be passed by value. As a result,
+changes made to the formal parameters shall have no effect
+on the actual arguments. If the function terminates by executing a
+\fBreturn\fP statement, the value of the function shall be the
+value of the expression in the parentheses of the \fBreturn\fP statement
+or shall be zero if no expression is provided or if there
+is no \fBreturn\fP statement.
+.LP
+The result of \fBsqrt\fP( \fIexpression\fP) shall be the square root
+of the expression. The result shall be truncated in the
+least significant decimal place. The scale of the result shall be
+the scale of the expression or the value of \fBscale\fP,
+whichever is larger.
+.LP
+The result of \fBlength\fP( \fIexpression\fP) shall be the total number
+of significant decimal digits in the expression. The
+scale of the result shall be zero.
+.LP
+The result of \fBscale\fP( \fIexpression\fP) shall be the scale of
+the expression. The scale of the result shall be zero.
+.LP
+A numeric constant shall be an expression. The scale shall be the
+number of digits that follow the radix point in the input
+representing the constant, or zero if no radix point appears.
+.LP
+The sequence (\ \fIexpression\fP\ ) shall be an expression with the
+same value and scale as \fIexpression\fP. The
+parentheses can be used to alter the normal precedence.
+.LP
+The semantics of the unary and binary operators are as follows:
+.TP 7
+-\fIexpression\fP
+.sp
+The result shall be the negative of the \fIexpression\fP. The scale
+of the result shall be the scale of \fIexpression\fP.
+.sp
+.LP
+The unary increment and decrement operators shall not modify the scale
+of the named expression upon which they operate. The
+scale of the result shall be the scale of that named expression.
+.TP 7
+++\fInamed-expression\fP
+.sp
+The named expression shall be incremented by one. The result shall
+be the value of the named expression after incrementing.
+.TP 7
+--\fInamed-expression\fP
+.sp
+The named expression shall be decremented by one. The result shall
+be the value of the named expression after decrementing.
+.TP 7
+\fInamed-expression\fP++
+.sp
+The named expression shall be incremented by one. The result shall
+be the value of the named expression before incrementing.
+.TP 7
+\fInamed-expression\fP--
+.sp
+The named expression shall be decremented by one. The result shall
+be the value of the named expression before decrementing.
+.sp
+.LP
+The exponentiation operator, circumflex ( \fB'^'\fP ), shall bind
+right to left.
+.TP 7
+\fIexpression\fP^\fIexpression\fP
+.sp
+The result shall be the first \fIexpression\fP raised to the power
+of the second \fIexpression\fP. If the second expression is
+not an integer, the behavior is undefined. If \fIa\fP is the scale
+of the left expression and \fIb\fP is the absolute value of
+the right expression, the scale of the result shall be:
+.sp
+.RS
+.nf
+
+\fBif b >= 0 min(a * b, max(scale, a)) if b < 0 scale
+\fP
+.fi
+.RE
+.sp
+The multiplicative operators ( \fB'*'\fP, \fB'/'\fP, \fB'%'\fP )
+shall bind left to right.
+.TP 7
+\fIexpression\fP*\fIexpression\fP
+.sp
+The result shall be the product of the two expressions. If \fIa\fP
+and \fIb\fP are the scales of the two expressions, then the
+scale of the result shall be:
+.sp
+.RS
+.nf
+
+\fBmin(a+b,max(scale,a,b))
+\fP
+.fi
+.RE
+.TP 7
+\fIexpression\fP/\fIexpression\fP
+.sp
+The result shall be the quotient of the two expressions. The scale
+of the result shall be the value of \fBscale\fP.
+.TP 7
+\fIexpression\fP%\fIexpression\fP
+.sp
+For expressions \fIa\fP and \fIb\fP, \fIa\fP% \fIb\fP shall be evaluated
+equivalent to the steps:
+.RS
+.IP " 1." 4
+Compute \fIa\fP/ \fIb\fP to current scale.
+.LP
+.IP " 2." 4
+Use the result to compute:
+.sp
+.RS
+.nf
+
+\fBa - (a / b) * b
+\fP
+.fi
+.RE
+.LP
+to scale:
+.sp
+.RS
+.nf
+
+\fBmax(scale + scale(b), scale(a))
+\fP
+.fi
+.RE
+.LP
+.RE
+The scale of the result shall be:
+.sp
+.RS
+.nf
+
+\fBmax(scale + scale(b), scale(a))
+\fP
+.fi
+.RE
+.LP
+When \fBscale\fP is zero, the \fB'%'\fP operator is the mathematical
+remainder operator.
+.sp
+.LP
+The additive operators ( \fB'+'\fP, \fB'-'\fP ) shall bind left to
+right.
+.TP 7
+\fIexpression\fP+\fIexpression\fP
+.sp
+The result shall be the sum of the two expressions. The scale of the
+result shall be the maximum of the scales of the
+expressions.
+.TP 7
+\fIexpression\fP-\fIexpression\fP
+.sp
+The result shall be the difference of the two expressions. The scale
+of the result shall be the maximum of the scales of the
+expressions.
+.sp
+.LP
+The assignment operators ( \fB'='\fP, \fB"+="\fP, \fB"-="\fP, \fB"*="\fP,
+\fB"/="\fP, \fB"%="\fP,
+\fB"^="\fP ) shall bind right to left.
+.TP 7
+\fInamed-expression\fP=\fIexpression\fP
+.sp
+This expression shall result in assigning the value of the expression
+on the right to the named expression on the left. The scale
+of both the named expression and the result shall be the scale of
+\fIexpression\fP.
+.sp
+.LP
+The compound assignment forms:
+.sp
+.RS
+.nf
+
+\fInamed-expression\fP \fB<\fP\fIoperator\fP\fB>=\fP \fIexpression\fP
+.fi
+.RE
+.LP
+shall be equivalent to:
+.sp
+.RS
+.nf
+
+\fInamed-expression\fP\fB=\fP\fInamed-expression\fP \fB<\fP\fIoperator\fP\fB>\fP \fIexpression\fP
+.fi
+.RE
+.LP
+except that the \fInamed-expression\fP shall be evaluated only once.
+.LP
+Unlike all other operators, the relational operators ( \fB'<'\fP,
+\fB'>'\fP, \fB"<="\fP, \fB">="\fP,
+\fB"=="\fP, \fB"!="\fP ) shall be only valid as the object of an
+\fBif\fP, \fBwhile\fP, or inside a \fBfor\fP
+statement.
+.TP 7
+\fIexpression1\fP<\fIexpression2\fP
+.sp
+The relation shall be true if the value of \fIexpression1\fP is strictly
+less than the value of \fIexpression2\fP.
+.TP 7
+\fIexpression1\fP>\fIexpression2\fP
+.sp
+The relation shall be true if the value of \fIexpression1\fP is strictly
+greater than the value of \fIexpression2\fP.
+.TP 7
+\fIexpression1\fP<=\fIexpression2\fP
+.sp
+The relation shall be true if the value of \fIexpression1\fP is less
+than or equal to the value of \fIexpression2\fP.
+.TP 7
+\fIexpression1\fP>=\fIexpression2\fP
+.sp
+The relation shall be true if the value of \fIexpression1\fP is greater
+than or equal to the value of \fIexpression2\fP.
+.TP 7
+\fIexpression1\fP==\fIexpression2\fP
+.sp
+The relation shall be true if the values of \fIexpression1\fP and
+\fIexpression2\fP are equal.
+.TP 7
+\fIexpression1\fP!=\fIexpression2\fP
+.sp
+The relation shall be true if the values of \fIexpression1\fP and
+\fIexpression2\fP are unequal.
+.sp
+.LP
+There are only two storage classes in \fIbc\fP: global and automatic
+(local). Only identifiers that are local to a function
+need be declared with the \fBauto\fP command. The arguments to a function
+shall be local to the function. All other identifiers
+are assumed to be global and available to all functions. All identifiers,
+global and local, have initial values of zero.
+Identifiers declared as auto shall be allocated on entry to the function
+and released on returning from the function. They
+therefore do not retain values between function calls. Auto arrays
+shall be specified by the array name followed by empty square
+brackets. On entry to a function, the old values of the names that
+appear as parameters and as automatic variables shall be pushed
+onto a stack. Until the function returns, reference to these names
+shall refer only to the new values.
+.LP
+References to any of these names from other functions that are called
+from this function also refer to the new value until one
+of those functions uses the same name for a local variable.
+.LP
+When a statement is an expression, unless the main operator is an
+assignment, execution of the statement shall write the value
+of the expression followed by a <newline>.
+.LP
+When a statement is a string, execution of the statement shall write
+the value of the string.
+.LP
+Statements separated by semicolons or <newline>s shall be executed
+sequentially. In an interactive invocation of
+\fIbc\fP, each time a <newline> is read that satisfies the grammatical
+production:
+.sp
+.RS
+.nf
+
+\fBinput_item : semicolon_list NEWLINE
+\fP
+.fi
+.RE
+.LP
+the sequential list of statements making up the \fBsemicolon_list\fP
+shall be executed immediately and any output produced by
+that execution shall be written without any delay due to buffering.
+.LP
+In an \fBif\fP statement ( \fBif\fP( \fIrelation\fP) \fIstatement\fP),
+the \fIstatement\fP shall be executed if the
+relation is true.
+.LP
+The \fBwhile\fP statement ( \fBwhile\fP( \fIrelation\fP) \fIstatement\fP)
+implements a loop in which the \fIrelation\fP is
+tested; each time the \fIrelation\fP is true, the \fIstatement\fP
+shall be executed and the \fIrelation\fP retested. When the
+\fIrelation\fP is false, execution shall resume after \fIstatement\fP.
+.LP
+A \fBfor\fP statement( \fBfor\fP( \fIexpression\fP; \fIrelation\fP;
+\fIexpression\fP) \fIstatement\fP) shall be the same
+as:
+.sp
+.RS
+.nf
+
+\fIfirst-expression\fP\fBwhile (\fP\fIrelation\fP\fB) {
+ \fP \fIstatement\fP \fB \fP \fIlast-expression\fP\fB}
+\fP
+.fi
+.RE
+The application shall ensure that all three expressions are present.
+.LP
+The \fBbreak\fP statement shall cause termination of a \fBfor\fP or
+\fBwhile\fP statement.
+.LP
+The \fBauto\fP statement ( \fBauto\fP \fIidentifier\fP \fB[\fP, \fIidentifier\fP
+\fB]\fP ...) shall cause the values of
+the identifiers to be pushed down. The identifiers can be ordinary
+identifiers or array identifiers. Array identifiers shall be
+specified by following the array name by empty square brackets. The
+application shall ensure that the \fBauto\fP statement is the
+first statement in a function definition.
+.LP
+A \fBdefine\fP statement:
+.sp
+.RS
+.nf
+
+\fBdefine\fP \fILETTER\fP \fB(\fP \fIopt_parameter_list\fP \fB) {
+ \fP \fIopt_auto_define_list\fP \fB \fP \fIstatement_list\fP\fB}
+\fP
+.fi
+.RE
+.LP
+defines a function named \fBLETTER\fP. If a function named \fBLETTER\fP
+was previously defined, the \fBdefine\fP statement
+shall replace the previous definition. The expression:
+.sp
+.RS
+.nf
+
+\fBLETTER (\fP \fIopt_argument_list\fP \fB)
+\fP
+.fi
+.RE
+.LP
+shall invoke the function named \fBLETTER\fP. The behavior is undefined
+if the number of arguments in the invocation does not
+match the number of parameters in the definition. Functions shall
+be defined before they are invoked. A function shall be
+considered to be defined within its own body, so recursive calls are
+valid. The values of numeric constants within a function shall
+be interpreted in the base specified by the value of the \fBibase\fP
+register when the function is invoked.
+.LP
+The \fBreturn\fP statements ( \fBreturn\fP and \fBreturn\fP( \fIexpression\fP))
+shall cause termination of a function,
+popping of its auto variables, and specification of the result of
+the function. The first form shall be equivalent to
+\fBreturn\fP(0). The value and scale of the result returned by the
+function shall be the value and scale of the expression
+returned.
+.LP
+The \fBquit\fP statement ( \fBquit\fP) shall stop execution of a \fIbc\fP
+program at the point where the statement occurs in
+the input, even if it occurs in a function definition, or in an \fBif\fP,
+\fBfor\fP, or \fBwhile\fP statement.
+.LP
+The following functions shall be defined when the \fB-l\fP option
+is specified:
+.TP 7
+\fBs\fP(\ \fIexpression\fP\ )
+.sp
+Sine of argument in radians.
+.TP 7
+\fBc\fP(\ \fIexpression\fP\ )
+.sp
+Cosine of argument in radians.
+.TP 7
+\fBa\fP(\ \fIexpression\fP\ )
+.sp
+Arctangent of argument.
+.TP 7
+\fBl\fP(\ \fIexpression\fP\ )
+.sp
+Natural logarithm of argument.
+.TP 7
+\fBe\fP(\ \fIexpression\fP\ )
+.sp
+Exponential function of argument.
+.TP 7
+\fBj\fP(\ \fIexpression\fP,\ \fIexpression\fP\ )
+.sp
+Bessel function of integer order.
+.sp
+.LP
+The scale of the result returned by these functions shall be the value
+of the \fBscale\fP register at the time the function is
+invoked. The value of the \fBscale\fP register after these functions
+have completed their execution shall be the same value it had
+upon invocation. The behavior is undefined if any of these functions
+is invoked with an argument outside the domain of the
+mathematical function.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+0
+All input files were processed successfully.
+.TP 7
+\fIunspecified\fP
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+If any \fIfile\fP operand is specified and the named file cannot be
+accessed, \fIbc\fP shall write a diagnostic message to
+standard error and terminate without any further action.
+.LP
+In an interactive invocation of \fIbc\fP, the utility should print
+an error message and recover following any error in the
+input. In a non-interactive invocation of \fIbc\fP, invalid input
+causes undefined behavior.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Automatic variables in \fIbc\fP do not work in exactly the same way
+as in either C or PL/1.
+.LP
+For historical reasons, the exit status from \fIbc\fP cannot be relied
+upon to indicate that an error has occurred. Returning
+zero after an error is possible. Therefore, \fIbc\fP should be used
+primarily by interactive users (who can react to error
+messages) or by application programs that can somehow validate the
+answers returned as not including error messages.
+.LP
+The \fIbc\fP utility always uses the period ( \fB'.'\fP ) character
+to represent a radix point, regardless of any
+decimal-point character specified as part of the current locale. In
+languages like C or \fIawk\fP, the period character is used in program
+source, so it can be portable and unambiguous,
+while the locale-specific character is used in input and output. Because
+there is no distinction between source and input in
+\fIbc\fP, this arrangement would not be possible. Using the locale-specific
+character in \fIbc\fP's input would introduce
+ambiguities into the language; consider the following example in a
+locale with a comma as the decimal-point character:
+.sp
+.RS
+.nf
+
+\fBdefine f(a,b) {
+ ...
+}
+\&...
+.sp
+
+f(1,2,3)
+\fP
+.fi
+.RE
+.LP
+Because of such ambiguities, the period character is used in input.
+Having input follow different conventions from output would
+be confusing in either pipeline usage or interactive usage, so the
+period is also used in output.
+.SH EXAMPLES
+.LP
+In the shell, the following assigns an approximation of the first
+ten digits of \fB'pi'\fP to the variable \fIx\fP:
+.sp
+.RS
+.nf
+
+\fBx=$(printf "%s\\n" 'scale = 10; 104348/33215' | bc)
+\fP
+.fi
+.RE
+.LP
+The following \fIbc\fP program prints the same approximation of \fB'pi'\fP,
+with a
+label, to standard output:
+.sp
+.RS
+.nf
+
+\fBscale = 10
+"pi equals "
+104348 / 33215
+\fP
+.fi
+.RE
+.LP
+The following defines a function to compute an approximate value of
+the exponential function (note that such a function is
+predefined if the \fB-l\fP option is specified):
+.sp
+.RS
+.nf
+
+\fBscale = 20
+define e(x){
+ auto a, b, c, i, s
+ a = 1
+ b = 1
+ s = 1
+ for (i = 1; 1 == 1; i++){
+ a = a*x
+ b = b*i
+ c = a/b
+ if (c == 0) {
+ return(s)
+ }
+ s = s+c
+ }
+}
+\fP
+.fi
+.RE
+.LP
+The following prints approximate values of the exponential function
+of the first ten integers:
+.sp
+.RS
+.nf
+
+\fBfor (i = 1; i <= 10; ++i) {
+ e(i)
+}
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+The \fIbc\fP utility is implemented historically as a front-end processor
+for \fIdc\fP; \fIdc\fP was not selected to be part
+of this volume of IEEE\ Std\ 1003.1-2001 because \fIbc\fP was thought
+to have a more intuitive programmatic interface.
+Current implementations that implement \fIbc\fP using \fIdc\fP are
+expected to be compliant.
+.LP
+The exit status for error conditions has been left unspecified for
+several reasons:
+.IP " *" 3
+The \fIbc\fP utility is used in both interactive and non-interactive
+situations. Different exit codes may be appropriate for
+the two uses.
+.LP
+.IP " *" 3
+It is unclear when a non-zero exit should be given; divide-by-zero,
+undefined functions, and syntax errors are all
+possibilities.
+.LP
+.IP " *" 3
+It is not clear what utility the exit status has.
+.LP
+.IP " *" 3
+In the 4.3 BSD, System V, and Ninth Edition implementations, \fIbc\fP
+works in conjunction with \fIdc\fP. The \fIdc\fP
+utility is the parent, \fIbc\fP is the child. This was done to cleanly
+terminate \fIbc\fP if \fIdc\fP aborted.
+.LP
+.LP
+The decision to have \fIbc\fP exit upon encountering an inaccessible
+input file is based on the belief that \fIbc\fP
+\fIfile1\fP \fIfile2\fP is used most often when at least \fIfile1\fP
+contains data/function declarations/initializations. Having
+\fIbc\fP continue with prerequisite files missing is probably not
+useful. There is no implication in the CONSEQUENCES OF ERRORS
+section that \fIbc\fP must check all its files for accessibility before
+opening any of them.
+.LP
+There was considerable debate on the appropriateness of the language
+accepted by \fIbc\fP. Several reviewers preferred to see
+either a pure subset of the C language or some changes to make the
+language more compatible with C. While the \fIbc\fP language
+has some obvious similarities to C, it has never claimed to be compatible
+with any version of C. An interpreter for a subset of C
+might be a very worthwhile utility, and it could potentially make
+\fIbc\fP obsolete. However, no such utility is known in
+historical practice, and it was not within the scope of this volume
+of IEEE\ Std\ 1003.1-2001 to define such a language and
+utility. If and when they are defined, it may be appropriate to include
+them in a future version of IEEE\ Std\ 1003.1. This
+left the following alternatives:
+.IP " 1." 4
+Exclude any calculator language from this volume of IEEE\ Std\ 1003.1-2001.
+.LP
+The consensus of the standard developers was that a simple programmatic
+calculator language is very useful for both applications
+and interactive users. The only arguments for excluding any calculator
+were that it would become obsolete if and when a
+C-compatible one emerged, or that the absence would encourage the
+development of such a C-compatible one. These arguments did not
+sufficiently address the needs of current application writers.
+.LP
+.IP " 2." 4
+Standardize the historical \fIdc\fP, possibly with minor modifications.
+.LP
+The consensus of the standard developers was that \fIdc\fP is a fundamentally
+less usable language and that that would be far
+too severe a penalty for avoiding the issue of being similar to but
+incompatible with C.
+.LP
+.IP " 3." 4
+Standardize the historical \fIbc\fP, possibly with minor modifications.
+.LP
+This was the approach taken. Most of the proponents of changing the
+language would not have been satisfied until most or all of
+the incompatibilities with C were resolved. Since most of the changes
+considered most desirable would break historical applications
+and require significant modification to historical implementations,
+almost no modifications were made. The one significant
+modification that was made was the replacement of the historical \fIbc\fP
+assignment operators \fB"=+"\fP, and so on, with the
+more modern \fB"+="\fP, and so on. The older versions are considered
+to be fundamentally flawed because of the lexical
+ambiguity in uses like \fIa\fP=-1.
+.LP
+In order to permit implementations to deal with backwards-compatibility
+as they see fit, the behavior of this one ambiguous
+construct was made undefined. (At least three implementations have
+been known to support this change already, so the degree of
+change involved should not be great.)
+.LP
+.LP
+The \fB'%'\fP operator is the mathematical remainder operator when
+\fBscale\fP is zero. The behavior of this operator for
+other values of \fBscale\fP is from historical implementations of
+\fIbc\fP, and has been maintained for the sake of historical
+applications despite its non-intuitive nature.
+.LP
+Historical implementations permit setting \fBibase\fP and \fBobase\fP
+to a broader range of values. This includes values less
+than 2, which were not seen as sufficiently useful to standardize.
+These implementations do not interpret input properly for values
+of \fBibase\fP that are greater than 16. This is because numeric constants
+are recognized syntactically, rather than lexically, as
+described in this volume of IEEE\ Std\ 1003.1-2001. They are built
+from lexical tokens of single hexadecimal digits and
+periods. Since <blank>s between tokens are not visible at the syntactic
+level, it is not possible to recognize the
+multi-digit "digits" used in the higher bases properly. The ability
+to recognize input in these bases was not considered useful
+enough to require modifying these implementations. Note that the recognition
+of numeric constants at the syntactic level is not a
+problem with conformance to this volume of IEEE\ Std\ 1003.1-2001,
+as it does not impact the behavior of conforming
+applications (and correct \fIbc\fP programs). Historical implementations
+also accept input with all of the digits \fB'0'\fP -
+\fB'9'\fP and \fB'A'\fP - \fB'F'\fP regardless of the value of \fBibase\fP;
+since digits with value greater than or equal
+to \fBibase\fP are not really appropriate, the behavior when they
+appear is undefined, except for the common case of:
+.sp
+.RS
+.nf
+
+\fBibase=8;
+ /* Process in octal base. */
+\&...
+ibase=A
+ /* Restore decimal base. */
+\fP
+.fi
+.RE
+.LP
+In some historical implementations, if the expression to be written
+is an uninitialized array element, a leading <space>
+and/or up to four leading 0 characters may be output before the character
+zero. This behavior is considered a bug; it is unlikely
+that any currently conforming application relies on:
+.sp
+.RS
+.nf
+
+\fBecho 'b[3]' | bc
+\fP
+.fi
+.RE
+.LP
+returning 00000 rather than 0.
+.LP
+Exact calculation of the number of fractional digits to output for
+a given value in a base other than 10 can be computationally
+expensive. Historical implementations use a faster approximation,
+and this is permitted. Note that the requirements apply only to
+values of \fBobase\fP that this volume of IEEE\ Std\ 1003.1-2001 requires
+implementations to support (in particular, not
+to 1, 0, or negative bases, if an implementation supports them as
+an extension).
+.LP
+Historical implementations of \fIbc\fP did not allow array parameters
+to be passed as the last parameter to a function. New
+implementations are encouraged to remove this restriction even though
+it is not required by the grammar.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIGrammar Conventions\fP, \fIawk\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/bg.1p b/man-pages-posix-2003/man1p/bg.1p
new file mode 100644
index 0000000..3291974
--- /dev/null
+++ b/man-pages-posix-2003/man1p/bg.1p
@@ -0,0 +1,210 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "BG" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" bg
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+bg \- run jobs in the background
+.SH SYNOPSIS
+.LP
+\fBbg\fP \fB[\fP\fIjob_id\fP \fB...\fP\fB]\fP\fB\fP
+.SH DESCRIPTION
+.LP
+If job control is enabled (see the description of \fIset\fP \fB-m\fP),
+the
+\fIbg\fP utility shall resume suspended jobs from the current environment
+(see \fIShell
+Execution Environment\fP ) by running them as background jobs. If
+the job specified by \fIjob_id\fP is already a running
+background job, the \fIbg\fP utility shall have no effect and shall
+exit successfully.
+.LP
+Using \fIbg\fP to place a job into the background shall cause its
+process ID to become "known in the current shell execution
+environment", as if it had been started as an asynchronous list; see
+\fIAsynchronous
+Lists\fP .
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIjob_id\fP
+Specify the job to be resumed as a background job. If no \fIjob_id\fP
+operand is given, the most recently suspended job shall
+be used. The format of \fIjob_id\fP is described in the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Section 3.203, Job Control Job ID.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIbg\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The output of \fIbg\fP shall consist of a line in the format:
+.sp
+.RS
+.nf
+
+\fB"[%d] %s\\n", <\fP\fIjob-number\fP\fB>, <\fP\fIcommand\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where the fields are as follows:
+.TP 7
+<\fIjob-number\fP>
+A number that can be used to identify the job to the \fIwait\fP, \fIfg\fP,
+and \fIkill\fP utilities. Using these utilities, the
+job can be identified by prefixing the job number with \fB'%'\fP .
+.TP 7
+<\fIcommand\fP>
+The associated command that was given to the shell.
+.sp
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+If job control is disabled, the \fIbg\fP utility shall exit with an
+error and no job shall be placed in the background.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+A job is generally suspended by typing the SUSP character (<control>-Z
+on most systems); see the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface.
+At that
+point, \fIbg\fP can put the job into the background. This is most
+effective when the job is expecting no terminal input and its
+output has been redirected to non-terminal files. A background job
+can be forced to stop when it has terminal output by issuing the
+command:
+.sp
+.RS
+.nf
+
+\fBstty tostop
+\fP
+.fi
+.RE
+.LP
+A background job can be stopped with the command:
+.sp
+.RS
+.nf
+
+\fBkill -s stop\fP \fIjob ID\fP
+.fi
+.RE
+.LP
+The \fIbg\fP utility does not work as expected when it is operating
+in its own utility execution environment because that
+environment has no suspended jobs. In the following examples:
+.sp
+.RS
+.nf
+
+\fB\&... | xargs bg
+(bg)
+\fP
+.fi
+.RE
+.LP
+each \fIbg\fP operates in a different environment and does not share
+its parent shell's understanding of jobs. For this reason,
+\fIbg\fP is generally implemented as a shell regular built-in.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The extensions to the shell specified in this volume of IEEE\ Std\ 1003.1-2001
+have mostly been based on features
+provided by the KornShell. The job control features provided by \fIbg\fP,
+\fIfg\fP, and \fIjobs\fP are also based on the KornShell. The standard
+developers examined the characteristics
+of the C shell versions of these utilities and found that differences
+exist. Despite widespread use of the C shell, the KornShell
+versions were selected for this volume of IEEE\ Std\ 1003.1-2001 to
+maintain a degree of uniformity with the rest of the
+KornShell features selected (such as the very popular command line
+editing features).
+.LP
+The \fIbg\fP utility is expected to wrap its output if the output
+exceeds the number of display columns.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIAsynchronous Lists\fP, \fIfg\fP, \fIkill\fP(), \fIjobs\fP,
+\fIwait\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/break.1p b/man-pages-posix-2003/man1p/break.1p
new file mode 100644
index 0000000..1e45793
--- /dev/null
+++ b/man-pages-posix-2003/man1p/break.1p
@@ -0,0 +1,125 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "BREAK" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" break
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+break \- exit from for, while, or until loop
+.SH SYNOPSIS
+.LP
+\fBbreak\fP \fB[\fP\fIn\fP\fB]\fP
+.SH DESCRIPTION
+.LP
+The \fIbreak\fP utility shall exit from the smallest enclosing \fBfor\fP,
+\fBwhile\fP, or \fBuntil\fP loop, if any; or from
+the \fIn\fPth enclosing loop if \fIn\fP is specified. The value of
+\fIn\fP is an unsigned decimal integer greater than or equal
+to 1. The default shall be equivalent to \fIn\fP=1. If \fIn\fP is
+greater than the number of enclosing loops, the outermost
+enclosing loop shall be exited. Execution shall continue with the
+command immediately following the loop.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+See the DESCRIPTION.
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+None.
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+The \fIn\fP value was not an unsigned decimal integer greater than
+or equal to 1.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.sp
+.RS
+.nf
+
+\fBfor i in * do
+ if test -d "$i" then break fi done
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+In early proposals, consideration was given to expanding the syntax
+of \fIbreak\fP and \fIcontinue\fP to refer to a label associated with
+the appropriate loop as a preferable
+alternative to the \fIn\fP method. However, this volume of IEEE\ Std\ 1003.1-2001
+does reserve the name space of command
+names ending with a colon. It is anticipated that a future implementation
+could take advantage of this and provide something
+like:
+.sp
+.RS
+.nf
+
+\fBoutofloop: for i in a b c d e
+do
+ for j in 0 1 2 3 4 5 6 7 8 9
+ do
+ if test -r "${i}${j}"
+ then break outofloop
+ fi
+ done
+done
+\fP
+.fi
+.RE
+.LP
+and that this might be standardized after implementation experience
+is achieved.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fISpecial Built-In Utilities\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/c99.1p b/man-pages-posix-2003/man1p/c99.1p
new file mode 100644
index 0000000..13dad18
--- /dev/null
+++ b/man-pages-posix-2003/man1p/c99.1p
@@ -0,0 +1,750 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "C99" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" c99
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+c99 \- compile standard C programs
+.SH SYNOPSIS
+.LP
+\fBc99\fP \fB[\fP\fB-c\fP\fB][\fP\fB-D\fP
+\fIname\fP\fB[\fP\fB=\fP\fIvalue\fP\fB]]\fP\fB...\fP\fB[\fP\fB-E\fP\fB][\fP\fB-g\fP\fB][\fP\fB-I\fP
+\fIdirectory\fP\fB]\fP \fB...\fP \fB[\fP\fB-L\fP \fIdirectory\fP\fB]\fP\fB
+.br
+\ \ \ \ \ \ ...\fP \fB[\fP\fB-o\fP
+\fIoutfile\fP\fB][\fP\fB-O\fP\fIoptlevel\fP\fB][\fP\fB-s\fP\fB][\fP\fB-U\fP
+\fIname\fP\fB]\fP\fB...\fP
+\fIoperand\fP \fB... \fP
+.SH DESCRIPTION
+.LP
+The \fIc99\fP utility is an interface to the standard C compilation
+system; it shall accept source code conforming to the
+ISO\ C standard. The system conceptually consists of a compiler and
+link editor. The files referenced by \fIoperand\fPs shall
+be compiled and linked to produce an executable file. (It is unspecified
+whether the linking occurs entirely within the operation
+of \fIc99\fP; some implementations may produce objects that are not
+fully resolved until the file is executed.)
+.LP
+If the \fB-c\fP option is specified, for all pathname operands of
+the form \fIfile\fP \fB.c\fP, the files:
+.sp
+.RS
+.nf
+
+\fB$(basename\fP \fIpathname\fP \fB.c).o
+\fP
+.fi
+.RE
+.LP
+shall be created as the result of successful compilation. If the \fB-c\fP
+option is not specified, it is unspecified whether
+such \fB.o\fP files are created or deleted for the \fIfile\fP \fB.c\fP
+operands.
+.LP
+If there are no options that prevent link editing (such as \fB-c\fP
+or \fB-E\fP), and all operands compile and link without
+error, the resulting executable file shall be written according to
+the \fB-o\fP \fIoutfile\fP option (if present) or to the file
+\fBa.out\fP.
+.LP
+The executable file shall be created as specified in \fIFile Read,
+Write, and
+Creation\fP, except that the file permission bits shall be set to:
+.sp
+.RS
+.nf
+
+S_IRWXO | S_IRWXG | S_IRWXU
+.fi
+.RE
+.LP
+and the bits specified by the \fIumask\fP of the process shall be
+cleared.
+.SH OPTIONS
+.LP
+The \fIc99\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines,
+except that:
+.IP " *" 3
+The \fB-l\fP \fIlibrary\fP operands have the format of options, but
+their position within a list of operands affects the order
+in which libraries are searched.
+.LP
+.IP " *" 3
+The order of specifying the \fB-I\fP and \fB-L\fP options is significant.
+.LP
+.IP " *" 3
+Conforming applications shall specify each option separately; that
+is, grouping option letters (for example, \fB-cO\fP) need
+not be recognized by all implementations.
+.LP
+.LP
+The following options shall be supported:
+.TP 7
+\fB-c\fP
+Suppress the link-edit phase of the compilation, and do not remove
+any object files that are produced.
+.TP 7
+\fB-g\fP
+Produce symbolic information in the object or executable files; the
+nature of this information is unspecified, and may be
+modified by implementation-defined interactions with other options.
+.TP 7
+\fB-s\fP
+Produce object or executable files, or both, from which symbolic and
+other information not required for proper execution using
+the \fIexec\fP family defined in the System Interfaces volume of IEEE\ Std\ 1003.1-2001
+has been removed (stripped). If
+both \fB-g\fP and \fB-s\fP options are present, the action taken is
+unspecified.
+.TP 7
+\fB-o\ \fP \fIoutfile\fP
+Use the pathname \fIoutfile\fP, instead of the default \fBa.out\fP,
+for the executable file produced. If the \fB-o\fP option
+is present with \fB-c\fP or \fB-E\fP, the result is unspecified.
+.TP 7
+\fB-D\ \fP \fIname\fP\fB[=\fP\fIvalue\fP\fB]\fP
+.sp
+Define \fIname\fP as if by a C-language \fB#define\fP directive. If
+no = \fIvalue\fP is given, a value of 1 shall be used. The
+\fB-D\fP option has lower precedence than the \fB-U\fP option. That
+is, if \fIname\fP is used in both a \fB-U\fP and a
+\fB-D\fP option, \fIname\fP shall be undefined regardless of the order
+of the options. Additional implementation-defined
+\fIname\fPs may be provided by the compiler. Implementations shall
+support at least 2048 bytes of \fB-D\fP definitions and 256
+\fInames\fP.
+.TP 7
+\fB-E\fP
+Copy C-language source files to standard output, expanding all preprocessor
+directives; no compilation shall be performed. If
+any operand is not a text file, the effects are unspecified.
+.TP 7
+\fB-I\ \fP \fIdirectory\fP
+Change the algorithm for searching for headers whose names are not
+absolute pathnames to look in the directory named by the
+\fIdirectory\fP pathname before looking in the usual places. Thus,
+headers whose names are enclosed in double-quotes ( \fB""\fP
+) shall be searched for first in the directory of the file with the
+\fB#include\fP line, then in directories named in \fB-I\fP
+options, and last in the usual places. For headers whose names are
+enclosed in angle brackets ( \fB"<>"\fP ), the header
+shall be searched for only in directories named in \fB-I\fP options
+and then in the usual places. Directories named in \fB-I\fP
+options shall be searched in the order specified. Implementations
+shall support at least ten instances of this option in a single
+\fIc99\fP command invocation.
+.TP 7
+\fB-L\ \fP \fIdirectory\fP
+Change the algorithm of searching for the libraries named in the \fB-l\fP
+objects to look in the directory named by the
+\fIdirectory\fP pathname before looking in the usual places. Directories
+named in \fB-L\fP options shall be searched in the order
+specified. Implementations shall support at least ten instances of
+this option in a single \fIc99\fP command invocation. If a
+directory specified by a \fB-L\fP option contains files named \fBlibc.a\fP,
+\fBlibm.a\fP, \fBlibl.a\fP, or \fBliby.a\fP, the
+results are unspecified.
+.TP 7
+\fB-O\ \fP \fIoptlevel\fP
+Specify the level of code optimization. If the \fIoptlevel\fP option-argument
+is the digit \fB'0'\fP, all special code
+optimizations shall be disabled. If it is the digit \fB'1'\fP, the
+nature of the optimization is unspecified. If the \fB-O\fP
+option is omitted, the nature of the system's default optimization
+is unspecified. It is unspecified whether code generated in the
+presence of the \fB-O\fP 0 option is the same as that generated when
+\fB-O\fP is omitted. Other \fIoptlevel\fP values may be
+supported.
+.TP 7
+\fB-U\ \fP \fIname\fP
+Remove any initial definition of \fIname\fP.
+.sp
+.LP
+Multiple instances of the \fB-D\fP, \fB-I\fP, \fB-U\fP, and \fB-L\fP
+options can be specified.
+.SH OPERANDS
+.LP
+An \fIoperand\fP is either in the form of a pathname or the form \fB-l\fP
+\fIlibrary\fP. The application shall ensure that at
+least one operand of the pathname form is specified. The following
+operands shall be supported:
+.TP 7
+\fIfile.\fP\fBc\fP
+A C-language source file to be compiled and optionally linked. The
+application shall ensure that the operand is of this form if
+the \fB-c\fP option is used.
+.TP 7
+\fIfile.\fP\fBa\fP
+A library of object files typically produced by the \fIar\fP utility,
+and passed directly
+to the link editor. Implementations may recognize implementation-defined
+suffixes other than \fB.a\fP as denoting object file
+libraries.
+.TP 7
+\fIfile.\fP\fBo\fP
+An object file produced by \fIc99\fP \fB-c\fP and passed directly
+to the link editor. Implementations may recognize
+implementation-defined suffixes other than \fB.o\fP as denoting object
+files.
+.sp
+.LP
+The processing of other files is implementation-defined.
+.TP 7
+\fI-l\ library\fP
+(The letter ell.) Search the library named:
+.sp
+.RS
+.nf
+
+\fBlib\fP\fIlibrary\fP\fB.a
+\fP
+.fi
+.RE
+.LP
+A library shall be searched when its name is encountered, so the placement
+of a \fB-l\fP operand is significant. Several
+standard libraries can be specified in this manner, as described in
+the EXTENDED DESCRIPTION section. Implementations may recognize
+implementation-defined suffixes other than \fB.a\fP as denoting libraries.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+The input file shall be one of the following: a text file containing
+a C-language source program, an object file in the format
+produced by \fIc99\fP \fB-c\fP, or a library of object files, in the
+format produced by archiving zero or more object files,
+using \fIar\fP. Implementations may supply additional utilities that
+produce files in these
+formats. Additional input file formats are implementation-defined.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIc99\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fITMPDIR\fP
+Provide a pathname that should override the default directory for
+temporary files, if any. On
+XSI-conforming systems, provide a pathname that shall override the
+default directory for temporary files, if any.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+If more than one \fIfile\fP operand ending in \fB.c\fP (or possibly
+other unspecified suffixes) is given, for each such
+file:
+.sp
+.RS
+.nf
+
+\fB"%s:\\n", <\fP\fIfile\fP\fB>
+\fP
+.fi
+.RE
+.LP
+may be written. These messages, if written, shall precede the processing
+of each input file; they shall not be written to the
+standard output if they are written to the standard error, as described
+in the STDERR section.
+.LP
+If the \fB-E\fP option is specified, the standard output shall be
+a text file that represents the results of the preprocessing
+stage of the language; it may contain extra information appropriate
+for subsequent compilation passes.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages. If
+more than one \fIfile\fP operand ending in \fB.c\fP (or
+possibly other unspecified suffixes) is given, for each such file:
+.sp
+.RS
+.nf
+
+\fB"%s:\\n", <\fP\fIfile\fP\fB>
+\fP
+.fi
+.RE
+.LP
+may be written to allow identification of the diagnostic and warning
+messages with the appropriate input file. These messages,
+if written, shall precede the processing of each input file; they
+shall not be written to the standard error if they are written to
+the standard output, as described in the STDOUT section.
+.LP
+This utility may produce warning messages about certain conditions
+that do not warrant returning an error (non-zero) exit
+value.
+.SH OUTPUT FILES
+.LP
+Object files or executable files or both are produced in unspecified
+formats.
+.SH EXTENDED DESCRIPTION
+.SS Standard Libraries
+.LP
+The \fIc99\fP utility shall recognize the following \fB-l\fP operands
+for standard libraries:
+.TP 7
+\fB-l\ c\fP
+This operand shall make visible all functions referenced in the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001,
+with the possible exception of those functions listed as residing
+in \fI<aio.h>\fP, \fI<arpa/inet.h>\fP, \fI<complex.h>\fP, \fI<fenv.h>\fP,
+\fI<math.h>\fP, \fI<mqueue.h>\fP, \fI<netdb.h>\fP, \fI<netinet/in.h>\fP,
+\fI<pthread.h>\fP, \fI<sched.h>\fP, \fI<semaphore.h>\fP, \fI<spawn.h>\fP,
+\fI<sys/socket.h>\fP, \fIpthread_kill\fP(), and \fIpthread_sigmask\fP()
+in \fI<signal.h>\fP, \fI<trace.h>\fP, functions
+marked as extensions other than as part of the MF or MPR extensions
+in \fI<sys/mman.h>\fP, functions marked as ADV in \fI<fcntl.h>\fP,
+and functions marked as CS, CPT, and TMR in \fI<time.h>\fP. This operand
+shall not be required to be present to cause a search of this
+library.
+.TP 7
+\fB-l\ l\fP
+This operand shall make visible all functions required by the C-language
+output of \fIlex\fP that are not made available through the \fB-l\ c\fP
+operand.
+.TP 7
+\fB-l\ pthread\fP
+This operand shall make visible all functions referenced in \fI<pthread.h>\fP
+and \fIpthread_kill\fP() and \fIpthread_sigmask\fP() referenced in
+\fI<signal.h>\fP. An implementation may search this library in the
+absence of this
+operand.
+.TP 7
+\fB-l\ m\fP
+This operand shall make visible all functions referenced in \fI<math.h>\fP,
+\fI<complex.h>\fP, and \fI<fenv.h>\fP. An
+implementation may search this library in the absence of this operand.
+.TP 7
+\fB-l\ rt\fP
+This operand shall make visible all functions referenced in \fI<aio.h>\fP,
+\fI<mqueue.h>\fP, \fI<sched.h>\fP, \fI<semaphore.h>\fP, and \fI<spawn.h>\fP,
+functions marked as extensions other than as part of the MF or MPR
+extensions in \fI<sys/mman.h>\fP, functions marked as ADV in \fI<fcntl.h>\fP,
+and functions marked as CS, CPT, and TMR in \fI<time.h>\fP. An implementation
+may search this library in the absence of this operand.
+.TP 7
+\fB-l\ trace\fP
+This operand shall make visible all functions referenced in \fI<trace.h>\fP.
+An
+implementation may search this library in the absence of this operand.
+.TP 7
+\fB-l\ xnet\fP
+This operand makes visible all functions referenced in \fI<arpa/inet.h>\fP,
+\fI<netdb.h>\fP, \fI<netinet/in.h>\fP, and \fI<sys/socket.h>\fP. An
+implementation may search this library in the absence of this
+operand.
+.TP 7
+\fB-l\ y\fP
+This operand shall make visible all functions required by the C-language
+output of \fIyacc\fP that are not made available through the \fB-l\ c\fP
+operand.
+.sp
+.LP
+In the absence of options that inhibit invocation of the link editor,
+such as \fB-c\fP or \fB-E\fP, the \fIc99\fP utility
+shall cause the equivalent of a \fB-l\ c\fP operand to be passed to
+the link editor as the last \fB-l\fP operand, causing it
+to be searched after all other object files and libraries are loaded.
+.LP
+It is unspecified whether the libraries \fBlibc.a\fP, \fBlibm.a\fP,
+\fBlibrt.a\fP, \fBlibpthread.a\fP, \fBlibl.a\fP,
+\fBliby.a\fP, or \fBlibxnet.a\fP exist as regular files. The implementation
+may accept as \fB-l\fP operands names of objects
+that do not exist as regular files.
+.SS External Symbols
+.LP
+The C compiler and link editor shall support the significance of external
+symbols up to a length of at least 31 bytes; the
+action taken upon encountering symbols exceeding the implementation-defined
+maximum symbol length is unspecified.
+.LP
+The compiler and link editor shall support a minimum of 511 external
+symbols per source or object file, and a minimum of 4095
+external symbols in total. A diagnostic message shall be written to
+the standard output if the implementation-defined limit is
+exceeded; other actions are unspecified.
+.SS Programming Environments
+.LP
+All implementations shall support one of the following programming
+environments as a default. Implementations may support more
+than one of the following programming environments. Applications can
+use \fIsysconf\fP()
+or \fIgetconf\fP to determine which programming environments are supported.
+.br
+.sp
+.ce 1
+\fBTable: Programming Environments: Type Sizes\fP
+.TS C
+center; l2 l2 l2 l2 l.
+\fBProgramming Environment\fP \fBBits in\fP \fBBits in\fP \fBBits in\fP \fBBits in\fP
+\fB\fIgetconf\fP Name\fP \fBint\fP \fBlong\fP \fBpointer\fP \fBoff_t\fP
+_POSIX_V6_ILP32_OFF32 32 32 32 32
+_POSIX_V6_ILP32_OFFBIG 32 32 32 >=64
+_POSIX_V6_LP64_OFF64 32 64 64 64
+_POSIX_V6_LPBIG_OFFBIG >=32 >=64 >=64 >=64
+.TE
+.LP
+All implementations shall support one or more environments where the
+widths of the following types are no greater than the width
+of type \fBlong\fP:
+\fBblksize_t\fP, \fBcc_t\fP, \fBmode_t\fP, \fBnfds_t\fP, \fBpid_t\fP,
+\fBptrdiff_t\fP, \fBsize_t\fP,
+\fBspeed_t\fP, \fBssize_t\fP, \fBsuseconds_t\fP, \fBtcflag_t\fP, \fBuseconds_t\fP,
+\fBwchar_t\fP, \fBwint_t\fP
+.LP
+The executable files created when these environments are selected
+shall be in a proper format for execution by the \fIexec\fP
+family of functions. Each environment may be one of the ones in Programming
+Environments: Type Sizes, or
+it may be another environment. The names for the environments that
+meet this requirement shall be output by a \fIgetconf\fP command using
+the _POSIX_V6_WIDTH_RESTRICTED_ENVS argument. If more than one
+environment meets the requirement, the names of all such environments
+shall be output on separate lines. Any of these names can
+then be used in a subsequent \fIgetconf\fP command to obtain the flags
+specific to that
+environment with the following suffixes added as appropriate:
+.TP 7
+_CFLAGS
+To get the C compiler flags.
+.TP 7
+_LDFLAGS
+To get the linker/loader flags.
+.TP 7
+_LIBS
+To get the libraries.
+.sp
+.LP
+This requirement may be removed in a future version of IEEE\ Std\ 1003.1.
+.LP
+When this utility processes a file containing a function called \fImain\fP(),
+it shall be defined with a return type equivalent
+to \fBint\fP. Using return from the initial call to \fImain\fP() shall
+be equivalent (other than with respect to language scope
+issues) to calling \fIexit\fP() with the returned value. Reaching
+the end of the initial call
+to \fImain\fP() shall be equivalent to calling \fIexit\fP(0). The
+implementation shall not declare a prototype for this
+function.
+.LP
+Implementations provide configuration strings for C compiler flags,
+linker/loader flags, and libraries for each supported
+environment. When an application needs to use a specific programming
+environment rather than the implementation default programming
+environment while compiling, the application shall first verify that
+the implementation supports the desired environment. If the
+desired programming environment is supported, the application shall
+then invoke \fIc99\fP with the appropriate C compiler flags as
+the first options for the compile, the appropriate linker/loader flags
+after any other options but before any operands, and the
+appropriate libraries at the end of the operands.
+.LP
+Conforming applications shall not attempt to link together object
+files compiled for different programming models. Applications
+shall also be aware that binary data placed in shared memory or in
+files might not be recognized by applications built for other
+programming models.
+.br
+.sp
+.ce 1
+\fBTable: Programming Environments: \fIc99\fP and \fIcc\fP Arguments\fP
+.TS C
+center; l1 l1 l.
+\fBProgramming Environment\fP \fB\ \fP \fB\fIc99\fP and \fIcc\fP Arguments\fP
+\fB\fIgetconf\fP Name\fP \fBUse\fP \fB\fIgetconf\fP Name\fP
+_POSIX_V6_ILP32_OFF32 C Compiler Flags POSIX_V6_ILP32_OFF32_CFLAGS
+\ Linker/Loader Flags POSIX_V6_ILP32_OFF32_LDFLAGS
+\ Libraries POSIX_V6_ILP32_OFF32_LIBS
+_POSIX_V6_ILP32_OFFBIG C Compiler Flags POSIX_V6_ILP32_OFFBIG_CFLAGS
+\ Linker/Loader Flags POSIX_V6_ILP32_OFFBIG_LDFLAGS
+\ Libraries POSIX_V6_ILP32_OFFBIG_LIBS
+_POSIX_V6_LP64_OFF64 C Compiler Flags POSIX_V6_LP64_OFF64_CFLAGS
+\ Linker/Loader Flags POSIX_V6_LP64_OFF64_LDFLAGS
+\ Libraries POSIX_V6_LP64_OFF64_LIBS
+_POSIX_V6_LPBIG_OFFBIG C Compiler Flags POSIX_V6_LPBIG_OFFBIG_CFLAGS
+\ Linker/Loader Flags POSIX_V6_LPBIG_OFFBIG_LDFLAGS
+\ Libraries POSIX_V6_LPBIG_OFFBIG_LIBS
+.TE
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful compilation or link edit.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+When \fIc99\fP encounters a compilation error that causes an object
+file not to be created, it shall write a diagnostic to
+standard error and continue to compile other source code operands,
+but it shall not perform the link phase and return a non-zero
+exit status. If the link edit is unsuccessful, a diagnostic message
+shall be written to standard error and \fIc99\fP exits with a
+non-zero status. A conforming application shall rely on the exit status
+of \fIc99\fP, rather than on the existence or mode of the
+executable file.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Since the \fIc99\fP utility usually creates files in the current directory
+during the compilation process, it is typically
+necessary to run the \fIc99\fP utility in a directory in which a file
+can be created.
+.LP
+On systems providing POSIX Conformance (see the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Chapter 2, Conformance), \fIc99\fP is required
+only with the C-Language Development
+option; XSI-conformant systems always provide \fIc99\fP.
+.LP
+Some historical implementations have created \fB.o\fP files when \fB-c\fP
+is not specified and more than one source file is
+given. Since this area is left unspecified, the application cannot
+rely on \fB.o\fP files being created, but it also must be
+prepared for any related \fB.o\fP files that already exist being deleted
+at the completion of the link edit.
+.LP
+Some historical implementations have permitted \fB-L\fP options to
+be interspersed with \fB-l\fP operands on the command line.
+For an application to compile consistently on systems that do not
+behave like this, it is necessary for a conforming application to
+supply all \fB-L\fP options before any of the \fB-l\fP options.
+.LP
+There is the possible implication that if a user supplies versions
+of the standard functions (before they would be encountered
+by an implicit \fB-l\ c\fP or explicit \fB-l\ m\fP), that those versions
+would be used in place of the standard versions.
+There are various reasons this might not be true (functions defined
+as macros, manipulations for clean name space, and so on), so
+the existence of files named in the same manner as the standard libraries
+within the \fB-L\fP directories is explicitly stated to
+produce unspecified behavior.
+.LP
+All of the functions specified in the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001 may be made visible by
+implementations when the Standard C Library is searched. Conforming
+applications must explicitly request searching the other
+standard libraries when functions made visible by those libraries
+are used.
+.SH EXAMPLES
+.IP " 1." 4
+The following usage example compiles \fBfoo.c\fP and creates the executable
+file \fBfoo\fP:
+.sp
+.RS
+.nf
+
+\fBc99 -o foo foo.c
+\fP
+.fi
+.RE
+.LP
+The following usage example compiles \fBfoo.c\fP and creates the object
+file \fBfoo.o\fP:
+.sp
+.RS
+.nf
+
+\fBc99 -c foo.c
+\fP
+.fi
+.RE
+.LP
+The following usage example compiles \fBfoo.c\fP and creates the executable
+file \fBa.out\fP:
+.sp
+.RS
+.nf
+
+\fBc99 foo.c
+\fP
+.fi
+.RE
+.LP
+The following usage example compiles \fBfoo.c\fP, links it with \fBbar.o\fP,
+and creates the executable file \fBa.out\fP. It
+may also create and leave \fBfoo.o\fP:
+.sp
+.RS
+.nf
+
+\fBc99 foo.c bar.o
+\fP
+.fi
+.RE
+.LP
+.IP " 2." 4
+The following example shows how an application using threads interfaces
+can test for support of and use a programming
+environment supporting 32-bit \fBint\fP, \fBlong\fP, and \fBpointer\fP
+types and an \fBoff_t\fP type using at least 64
+bits:
+.sp
+.RS
+.nf
+
+\fBif [ $(getconf _POSIX_V6_ILP32_OFFBIG) != "-1" ]
+then
+ c99 $(getconf POSIX_V6_ILP32_OFFBIG_CFLAGS) -D_XOPEN_SOURCE=600 \\
+ $(getconf POSIX_V6_ILP32_OFFBIG_LDFLAGS) foo.c -o foo \\
+ $(getconf POSIX_V6_ILP32_OFFBIG_LIBS) -l pthread
+else
+ echo ILP32_OFFBIG programming environment not supported
+ exit 1
+fi
+\fP
+.fi
+.RE
+.LP
+.IP " 3." 4
+The following examples clarify the use and interactions of \fB-L\fP
+options and \fB-l\fP operands.
+.LP
+Consider the case in which module \fBa.c\fP calls function \fIf\fP()
+in library \fBlibQ.a\fP, and module \fBb.c\fP calls
+function \fIg\fP() in library \fBlibp.a\fP. Assume that both libraries
+reside in \fB/a/b/c\fP. The command line to compile and
+link in the desired way is:
+.sp
+.RS
+.nf
+
+\fBc99 -L /a/b/c main.o a.c -l Q b.c -l p
+\fP
+.fi
+.RE
+.LP
+In this case the \fB-l\ Q\fP operand need only precede the first \fB-l\ p\fP
+operand, since both \fBlibQ.a\fP and
+\fBlibp.a\fP reside in the same directory.
+.LP
+Multiple \fB-L\fP operands can be used when library name collisions
+occur. Building on the previous example, suppose that the
+user wants to use a new \fBlibp.a\fP, in \fB/a/a/a\fP, but still wants
+\fIf\fP() from \fB/a/b/c/libQ.a\fP:
+.sp
+.RS
+.nf
+
+\fBc99 -L /a/a/a -L /a/b/c main.o a.c -l Q b.c -l p
+\fP
+.fi
+.RE
+.LP
+In this example, the linker searches the \fB-L\fP options in the order
+specified, and finds \fB/a/a/a/libp.a\fP before
+\fB/a/b/c/libp.a\fP when resolving references for \fBb.c\fP. The order
+of the \fB-l\fP operands is still important, however.
+.LP
+.IP " 4." 4
+The following example shows how an application can use a programming
+environment where the widths of the following types:
+\fBblksize_t\fP, \fBcc_t\fP, \fBmode_t\fP, \fBnfds_t\fP, \fBpid_t\fP,
+\fBptrdiff_t\fP, \fBsize_t\fP,
+\fBspeed_t\fP, \fBssize_t\fP, \fBsuseconds_t\fP, \fBtcflag_t\fP, \fBuseconds_t\fP,
+\fBwchar_t\fP, \fBwint_t\fP
+.LP
+are no greater than the width of type \fBlong\fP:
+.sp
+.RS
+.nf
+
+\fB# First choose one of the listed environments ...
+.sp
+
+# ... if there are no additional constraints, the first one will do:
+CENV=$(getconf _POSIX_V6_WIDTH_RESTRICTED_ENVS | head -n l)
+.sp
+
+# ... or, if an environment that supports large files is preferred,
+# look for names that contain "OFF64" or "OFFBIG". (This chooses
+# the last one in the list if none match.)
+for CENV in $(getconf _POSIX_V6_WIDTH_RESTRICTED_ENVS)
+do
+ case $CENV in
+ *OFF64*|*OFFBIG*) break ;;
+ esac
+done
+.sp
+
+# The chosen environment name can now be used like this:
+.sp
+
+c99 $(getconf ${CENV}_CFLAGS) -D _POSIX_C_SOURCE=200112L \\
+$(getconf ${CENV}_LDFLAGS) foo.c -o foo \\
+$(getconf ${CENV}_LIBS)
+\fP
+.fi
+.RE
+.LP
+.SH RATIONALE
+.LP
+The \fIc99\fP utility is based on the \fIc89\fP utility originally
+introduced in the ISO\ POSIX-2:1993 standard.
+.LP
+Some of the changes from \fIc89\fP include the modification to the
+contents of the Standard Libraries section to account for
+new headers and options; for example, \fI<spawn.h>\fP added to the
+\fB-l\ rt\fP
+operand, and the \fB-l\fP trace operand added for the Tracing functions.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIFile Read, Write, and Creation\fP, \fIar\fP, \fIgetconf\fP,
+\fImake\fP, \fInm\fP, \fIstrip\fP, \fIumask\fP(), the System Interfaces
+volume of
+IEEE\ Std\ 1003.1-2001, \fIexec\fP, \fIsysconf\fP(), the Base Definitions
+volume
+of IEEE\ Std\ 1003.1-2001, Chapter 13, Headers
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/cal.1p b/man-pages-posix-2003/man1p/cal.1p
new file mode 100644
index 0000000..9226856
--- /dev/null
+++ b/man-pages-posix-2003/man1p/cal.1p
@@ -0,0 +1,149 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CAL" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" cal
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+cal \- print a calendar
+.SH SYNOPSIS
+.LP
+\fBcal\fP \fB[[\fP\fImonth\fP\fB]\fP \fIyear\fP \fB]\fP\fB\fP
+.SH DESCRIPTION
+.LP
+The \fIcal\fP utility shall write a calendar to standard output using
+the Julian calendar for dates from January 1, 1 through
+September 2, 1752 and the Gregorian calendar for dates from September
+14, 1752 through December 31, 9999 as though the Gregorian
+calendar had been adopted on September 14, 1752.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fImonth\fP
+Specify the month to be displayed, represented as a decimal integer
+from 1 (January) to 12 (December). The default shall be the
+current month.
+.TP 7
+\fIyear\fP
+Specify the year for which the calendar is displayed, represented
+as a decimal integer from 1 to 9999. The default shall be the
+current year.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIcal\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard error,
+and informative messages written to standard output.
+.TP 7
+\fILC_TIME\fP
+Determine the format and contents of the calendar.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fITZ\fP
+Determine the timezone used to calculate the value of the current
+month.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The standard output shall be used to display the calendar, in an unspecified
+format.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Note that:
+.sp
+.RS
+.nf
+
+\fBcal 83
+\fP
+.fi
+.RE
+.LP
+refers to A.D. 83, not 1983.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+A future version of IEEE\ Std\ 1003.1-2001 may support locale-specific
+recognition of the date of adoption of the
+Gregorian calendar.
+.SH SEE ALSO
+.LP
+None.
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/cat.1p b/man-pages-posix-2003/man1p/cat.1p
new file mode 100644
index 0000000..6bb3242
--- /dev/null
+++ b/man-pages-posix-2003/man1p/cat.1p
@@ -0,0 +1,281 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CAT" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" cat
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+cat \- concatenate and print files
+.SH SYNOPSIS
+.LP
+\fBcat\fP \fB[\fP\fB-u\fP\fB][\fP\fIfile\fP \fB...\fP\fB]\fP
+.SH DESCRIPTION
+.LP
+The \fIcat\fP utility shall read files in sequence and shall write
+their contents to the standard output in the same
+sequence.
+.SH OPTIONS
+.LP
+The \fIcat\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following option shall be supported:
+.TP 7
+\fB-u\fP
+Write bytes from the input file to the standard output without delay
+as each is read.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of an input file. If no \fIfile\fP operands are specified,
+the standard input shall be used. If a \fIfile\fP is
+\fB'-'\fP, the \fIcat\fP utility shall read from the standard input
+at that point in the sequence. The \fIcat\fP utility
+shall not close and reopen standard input when it is referenced in
+this way, but shall accept multiple occurrences of \fB'-'\fP
+as a \fIfile\fP operand.
+.sp
+.SH STDIN
+.LP
+The standard input shall be used only if no \fIfile\fP operands are
+specified, or if a \fIfile\fP operand is \fB'-'\fP .
+See the INPUT FILES section.
+.SH INPUT FILES
+.LP
+The input files can be any file type.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIcat\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The standard output shall contain the sequence of bytes read from
+the input files. Nothing else shall be written to the standard
+output.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+All input files were output successfully.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The \fB-u\fP option has value in prototyping non-blocking reads from
+FIFOs. The intent is to support the following
+sequence:
+.sp
+.RS
+.nf
+
+\fBmkfifo foo
+cat -u foo > /dev/tty13 &
+cat -u > foo
+\fP
+.fi
+.RE
+.LP
+It is unspecified whether standard output is or is not buffered in
+the default case. This is sometimes of interest when standard
+output is associated with a terminal, since buffering may delay the
+output. The presence of the \fB-u\fP option guarantees that
+unbuffered I/O is available. It is implementation-defined whether
+the \fIcat\fP utility buffers output if the \fB-u\fP option is
+not specified. Traditionally, the \fB-u\fP option is implemented using
+the equivalent of the \fIsetvbuf\fP() function defined in the System
+Interfaces volume of
+IEEE\ Std\ 1003.1-2001.
+.SH EXAMPLES
+.LP
+The following command:
+.sp
+.RS
+.nf
+
+\fBcat myfile
+\fP
+.fi
+.RE
+.LP
+writes the contents of the file \fBmyfile\fP to standard output.
+.LP
+The following command:
+.sp
+.RS
+.nf
+
+\fBcat doc1 doc2 > doc.all
+\fP
+.fi
+.RE
+.LP
+concatenates the files \fBdoc1\fP and \fBdoc2\fP and writes the result
+to \fBdoc.all\fP.
+.LP
+Because of the shell language mechanism used to perform output redirection,
+a command such as this:
+.sp
+.RS
+.nf
+
+\fBcat doc doc.end > doc
+\fP
+.fi
+.RE
+.LP
+causes the original data in \fBdoc\fP to be lost.
+.LP
+The command:
+.sp
+.RS
+.nf
+
+\fBcat start - middle - end > file
+\fP
+.fi
+.RE
+.LP
+when standard input is a terminal, gets two arbitrary pieces of input
+from the terminal with a single invocation of \fIcat\fP.
+Note, however, that if standard input is a regular file, this would
+be equivalent to the command:
+.sp
+.RS
+.nf
+
+\fBcat start - middle /dev/null end > file
+\fP
+.fi
+.RE
+.LP
+because the entire contents of the file would be consumed by \fIcat\fP
+the first time \fB'-'\fP was used as a \fIfile\fP
+operand and an end-of-file condition would be detected immediately
+when \fB'-'\fP was referenced the second time.
+.SH RATIONALE
+.LP
+Historical versions of the \fIcat\fP utility include the options \fB-e\fP,
+\fB-t\fP, and \fB-v\fP, which permit the ends of
+lines, <tab>s, and invisible characters, respectively, to be rendered
+visible in the output. The standard developers omitted
+these options because they provide too fine a degree of control over
+what is made visible, and similar output can be obtained using
+a command such as:
+.sp
+.RS
+.nf
+
+\fBsed -n -e 's/$/$/' -e l pathname
+\fP
+.fi
+.RE
+.LP
+The \fB-s\fP option was omitted because it corresponds to different
+functions in BSD and System V-based systems. The BSD
+\fB-s\fP option to squeeze blank lines can be accomplished by the
+shell script shown in the following example:
+.sp
+.RS
+.nf
+
+\fBsed -n '
+# Write non-empty lines.
+/./ {
+ p
+ d
+ }
+# Write a single empty line, then look for more empty lines.
+/^$/ p
+# Get next line, discard the held <newline> (empty line),
+# and look for more empty lines.
+:Empty
+/^$/ {
+ N
+ s/.//
+ b Empty
+ }
+# Write the non-empty line before going back to search
+# for the first in a set of empty lines.
+ p
+'
+\fP
+.fi
+.RE
+.LP
+The System V \fB-s\fP option to silence error messages can be accomplished
+by redirecting the standard error. Note that the BSD
+documentation for \fIcat\fP uses the term "blank line" to mean the
+same as the POSIX "empty line'': a line consisting only of a
+<newline>.
+.LP
+The BSD \fB-n\fP option was omitted because similar functionality
+can be obtained from the \fB-n\fP option of the \fIpr\fP utility.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fImore\fP, the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+\fIsetvbuf\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/cd.1p b/man-pages-posix-2003/man1p/cd.1p
new file mode 100644
index 0000000..36322c1
--- /dev/null
+++ b/man-pages-posix-2003/man1p/cd.1p
@@ -0,0 +1,355 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CD" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" cd
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+cd \- change the working directory
+.SH SYNOPSIS
+.LP
+\fBcd\fP \fB[\fP\fB-L | -P\fP\fB] [\fP\fIdirectory\fP\fB]\fP\fB
+.br
+.sp
+cd -
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIcd\fP utility shall change the working directory of the current
+shell execution environment (see \fIShell Execution Environment\fP
+) by executing the following steps in sequence. (In the
+following steps, the symbol \fBcurpath\fP represents an intermediate
+value used to simplify the description of the algorithm used
+by \fIcd\fP. There is no requirement that \fBcurpath\fP be made visible
+to the application.)
+.IP " 1." 4
+If no \fIdirectory\fP operand is given and the \fIHOME\fP environment
+variable is empty or undefined, the default behavior is
+implementation-defined and no further steps shall be taken.
+.LP
+.IP " 2." 4
+If no \fIdirectory\fP operand is given and the \fIHOME\fP environment
+variable is set to a non-empty value, the \fIcd\fP
+utility shall behave as if the directory named in the \fIHOME\fP environment
+variable was specified as the \fIdirectory\fP
+operand.
+.LP
+.IP " 3." 4
+If the \fIdirectory\fP operand begins with a slash character, set
+\fBcurpath\fP to the operand and proceed to step 7.
+.LP
+.IP " 4." 4
+If the first component of the \fIdirectory\fP operand is dot or dot-dot,
+proceed to step 6.
+.LP
+.IP " 5." 4
+Starting with the first pathname in the colon-separated pathnames
+of \fICDPATH\fP (see the ENVIRONMENT VARIABLES section) if
+the pathname is non-null, test if the concatenation of that pathname,
+a slash character, and the \fIdirectory\fP operand names a
+directory. If the pathname is null, test if the concatenation of dot,
+a slash character, and the operand names a directory. In
+either case, if the resulting string names an existing directory,
+set \fBcurpath\fP to that string and proceed to step 7.
+Otherwise, repeat this step with the next pathname in \fICDPATH\fP
+until all pathnames have been tested.
+.LP
+.IP " 6." 4
+Set \fBcurpath\fP to the string formed by the concatenation of the
+value of \fIPWD\fP, a slash character, and the
+operand.
+.LP
+.IP " 7." 4
+If the \fB-P\fP option is in effect, the \fIcd\fP utility shall perform
+actions equivalent to the \fIchdir\fP() function, called with \fBcurpath\fP
+as the \fIpath\fP argument. If these actions
+succeed, the \fIPWD\fP environment variable shall be set to an absolute
+pathname for the current working directory and shall not
+contain filename components that, in the context of pathname resolution,
+refer to a file of type symbolic link. If there is
+insufficient permission on the new directory, or on any parent of
+that directory, to determine the current working directory, the
+value of the \fIPWD\fP environment variable is unspecified. If the
+actions equivalent to \fIchdir\fP() fail for any reason, the \fIcd\fP
+utility shall display an appropriate error message
+and not alter the \fIPWD\fP environment variable. Whether the actions
+equivalent to \fIchdir\fP() succeed or fail, no further steps shall
+be taken.
+.LP
+.IP " 8." 4
+The \fBcurpath\fP value shall then be converted to canonical form
+as follows, considering each component from beginning to end,
+in sequence:
+.RS
+.IP " a." 4
+Dot components and any slashes that separate them from the next component
+shall be deleted.
+.LP
+.IP " b." 4
+For each dot-dot component, if there is a preceding component and
+it is neither root nor dot-dot, the preceding component, all
+slashes separating the preceding component from dot-dot, dot-dot and
+all slashes separating dot-dot from the following component
+shall be deleted.
+.LP
+.IP " c." 4
+An implementation may further simplify \fBcurpath\fP by removing any
+trailing slash characters that are not also leading
+slashes, replacing multiple non-leading consecutive slashes with a
+single slash, and replacing three or more leading slashes with a
+single slash. If, as a result of this canonicalization, the \fBcurpath\fP
+variable is null, no further steps shall be taken.
+.LP
+.RE
+.LP
+.IP " 9." 4
+The \fIcd\fP utility shall then perform actions equivalent to the
+\fIchdir\fP() function
+called with \fBcurpath\fP as the \fIpath\fP argument. If these actions
+failed for any reason, the \fIcd\fP utility shall display
+an appropriate error message and no further steps shall be taken.
+The \fIPWD\fP environment variable shall be set to
+\fBcurpath\fP.
+.LP
+.LP
+If, during the execution of the above steps, the \fIPWD\fP environment
+variable is changed, the \fIOLDPWD\fP environment
+variable shall also be changed to the value of the old working directory
+(that is the current working directory immediately prior
+to the call to \fIcd\fP).
+.SH OPTIONS
+.LP
+The \fIcd\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported by the implementation:
+.TP 7
+\fB-L\fP
+Handle the operand dot-dot logically; symbolic link components shall
+not be resolved before dot-dot components are processed
+(see steps 8. and 9. in the DESCRIPTION).
+.TP 7
+\fB-P\fP
+Handle the operand dot-dot physically; symbolic link components shall
+be resolved before dot-dot components are processed (see
+step 7. in the DESCRIPTION).
+.sp
+.LP
+If both \fB-L\fP and \fB-P\fP options are specified, the last of these
+options shall be used and all others ignored. If
+neither \fB-L\fP nor \fB-P\fP is specified, the operand shall be handled
+dot-dot logically; see the DESCRIPTION.
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIdirectory\fP
+An absolute or relative pathname of the directory that shall become
+the new working directory. The interpretation of a relative
+pathname by \fIcd\fP depends on the \fB-L\fP option and the \fICDPATH\fP
+and \fIPWD\fP environment variables. If
+\fIdirectory\fP is an empty string, the results are unspecified.
+.TP 7
+-
+When a hyphen is used as the operand, this shall be equivalent to
+the command:
+.sp
+.RS
+.nf
+
+\fBcd "$OLDPWD" && pwd
+\fP
+.fi
+.RE
+.LP
+which changes to the previous working directory and then writes its
+name.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIcd\fP:
+.TP 7
+\fICDPATH\fP
+A colon-separated list of pathnames that refer to directories. The
+\fIcd\fP utility shall use this list in its attempt to
+change the directory, as described in the DESCRIPTION. An empty string
+in place of a directory pathname represents the current
+directory. If \fICDPATH\fP is not set, it shall be treated as if it
+were an empty string.
+.TP 7
+\fIHOME\fP
+The name of the directory, used when no \fIdirectory\fP operand is
+specified.
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fIOLDPWD\fP
+A pathname of the previous working directory, used by \fIcd\fP \fB-\fP.
+.TP 7
+\fIPWD\fP
+This variable shall be set as specified in the DESCRIPTION. If an
+application sets or unsets the value of \fIPWD\fP, the
+behavior of \fIcd\fP is unspecified.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+If a non-empty directory name from \fICDPATH\fP is used, or if \fIcd\fP
+\fB-\fP is used, an absolute pathname of the new
+working directory shall be written to the standard output as follows:
+.sp
+.RS
+.nf
+
+\fB"%s\\n", <\fP\fInew directory\fP\fB>
+\fP
+.fi
+.RE
+.LP
+Otherwise, there shall be no output.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+The directory was successfully changed.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+The working directory shall remain unchanged.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Since \fIcd\fP affects the current shell execution environment, it
+is always provided as a shell regular built-in. If it is
+called in a subshell or separate utility execution environment, such
+as one of the following:
+.sp
+.RS
+.nf
+
+\fB(cd /tmp)
+nohup cd
+find . -exec cd {} \\;
+\fP
+.fi
+.RE
+.LP
+it does not affect the working directory of the caller's environment.
+.LP
+The user must have execute (search) permission in \fIdirectory\fP
+in order to change to it.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The use of the \fICDPATH\fP was introduced in the System V shell.
+Its use is analogous to the use of the \fIPATH\fP variable
+in the shell. The BSD C shell used a shell parameter \fIcdpath\fP
+for this purpose.
+.LP
+A common extension when \fIHOME\fP is undefined is to get the login
+directory from the user database for the invoking user.
+This does not occur on System V implementations.
+.LP
+Some historical shells, such as the KornShell, took special actions
+when the directory name contained a dot-dot component,
+selecting the logical parent of the directory, rather than the actual
+parent directory; that is, it moved up one level toward the
+\fB'/'\fP in the pathname, remembering what the user typed, rather
+than performing the equivalent of:
+.sp
+.RS
+.nf
+
+\fBchdir("..");
+\fP
+.fi
+.RE
+.LP
+In such a shell, the following commands would not necessarily produce
+equivalent output for all directories:
+.sp
+.RS
+.nf
+
+\fBcd .. && ls ls ..
+\fP
+.fi
+.RE
+.LP
+This behavior is now the default. It is not consistent with the definition
+of dot-dot in most historical practice; that is,
+while this behavior has been optionally available in the KornShell,
+other shells have historically not supported this
+functionality. The logical pathname is stored in the \fIPWD\fP environment
+variable when the \fIcd\fP utility completes and this
+value is used to construct the next directory name if \fIcd\fP is
+invoked with the \fB-L\fP option.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIShell Execution Environment\fP, \fIpwd\fP, the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIchdir\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/cflow.1p b/man-pages-posix-2003/man1p/cflow.1p
new file mode 100644
index 0000000..3d617de
--- /dev/null
+++ b/man-pages-posix-2003/man1p/cflow.1p
@@ -0,0 +1,255 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CFLOW" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" cflow
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+cflow \- generate a C-language flowgraph (\fBDEVELOPMENT\fP)
+.SH SYNOPSIS
+.LP
+\fBcflow\fP \fB[\fP\fB-r\fP\fB][\fP\fB-d\fP \fInum\fP\fB][\fP\fB-D\fP
+\fIname\fP\fB[\fP\fB=\fP\fIdef\fP\fB]]\fP \fB...\fP \fB[\fP\fB-i\fP
+\fIincl\fP\fB][\fP\fB-I\fP
+\fIdir\fP\fB]\fP \fB...
+.br
+\ \ \ \ \ \ \fP \fB[\fP\fB-U\fP \fIdir\fP\fB]\fP \fB...\fP \fIfile\fP
+\fB\&... \fP
+.SH DESCRIPTION
+.LP
+The \fIcflow\fP utility shall analyze a collection of object files
+or assembler, C-language, \fIlex\fP, or \fIyacc\fP source files, and
+attempt to build a
+graph, written to standard output, charting the external references.
+.SH OPTIONS
+.LP
+The \fIcflow\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines,
+except that the order of the \fB-D\fP,
+\fB-I\fP, and \fB-U\fP options (which are identical to their interpretation
+by \fIc99\fP) is
+significant.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-d\ \fP \fInum\fP
+Indicate the depth at which the flowgraph is cut off. The application
+shall ensure that the argument \fInum\fP is a decimal
+integer. By default this is a very large number (typically greater
+than 32000). Attempts to set the cut-off depth to a non-positive
+integer shall be ignored.
+.TP 7
+\fB-i\ \fP \fIincl\fP
+Increase the number of included symbols. The \fIincl\fP option-argument
+is one of the following characters:
+.TP 7
+\fIx\fP
+.RS
+Include external and static data symbols. The default shall be to
+include only functions in the flowgraph.
+.RE
+.TP 7
+\fB_\fP
+.RS
+(Underscore) Include names that begin with an underscore. The default
+shall be to exclude these functions (and data if
+\fB-i\ x\fP is used).
+.RE
+.sp
+.TP 7
+\fB-r\fP
+Reverse the caller:callee relationship, producing an inverted listing
+showing the callers of each function. The listing shall
+also be sorted in lexicographical order by callee.
+.sp
+.SH OPERANDS
+.LP
+The following operand is supported:
+.TP 7
+\fIfile\fP
+The pathname of a file for which a graph is to be generated. Filenames
+suffixed by \fB.l\fP shall shall be taken to be \fIlex\fP input, \fB.y\fP
+as \fIyacc\fP input, \fB.c\fP
+as \fIc99\fP input, and \fB.i\fP as the output of \fIc99\fP \fB-E\fP.
+Such files shall be processed as appropriate, determined by their
+suffix.
+.LP
+Files suffixed by \fB.s\fP (conventionally assembler source) may have
+more limited information extracted from them.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+The input files shall be object files or assembler, C-language, \fIlex\fP,
+or \fIyacc\fP source files.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIcflow\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_COLLATE\fP
+.sp
+Determine the locale for the ordering of the output when the \fB-r\fP
+option is used.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The flowgraph written to standard output shall be formatted as follows:
+.sp
+.RS
+.nf
+
+\fB"%d %s:%s\\n", <\fP\fIreference number\fP\fB>, <\fP\fIglobal\fP\fB>, <\fP\fIdefinition\fP\fB>
+\fP
+.fi
+.RE
+.LP
+Each line of output begins with a reference (that is, line) number,
+followed by indentation of at least one column position per
+level. This is followed by the name of the global, a colon, and its
+definition. Normally globals are only functions not defined as
+an external or beginning with an underscore; see the OPTIONS section
+for the \fB-i\fP inclusion option. For information extracted
+from C-language source, the definition consists of an abstract type
+declaration (for example, \fBchar *\fP) and, delimited by
+angle brackets, the name of the source file and the line number where
+the definition was found. Definitions extracted from object
+files indicate the filename and location counter under which the symbol
+appeared (for example, \fItext\fP).
+.LP
+Once a definition of a name has been written, subsequent references
+to that name contain only the reference number of the line
+where the definition can be found. For undefined references, only
+\fB"<>"\fP shall be written.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Files produced by \fIlex\fP and \fIyacc\fP cause the
+reordering of line number declarations, and this can confuse \fIcflow\fP.
+To obtain proper results, the input of \fIyacc\fP or \fIlex\fP must
+be directed to \fIcflow\fP.
+.SH EXAMPLES
+.LP
+Given the following in \fBfile.c\fP:
+.sp
+.RS
+.nf
+
+\fBint i;
+int f();
+int g();
+int h();
+int
+main()
+{
+ f();
+ g();
+ f();
+}
+int
+f()
+{
+ i = h();
+}
+\fP
+.fi
+.RE
+.LP
+The command:
+.sp
+.RS
+.nf
+
+\fBcflow -i x file.c
+\fP
+.fi
+.RE
+.LP
+produces the output:
+.sp
+.RS
+.nf
+
+\fB1 main: int(), <file.c 6>
+2 f: int(), <file.c 13>
+3 h: <>
+4 i: int, <file.c 1>
+5 g: <>
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIc99\fP, \fIlex\fP, \fIyacc\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/chgrp.1p b/man-pages-posix-2003/man1p/chgrp.1p
new file mode 100644
index 0000000..75bd543
--- /dev/null
+++ b/man-pages-posix-2003/man1p/chgrp.1p
@@ -0,0 +1,217 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CHGRP" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" chgrp
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+chgrp \- change the file group ownership
+.SH SYNOPSIS
+.LP
+\fBchgrp\fP \fB[\fP\fB-hR\fP\fB]\fP \fIgroup file\fP \fB...
+.br
+.sp
+chgrp -R\fP \fB[\fP\fB-H | -L | -P\fP \fB]\fP \fIgroup file\fP \fB...
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIchgrp\fP utility shall set the group ID of the file named by
+each \fIfile\fP operand to the group ID specified by the
+\fIgroup\fP operand.
+.LP
+For each \fIfile\fP operand, or, if the \fB-R\fP option is used, each
+file encountered while walking the directory trees
+specified by the \fIfile\fP operands, the \fIchgrp\fP utility shall
+perform actions equivalent to the \fIchown\fP() function defined in
+the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+called with the following arguments:
+.IP " *" 3
+The \fIfile\fP operand shall be used as the \fIpath\fP argument.
+.LP
+.IP " *" 3
+The user ID of the file shall be used as the \fIowner\fP argument.
+.LP
+.IP " *" 3
+The specified group ID shall be used as the \fIgroup\fP argument.
+.LP
+.LP
+Unless \fIchgrp\fP is invoked by a process with appropriate privileges,
+the set-user-ID and set-group-ID bits of a regular file
+shall be cleared upon successful completion; the set-user-ID and set-group-ID
+bits of other file types may be cleared.
+.SH OPTIONS
+.LP
+The \fIchgrp\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported by the implementation:
+.TP 7
+\fB-h\fP
+If the system supports group IDs for symbolic links, for each \fIfile\fP
+operand that names a file of type symbolic link,
+\fIchgrp\fP shall attempt to set the group ID of the symbolic link
+instead of the file referenced by the symbolic link. If the
+system does not support group IDs for symbolic links, for each \fIfile\fP
+operand that names a file of type symbolic link,
+\fIchgrp\fP shall do nothing more with the current file and shall
+go on to any remaining files.
+.TP 7
+\fB-H\fP
+If the \fB-R\fP option is specified and a symbolic link referencing
+a file of type directory is specified on the command line,
+\fIchgrp\fP shall change the group of the directory referenced by
+the symbolic link and all files in the file hierarchy below
+it.
+.TP 7
+\fB-L\fP
+If the \fB-R\fP option is specified and a symbolic link referencing
+a file of type directory is specified on the command line
+or encountered during the traversal of a file hierarchy, \fIchgrp\fP
+shall change the group of the directory referenced by the
+symbolic link and all files in the file hierarchy below it.
+.TP 7
+\fB-P\fP
+If the \fB-R\fP option is specified and a symbolic link is specified
+on the command line or encountered during the traversal
+of a file hierarchy, \fIchgrp\fP shall change the group ID of the
+symbolic link if the system supports this operation. The
+\fIchgrp\fP utility shall not follow the symbolic link to any other
+part of the file hierarchy.
+.TP 7
+\fB-R\fP
+Recursively change file group IDs. For each \fIfile\fP operand that
+names a directory, \fIchgrp\fP shall change the group of
+the directory and all files in the file hierarchy below it. Unless
+a \fB-H\fP, \fB-L\fP, or \fB-P\fP option is specified, it is
+unspecified which of these options will be used as the default.
+.sp
+.LP
+Specifying more than one of the mutually-exclusive options \fB-H\fP,
+\fB-L\fP, and \fB-P\fP shall not be considered an error.
+The last option specified shall determine the behavior of the utility.
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIgroup\fP
+A group name from the group database or a numeric group ID. Either
+specifies a group ID to be given to each file named by one
+of the \fIfile\fP operands. If a numeric \fIgroup\fP operand exists
+in the group database as a group name, the group ID number
+associated with that group name is used as the group ID.
+.TP 7
+\fIfile\fP
+A pathname of a file whose group ID is to be modified.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIchgrp\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+The utility executed successfully and all requested changes were made.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Only the owner of a file or the user with appropriate privileges may
+change the owner or group of a file.
+.LP
+Some implementations restrict the use of \fIchgrp\fP to a user with
+appropriate privileges when the \fIgroup\fP specified is
+not the effective group ID or one of the supplementary group IDs of
+the calling process.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The System V and BSD versions use different exit status codes. Some
+implementations used the exit status as a count of the
+number of errors that occurred; this practice is unworkable since
+it can overflow the range of valid exit status values. The
+standard developers chose to mask these by specifying only 0 and >0
+as exit values.
+.LP
+The functionality of \fIchgrp\fP is described substantially through
+references to \fIchown\fP(). In this way, there is no duplication
+of effort required for describing the
+interactions of permissions, multiple groups, and so on.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIchmod\fP(), \fIchown\fP(), the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001, \fIchown\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/chmod.1p b/man-pages-posix-2003/man1p/chmod.1p
new file mode 100644
index 0000000..9a80533
--- /dev/null
+++ b/man-pages-posix-2003/man1p/chmod.1p
@@ -0,0 +1,493 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CHMOD" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" chmod
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+chmod \- change the file modes
+.SH SYNOPSIS
+.LP
+\fBchmod\fP \fB[\fP\fB-R\fP\fB]\fP \fImode file\fP \fB...\fP
+.SH DESCRIPTION
+.LP
+The \fIchmod\fP utility shall change any or all of the file mode bits
+of the file named by each \fIfile\fP operand in the way
+specified by the \fImode\fP operand.
+.LP
+It is implementation-defined whether and how the \fIchmod\fP utility
+affects any alternate or additional file access control
+mechanism (see the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Section 4.4, File Access Permissions) being used for the specified
+file.
+.LP
+Only a process whose effective user ID matches the user ID of the
+file, or a process with the appropriate privileges, shall be
+permitted to change the file mode bits of a file.
+.SH OPTIONS
+.LP
+The \fIchmod\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following option shall be supported:
+.TP 7
+\fB-R\fP
+Recursively change file mode bits. For each \fIfile\fP operand that
+names a directory, \fIchmod\fP shall change the file mode
+bits of the directory and all files in the file hierarchy below it.
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fImode\fP
+Represents the change to be made to the file mode bits of each file
+named by one of the \fIfile\fP operands; see the EXTENDED
+DESCRIPTION section.
+.TP 7
+\fIfile\fP
+A pathname of a file whose file mode bits shall be modified.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIchmod\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+The \fImode\fP operand shall be either a \fIsymbolic_mode\fP expression
+or a non-negative octal integer. The
+\fIsymbolic_mode\fP form is described by the grammar later in this
+section.
+.LP
+Each \fBclause\fP shall specify an operation to be performed on the
+current file mode bits of each \fIfile\fP. The operations
+shall be performed on each \fIfile\fP in the order in which the \fBclause\fPs
+are specified.
+.LP
+The \fBwho\fP symbols \fBu\fP, \fBg\fP, and \fBo\fP shall specify
+the \fIuser\fP, \fIgroup\fP, and \fIother\fP parts of
+the file mode bits, respectively. A \fBwho\fP consisting of the symbol
+\fBa\fP shall be equivalent to \fBugo\fP.
+.LP
+The \fBperm\fP symbols \fBr\fP, \fBw\fP, and \fBx\fP represent the
+\fIread\fP, \fIwrite\fP, and \fIexecute\fP/
+\fIsearch\fP portions of file mode bits, respectively. The \fBperm\fP
+symbol \fBs\fP shall represent the
+\fIset-user-ID-on-execution\fP (when \fBwho\fP contains or implies
+\fBu\fP) and \fIset-group-ID-on-execution\fP (when
+\fBwho\fP contains or implies \fBg\fP) bits.
+.LP
+The \fBperm\fP symbol \fBX\fP shall represent the execute/search portion
+of the file mode bits if the file is a directory or
+if the current (unmodified) file mode bits have at least one of the
+execute bits (S_IXUSR, S_IXGRP, or S_IXOTH) set. It shall be
+ignored if the file is not a directory and none of the execute bits
+are set in the current file mode bits.
+.LP
+The \fBpermcopy\fP symbols \fBu\fP, \fBg\fP, and \fBo\fP shall represent
+the current permissions associated with the user,
+group, and other parts of the file mode bits, respectively. For the
+remainder of this section, \fBperm\fP refers to the
+non-terminals \fBperm\fP and \fBpermcopy\fP in the grammar.
+.LP
+If multiple \fBactionlist\fPs are grouped with a single \fBwholist\fP
+in the grammar, each \fBactionlist\fP shall be applied
+in the order specified with that \fBwholist\fP. The \fIop\fP symbols
+shall represent the operation performed, as follows:
+.TP 7
+\fB+\fP
+If \fBperm\fP is not specified, the \fB'+'\fP operation shall not
+change the file mode bits.
+.LP
+If \fBwho\fP is not specified, the file mode bits represented by \fBperm\fP
+for the owner, group, and other permissions,
+except for those with corresponding bits in the file mode creation
+mask of the invoking process, shall be set.
+.LP
+Otherwise, the file mode bits represented by the specified \fBwho\fP
+and \fBperm\fP values shall be set.
+.TP 7
+\fB-\fP
+If \fBperm\fP is not specified, the \fB'-'\fP operation shall not
+change the file mode bits.
+.LP
+If \fBwho\fP is not specified, the file mode bits represented by \fBperm\fP
+for the owner, group, and other permissions,
+except for those with corresponding bits in the file mode creation
+mask of the invoking process, shall be cleared.
+.LP
+Otherwise, the file mode bits represented by the specified \fBwho\fP
+and \fBperm\fP values shall be cleared.
+.TP 7
+\fB=\fP
+Clear the file mode bits specified by the \fBwho\fP value, or, if
+no \fBwho\fP value is specified, all of the file mode bits
+specified in this volume of IEEE\ Std\ 1003.1-2001.
+.LP
+If \fBperm\fP is not specified, the \fB'='\fP operation shall make
+no further modifications to the file mode bits.
+.LP
+If \fBwho\fP is not specified, the file mode bits represented by \fBperm\fP
+for the owner, group, and other permissions,
+except for those with corresponding bits in the file mode creation
+mask of the invoking process, shall be set.
+.LP
+Otherwise, the file mode bits represented by the specified \fBwho\fP
+and \fBperm\fP values shall be set.
+.sp
+.LP
+When using the symbolic mode form on a regular file, it is implementation-defined
+whether or not:
+.IP " *" 3
+Requests to set the set-user-ID-on-execution or set-group-ID-on-execution
+bit when all execute bits are currently clear and none
+are being set are ignored.
+.LP
+.IP " *" 3
+Requests to clear all execute bits also clear the set-user-ID-on-execution
+and set-group-ID-on-execution bits.
+.LP
+.IP " *" 3
+Requests to clear the set-user-ID-on-execution or set-group-ID-on-execution
+bits when all execute bits are currently clear are
+ignored. However, if the command \fIls\fP \fB-l\fP \fIfile\fP writes
+an \fIs\fP in the
+position indicating that the set-user-ID-on-execution or set-group-ID-on-execution
+is set, the commands \fIchmod\fP \fBu-s\fP
+\fIfile\fP or \fIchmod\fP \fBg-s\fP \fIfile\fP, respectively, shall
+not be ignored.
+.LP
+.LP
+When using the symbolic mode form on other file types, it is implementation-defined
+whether or not requests to set or clear the
+set-user-ID-on-execution or set-group-ID-on-execution bits are honored.
+.LP
+If the \fBwho\fP symbol \fBo\fP is used in conjunction with the \fBperm\fP
+symbol \fBs\fP with no other \fBwho\fP symbols
+being specified, the set-user-ID-on-execution and set-group-ID-on-execution
+bits shall not be modified. It shall not be an error to
+specify the \fBwho\fP symbol \fBo\fP in conjunction with the \fBperm\fP
+symbol \fBs\fP.
+.LP
+The \fBperm\fP symbol \fBt\fP shall specify the S_ISVTX bit. When
+used with a file of type directory, it can be used with the
+\fBwho\fP symbol \fBa\fP, or with no \fBwho\fP symbol. It shall not
+be an error to specify a \fBwho\fP symbol of \fBu\fP,
+\fBg\fP, or \fBo\fP in conjunction with the \fBperm\fP symbol \fBt\fP,
+but the meaning of these combinations is unspecified.
+The effect when using the \fBperm\fP symbol \fBt\fP with any file
+type other than directory is unspecified.
+.LP
+For an octal integer \fImode\fP operand, the file mode bits shall
+be set absolutely.
+.LP
+For each bit set in the octal number, the corresponding file permission
+bit shown in the following table shall be set; all other
+file permission bits shall be cleared. For regular files, for each
+bit set in the octal number corresponding to the
+set-user-ID-on-execution or the set-group-ID-on-execution, bits shown
+in the following table shall be set; if these bits are not
+set in the octal number, they are cleared. For other file types, it
+is implementation-defined whether or not requests to set or
+clear the set-user-ID-on-execution or set-group-ID-on-execution bits
+are honored.
+.TS C
+center; l1 l1 l1 l1 l1 l1 l1 l.
+\fBOctal\fP \fBMode Bit\fP \fBOctal\fP \fBMode Bit\fP \fBOctal\fP \fBMode Bit\fP \fBOctal\fP \fBMode Bit\fP
+\fB4000\fP S_ISUID \fB0400\fP S_IRUSR \fB0040\fP S_IRGRP \fB0004\fP S_IROTH
+\fB2000\fP S_ISGID \fB0200\fP S_IWUSR \fB0020\fP S_IWGRP \fB0002\fP S_IWOTH
+\fB1000\fP S_ISVTX \fB0100\fP S_IXUSR \fB0010\fP S_IXGRP \fB0001\fP S_IXOTH
+.TE
+.LP
+When bits are set in the octal number other than those listed in the
+table above, the behavior is unspecified.
+.SS Grammar for chmod
+.LP
+The grammar and lexical conventions in this section describe the syntax
+for the \fIsymbolic_mode\fP operand. The general
+conventions for this style of grammar are described in \fIGrammar
+Conventions\fP . A valid
+\fIsymbolic_mode\fP can be represented as the non-terminal symbol
+\fIsymbolic_mode\fP in the grammar. This formal syntax shall
+take precedence over the preceding text syntax description.
+.LP
+The lexical processing is based entirely on single characters. Implementations
+need not allow <blank>s within the single
+argument being processed.
+.sp
+.RS
+.nf
+
+\fB%start symbolic_mode
+%%
+.sp
+
+symbolic_mode : clause
+ | symbolic_mode ',' clause
+ ;
+.sp
+
+clause : actionlist
+ | wholist actionlist
+ ;
+.sp
+
+wholist : who
+ | wholist who
+ ;
+.sp
+
+who : 'u' | 'g' | 'o' | 'a'
+ ;
+.sp
+
+actionlist : action
+ | actionlist action
+ ;
+.sp
+
+action : op
+ | op permlist
+ | op permcopy
+ ;
+.sp
+
+permcopy : 'u' | 'g' | 'o'
+ ;
+.sp
+
+op : '+' | '-' | '='
+ ;
+.sp
+
+permlist : perm
+ | perm permlist
+ ;
+.sp
+
+
+perm : 'r' | 'w' | 'x' | 'X' | 's' | 't'
+ ;
+\fP
+.fi
+.RE
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+The utility executed successfully and all requested changes were made.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Some implementations of the \fIchmod\fP utility change the mode of
+a directory before the files in the directory when
+performing a recursive ( \fB-R\fP option) change; others change the
+directory mode after the files in the directory. If an
+application tries to remove read or search permission for a file hierarchy,
+the removal attempt fails if the directory is changed
+first; on the other hand, trying to re-enable permissions to a restricted
+hierarchy fails if directories are changed last. Users
+should not try to make a hierarchy inaccessible to themselves.
+.LP
+Some implementations of \fIchmod\fP never used the process' \fIumask\fP
+when changing
+modes; systems conformant with this volume of IEEE\ Std\ 1003.1-2001
+do so when \fBwho\fP is not specified. Note the
+difference between:
+.sp
+.RS
+.nf
+
+\fBchmod a-w file
+\fP
+.fi
+.RE
+.LP
+which removes all write permissions, and:
+.sp
+.RS
+.nf
+
+\fBchmod -- -w file
+\fP
+.fi
+.RE
+.LP
+which removes write permissions that would be allowed if \fBfile\fP
+was created with the same \fIumask\fP.
+.LP
+Conforming applications should never assume that they know how the
+set-user-ID and set-group-ID bits on directories are
+interpreted.
+.SH EXAMPLES
+.TS C
+center; l lw(40).
+\fBMode\fP T{
+.na
+\fBResults\fP
+.ad
+T}
+\fIa\fP+= T{
+.na
+Equivalent to \fIa\fP+, \fIa\fP=; clears all file mode bits.
+.ad
+T}
+\fIgo\fP+-w T{
+.na
+Equivalent to \fIgo\fP+, \fIgo\fP- \fIw\fP; clears group and other write bits.
+.ad
+T}
+\fIg\fP=\fIo\fP-\fIw\fP T{
+.na
+Equivalent to \fIg\fP= \fIo\fP, \fIg\fP- \fIw\fP; sets group bit to match other bits and then clears group write bit.
+.ad
+T}
+\fIg\fP-\fIr\fP+\fIw\fP T{
+.na
+Equivalent to \fIg\fP- \fIr\fP, \fIg\fP+ \fIw\fP; clears group read bit and sets group write bit.
+.ad
+T}
+\fIuo\fP=\fIg\fP T{
+.na
+Sets owner bits to match group bits and sets other bits to match group bits.
+.ad
+T}
+.TE
+.SH RATIONALE
+.LP
+The functionality of \fIchmod\fP is described substantially through
+references to concepts defined in the System Interfaces
+volume of IEEE\ Std\ 1003.1-2001. In this way, there is less duplication
+of effort required for describing the interactions
+of permissions. However, the behavior of this utility is not described
+in terms of the \fIchmod\fP() function from the System Interfaces
+volume of IEEE\ Std\ 1003.1-2001 because
+that specification requires certain side effects upon alternate file
+access control mechanisms that might not be appropriate,
+depending on the implementation.
+.LP
+Implementations that support mandatory file and record locking as
+specified by the 1984 /usr/group standard historically used
+the combination of set-group-ID bit set and group execute bit clear
+to indicate mandatory locking. This condition is usually set or
+cleared with the symbolic mode \fBperm\fP symbol \fBl\fP instead of
+the \fBperm\fP symbols \fBs\fP and \fBx\fP so that the
+mandatory locking mode is not changed without explicit indication
+that that was what the user intended. Therefore, the details on
+how the implementation treats these conditions must be defined in
+the documentation. This volume of IEEE\ Std\ 1003.1-2001
+does not require mandatory locking (nor does the System Interfaces
+volume of IEEE\ Std\ 1003.1-2001), but does allow it as
+an extension. However, this volume of IEEE\ Std\ 1003.1-2001 does
+require that the \fIls\fP and \fIchmod\fP utilities work consistently
+in this area. If \fIls\fP \fB-l\fP \fIfile\fP indicates that the set-group-ID
+bit is set, \fIchmod\fP \fBg-s\fP
+\fIfile\fP must clear it (assuming appropriate privileges exist to
+change modes).
+.LP
+The System V and BSD versions use different exit status codes. Some
+implementations used the exit status as a count of the
+number of errors that occurred; this practice is unworkable since
+it can overflow the range of valid exit status values. This
+problem is avoided here by specifying only 0 and >0 as exit values.
+.LP
+The System Interfaces volume of IEEE\ Std\ 1003.1-2001 indicates that
+implementation-defined restrictions may cause the
+S_ISUID and S_ISGID bits to be ignored. This volume of IEEE\ Std\ 1003.1-2001
+allows the \fIchmod\fP utility to choose to
+modify these bits before calling \fIchmod\fP() (or some function providing
+equivalent
+capabilities) for non-regular files. Among other things, this allows
+implementations that use the set-user-ID and set-group-ID bits
+on directories to enable extended features to handle these extensions
+in an intelligent manner.
+.LP
+The \fBX\fP \fBperm\fP symbol was adopted from BSD-based systems because
+it provides commonly desired functionality when doing
+recursive ( \fB-R\fP option) modifications. Similar functionality
+is not provided by the \fIfind\fP utility. Historical BSD versions
+of \fIchmod\fP, however, only supported \fBX\fP with
+\fIop\fP+; it has been extended in this volume of IEEE\ Std\ 1003.1-2001
+because it is also useful with \fIop\fP=. (It
+has also been added for \fIop\fP- even though it duplicates \fBx\fP,
+in this case, because it is intuitive and easier to
+explain.)
+.LP
+The grammar was extended with the \fIpermcopy\fP non-terminal to allow
+historical-practice forms of symbolic modes like
+\fBo\fP= \fBu\fP \fB-g\fP (that is, set the "other" permissions to
+the permissions of "owner" minus the permissions of
+"group").
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIls\fP, \fIumask\fP, the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001, \fIchmod\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/chown.1p b/man-pages-posix-2003/man1p/chown.1p
new file mode 100644
index 0000000..21b02e7
--- /dev/null
+++ b/man-pages-posix-2003/man1p/chown.1p
@@ -0,0 +1,269 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CHOWN" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" chown
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+chown \- change the file ownership
+.SH SYNOPSIS
+.LP
+\fBchown\fP \fB[\fP\fB-hR\fP\fB]\fP \fIowner\fP\fB[\fP\fB:\fP\fIgroup\fP\fB]\fP
+\fIfile\fP \fB...
+.br
+.sp
+chown -R\fP \fB[\fP\fB-H | -L | -P\fP \fB]\fP \fIowner\fP\fB[\fP\fB:\fP\fIgroup\fP\fB]\fP
+\fIfile\fP \fB...
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIchown\fP utility shall set the user ID of the file named by
+each \fIfile\fP operand to the user ID specified by the
+\fIowner\fP operand.
+.LP
+For each \fIfile\fP operand, or, if the \fB-R\fP option is used, each
+file encountered while walking the directory trees
+specified by the \fIfile\fP operands, the \fIchown\fP utility shall
+perform actions equivalent to the \fIchown\fP() function defined in
+the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+called with the following arguments:
+.IP " 1." 4
+The \fIfile\fP operand shall be used as the \fIpath\fP argument.
+.LP
+.IP " 2." 4
+The user ID indicated by the \fIowner\fP portion of the first operand
+shall be used as the \fIowner\fP argument.
+.LP
+.IP " 3." 4
+If the \fIgroup\fP portion of the first operand is given, the group
+ID indicated by it shall be used as the \fIgroup\fP
+argument; otherwise, the group ownership shall not be changed.
+.LP
+.LP
+Unless \fIchown\fP is invoked by a process with appropriate privileges,
+the set-user-ID and set-group-ID bits of a regular file
+shall be cleared upon successful completion; the set-user-ID and set-group-ID
+bits of other file types may be cleared.
+.SH OPTIONS
+.LP
+The \fIchown\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported by the implementation:
+.TP 7
+\fB-h\fP
+If the system supports user IDs for symbolic links, for each \fIfile\fP
+operand that names a file of type symbolic link,
+\fIchown\fP shall attempt to set the user ID of the symbolic link.
+If the system supports group IDs for symbolic links, and a
+group ID was specified, for each \fIfile\fP operand that names a file
+of type symbolic link, \fIchown\fP shall attempt to set the
+group ID of the symbolic link. If the system does not support user
+or group IDs for symbolic links, for each \fIfile\fP operand
+that names a file of type symbolic link, \fIchown\fP shall do nothing
+more with the current file and shall go on to any remaining
+files.
+.TP 7
+\fB-H\fP
+If the \fB-R\fP option is specified and a symbolic link referencing
+a file of type directory is specified on the command line,
+\fIchown\fP shall change the user ID (and group ID, if specified)
+of the directory referenced by the symbolic link and all files
+in the file hierarchy below it.
+.TP 7
+\fB-L\fP
+If the \fB-R\fP option is specified and a symbolic link referencing
+a file of type directory is specified on the command line
+or encountered during the traversal of a file hierarchy, \fIchown\fP
+shall change the user ID (and group ID, if specified) of the
+directory referenced by the symbolic link and all files in the file
+hierarchy below it.
+.TP 7
+\fB-P\fP
+If the \fB-R\fP option is specified and a symbolic link is specified
+on the command line or encountered during the traversal
+of a file hierarchy, \fIchown\fP shall change the owner ID (and group
+ID, if specified) of the symbolic link if the system
+supports this operation. The \fIchown\fP utility shall not follow
+the symbolic link to any other part of the file hierarchy.
+.TP 7
+\fB-R\fP
+Recursively change file user and group IDs. For each \fIfile\fP operand
+that names a directory, \fIchown\fP shall change the
+user ID (and group ID, if specified) of the directory and all files
+in the file hierarchy below it. Unless a \fB-H\fP, \fB-L\fP,
+or \fB-P\fP option is specified, it is unspecified which of these
+options will be used as the default.
+.sp
+.LP
+Specifying more than one of the mutually-exclusive options \fB-H\fP,
+\fB-L\fP, and \fB-P\fP shall not be considered an error.
+The last option specified shall determine the behavior of the utility.
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIowner\fP\fB[\fP:\fIgroup\fP\fB]\fP
+A user ID and optional group ID to be assigned to \fIfile\fP. The
+\fIowner\fP portion of this operand shall be a user name
+from the user database or a numeric user ID. Either specifies a user
+ID which shall be given to each file named by one of the
+\fIfile\fP operands. If a numeric \fIowner\fP operand exists in the
+user database as a user name, the user ID number associated
+with that user name shall be used as the user ID. Similarly, if the
+\fIgroup\fP portion of this operand is present, it shall be a
+group name from the group database or a numeric group ID. Either specifies
+a group ID which shall be given to each file. If a
+numeric group operand exists in the group database as a group name,
+the group ID number associated with that group name shall be
+used as the group ID.
+.TP 7
+\fIfile\fP
+A pathname of a file whose user ID is to be modified.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIchown\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+The utility executed successfully and all requested changes were made.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Only the owner of a file or the user with appropriate privileges may
+change the owner or group of a file.
+.LP
+Some implementations restrict the use of \fIchown\fP to a user with
+appropriate privileges.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The System V and BSD versions use different exit status codes. Some
+implementations used the exit status as a count of the
+number of errors that occurred; this practice is unworkable since
+it can overflow the range of valid exit status values. These are
+masked by specifying only 0 and >0 as exit values.
+.LP
+The functionality of \fIchown\fP is described substantially through
+references to functions in the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001. In this way, there is no duplication of effort
+required for describing the interactions of
+permissions, multiple groups, and so on.
+.LP
+The 4.3 BSD method of specifying both owner and group was included
+in this volume of IEEE\ Std\ 1003.1-2001 because:
+.IP " *" 3
+There are cases where the desired end condition could not be achieved
+using the \fIchgrp\fP and \fIchown\fP (that only changed the user
+ID) utilities. (If the current owner is not
+a member of the desired group and the desired owner is not a member
+of the current group, the \fIchown\fP() function could fail unless
+both owner and group are changed at the same time.)
+.LP
+.IP " *" 3
+Even if they could be changed independently, in cases where both are
+being changed, there is a 100% performance penalty caused
+by being forced to invoke both utilities.
+.LP
+.LP
+The BSD syntax \fIuser\fP[. \fIgroup\fP] was changed to \fIuser\fP[:
+\fIgroup\fP] in this volume of
+IEEE\ Std\ 1003.1-2001 because the period is a valid character in
+login names (as specified by the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, login names consist of characters in the
+portable filename character set). The colon character
+was chosen as the replacement for the period character because it
+would never be allowed as a character in a user name or group
+name on historical implementations.
+.LP
+The \fB-R\fP option is considered by some observers as an undesirable
+departure from the historical UNIX system tools approach;
+since a tool, \fIfind\fP, already exists to recurse over directories,
+there seemed to be no
+good reason to require other tools to have to duplicate that functionality.
+However, the \fB-R\fP option was deemed an important
+user convenience, is far more efficient than forking a separate process
+for each element of the directory hierarchy, and is in
+widespread historical use.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIchmod\fP, \fIchgrp\fP, the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001, \fIchown\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/cksum.1p b/man-pages-posix-2003/man1p/cksum.1p
new file mode 100644
index 0000000..93e1368
--- /dev/null
+++ b/man-pages-posix-2003/man1p/cksum.1p
@@ -0,0 +1,356 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CKSUM" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" cksum
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+cksum \- write file checksums and sizes
+.SH SYNOPSIS
+.LP
+\fBcksum\fP \fB[\fP\fIfile\fP \fB...\fP\fB]\fP
+.SH DESCRIPTION
+.LP
+The \fIcksum\fP utility shall calculate and write to standard output
+a cyclic redundancy check (CRC) for each input file, and
+also write to standard output the number of octets in each file. The
+CRC used is based on the polynomial used for CRC error
+checking in the ISO/IEC\ 8802-3:1996 standard (Ethernet).
+.LP
+The encoding for the CRC checksum is defined by the generating polynomial:
+.sp
+.RS
+.nf
+
+\fIG\fP\fB(\fP\fIx\fP\fB)=\fP\fIx\fP\fB**32+\fP\fIx\fP\fB**26+\fP\fIx\fP\fB**23+\fP\fIx\fP\fB**22+\fP\fIx\fP\fB**16+\fP\fIx\fP\fB**12+\fP\fIx\fP\fB**11+\fP\fIx\fP\fB**10+\fP\fIx\fP\fB**8+\fP\fIx\fP\fB**7+\fP\fIx\fP\fB**5+\fP\fIx\fP\fB**4+\fP\fIx\fP\fB**2+\fP\fIx\fP\fB+1
+\fP
+.fi
+.RE
+.LP
+Mathematically, the CRC value corresponding to a given file shall
+be defined by the following procedure:
+.IP " 1." 4
+The \fIn\fP bits to be evaluated are considered to be the coefficients
+of a mod 2 polynomial \fIM\fP( \fIx\fP) of degree
+\fIn\fP-1. These \fIn\fP bits are the bits from the file, with the
+most significant bit being the most significant bit of the
+first octet of the file and the last bit being the least significant
+bit of the last octet, padded with zero bits (if necessary) to
+achieve an integral number of octets, followed by one or more octets
+representing the length of the file as a binary value, least
+significant octet first. The smallest number of octets capable of
+representing this integer shall be used.
+.LP
+.IP " 2." 4
+\fIM\fP( \fIx\fP) is multiplied by \fIx\fP**32 (that is, shifted left
+32 bits) and divided by
+\fIG\fP( \fIx\fP) using mod 2 division, producing a remainder \fIR\fP(
+\fIx\fP) of degree <= 31.
+.LP
+.IP " 3." 4
+The coefficients of \fIR\fP( \fIx\fP) are considered to be a 32-bit
+sequence.
+.LP
+.IP " 4." 4
+The bit sequence is complemented and the result is the CRC.
+.LP
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of a file to be checked. If no \fIfile\fP operands are
+specified, the standard input shall be used.
+.sp
+.SH STDIN
+.LP
+The standard input shall be used only if no \fIfile\fP operands are
+specified. See the INPUT FILES section.
+.SH INPUT FILES
+.LP
+The input files can be any file type.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIcksum\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+For each file processed successfully, the \fIcksum\fP utility shall
+write in the following format:
+.sp
+.RS
+.nf
+
+\fB"%u %d %s\\n", <\fP\fIchecksum\fP\fB>, <\fP\fI# of octets\fP\fB>, <\fP\fIpathname\fP\fB>
+\fP
+.fi
+.RE
+.LP
+If no \fIfile\fP operand was specified, the pathname and its leading
+<space> shall be omitted.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+All files were processed successfully.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The \fIcksum\fP utility is typically used to quickly compare a suspect
+file against a trusted version of the same, such as to
+ensure that files transmitted over noisy media arrive intact. However,
+this comparison cannot be considered cryptographically
+secure. The chances of a damaged file producing the same CRC as the
+original are small; deliberate deception is difficult, but
+probably not impossible.
+.LP
+Although input files to \fIcksum\fP can be any type, the results need
+not be what would be expected on character special device
+files or on file types not described by the System Interfaces volume
+of IEEE\ Std\ 1003.1-2001. Since this volume of
+IEEE\ Std\ 1003.1-2001 does not specify the block size used when doing
+input, checksums of character special files need not
+process all of the data in those files.
+.LP
+The algorithm is expressed in terms of a bitstream divided into octets.
+If a file is transmitted between two systems and
+undergoes any data transformation (such as changing little-endian
+byte ordering to big-endian), identical CRC values cannot be
+expected. Implementations performing such transformations may extend
+\fIcksum\fP to handle such situations.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The following C-language program can be used as a model to describe
+the algorithm. It assumes that a \fBchar\fP is one octet.
+It also assumes that the entire file is available for one pass through
+the function. This was done for simplicity in demonstrating
+the algorithm, rather than as an implementation model.
+.sp
+.RS
+.nf
+
+\fBstatic unsigned long crctab[] = {
+0x00000000,
+0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b,
+0x1a864db2, 0x1e475005, 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6,
+0x2b4bcb61, 0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd,
+0x4c11db70, 0x48d0c6c7, 0x4593e01e, 0x4152fda9, 0x5f15adac,
+0x5bd4b01b, 0x569796c2, 0x52568b75, 0x6a1936c8, 0x6ed82b7f,
+0x639b0da6, 0x675a1011, 0x791d4014, 0x7ddc5da3, 0x709f7b7a,
+0x745e66cd, 0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039,
+0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5, 0xbe2b5b58,
+0xbaea46ef, 0xb7a96036, 0xb3687d81, 0xad2f2d84, 0xa9ee3033,
+0xa4ad16ea, 0xa06c0b5d, 0xd4326d90, 0xd0f37027, 0xddb056fe,
+0xd9714b49, 0xc7361b4c, 0xc3f706fb, 0xceb42022, 0xca753d95,
+0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1, 0xe13ef6f4,
+0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d, 0x34867077, 0x30476dc0,
+0x3d044b19, 0x39c556ae, 0x278206ab, 0x23431b1c, 0x2e003dc5,
+0x2ac12072, 0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16,
+0x018aeb13, 0x054bf6a4, 0x0808d07d, 0x0cc9cdca, 0x7897ab07,
+0x7c56b6b0, 0x71159069, 0x75d48dde, 0x6b93dddb, 0x6f52c06c,
+0x6211e6b5, 0x66d0fb02, 0x5e9f46bf, 0x5a5e5b08, 0x571d7dd1,
+0x53dc6066, 0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba,
+0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e, 0xbfa1b04b,
+0xbb60adfc, 0xb6238b25, 0xb2e29692, 0x8aad2b2f, 0x8e6c3698,
+0x832f1041, 0x87ee0df6, 0x99a95df3, 0x9d684044, 0x902b669d,
+0x94ea7b2a, 0xe0b41de7, 0xe4750050, 0xe9362689, 0xedf73b3e,
+0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2, 0xc6bcf05f,
+0xc27dede8, 0xcf3ecb31, 0xcbffd686, 0xd5b88683, 0xd1799b34,
+0xdc3abded, 0xd8fba05a, 0x690ce0ee, 0x6dcdfd59, 0x608edb80,
+0x644fc637, 0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb,
+0x4f040d56, 0x4bc510e1, 0x46863638, 0x42472b8f, 0x5c007b8a,
+0x58c1663d, 0x558240e4, 0x51435d53, 0x251d3b9e, 0x21dc2629,
+0x2c9f00f0, 0x285e1d47, 0x36194d42, 0x32d850f5, 0x3f9b762c,
+0x3b5a6b9b, 0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff,
+0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623, 0xf12f560e,
+0xf5ee4bb9, 0xf8ad6d60, 0xfc6c70d7, 0xe22b20d2, 0xe6ea3d65,
+0xeba91bbc, 0xef68060b, 0xd727bbb6, 0xd3e6a601, 0xdea580d8,
+0xda649d6f, 0xc423cd6a, 0xc0e2d0dd, 0xcda1f604, 0xc960ebb3,
+0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7, 0xae3afba2,
+0xaafbe615, 0xa7b8c0cc, 0xa379dd7b, 0x9b3660c6, 0x9ff77d71,
+0x92b45ba8, 0x9675461f, 0x8832161a, 0x8cf30bad, 0x81b02d74,
+0x857130c3, 0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640,
+0x4e8ee645, 0x4a4ffbf2, 0x470cdd2b, 0x43cdc09c, 0x7b827d21,
+0x7f436096, 0x7200464f, 0x76c15bf8, 0x68860bfd, 0x6c47164a,
+0x61043093, 0x65c52d24, 0x119b4be9, 0x155a565e, 0x18197087,
+0x1cd86d30, 0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec,
+0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088, 0x2497d08d,
+0x2056cd3a, 0x2d15ebe3, 0x29d4f654, 0xc5a92679, 0xc1683bce,
+0xcc2b1d17, 0xc8ea00a0, 0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb,
+0xdbee767c, 0xe3a1cbc1, 0xe760d676, 0xea23f0af, 0xeee2ed18,
+0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4, 0x89b8fd09,
+0x8d79e0be, 0x803ac667, 0x84fbdbd0, 0x9abc8bd5, 0x9e7d9662,
+0x933eb0bb, 0x97ffad0c, 0xafb010b1, 0xab710d06, 0xa6322bdf,
+0xa2f33668, 0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4
+};
+.sp
+
+unsigned long memcrc(const unsigned char *b, size_t n)
+{
+/* Input arguments:
+ * const char* b == byte sequence to checksum
+ * size_t n == length of sequence
+ */
+.sp
+
+ register unsigned i, c, s = 0;
+.sp
+
+ for (i = n; i > 0; --i) {
+ c = (unsigned)(*b++);
+ s = (s << 8) ^ crctab[(s >> 24) ^ c];
+ }
+.sp
+
+ /* Extend with the length of the string. */
+ while (n != 0) {
+ c = n & 0377;
+ n >>= 8;
+ s = (s << 8) ^ crctab[(s >> 24) ^ c];
+ }
+.sp
+
+ return ~s;
+}
+\fP
+.fi
+.RE
+.LP
+The historical practice of writing the number of "blocks" has been
+changed to writing the number of octets, since the latter
+is not only more useful, but also since historical implementations
+have not been consistent in defining what a "block" meant.
+Octets are used instead of bytes because bytes can differ in size
+between systems.
+.LP
+The algorithm used was selected to increase the operational robustness
+of \fIcksum\fP. Neither the System V nor BSD \fIsum\fP
+algorithm was selected. Since each of these was different and each
+was the default behavior on those systems, no realistic
+compromise was available if either were selected-some set of historical
+applications would break. Therefore, the name was changed
+to \fIcksum\fP. Although the historical \fIsum\fP commands will probably
+continue to be provided for many years, programs
+designed for portability across systems should use the new name.
+.LP
+The algorithm selected is based on that used by the ISO/IEC\ 8802-3:1996
+standard (Ethernet) for the frame check sequence
+field. The algorithm used does not match the technical definition
+of a \fIchecksum\fP; the term is used for historical reasons.
+The length of the file is included in the CRC calculation because
+this parallels inclusion of a length field by Ethernet in its
+CRC, but also because it guards against inadvertent collisions between
+files that begin with different series of zero octets. The
+chance that two different files produce identical CRCs is much greater
+when their lengths are not considered. Keeping the length
+and the checksum of the file itself separate would yield a slightly
+more robust algorithm, but historical usage has always been
+that a single number (the checksum as printed) represents the signature
+of the file. It was decided that historical usage was the
+more important consideration.
+.LP
+Early proposals contained modifications to the Ethernet algorithm
+that involved extracting table values whenever an intermediate
+result became zero. This was demonstrated to be less robust than the
+current method and mathematically difficult to describe or
+justify.
+.LP
+The calculation used is identical to that given in pseudo-code in
+the referenced Sarwate article. The pseudo-code rendition
+is:
+.sp
+.RS
+.nf
+
+\fBX <- 0; Y <- 0;
+for i <- m -1 step -1 until 0 do
+ begin
+ T <- X(1) ^ A[i];
+ X(1) <- X(0); X(0) <- Y(1); Y(1) <- Y(0); Y(0) <- 0;
+ comment: f[T] and f'[T] denote the T-th words in the
+ table f and f' ;
+ X <- X ^ f[T]; Y <- Y ^ f'[T];
+ end
+\fP
+.fi
+.RE
+.LP
+The pseudo-code is reproduced exactly as given; however, note that
+in the case of \fIcksum\fP, \fBA[i]\fP represents a byte of
+the file, the words \fBX\fP and \fBY\fP are treated as a single 32-bit
+value, and the tables \fBf\fP and \fBf'\fP are a single
+table containing 32-bit values.
+.LP
+The referenced Sarwate article also discusses generating the table.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+None.
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/cmp.1p b/man-pages-posix-2003/man1p/cmp.1p
new file mode 100644
index 0000000..533e325
--- /dev/null
+++ b/man-pages-posix-2003/man1p/cmp.1p
@@ -0,0 +1,246 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CMP" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" cmp
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+cmp \- compare two files
+.SH SYNOPSIS
+.LP
+\fBcmp\fP \fB[\fP \fB-l | -s\fP \fB]\fP \fIfile1 file2\fP
+.SH DESCRIPTION
+.LP
+The \fIcmp\fP utility shall compare two files. The \fIcmp\fP utility
+shall write no output if the files are the same. Under
+default options, if they differ, it shall write to standard output
+the byte and line number at which the first difference occurred.
+Bytes and lines shall be numbered beginning with 1.
+.SH OPTIONS
+.LP
+The \fIcmp\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-l\fP
+(Lowercase ell.) Write the byte number (decimal) and the differing
+bytes (octal) for each difference.
+.TP 7
+\fB-s\fP
+Write nothing for differing files; return exit status only.
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIfile1\fP
+A pathname of the first file to be compared. If \fIfile1\fP is \fB'-'\fP,
+the standard input shall be used.
+.TP 7
+\fIfile2\fP
+A pathname of the second file to be compared. If \fIfile2\fP is \fB'-'\fP,
+the standard input shall be used.
+.sp
+.LP
+If both \fIfile1\fP and \fIfile2\fP refer to standard input or refer
+to the same FIFO special, block special, or character
+special file, the results are undefined.
+.SH STDIN
+.LP
+The standard input shall be used only if the \fIfile1\fP or \fIfile2\fP
+operand refers to standard input. See the INPUT FILES
+section.
+.SH INPUT FILES
+.LP
+The input files can be any file type.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIcmp\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard error and
+informative messages written to standard output.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+In the POSIX locale, results of the comparison shall be written to
+standard output. When no options are used, the format shall
+be:
+.sp
+.RS
+.nf
+
+\fB"%s %s differ: char %d, line %d\\n",\fP \fIfile1\fP\fB,\fP \fIfile2\fP\fB,
+ <\fP\fIbyte number\fP\fB>, <\fP\fIline number\fP\fB>
+\fP
+.fi
+.RE
+.LP
+When the \fB-l\fP option is used, the format shall be:
+.sp
+.RS
+.nf
+
+\fB"%d %o %o\\n", <\fP\fIbyte number\fP\fB>, <\fP\fIdiffering byte\fP\fB>,
+ <\fP\fIdiffering byte\fP\fB>
+\fP
+.fi
+.RE
+.LP
+for each byte that differs. The first <\fIdiffering\ byte\fP> number
+is from \fIfile1\fP while the second is from
+\fIfile2\fP. In both cases, <\fIbyte\ number\fP> shall be relative
+to the beginning of the file, beginning with 1.
+.LP
+No output shall be written to standard output when the \fB-s\fP option
+is used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages. If
+\fIfile1\fP and \fIfile2\fP are identical for the entire
+length of the shorter file, in the POSIX locale the following diagnostic
+message shall be written, unless the \fB-s\fP option is
+specified:
+.sp
+.RS
+.nf
+
+\fB"cmp: EOF on %s%s\\n", <\fP\fIname of shorter file\fP\fB>, <\fP\fIadditional info\fP\fB>
+\fP
+.fi
+.RE
+.LP
+The <\fIadditional\ info\fP> field shall either be null or a string
+that starts with a <blank> and contains no
+<newline>s. Some implementations report on the number of lines in
+this case.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+The files are identical.
+.TP 7
+\ 1
+The files are different; this includes the case where one file is
+identical to the first part of the other.
+.TP 7
+>1
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Although input files to \fIcmp\fP can be any type, the results might
+not be what would be expected on character special device
+files or on file types not described by the System Interfaces volume
+of IEEE\ Std\ 1003.1-2001. Since this volume of
+IEEE\ Std\ 1003.1-2001 does not specify the block size used when doing
+input, comparisons of character special files need
+not compare all of the data in those files.
+.LP
+For files which are not text files, line numbers simply reflect the
+presence of a <newline>, without any implication that
+the file is organized into lines.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The global language in \fIUtility Description Defaults\fP indicates
+that using two
+mutually-exclusive options together produces unspecified results.
+Some System V implementations consider the option usage:
+.sp
+.RS
+.nf
+
+\fBcmp -l -s ...
+\fP
+.fi
+.RE
+.LP
+to be an error. They also treat:
+.sp
+.RS
+.nf
+
+\fBcmp -s -l ...
+\fP
+.fi
+.RE
+.LP
+as if no options were specified. Both of these behaviors are considered
+bugs, but are allowed.
+.LP
+The word \fBchar\fP in the standard output format comes from historical
+usage, even though it is actually a byte number. When
+\fIcmp\fP is supported in other locales, implementations are encouraged
+to use the word \fIbyte\fP or its equivalent in another
+language. Users should not interpret this difference to indicate that
+the functionality of the utility changed between locales.
+.LP
+Some implementations report on the number of lines in the identical-but-shorter
+file case. This is allowed by the inclusion of
+the <\fIadditional\ info\fP> fields in the output format. The restriction
+on having a leading <blank> and no
+<newline>s is to make parsing for the filename easier. It is recognized
+that some filenames containing white-space characters
+make parsing difficult anyway, but the restriction does aid programs
+used on systems where the names are predominantly well
+behaved.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcomm\fP, \fIdiff\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/colon.1p b/man-pages-posix-2003/man1p/colon.1p
new file mode 100644
index 0000000..4d994ed
--- /dev/null
+++ b/man-pages-posix-2003/man1p/colon.1p
@@ -0,0 +1,107 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "COLON" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" colon
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+colon \- null utility
+.SH SYNOPSIS
+.LP
+\fB:\fP \fB[\fP\fIargument\fP \fB...\fP\fB]\fP
+.SH DESCRIPTION
+.LP
+This utility shall only expand command \fIargument\fPs. It is used
+when a command is needed, as in the \fBthen\fP condition of
+an \fBif\fP command, but nothing is to be done by the command.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+See the DESCRIPTION.
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+None.
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+Zero.
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.sp
+.RS
+.nf
+
+\fB: ${X=abc}
+if false
+then :
+else echo $X
+fi
+\fP\fBabc\fP
+.fi
+.RE
+.LP
+As with any of the special built-ins, the null utility can also have
+variable assignments and redirections associated with it,
+such as:
+.sp
+.RS
+.nf
+
+\fBx=y : > z
+\fP
+.fi
+.RE
+.LP
+which sets variable \fIx\fP to the value \fIy\fP (so that it persists
+after the null utility completes) and creates or
+truncates file \fBz\fP.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fISpecial Built-In Utilities\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/comm.1p b/man-pages-posix-2003/man1p/comm.1p
new file mode 100644
index 0000000..b547ac1
--- /dev/null
+++ b/man-pages-posix-2003/man1p/comm.1p
@@ -0,0 +1,257 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "COMM" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" comm
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+comm \- select or reject lines common to two files
+.SH SYNOPSIS
+.LP
+\fBcomm\fP \fB[\fP\fB-123\fP\fB]\fP \fIfile1 file2\fP
+.SH DESCRIPTION
+.LP
+The \fIcomm\fP utility shall read \fIfile1\fP and \fIfile2\fP, which
+should be ordered in the current collating sequence, and
+produce three text columns as output: lines only in \fIfile1\fP, lines
+only in \fIfile2\fP, and lines in both files.
+.LP
+If the lines in both files are not ordered according to the collating
+sequence of the current locale, the results are
+unspecified.
+.SH OPTIONS
+.LP
+The \fIcomm\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-1\fP
+Suppress the output column of lines unique to \fIfile1\fP.
+.TP 7
+\fB-2\fP
+Suppress the output column of lines unique to \fIfile2\fP.
+.TP 7
+\fB-3\fP
+Suppress the output column of lines duplicated in \fIfile1\fP and
+\fIfile2\fP.
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIfile1\fP
+A pathname of the first file to be compared. If \fIfile1\fP is \fB'-'\fP,
+the standard input shall be used.
+.TP 7
+\fIfile2\fP
+A pathname of the second file to be compared. If \fIfile2\fP is \fB'-'\fP,
+the standard input shall be used.
+.sp
+.LP
+If both \fIfile1\fP and \fIfile2\fP refer to standard input or to
+the same FIFO special, block special, or character special
+file, the results are undefined.
+.SH STDIN
+.LP
+The standard input shall be used only if one of the \fIfile1\fP or
+\fIfile2\fP operands refers to standard input. See the
+INPUT FILES section.
+.SH INPUT FILES
+.LP
+The input files shall be text files.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIcomm\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_COLLATE\fP
+.sp
+Determine the locale for the collating sequence \fIcomm\fP expects
+to have been used when the input files were sorted.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The \fIcomm\fP utility shall produce output depending on the options
+selected. If the \fB-1\fP, \fB-2\fP, and \fB-3\fP
+options are all selected, \fIcomm\fP shall write nothing to standard
+output.
+.LP
+If the \fB-1\fP option is not selected, lines contained only in \fIfile1\fP
+shall be written using the format:
+.sp
+.RS
+.nf
+
+\fB"%s\\n", <\fP\fIline in file1\fP\fB>
+\fP
+.fi
+.RE
+.LP
+If the \fB-2\fP option is not selected, lines contained only in \fIfile2\fP
+are written using the format:
+.sp
+.RS
+.nf
+
+\fB"%s%s\\n", <\fP\fIlead\fP\fB>, <\fP\fIline in file2\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where the string <\fIlead\fP> is as follows:
+.TP 7
+<tab>
+The \fB-1\fP option is not selected.
+.TP 7
+null\ string
+The \fB-1\fP option is selected.
+.sp
+.LP
+If the \fB-3\fP option is not selected, lines contained in both files
+shall be written using the format:
+.sp
+.RS
+.nf
+
+\fB"%s%s\\n", <\fP\fIlead\fP\fB>, <\fP\fIline in both\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where the string <\fIlead\fP> is as follows:
+.TP 7
+<tab><tab>
+Neither the \fB-1\fP nor the \fB-2\fP option is selected.
+.TP 7
+<tab>
+Exactly one of the \fB-1\fP and \fB-2\fP options is selected.
+.TP 7
+null\ string
+Both the \fB-1\fP and \fB-2\fP options are selected.
+.sp
+.LP
+If the input files were ordered according to the collating sequence
+of the current locale, the lines written shall be in the
+collating sequence of the original lines.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+All input files were successfully output as specified.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+If the input files are not properly presorted, the output of \fIcomm\fP
+might not be useful.
+.SH EXAMPLES
+.LP
+If a file named \fBxcu\fP contains a sorted list of the utilities
+in this volume of IEEE\ Std\ 1003.1-2001, a file
+named \fBxpg3\fP contains a sorted list of the utilities specified
+in the X/Open Portability Guide, Issue 3, and a file named
+\fBsvid89\fP contains a sorted list of the utilities in the System
+V Interface Definition Third Edition:
+.sp
+.RS
+.nf
+
+\fBcomm -23 xcu xpg3 | comm -23 - svid89
+\fP
+.fi
+.RE
+.LP
+would print a list of utilities in this volume of IEEE\ Std\ 1003.1-2001
+not specified by either of the other
+documents:
+.sp
+.RS
+.nf
+
+\fBcomm -12 xcu xpg3 | comm -12 - svid89
+\fP
+.fi
+.RE
+.LP
+would print a list of utilities specified by all three documents,
+and:
+.sp
+.RS
+.nf
+
+\fBcomm -12 xpg3 svid89 | comm -23 - xcu
+\fP
+.fi
+.RE
+.LP
+would print a list of utilities specified by both XPG3 and the SVID,
+but not specified in this volume of
+IEEE\ Std\ 1003.1-2001.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcmp\fP, \fIdiff\fP, \fIsort\fP, \fIuniq\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/command.1p b/man-pages-posix-2003/man1p/command.1p
new file mode 100644
index 0000000..15bd65d
--- /dev/null
+++ b/man-pages-posix-2003/man1p/command.1p
@@ -0,0 +1,489 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "COMMAND" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" command
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+command \- execute a simple command
+.SH SYNOPSIS
+.LP
+\fBcommand\fP \fB[\fP\fB-p\fP\fB]\fP \fIcommand_name\fP \fB[\fP\fIargument\fP
+\fB\&...\fP\fB]\fP\fB
+.br
+.sp
+\fP
+.LP
+\fBcommand\fP \fB[\fP \fB-v | -V\fP \fB]\fP \fIcommand_name\fP\fB\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIcommand\fP utility shall cause the shell to treat the arguments
+as a simple command, suppressing the shell function
+lookup that is described in \fICommand Search and Execution\fP, item
+1b.
+.LP
+If the \fIcommand_name\fP is the same as the name of one of the special
+built-in utilities, the special properties in the
+enumerated list at the beginning of \fISpecial Built-In Utilities\fP
+shall not occur. In
+every other respect, if \fIcommand_name\fP is not the name of a function,
+the effect of \fIcommand\fP (with no options) shall be
+the same as omitting \fIcommand\fP.
+.LP
+On systems supporting the User Portability Utilities option, the \fIcommand\fP
+utility also shall provide information
+concerning how a command name is interpreted by the shell; see \fB-v\fP
+and \fB-V\fP.
+.SH OPTIONS
+.LP
+The \fIcommand\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-p\fP
+Perform the command search using a default value for \fIPATH\fP that
+is guaranteed to find all of the standard utilities.
+.TP 7
+\fB-v\fP
+(On systems supporting the User Portability Utilities option.) Write
+a string to standard output that indicates the pathname or
+command that will be used by the shell, in the current shell execution
+environment (see \fIShell Execution Environment\fP ), to invoke \fIcommand_name\fP,
+but do not invoke
+\fIcommand_name\fP.
+.RS
+.IP " *" 3
+Utilities, regular built-in utilities, \fIcommand_name\fPs including
+a slash character, and any implementation-defined
+functions that are found using the \fIPATH\fP variable (as described
+in \fICommand
+Search and Execution\fP ), shall be written as absolute pathnames.
+.LP
+.IP " *" 3
+Shell functions, special built-in utilities, regular built-in utilities
+not associated with a \fIPATH\fP search, and shell
+reserved words shall be written as just their names.
+.LP
+.IP " *" 3
+An alias shall be written as a command line that represents its alias
+definition.
+.LP
+.IP " *" 3
+Otherwise, no output shall be written and the exit status shall reflect
+that the name was not found.
+.LP
+.RE
+.TP 7
+\fB-V\fP
+(On systems supporting the User Portability Utilities option.) Write
+a string to standard output that indicates how the name
+given in the \fIcommand_name\fP operand will be interpreted by the
+shell, in the current shell execution environment (see \fIShell Execution
+Environment\fP ), but do not invoke \fIcommand_name\fP. Although the
+format of
+this string is unspecified, it shall indicate in which of the following
+categories \fIcommand_name\fP falls and shall include the
+information stated:
+.RS
+.IP " *" 3
+Utilities, regular built-in utilities, and any implementation-defined
+functions that are found using the \fIPATH\fP variable
+(as described in \fICommand Search and Execution\fP ), shall be identified
+as such
+and include the absolute pathname in the string.
+.LP
+.IP " *" 3
+Other shell functions shall be identified as functions.
+.LP
+.IP " *" 3
+Aliases shall be identified as aliases and their definitions included
+in the string.
+.LP
+.IP " *" 3
+Special built-in utilities shall be identified as special built-in
+utilities.
+.LP
+.IP " *" 3
+Regular built-in utilities not associated with a \fIPATH\fP search
+shall be identified as regular built-in utilities. (The term
+"regular" need not be used.)
+.LP
+.IP " *" 3
+Shell reserved words shall be identified as reserved words.
+.LP
+.RE
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIargument\fP
+One of the strings treated as an argument to \fIcommand_name\fP.
+.TP 7
+\fIcommand_name\fP
+.sp
+The name of a utility or a special built-in utility.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIcommand\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard error and
+informative messages written to standard output.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fIPATH\fP
+Determine the search path used during the command search described
+in \fICommand
+Search and Execution\fP, except as described under the \fB-p\fP option.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+When the \fB-v\fP option is specified, standard output shall be formatted
+as:
+.sp
+.RS
+.nf
+
+\fB"%s\\n", <\fP\fIpathname or command\fP\fB>
+\fP
+.fi
+.RE
+.LP
+When the \fB-V\fP option is specified, standard output shall be formatted
+as:
+.sp
+.RS
+.nf
+
+\fB"%s\\n", <\fP\fIunspecified\fP\fB>
+\fP
+.fi
+.RE
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+When the \fB-v\fP or \fB-V\fP options are specified, the following
+exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+The \fIcommand_name\fP could not be found or an error occurred.
+.sp
+.LP
+Otherwise, the following exit values shall be returned:
+.TP 7
+126
+The utility specified by \fIcommand_name\fP was found but could not
+be invoked.
+.TP 7
+127
+An error occurred in the \fIcommand\fP utility or the utility specified
+by \fIcommand_name\fP could not be found.
+.sp
+.LP
+Otherwise, the exit status of \fIcommand\fP shall be that of the simple
+command specified by the arguments to
+\fIcommand\fP.
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The order for command search allows functions to override regular
+built-ins and path searches. This utility is necessary to
+allow functions that have the same name as a utility to call the utility
+(instead of a recursive call to the function).
+.LP
+The system default path is available using \fIgetconf\fP; however,
+since \fIgetconf\fP may need to have the \fIPATH\fP set up before
+it can be called itself, the
+following can be used:
+.sp
+.RS
+.nf
+
+\fBcommand -p getconf _CS_PATH
+\fP
+.fi
+.RE
+.LP
+There are some advantages to suppressing the special characteristics
+of special built-ins on occasion. For example:
+.sp
+.RS
+.nf
+
+\fBcommand exec >\fP \fIunwritable-file\fP
+.fi
+.RE
+.LP
+does not cause a non-interactive script to abort, so that the output
+status can be checked by the script.
+.LP
+The \fIcommand\fP, \fIenv\fP, \fInohup\fP, \fItime\fP, and \fIxargs\fP
+utilities have been specified to
+use exit code 127 if an error occurs so that applications can distinguish
+"failure to find a utility" from "invoked utility
+exited with an error indication". The value 127 was chosen because
+it is not commonly used for other meanings; most utilities use
+small values for "normal error conditions" and the values above 128
+can be confused with termination due to receipt of a signal.
+The value 126 was chosen in a similar manner to indicate that the
+utility could be found, but not invoked. Some scripts produce
+meaningful error messages differentiating the 126 and 127 cases. The
+distinction between exit codes 126 and 127 is based on
+KornShell practice that uses 127 when all attempts to \fIexec\fP the
+utility fail with [ENOENT], and uses 126 when any attempt to
+\fIexec\fP the utility fails for any other reason.
+.LP
+Since the \fB-v\fP and \fB-V\fP options of \fIcommand\fP produce output
+in relation to the current shell execution
+environment, \fIcommand\fP is generally provided as a shell regular
+built-in. If it is called in a subshell or separate utility
+execution environment, such as one of the following:
+.sp
+.RS
+.nf
+
+\fB(PATH=foo command -v)
+ nohup command -v
+\fP
+.fi
+.RE
+.LP
+it does not necessarily produce correct results. For example, when
+called with \fInohup\fP or an \fIexec\fP function, in a separate utility
+execution environment, most
+implementations are not able to identify aliases, functions, or special
+built-ins.
+.LP
+Two types of regular built-ins could be encountered on a system and
+these are described separately by \fIcommand\fP. The
+description of command search in \fICommand Search and Execution\fP
+allows for a
+standard utility to be implemented as a regular built-in as long as
+it is found in the appropriate place in a \fIPATH\fP search.
+So, for example, \fIcommand\fP \fB-v\fP \fItrue\fP might yield \fB/bin/true\fP
+or some similar pathname. Other
+implementation-defined utilities that are not defined by this volume
+of IEEE\ Std\ 1003.1-2001 might exist only as
+built-ins and have no pathname associated with them. These produce
+output identified as (regular) built-ins. Applications
+encountering these are not able to count on \fIexec\fPing them, using
+them with \fInohup\fP, overriding them with a different \fIPATH\fP,
+and so on.
+.SH EXAMPLES
+.IP " 1." 4
+Make a version of \fIcd\fP that always prints out the new working
+directory exactly
+once:
+.sp
+.RS
+.nf
+
+\fBcd() {
+ command cd "$@" >/dev/null
+ pwd
+}
+\fP
+.fi
+.RE
+.LP
+.IP " 2." 4
+Start off a "secure shell script" in which the script avoids being
+spoofed by its parent:
+.sp
+.RS
+.nf
+
+\fBIFS='
+'
+# The preceding value should be <space><tab><newline>.
+# Set IFS to its default value.
+.sp
+
+\\unalias -a
+# Unset all possible aliases.
+# Note that unalias is escaped to prevent an alias
+# being used for unalias.
+.sp
+
+unset -f command
+# Ensure command is not a user function.
+.sp
+
+PATH="$(command -p getconf _CS_PATH):$PATH"
+# Put on a reliable PATH prefix.
+.sp
+
+# ...
+\fP
+.fi
+.RE
+.LP
+At this point, given correct permissions on the directories called
+by \fIPATH\fP, the script has the ability to ensure that
+any utility it calls is the intended one. It is being very cautious
+because it assumes that implementation extensions may be
+present that would allow user functions to exist when it is invoked;
+this capability is not specified by this volume of
+IEEE\ Std\ 1003.1-2001, but it is not prohibited as an extension.
+For example, the \fIENV\fP variable precedes the
+invocation of the script with a user start-up script. Such a script
+could define functions to spoof the application.
+.LP
+.SH RATIONALE
+.LP
+Since \fIcommand\fP is a regular built-in utility it is always found
+prior to the \fIPATH\fP search.
+.LP
+There is nothing in the description of \fIcommand\fP that implies
+the command line is parsed any differently from that of any
+other simple command. For example:
+.sp
+.RS
+.nf
+
+\fBcommand a | b ; c
+\fP
+.fi
+.RE
+.LP
+is not parsed in any special way that causes \fB'|'\fP or \fB';'\fP
+to be treated other than a pipe operator or semicolon
+or that prevents function lookup on \fBb\fP or \fBc\fP.
+.LP
+The \fIcommand\fP utility is somewhat similar to the Eighth Edition
+shell \fIbuiltin\fP command, but since \fIcommand\fP also
+goes to the file system to search for utilities, the name \fIbuiltin\fP
+would not be intuitive.
+.LP
+The \fIcommand\fP utility is most likely to be provided as a regular
+built-in. It is not listed as a special built-in for the
+following reasons:
+.IP " *" 3
+The removal of exportable functions made the special precedence of
+a special built-in unnecessary.
+.LP
+.IP " *" 3
+A special built-in has special properties (see \fISpecial Built-In
+Utilities\fP ) that
+were inappropriate for invoking other utilities. For example, two
+commands such as:
+.sp
+.RS
+.nf
+
+\fBdate >\fP \fIunwritable-file\fP\fB
+.br
+
+command date >\fP \fIunwritable-file\fP
+.fi
+.RE
+.LP
+would have entirely different results; in a non-interactive script,
+the former would continue to execute the next command, the
+latter would abort. Introducing this semantic difference along with
+suppressing functions was seen to be non-intuitive.
+.LP
+.LP
+The \fB-p\fP option is present because it is useful to be able to
+ensure a safe path search that finds all the standard
+utilities. This search might not be identical to the one that occurs
+through one of the \fIexec\fP functions (as defined in the
+System Interfaces volume of IEEE\ Std\ 1003.1-2001) when \fIPATH\fP
+is unset. At the very least, this feature is required
+to allow the script to access the correct version of \fIgetconf\fP
+so that the value of
+the default path can be accurately retrieved.
+.LP
+The \fIcommand\fP \fB-v\fP and \fB-V\fP options were added to satisfy
+requirements from users that are currently accomplished
+by three different historical utilities: \fItype\fP in the System
+V shell, \fIwhence\fP in
+the KornShell, and \fIwhich\fP in the C shell. Since there is no historical
+agreement on how and what to accomplish here, the
+POSIX \fIcommand\fP utility was enhanced and the historical utilities
+were left unmodified. The C shell \fIwhich\fP merely
+conducts a path search. The KornShell \fIwhence\fP is more elaborate-in
+addition to the categories required by POSIX, it also
+reports on tracked aliases, exported aliases, and undefined functions.
+.LP
+The output format of \fB-V\fP was left mostly unspecified because
+human users are its only audience. Applications should not be
+written to care about this information; they can use the output of
+\fB-v\fP to differentiate between various types of commands,
+but the additional information that may be emitted by the more verbose
+\fB-V\fP is not needed and should not be arbitrarily
+constrained in its verbosity or localization for application parsing
+reasons.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fICommand Search and Execution\fP, \fIShell
+Execution Environment\fP, \fISpecial Built-In Utilities\fP, \fIsh\fP,
+\fItype\fP, the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+\fIexec\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/compress.1p b/man-pages-posix-2003/man1p/compress.1p
new file mode 100644
index 0000000..38439ee
--- /dev/null
+++ b/man-pages-posix-2003/man1p/compress.1p
@@ -0,0 +1,221 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "COMPRESS" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" compress
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+compress \- compress data
+.SH SYNOPSIS
+.LP
+\fBcompress\fP \fB[\fP\fB-fv\fP\fB][\fP\fB-b\fP \fIbits\fP\fB][\fP\fIfile\fP
+\fB\&...\fP\fB]\fP\fB
+.br
+.sp
+compress\fP \fB[\fP\fB-cfv\fP\fB][\fP\fB-b\fP \fIbits\fP\fB][\fP\fIfile\fP\fB]\fP\fB\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIcompress\fP utility shall attempt to reduce the size of the
+named files by using adaptive Lempel-Ziv coding algorithm.
+.TP 7
+\fBNote:\fP
+Lempel-Ziv is US Patent 4464650, issued to William Eastman, Abraham
+Lempel, Jacob Ziv, Martin Cohn on August 7th, 1984, and
+assigned to Sperry Corporation.
+.LP
+Lempel-Ziv-Welch compression is covered by US Patent 4558302, issued
+to Terry A. Welch on December 10th, 1985, and assigned to
+Sperry Corporation.
+.sp
+On systems not supporting adaptive Lempel-Ziv coding algorithm, the
+input files shall not be changed and an
+error value greater than two shall be returned. Except when the output
+is to the standard output, each file shall be replaced by
+one with the extension \fB.Z\fP. If the invoking process has appropriate
+privileges, the ownership, modes, access time, and
+modification time of the original file are preserved. If appending
+the \fB.Z\fP to the filename would make the name exceed
+{NAME_MAX} bytes, the command shall fail. If no files are specified,
+the standard input shall be compressed to the standard
+output.
+.SH OPTIONS
+.LP
+The \fIcompress\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-b\ \fP \fIbits\fP
+Specify the maximum number of bits to use in a code. For a conforming
+application, the \fIbits\fP argument shall be:
+.sp
+.RS
+.nf
+
+\fB9 <=\fP \fIbits\fP \fB<= 14
+\fP
+.fi
+.RE
+.LP
+The implementation may allow \fIbits\fP values of greater than 14.
+The default is 14, 15, or 16.
+.TP 7
+\fB-c\fP
+Cause \fIcompress\fP to write to the standard output; the input file
+is not changed, and no \fB.Z\fP files are created.
+.TP 7
+\fB-f\fP
+Force compression of \fIfile\fP, even if it does not actually reduce
+the size of the file, or if the corresponding \fIfile\fP
+\fB\&.Z\fP file already exists. If the \fB-f\fP option is not given,
+and the process is not running in the background, the user is
+prompted as to whether an existing \fIfile\fP \fB.Z\fP file should
+be overwritten.
+.TP 7
+\fB-v\fP
+Write the percentage reduction of each file to standard error.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of a file to be compressed.
+.sp
+.SH STDIN
+.LP
+The standard input shall be used only if no \fIfile\fP operands are
+specified, or if a \fIfile\fP operand is \fB'-'\fP
+\&.
+.SH INPUT FILES
+.LP
+If \fIfile\fP operands are specified, the input files contain the
+data to be compressed.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIcompress\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+If no \fIfile\fP operands are specified, or if a \fIfile\fP operand
+is \fB'-'\fP, or if the \fB-c\fP option is specified,
+the standard output contains the compressed output.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic and prompt messages
+and the output from \fB-v\fP.
+.SH OUTPUT FILES
+.LP
+The output files shall contain the compressed output. The format of
+compressed files is unspecified and interchange of such
+files between implementations (including access via unspecified file
+sharing mechanisms) is not required by
+IEEE\ Std\ 1003.1-2001.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+\ 1
+An error occurred.
+.TP 7
+\ 2
+One or more files were not compressed because they would have increased
+in size (and the \fB-f\fP option was not
+specified).
+.TP 7
+>2
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+The input file shall remain unmodified.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The amount of compression obtained depends on the size of the input,
+the number of \fIbits\fP per code, and the distribution of
+common substrings. Typically, text such as source code or English
+is reduced by 50-60%. Compression is generally much better than
+that achieved by Huffman coding or adaptive Huffman coding ( \fIcompact\fP),
+and takes less time to compute.
+.LP
+Although \fIcompress\fP strictly follows the default actions upon
+receipt of a signal or when an error occurs, some unexpected
+results may occur. In some implementations it is likely that a partially
+compressed file is left in place, alongside its
+uncompressed input file. Since the general operation of \fIcompress\fP
+is to delete the uncompressed file only after the \fB.Z\fP
+file has been successfully filled, an application should always carefully
+check the exit status of \fIcompress\fP before
+arbitrarily deleting files that have like-named neighbors with \fB.Z\fP
+suffixes.
+.LP
+The limit of 14 on the \fIbits\fP option-argument is to achieve portability
+to all systems (within the restrictions imposed by
+the lack of an explicit published file format). Some implementations
+based on 16-bit architectures cannot support 15 or 16-bit
+uncompression.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIuncompress\fP, \fIzcat\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/continue.1p b/man-pages-posix-2003/man1p/continue.1p
new file mode 100644
index 0000000..32f57e8
--- /dev/null
+++ b/man-pages-posix-2003/man1p/continue.1p
@@ -0,0 +1,107 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CONTINUE" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" continue
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+continue \- continue for, while, or until loop
+.SH SYNOPSIS
+.LP
+\fBcontinue\fP \fB[\fP\fIn\fP\fB]\fP
+.SH DESCRIPTION
+.LP
+The \fIcontinue\fP utility shall return to the top of the smallest
+enclosing \fBfor\fP, \fBwhile\fP, or \fBuntil\fP loop, or
+to the top of the \fIn\fPth enclosing loop, if \fIn\fP is specified.
+This involves repeating the condition list of a \fBwhile\fP
+or \fBuntil\fP loop or performing the next assignment of a \fBfor\fP
+loop, and re-executing the loop if appropriate.
+.LP
+The value of \fIn\fP is a decimal integer greater than or equal to
+1. The default shall be equivalent to \fIn\fP=1. If
+\fIn\fP is greater than the number of enclosing loops, the outermost
+enclosing loop shall be used.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+See the DESCRIPTION.
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+None.
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+The \fIn\fP value was not an unsigned decimal integer greater than
+or equal to 1.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.sp
+.RS
+.nf
+
+\fBfor i in *
+do
+ if test -d "$i"
+ then continue
+ fi
+ echo "\\"$i\\"" is not a directory.
+done
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fISpecial Built-In Utilities\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/cp.1p b/man-pages-posix-2003/man1p/cp.1p
new file mode 100644
index 0000000..c6ccb8c
--- /dev/null
+++ b/man-pages-posix-2003/man1p/cp.1p
@@ -0,0 +1,639 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CP" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" cp
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+cp \- copy files
+.SH SYNOPSIS
+.LP
+\fBcp\fP \fB[\fP\fB-fip\fP\fB]\fP \fIsource_file target_file\fP\fB
+.br
+.sp
+cp\fP \fB[\fP\fB-fip\fP\fB]\fP \fIsource_file\fP \fB...\fP \fItarget\fP\fB
+.br
+.sp
+cp -R\fP \fB[\fP\fB-H | -L | -P\fP\fB][\fP\fB-fip\fP\fB]\fP \fIsource_file\fP
+\fB\&...\fP \fItarget\fP\fB
+.br
+.sp
+cp -r\fP \fB[\fP\fB-H | -L | -P\fP\fB][\fP\fB-fip\fP\fB]\fP \fIsource_file\fP
+\fB\&...\fP \fItarget\fP\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The first synopsis form is denoted by two operands, neither of which
+are existing files of type directory. The \fIcp\fP utility
+shall copy the contents of \fIsource_file\fP (or, if \fIsource_file\fP
+is a file of type symbolic link, the contents of the file
+referenced by \fIsource_file\fP) to the destination path named by
+\fItarget_file.\fP
+.LP
+The second synopsis form is denoted by two or more operands where
+the \fB-R\fP or \fB-r\fP options are not specified and the
+first synopsis form is not applicable. It shall be an error if any
+\fIsource_file\fP is a file of type directory, if \fItarget\fP
+does not exist, or if \fItarget\fP is a file of a type defined by
+the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+but is not a file of type directory. The \fIcp\fP utility shall copy
+the contents of each \fIsource_file\fP (or, if
+\fIsource_file\fP is a file of type symbolic link, the contents of
+the file referenced by \fIsource_file\fP) to the destination
+path named by the concatenation of \fItarget\fP, a slash character,
+and the last component of \fIsource_file\fP.
+.LP
+The third and fourth synopsis forms are denoted by two or more operands
+where the \fB-R\fP or \fB-r\fP options are specified.
+The \fIcp\fP utility shall copy each file in the file hierarchy rooted
+in each \fIsource_file\fP to a destination path named as
+follows:
+.IP " *" 3
+If \fItarget\fP exists and is a file of type directory, the name of
+the corresponding destination path for each file in the
+file hierarchy shall be the concatenation of \fItarget\fP, a slash
+character, and the pathname of the file relative to the
+directory containing \fIsource_file\fP.
+.LP
+.IP " *" 3
+If \fItarget\fP does not exist and two operands are specified, the
+name of the corresponding destination path for
+\fIsource_file\fP shall be \fItarget\fP; the name of the corresponding
+destination path for all other files in the file hierarchy
+shall be the concatenation of \fItarget\fP, a slash character, and
+the pathname of the file relative to \fIsource_file\fP.
+.LP
+.LP
+It shall be an error if \fItarget\fP does not exist and more than
+two operands are specified, or if \fItarget\fP exists and is
+a file of a type defined by the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+but is not a file of type
+directory.
+.LP
+In the following description, the term \fIdest_file\fP refers to the
+file named by the destination path. The term
+\fIsource_file\fP refers to the file that is being copied, whether
+specified as an operand or a file in a file hierarchy rooted in
+a \fIsource_file\fP operand. If \fIsource_file\fP is a file of type
+symbolic link:
+.IP " *" 3
+If neither the \fB-R\fP nor \fB-r\fP options were specified, \fIcp\fP
+shall take actions based on the type and contents of
+the file referenced by the symbolic link, and not by the symbolic
+link itself.
+.LP
+.IP " *" 3
+If the \fB-R\fP option was specified:
+.RS
+.IP " *" 3
+If none of the options \fB-H\fP, \fB-L\fP, nor \fB-P\fP were specified,
+it is unspecified which of \fB-H\fP, \fB-L\fP, or
+\fB-P\fP will be used as a default.
+.LP
+.IP " *" 3
+If the \fB-H\fP option was specified, \fIcp\fP shall take actions
+based on the type and contents of the file referenced by any
+symbolic link specified as a \fIsource_file\fP operand.
+.LP
+.IP " *" 3
+If the \fB-L\fP option was specified, \fIcp\fP shall take actions
+based on the type and contents of the file referenced by any
+symbolic link specified as a \fIsource_file\fP operand or any symbolic
+links encountered during traversal of a file hierarchy.
+.LP
+.IP " *" 3
+If the \fB-P\fP option was specified, \fIcp\fP shall copy any symbolic
+link specified as a \fIsource_file\fP operand and any
+symbolic links encountered during traversal of a file hierarchy, and
+shall not follow any symbolic links.
+.LP
+.RE
+.LP
+.IP " *" 3
+If the \fB-r\fP option was specified, the behavior is implementation-defined.
+.LP
+.LP
+For each \fIsource_file\fP, the following steps shall be taken:
+.IP " 1." 4
+If \fIsource_file\fP references the same file as \fIdest_file\fP,
+\fIcp\fP may write a diagnostic message to standard error;
+it shall do nothing more with \fIsource_file\fP and shall go on to
+any remaining files.
+.LP
+.IP " 2." 4
+If \fIsource_file\fP is of type directory, the following steps shall
+be taken:
+.RS
+.IP " a." 4
+If neither the \fB-R\fP or \fB-r\fP options were specified, \fIcp\fP
+shall write a diagnostic message to standard error, do
+nothing more with \fIsource_file\fP, and go on to any remaining files.
+.LP
+.IP " b." 4
+If \fIsource_file\fP was not specified as an operand and \fIsource_file\fP
+is dot or dot-dot, \fIcp\fP shall do nothing more
+with \fIsource_file\fP and go on to any remaining files.
+.LP
+.IP " c." 4
+If \fIdest_file\fP exists and it is a file type not specified by the
+System Interfaces volume of
+IEEE\ Std\ 1003.1-2001, the behavior is implementation-defined.
+.LP
+.IP " d." 4
+If \fIdest_file\fP exists and it is not of type directory, \fIcp\fP
+shall write a diagnostic message to standard error, do
+nothing more with \fIsource_file\fP or any files below \fIsource_file\fP
+in the file hierarchy, and go on to any remaining
+files.
+.LP
+.IP " e." 4
+If the directory \fIdest_file\fP does not exist, it shall be created
+with file permission bits set to the same value as those
+of \fIsource_file\fP, modified by the file creation mask of the user
+if the \fB-p\fP option was not specified, and then
+bitwise-inclusively OR'ed with S_IRWXU. If \fIdest_file\fP cannot
+be created, \fIcp\fP shall write a diagnostic message to
+standard error, do nothing more with \fIsource_file\fP, and go on
+to any remaining files. It is unspecified if \fIcp\fP attempts
+to copy files in the file hierarchy rooted in \fIsource_file\fP.
+.LP
+.IP " f." 4
+The files in the directory \fIsource_file\fP shall be copied to the
+directory \fIdest_file\fP, taking the four steps (1 to 4)
+listed here with the files as \fIsource_file\fPs.
+.LP
+.IP " g." 4
+If \fIdest_file\fP was created, its file permission bits shall be
+changed (if necessary) to be the same as those of
+\fIsource_file\fP, modified by the file creation mask of the user
+if the \fB-p\fP option was not specified.
+.LP
+.IP " h." 4
+The \fIcp\fP utility shall do nothing more with \fIsource_file\fP
+and go on to any remaining files.
+.LP
+.RE
+.LP
+.IP " 3." 4
+If \fIsource_file\fP is of type regular file, the following steps
+shall be taken:
+.RS
+.IP " a." 4
+If \fIdest_file\fP exists, the following steps shall be taken:
+.RS
+.IP "i. " 5
+If the \fB-i\fP option is in effect, the \fIcp\fP utility shall write
+a prompt to the standard error and read a line from the
+standard input. If the response is not affirmative, \fIcp\fP shall
+do nothing more with \fIsource_file\fP and go on to any
+remaining files.
+.LP
+.IP "ii." 5
+A file descriptor for \fIdest_file\fP shall be obtained by performing
+actions equivalent to the \fIopen\fP() function defined in the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001
+called using \fIdest_file\fP as the \fIpath\fP argument, and the bitwise-inclusive
+OR of O_WRONLY and O_TRUNC as the \fIoflag\fP
+argument.
+.LP
+.IP "iii." 5
+If the attempt to obtain a file descriptor fails and the \fB-f\fP
+option is in effect, \fIcp\fP shall attempt to remove the
+file by performing actions equivalent to the \fIunlink\fP() function
+defined in the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001 called using \fIdest_file\fP
+as the \fIpath\fP argument. If this attempt
+succeeds, \fIcp\fP shall continue with step 3b.
+.LP
+.RE
+.LP
+.IP " b." 4
+If \fIdest_file\fP does not exist, a file descriptor shall be obtained
+by performing actions equivalent to the \fIopen\fP() function defined
+in the System Interfaces volume of IEEE\ Std\ 1003.1-2001
+called using \fIdest_file\fP as the \fIpath\fP argument, and the bitwise-inclusive
+OR of O_WRONLY and O_CREAT as the \fIoflag\fP
+argument. The file permission bits of \fIsource_file\fP shall be the
+\fImode\fP argument.
+.LP
+.IP " c." 4
+If the attempt to obtain a file descriptor fails, \fIcp\fP shall write
+a diagnostic message to standard error, do nothing more
+with \fIsource_file\fP, and go on to any remaining files.
+.LP
+.IP " d." 4
+The contents of \fIsource_file\fP shall be written to the file descriptor.
+Any write errors shall cause \fIcp\fP to write a
+diagnostic message to standard error and continue to step 3e.
+.LP
+.IP " e." 4
+The file descriptor shall be closed.
+.LP
+.IP " f." 4
+The \fIcp\fP utility shall do nothing more with \fIsource_file\fP.
+If a write error occurred in step 3d, it is unspecified if
+\fIcp\fP continues with any remaining files. If no write error occurred
+in step 3d, \fIcp\fP shall go on to any remaining
+files.
+.LP
+.RE
+.LP
+.IP " 4." 4
+Otherwise, the following steps shall be taken:
+.RS
+.IP " a." 4
+If the \fB-r\fP option was specified, the behavior is implementation-defined.
+.LP
+.IP " b." 4
+If the \fB-R\fP option was specified, the following steps shall be
+taken:
+.RS
+.IP "i. " 5
+The \fIdest_file\fP shall be created with the same file type as \fIsource_file\fP.
+.LP
+.IP "ii." 5
+If \fIsource_file\fP is a file of type FIFO, the file permission bits
+shall be the same as those of \fIsource_file,\fP
+modified by the file creation mask of the user if the \fB-p\fP option
+was not specified. Otherwise, the permissions, owner ID, and
+group ID of \fIdest_file\fP are implementation-defined.
+.LP
+If this creation fails for any reason, \fIcp\fP shall write a diagnostic
+message to standard error, do nothing more with
+\fIsource_file\fP, and go on to any remaining files.
+.LP
+.IP "iii." 5
+If \fIsource_file\fP is a file of type symbolic link, the pathname
+contained in \fIdest_file\fP shall be the same as the
+pathname contained in \fIsource_file\fP.
+.LP
+If this fails for any reason, \fIcp\fP shall write a diagnostic message
+to standard error, do nothing more with
+\fIsource_file\fP, and go on to any remaining files.
+.LP
+.RE
+.LP
+.RE
+.LP
+.LP
+If the implementation provides additional or alternate access control
+mechanisms (see the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 4.4, File Access Permissions), their
+effect on copies of files is implementation-defined.
+.SH OPTIONS
+.LP
+The \fIcp\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-f\fP
+If a file descriptor for a destination file cannot be obtained, as
+described in step 3.a.ii., attempt to unlink the destination
+file and proceed.
+.TP 7
+\fB-H\fP
+Take actions based on the type and contents of the file referenced
+by any symbolic link specified as a \fIsource_file\fP
+operand.
+.TP 7
+\fB-i\fP
+Write a prompt to standard error before copying to any existing destination
+file. If the response from the standard input is
+affirmative, the copy shall be attempted; otherwise, it shall not.
+.TP 7
+\fB-L\fP
+Take actions based on the type and contents of the file referenced
+by any symbolic link specified as a \fIsource_file\fP
+operand or any symbolic links encountered during traversal of a file
+hierarchy.
+.TP 7
+\fB-P\fP
+Take actions on any symbolic link specified as a \fIsource_file\fP
+operand or any symbolic link encountered during traversal
+of a file hierarchy.
+.TP 7
+\fB-p\fP
+Duplicate the following characteristics of each source file in the
+corresponding destination file:
+.RS
+.IP " 1." 4
+The time of last data modification and time of last access. If this
+duplication fails for any reason, \fIcp\fP shall write a
+diagnostic message to standard error.
+.LP
+.IP " 2." 4
+The user ID and group ID. If this duplication fails for any reason,
+it is unspecified whether \fIcp\fP writes a diagnostic
+message to standard error.
+.LP
+.IP " 3." 4
+The file permission bits and the S_ISUID and S_ISGID bits. Other,
+implementation-defined, bits may be duplicated as well. If
+this duplication fails for any reason, \fIcp\fP shall write a diagnostic
+message to standard error.
+.LP
+.RE
+.LP
+If the user ID or the group ID cannot be duplicated, the file permission
+bits S_ISUID and S_ISGID shall be cleared. If these
+bits are present in the source file but are not duplicated in the
+destination file, it is unspecified whether \fIcp\fP writes a
+diagnostic message to standard error.
+.LP
+The order in which the preceding characteristics are duplicated is
+unspecified. The \fIdest_file\fP shall not be deleted if
+these characteristics cannot be preserved.
+.TP 7
+\fB-R\fP
+Copy file hierarchies.
+.TP 7
+\fB-r\fP
+Copy file hierarchies. The treatment of special files is implementation-defined.
+.sp
+.LP
+Specifying more than one of the mutually-exclusive options \fB-H\fP,
+\fB-L\fP, and \fB-P\fP shall not be considered an error.
+The last option specified shall determine the behavior of the utility.
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIsource_file\fP
+A pathname of a file to be copied.
+.TP 7
+\fItarget_file\fP
+A pathname of an existing or nonexistent file, used for the output
+when a single file is copied.
+.TP 7
+\fItarget\fP
+A pathname of a directory to contain the copied files.
+.sp
+.SH STDIN
+.LP
+The standard input shall be used to read an input line in response
+to each prompt specified in the STDERR section. Otherwise,
+the standard input shall not be used.
+.SH INPUT FILES
+.LP
+The input files specified as operands may be of any file type.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIcp\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_COLLATE\fP
+.sp
+Determine the locale for the behavior of ranges, equivalence classes,
+and multi-character collating elements used in the extended
+regular expression defined for the \fByesexpr\fP locale keyword in
+the \fILC_MESSAGES\fP category.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files) and
+the behavior of character classes used in the extended regular
+expression defined for the \fByesexpr\fP locale keyword in the \fILC_MESSAGES\fP
+category.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale for the processing of affirmative responses that
+should be used to affect the format and contents of
+diagnostic messages written to standard error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+A prompt shall be written to standard error under the conditions specified
+in the DESCRIPTION section. The prompt shall contain
+the destination pathname, but its format is otherwise unspecified.
+Otherwise, the standard error shall be used only for diagnostic
+messages.
+.SH OUTPUT FILES
+.LP
+The output files may be of any type.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+All files were copied successfully.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+If \fIcp\fP is prematurely terminated by a signal or error, files
+or file hierarchies may be only partially copied and files
+and directories may have incorrect permissions or access and modification
+times.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The difference between \fB-R\fP and \fB-r\fP is in the treatment by
+\fIcp\fP of file types other than regular and directory.
+The original \fB-r\fP flag, for historic reasons, does not handle
+special files any differently from regular files, but always
+reads the file and copies its contents. This has obvious problems
+in the presence of special file types; for example, character
+devices, FIFOs, and sockets. The \fB-R\fP option is intended to recreate
+the file hierarchy and the \fB-r\fP option supports
+historical practice. It was anticipated that a future version of this
+volume of IEEE\ Std\ 1003.1-2001 would deprecate the
+\fB-r\fP option, and for that reason, there has been no attempt to
+fix its behavior with respect to FIFOs or other file types
+where copying the file is clearly wrong. However, some implementations
+support \fB-r\fP with the same abilities as the \fB-R\fP
+defined in this volume of IEEE\ Std\ 1003.1-2001. To accommodate them
+as well as systems that do not, the differences
+between \fB-r\fP and \fB-R\fP are implementation-defined. Implementations
+may make them identical. The \fB-r\fP option is marked
+obsolescent.
+.LP
+The set-user-ID and set-group-ID bits are explicitly cleared when
+files are created. This is to prevent users from creating
+programs that are set-user-ID or set-group-ID to them when copying
+files or to make set-user-ID or set-group-ID files accessible to
+new groups of users. For example, if a file is set-user-ID and the
+copy has a different group ID than the source, a new group of
+users has execute permission to a set-user-ID program than did previously.
+In particular, this is a problem for superusers copying
+users' trees.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fB-i\fP option exists on BSD systems, giving applications and
+users a way to avoid accidentally removing files when
+copying. Although the 4.3 BSD version does not prompt if the standard
+input is not a terminal, the standard developers decided that
+use of \fB-i\fP is a request for interaction, so when the destination
+path exists, the utility takes instructions from whatever
+responds on standard input.
+.LP
+The exact format of the interactive prompts is unspecified. Only the
+general nature of the contents of prompts are specified
+because implementations may desire more descriptive prompts than those
+used on historical implementations. Therefore, an
+application using the \fB-i\fP option relies on the system to provide
+the most suitable dialog directly with the user, based on
+the behavior specified.
+.LP
+The \fB-p\fP option is historical practice on BSD systems, duplicating
+the time of last data modification and time of last
+access. This volume of IEEE\ Std\ 1003.1-2001 extends it to preserve
+the user and group IDs, as well as the file
+permissions. This requirement has obvious problems in that the directories
+are almost certainly modified after being copied. This
+volume of IEEE\ Std\ 1003.1-2001 requires that the modification times
+be preserved. The statement that the order in which
+the characteristics are duplicated is unspecified is to permit implementations
+to provide the maximum amount of security for the
+user. Implementations should take into account the obvious security
+issues involved in setting the owner, group, and mode in the
+wrong order or creating files with an owner, group, or mode different
+from the final value.
+.LP
+It is unspecified whether \fIcp\fP writes diagnostic messages when
+the user and group IDs cannot be set due to the widespread
+practice of users using \fB-p\fP to duplicate some portion of the
+file characteristics, indifferent to the duplication of others.
+Historic implementations only write diagnostic messages on errors
+other than [EPERM].
+.LP
+The \fB-r\fP option is historical practice on BSD and BSD-derived
+systems, copying file hierarchies as opposed to single files.
+This functionality is used heavily in historical applications, and
+its loss would significantly decrease consensus. The \fB-R\fP
+option was added as a close synonym to the \fB-r\fP option, selected
+for consistency with all other options in this volume of
+IEEE\ Std\ 1003.1-2001 that do recursive directory descent.
+.LP
+When a failure occurs during the copying of a file hierarchy, \fIcp\fP
+is required to attempt to copy files that are on the
+same level in the hierarchy or above the file where the failure occurred.
+It is unspecified if \fIcp\fP shall attempt to copy
+files below the file where the failure occurred (which cannot succeed
+in any case).
+.LP
+Permissions, owners, and groups of created special file types have
+been deliberately left as implementation-defined. This is to
+allow systems to satisfy special requirements (for example, allowing
+users to create character special devices, but requiring them
+to be owned by a certain group). In general, it is strongly suggested
+that the permissions, owner, and group be the same as if the
+user had run the historical \fImknod\fP, \fIln\fP, or other utility
+to create the file. It is
+also probable that additional privileges are required to create block,
+character, or other implementation-defined special file
+types.
+.LP
+Additionally, the \fB-p\fP option explicitly requires that all set-user-ID
+and set-group-ID permissions be discarded if any of
+the owner or group IDs cannot be set. This is to keep users from unintentionally
+giving away special privilege when copying
+programs.
+.LP
+When creating regular files, historical versions of \fIcp\fP use the
+mode of the source file as modified by the file mode
+creation mask. Other choices would have been to use the mode of the
+source file unmodified by the creation mask or to use the same
+mode as would be given to a new file created by the user (plus the
+execution bits of the source file) and then modify it by the
+file mode creation mask. In the absence of any strong reason to change
+historic practice, it was in large part retained.
+.LP
+When creating directories, historical versions of \fIcp\fP use the
+mode of the source directory, plus read, write, and search
+bits for the owner, as modified by the file mode creation mask. This
+is done so that \fIcp\fP can copy trees where the user has
+read permission, but the owner does not. A side effect is that if
+the file creation mask denies the owner permissions, \fIcp\fP
+fails. Also, once the copy is done, historical versions of \fIcp\fP
+set the permissions on the created directory to be the same as
+the source directory, unmodified by the file creation mask.
+.LP
+This behavior has been modified so that \fIcp\fP is always able to
+create the contents of the directory, regardless of the file
+creation mask. After the copy is done, the permissions are set to
+be the same as the source directory, as modified by the file
+creation mask. This latter change from historical behavior is to prevent
+users from accidentally creating directories with
+permissions beyond those they would normally set and for consistency
+with the behavior of \fIcp\fP in creating files.
+.LP
+It is not a requirement that \fIcp\fP detect attempts to copy a file
+to itself; however, implementations are strongly
+encouraged to do so. Historical implementations have detected the
+attempt in most cases.
+.LP
+There are two methods of copying subtrees in this volume of IEEE\ Std\ 1003.1-2001.
+The other method is described as
+part of the \fIpax\fP utility (see \fIpax\fP ). Both methods are
+historical practice. The \fIcp\fP utility provides a simpler, more
+intuitive interface, while \fIpax\fP offers a finer granularity of
+control. Each provides additional functionality to the other;
+in particular, \fIpax\fP maintains the hard-link structure of the
+hierarchy, while \fIcp\fP
+does not. It is the intention of the standard developers that the
+results be similar (using appropriate option combinations in both
+utilities). The results are not required to be identical; there seemed
+insufficient gain to applications to balance the difficulty
+of implementations having to guarantee that the results would be exactly
+identical.
+.LP
+The wording allowing \fIcp\fP to copy a directory to implementation-defined
+file types not specified by the System Interfaces
+volume of IEEE\ Std\ 1003.1-2001 is provided so that implementations
+supporting symbolic links are not required to prohibit
+copying directories to symbolic links. Other extensions to the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001 file
+types may need to use this loophole as well.
+.SH FUTURE DIRECTIONS
+.LP
+The \fB-r\fP option may be removed; use \fB-R\fP instead.
+.SH SEE ALSO
+.LP
+\fImv\fP, \fIfind\fP, \fIln\fP, \fIpax\fP, the System Interfaces
+volume of IEEE\ Std\ 1003.1-2001, \fIopen\fP(), \fIunlink\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/crontab.1p b/man-pages-posix-2003/man1p/crontab.1p
new file mode 100644
index 0000000..db114df
--- /dev/null
+++ b/man-pages-posix-2003/man1p/crontab.1p
@@ -0,0 +1,326 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CRONTAB" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" crontab
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+crontab \- schedule periodic background work
+.SH SYNOPSIS
+.LP
+\fBcrontab\fP \fB[\fP\fIfile\fP\fB]\fP\fB
+.br
+.sp
+crontab\fP \fB[\fP \fB-e | -l | -r\fP \fB]\fP\fB\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIcrontab\fP utility shall create, replace, or edit a user's
+crontab entry; a crontab entry is a list of commands and the
+times at which they shall be executed. The new crontab entry can be
+input by specifying \fIfile\fP or input from standard input if
+no \fIfile\fP operand is specified, or by using an editor, if \fB-e\fP
+is specified.
+.LP
+Upon execution of a command from a crontab entry, the implementation
+shall supply a default environment, defining at least the
+following environment variables:
+.TP 7
+\fIHOME\fP
+A pathname of the user's home directory.
+.TP 7
+\fILOGNAME\fP
+The user's login name.
+.TP 7
+\fIPATH\fP
+A string representing a search path guaranteed to find all of the
+standard utilities.
+.TP 7
+\fISHELL\fP
+A pathname of the command interpreter. When \fIcrontab\fP is invoked
+as specified by this volume of
+IEEE\ Std\ 1003.1-2001, the value shall be a pathname for \fIsh\fP.
+.sp
+.LP
+The values of these variables when \fIcrontab\fP is invoked as specified
+by this volume of IEEE\ Std\ 1003.1-2001 shall
+not affect the default values provided when the scheduled command
+is run.
+.LP
+If standard output and standard error are not redirected by commands
+executed from the crontab entry, any generated output or
+errors shall be mailed, via an implementation-defined method, to the
+user.
+.LP
+Users shall be permitted to use \fIcrontab\fP if their names appear
+in the file \fB/usr/lib/cron/cron.allow\fP. If that file does
+not exist, the file \fB/usr/lib/cron/cron.deny\fP shall be checked
+to determine whether the user shall be denied access to
+\fIcrontab\fP. If neither file exists, only a process with appropriate
+privileges shall be allowed to submit a job. If only
+\fBcron.deny\fP exists and is empty, global usage shall be permitted.
+The \fBcron.allow\fP and \fBcron.deny\fP files shall
+consist of one user name per line.
+.SH OPTIONS
+.LP
+The \fIcrontab\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-e\fP
+Edit a copy of the invoking user's crontab entry, or create an empty
+entry to edit if the crontab entry does not exist. When
+editing is complete, the entry shall be installed as the user's crontab
+entry.
+.TP 7
+\fB-l\fP
+(The letter ell.) List the invoking user's crontab entry.
+.TP 7
+\fB-r\fP
+Remove the invoking user's crontab entry.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+The pathname of a file that contains specifications, in the format
+defined in the INPUT FILES section, for crontab
+entries.
+.sp
+.SH STDIN
+.LP
+See the INPUT FILES section.
+.SH INPUT FILES
+.LP
+In the POSIX locale, the user or application shall ensure that a crontab
+entry is a text file consisting of lines of six fields
+each. The fields shall be separated by <blank>s. The first five fields
+shall be integer patterns that specify the
+following:
+.IP " 1." 4
+Minute [0,59]
+.LP
+.IP " 2." 4
+Hour [0,23]
+.LP
+.IP " 3." 4
+Day of the month [1,31]
+.LP
+.IP " 4." 4
+Month of the year [1,12]
+.LP
+.IP " 5." 4
+Day of the week ([0,6] with 0=Sunday)
+.LP
+.LP
+Each of these patterns can be either an asterisk (meaning all valid
+values), an element, or a list of elements separated by
+commas. An element shall be either a number or two numbers separated
+by a hyphen (meaning an inclusive range). The specification of
+days can be made by two fields (day of the month and day of the week).
+If month, day of month, and day of week are all asterisks,
+every day shall be matched. If either the month or day of month is
+specified as an element or list, but the day of week is an
+asterisk, the month and day of month fields shall specify the days
+that match. If both month and day of month are specified as an
+asterisk, but day of week is an element or list, then only the specified
+days of the week match. Finally, if either the month or
+day of month is specified as an element or list, and the day of week
+is also specified as an element or list, then any day matching
+either the month and day of month, or the day of week, shall be matched.
+.LP
+The sixth field of a line in a crontab entry is a string that shall
+be executed by \fIsh\fP
+at the specified times. A percent sign character in this field shall
+be translated to a <newline>. Any character preceded by
+a backslash (including the \fB'%'\fP ) shall cause that character
+to be treated literally. Only the first line (up to a
+\fB'%'\fP or end-of-line) of the command field shall be executed by
+the command interpreter. The other lines shall be made
+available to the command as standard input.
+.LP
+Blank lines and those whose first non- <blank> is \fB'#'\fP shall
+be ignored.
+.LP
+The text files \fB/usr/lib/cron/cron.allow\fP and \fB/usr/lib/cron/cron.deny\fP
+shall contain zero or more user names, one per
+line, of users who are, respectively, authorized or denied access
+to the service underlying the \fIcrontab\fP utility.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIcrontab\fP:
+.TP 7
+\fIEDITOR\fP
+Determine the editor to be invoked when the \fB-e\fP option is specified.
+The default editor shall be \fIvi\fP.
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+If the \fB-l\fP option is specified, the crontab entry shall be written
+to the standard output.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+The user's crontab entry is not submitted, removed, edited, or listed.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The format of the crontab entry shown here is guaranteed only for
+the POSIX locale. Other cultures may be supported with
+substantially different interfaces, although implementations are encouraged
+to provide comparable levels of functionality.
+.LP
+The default settings of the \fIHOME\fP, \fILOGNAME\fP, \fIPATH\fP,
+and \fISHELL\fP variables that are given to the
+scheduled job are not affected by the settings of those variables
+when \fIcrontab\fP is run; as stated, they are defaults. The
+text about "invoked as specified by this volume of IEEE\ Std\ 1003.1-2001"
+means that the implementation may provide
+extensions that allow these variables to be affected at runtime, but
+that the user has to take explicit action in order to access
+the extension, such as give a new option flag or modify the format
+of the crontab entry.
+.LP
+A typical user error is to type only \fIcrontab\fP; this causes the
+system to wait for the new crontab entry on standard input.
+If end-of-file is typed (generally <control>-D), the crontab entry
+is replaced by an empty file. In this case, the user
+should type the interrupt character, which prevents the crontab entry
+from being replaced.
+.SH EXAMPLES
+.IP " 1." 4
+Clean up \fBcore\fP files every weekday morning at 3:15 am:
+.sp
+.RS
+.nf
+
+\fB15 3 * * 1-5 find $HOME -name core 2>/dev/null | xargs rm -f
+\fP
+.fi
+.RE
+.LP
+.IP " 2." 4
+Mail a birthday greeting:
+.sp
+.RS
+.nf
+
+\fB0 12 14 2 * mailx john%Happy Birthday!%Time for lunch.
+\fP
+.fi
+.RE
+.LP
+.IP " 3." 4
+As an example of specifying the two types of days:
+.sp
+.RS
+.nf
+
+\fB0 0 1,15 * 1
+\fP
+.fi
+.RE
+.LP
+would run a command on the first and fifteenth of each month, as well
+as on every Monday. To specify days by only one field, the
+other field should be set to \fB'*'\fP ; for example:
+.sp
+.RS
+.nf
+
+\fB0 0 * * 1
+\fP
+.fi
+.RE
+.LP
+would run a command only on Mondays.
+.LP
+.SH RATIONALE
+.LP
+All references to a \fIcron\fP daemon and to \fIcron\fP \fIfiles\fP
+have been omitted. Although historical implementations
+have used this arrangement, there is no reason to limit future implementations.
+.LP
+This description of \fIcrontab\fP is designed to support only users
+with normal privileges. The format of the input is based on
+the System V \fIcrontab\fP; however, there is no requirement here
+that the actual system database used by the \fIcron\fP daemon
+(or a similar mechanism) use this format internally. For example,
+systems derived from BSD are likely to have an additional field
+appended that indicates the user identity to be used when the job
+is submitted.
+.LP
+The \fB-e\fP option was adopted from the SVID as a user convenience,
+although it does not exist in all historical
+implementations.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIat\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/csplit.1p b/man-pages-posix-2003/man1p/csplit.1p
new file mode 100644
index 0000000..5f84273
--- /dev/null
+++ b/man-pages-posix-2003/man1p/csplit.1p
@@ -0,0 +1,274 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CSPLIT" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" csplit
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+csplit \- split files based on context
+.SH SYNOPSIS
+.LP
+\fBcsplit\fP \fB[\fP\fB-ks\fP\fB][\fP\fB-f\fP \fIprefix\fP\fB][\fP\fB-n\fP
+\fInumber\fP\fB]\fP \fIfile arg1\fP \fB...\fP\fIargn\fP\fB\fP
+.SH DESCRIPTION
+.LP
+The \fIcsplit\fP utility shall read the file named by the \fIfile\fP
+operand, write all or part of that file into other files
+as directed by the \fIarg\fP operands, and write the sizes of the
+files.
+.SH OPTIONS
+.LP
+The \fIcsplit\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-f\ \fP \fIprefix\fP
+Name the created files \fIprefix\fP \fB00\fP, \fIprefix\fP \fB01\fP,
+\&..., \fIprefixn\fP. The default is \fBxx00\fP ...
+\fBxx\fP \fIn\fP. If the \fIprefix\fP argument would create a filename
+exceeding {NAME_MAX} bytes, an error shall result,
+\fIcsplit\fP shall exit with a diagnostic message, and no files shall
+be created.
+.TP 7
+\fB-k\fP
+Leave previously created files intact. By default, \fIcsplit\fP shall
+remove created files if an error occurs.
+.TP 7
+\fB-n\ \fP \fInumber\fP
+Use \fInumber\fP decimal digits to form filenames for the file pieces.
+The default shall be 2.
+.TP 7
+\fB-s\fP
+Suppress the output of file size messages.
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIfile\fP
+The pathname of a text file to be split. If \fIfile\fP is \fB'-'\fP,
+the standard input shall be used.
+.sp
+.LP
+The operands \fIarg1\fP ... \fIargn\fP can be a combination of the
+following:
+.TP 7
+/\fIrexp\fP/\fB[\fP\fIoffset\fP\fB]\fP
+.sp
+A file shall be created using the content of the lines from the current
+line up to, but not including, the line that results from
+the evaluation of the regular expression with \fIoffset\fP, if any,
+applied. The regular expression \fIrexp\fP shall follow the
+rules for basic regular expressions described in the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Section 9.3, Basic Regular Expressions.
+The application shall use the sequence
+\fB"\\/"\fP to specify a slash character within the \fIrexp\fP. The
+optional offset shall be a positive or negative integer
+value representing a number of lines. A positive integer value can
+be preceded by \fB'+'\fP . If the selection of lines from an
+\fIoffset\fP expression of this type would create a file with zero
+lines, or one with greater than the number of lines left in the
+input file, the results are unspecified. After the section is created,
+the current line shall be set to the line that results from
+the evaluation of the regular expression with any offset applied.
+If the current line is the first line in the file and a regular
+expression operation has not yet been performed, the pattern match
+of \fIrexp\fP shall be applied from the current line to the end
+of the file. Otherwise, the pattern match of \fIrexp\fP shall be applied
+from the line following the current line to the end of
+the file.
+.TP 7
+%\fIrexp\fP%\fB[\fP\fIoffset\fP\fB]\fP
+.sp
+Equivalent to /\fIrexp\fP/\fB[\fP\fIoffset\fP\fB]\fP, except that
+no file shall be created for the selected section of the
+input file. The application shall use the sequence \fB"\\%"\fP to
+specify a percent-sign character within the \fIrexp\fP.
+.TP 7
+\fIline_no\fP
+Create a file from the current line up to (but not including) the
+line number \fIline_no\fP. Lines in the file shall be
+numbered starting at one. The current line becomes \fIline_no\fP.
+.TP 7
+{\fInum\fP}
+Repeat operand. This operand can follow any of the operands described
+previously. If it follows a \fIrexp\fP type operand,
+that operand shall be applied \fInum\fP more times. If it follows
+a \fIline_no\fP operand, the file shall be split every
+\fIline_no\fP lines, \fInum\fP times, from that point.
+.sp
+.LP
+An error shall be reported if an operand does not reference a line
+between the current position and the end of the file.
+.SH STDIN
+.LP
+See the INPUT FILES section.
+.SH INPUT FILES
+.LP
+The input file shall be a text file.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIcsplit\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_COLLATE\fP
+.sp
+Determine the locale for the behavior of ranges, equivalence classes,
+and multi-character collating elements within regular
+expressions.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files) and
+the behavior of character classes within regular
+expressions.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+If the \fB-k\fP option is specified, created files shall be retained.
+Otherwise, the default action occurs.
+.SH STDOUT
+.LP
+Unless the \fB-s\fP option is used, the standard output shall consist
+of one line per file created, with a format as
+follows:
+.sp
+.RS
+.nf
+
+\fB"%d\\n", <\fP\fIfile size in bytes\fP\fB>
+\fP
+.fi
+.RE
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+The output files shall contain portions of the original input file;
+otherwise, unchanged.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+By default, created files shall be removed if an error occurs. When
+the \fB-k\fP option is specified, created files shall not
+be removed if an error occurs.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.IP " 1." 4
+This example creates four files, \fBcobol00\fP ... \fBcobol03\fP:
+.sp
+.RS
+.nf
+
+\fBcsplit -f cobol file '/procedure division/' /par5./ /par16./
+\fP
+.fi
+.RE
+.LP
+After editing the split files, they can be recombined as follows:
+.sp
+.RS
+.nf
+
+\fBcat cobol0[0-3] > file
+\fP
+.fi
+.RE
+.LP
+Note that this example overwrites the original file.
+.LP
+.IP " 2." 4
+This example would split the file after the first 99 lines, and every
+100 lines thereafter, up to 9999 lines; this is because
+lines in the file are numbered from 1 rather than zero, for historical
+reasons:
+.sp
+.RS
+.nf
+
+\fBcsplit -k file 100 {99}
+\fP
+.fi
+.RE
+.LP
+.IP " 3." 4
+Assuming that \fBprog.c\fP follows the C-language coding convention
+of ending routines with a \fB'}'\fP at the beginning of
+the line, this example creates a file containing each separate C routine
+(up to 21) in \fBprog.c\fP:
+.sp
+.RS
+.nf
+
+\fBcsplit -k prog.c '%main(%' '/^}/+1' {20}
+\fP
+.fi
+.RE
+.LP
+.SH RATIONALE
+.LP
+The \fB-n\fP option was added to extend the range of filenames that
+could be handled.
+.LP
+Consideration was given to adding a \fB-a\fP flag to use the alphabetic
+filename generation used by the historical \fIsplit\fP utility, but
+the functionality added by the \fB-n\fP option was deemed to make
+alphabetic naming unnecessary.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsed\fP, \fIsplit\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/ctags.1p b/man-pages-posix-2003/man1p/ctags.1p
new file mode 100644
index 0000000..e71f74e
--- /dev/null
+++ b/man-pages-posix-2003/man1p/ctags.1p
@@ -0,0 +1,419 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CTAGS" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ctags
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ctags \- create a tags file (\fBDEVELOPMENT\fP, \fBFORTRAN\fP)
+.SH SYNOPSIS
+.LP
+\fBctags\fP \fB[\fP\fB-a\fP\fB][\fP\fB-f\fP \fItagsfile\fP\fB]\fP
+\fIpathname\fP \fB...
+.br
+.sp
+ctags -x\fP \fIpathname\fP \fB... \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIctags\fP utility shall be provided on systems that support
+the User Portability Utilities option, the Software
+Development Utilities option, and either or both of the C-Language
+Development Utilities option and FORTRAN Development Utilities
+option. On other systems, it is optional.
+.LP
+The \fIctags\fP utility shall write a \fItagsfile\fP or an index of
+objects from C-language or FORTRAN source files specified
+by the \fIpathname\fP operands. The \fItagsfile\fP shall list the
+locators of language-specific objects within the source files.
+A locator consists of a name, pathname, and either a search pattern
+or a line number that can be used in searching for the object
+definition. The objects that shall be recognized are specified in
+the EXTENDED DESCRIPTION section.
+.SH OPTIONS
+.LP
+The \fIctags\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-a\fP
+Append to \fItagsfile\fP.
+.TP 7
+\fB-f\ \fP \fItagsfile\fP
+Write the object locator lists into \fItagsfile\fP instead of the
+default file named \fBtags\fP in the current
+directory.
+.TP 7
+\fB-x\fP
+Produce a list of object names, the line number, and filename in which
+each is defined, as well as the text of that line, and
+write this to the standard output. A \fItagsfile\fP shall not be created
+when \fB-x\fP is specified.
+.sp
+.SH OPERANDS
+.LP
+The following \fIpathname\fP operands are supported:
+.TP 7
+\fIfile\fP\fB.c\fP
+Files with basenames ending with the \fB.c\fP suffix shall be treated
+as C-language source code. Such files that are not valid
+input to \fIc99\fP produce unspecified results.
+.TP 7
+\fIfile\fP\fB.h\fP
+Files with basenames ending with the \fB.h\fP suffix shall be treated
+as C-language source code. Such files that are not valid
+input to \fIc99\fP produce unspecified results.
+.TP 7
+\fIfile\fP\fB.f\fP
+Files with basenames ending with the \fB.f\fP suffix shall be treated
+as FORTRAN-language source code. Such files that are not
+valid input to \fIfort77\fP produce unspecified results.
+.sp
+.LP
+The handling of other files is implementation-defined.
+.SH STDIN
+.LP
+See the INPUT FILES section.
+.SH INPUT FILES
+.LP
+The input files shall be text files containing source code in the
+language indicated by the operand filename suffixes.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIctags\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_COLLATE\fP
+.sp
+Determine the order in which output is sorted for the \fB-x\fP option.
+The POSIX locale determines the order in which the
+\fItagsfile\fP is written.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files). When
+processing C-language source code, if the locale is not
+compatible with the C locale described by the ISO\ C standard, the
+results are unspecified.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The list of object name information produced by the \fB-x\fP option
+shall be written to standard output in the following
+format:
+.sp
+.RS
+.nf
+
+\fB"%s %d %s %s", <\fP\fIobject-name\fP\fB>, <\fP\fIline-number\fP\fB>, <\fP\fIfilename\fP\fB>, <\fP\fItext\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where <\fItext\fP> is the text of line <\fIline-number\fP> of file
+<\fIfilename\fP>.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+When the \fB-x\fP option is not specified, the format of the output
+file shall be:
+.sp
+.RS
+.nf
+
+\fB"%s\\t%s\\t/%s/\\n", <\fP\fIidentifier\fP\fB>, <\fP\fIfilename\fP\fB>, <\fP\fIpattern\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where <\fIpattern\fP> is a search pattern that could be used by an
+editor to find the defining instance of
+<\fIidentifier\fP> in <\fIfilename\fP> (where \fIdefining instance\fP
+is indicated by the declarations listed in the
+EXTENDED DESCRIPTION).
+.LP
+An optional circumflex ( \fB'^'\fP ) can be added as a prefix to <\fIpattern\fP>,
+and an optional dollar sign can be
+appended to <\fIpattern\fP> to indicate that the pattern is anchored
+to the beginning (end) of a line of text. Any slash or
+backslash characters in <\fIpattern\fP> shall be preceded by a backslash
+character. The anchoring circumflex, dollar sign,
+and escaping backslash characters shall not be considered part of
+the search pattern. All other characters in the search pattern
+shall be considered literal characters.
+.br
+.LP
+An alternative format is:
+.sp
+.RS
+.nf
+
+\fB"%s\\t%s\\t?%s?\\n", <\fP\fIidentifier\fP\fB>, <\fP\fIfilename\fP\fB>, <\fP\fIpattern\fP\fB>
+\fP
+.fi
+.RE
+.LP
+which is identical to the first format except that slashes in <\fIpattern\fP>
+shall not be preceded by escaping backslash
+characters, and question mark characters in <\fIpattern\fP> shall
+be preceded by backslash characters.
+.LP
+A second alternative format is:
+.sp
+.RS
+.nf
+
+\fB"%s\\t%s\\t%d\\n", <\fP\fIidentifier\fP\fB>, <\fP\fIfilename\fP\fB>, <\fP\fIlineno\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where <\fIlineno\fP> is a decimal line number that could be used by
+an editor to find <\fIidentifier\fP> in
+<\fIfilename\fP>.
+.LP
+Neither alternative format shall be produced by \fIctags\fP when it
+is used as described by IEEE\ Std\ 1003.1-2001, but
+the standard utilities that process tags files shall be able to process
+those formats as well as the first format.
+.LP
+In any of these formats, the file shall be sorted by identifier, based
+on the collation sequence in the POSIX locale.
+.SH EXTENDED DESCRIPTION
+.LP
+If the operand identifies C-language source, the \fIctags\fP utility
+shall attempt to produce an output line for each of the
+following objects:
+.IP " *" 3
+Function definitions
+.LP
+.IP " *" 3
+Type definitions
+.LP
+.IP " *" 3
+Macros with arguments
+.LP
+.LP
+It may also produce output for any of the following objects:
+.IP " *" 3
+Function prototypes
+.LP
+.IP " *" 3
+Structures
+.LP
+.IP " *" 3
+Unions
+.LP
+.IP " *" 3
+Global variable definitions
+.LP
+.IP " *" 3
+Enumeration types
+.LP
+.IP " *" 3
+Macros without arguments
+.LP
+.IP " *" 3
+\fB#define\fP statements
+.LP
+.IP " *" 3
+\fB#line\fP statements
+.LP
+.LP
+Any \fB#if\fP and \fB#ifdef\fP statements shall produce no output.
+The tag \fBmain\fP is treated specially in C programs. The
+tag formed shall be created by prefixing \fBM\fP to the name of the
+file, with the trailing \fB.c\fP, and leading pathname
+components (if any) removed.
+.LP
+On systems that do not support the C-Language Development Utilities
+option, \fIctags\fP produces unspecified results for
+C-language source code files. It should write to standard error a
+message identifying this condition and cause a non-zero exit
+status to be produced.
+.LP
+If the operand identifies FORTRAN source, the \fIctags\fP utility
+shall produce an output line for each function definition. It
+may also produce output for any of the following objects:
+.IP " *" 3
+Subroutine definitions
+.LP
+.IP " *" 3
+COMMON statements
+.LP
+.IP " *" 3
+PARAMETER statements
+.LP
+.IP " *" 3
+DATA and BLOCK DATA statements
+.LP
+.IP " *" 3
+Statement numbers
+.LP
+.LP
+On systems that do not support the FORTRAN Development Utilities option,
+\fIctags\fP produces unspecified results for FORTRAN
+source code files. It should write to standard error a message identifying
+this condition and cause a non-zero exit status to be
+produced.
+.LP
+It is implementation-defined what other objects (including duplicate
+identifiers) produce output.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The output with \fB-x\fP is meant to be a simple index that can be
+written out as an off-line readable function index. If the
+input files to \fIctags\fP (such as \fB.c\fP files) were not created
+using the same locale as that in effect when \fIctags\fP
+\fB-x\fP is run, results might not be as expected.
+.LP
+The description of C-language processing says "attempts to" because
+the C language can be greatly confused, especially through
+the use of \fB#define\fPs, and this utility would be of no use if
+the real C preprocessor were run to identify them. The output
+from \fIctags\fP may be fooled and incorrect for various constructs.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The option list was significantly reduced from that provided by historical
+implementations. The \fB-F\fP option was omitted as
+redundant, since it is the default. The \fB-B\fP option was omitted
+as being of very limited usefulness. The \fB-t\fP option was
+omitted since the recognition of \fBtypedef\fPs is now required for
+C source files. The \fB-u\fP option was omitted because the
+update function was judged to be not only inefficient, but also rarely
+needed.
+.LP
+An early proposal included a \fB-w\fP option to suppress warning diagnostics.
+Since the types of such diagnostics could not be
+described, the option was omitted as being not useful.
+.LP
+The text for \fILC_CTYPE\fP about compatibility with the C locale
+acknowledges that the ISO\ C standard imposes
+requirements on the locale used to process C source. This could easily
+be a superset of that known as "the C locale" by way of
+implementation extensions, or one of a few alternative locales for
+systems supporting different codesets. No statement is made for
+FORTRAN because the ANSI\ X3.9-1978 standard (FORTRAN 77) does not
+(yet) define a similar locale concept. However, a general
+rule in this volume of IEEE\ Std\ 1003.1-2001 is that any time that
+locales do not match (preparing a file for one locale
+and processing it in another), the results are suspect.
+.LP
+The collation sequence of the tags file is not affected by \fILC_COLLATE\fP
+because it is typically not used by human readers,
+but only by programs such as \fIvi\fP to locate the tag within the
+source files. Using the
+POSIX locale eliminates some of the problems of coordinating locales
+between the \fIctags\fP file creator and the \fIvi\fP file reader.
+.LP
+Historically, the tags file has been used only by \fIex\fP and \fIvi\fP.
+However, the format of the tags file has been published to encourage
+other programs to use
+the tags in new ways. The format allows either patterns or line numbers
+to find the identifiers because the historical \fIvi\fP recognizes
+either. The \fIctags\fP utility does not produce the format using
+line numbers
+because it is not useful following any source file changes that add
+or delete lines. The documented search patterns match
+historical practice. It should be noted that literal leading circumflex
+or trailing dollar-sign characters in the search pattern
+will only behave correctly if anchored to the beginning of the line
+or end of the line by an additional circumflex or dollar-sign
+character.
+.LP
+Historical implementations also understand the objects used by the
+languages Pascal and sometimes LISP, and they understand the
+C source output by \fIlex\fP and \fIyacc\fP. The
+\fIctags\fP utility is not required to accommodate these languages,
+although implementors are encouraged to do so.
+.LP
+The following historical option was not specified, as \fIvgrind\fP
+is not included in this volume of
+IEEE\ Std\ 1003.1-2001:
+.TP 7
+\fB-v\fP
+If the \fB-v\fP flag is given, an index of the form expected by \fIvgrind\fP
+is produced on the standard output. This listing
+contains the function name, filename, and page number (assuming 64-line
+pages). Since the output is sorted into lexicographic
+order, it may be desired to run the output through \fIsort\fP \fB-f\fP.
+Sample use:
+.sp
+.RS
+.nf
+
+\fBctags -v files | sort -f > index vgrind -x index
+\fP
+.fi
+.RE
+.sp
+.LP
+The special treatment of the tag \fBmain\fP makes the use of \fIctags\fP
+practical in directories with more than one
+program.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIc99\fP, \fIfort77\fP, \fIvi\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/cut.1p b/man-pages-posix-2003/man1p/cut.1p
new file mode 100644
index 0000000..e566b56
--- /dev/null
+++ b/man-pages-posix-2003/man1p/cut.1p
@@ -0,0 +1,367 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CUT" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" cut
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+cut \- cut out selected fields of each line of a file
+.SH SYNOPSIS
+.LP
+\fBcut -b\fP \fIlist\fP \fB[\fP\fB-n\fP\fB] [\fP\fIfile\fP \fB...\fP\fB]\fP\fB
+.br
+.sp
+cut -c\fP \fIlist\fP \fB[\fP\fIfile\fP \fB...\fP\fB]\fP\fB
+.br
+.sp
+cut -f\fP \fIlist\fP \fB[\fP\fB-d\fP \fIdelim\fP\fB][\fP\fB-s\fP\fB][\fP\fIfile\fP
+\fB\&...\fP\fB]\fP\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIcut\fP utility shall cut out bytes ( \fB-b\fP option), characters
+( \fB-c\fP option), or character-delimited fields (
+\fB-f\fP option) from each line in one or more files, concatenate
+them, and write them to standard output.
+.SH OPTIONS
+.LP
+The \fIcut\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The application shall ensure that the option-argument \fIlist\fP (see
+options \fB-b\fP, \fB-c\fP, and \fB-f\fP below) is a
+comma-separated list or <blank>-separated list of positive numbers
+and ranges. Ranges can be in three forms. The first is two
+positive numbers separated by a hyphen ( \fIlow\fP- \fIhigh\fP), which
+represents all fields from the first number to the second
+number. The second is a positive number preceded by a hyphen (- \fIhigh\fP),
+which represents all fields from field number 1 to
+that number. The third is a positive number followed by a hyphen (
+\fIlow\fP-), which represents that number to the last field,
+inclusive. The elements in \fIlist\fP can be repeated, can overlap,
+and can be specified in any order, but the bytes, characters,
+or fields selected shall be written in the order of the input data.
+If an element appears in the selection list more than once, it
+shall be written exactly once.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-b\ \fP \fIlist\fP
+Cut based on a \fIlist\fP of bytes. Each selected byte shall be output
+unless the \fB-n\fP option is also specified. It shall
+not be an error to select bytes not present in the input line.
+.TP 7
+\fB-c\ \fP \fIlist\fP
+Cut based on a \fIlist\fP of characters. Each selected character shall
+be output. It shall not be an error to select
+characters not present in the input line.
+.TP 7
+\fB-d\ \fP \fIdelim\fP
+Set the field delimiter to the character \fIdelim\fP. The default
+is the <tab>.
+.TP 7
+\fB-f\ \fP \fIlist\fP
+Cut based on a \fIlist\fP of fields, assumed to be separated in the
+file by a delimiter character (see \fB-d\fP). Each
+selected field shall be output. Output fields shall be separated by
+a single occurrence of the field delimiter character. Lines
+with no field delimiters shall be passed through intact, unless \fB-s\fP
+is specified. It shall not be an error to select fields
+not present in the input line.
+.TP 7
+\fB-n\fP
+Do not split characters. When specified with the \fB-b\fP option,
+each element in \fIlist\fP of the form \fIlow\fP-
+\fIhigh\fP (hyphen-separated numbers) shall be modified as follows:
+.RS
+.IP " *" 3
+If the byte selected by \fIlow\fP is not the first byte of a character,
+\fIlow\fP shall be decremented to select the first
+byte of the character originally selected by \fIlow\fP. If the byte
+selected by \fIhigh\fP is not the last byte of a character,
+\fIhigh\fP shall be decremented to select the last byte of the character
+prior to the character originally selected by
+\fIhigh\fP, or zero if there is no prior character. If the resulting
+range element has \fIhigh\fP equal to zero or \fIlow\fP
+greater than \fIhigh\fP, the list element shall be dropped from \fIlist\fP
+for that input line without causing an error.
+.LP
+.RE
+.LP
+Each element in \fIlist\fP of the form \fIlow\fP- shall be treated
+as above with \fIhigh\fP set to the number of bytes in the
+current line, not including the terminating <newline>. Each element
+in \fIlist\fP of the form - \fIhigh\fP shall be treated
+as above with \fIlow\fP set to 1. Each element in \fIlist\fP of the
+form \fInum\fP (a single number) shall be treated as above
+with \fIlow\fP set to \fInum\fP and \fIhigh\fP set to \fInum\fP.
+.TP 7
+\fB-s\fP
+Suppress lines with no delimiter characters, when used with the \fB-f\fP
+option. Unless specified, lines with no delimiters
+shall be passed through untouched.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of an input file. If no \fIfile\fP operands are specified,
+or if a \fIfile\fP operand is \fB'-'\fP, the
+standard input shall be used.
+.sp
+.SH STDIN
+.LP
+The standard input shall be used only if no \fIfile\fP operands are
+specified, or if a \fIfile\fP operand is \fB'-'\fP .
+See the INPUT FILES section.
+.SH INPUT FILES
+.LP
+The input files shall be text files, except that line lengths shall
+be unlimited.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIcut\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The \fIcut\fP utility output shall be a concatenation of the selected
+bytes, characters, or fields (one of the following):
+.sp
+.RS
+.nf
+
+\fB"%s\\n", <\fP\fIconcatenation of bytes\fP\fB>
+.sp
+
+"%s\\n", <\fP\fIconcatenation of characters\fP\fB>
+.sp
+
+"%s\\n", <\fP\fIconcatenation of fields and field delimiters\fP\fB>
+\fP
+.fi
+.RE
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+All input files were output successfully.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Earlier versions of the \fIcut\fP utility worked in an environment
+where bytes and characters were considered equivalent
+(modulo <backspace> and <tab> processing in some implementations).
+In the extended world of multi-byte characters, the
+new \fB-b\fP option has been added. The \fB-n\fP option (used with
+\fB-b\fP) allows it to be used to act on bytes rounded to
+character boundaries. The algorithm specified for \fB-n\fP guarantees
+that:
+.sp
+.RS
+.nf
+
+\fBcut -b 1-500 -n file > file1
+cut -b 501- -n file > file2
+\fP
+.fi
+.RE
+.LP
+ends up with all the characters in \fBfile\fP appearing exactly once
+in \fBfile1\fP or \fBfile2\fP. (There is, however, a
+<newline> in both \fBfile1\fP and \fBfile2\fP for each <newline> in
+\fBfile\fP.)
+.SH EXAMPLES
+.LP
+Examples of the option qualifier list:
+.TP 7
+1,4,7
+Select the first, fourth, and seventh bytes, characters, or fields
+and field delimiters.
+.TP 7
+1-3,8
+Equivalent to 1,2,3,8.
+.TP 7
+-5,10
+Equivalent to 1,2,3,4,5,10.
+.TP 7
+3-
+Equivalent to third to last, inclusive.
+.sp
+.LP
+The \fIlow\fP- \fIhigh\fP forms are not always equivalent when used
+with \fB-b\fP and \fB-n\fP and multi-byte characters;
+see the description of \fB-n\fP.
+.LP
+The following command:
+.sp
+.RS
+.nf
+
+\fBcut -d : -f 1,6 /etc/passwd
+\fP
+.fi
+.RE
+.LP
+reads the System V password file (user database) and produces lines
+of the form:
+.sp
+.RS
+.nf
+
+\fB<\fP\fIuser ID\fP\fB>:<\fP\fIhome directory\fP\fB>
+\fP
+.fi
+.RE
+.LP
+Most utilities in this volume of IEEE\ Std\ 1003.1-2001 work on text
+files. The \fIcut\fP utility can be used to turn
+files with arbitrary line lengths into a set of text files containing
+the same data. The \fIpaste\fP utility can be used to create (or recreate)
+files with arbitrary line lengths. For
+example, if \fBfile\fP contains long lines:
+.sp
+.RS
+.nf
+
+\fBcut -b 1-500 -n file > file1
+cut -b 501- -n file > file2
+\fP
+.fi
+.RE
+.LP
+creates \fBfile1\fP (a text file) with lines no longer than 500 bytes
+(plus the <newline>) and \fBfile2\fP that contains
+the remainder of the data from \fBfile\fP. (Note that \fBfile2\fP
+is not a text file if there are lines in \fBfile\fP that are
+longer than 500 + {LINE_MAX} bytes.) The original file can be recreated
+from \fBfile1\fP and \fBfile2\fP using the command:
+.sp
+.RS
+.nf
+
+\fBpaste -d "\\0" file1 file2 > file
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+Some historical implementations do not count <backspace>s in determining
+character counts with the \fB-c\fP option. This
+may be useful for using \fIcut\fP for processing \fInroff\fP output.
+It was deliberately decided not to have the \fB-c\fP option
+treat either <backspace>s or <tab>s in any special fashion. The \fIfold\fP
+utility does treat these characters specially.
+.LP
+Unlike other utilities, some historical implementations of \fIcut\fP
+exit after not finding an input file, rather than
+continuing to process the remaining \fIfile\fP operands. This behavior
+is prohibited by this volume of
+IEEE\ Std\ 1003.1-2001, where only the exit status is affected by
+this problem.
+.LP
+The behavior of \fIcut\fP when provided with either mutually-exclusive
+options or options that do not work logically together
+has been deliberately left unspecified in favor of global wording
+in \fIUtility Description
+Defaults\fP .
+.LP
+The OPTIONS section was changed in response to IEEE PASC Interpretation
+1003.2 #149. The change represents historical practice
+on all known systems. The original standard was ambiguous on the nature
+of the output.
+.LP
+The \fIlist\fP option-arguments are historically used to select the
+portions of the line to be written, but do not affect the
+order of the data. For example:
+.sp
+.RS
+.nf
+
+\fBecho abcdefghi | cut -c6,2,4-7,1
+\fP
+.fi
+.RE
+.LP
+yields \fB"abdefg"\fP .
+.LP
+A proposal to enhance \fIcut\fP with the following option:
+.TP 7
+\fB-o\fP
+Preserve the selected field order. When this option is specified,
+each byte, character, or field (or ranges of such) shall be
+written in the order specified by the \fIlist\fP option-argument,
+even if this requires multiple outputs of the same bytes,
+characters, or fields.
+.sp
+.LP
+was rejected because this type of enhancement is outside the scope
+of the IEEE\ P1003.2b draft standard.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgrep\fP, \fIpaste\fP, \fIParameters
+and Variables\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/cxref.1p b/man-pages-posix-2003/man1p/cxref.1p
new file mode 100644
index 0000000..bde1f5e
--- /dev/null
+++ b/man-pages-posix-2003/man1p/cxref.1p
@@ -0,0 +1,186 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CXREF" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" cxref
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+cxref \- generate a C-language program cross-reference table (\fBDEVELOPMENT\fP)
+.SH SYNOPSIS
+.LP
+\fBcxref\fP \fB[\fP\fB-cs\fP\fB][\fP\fB-o\fP \fIfile\fP\fB][\fP\fB-w\fP
+\fInum\fP\fB]
+[\fP\fB-D\fP \fIname\fP\fB[\fP\fB=\fP\fIdef\fP\fB]]\fP\fB...\fP\fB[\fP\fB-I\fP
+\fIdir\fP\fB]\fP\fB...
+.br
+\ \ \ \ \ \ \fP \fB[\fP\fB-U\fP \fIname\fP\fB]\fP\fB...\fP \fIfile\fP
+\fB\&... \fP
+.SH DESCRIPTION
+.LP
+The \fIcxref\fP utility shall analyze a collection of C-language \fIfile\fPs
+and attempt to build a cross-reference table.
+Information from \fB#define\fP lines shall be included in the symbol
+table. A sorted listing shall be written to standard output
+of all symbols (auto, static, and global) in each \fIfile\fP separately,
+or with the \fB-c\fP option, in combination. Each symbol
+shall contain an asterisk before the declaring reference.
+.SH OPTIONS
+.LP
+The \fIcxref\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines,
+except that the order of the \fB-D\fP,
+\fB-I\fP, and \fB-U\fP options (which are identical to their interpretation
+by \fIc99\fP) is
+significant. The following options shall be supported:
+.TP 7
+\fB-c\fP
+Write a combined cross-reference of all input files.
+.TP 7
+\fB-s\fP
+Operate silently; do not print input filenames.
+.TP 7
+\fB-o\ \fP \fIfile\fP
+Direct output to named \fIfile\fP.
+.TP 7
+\fB-w\ \fP \fInum\fP
+Format output no wider than \fInum\fP (decimal) columns. This option
+defaults to 80 if \fInum\fP is not specified or is less
+than 51.
+.TP 7
+\fB-D\fP
+Equivalent to \fIc99\fP.
+.TP 7
+\fB-I\fP
+Equivalent to \fIc99\fP.
+.TP 7
+\fB-U\fP
+Equivalent to \fIc99\fP.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of a C-language source file.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+The input files are C-language source files.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIcxref\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_COLLATE\fP
+.sp
+Determine the locale for the ordering of the output.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The standard output shall be used for the cross-reference listing,
+unless the \fB-o\fP option is used to select a different
+output file.
+.LP
+The format of standard output is unspecified, except that the following
+information shall be included:
+.IP " *" 3
+If the \fB-c\fP option is not specified, each portion of the listing
+shall start with the name of the input file on a separate
+line.
+.LP
+.IP " *" 3
+The name line shall be followed by a sorted list of symbols, each
+with its associated location pathname, the name of the
+function in which it appears (if it is not a function name itself),
+and line number references.
+.LP
+.IP " *" 3
+Each line number may be preceded by an asterisk ( \fB'*'\fP ) flag,
+meaning that this is the declaring reference. Other
+single-character flags, with implementation-defined meanings, may
+be included.
+.LP
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+The output file named by the \fB-o\fP option shall be used instead
+of standard output.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIc99\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/date.1p b/man-pages-posix-2003/man1p/date.1p
new file mode 100644
index 0000000..17b08c3
--- /dev/null
+++ b/man-pages-posix-2003/man1p/date.1p
@@ -0,0 +1,577 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "DATE" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" date
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+date \- write the date and time
+.SH SYNOPSIS
+.LP
+\fBdate\fP \fB[\fP\fB-u\fP\fB] [\fP\fB+\fP\fIformat\fP\fB]\fP\fB
+.br
+.sp
+\fP
+.LP
+\fBdate\fP \fB[\fP\fB-u\fP\fB]\fP
+\fImmddhhmm\fP\fB[[\fP\fIcc\fP\fB]\fP\fIyy\fP\fB]\fP\fB\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIdate\fP utility shall write the date and time to standard output
+\ or attempt
+to set the system date and time. By default, the current date and
+time shall be written. If an operand beginning with \fB'+'\fP is specified,
+the output format of \fIdate\fP shall be controlled
+by the conversion specifications and other text in the operand.
+.SH OPTIONS
+.LP
+The \fIdate\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following option shall be supported:
+.TP 7
+\fB-u\fP
+Perform operations as if the \fITZ\fP environment variable was set
+to the string \fB"UTC0"\fP, or its equivalent
+historical value of \fB"GMT0"\fP . Otherwise, \fIdate\fP shall use
+the timezone indicated by the \fITZ\fP environment variable
+or the system default if that variable is unset or null.
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
++\fIformat\fP
+When the format is specified, each conversion specifier shall be replaced
+in the standard output by its corresponding value.
+All other characters shall be copied to the output without change.
+The output shall always be terminated with a
+<newline>.
+.sp
+.SS Conversion Specifications
+.TP 7
+\fB%a\fP
+Locale's abbreviated weekday name.
+.TP 7
+\fB%A\fP
+Locale's full weekday name.
+.TP 7
+\fB%b\fP
+Locale's abbreviated month name.
+.TP 7
+\fB%B\fP
+Locale's full month name.
+.TP 7
+\fB%c\fP
+Locale's appropriate date and time representation.
+.TP 7
+\fB%C\fP
+Century (a year divided by 100 and truncated to an integer) as a decimal
+number [00,99].
+.TP 7
+\fB%d\fP
+Day of the month as a decimal number [01,31].
+.TP 7
+\fB%D\fP
+Date in the format \fImm\fP/\fIdd\fP/\fIyy\fP.
+.TP 7
+\fB%e\fP
+Day of the month as a decimal number [1,31] in a two-digit field with
+leading space character fill.
+.TP 7
+\fB%h\fP
+A synonym for \fB%b\fP .
+.TP 7
+\fB%H\fP
+Hour (24-hour clock) as a decimal number [00,23].
+.TP 7
+\fB%I\fP
+Hour (12-hour clock) as a decimal number [01,12].
+.TP 7
+\fB%j\fP
+Day of the year as a decimal number [001,366].
+.TP 7
+\fB%m\fP
+Month as a decimal number [01,12].
+.TP 7
+\fB%M\fP
+Minute as a decimal number [00,59].
+.TP 7
+\fB%n\fP
+A <newline>.
+.TP 7
+\fB%p\fP
+Locale's equivalent of either AM or PM.
+.TP 7
+\fB%r\fP
+12-hour clock time [01,12] using the AM/PM notation; in the POSIX
+locale, this shall be equivalent to \fB%I\fP : \fB%M\fP
+: \fB%S\fP \fB%p\fP .
+.TP 7
+\fB%S\fP
+Seconds as a decimal number [00,60].
+.TP 7
+\fB%t\fP
+A <tab>.
+.TP 7
+\fB%T\fP
+24-hour clock time [00,23] in the format \fIHH\fP:\fIMM\fP:\fISS\fP.
+.TP 7
+\fB%u\fP
+Weekday as a decimal number [1,7] (1=Monday).
+.TP 7
+\fB%U\fP
+Week of the year (Sunday as the first day of the week) as a decimal
+number [00,53]. All days in a new year preceding the first
+Sunday shall be considered to be in week 0.
+.TP 7
+\fB%V\fP
+Week 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 shall be considered week 1;
+otherwise, it shall be the last week of the previous year, and
+the next week shall be week 1.
+.TP 7
+\fB%w\fP
+Weekday as a decimal number [0,6] (0=Sunday).
+.TP 7
+\fB%W\fP
+Week of the year (Monday as the first day of the week) as a decimal
+number [00,53]. All days in a new year preceding the first
+Monday shall be considered to be in week 0.
+.TP 7
+\fB%x\fP
+Locale's appropriate date representation.
+.TP 7
+\fB%X\fP
+Locale's appropriate time representation.
+.TP 7
+\fB%y\fP
+Year within century [00,99].
+.TP 7
+\fB%Y\fP
+Year with century as a decimal number.
+.TP 7
+\fB%Z\fP
+Timezone name, or no characters if no timezone is determinable.
+.TP 7
+\fB%%\fP
+A percent sign character.
+.sp
+.LP
+See the Base Definitions volume of IEEE\ Std\ 1003.1-2001, Section
+7.3.5, LC_TIME for the conversion specifier values in the POSIX locale.
+.SS Modified Conversion Specifications
+.LP
+Some conversion specifiers can be modified by the \fBE\fP and \fBO\fP
+modifier characters to indicate a different format
+or specification as specified in the \fILC_TIME\fP locale description
+(see the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 7.3.5, LC_TIME). If the
+corresponding keyword (see \fBera\fP, \fBera_year\fP, \fBera_d_fmt\fP,
+and \fBalt_digits\fP in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 7.3.5, LC_TIME) is not specified or
+not supported for the current locale, the unmodified conversion specifier
+value shall be used.
+.TP 7
+\fB%Ec\fP
+Locale's alternative appropriate date and time representation.
+.TP 7
+\fB%EC\fP
+The name of the base year (period) in the locale's alternative representation.
+.TP 7
+\fB%Ex\fP
+Locale's alternative date representation.
+.TP 7
+\fB%EX\fP
+Locale's alternative time representation.
+.TP 7
+\fB%Ey\fP
+Offset from \fB%EC\fP (year only) in the locale's alternative representation.
+.TP 7
+\fB%EY\fP
+Full alternative year representation.
+.TP 7
+\fB%Od\fP
+Day of month using the locale's alternative numeric symbols.
+.TP 7
+\fB%Oe\fP
+Day of month using the locale's alternative numeric symbols.
+.TP 7
+\fB%OH\fP
+Hour (24-hour clock) using the locale's alternative numeric symbols.
+.TP 7
+\fB%OI\fP
+Hour (12-hour clock) using the locale's alternative numeric symbols.
+.TP 7
+\fB%Om\fP
+Month using the locale's alternative numeric symbols.
+.TP 7
+\fB%OM\fP
+Minutes using the locale's alternative numeric symbols.
+.TP 7
+\fB%OS\fP
+Seconds using the locale's alternative numeric symbols.
+.TP 7
+\fB%Ou\fP
+Weekday as a number in the locale's alternative representation (Monday
+= 1).
+.TP 7
+\fB%OU\fP
+Week number of the year (Sunday as the first day of the week) using
+the locale's alternative numeric symbols.
+.TP 7
+\fB%OV\fP
+Week number of the year (Monday as the first day of the week, rules
+corresponding to \fB%V\fP ), using the locale's
+alternative numeric symbols.
+.TP 7
+\fB%Ow\fP
+Weekday as a number in the locale's alternative representation (Sunday
+= 0).
+.TP 7
+\fB%OW\fP
+Week number of the year (Monday as the first day of the week) using
+the locale's alternative numeric symbols.
+.TP 7
+\fB%Oy\fP
+Year (offset from \fB%C\fP ) in alternative representation.
+.sp
+.sp
+.TP 7
+\fImmddhhmm\fP\fB[[\fP\fIcc\fP\fB]\fP\fIyy\fP\fB]\fP
+.sp
+Attempt to set the system date and time from the value given in the
+operand. This is only possible if the user has appropriate
+privileges and the system permits the setting of the system date and
+time. The first \fImm\fP is the month (number); \fIdd\fP is
+the day (number); \fIhh\fP is the hour (number, 24-hour system); the
+second \fImm\fP is the minute (number); \fIcc\fP is the
+century and is the first two digits of the year (this is optional);
+\fIyy\fP is the last two digits of the year and is optional.
+If century is not specified, then values in the range [69,99] shall
+refer to years 1969 to 1999 inclusive, and values in the range
+[00,68] shall refer to years 2000 to 2068 inclusive. The current year
+is the default if \fIyy\fP is omitted.
+.TP 7
+\fBNote:\fP
+.RS
+It is expected that in a future version of IEEE\ Std\ 1003.1-2001
+the default century inferred from a 2-digit year will
+change. (This would apply to all commands accepting a 2-digit year
+as input.)
+.RE
+.sp
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIdate\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fILC_TIME\fP
+Determine the format and contents of date and time strings written
+by \fIdate\fP.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fITZ\fP
+Determine the timezone in which the time and date are written, unless
+the \fB-u\fP option is specified. If the \fITZ\fP
+variable is unset or null and \fB-u\fP is not specified, an unspecified
+system default timezone is used.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+When no formatting operand is specified, the output in the POSIX locale
+shall be equivalent to specifying:
+.sp
+.RS
+.nf
+
+\fBdate "+%a %b %e %H:%M:%S %Z %Y"
+\fP
+.fi
+.RE
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+The date was written successfully.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Conversion specifiers are of unspecified format when not in the POSIX
+locale. Some of them can contain <newline>s in some
+locales, so it may be difficult to use the format shown in standard
+output for parsing the output of \fIdate\fP in those
+locales.
+.LP
+The range of values for \fB%S\fP extends from 0 to 60 seconds to accommodate
+the occasional leap second.
+.LP
+Although certain of the conversion specifiers in the POSIX locale
+(such as the name of the month) are shown with initial capital
+letters, this need not be the case in other locales. Programs using
+these fields may need to adjust the capitalization if the
+output is going to be used at the beginning of a sentence.
+.LP
+The date string formatting capabilities are intended for use in Gregorian-style
+calendars, possibly with a different starting
+year (or years). The \fB%x\fP and \fB%c\fP conversion specifications,
+however, are intended for local representation; these
+may be based on a different, non-Gregorian calendar.
+.LP
+The \fB%C\fP conversion specification was introduced to allow a fallback
+for the \fB%EC\fP (alternative year format base
+year); it can be viewed as the base of the current subdivision in
+the Gregorian calendar. The century number is calculated as the
+year divided by 100 and truncated to an integer; it should not be
+confused with the use of ordinal numbers for centuries (for
+example, "twenty-first century".) Both the \fB%Ey\fP and \fB%y\fP
+can then be viewed as the offset from \fB%EC\fP and
+\fB%C\fP, respectively.
+.LP
+The \fBE\fP and \fBO\fP modifiers modify the traditional conversion
+specifiers, so that they can always be used, even if
+the implementation (or the current locale) does not support the modifier.
+.LP
+The \fBE\fP modifier supports alternative date formats, such as the
+Japanese Emperor's Era, as long as these are based on the
+Gregorian calendar system. Extending the \fBE\fP modifiers to other
+date elements may provide an implementation-defined
+extension capable of supporting other calendar systems, especially
+in combination with the \fBO\fP modifier.
+.LP
+The \fBO\fP modifier supports time and date formats using the locale's
+alternative numerical symbols, such as Kanji or Hindi
+digits or ordinal number representation.
+.LP
+Non-European locales, whether they use Latin digits in computational
+items or not, often have local forms of the digits for use
+in date formats. This is not totally unknown even in Europe; a variant
+of dates uses Roman numerals for the months: the third day
+of September 1991 would be written as 3.IX.1991. In Japan, Kanji digits
+are regularly used for dates; in Arabic-speaking countries,
+Hindi digits are used. The \fB%d\fP, \fB%e\fP, \fB%H\fP, \fB%I\fP,
+\fB%m\fP, \fB%S\fP, \fB%U\fP,
+\fB%w\fP, \fB%W\fP, and \fB%y\fP conversion specifications always
+return the date and time field in Latin digits (that
+is, 0 to 9). The \fB%O\fP modifier was introduced to support the use
+for display purposes of non-Latin digits. In the
+\fILC_TIME\fP category in \fIlocaledef\fP, the optional \fBalt_digits\fP
+keyword is
+intended for this purpose. As an example, assume the following (partial)
+\fIlocaledef\fP
+source:
+.sp
+.RS
+.nf
+
+\fBalt_digits "";"I";"II";"III";"IV";"V";"VI";"VII";"VIII" \\
+ "IX";"X";"XI";"XII"
+d_fmt "%e.%Om.%Y"
+\fP
+.fi
+.RE
+.LP
+With the above date, the command:
+.sp
+.RS
+.nf
+
+\fBdate "+%x"
+\fP
+.fi
+.RE
+.LP
+would yield 3.IX.1991. With the same \fBd_fmt\fP, but without the
+\fBalt_digits\fP, the command would yield 3.9.1991.
+.SH EXAMPLES
+.IP " 1." 4
+The following are input/output examples of \fIdate\fP used at arbitrary
+times in the POSIX locale:
+.sp
+.RS
+.nf
+
+\fB$\fP \fBdate
+\fP\fBTue Jun 26 09:58:10 PDT 1990
+.sp
+
+$\fP \fBdate "+DATE: %m/%d/%y%nTIME: %H:%M:%S"
+\fP\fBDATE: 11/02/91
+TIME: 13:36:16
+.sp
+
+$\fP \fBdate "+TIME: %r"
+\fP\fBTIME: 01:36:32 PM\fP
+.fi
+.RE
+.LP
+.IP " 2." 4
+Examples for Denmark, where the default date and time format is \fB%a\fP
+\fB%d\fP \fB%b\fP \fB%Y\fP \fB%T\fP
+\fB%Z\fP :
+.sp
+.RS
+.nf
+
+\fB$\fP \fBLANG=da_DK.iso_8859-1 date
+\fP\fBons 02 okt 1991 15:03:32 CET
+.sp
+
+$\fP \fBLANG=da_DK.iso_8859-1 \\
+ date "+DATO: %A den %e. %B %Y%nKLOKKEN: %H:%M:%S"
+\fP\fBDATO: onsdag den 2. oktober 1991
+KLOKKEN: 15:03:56\fP
+.fi
+.RE
+.LP
+.IP " 3." 4
+Examples for Germany, where the default date and time format is \fB%a\fP
+\fB%d\fP . \fB%h\fP . \fB%Y\fP,
+\fB%T\fP \fB%Z\fP :
+.sp
+.RS
+.nf
+
+\fB$\fP \fBLANG=De_DE.88591 date
+\fP\fBMi 02.Okt.1991, 15:01:21 MEZ
+.sp
+
+$\fP \fBLANG=De_DE.88591 date "+DATUM: %A, %d. %B %Y%nZEIT: %H:%M:%S"
+\fP\fBDATUM: Mittwoch, 02. Oktober 1991
+ZEIT: 15:02:02\fP
+.fi
+.RE
+.LP
+.IP " 4." 4
+Examples for France, where the default date and time format is \fB%a\fP
+\fB%d\fP \fB%h\fP \fB%Y\fP \fB%Z\fP
+\fB%T\fP :
+.sp
+.RS
+.nf
+
+\fB$\fP \fBLANG=Fr_FR.88591 date
+\fP\fBMer 02 oct 1991 MET 15:03:32
+.sp
+
+$\fP \fBLANG=Fr_FR.88591 date "+JOUR: %A %d %B %Y%nHEURE: %H:%M:%S"
+\fP\fBJOUR: Mercredi 02 octobre 1991
+HEURE: 15:03:56\fP
+.fi
+.RE
+.LP
+.SH RATIONALE
+.LP
+Some of the new options for formatting are from the ISO\ C standard.
+The \fB-u\fP option was introduced to allow portable
+access to Coordinated Universal Time (UTC). The string \fB"GMT0"\fP
+is allowed as an equivalent \fITZ\fP value to be compatible
+with all of the systems using the BSD implementation, where this option
+originated.
+.LP
+The \fB%e\fP format conversion specification (adopted from System
+V) was added because the ISO\ C standard conversion
+specifications did not provide any way to produce the historical default
+\fIdate\fP output during the first nine days of any
+month.
+.LP
+There are two varieties of day and week numbering supported (in addition
+to any others created with the locale-dependent
+\fB%E\fP and \fB%O\fP modifier characters):
+.IP " *" 3
+The historical variety in which Sunday is the first day of the week
+and the weekdays preceding the first Sunday of the year are
+considered week 0. These are represented by \fB%w\fP and \fB%U\fP
+\&. A variant of this is \fB%W\fP, using Monday as the
+first day of the week, but still referring to week 0. This view of
+the calendar was retained because so many historical
+applications depend on it and the ISO\ C standard \fIstrftime\fP()
+function, on which
+many \fIdate\fP implementations are based, was defined in this way.
+.LP
+.IP " *" 3
+The international standard, based on the ISO\ 8601:2000 standard where
+Monday is the first weekday and the algorithm for the
+first week number is more complex: If the week (Monday to Sunday)
+containing January 1 has four or more days in the new year, then
+it is week 1; otherwise, it is week 53 of the previous year, and the
+next week is week 1. These are represented by the new
+conversion specifications \fB%u\fP and \fB%V\fP, added as a result
+of international comments.
+.LP
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIprintf\fP(),
+\fIstrftime\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/dd.1p b/man-pages-posix-2003/man1p/dd.1p
new file mode 100644
index 0000000..0e9c687
--- /dev/null
+++ b/man-pages-posix-2003/man1p/dd.1p
@@ -0,0 +1,593 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "DD" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" dd
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+dd \- convert and copy a file
+.SH SYNOPSIS
+.LP
+\fBdd\fP \fB[\fP\fIoperand\fP \fB...\fP\fB]\fP
+.SH DESCRIPTION
+.LP
+The \fIdd\fP utility shall copy the specified input file to the specified
+output file with possible conversions using specific
+input and output block sizes. It shall read the input one block at
+a time, using the specified input block size; it shall then
+process the block of data actually returned, which could be smaller
+than the requested block size. It shall apply any conversions
+that have been specified and write the resulting data to the output
+in blocks of the specified output block size. If the \fBbs\fP=
+\fIexpr\fP operand is specified and no conversions other than \fBsync\fP,
+\fBnoerror\fP, or \fBnotrunc\fP are requested, the
+data returned from each input block shall be written as a separate
+output block; if the read returns less than a full block and the
+\fBsync\fP conversion is not specified, the resulting output block
+shall be the same size as the input block. If the \fBbs\fP=
+\fIexpr\fP operand is not specified, or a conversion other than \fBsync\fP,
+\fBnoerror\fP, or \fBnotrunc\fP is requested, the
+input shall be processed and collected into full-sized output blocks
+until the end of the input is reached.
+.LP
+The processing order shall be as follows:
+.IP " 1." 4
+An input block is read.
+.LP
+.IP " 2." 4
+If the input block is shorter than the specified input block size
+and the \fBsync\fP conversion is specified, null bytes shall
+be appended to the input data up to the specified size. (If either
+\fBblock\fP or \fBunblock\fP is also specified, <space>s
+shall be appended instead of null bytes.) The remaining conversions
+and output shall include the pad characters as if they had been
+read from the input.
+.LP
+.IP " 3." 4
+If the \fBbs\fP= \fIexpr\fP operand is specified and no conversion
+other than \fBsync\fP or \fBnoerror\fP is requested, the
+resulting data shall be written to the output as a single block, and
+the remaining steps are omitted.
+.LP
+.IP " 4." 4
+If the \fBswab\fP conversion is specified, each pair of input data
+bytes shall be swapped. If there is an odd number of bytes
+in the input block, the last byte in the input record shall not be
+swapped.
+.LP
+.IP " 5." 4
+Any remaining conversions ( \fBblock\fP, \fBunblock\fP, \fBlcase\fP,
+and \fBucase\fP) shall be performed. These conversions
+shall operate on the input data independently of the input blocking;
+an input or output fixed-length record may span block
+boundaries.
+.LP
+.IP " 6." 4
+The data resulting from input or conversion or both shall be aggregated
+into output blocks of the specified size. After the end
+of input is reached, any remaining output shall be written as a block
+without padding if \fBconv\fP= \fBsync\fP is not specified;
+thus, the final output block may be shorter than the output block
+size.
+.LP
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+All of the operands shall be processed before any input is read. The
+following operands shall be supported:
+.TP 7
+\fBif\fP=\fIfile\fP
+Specify the input pathname; the default is standard input.
+.TP 7
+\fBof\fP=\fIfile\fP
+Specify the output pathname; the default is standard output. If the
+\fBseek\fP= \fIexpr\fP conversion is not also specified,
+the output file shall be truncated before the copy begins if an explicit
+\fBof\fP= \fIfile\fP operand is specified, unless
+\fBconv\fP= \fBnotrunc\fP is specified. If \fBseek\fP= \fIexpr\fP
+is specified, but \fBconv\fP= \fBnotrunc\fP is not, the
+effect of the copy shall be to preserve the blocks in the output file
+over which \fIdd\fP seeks, but no other portion of the
+output file shall be preserved. (If the size of the seek plus the
+size of the input file is less than the previous size of the
+output file, the output file shall be shortened by the copy.)
+.TP 7
+\fBibs\fP=\fIexpr\fP
+Specify the input block size, in bytes, by \fIexpr\fP (default is
+512).
+.TP 7
+\fBobs\fP=\fIexpr\fP
+Specify the output block size, in bytes, by \fIexpr\fP (default is
+512).
+.TP 7
+\fBbs\fP=\fIexpr\fP
+Set both input and output block sizes to \fIexpr\fP bytes, superseding
+\fBibs\fP= and \fBobs\fP=. If no conversion other
+than \fBsync\fP, \fBnoerror\fP, and \fBnotrunc\fP is specified, each
+input block shall be copied to the output as a single block
+without aggregating short blocks.
+.TP 7
+\fBcbs\fP=\fIexpr\fP
+Specify the conversion block size for \fBblock\fP and \fBunblock\fP
+in bytes by \fIexpr\fP (default is zero). If \fBcbs\fP=
+is omitted or given a value of zero, using \fBblock\fP or \fBunblock\fP
+produces unspecified results.
+.LP
+The application shall ensure that this operand is also specified if
+the \fBconv\fP= operand is specified with a value of
+\fBascii\fP, \fBebcdic\fP, or \fBibm\fP. For a \fBconv\fP= operand
+with an \fBascii\fP value, the input is handled as
+described for the \fBunblock\fP value, except that characters are
+converted to ASCII before any trailing <space>s are
+deleted. For \fBconv\fP= operands with \fBebcdic\fP or \fBibm\fP values,
+the input is handled as described for the \fBblock\fP
+value except that the characters are converted to EBCDIC or IBM EBCDIC,
+respectively, after any trailing <space>s are added.
+.TP 7
+\fBskip\fP=\fIn\fP
+Skip \fIn\fP input blocks (using the specified input block size) before
+starting to copy. On seekable files, the
+implementation shall read the blocks or seek past them; on non-seekable
+files, the blocks shall be read and the data shall be
+discarded.
+.TP 7
+\fBseek\fP=\fIn\fP
+Skip \fIn\fP blocks (using the specified output block size) from the
+beginning of the output file before copying. On
+non-seekable files, existing blocks shall be read and space from the
+current end-of-file to the specified offset, if any, filled
+with null bytes; on seekable files, the implementation shall seek
+to the specified offset or read the blocks as described for
+non-seekable files.
+.TP 7
+\fBcount\fP=\fIn\fP
+Copy only \fIn\fP input blocks.
+.TP 7
+\fBconv\fP=\fIvalue\fP\fB[\fP,\fIvalue\fP\ ...\fB]\fP
+.sp
+Where \fIvalue\fPs are comma-separated symbols from the following
+list:
+.TP 7
+\fBascii\fP
+.RS
+Convert EBCDIC to ASCII; see ASCII to EBCDIC Conversion .
+.RE
+.TP 7
+\fBebcdic\fP
+.RS
+Convert ASCII to EBCDIC; see ASCII to EBCDIC Conversion .
+.RE
+.TP 7
+\fBibm\fP
+.RS
+Convert ASCII to a different EBCDIC set; see ASCII to IBM EBCDIC Conversion
+\&.
+.RE
+.sp
+.LP
+The \fBascii\fP, \fBebcdic\fP, and \fBibm\fP values are mutually-exclusive.
+.TP 7
+\fBblock\fP
+.RS
+Treat the input as a sequence of <newline>-terminated or end-of-file-terminated
+variable-length records independent of
+the input block boundaries. Each record shall be converted to a record
+with a fixed length specified by the conversion block size.
+Any <newline> shall be removed from the input line; <space>s shall
+be appended to lines that are shorter than their
+conversion block size to fill the block. Lines that are longer than
+the conversion block size shall be truncated to the largest
+number of characters that fit into that size; the number of truncated
+lines shall be reported (see the STDERR section).
+.LP
+The \fBblock\fP and \fBunblock\fP values are mutually-exclusive.
+.RE
+.TP 7
+\fBunblock\fP
+.RS
+Convert fixed-length records to variable length. Read a number of
+bytes equal to the conversion block size (or the number of
+bytes remaining in the input, if less than the conversion block size),
+delete all trailing <space>s, and append a
+<newline>.
+.RE
+.TP 7
+\fBlcase\fP
+.RS
+Map uppercase characters specified by the \fILC_CTYPE\fP keyword \fBtolower\fP
+to the corresponding lowercase character.
+Characters for which no mapping is specified shall not be modified
+by this conversion.
+.LP
+The \fBlcase\fP and \fBucase\fP symbols are mutually-exclusive.
+.RE
+.TP 7
+\fBucase\fP
+.RS
+Map lowercase characters specified by the \fILC_CTYPE\fP keyword \fBtoupper\fP
+to the corresponding uppercase character.
+Characters for which no mapping is specified shall not be modified
+by this conversion.
+.RE
+.TP 7
+\fBswab\fP
+.RS
+Swap every pair of input bytes.
+.RE
+.TP 7
+\fBnoerror\fP
+.RS
+Do not stop processing on an input error. When an input error occurs,
+a diagnostic message shall be written on standard error,
+followed by the current input and output block counts in the same
+format as used at completion (see the STDERR section). If the
+\fBsync\fP conversion is specified, the missing input shall be replaced
+with null bytes and processed normally; otherwise, the
+input block shall be omitted from the output.
+.RE
+.TP 7
+\fBnotrunc\fP
+.RS
+Do not truncate the output file. Preserve blocks in the output file
+not explicitly written by this invocation of the \fIdd\fP
+utility. (See also the preceding \fBof\fP= \fIfile\fP operand.)
+.RE
+.TP 7
+\fBsync\fP
+.RS
+Pad every input block to the size of the \fBibs\fP= buffer, appending
+null bytes. (If either \fBblock\fP or \fBunblock\fP is
+also specified, append <space>s, rather than null bytes.)
+.RE
+.sp
+.sp
+.LP
+The behavior is unspecified if operands other than \fBconv\fP= are
+specified more than once.
+.LP
+For the \fBbs\fP=, \fBcbs\fP=, \fBibs\fP=, and \fBobs\fP= operands,
+the application shall supply an expression specifying a
+size in bytes. The expression, \fIexpr\fP, can be:
+.IP " 1." 4
+A positive decimal number
+.LP
+.IP " 2." 4
+A positive decimal number followed by \fIk\fP, specifying multiplication
+by 1024
+.LP
+.IP " 3." 4
+A positive decimal number followed by \fIb\fP, specifying multiplication
+by 512
+.LP
+.IP " 4." 4
+Two or more positive decimal numbers (with or without \fIk\fP or \fIb\fP)
+separated by \fIx\fP, specifying the product of the
+indicated values
+.LP
+.LP
+All of the operands are processed before any input is read.
+.LP
+The following two tables display the octal number character values
+used for the \fBascii\fP and \fBebcdic\fP conversions (first
+table) and for the \fBibm\fP conversion (second table). In both tables,
+the ASCII values are the row and column headers and the
+EBCDIC values are found at their intersections. For example, ASCII
+0012 (LF) is the second row, third column, yielding 0045 in
+EBCDIC. The inverted tables (for EBCDIC to ASCII conversion) are not
+shown, but are in one-to-one correspondence with these tables.
+The differences between the two tables are highlighted by small boxes
+drawn around five entries.
+.br
+.sp
+.ce 1
+\fBTable: ASCII to EBCDIC Conversion\fP
+.sp
+.sp
+.ce 1
+\fBTable: ASCII to IBM EBCDIC Conversion\fP
+.SH STDIN
+.LP
+If no \fBif\fP= operand is specified, the standard input shall be
+used. See the INPUT FILES section.
+.SH INPUT FILES
+.LP
+The input file can be any file type.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIdd\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files), the
+classification of characters as uppercase or lowercase, and the
+mapping of characters from one case to the other.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard error and
+informative messages written to standard output.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+For SIGINT, the \fIdd\fP utility shall interrupt its current processing,
+write status information to standard error, and exit
+as though terminated by SIGINT. It shall take the standard action
+for all other signals; see the ASYNCHRONOUS EVENTS section in \fIUtility
+Description Defaults\fP .
+.SH STDOUT
+.LP
+If no \fBof\fP= operand is specified, the standard output shall be
+used. The nature of the output depends on the operands
+selected.
+.SH STDERR
+.LP
+On completion, \fIdd\fP shall write the number of input and output
+blocks to standard error. In the POSIX locale the following
+formats shall be used:
+.sp
+.RS
+.nf
+
+\fB"%u+%u records in\\n", <\fP\fInumber of whole input blocks\fP\fB>,
+ <\fP\fInumber of partial input blocks\fP\fB>
+.sp
+
+"%u+%u records out\\n", <\fP\fInumber of whole output blocks\fP\fB>,
+ <\fP\fInumber of partial output blocks\fP\fB>
+\fP
+.fi
+.RE
+.LP
+A partial input block is one for which \fIread\fP() returned less
+than the input block
+size. A partial output block is one that was written with fewer bytes
+than specified by the output block size.
+.LP
+In addition, when there is at least one truncated block, the number
+of truncated blocks shall be written to standard error. In
+the POSIX locale, the format shall be:
+.sp
+.RS
+.nf
+
+\fB"%u truncated %s\\n", <\fP\fInumber of truncated blocks\fP\fB>, "record" (if
+ <\fP\fInumber of truncated blocks\fP\fB> is one) "records" (otherwise)
+\fP
+.fi
+.RE
+.LP
+Diagnostic messages may also be written to standard error.
+.SH OUTPUT FILES
+.LP
+If the \fBof\fP= operand is used, the output shall be the same as
+described in the STDOUT section.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+The input file was copied successfully.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+If an input error is detected and the \fBnoerror\fP conversion has
+not been specified, any partial output block shall be
+written to the output file, a diagnostic message shall be written,
+and the copy operation shall be discontinued. If some other
+error is detected, a diagnostic message shall be written and the copy
+operation shall be discontinued.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The input and output block size can be specified to take advantage
+of raw physical I/O.
+.LP
+There are many different versions of the EBCDIC codesets. The ASCII
+and EBCDIC conversions specified for the \fIdd\fP utility
+perform conversions for the version specified by the tables.
+.SH EXAMPLES
+.LP
+The following command:
+.sp
+.RS
+.nf
+
+\fBdd if=/dev/rmt0h of=/dev/rmt1h
+\fP
+.fi
+.RE
+.LP
+copies from tape drive 0 to tape drive 1, using a common historical
+device naming convention.
+.LP
+The following command:
+.sp
+.RS
+.nf
+
+\fBdd ibs=10 skip=1
+\fP
+.fi
+.RE
+.LP
+strips the first 10 bytes from standard input.
+.LP
+This example reads an EBCDIC tape blocked ten 80-byte EBCDIC card
+images per block into the ASCII file \fBx\fP:
+.sp
+.RS
+.nf
+
+\fBdd if=/dev/tape of=x ibs=800 cbs=80 conv=ascii,lcase
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+The OPTIONS section is listed as "None" because there are no options
+recognized by historical \fIdd\fP utilities. Certainly,
+many of the operands could have been designed to use the Utility Syntax
+Guidelines, which would have resulted in the classic
+hyphenated option letters. In this version of this volume of IEEE\ Std\ 1003.1-2001,
+\fIdd\fP retains its curious JCL-like
+syntax due to the large number of applications that depend on the
+historical implementation.
+.LP
+A suggested implementation technique for \fBconv\fP= \fBnoerror\fP,
+\fBsync\fP is to zero (or <space>-fill, if
+\fBblock\fPing or \fBunblock\fPing) the input buffer before each read
+and to write the contents of the input buffer to the output
+even after an error. In this manner, any data transferred to the input
+buffer before the error was detected is preserved. Another
+point is that a failed read on a regular file or a disk generally
+does not increment the file offset, and \fIdd\fP must then seek
+past the block on which the error occurred; otherwise, the input error
+occurs repetitively. When the input is a magnetic tape,
+however, the tape normally has passed the block containing the error
+when the error is reported, and thus no seek is necessary.
+.LP
+The default \fBibs\fP= and \fBobs\fP= sizes are specified as 512 bytes
+because there are historical (largely portable) scripts
+that assume these values. If they were left unspecified, unusual results
+could occur if an implementation chose an odd block
+size.
+.LP
+Historical implementations of \fIdd\fP used \fIcreat\fP() when processing
+\fBof\fP=
+\fIfile\fP. This makes the \fBseek\fP= operand unusable except on
+special files. The \fBconv\fP= \fBnotrunc\fP feature was
+added because more recent BSD-based implementations use \fIopen\fP()
+(without O_TRUNC)
+instead of \fIcreat\fP(), but they fail to delete output file contents
+after the data
+copied.
+.LP
+The \fIw\fP multiplier (historically meaning \fIword\fP), is used
+in System V to mean 2 and in 4.2 BSD to mean 4. Since
+\fIword\fP is inherently non-portable, its use is not supported by
+this volume of IEEE\ Std\ 1003.1-2001.
+.LP
+Standard EBCDIC does not have the characters \fB'['\fP and \fB']'\fP
+\&. The values used in the table are taken from a
+common print train that does contain them. Other than those characters,
+the print train values are not filled in, but appear to
+provide some of the motivation for the historical choice of translations
+reflected here.
+.LP
+The Standard EBCDIC table provides a 1:1 translation for all 256 bytes.
+.LP
+The IBM EBCDIC table does not provide such a translation. The marked
+cells in the tables differ in such a way that:
+.IP " 1." 4
+EBCDIC 0112 ( \fB'cent'\fP ) and 0152 (broken pipe) do not appear
+in the table.
+.LP
+.IP " 2." 4
+EBCDIC 0137 ( \fB'not'\fP ) translates to/from ASCII 0236 ( \fB'^'\fP
+). In the standard table, EBCDIC 0232 (no graphic)
+is used.
+.LP
+.IP " 3." 4
+EBCDIC 0241 ( \fB'~'\fP ) translates to/from ASCII 0176 ( \fB'~'\fP
+). In the standard table, EBCDIC 0137 (
+\fB'not'\fP ) is used.
+.LP
+.IP " 4." 4
+0255 ( \fB'['\fP ) and 0275 ( \fB']'\fP ) appear twice, once in the
+same place as for the standard table and once in place
+of 0112 ( \fB'cent'\fP ) and 0241 ( \fB'~'\fP ).
+.LP
+.LP
+In net result:
+EBCDIC 0275 ( \fB']'\fP ) displaced EBCDIC 0241 ( \fB'~'\fP ) in cell
+0345.
+.LP
+\ \ \ \ That displaced EBCDIC 0137 ( \fB'not'\fP ) in cell 0176.
+.LP
+\ \ \ \ That displaced EBCDIC 0232 (no graphic) in cell 0136.
+.LP
+\ \ \ \ That replaced EBCDIC 0152 (broken pipe) in cell 0313.
+.LP
+EBCDIC 0255 ( \fB'['\fP ) replaced EBCDIC 0112 ( \fB'cent'\fP ).
+.LP
+This translation, however, reflects historical practice that (ASCII)
+\fB'~'\fP and \fB'not'\fP were often mapped to
+each other, as were \fB'['\fP and \fB'cent'\fP ; and \fB']'\fP and
+(EBCDIC) \fB'~'\fP .
+.LP
+The \fBcbs\fP operand is required if any of the \fBascii\fP, \fBebcdic\fP,
+or \fBibm\fP operands are specified. For the
+\fBascii\fP operand, the input is handled as described for the \fBunblock\fP
+operand except that characters are converted to
+ASCII before the trailing <space>s are deleted. For the \fBebcdic\fP
+and \fBibm\fP operands, the input is handled as
+described for the \fBblock\fP operand except that the characters are
+converted to EBCDIC or IBM EBCDIC after the trailing
+<space>s are added.
+.LP
+The \fBblock\fP and \fBunblock\fP keywords are from historical BSD
+practice.
+.LP
+The consistent use of the word \fBrecord\fP in standard error messages
+matches most historical practice. An earlier version of
+System V used \fBblock\fP, but this has been updated in more recent
+releases.
+.LP
+Early proposals only allowed two numbers separated by \fBx\fP to be
+used in a product when specifying \fBbs\fP=, \fBcbs\fP=,
+\fBibs\fP=, and \fBobs\fP= sizes. This was changed to reflect the
+historical practice of allowing multiple numbers in the product
+as provided by Version 7 and all releases of System V and BSD.
+.LP
+A change to the \fBswab\fP conversion is required to match historical
+practice and is the result of IEEE PASC Interpretations
+1003.2 #03 and #04, submitted for the ISO\ POSIX-2:1993 standard.
+.LP
+A change to the handling of SIGINT is required to match historical
+practice and is the result of IEEE PASC Interpretation 1003.2
+#06 submitted for the ISO\ POSIX-2:1993 standard.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIUtility Description Defaults\fP, \fIsed\fP, \fItr\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/delta.1p b/man-pages-posix-2003/man1p/delta.1p
new file mode 100644
index 0000000..85652ae
--- /dev/null
+++ b/man-pages-posix-2003/man1p/delta.1p
@@ -0,0 +1,277 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "DELTA" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" delta
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+delta \- make a delta (change) to an SCCS file (\fBDEVELOPMENT\fP)
+.SH SYNOPSIS
+.LP
+\fBdelta\fP \fB[\fP\fB-nps\fP\fB][\fP\fB-g\fP \fIlist\fP\fB][\fP\fB-m\fP
+\fImrlist\fP\fB][\fP\fB-r\fP \fISID\fP\fB][\fP\fB-y\fP\fB[\fP\fIcomment\fP\fB]]\fP
+\fIfile\fP\fB... \fP
+.SH DESCRIPTION
+.LP
+The \fIdelta\fP utility shall be used to permanently introduce into
+the named SCCS files changes that were made to the files
+retrieved by \fIget\fP (called the \fIg-files\fP, or generated files).
+.SH OPTIONS
+.LP
+The \fIdelta\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines,
+except that the \fB-y\fP option has an
+optional option-argument. This optional option-argument shall not
+be presented as a separate argument.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-r\ \fP \fISID\fP
+Uniquely identify which delta is to be made to the SCCS file. The
+use of this option shall be necessary only if two or more
+outstanding \fIget\fP commands for editing ( \fIget\fP
+\fB-e\fP) on the same SCCS file were done by the same person (login
+name). The SID value specified with the \fB-r\fP option can
+be either the SID specified on the \fIget\fP command line or the SID
+to be made as reported by
+the \fIget\fP utility; see \fIget\fP .
+.TP 7
+\fB-s\fP
+Suppress the report to standard output of the activity associated
+with each \fIfile\fP. See the STDOUT section.
+.TP 7
+\fB-n\fP
+Specify retention of the edited \fIg-file\fP (normally removed at
+completion of delta processing).
+.TP 7
+\fB-g\ \fP \fIlist\fP
+Specify a \fIlist\fP (see \fIget\fP for the definition of \fIlist\fP)
+of deltas that shall be ignored
+when the file is accessed at the change level (SID) created by this
+delta.
+.TP 7
+\fB-m\ \fP \fImrlist\fP
+Specify a modification request (MR) number that the application shall
+supply as the reason for creating the new delta. This
+shall be used if the SCCS file has the \fBv\fP flag set; see \fIadmin\fP
+\&.
+.LP
+If \fB-m\fP is not used and \fB'-'\fP is not specified as a file argument,
+and the standard input is a terminal, the prompt
+described in the STDOUT section shall be written to standard output
+before the standard input is read; if the standard input is not
+a terminal, no prompt shall be issued.
+.LP
+MRs in a list shall be separated by <blank>s or escaped <newline>s.
+An unescaped <newline> shall terminate the
+MR list. The escape character is <backslash>.
+.LP
+If the \fBv\fP flag has a value, it shall be taken to be the name
+of a program which validates the correctness of the MR
+numbers. If a non-zero exit status is returned from the MR number
+validation program, the \fIdelta\fP utility shall terminate. (It
+is assumed that the MR numbers were not all valid.)
+.TP 7
+\fB-y[\fP\fIcomment\fP\fB]\fP
+Describe the reason for making the delta. The \fIcomment\fP shall
+be an arbitrary group of lines that would meet the
+definition of a text file. Implementations shall support \fIcomment\fPs
+from zero to 512 bytes and may support longer values. A
+null string (specified as either \fB-y\fP, \fB-y\fP \fB""\fP, or
+in response to a prompt for a comment) shall be considered a
+valid \fIcomment\fP.
+.LP
+If \fB-y\fP is not specified and \fB'-'\fP is not specified as a file
+argument, and the standard input is a terminal, the
+prompt described in the STDOUT section shall be written to standard
+output before the standard input is read; if the standard input
+is not a terminal, no prompt shall be issued. An unescaped <newline>
+shall terminate the comment text. The escape character
+is <backslash>.
+.LP
+The \fB-y\fP option shall be required if the \fIfile\fP operand is
+specified as \fB'-'\fP .
+.TP 7
+\fB-p\fP
+Write (to standard output) the SCCS file differences before and after
+the delta is applied in \fIdiff\fP format; see \fIdiff\fP .
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of an existing SCCS file or a directory. If \fIfile\fP
+is a directory, the \fIdelta\fP utility shall behave as
+though each file in the directory were specified as a named file,
+except that non-SCCS files (last component of the pathname does
+not begin with \fBs.\fP) and unreadable files shall be silently ignored.
+.LP
+If exactly one \fIfile\fP operand appears, and it is \fB'-'\fP, the
+standard input shall be read; each line of the standard
+input shall be taken to be the name of an SCCS file to be processed.
+Non-SCCS files and unreadable files shall be silently
+ignored.
+.sp
+.SH STDIN
+.LP
+The standard input shall be a text file used only in the following
+cases:
+.IP " *" 3
+To read an \fImrlist\fP or a \fIcomment\fP (see the \fB-m\fP and \fB-y\fP
+options).
+.LP
+.IP " *" 3
+A \fIfile\fP operand shall be specified as \fB'-'\fP . In this case,
+the \fB-y\fP option must be used to specify the
+comment, and if the SCCS file has the \fBv\fP flag set, the \fB-m\fP
+option must also be used to specify the MR list.
+.LP
+.SH INPUT FILES
+.LP
+Input files shall be text files whose data is to be included in the
+SCCS files. If the first character of any line of an input
+file is <SOH> in the POSIX locale, the results are unspecified. If
+this file contains more than 99999 lines, the number of
+lines recorded in the header for this file shall be 99999 for this
+delta.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIdelta\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard error,
+and informative messages written to standard output.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fITZ\fP
+Determine the timezone in which the time and date are written in the
+SCCS file. If the \fITZ\fP variable is unset or NULL, an
+unspecified system default timezone is used.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+If SIGINT is caught, temporary files shall be cleaned up and \fIdelta\fP
+shall exit with a non-zero exit code. The standard
+action shall be taken for all other signals; see \fIUtility Description
+Defaults\fP .
+.SH STDOUT
+.LP
+The standard output shall be used only for the following messages
+in the POSIX locale:
+.IP " *" 3
+Prompts (see the \fB-m\fP and \fB-y\fP options) in the following formats:
+.sp
+.RS
+.nf
+
+\fB"MRs? "
+.sp
+
+"comments? "
+\fP
+.fi
+.RE
+.LP
+The MR prompt, if written, shall always precede the comments prompt.
+.LP
+.IP " *" 3
+A report of each file's activities (unless the \fB-s\fP option is
+specified) in the following format:
+.sp
+.RS
+.nf
+
+\fB"%s\\n%d inserted\\n%d deleted\\n%d unchanged\\n", <\fP\fINew SID\fP\fB>,
+ <\fP\fInumber of lines inserted\fP\fB>, <\fP\fInumber of lines deleted\fP\fB>,
+ <\fP\fInumber of lines unchanged\fP\fB>
+\fP
+.fi
+.RE
+.LP
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+Any SCCS files updated shall be files of an unspecified format.
+.SH EXTENDED DESCRIPTION
+.SS System Date and Time
+.LP
+When a delta is added to an SCCS file, the system date and time shall
+be recorded for the new delta. If a \fIget\fP is performed using an
+SCCS file with a date recorded apparently in the future, the behavior
+is unspecified.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Problems can arise if the system date and time have been modified
+(for example, put forward and then back again, or
+unsynchronized clocks across a network) and can also arise when different
+values of the \fITZ\fP environment variable are
+used.
+.LP
+Problems of a similar nature can also arise for the operation of the
+\fIget\fP utility,
+which records the date and time in the file body.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIUtility Description Defaults\fP, \fIadmin\fP, \fIdiff\fP, \fIget\fP,
+\fIprs\fP, \fIrmdel\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/df.1p b/man-pages-posix-2003/man1p/df.1p
new file mode 100644
index 0000000..f62589b
--- /dev/null
+++ b/man-pages-posix-2003/man1p/df.1p
@@ -0,0 +1,301 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "DF" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" df
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+df \- report free disk space
+.SH SYNOPSIS
+.LP
+\fBdf\fP \fB[\fP\fB-k\fP\fB][\fP\fB-P|-t\fP\fB][\fP\fIfile\fP\fB...\fP\fB]\fP\fB\fP
+.SH DESCRIPTION
+.LP
+The \fIdf\fP utility shall write the amount of available space and
+file slots for file systems on which the invoking user has appropriate
+read access. File systems shall be specified
+by the \fIfile\fP operands; when none are specified, information shall
+be written for all file systems. The format of the default
+output from \fIdf\fP is unspecified, but all space figures are reported
+in 512-byte units, unless the \fB-k\fP option is
+specified. This output shall contain at least the file system names,
+amount of available space on each of these file systems,
+\ and the number of free file slots, or \fIinodes\fP, available; when
+\fB-t\fP is specified, the output shall contain the
+total allocated space as well.
+.SH OPTIONS
+.LP
+The \fIdf\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-k\fP
+Use 1024-byte units, instead of the default 512-byte units, when writing
+space figures.
+.TP 7
+\fB-P\fP
+Produce output in the format described in the STDOUT section.
+.TP 7
+\fB-t\fP
+Include total allocated-space figures in the output.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of a file within the hierarchy of the desired file system.
+If a file other than a FIFO, a regular file, a directory,
+\ or a special file representing the device containing the file system
+(for example, \fB/dev/dsk/0s1\fP) is specified, the results are unspecified.
+Otherwise, \fIdf\fP shall write
+the amount of free space in the file system containing the specified
+\fIfile\fP operand.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIdf\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard error and
+informative messages written to standard output.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+When both the \fB-k\fP and \fB-P\fP options are specified, the following
+header line shall be written (in the POSIX
+locale):
+.sp
+.RS
+.nf
+
+\fB"Filesystem 1024-blocks Used Available Capacity Mounted on\\n"
+\fP
+.fi
+.RE
+.LP
+When the \fB-P\fP option is specified without the \fB-k\fP option,
+the following header line shall be written (in the POSIX
+locale):
+.sp
+.RS
+.nf
+
+\fB"Filesystem 512-blocks Used Available Capacity Mounted on\\n"
+\fP
+.fi
+.RE
+.LP
+The implementation may adjust the spacing of the header line and the
+individual data lines so that the information is presented
+in orderly columns.
+.LP
+The remaining output with \fB-P\fP shall consist of one line of information
+for each specified file system. These lines shall
+be formatted as follows:
+.sp
+.RS
+.nf
+
+\fB"%s %d %d %d %d%% %s\\n", <\fP\fIfile system name\fP\fB>, <\fP\fItotal space\fP\fB>,
+ <\fP\fIspace used\fP\fB>, <\fP\fIspace free\fP\fB>, <\fP\fIpercentage used\fP\fB>,
+ <\fP\fIfile system root\fP\fB>
+\fP
+.fi
+.RE
+.LP
+In the following list, all quantities expressed in 512-byte units
+(1024-byte when \fB-k\fP is specified) shall be rounded up to
+the next higher unit. The fields are:
+.TP 7
+<\fIfile\ system\ name\fP>
+.sp
+The name of the file system, in an implementation-defined format.
+.TP 7
+<\fItotal\ space\fP>
+The total size of the file system in 512-byte units. The exact meaning
+of this figure is implementation-defined, but should
+include <\fIspace\ used\fP>, <\fIspace\ free\fP>, plus any space reserved
+by the system not normally
+available to a user.
+.TP 7
+<\fIspace\ used\fP>
+The total amount of space allocated to existing files in the file
+system, in 512-byte units.
+.TP 7
+<\fIspace\ free\fP>
+The total amount of space available within the file system for the
+creation of new files by unprivileged users, in 512-byte
+units. When this figure is less than or equal to zero, it shall not
+be possible to create any new files on the file system without
+first deleting others, unless the process has appropriate privileges.
+The figure written may be less than zero.
+.TP 7
+<\fIpercentage\ used\fP>
+.sp
+The percentage of the normally available space that is currently allocated
+to all files on the file system. This shall be
+calculated using the fraction:
+.sp
+.RS
+.nf
+
+\fB<\fP\fIspace used\fP\fB>/( <\fP\fIspace used\fP\fB>+ <\fP\fIspace free\fP\fB>)
+\fP
+.fi
+.RE
+.LP
+expressed as a percentage. This percentage may be greater than 100
+if <\fIspace\ free\fP> is less than zero. The
+percentage value shall be expressed as a positive integer, with any
+fractional result causing it to be rounded to the next highest
+integer.
+.TP 7
+<\fIfile\ system\ root\fP>
+.sp
+The directory below which the file system hierarchy appears.
+.sp
+.LP
+The output format is unspecified when \fB-t\fP is used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+On most systems, the "name of the file system, in an implementation-defined
+format" is the special file on which the file
+system is mounted.
+.LP
+On large file systems, the calculation specified for percentage used
+can create huge rounding errors.
+.SH EXAMPLES
+.IP " 1." 4
+The following example writes portable information about the \fB/usr\fP
+file system:
+.sp
+.RS
+.nf
+
+\fBdf -P /usr
+\fP
+.fi
+.RE
+.LP
+.IP " 2." 4
+Assuming that \fB/usr/src\fP is part of the \fB/usr\fP file system,
+the following produces the same output as the previous
+example:
+.sp
+.RS
+.nf
+
+\fBdf -P /usr/src
+\fP
+.fi
+.RE
+.LP
+.SH RATIONALE
+.LP
+The behavior of \fIdf\fP with the \fB-P\fP option is the default action
+of the 4.2 BSD \fIdf\fP utility. The uppercase
+\fB-P\fP was selected to avoid collision with a known industry extension
+using \fB-p\fP.
+.LP
+Historical \fIdf\fP implementations vary considerably in their default
+output. It was therefore necessary to describe the
+default output in a loose manner to accommodate all known historical
+implementations and to add a portable option ( \fB-P\fP) to
+provide information in a portable format.
+.LP
+The use of 512-byte units is historical practice and maintains compatibility
+with \fIls\fP
+and other utilities in this volume of IEEE\ Std\ 1003.1-2001. This
+does not mandate that the file system itself be based on
+512-byte blocks. The \fB-k\fP option was added as a compromise measure.
+It was agreed by the standard developers that 512 bytes
+was the best default unit because of its complete historical consistency
+on System V (\fIversus\fP the mixed 512/1024-byte usage
+on BSD systems), and that a \fB-k\fP option to switch to 1024-byte
+units was a good compromise. Users who prefer the more logical
+1024-byte quantity can easily alias \fIdf\fP to \fIdf\fP \fB-k\fP
+without breaking many historical scripts relying on the
+512-byte units.
+.LP
+It was suggested that \fIdf\fP and the various related utilities be
+modified to access a \fIBLOCKSIZE\fP environment variable
+to achieve consistency and user acceptance. Since this is not historical
+practice on any system, it is left as a possible area for
+system extensions and will be re-evaluated in a future version if
+it is widely implemented.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfind\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/diff.1p b/man-pages-posix-2003/man1p/diff.1p
new file mode 100644
index 0000000..cd5f26c
--- /dev/null
+++ b/man-pages-posix-2003/man1p/diff.1p
@@ -0,0 +1,651 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "DIFF" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" diff
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+diff \- compare two files
+.SH SYNOPSIS
+.LP
+\fBdiff\fP \fB[\fP\fB-c| -e| -f| -C\fP \fIn\fP\fB][\fP\fB-br\fP\fB]\fP
+\fIfile1 file2\fP
+.SH DESCRIPTION
+.LP
+The \fIdiff\fP utility shall compare the contents of \fIfile1\fP and
+\fIfile2\fP and write to standard output a list of
+changes necessary to convert \fIfile1\fP into \fIfile2\fP. This list
+should be minimal. No output shall be produced if the files
+are identical.
+.SH OPTIONS
+.LP
+The \fIdiff\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-b\fP
+Cause any amount of white space at the end of a line to be treated
+as a single <newline> (that is, the white-space
+characters preceding the <newline> are ignored) and other strings
+of white-space characters, not including <newline>s,
+to compare equal.
+.TP 7
+\fB-c\fP
+Produce output in a form that provides three lines of context.
+.TP 7
+\fB-C\ n\fP
+Produce output in a form that provides \fIn\fP lines of context (where
+\fIn\fP shall be interpreted as a positive decimal
+integer).
+.TP 7
+\fB-e\fP
+Produce output in a form suitable as input for the \fIed\fP utility,
+which can then be used
+to convert \fIfile1\fP into \fIfile2\fP.
+.TP 7
+\fB-f\fP
+Produce output in an alternative form, similar in format to \fB-e\fP,
+but not intended to be suitable as input for the \fIed\fP utility,
+and in the opposite order.
+.TP 7
+\fB-r\fP
+Apply \fIdiff\fP recursively to files and directories of the same
+name when \fIfile1\fP and \fIfile2\fP are both
+directories.
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIfile1\fP,\ \fIfile2\fP
+A pathname of a file to be compared. If either the \fIfile1\fP or
+\fIfile2\fP operand is \fB'-'\fP, the standard input
+shall be used in its place.
+.sp
+.LP
+If both \fIfile1\fP and \fIfile2\fP are directories, \fIdiff\fP shall
+not compare block special files, character special
+files, or FIFO special files to any files and shall not compare regular
+files to directories. Further details are as specified in
+Diff Directory Comparison Format . The behavior of \fIdiff\fP on other
+file types is
+implementation-defined when found in directories.
+.LP
+If only one of \fIfile1\fP and \fIfile2\fP is a directory, \fIdiff\fP
+shall be applied to the non-directory file and the file
+contained in the directory file with a filename that is the same as
+the last component of the non-directory file.
+.SH STDIN
+.LP
+The standard input shall be used only if one of the \fIfile1\fP or
+\fIfile2\fP operands references standard input. See the
+INPUT FILES section.
+.SH INPUT FILES
+.LP
+The input files may be of any type.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIdiff\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard error and
+informative messages written to standard output.
+.TP 7
+\fILC_TIME\fP
+Determine the locale for affecting the format of file timestamps written
+with the \fB-C\fP and \fB-c\fP options.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fITZ\fP
+Determine the timezone used for calculating file timestamps written
+with the \fB-C\fP and \fB-c\fP options. If \fITZ\fP is
+unset or null, an unspecified default timezone shall be used.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.SS Diff Directory Comparison Format
+.LP
+If both \fIfile1\fP and \fIfile2\fP are directories, the following
+output formats shall be used.
+.LP
+In the POSIX locale, each file that is present in only one directory
+shall be reported using the following format:
+.sp
+.RS
+.nf
+
+\fB"Only in %s: %s\\n", <\fP\fIdirectory pathname\fP\fB>, <\fP\fIfilename\fP\fB>
+\fP
+.fi
+.RE
+.LP
+In the POSIX locale, subdirectories that are common to the two directories
+may be reported with the following format:
+.sp
+.RS
+.nf
+
+\fB"Common subdirectories: %s and %s\\n", <\fP\fIdirectory1 pathname\fP\fB>,
+ <\fP\fIdirectory2 pathname\fP\fB>
+\fP
+.fi
+.RE
+.LP
+For each file common to the two directories if the two files are not
+to be compared, the following format shall be used in the
+POSIX locale:
+.sp
+.RS
+.nf
+
+\fB"File %s is a %s while file %s is a %s\\n", <\fP\fIdirectory1 pathname\fP\fB>,
+ <\fP\fIfile type of directory1 pathname\fP\fB>, <\fP\fIdirectory2 pathname\fP\fB>,
+ <\fP\fIfile type of directory2 pathname\fP\fB>
+\fP
+.fi
+.RE
+.LP
+For each file common to the two directories, if the files are compared
+and are identical, no output shall be written. If the two
+files differ, the following format is written:
+.sp
+.RS
+.nf
+
+\fB"diff %s %s %s\\n", <\fP\fIdiff_options\fP\fB>, <\fP\fIfilename1\fP\fB>, <\fP\fIfilename2\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where <\fIdiff_options\fP> are the options as specified on the command
+line.
+.LP
+All directory pathnames listed in this section shall be relative to
+the original command line arguments. All other names of
+files listed in this section shall be filenames (pathname components).
+.SS Diff Binary Output Format
+.LP
+In the POSIX locale, if one or both of the files being compared are
+not text files, an unspecified format shall be used that
+contains the pathnames of two files being compared and the string
+\fB"differ"\fP .
+.LP
+If both files being compared are text files, depending on the options
+specified, one of the following formats shall be used to
+write the differences.
+.SS Diff Default Output Format
+.LP
+The default (without \fB-e\fP, \fB-f\fP, \fB-c\fP, or \fB-C\fP options)
+\fIdiff\fP utility output shall contain lines of
+these forms:
+.sp
+.RS
+.nf
+
+\fB"%da%d\\n", <\fP\fInum1\fP\fB>, <\fP\fInum2\fP\fB>
+.sp
+
+"%da%d,%d\\n", <\fP\fInum1\fP\fB>, <\fP\fInum2\fP\fB>, <\fP\fInum3\fP\fB>
+.sp
+
+"%dd%d\\n", <\fP\fInum1\fP\fB>, <\fP\fInum2\fP\fB>
+.sp
+
+"%d,%dd%d\\n", <\fP\fInum1\fP\fB>, <\fP\fInum2\fP\fB>, <\fP\fInum3\fP\fB>
+.sp
+
+"%dc%d\\n", <\fP\fInum1\fP\fB>, <\fP\fInum2\fP\fB>
+.sp
+
+"%d,%dc%d\\n", <\fP\fInum1\fP\fB>, <\fP\fInum2\fP\fB>, <\fP\fInum3\fP\fB>
+.sp
+
+"%dc%d,%d\\n", <\fP\fInum1\fP\fB>, <\fP\fInum2\fP\fB>, <\fP\fInum3\fP\fB>
+.sp
+
+"%d,%dc%d,%d\\n", <\fP\fInum1\fP\fB>, <\fP\fInum2\fP\fB>, <\fP\fInum3\fP\fB>, <\fP\fInum4\fP\fB>
+\fP
+.fi
+.RE
+.LP
+These lines resemble \fIed\fP subcommands to convert \fIfile1\fP into
+\fIfile2\fP. The
+line numbers before the action letters shall pertain to \fIfile1\fP;
+those after shall pertain to \fIfile2\fP. Thus, by
+exchanging \fIa\fP for \fId\fP and reading the line in reverse order,
+one can also determine how to convert \fIfile2\fP into
+\fIfile1\fP. As in \fIed\fP, identical pairs (where \fInum1\fP= \fInum2\fP)
+are abbreviated
+as a single number.
+.LP
+Following each of these lines, \fIdiff\fP shall write to standard
+output all lines affected in the first file using the
+format:
+.sp
+.RS
+.nf
+
+\fB"< %s", <\fP\fIline\fP\fB>
+\fP
+.fi
+.RE
+.LP
+and all lines affected in the second file using the format:
+.sp
+.RS
+.nf
+
+\fB"> %s", <\fP\fIline\fP\fB>
+\fP
+.fi
+.RE
+.LP
+If there are lines affected in both \fIfile1\fP and \fIfile2\fP (as
+with the \fBc\fP subcommand), the changes are separated
+with a line consisting of three hyphens:
+.sp
+.RS
+.nf
+
+\fB"---\\n"
+\fP
+.fi
+.RE
+.SS Diff -e Output Format
+.LP
+With the \fB-e\fP option, a script shall be produced that shall, when
+provided as input to \fIed\fP, along with an appended \fBw\fP (write)
+command, convert \fIfile1\fP into \fIfile2\fP. Only
+the \fBa\fP (append), \fBc\fP (change), \fBd\fP (delete), \fBi\fP
+(insert), and \fBs\fP (substitute) commands of \fIed\fP shall be used
+in this script. Text lines, except those consisting of the single
+character
+period ( \fB'.'\fP ), shall be output as they appear in the file.
+.SS Diff -f Output Format
+.LP
+With the \fB-f\fP option, an alternative format of script shall be
+produced. It is similar to that produced by \fB-e\fP, with
+the following differences:
+.IP " 1." 4
+It is expressed in reverse sequence; the output of \fB-e\fP orders
+changes from the end of the file to the beginning; the
+\fB-f\fP from beginning to end.
+.LP
+.IP " 2." 4
+The command form <\fIlines\fP> <\fIcommand-letter\fP> used by \fB-e\fP
+is reversed. For example, 10\fIc\fP with
+\fB-e\fP would be \fIc\fP10 with \fB-f\fP.
+.LP
+.IP " 3." 4
+The form used for ranges of line numbers is <space>-separated, rather
+than comma-separated.
+.LP
+.SS Diff -c or -C Output Format
+.LP
+With the \fB-c\fP or \fB-C\fP option, the output format shall consist
+of affected lines along with surrounding lines of
+context. The affected lines shall show which ones need to be deleted
+or changed in \fIfile1\fP, and those added from \fIfile2\fP.
+With the \fB-c\fP option, three lines of context, if available, shall
+be written before and after the affected lines. With the
+\fB-C\fP option, the user can specify how many lines of context are
+written. The exact format follows.
+.LP
+The name and last modification time of each file shall be output in
+the following format:
+.sp
+.RS
+.nf
+
+\fB"*** %s %s\\n",\fP \fIfile1\fP\fB, <\fP\fIfile1 timestamp\fP\fB>
+"--- %s %s\\n",\fP \fIfile2\fP\fB, <\fP\fIfile2 timestamp\fP\fB>
+\fP
+.fi
+.RE
+.LP
+Each <\fIfile\fP> field shall be the pathname of the corresponding
+file being compared. The pathname written for standard
+input is unspecified.
+.LP
+In the POSIX locale, each <\fItimestamp\fP> field shall be equivalent
+to the output from the following command:
+.sp
+.RS
+.nf
+
+\fBdate "+%a %b %e %T %Y"
+\fP
+.fi
+.RE
+.LP
+without the trailing <newline>, executed at the time of last modification
+of the corresponding file (or the current time,
+if the file is standard input).
+.LP
+Then, the following output formats shall be applied for every set
+of changes.
+.LP
+First, a line shall be written in the following format:
+.sp
+.RS
+.nf
+
+\fB"***************\\n"
+\fP
+.fi
+.RE
+.LP
+Next, the range of lines in \fIfile1\fP shall be written in the following
+format if the range contains two or more lines:
+.sp
+.RS
+.nf
+
+\fB"*** %d,%d ****\\n", <\fP\fIbeginning line number\fP\fB>, <\fP\fIending line number\fP\fB>
+\fP
+.fi
+.RE
+.LP
+and the following format otherwise:
+.sp
+.RS
+.nf
+
+\fB"*** %d ****\\n", <\fP\fIending line number\fP\fB>
+\fP
+.fi
+.RE
+.LP
+The ending line number of an empty range shall be the number of the
+preceding line, or 0 if the range is at the start of the
+file.
+.LP
+Next, the affected lines along with lines of context (unaffected lines)
+shall be written. Unaffected lines shall be written in
+the following format:
+.sp
+.RS
+.nf
+
+\fB" %s", <\fP\fIunaffected_line\fP\fB>
+\fP
+.fi
+.RE
+.LP
+Deleted lines shall be written as:
+.sp
+.RS
+.nf
+
+\fB"- %s", <\fP\fIdeleted_line\fP\fB>
+\fP
+.fi
+.RE
+.LP
+Changed lines shall be written as:
+.sp
+.RS
+.nf
+
+\fB"! %s", <\fP\fIchanged_line\fP\fB>
+\fP
+.fi
+.RE
+.LP
+Next, the range of lines in \fIfile2\fP shall be written in the following
+format if the range contains two or more lines:
+.sp
+.RS
+.nf
+
+\fB"--- %d,%d ----\\n", <\fP\fIbeginning line number\fP\fB>, <\fP\fIending line number\fP\fB>
+\fP
+.fi
+.RE
+.LP
+and the following format otherwise:
+.sp
+.RS
+.nf
+
+\fB"--- %d ----\\n", <\fP\fIending line number\fP\fB>
+\fP
+.fi
+.RE
+.LP
+Then, lines of context and changed lines shall be written as described
+in the previous formats. Lines added from \fIfile2\fP
+shall be written in the following format:
+.sp
+.RS
+.nf
+
+\fB"+ %s", <\fP\fIadded_line\fP\fB>
+\fP
+.fi
+.RE
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+No differences were found.
+.TP 7
+\ 1
+Differences were found.
+.TP 7
+>1
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+If lines at the end of a file are changed and other lines are added,
+\fIdiff\fP output may show this as a delete and add, as a
+change, or as a change and add; \fIdiff\fP is not expected to know
+which happened and users should not care about the difference
+in output as long as it clearly shows the differences between the
+files.
+.SH EXAMPLES
+.LP
+If \fBdir1\fP is a directory containing a directory named \fBx\fP,
+\fBdir2\fP is a directory containing a directory named
+\fBx\fP, \fBdir1/x\fP and \fBdir2/x\fP both contain files named \fBdate.out\fP,
+and \fBdir2/x\fP contains a file named
+\fBy\fP, the command:
+.sp
+.RS
+.nf
+
+\fBdiff -r dir1 dir2
+\fP
+.fi
+.RE
+.LP
+could produce output similar to:
+.sp
+.RS
+.nf
+
+\fBCommon subdirectories: dir1/x and dir2/x
+Only in dir2/x: y
+diff -r dir1/x/date.out dir2/x/date.out
+1c1
+< Mon Jul 2 13:12:16 PDT 1990
+---
+> Tue Jun 19 21:41:39 PDT 1990
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+The \fB-h\fP option was omitted because it was insufficiently specified
+and does not add to applications portability.
+.LP
+Historical implementations employ algorithms that do not always produce
+a minimum list of differences; the current language
+about making every effort is the best this volume of IEEE\ Std\ 1003.1-2001
+can do, as there is no metric that could be
+employed to judge the quality of implementations against any and all
+file contents. The statement "This list should be minimal''
+clearly implies that implementations are not expected to provide the
+following output when comparing two 100-line files that differ
+in only one character on a single line:
+.sp
+.RS
+.nf
+
+\fB1,100c1,100
+all 100 lines from file1 preceded with "< "
+---
+all 100 lines from file2 preceded with "> "
+\fP
+.fi
+.RE
+.LP
+The "Only in" messages required when the \fB-r\fP option is specified
+are not used by most historical implementations if the
+\fB-e\fP option is also specified. It is required here because it
+provides useful information that must be provided to update a
+target directory hierarchy to match a source hierarchy. The "Common
+subdirectories" messages are written by System V and 4.3 BSD
+when the \fB-r\fP option is specified. They are allowed here but are
+not required because they are reporting on something that is
+the same, not reporting a difference, and are not needed to update
+a target hierarchy.
+.LP
+The \fB-c\fP option, which writes output in a format using lines of
+context, has been included. The format is useful for a
+variety of reasons, among them being much improved readability and
+the ability to understand difference changes when the target
+file has line numbers that differ from another similar, but slightly
+different, copy. The \fIpatch\fP utility is most valuable when working
+with difference listings using the context format.
+The BSD version of \fB-c\fP takes an optional argument specifying
+the amount of context. Rather than overloading \fB-c\fP and
+breaking the Utility Syntax Guidelines for \fIdiff\fP, the standard
+developers decided to add a separate option for specifying a
+context diff with a specified amount of context ( \fB-C\fP). Also,
+the format for context \fIdiff\fPs was extended slightly in
+4.3 BSD to allow multiple changes that are within context lines from
+each other to be merged together. The output format contains
+an additional four asterisks after the range of affected lines in
+the first filename. This was to provide a flag for old programs
+(like old versions of \fIpatch\fP) that only understand the old context
+format. The version
+of context described here does not require that multiple changes within
+context lines be merged, but it does not prohibit it
+either. The extension is upwards-compatible, so any vendors that wish
+to retain the old version of \fIdiff\fP can do so by adding
+the extra four asterisks (that is, utilities that currently use \fIdiff\fP
+and understand the new merged format will also
+understand the old unmerged format, but not \fIvice versa\fP).
+.LP
+The substitute command was added as an additional format for the \fB-e\fP
+option. This was added to provide implementations
+with a way to fix the classic "dot alone on a line" bug present in
+many versions of \fIdiff\fP. Since many implementations have
+fixed this bug, the standard developers decided not to standardize
+broken behavior, but rather to provide the necessary tool for
+fixing the bug. One way to fix this bug is to output two periods whenever
+a lone period is needed, then terminate the append
+command with a period, and then use the substitute command to convert
+the two periods into one period.
+.LP
+The BSD-derived \fB-r\fP option was added to provide a mechanism for
+using \fIdiff\fP to compare two file system trees. This
+behavior is useful, is standard practice on all BSD-derived systems,
+and is not easily reproducible with the \fIfind\fP utility.
+.LP
+The requirement that \fIdiff\fP not compare files in some circumstances,
+even though they have the same name, is based on the
+actual output of historical implementations. The message specified
+here is already in use when a directory is being compared to a
+non-directory. It is extended here to preclude the problems arising
+from running into FIFOs and other files that would cause
+\fIdiff\fP to hang waiting for input with no indication to the user
+that \fIdiff\fP was hung. In most common usage, \fIdiff\fP
+\fB-r\fP should indicate differences in the file hierarchies, not
+the difference of contents of devices pointed to by the
+hierarchies.
+.LP
+Many early implementations of \fIdiff\fP require seekable files. Since
+the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001 supports named pipes, the standard developers
+decided that such a restriction was unreasonable. Note
+also that the allowed filename \fB-\fP almost always refers to a pipe.
+.LP
+No directory search order is specified for \fIdiff\fP. The historical
+ordering is, in fact, not optimal, in that it prints out
+all of the differences at the current level, including the statements
+about all common subdirectories before recursing into those
+subdirectories.
+.LP
+The message:
+.sp
+.RS
+.nf
+
+\fB"diff %s %s %s\\n", <\fP\fIdiff_options\fP\fB>, <\fP\fIfilename1\fP\fB>, <\fP\fIfilename2\fP\fB>
+\fP
+.fi
+.RE
+.LP
+does not vary by locale because it is the representation of a command,
+not an English sentence.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcmp\fP, \fIcomm\fP, \fIed\fP, \fIfind\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/dirname.1p b/man-pages-posix-2003/man1p/dirname.1p
new file mode 100644
index 0000000..29f4c76
--- /dev/null
+++ b/man-pages-posix-2003/man1p/dirname.1p
@@ -0,0 +1,219 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "DIRNAME" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" dirname
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+dirname \- return the directory portion of a pathname
+.SH SYNOPSIS
+.LP
+\fBdirname\fP \fIstring\fP
+.SH DESCRIPTION
+.LP
+The \fIstring\fP operand shall be treated as a pathname, as defined
+in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 3.266, Pathname. The string
+\fIstring\fP shall be converted to the name of the directory containing
+the filename corresponding to the last pathname component
+in \fIstring\fP, performing actions equivalent to the following steps
+in order:
+.IP " 1." 4
+If \fIstring\fP is \fB//\fP, skip steps 2 to 5.
+.LP
+.IP " 2." 4
+If \fIstring\fP consists entirely of slash characters, \fIstring\fP
+shall be set to a single slash character. In this case,
+skip steps 3 to 8.
+.LP
+.IP " 3." 4
+If there are any trailing slash characters in \fIstring\fP, they shall
+be removed.
+.LP
+.IP " 4." 4
+If there are no slash characters remaining in \fIstring\fP, \fIstring\fP
+shall be set to a single period character. In this
+case, skip steps 5 to 8.
+.LP
+.IP " 5." 4
+If there are any trailing non-slash characters in \fIstring\fP, they
+shall be removed.
+.LP
+.IP " 6." 4
+If the remaining \fIstring\fP is \fB//\fP, it is implementation-defined
+whether steps 7 and 8 are skipped or processed.
+.LP
+.IP " 7." 4
+If there are any trailing slash characters in \fIstring\fP, they shall
+be removed.
+.LP
+.IP " 8." 4
+If the remaining \fIstring\fP is empty, \fIstring\fP shall be set
+to a single slash character.
+.LP
+.LP
+The resulting string shall be written to standard output.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIstring\fP
+A string.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIdirname\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The \fIdirname\fP utility shall write a line to the standard output
+in the following format:
+.sp
+.RS
+.nf
+
+\fB"%s\\n", <\fP\fIresulting string\fP\fB>
+\fP
+.fi
+.RE
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The definition of \fIpathname\fP specifies implementation-defined
+behavior for pathnames starting with two slash characters.
+Therefore, applications shall not arbitrarily add slashes to the beginning
+of a pathname unless they can ensure that there are more
+or less than two or are prepared to deal with the implementation-defined
+consequences.
+.SH EXAMPLES
+.TS C
+center; l l.
+\fBCommand\fP \fBResults\fP
+\fIdirname\fP / /
+\fIdirname\fP // / or //
+\fIdirname\fP /\fIa\fP/\fIb\fP/ /\fIa\fP
+\fIdirname\fP //\fIa\fP//\fIb\fP// //\fIa\fP
+\fIdirname\fP Unspecified
+\fIdirname a\fP . ($? = 0)
+\fIdirname\fP "" . ($? = 0)
+\fIdirname\fP /\fIa\fP /
+\fIdirname\fP /\fIa\fP/\fIb\fP /\fIa\fP
+\fIdirname\fP \fIa\fP/\fIb\fP \fIa\fP
+.TE
+.SH RATIONALE
+.LP
+The \fIdirname\fP utility originated in System III. It has evolved
+through the System V releases to a version that matches the
+requirements specified in this description in System V Release 3.
+4.3 BSD and earlier versions did not include \fIdirname\fP.
+.LP
+The behaviors of \fIbasename\fP and \fIdirname\fP in this volume of
+IEEE\ Std\ 1003.1-2001 have been coordinated so that when \fIstring\fP
+is a valid pathname:
+.sp
+.RS
+.nf
+
+\fB$(basename "\fP\fIstring\fP\fB")
+\fP
+.fi
+.RE
+.LP
+would be a valid filename for the file in the directory:
+.sp
+.RS
+.nf
+
+\fB$(dirname "\fP\fIstring\fP\fB")
+\fP
+.fi
+.RE
+.LP
+This would not work for the versions of these utilities in early proposals
+due to the way processing of trailing slashes was
+specified. Consideration was given to leaving processing unspecified
+if there were trailing slashes, but this cannot be done; the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, Section 3.266,
+Pathname allows trailing slashes. The \fIbasename\fP and \fIdirname\fP
+utilities
+have to specify consistent handling for all valid pathnames.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIbasename\fP(), \fIParameters and Variables\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/dot.1p b/man-pages-posix-2003/man1p/dot.1p
new file mode 100644
index 0000000..3660f95
--- /dev/null
+++ b/man-pages-posix-2003/man1p/dot.1p
@@ -0,0 +1,108 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "DOT" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" dot
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+dot \- execute commands in the current environment
+.SH SYNOPSIS
+.LP
+\fB\&.\fP \fIfile\fP
+.SH DESCRIPTION
+.LP
+The shell shall execute commands from the \fIfile\fP in the current
+environment.
+.LP
+If \fIfile\fP does not contain a slash, the shell shall use the search
+path specified by \fIPATH\fP to find the directory
+containing \fIfile\fP. Unlike normal command search, however, the
+file searched for by the \fIdot\fP utility need not be
+executable. If no readable file is found, a non-interactive shell
+shall abort; an interactive shell shall write a diagnostic
+message to standard error, but this condition shall not be considered
+a syntax error.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+See the DESCRIPTION.
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+See the DESCRIPTION.
+.SH ENVIRONMENT VARIABLES
+.LP
+See the DESCRIPTION.
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+Returns the value of the last command executed, or a zero exit status
+if no command is executed.
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.sp
+.RS
+.nf
+
+\fBcat foobar
+\fP\fBfoo=hello bar=world\fP\fB. foobar
+echo $foo $bar
+\fP\fBhello world\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+Some older implementations searched the current directory for the
+\fIfile\fP, even if the value of \fIPATH\fP disallowed it.
+This behavior was omitted from this volume of IEEE\ Std\ 1003.1-2001
+due to concerns about introducing the susceptibility
+to trojan horses that the user might be trying to avoid by leaving
+\fBdot\fP out of \fIPATH\fP.
+.LP
+The KornShell version of \fIdot\fP takes optional arguments that are
+set to the positional parameters. This is a valid
+extension that allows a \fIdot\fP script to behave identically to
+a function.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fISpecial Built-In Utilities\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/du.1p b/man-pages-posix-2003/man1p/du.1p
new file mode 100644
index 0000000..003c5a6
--- /dev/null
+++ b/man-pages-posix-2003/man1p/du.1p
@@ -0,0 +1,249 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "DU" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" du
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+du \- estimate file space usage
+.SH SYNOPSIS
+.LP
+\fBdu\fP \fB[\fP\fB-a | -s\fP\fB][\fP\fB-kx\fP\fB][\fP\fB-H | -L\fP\fB][\fP\fIfile\fP
+\fB\&...\fP\fB]\fP\fB\fP
+.SH DESCRIPTION
+.LP
+By default, the \fIdu\fP utility shall write to standard output the
+size of the file space allocated to, and the size of the
+file space allocated to each subdirectory of, the file hierarchy rooted
+in each of the specified files. By default, when a symbolic
+link is encountered on the command line or in the file hierarchy,
+\fIdu\fP shall count the size of the symbolic link (rather than
+the file referenced by the link), and shall not follow the link to
+another portion of the file hierarchy. The size of the file
+space allocated to a file of type directory shall be defined as the
+sum total of space allocated to all files in the file hierarchy
+rooted in the directory plus the space allocated to the directory
+itself.
+.LP
+When \fIdu\fP cannot \fIstat\fP() files or \fIstat\fP() or read directories,
+it shall report an error condition and the final exit status is
+affected. Files with multiple links shall be counted and written for
+only one entry. The directory entry that is selected in the
+report is unspecified. By default, file sizes shall be written in
+512-byte units, rounded up to the next 512-byte unit.
+.SH OPTIONS
+.LP
+The \fIdu\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-a\fP
+In addition to the default output, report the size of each file not
+of type directory in the file hierarchy rooted in the
+specified file. Regardless of the presence of the \fB-a\fP option,
+non-directories given as \fIfile\fP operands shall always be
+listed.
+.TP 7
+\fB-H\fP
+If a symbolic link is specified on the command line, \fIdu\fP shall
+count the size of the file or file hierarchy referenced by
+the link.
+.TP 7
+\fB-k\fP
+Write the files sizes in units of 1024 bytes, rather than the default
+512-byte units.
+.TP 7
+\fB-L\fP
+If a symbolic link is specified on the command line or encountered
+during the traversal of a file hierarchy, \fIdu\fP shall
+count the size of the file or file hierarchy referenced by the link.
+.TP 7
+\fB-s\fP
+Instead of the default output, report only the total sum for each
+of the specified files.
+.TP 7
+\fB-x\fP
+When evaluating file sizes, evaluate only those files that have the
+same device as the file specified by the \fIfile\fP
+operand.
+.sp
+.LP
+Specifying more than one of the mutually-exclusive options \fB-H\fP
+and \fB-L\fP shall not be considered an error. The last
+option specified shall determine the behavior of the utility.
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+The pathname of a file whose size is to be written. If no \fIfile\fP
+is specified, the current directory shall be used.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIdu\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The output from \fIdu\fP shall consist of the amount of space allocated
+to a file and the name of the file, in the following
+format:
+.sp
+.RS
+.nf
+
+\fB"%d %s\\n", <\fP\fIsize\fP\fB>, <\fP\fIpathname\fP\fB>
+\fP
+.fi
+.RE
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The use of 512-byte units is historical practice and maintains compatibility
+with \fIls\fP
+and other utilities in this volume of IEEE\ Std\ 1003.1-2001. This
+does not mandate that the file system itself be based on
+512-byte blocks. The \fB-k\fP option was added as a compromise measure.
+It was agreed by the standard developers that 512 bytes
+was the best default unit because of its complete historical consistency
+on System V (\fIversus\fP the mixed 512/1024-byte usage
+on BSD systems), and that a \fB-k\fP option to switch to 1024-byte
+units was a good compromise. Users who prefer the 1024-byte
+quantity can easily alias \fIdu\fP to \fIdu\fP \fB-k\fP without breaking
+the many historical scripts relying on the 512-byte
+units.
+.LP
+The \fB-b\fP option was added to an early proposal to provide a resolution
+to the situation where System V and BSD systems give
+figures for file sizes in \fIblocks\fP, which is an implementation-defined
+concept. (In common usage, the block size is 512 bytes
+for System V and 1024 bytes for BSD systems.) However, \fB-b\fP was
+later deleted, since the default was eventually decided as
+512-byte units.
+.LP
+Historical file systems provided no way to obtain exact figures for
+the space allocation given to files. There are two known
+areas of inaccuracies in historical file systems: cases of \fIindirect
+blocks\fP being used by the file system or \fIsparse\fP
+files yielding incorrectly high values. An indirect block is space
+used by the file system in the storage of the file, but that
+need not be counted in the space allocated to the file. A \fIsparse\fP
+file is one in which an \fIlseek\fP() call has been made to a position
+beyond the end of the file and data has subsequently
+been written at that point. A file system need not allocate all the
+intervening zero-filled blocks to such a file. It is up to the
+implementation to define exactly how accurate its methods are.
+.LP
+The \fB-a\fP and \fB-s\fP options were mutually-exclusive in the original
+version of \fIdu\fP. The POSIX Shell and Utilities
+description is implied by the language in the SVID where \fB-s\fP
+is described as causing "only the grand total" to be reported.
+Some systems may produce output for \fB-sa\fP, but a Strictly Conforming
+POSIX Shell and Utilities Application cannot use that
+combination.
+.LP
+The \fB-a\fP and \fB-s\fP options were adopted from the SVID except
+that the System V behavior of not listing non-directories
+explicitly given as operands, unless the \fB-a\fP option is specified,
+was considered a bug; the BSD-based behavior (report for
+all operands) is mandated. The default behavior of \fIdu\fP in the
+SVID with regard to reporting the failure to read files (it
+produces no messages) was considered counter-intuitive, and thus it
+was specified that the POSIX Shell and Utilities default
+behavior shall be to produce such messages. These messages can be
+turned off with shell redirection to achieve the System V
+behavior.
+.LP
+The \fB-x\fP option is historical practice on recent BSD systems.
+It has been adopted by this volume of
+IEEE\ Std\ 1003.1-2001 because there was no other historical method
+of limiting the \fIdu\fP search to a single file
+hierarchy. This limitation of the search is necessary to make it possible
+to obtain file space usage information about a file
+system on which other file systems are mounted, without having to
+resort to a lengthy \fIfind\fP and \fIawk\fP script.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIls\fP, the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+\fIstat\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/echo.1p b/man-pages-posix-2003/man1p/echo.1p
new file mode 100644
index 0000000..9b61c7c
--- /dev/null
+++ b/man-pages-posix-2003/man1p/echo.1p
@@ -0,0 +1,251 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ECHO" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" echo
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+echo \- write arguments to standard output
+.SH SYNOPSIS
+.LP
+\fBecho\fP \fB[\fP\fIstring\fP \fB...\fP\fB]\fP
+.SH DESCRIPTION
+.LP
+The \fIecho\fP utility writes its arguments to standard output, followed
+by a <newline>. If there are no arguments, only
+the <newline> is written.
+.SH OPTIONS
+.LP
+The \fIecho\fP utility shall not recognize the \fB"--"\fP argument
+in the manner specified by Guideline 10 of the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility
+Syntax
+Guidelines; \fB"--"\fP shall be recognized as a string operand.
+.LP
+Implementations shall not support any options.
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIstring\fP
+A string to be written to standard output. If the first operand is
+\fB-n\fP, or if any of the operands contain a backslash (
+\fB'\\'\fP ) character, the results are implementation-defined.
+.LP
+On XSI-conformant systems, if the first operand is \fB-n\fP, it shall
+be treated as a string, not an option. The following
+character sequences shall be recognized on XSI-conformant systems
+within any of the arguments:
+.TP 7
+\fB\\a\fP
+.RS
+Write an <alert>.
+.RE
+.TP 7
+\fB\\b\fP
+.RS
+Write a <backspace>.
+.RE
+.TP 7
+\fB\\c\fP
+.RS
+Suppress the <newline> that otherwise follows the final argument in
+the output. All characters following the
+\fB'\\c'\fP in the arguments shall be ignored.
+.RE
+.TP 7
+\fB\\f\fP
+.RS
+Write a <form-feed>.
+.RE
+.TP 7
+\fB\\n\fP
+.RS
+Write a <newline>.
+.RE
+.TP 7
+\fB\\r\fP
+.RS
+Write a <carriage-return>.
+.RE
+.TP 7
+\fB\\t\fP
+.RS
+Write a <tab>.
+.RE
+.TP 7
+\fB\\v\fP
+.RS
+Write a <vertical-tab>.
+.RE
+.TP 7
+\fB\\\\\fP
+.RS
+Write a backslash character.
+.RE
+.TP 7
+\fB\\0\fP\fInum\fP
+.RS
+Write an 8-bit value that is the zero, one, two, or three-digit octal
+number \fInum\fP.
+.RE
+.sp
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIecho\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as opposed
+to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The \fIecho\fP utility arguments shall be separated by single <space>s
+and a <newline> shall follow the last
+argument. Output transformations shall occur based on the escape
+sequences in the input. See the OPERANDS section.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+It is not possible to use \fIecho\fP portably across all POSIX systems
+unless both \fB-n\fP (as the first argument) and escape
+sequences are omitted.
+.LP
+The \fIprintf\fP utility can be used portably to emulate any of the
+traditional
+behaviors of the \fIecho\fP utility as follows (assuming that \fIIFS\fP
+has its standard value or is unset):
+.IP " *" 3
+The historic System V \fIecho\fP and the requirements on XSI implementations
+in this volume of IEEE\ Std\ 1003.1-2001
+are equivalent to:
+.sp
+.RS
+.nf
+
+\fBprintf "%b\\n" "$*"
+\fP
+.fi
+.RE
+.LP
+.IP " *" 3
+The BSD \fIecho\fP is equivalent to:
+.sp
+.RS
+.nf
+
+\fBif [ "X$1" = "X-n" ]
+then
+ shift
+ printf "%s" "$*"
+else
+ printf "%s\\n" "$*"
+fi
+\fP
+.fi
+.RE
+.LP
+.LP
+New applications are encouraged to use \fIprintf\fP instead of \fIecho\fP.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIecho\fP utility has not been made obsolescent because of its
+extremely widespread use in historical applications.
+Conforming applications that wish to do prompting without <newline>s
+or that could possibly be expecting to echo a \fB-n\fP,
+should use the \fIprintf\fP utility derived from the Ninth Edition
+system.
+.LP
+As specified, \fIecho\fP writes its arguments in the simplest of ways.
+The two different historical versions of \fIecho\fP
+vary in fatally incompatible ways.
+.LP
+The BSD \fIecho\fP checks the first argument for the string \fB-n\fP
+which causes it to suppress the <newline> that
+would otherwise follow the final argument in the output.
+.LP
+The System V \fIecho\fP does not support any options, but allows escape
+sequences within its operands, as described for XSI
+implementations in the OPERANDS section.
+.LP
+The \fIecho\fP utility does not support Utility Syntax Guideline 10
+because historical applications depend on \fIecho\fP to
+echo \fIall\fP of its arguments, except for the \fB-n\fP option in
+the BSD version.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIprintf\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/ed.1p b/man-pages-posix-2003/man1p/ed.1p
new file mode 100644
index 0000000..f856e66
--- /dev/null
+++ b/man-pages-posix-2003/man1p/ed.1p
@@ -0,0 +1,1467 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ED" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ed
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ed \- edit text
+.SH SYNOPSIS
+.LP
+\fBed\fP \fB[\fP\fB-p\fP \fIstring\fP\fB][\fP\fB-s\fP\fB][\fP\fIfile\fP\fB]\fP
+.SH DESCRIPTION
+.LP
+The \fIed\fP utility is a line-oriented text editor that uses two
+modes: \fIcommand mode\fP and \fIinput mode\fP. In command
+mode the input characters shall be interpreted as commands, and in
+input mode they shall be interpreted as text. See the EXTENDED
+DESCRIPTION section.
+.SH OPTIONS
+.LP
+The \fIed\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-p\ \fP \fIstring\fP
+Use \fIstring\fP as the prompt string when in command mode. By default,
+there shall be no prompt string.
+.TP 7
+\fB-s\fP
+Suppress the writing of byte counts by \fBe\fP, \fBE\fP, \fBr\fP,
+and \fBw\fP commands and of the \fB'!'\fP prompt after
+a !\fIcommand\fP.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+If the \fIfile\fP argument is given, \fIed\fP shall simulate an \fBe\fP
+command on the file named by the pathname,
+\fIfile\fP, before accepting commands from the standard input. If
+the \fIfile\fP operand is \fB'-'\fP, the results are
+unspecified.
+.sp
+.SH STDIN
+.LP
+The standard input shall be a text file consisting of commands, as
+described in the EXTENDED DESCRIPTION section.
+.SH INPUT FILES
+.LP
+The input files shall be text files.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIed\fP:
+.TP 7
+\fIHOME\fP
+Determine the pathname of the user's home directory.
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_COLLATE\fP
+.sp
+Determine the locale for the behavior of ranges, equivalence classes,
+and multi-character collating elements within regular
+expressions.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files) and
+the behavior of character classes within regular
+expressions.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard error and
+informative messages written to standard output.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+The \fIed\fP utility shall take the standard action for all signals
+(see the ASYNCHRONOUS EVENTS section in \fIUtility Description Defaults\fP
+) with the following exceptions:
+.TP 7
+SIGINT
+The \fIed\fP utility shall interrupt its current activity, write the
+string \fB"?\\n"\fP to standard output, and return to
+command mode (see the EXTENDED DESCRIPTION section).
+.TP 7
+SIGHUP
+If the buffer is not empty and has changed since the last write, the
+\fIed\fP utility shall attempt to write a copy of the
+buffer in a file. First, the file named \fBed.hup\fP in the current
+directory shall be used; if that fails, the file named
+\fBed.hup\fP in the directory named by the \fIHOME\fP environment
+variable shall be used. In any case, the \fIed\fP utility
+shall exit without returning to command mode.
+.TP 7
+SIGQUIT
+The \fIed\fP utility shall ignore this event.
+.sp
+.SH STDOUT
+.LP
+Various editing commands and the prompting feature (see \fB-p\fP)
+write to standard output, as described in the EXTENDED
+DESCRIPTION section.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+The output files shall be text files whose formats are dependent on
+the editing commands given.
+.SH EXTENDED DESCRIPTION
+.LP
+The \fIed\fP utility shall operate on a copy of the file it is editing;
+changes made to the copy shall have no effect on the
+file until a \fBw\fP (write) command is given. The copy of the text
+is called the \fIbuffer\fP.
+.LP
+Commands to \fIed\fP have a simple and regular structure: zero, one,
+or two \fIaddresses\fP followed by a single-character
+\fIcommand\fP, possibly followed by parameters to that command. These
+addresses specify one or more lines in the buffer. Every
+command that requires addresses has default addresses, so that the
+addresses very often can be omitted. If the \fB-p\fP option is
+specified, the prompt string shall be written to standard output before
+each command is read.
+.LP
+In general, only one command can appear on a line. Certain commands
+allow text to be input. This text is placed in the
+appropriate place in the buffer. While \fIed\fP is accepting text,
+it is said to be in \fIinput mode\fP. In this mode, no
+commands shall be recognized; all input is merely collected. Input
+mode is terminated by entering a line consisting of two
+characters: a period ( \fB'.'\fP ) followed by a <newline>. This line
+is not considered part of the input text.
+.SS Regular Expressions in ed
+.LP
+The \fIed\fP utility shall support basic regular expressions, as described
+in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 9.3, Basic Regular Expressions. Since
+regular expressions in \fIed\fP are always matched against single
+lines (excluding the terminating <newline>s), never
+against any larger section of text, there is no way for a regular
+expression to match a <newline>.
+.LP
+A null RE shall be equivalent to the last RE encountered.
+.LP
+Regular expressions are used in addresses to specify lines, and in
+some commands (for example, the \fBs\fP substitute command)
+to specify portions of a line to be substituted.
+.SS Addresses in ed
+.LP
+Addressing in \fIed\fP relates to the current line. Generally, the
+current line is the last line affected by a command. The
+current line number is the address of the current line. If the edit
+buffer is not empty, the initial value for the current line
+shall be the last line in the edit buffer; otherwise, zero.
+.LP
+Addresses shall be constructed as follows:
+.IP " 1." 4
+The period character ( \fB'.'\fP ) shall address the current line.
+.LP
+.IP " 2." 4
+The dollar sign character ( \fB'$'\fP ) shall address the last line
+of the edit buffer.
+.LP
+.IP " 3." 4
+The positive decimal number \fIn\fP shall address the \fIn\fPth line
+of the edit buffer.
+.LP
+.IP " 4." 4
+The apostrophe-x character pair ( \fB"'x"\fP ) shall address the line
+marked with the mark name character \fIx\fP, which
+shall be a lowercase letter from the portable character set. It shall
+be an error if the character has not been set to mark a line
+or if the line that was marked is not currently present in the edit
+buffer.
+.LP
+.IP " 5." 4
+A BRE enclosed by slash characters ( \fB'/'\fP ) shall address the
+first line found by searching forwards from the line
+following the current line toward the end of the edit buffer and stopping
+at the first line for which the line excluding the
+terminating <newline> matches the BRE. The BRE consisting of a null
+BRE delimited by a pair of slash characters shall address
+the next line for which the line excluding the terminating <newline>
+matches the last BRE encountered. In addition, the
+second slash can be omitted at the end of a command line. Within the
+BRE, a backslash-slash pair ( \fB"\\/"\fP ) shall represent
+a literal slash instead of the BRE delimiter. If necessary, the search
+shall wrap around to the beginning of the buffer and
+continue up to and including the current line, so that the entire
+buffer is searched.
+.LP
+.IP " 6." 4
+A BRE enclosed by question-mark characters ( \fB'?'\fP ) shall address
+the first line found by searching backwards from the
+line preceding the current line toward the beginning of the edit buffer
+and stopping at the first line for which the line excluding
+the terminating <newline> matches the BRE. The BRE consisting of a
+null BRE delimited by a pair of question-mark characters (
+\fB"??"\fP ) shall address the previous line for which the line excluding
+the terminating <newline> matches the last BRE
+encountered. In addition, the second question-mark can be omitted
+at the end of a command line. Within the BRE, a
+backslash-question-mark pair ( \fB"\\?"\fP ) shall represent a literal
+question mark instead of the BRE delimiter. If necessary,
+the search shall wrap around to the end of the buffer and continue
+up to and including the current line, so that the entire buffer
+is searched.
+.LP
+.IP " 7." 4
+A plus-sign ( \fB'+'\fP ) or hyphen character ( \fB'-'\fP ) followed
+by a decimal number shall address the current line
+plus or minus the number. A plus-sign or hyphen character not followed
+by a decimal number shall address the current line plus or
+minus 1.
+.LP
+.LP
+Addresses can be followed by zero or more address offsets, optionally
+<blank>-separated. Address offsets are constructed
+as follows:
+.IP " *" 3
+A plus-sign or hyphen character followed by a decimal number shall
+add or subtract, respectively, the indicated number of lines
+to or from the address. A plus-sign or hyphen character not followed
+by a decimal number shall add or subtract 1 to or from the
+address.
+.LP
+.IP " *" 3
+A decimal number shall add the indicated number of lines to the address.
+.LP
+.LP
+It shall not be an error for an intermediate address value to be less
+than zero or greater than the last line in the edit
+buffer. It shall be an error for the final address value to be less
+than zero or greater than the last line in the edit buffer. It
+shall be an error if a search for a BRE fails to find a matching line.
+.LP
+Commands accept zero, one, or two addresses. If more than the required
+number of addresses are provided to a command that
+requires zero addresses, it shall be an error. Otherwise, if more
+than the required number of addresses are provided to a command,
+the addresses specified first shall be evaluated and then discarded
+until the maximum number of valid addresses remain, for the
+specified command.
+.LP
+Addresses shall be separated from each other by a comma ( \fB','\fP
+) or semicolon character ( \fB';'\fP ). In the case of
+a semicolon separator, the current line ( \fB'.'\fP ) shall be set
+to the first address, and only then will the second address
+be calculated. This feature can be used to determine the starting
+line for forwards and backwards searches; see rules 5. and 6.
+.LP
+Addresses can be omitted on either side of the comma or semicolon
+separator, in which case the resulting address pairs shall be
+as follows:
+.TS C
+center; l l.
+\fBSpecified\fP \fBResulting\fP
+, 1 , $,
+addr 1 , addr
+addr , addr , addr
+; . ; $
+; addr . ; addr
+addr ; addr ; addr
+.TE
+.LP
+Any <blank>s included between addresses, address separators, or address
+offsets shall be ignored.
+.SS Commands in ed
+.LP
+In the following list of \fIed\fP commands, the default addresses
+are shown in parentheses. The number of addresses shown in
+the default shall be the number expected by the command. The parentheses
+are not part of the address; they show that the given
+addresses are the default.
+.LP
+It is generally invalid for more than one command to appear on a line.
+However, any command (except \fBe\fP, \fBE\fP,
+\fBf\fP, \fBq\fP, \fBQ\fP, \fBr\fP, \fBw\fP, and \fB!\fP) can be suffixed
+by the letter \fBl\fP, \fBn\fP, or \fBp\fP; in
+which case, except for the \fBl\fP, \fBn\fP, and \fBp\fP commands,
+the command shall be executed and then the new current line
+shall be written as described below under the \fBl\fP, \fBn\fP, and
+\fBp\fP commands. When an \fBl\fP, \fBn\fP, or \fBp\fP
+suffix is used with an \fBl\fP, \fBn\fP, or \fBp\fP command, the command
+shall write to standard output as described below, but
+it is unspecified whether the suffix writes the current line again
+in the requested format or whether the suffix has no effect. For
+example, the \fBpl\fP command (base \fBp\fP command with an \fBl\fP
+suffix) shall either write just the current line or write it
+twice-once as specified for \fBp\fP and once as specified for \fBl\fP.
+Also, the \fBg\fP, \fBG\fP, \fBv\fP, and \fBV\fP
+commands shall take a command as a parameter.
+.LP
+Each address component can be preceded by zero or more <blank>s. The
+command letter can be preceded by zero or more
+<blank>s. If a suffix letter ( \fBl\fP, \fBn\fP, or \fBp\fP) is given,
+the application shall ensure that it immediately
+follows the command.
+.LP
+The \fBe\fP, \fBE\fP, \fBf\fP, \fBr\fP, and \fBw\fP commands shall
+take an optional \fIfile\fP parameter, separated from
+the command letter by one or more <blank>s.
+.LP
+If changes have been made in the buffer since the last \fBw\fP command
+that wrote the entire buffer, \fIed\fP shall warn the
+user if an attempt is made to destroy the editor buffer via the \fBe\fP
+or \fBq\fP commands. The \fIed\fP utility shall write
+the string:
+.sp
+.RS
+.nf
+
+\fB"?\\n"
+\fP
+.fi
+.RE
+.LP
+(followed by an explanatory message if \fIhelp mode\fP has been enabled
+via the \fBH\fP command) to standard output and shall
+continue in command mode with the current line number unchanged. If
+the \fBe\fP or \fBq\fP command is repeated with no
+intervening command, it shall take effect.
+.LP
+If a terminal disconnect is detected:
+.IP " *" 3
+If the buffer is not empty and has changed since the last write, the
+\fIed\fP utility shall attempt to write a copy of the
+buffer to a file named \fBed.hup\fP in the current directory. If this
+write fails, \fIed\fP shall attempt to write a copy of the
+buffer to a filename \fBed.hup\fP in the directory named by the \fIHOME\fP
+environment variable. If both these attempts fail,
+\fIed\fP shall exit without saving the buffer.
+.LP
+.IP " *" 3
+The \fIed\fP utility shall not write the file to the currently remembered
+pathname or return to command mode, and shall
+terminate with a non-zero exit status.
+.LP
+.LP
+If an end-of-file is detected on standard input:
+.IP " *" 3
+If the \fIed\fP utility is in input mode, \fIed\fP shall terminate
+input mode and return to command mode. It is unspecified if
+any partially entered lines (that is, input text without a terminating
+<newline>) are discarded from the input text.
+.LP
+.IP " *" 3
+If the \fIed\fP utility is in command mode, it shall act as if a \fBq\fP
+command had been entered.
+.LP
+.LP
+If the closing delimiter of an RE or of a replacement string (for
+example, \fB'/'\fP ) in a \fBg\fP, \fBG\fP, \fBs\fP,
+\fBv\fP, or \fBV\fP command would be the last character before a <newline>,
+that delimiter can be omitted, in which case
+the addressed line shall be written. For example, the following pairs
+of commands are equivalent:
+.sp
+.RS
+.nf
+
+\fBs/s1/s2 s/s1/s2/p
+g/s1 g/s1/p
+?s1 ?s1?
+\fP
+.fi
+.RE
+.LP
+If an invalid command is entered, \fIed\fP shall write the string:
+.sp
+.RS
+.nf
+
+\fB"?\\n"
+\fP
+.fi
+.RE
+.LP
+(followed by an explanatory message if \fIhelp mode\fP has been enabled
+via the \fBH\fP command) to standard output and shall
+continue in command mode with the current line number unchanged.
+.SS Append Command
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB(.)a
+<\fP\fItext\fP\fB>
+\&.
+\fP
+.fi
+.RE
+.sp
+.LP
+The \fBa\fP command shall read the given text and append it after
+the addressed line; the current line number shall become the
+address of the last inserted line or, if there were none, the addressed
+line. Address 0 shall be valid for this command; it shall
+cause the appended text to be placed at the beginning of the buffer.
+.SS Change Command
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB(.,.)c
+<\fP\fItext\fP\fB>
+\&.
+\fP
+.fi
+.RE
+.sp
+.LP
+The \fBc\fP command shall delete the addressed lines, then accept
+input text that replaces these lines; the current line shall
+be set to the address of the last line input; or, if there were none,
+at the line after the last line deleted; if the lines deleted
+were originally at the end of the buffer, the current line number
+shall be set to the address of the new last line; if no lines
+remain in the buffer, the current line number shall be set to zero.
+Address 0 shall be valid for this command; it shall be
+interpreted as if address 1 were specified.
+.SS Delete Command
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB(.,.)d
+\fP
+.fi
+.RE
+.sp
+.LP
+The \fBd\fP command shall delete the addressed lines from the buffer.
+The address of the line after the last line deleted shall
+become the current line number; if the lines deleted were originally
+at the end of the buffer, the current line number shall be set
+to the address of the new last line; if no lines remain in the buffer,
+the current line number shall be set to zero.
+.SS Edit Command
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBe\fP \fB[\fP\fIfile\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+The \fBe\fP command shall delete the entire contents of the buffer
+and then read in the file named by the pathname \fIfile\fP.
+The current line number shall be set to the address of the last line
+of the buffer. If no pathname is given, the currently
+remembered pathname, if any, shall be used (see the \fBf\fP command).
+The number of bytes read shall be written to standard
+output, unless the \fB-s\fP option was specified, in the following
+format:
+.sp
+.RS
+.nf
+
+\fB"%d\\n", <\fP\fInumber of bytes read\fP\fB>
+\fP
+.fi
+.RE
+.LP
+The name \fIfile\fP shall be remembered for possible use as a default
+pathname in subsequent \fBe\fP, \fBE\fP, \fBr\fP, and
+\fBw\fP commands. If \fIfile\fP is replaced by \fB'!'\fP, the rest
+of the line shall be taken to be a shell command line
+whose output is to be read. Such a shell command line shall not be
+remembered as the current \fIfile\fP. All marks shall be
+discarded upon the completion of a successful \fBe\fP command. If
+the buffer has changed since the last time the entire buffer was
+written, the user shall be warned, as described previously.
+.SS Edit Without Checking Command
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBE\fP \fB[\fP\fIfile\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+The \fBE\fP command shall possess all properties and restrictions
+of the \fBe\fP command except that the editor shall not
+check to see whether any changes have been made to the buffer since
+the last \fBw\fP command.
+.SS Filename Command
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBf\fP \fB[\fP\fIfile\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+If \fIfile\fP is given, the \fBf\fP command shall change the currently
+remembered pathname to \fIfile\fP; whether the name is
+changed or not, it shall then write the (possibly new) currently remembered
+pathname to the standard output in the following
+format:
+.sp
+.RS
+.nf
+
+\fB"%s\\n", <\fP\fIpathname\fP\fB>
+\fP
+.fi
+.RE
+.LP
+The current line number shall be unchanged.
+.SS Global Command
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB(1,$)g/\fP\fIRE\fP\fB/\fP\fIcommand list\fP
+.fi
+.RE
+.sp
+.LP
+In the \fBg\fP command, the first step shall be to mark every line
+for which the line excluding the terminating <newline>
+matches the given RE. Then, going sequentially from the beginning
+of the file to the end of the file, the given \fIcommand list\fP
+shall be executed for each marked line, with the current line number
+set to the address of that line. Any line modified by the
+\fIcommand list\fP shall be unmarked. When the \fBg\fP command completes,
+the current line number shall have the value assigned
+by the last command in the \fIcommand list\fP. If there were no matching
+lines, the current line number shall not be changed. A
+single command or the first of a list of commands shall appear on
+the same line as the global command. All lines of a multi-line
+list except the last line shall be ended with a backslash preceding
+the terminating <newline>; the \fBa\fP, \fBi\fP, and
+\fBc\fP commands and associated input are permitted. The \fB'.'\fP
+terminating input mode can be omitted if it would be the
+last line of the \fIcommand list\fP. An empty \fIcommand list\fP shall
+be equivalent to the \fBp\fP command. The use of the
+\fBg\fP, \fBG\fP, \fBv\fP, \fBV\fP, and \fB!\fP commands in the \fIcommand
+list\fP produces undefined results. Any character
+other than <space> or <newline> can be used instead of a slash to
+delimit the RE. Within the RE, the RE delimiter
+itself can be used as a literal character if it is preceded by a backslash.
+.SS Interactive Global Command
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB(1,$)G/\fP\fIRE\fP\fB/
+\fP
+.fi
+.RE
+.sp
+.LP
+In the \fBG\fP command, the first step shall be to mark every line
+for which the line excluding the terminating <newline>
+matches the given RE. Then, for every such line, that line shall be
+written, the current line number shall be set to the address of
+that line, and any one command (other than one of the \fBa\fP, \fBc\fP,
+\fBi\fP, \fBg\fP, \fBG\fP, \fBv\fP, and \fBV\fP
+commands) shall be read and executed. A <newline> shall act as a null
+command (causing no action to be taken on the current
+line); an \fB'&'\fP shall cause the re-execution of the most recent
+non-null command executed within the current invocation
+of \fBG\fP. Note that the commands input as part of the execution
+of the \fBG\fP command can address and affect any lines in the
+buffer. Any line modified by the command shall be unmarked. The final
+value of the current line number shall be the value set by
+the last command successfully executed. (Note that the last command
+successfully executed shall be the \fBG\fP command itself if a
+command fails or the null command is specified.) If there were no
+matching lines, the current line number shall not be changed. The
+\fBG\fP command can be terminated by a SIGINT signal. Any character
+other than <space> or <newline> can be used
+instead of a slash to delimit the RE and the replacement. Within the
+RE, the RE delimiter itself can be used as a literal character
+if it is preceded by a backslash.
+.SS Help Command
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBh
+\fP
+.fi
+.RE
+.sp
+.LP
+The \fBh\fP command shall write a short message to standard output
+that explains the reason for the most recent \fB'?'\fP
+notification. The current line number shall be unchanged.
+.SS Help-Mode Command
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBH
+\fP
+.fi
+.RE
+.sp
+.LP
+The \fBH\fP command shall cause \fIed\fP to enter a mode in which
+help messages (see the \fBh\fP command) shall be written to
+standard output for all subsequent \fB'?'\fP notifications. The \fBH\fP
+command alternately shall turn this mode on and off; it
+is initially off. If the help-mode is being turned on, the \fBH\fP
+command also explains the previous \fB'?'\fP notification,
+if there was one. The current line number shall be unchanged.
+.SS Insert Command
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB(.)i
+<\fP\fItext\fP\fB>
+\&.
+\fP
+.fi
+.RE
+.sp
+.LP
+The \fBi\fP command shall insert the given text before the addressed
+line; the current line is set to the last inserted line
+or, if there was none, to the addressed line. This command differs
+from the \fBa\fP command only in the placement of the input
+text. Address 0 shall be valid for this command; it shall be interpreted
+as if address 1 were specified.
+.SS Join Command
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB(.,.+1)j
+\fP
+.fi
+.RE
+.sp
+.LP
+The \fBj\fP command shall join contiguous lines by removing the appropriate
+<newline>s. If exactly one address is given,
+this command shall do nothing. If lines are joined, the current line
+number shall be set to the address of the joined line;
+otherwise, the current line number shall be unchanged.
+.SS Mark Command
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB(.)k\fP\fIx\fP
+.fi
+.RE
+.sp
+.LP
+The \fBk\fP command shall mark the addressed line with name \fIx\fP,
+which the application shall ensure is a lowercase letter
+from the portable character set. The address \fB"'x"\fP shall then
+refer to this line; the current line number shall be
+unchanged.
+.SS List Command
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB(.,.)l
+\fP
+.fi
+.RE
+.sp
+.LP
+The \fBl\fP command shall write to standard output the addressed lines
+in a visually unambiguous form. The characters listed in
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, Table 5-1,
+Escape Sequences and Associated Actions ( \fB'\\\\'\fP,
+\fB'\\a'\fP, \fB'\\b'\fP, \fB'\\f'\fP, \fB'\\r'\fP, \fB'\\t'\fP,
+\fB'\\v'\fP ) shall be written as the
+corresponding escape sequence; the \fB'\\n'\fP in that table is not
+applicable. Non-printable characters not in the table shall
+be written as one three-digit octal number (with a preceding backslash
+character) for each byte in the character (most significant
+byte first). If the size of a byte on the system is greater than nine
+bits, the format used for non-printable characters is
+implementation-defined.
+.LP
+Long lines shall be folded, with the point of folding indicated by
+<newline> preceded by a backslash; the length at which
+folding occurs is unspecified, but should be appropriate for the output
+device. The end of each line shall be marked with a
+\fB'$'\fP, and \fB'$'\fP characters within the text shall be written
+with a preceding backslash. An \fBl\fP command can be
+appended to any other command other than \fBe\fP, \fBE\fP, \fBf\fP,
+\fBq\fP, \fBQ\fP, \fBr\fP, \fBw\fP, or \fB!\fP. The
+current line number shall be set to the address of the last line written.
+.SS Move Command
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB(.,.)m\fP\fIaddress\fP
+.fi
+.RE
+.sp
+.LP
+The \fBm\fP command shall reposition the addressed lines after the
+line addressed by \fIaddress\fP. Address 0 shall be valid
+for \fIaddress\fP and cause the addressed lines to be moved to the
+beginning of the buffer. It shall be an error if address
+\fIaddress\fP falls within the range of moved lines. The current line
+number shall be set to the address of the last line
+moved.
+.SS Number Command
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB(.,.)n
+\fP
+.fi
+.RE
+.sp
+.LP
+The \fBn\fP command shall write to standard output the addressed lines,
+preceding each line by its line number and a
+<tab>; the current line number shall be set to the address of the
+last line written. The \fBn\fP command can be appended to
+any command other than \fBe\fP, \fBE\fP, \fBf\fP, \fBq\fP, \fBQ\fP,
+\fBr\fP, \fBw\fP, or \fB!\fP.
+.SS Print Command
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB(.,.)p
+\fP
+.fi
+.RE
+.sp
+.LP
+The \fBp\fP command shall write to standard output the addressed lines;
+the current line number shall be set to the address of
+the last line written. The \fBp\fP command can be appended to any
+command other than \fBe\fP, \fBE\fP, \fBf\fP, \fBq\fP,
+\fBQ\fP, \fBr\fP, \fBw\fP, or \fB!\fP.
+.SS Prompt Command
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBP
+\fP
+.fi
+.RE
+.sp
+.LP
+The \fBP\fP command shall cause \fIed\fP to prompt with an asterisk
+( \fB'*'\fP ) (or \fIstring\fP, if \fB-p\fP is
+specified) for all subsequent commands. The \fBP\fP command alternatively
+shall turn this mode on and off; it shall be initially
+on if the \fB-p\fP option is specified; otherwise, off. The current
+line number shall be unchanged.
+.SS Quit Command
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBq
+\fP
+.fi
+.RE
+.sp
+.LP
+The \fBq\fP command shall cause \fIed\fP to exit. If the buffer has
+changed since the last time the entire buffer was written,
+the user shall be warned, as described previously.
+.SS Quit Without Checking Command
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBQ
+\fP
+.fi
+.RE
+.sp
+.LP
+The \fBQ\fP command shall cause \fIed\fP to exit without checking
+whether changes have been made in the buffer since the last
+\fBw\fP command.
+.SS Read Command
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB($)r\fP \fB[\fP\fIfile\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+The \fBr\fP command shall read in the file named by the pathname \fIfile\fP
+and append it after the addressed line. If no
+\fIfile\fP argument is given, the currently remembered pathname, if
+any, shall be used (see the \fBe\fP and \fBf\fP commands).
+The currently remembered pathname shall not be changed unless there
+is no remembered pathname. Address 0 shall be valid for
+\fBr\fP and shall cause the file to be read at the beginning of the
+buffer. If the read is successful, and \fB-s\fP was not
+specified, the number of bytes read shall be written to standard output
+in the following format:
+.sp
+.RS
+.nf
+
+\fB"%d\\n", <\fP\fInumber of bytes read\fP\fB>
+\fP
+.fi
+.RE
+.LP
+The current line number shall be set to the address of the last line
+read in. If \fIfile\fP is replaced by \fB'!'\fP, the
+rest of the line shall be taken to be a shell command line whose output
+is to be read. Such a shell command line shall not be
+remembered as the current pathname.
+.SS Substitute Command
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB(.,.)s/\fP\fIRE\fP\fB/\fP\fIreplacement\fP\fB/\fP\fIflags\fP
+.fi
+.RE
+.sp
+.LP
+The \fBs\fP command shall search each addressed line for an occurrence
+of the specified RE and replace either the first or all
+(non-overlapped) matched strings with the \fIreplacement\fP; see the
+following description of the \fBg\fP suffix. It is an error
+if the substitution fails on every addressed line. Any character other
+than <space> or <newline> can be used instead of
+a slash to delimit the RE and the replacement. Within the RE, the
+RE delimiter itself can be used as a literal character if it is
+preceded by a backslash. The current line shall be set to the address
+of the last line on which a substitution occurred.
+.LP
+An ampersand ( \fB'&'\fP ) appearing in the \fIreplacement\fP shall
+be replaced by the string matching the RE on the
+current line. The special meaning of \fB'&'\fP in this context can
+be suppressed by preceding it by backslash. As a more
+general feature, the characters \fB'\\n'\fP, where \fIn\fP is a digit,
+shall be replaced by the text matched by the
+corresponding back-reference expression. When the character \fB'%'\fP
+is the only character in the \fIreplacement\fP, the
+\fIreplacement\fP used in the most recent substitute command shall
+be used as the \fIreplacement\fP in the current substitute
+command; if there was no previous substitute command, the use of \fB'%'\fP
+in this manner shall be an error. The \fB'%'\fP
+shall lose its special meaning when it is in a replacement string
+of more than one character or is preceded by a backslash. For
+each backslash ( \fB'\\'\fP ) encountered in scanning \fIreplacement\fP
+from beginning to end, the following character shall
+lose its special meaning (if any). It is unspecified what special
+meaning is given to any character other than \fB'&'\fP,
+\fB'\\'\fP, \fB'%'\fP, or digits.
+.LP
+A line can be split by substituting a <newline> into it. The application
+shall ensure it escapes the <newline> in
+the \fIreplacement\fP by preceding it by backslash. Such substitution
+cannot be done as part of a \fBg\fP or \fBv\fP \fIcommand
+list\fP. The current line number shall be set to the address of the
+last line on which a substitution is performed. If no
+substitution is performed, the current line number shall be unchanged.
+If a line is split, a substitution shall be considered to
+have been performed on each of the new lines for the purpose of determining
+the new current line number. A substitution shall be
+considered to have been performed even if the replacement string is
+identical to the string that it replaces.
+.LP
+The application shall ensure that the value of \fIflags\fP is zero
+or more of:
+.TP 7
+\fIcount\fP
+Substitute for the \fIcount\fPth occurrence only of the RE found on
+each addressed line.
+.TP 7
+\fBg\fP
+Globally substitute for all non-overlapping instances of the RE rather
+than just the first one. If both \fBg\fP and
+\fIcount\fP are specified, the results are unspecified.
+.TP 7
+\fBl\fP
+Write to standard output the final line in which a substitution was
+made. The line shall be written in the format specified for
+the \fBl\fP command.
+.TP 7
+\fBn\fP
+Write to standard output the final line in which a substitution was
+made. The line shall be written in the format specified for
+the \fBn\fP command.
+.TP 7
+\fBp\fP
+Write to standard output the final line in which a substitution was
+made. The line shall be written in the format specified for
+the \fBp\fP command.
+.sp
+.SS Copy Command
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB(.,.)t\fP\fIaddress\fP
+.fi
+.RE
+.sp
+.LP
+The \fBt\fP command shall be equivalent to the \fBm\fP command, except
+that a copy of the addressed lines shall be placed
+after address \fIaddress\fP (which can be 0); the current line number
+shall be set to the address of the last line added.
+.SS Undo Command
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBu
+\fP
+.fi
+.RE
+.sp
+.LP
+The \fBu\fP command shall nullify the effect of the most recent command
+that modified anything in the buffer, namely the most
+recent \fBa\fP, \fBc\fP, \fBd\fP, \fBg\fP, \fBi\fP, \fBj\fP, \fBm\fP,
+\fBr\fP, \fBs\fP, \fBt\fP, \fBu\fP, \fBv\fP,
+\fBG\fP, or \fBV\fP command. All changes made to the buffer by a \fBg\fP,
+\fBG\fP, \fBv\fP, or \fBV\fP global command shall
+be undone as a single change; if no changes were made by the global
+command (such as with \fBg\fP/RE/ \fBp\fP), the \fBu\fP
+command shall have no effect. The current line number shall be set
+to the value it had immediately before the command being undone
+started.
+.SS Global Non-Matched Command
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB(1,$)v/\fP\fIRE\fP\fB/\fP\fIcommand list\fP
+.fi
+.RE
+.sp
+.LP
+This command shall be equivalent to the global command \fBg\fP except
+that the lines that are marked during the first step
+shall be those for which the line excluding the terminating <newline>
+does not match the RE.
+.SS Interactive Global Not-Matched Command
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB(1,$)V/\fP\fIRE\fP\fB/
+\fP
+.fi
+.RE
+.sp
+.LP
+This command shall be equivalent to the interactive global command
+\fBG\fP except that the lines that are marked during the
+first step shall be those for which the line excluding the terminating
+<newline> does not match the RE.
+.SS Write Command
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB(1,$)w\fP \fB[\fP\fIfile\fP\fB]
+\fP
+.fi
+.RE
+.sp
+.LP
+The \fBw\fP command shall write the addressed lines into the file
+named by the pathname \fIfile\fP. The command shall create
+the file, if it does not exist, or shall replace the contents of the
+existing file. The currently remembered pathname shall not be
+changed unless there is no remembered pathname. If no pathname is
+given, the currently remembered pathname, if any, shall be used
+(see the \fBe\fP and \fBf\fP commands); the current line number shall
+be unchanged. If the command is successful, the number of
+bytes written shall be written to standard output, unless the \fB-s\fP
+option was specified, in the following format:
+.sp
+.RS
+.nf
+
+\fB"%d\\n", <\fP\fInumber of bytes written\fP\fB>
+\fP
+.fi
+.RE
+.LP
+If \fIfile\fP begins with \fB'!'\fP, the rest of the line shall be
+taken to be a shell command line whose standard input
+shall be the addressed lines. Such a shell command line shall not
+be remembered as the current pathname. This usage of the write
+command with \fB'!'\fP shall not be considered as a "last \fBw\fP
+command that wrote the entire buffer", as described
+previously; thus, this alone shall not prevent the warning to the
+user if an attempt is made to destroy the editor buffer via the
+\fBe\fP or \fBq\fP commands.
+.SS Line Number Command
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB($)=
+\fP
+.fi
+.RE
+.sp
+.LP
+The line number of the addressed line shall be written to standard
+output in the following format:
+.sp
+.RS
+.nf
+
+\fB"%d\\n", <\fP\fIline number\fP\fB>
+\fP
+.fi
+.RE
+.LP
+The current line number shall be unchanged by this command.
+.SS Shell Escape Command
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB!\fP\fIcommand\fP
+.fi
+.RE
+.sp
+.LP
+The remainder of the line after the \fB'!'\fP shall be sent to the
+command interpreter to be interpreted as a shell command
+line. Within the text of that shell command line, the unescaped character
+\fB'%'\fP shall be replaced with the remembered
+pathname; if a \fB'!'\fP appears as the first character of the command,
+it shall be replaced with the text of the previous shell
+command executed via \fB'!'\fP . Thus, \fB"!!"\fP shall repeat the
+previous !\fIcommand\fP. If any replacements of
+\fB'%'\fP or \fB'!'\fP are performed, the modified line shall be written
+to the standard output before \fIcommand\fP is
+executed. The \fB!\fP command shall write:
+.sp
+.RS
+.nf
+
+\fB"!\\n"
+\fP
+.fi
+.RE
+.LP
+to standard output upon completion, unless the \fB-s\fP option is
+specified. The current line number shall be unchanged.
+.SS Null Command
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB(.+1)
+\fP
+.fi
+.RE
+.sp
+.LP
+An address alone on a line shall cause the addressed line to be written.
+A <newline> alone shall be equivalent to
+\fB"+1p"\fP . The current line number shall be set to the address
+of the written line.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion without any file or command errors.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+When an error in the input script is encountered, or when an error
+is detected that is a consequence of the data (not) present
+in the file or due to an external condition such as a read or write
+error:
+.IP " *" 3
+If the standard input is a terminal device file, all input shall be
+flushed, and a new command read.
+.LP
+.IP " *" 3
+If the standard input is a regular file, \fIed\fP shall terminate
+with a non-zero exit status.
+.LP
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Because of the extremely terse nature of the default error messages,
+the prudent script writer begins the \fIed\fP input
+commands with an \fBH\fP command, so that if any errors do occur at
+least some clue as to the cause is made available.
+.LP
+In previous versions, an obsolescent \fB-\fP option was described.
+This is no longer specified. Applications should use the
+\fB-s\fP option. Using \fB-\fP as a \fIfile\fP operand now produces
+unspecified results. This allows implementations to continue
+to support the former required behavior.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The initial description of this utility was adapted from the SVID.
+It contains some features not found in Version 7 or
+BSD-derived systems. Some of the differences between the POSIX and
+BSD \fIed\fP utilities include, but need not be limited to:
+.IP " *" 3
+The BSD \fB-\fP option does not suppress the \fB'!'\fP prompt after
+a \fB!\fP command.
+.LP
+.IP " *" 3
+BSD does not support the special meanings of the \fB'%'\fP and \fB'!'\fP
+characters within a \fB!\fP command.
+.LP
+.IP " *" 3
+BSD does not support the \fIaddresses\fP \fB';'\fP and \fB','\fP .
+.LP
+.IP " *" 3
+BSD allows the command/suffix pairs \fBpp\fP, \fBll\fP, and so on,
+which are unspecified in this volume of
+IEEE\ Std\ 1003.1-2001.
+.LP
+.IP " *" 3
+BSD does not support the \fB'!'\fP character part of the \fBe\fP,
+\fBr\fP, or \fBw\fP commands.
+.LP
+.IP " *" 3
+A failed \fBg\fP command in BSD sets the line number to the last line
+searched if there are no matches.
+.LP
+.IP " *" 3
+BSD does not default the \fIcommand list\fP to the \fBp\fP command.
+.LP
+.IP " *" 3
+BSD does not support the \fBG\fP, \fBh\fP, \fBH\fP, \fBn\fP, or \fBV\fP
+commands.
+.LP
+.IP " *" 3
+On BSD, if there is no inserted text, the insert command changes the
+current line to the referenced line -1; that is, the line
+before the specified line.
+.LP
+.IP " *" 3
+On BSD, the \fIjoin\fP command with only a single address changes
+the current line to that
+address.
+.LP
+.IP " *" 3
+BSD does not support the \fBP\fP command; moreover, in BSD it is synonymous
+with the \fBp\fP command.
+.LP
+.IP " *" 3
+BSD does not support the \fIundo\fP of the commands \fBj\fP, \fBm\fP,
+\fBr\fP, \fBs\fP, or \fBt\fP.
+.LP
+.IP " *" 3
+The Version 7 \fIed\fP command \fBW\fP, and the BSD \fIed\fP commands
+\fBW\fP, \fBwq\fP, and \fBz\fP are not present in
+this volume of IEEE\ Std\ 1003.1-2001.
+.LP
+.LP
+The \fB-s\fP option was added to allow the functionality of the now
+withdrawn \fB-\fP option in a manner compatible with the
+Utility Syntax Guidelines.
+.LP
+In early proposals there was a limit, {ED_FILE_MAX}, that described
+the historical limitations of some \fIed\fP utilities in
+their handling of large files; some of these have had problems with
+files larger than 100000 bytes. It was this limitation that
+prompted much of the desire to include a \fIsplit\fP command in this
+volume of
+IEEE\ Std\ 1003.1-2001. Since this limit was removed, this volume
+of IEEE\ Std\ 1003.1-2001 requires that
+implementations document the file size limits imposed by \fIed\fP
+in the conformance document. The limit {ED_LINE_MAX} was also
+removed; therefore, the global limit {LINE_MAX} is used for input
+and output lines.
+.LP
+The manner in which the \fBl\fP command writes non-printable characters
+was changed to avoid the historical
+backspace-overstrike method. On video display terminals, the overstrike
+is ambiguous because most terminals simply replace
+overstruck characters, making the \fBl\fP format not useful for its
+intended purpose of unambiguously understanding the content of
+the line. The historical backslash escapes were also ambiguous. (The
+string \fB"a\\0011"\fP could represent a line containing
+those six characters or a line containing the three characters \fB'a'\fP,
+a byte with a binary value of 1, and a 1.) In the
+format required here, a backslash appearing in the line is written
+as \fB"\\\\"\fP so that the output is truly unambiguous. The
+method of marking the ends of lines was adopted from the \fIex\fP
+editor and is required for
+any line ending in <space>s; the \fB'$'\fP is placed on all lines
+so that a real \fB'$'\fP at the end of a line cannot
+be misinterpreted.
+.LP
+Systems with bytes too large to fit into three octal digits must devise
+other means of displaying non-printable characters.
+Consideration was given to requiring that the number of octal digits
+be large enough to hold a byte, but this seemed to be too
+confusing for applications on the vast majority of systems where three
+digits are adequate. It would be theoretically possible for
+the application to use the \fIgetconf\fP utility to find out the CHAR_BIT
+value and deal
+with such an algorithm; however, there is really no portable way that
+an application can use the octal values of the bytes across
+various coded character sets, so the additional specification was
+not worthwhile.
+.LP
+The description of how a NUL is written was removed. The NUL character
+cannot be in text files, and this volume of
+IEEE\ Std\ 1003.1-2001 should not dictate behavior in the case of
+undefined, erroneous input.
+.LP
+Unlike some of the other editing utilities, the filenames accepted
+by the \fBE\fP, \fBe\fP, \fBR\fP, and \fBr\fP commands
+are not patterns.
+.LP
+Early proposals stated that the \fB-p\fP option worked only when standard
+input was associated with a terminal device. This has
+been changed to conform to historical implementations, thereby allowing
+applications to interpose themselves between a user and the
+\fIed\fP utility.
+.LP
+The form of the substitute command that uses the \fBn\fP suffix was
+limited in some historical documentation (where this was
+described incorrectly as "backreferencing"). This limit has been omitted
+because there is no reason why an editor processing
+lines of {LINE_MAX} length should have this restriction. The command
+\fBs/x/X/2047\fP should be able to substitute the 2047th
+occurrence of \fB'x'\fP on a line.
+.LP
+The use of printing commands with printing suffixes (such as \fBpn\fP,
+\fBlp\fP, and so on) was made unspecified because
+BSD-based systems allow this, whereas System V does not.
+.LP
+Some BSD-based systems exit immediately upon receipt of end-of-file
+if all of the lines in the file have been deleted. Since
+this volume of IEEE\ Std\ 1003.1-2001 refers to the \fBq\fP command
+in this instance, such behavior is not allowed.
+.LP
+Some historical implementations returned exit status zero even if
+command errors had occurred; this is not allowed by this
+volume of IEEE\ Std\ 1003.1-2001.
+.LP
+Some historical implementations contained a bug that allowed a single
+period to be entered in input mode as <backslash>
+<period> <newline>. This is not allowed by \fIed\fP because there
+is no description of escaping any of the characters
+in input mode; backslashes are entered into the buffer exactly as
+typed. The typical method of entering a single period has been to
+precede it with another character and then use the substitute command
+to delete that character.
+.LP
+It is difficult under some modes of some versions of historical operating
+system terminal drivers to distinguish between an
+end-of-file condition and terminal disconnect. IEEE\ Std\ 1003.1-2001
+does not require implementations to distinguish
+between the two situations, which permits historical implementations
+of the \fIed\fP utility on historical platforms to conform.
+Implementations are encouraged to distinguish between the two, if
+possible, and take appropriate action on terminal disconnect.
+.LP
+Historically, \fIed\fP accepted a zero address for the \fBa\fP and
+\fBr\fP commands in order to insert text at the start of
+the edit buffer. When the buffer was empty the command \fB.=\fP returned
+zero. IEEE\ Std\ 1003.1-2001 requires conformance
+to historical practice.
+.LP
+For consistency with the \fBa\fP and \fBr\fP commands and better user
+functionality, the \fBi\fP and \fBc\fP commands must
+also accept an address of 0, in which case 0\fIi\fP is treated as
+1\fIi\fP and likewise for the \fBc\fP command.
+.LP
+All of the following are valid addresses:
+.TP 7
+\fB+++\fP
+Three lines after the current line.
+.TP 7
+\fB/\fP\fIpattern\fP\fB/-\fP
+One line before the next occurrence of pattern.
+.TP 7
+\fB-2\fP
+Two lines before the current line.
+.TP 7
+\fB3\ ----\ 2\fP
+Line one (note the intermediate negative address).
+.TP 7
+\fB1\ 2\ 3\fP
+Line six.
+.sp
+.LP
+Any number of addresses can be provided to commands taking addresses;
+for example, \fB"1,2,3,4,5p"\fP prints lines 4 and 5,
+because two is the greatest valid number of addresses accepted by
+the \fBprint\fP command. This, in combination with the semicolon
+delimiter, permits users to create commands based on ordered patterns
+in the file. For example, the command \fB"3;/foo/;+2p"\fP
+will display the first line after line 3 that contains the pattern
+\fIfoo\fP, plus the next two lines. Note that the address
+\fB"3;"\fP must still be evaluated before being discarded, because
+the search origin for the \fB"/foo/"\fP command depends on
+this.
+.LP
+Historically, \fIed\fP disallowed address chains, as discussed above,
+consisting solely of comma or semicolon separators; for
+example, \fB",,,"\fP or \fB";;;"\fP were considered an error. For
+consistency of address specification, this restriction is
+removed. The following table lists some of the address forms now possible:
+.TS C
+center; l2 l2 l2 l2 l.
+\fBAddress\fP \fBAddr1\fP \fBAddr2\fP \fBStatus\fP \fBComment\fP
+7, 7 7 Historical \
+7,5, 5 5 Historical \
+7,5,9 5 9 Historical \
+7,9 7 9 Historical \
+7,+ 7 8 Historical \
+, 1 $ Historical \
+,7 1 7 Extension \
+,, $ $ Extension \
+,; $ $ Extension \
+7; 7 7 Historical \
+7;5; 5 5 Historical \
+7;5;9 5 9 Historical \
+7;5,9 5 9 Historical \
+7;$;4 $ 4 Historical Valid, but erroneous.
+7;9 7 9 Historical \
+7;+ 7 8 Historical \
+; . $ Historical \
+;7 . 7 Extension \
+;; $ $ Extension \
+;, $ $ Extension \
+.TE
+.LP
+Historically, values could be added to addresses by including them
+after one or more <blank>s; for example,
+\fB"3\ -\ 5p"\fP wrote the seventh line of the file, and \fB"/foo/\ 5"\fP
+was the same as \fB"5\ /foo/"\fP
+\&. However, only absolute values could be added; for example, \fB"5\ /foo/"\fP
+was an error. IEEE\ Std\ 1003.1-2001
+requires conformance to historical practice.
+.LP
+Historically, \fIed\fP accepted the \fB'^'\fP character as an address,
+in which case it was identical to the hyphen
+character. IEEE\ Std\ 1003.1-2001 does not require or prohibit this
+behavior.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIUtility Description Defaults\fP, \fIex\fP, \fIsed\fP, \fIsh\fP,
+\fIvi\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/env.1p b/man-pages-posix-2003/man1p/env.1p
new file mode 100644
index 0000000..b7d0466
--- /dev/null
+++ b/man-pages-posix-2003/man1p/env.1p
@@ -0,0 +1,238 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ENV" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" env
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+env \- set the environment for command invocation
+.SH SYNOPSIS
+.LP
+\fBenv\fP \fB[\fP\fB-i\fP\fB][\fP\fIname\fP\fB=\fP\fIvalue\fP\fB]\fP\fB...\fP
+\fB[\fP\fIutility\fP
+\fB[\fP\fIargument\fP\fB...\fP\fB]]\fP
+.SH DESCRIPTION
+.LP
+The \fIenv\fP utility shall obtain the current environment, modify
+it according to its arguments, then invoke the utility named
+by the \fIutility\fP operand with the modified environment.
+.LP
+Optional arguments shall be passed to \fIutility\fP.
+.LP
+If no \fIutility\fP operand is specified, the resulting environment
+shall be written to the standard output, with one
+\fIname\fP= \fIvalue\fP pair per line.
+.SH OPTIONS
+.LP
+The \fIenv\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-i\fP
+Invoke \fIutility\fP with exactly the environment specified by the
+arguments; the inherited environment shall be ignored
+completely.
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIname\fP=\fIvalue\fP
+Arguments of the form \fIname\fP= \fIvalue\fP shall modify the execution
+environment, and shall be placed into the inherited
+environment before the \fIutility\fP is invoked.
+.TP 7
+\fIutility\fP
+The name of the utility to be invoked. If the \fIutility\fP operand
+names any of the special built-in utilities in \fISpecial Built-In
+Utilities\fP, the results are undefined.
+.TP 7
+\fIargument\fP
+A string to pass as an argument for the invoked utility.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIenv\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fIPATH\fP
+Determine the location of the \fIutility\fP, as described in the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 8, Environment
+Variables. If \fIPATH\fP is specified as a \fIname\fP= \fIvalue\fP
+operand to \fIenv\fP, the \fIvalue\fP given shall be used in the search
+for \fIutility\fP.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+If no \fIutility\fP operand is specified, each \fIname\fP= \fIvalue\fP
+pair in the resulting environment shall be written in
+the form:
+.sp
+.RS
+.nf
+
+\fB"%s=%s\\n", <\fP\fIname\fP\fB>, <\fP\fIvalue\fP\fB>
+\fP
+.fi
+.RE
+.LP
+If the \fIutility\fP operand is specified, the \fIenv\fP utility shall
+not write to standard output.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+If \fIutility\fP is invoked, the exit status of \fIenv\fP shall be
+the exit status of \fIutility\fP; otherwise, the
+\fIenv\fP utility shall exit with one of the following values:
+.TP 7
+\ \ \ \ 0
+The \fIenv\fP utility completed successfully.
+.TP 7
+1-125
+An error occurred in the \fIenv\fP utility.
+.TP 7
+\ \ 126
+The utility specified by \fIutility\fP was found but could not be
+invoked.
+.TP 7
+\ \ 127
+The utility specified by \fIutility\fP could not be found.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The \fIcommand\fP, \fIenv\fP, \fInice\fP, \fInohup\fP, \fItime\fP,
+and \fIxargs\fP utilities have been specified to use exit code 127
+if an error occurs so that
+applications can distinguish "failure to find a utility" from "invoked
+utility exited with an error indication". The value 127
+was chosen because it is not commonly used for other meanings; most
+utilities use small values for "normal error conditions" and
+the values above 128 can be confused with termination due to receipt
+of a signal. The value 126 was chosen in a similar manner to
+indicate that the utility could be found, but not invoked. Some scripts
+produce meaningful error messages differentiating the 126
+and 127 cases. The distinction between exit codes 126 and 127 is based
+on KornShell practice that uses 127 when all attempts to
+\fIexec\fP the utility fail with [ENOENT], and uses 126 when any attempt
+to \fIexec\fP the utility fails for any other
+reason.
+.LP
+Historical implementations of the \fIenv\fP utility use the \fIexecvp\fP()
+or \fIexeclp\fP() functions defined in the System Interfaces volume
+of IEEE\ Std\ 1003.1-2001
+to invoke the specified utility; this provides better performance
+and keeps users from having to escape characters with special
+meaning to the shell. Therefore, shell functions, special built-ins,
+and built-ins that are only provided by the shell are not
+found.
+.SH EXAMPLES
+.LP
+The following command:
+.sp
+.RS
+.nf
+
+\fBenv -i PATH=/mybin mygrep xyz myfile
+\fP
+.fi
+.RE
+.LP
+invokes the command \fImygrep\fP with a new \fIPATH\fP value as the
+only entry in its environment. In this case, \fIPATH\fP
+is used to locate \fImygrep\fP, which then must reside in \fB/mybin\fP.
+.SH RATIONALE
+.LP
+As with all other utilities that invoke other utilities, this volume
+of IEEE\ Std\ 1003.1-2001 only specifies what
+\fIenv\fP does with standard input, standard output, standard error,
+input files, and output files. If a utility is executed, it
+is not constrained by the specification of input and output by \fIenv\fP.
+.LP
+The \fB-i\fP option was added to allow the functionality of the withdrawn
+\fB-\fP option in a manner compatible with the
+Utility Syntax Guidelines.
+.LP
+Some have suggested that \fIenv\fP is redundant since the same effect
+is achieved by:
+.sp
+.RS
+.nf
+
+\fBname=value ... utility\fP \fB[\fP \fBargument ...\fP \fB]\fP
+.fi
+.RE
+.LP
+The example is equivalent to \fIenv\fP when an environment variable
+is being added to the environment of the command, but not
+when the environment is being set to the given value. The \fIenv\fP
+utility also writes out the current environment if invoked
+without arguments. There is sufficient functionality beyond what the
+example provides to justify inclusion of \fIenv\fP.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIParameters and Variables\fP, \fISpecial
+Built-In Utilities\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/eval.1p b/man-pages-posix-2003/man1p/eval.1p
new file mode 100644
index 0000000..b282bd2
--- /dev/null
+++ b/man-pages-posix-2003/man1p/eval.1p
@@ -0,0 +1,96 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "EVAL" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" eval
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+eval \- construct command by concatenating arguments
+.SH SYNOPSIS
+.LP
+\fBeval\fP \fB[\fP\fIargument\fP \fB...\fP\fB]\fP
+.SH DESCRIPTION
+.LP
+The \fIeval\fP utility shall construct a command by concatenating
+\fIargument\fPs together, separating each with a
+<space>. The constructed command shall be read and executed by the
+shell.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+See the DESCRIPTION.
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+None.
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+If there are no \fIargument\fPs, or only null arguments, \fIeval\fP
+shall return a zero exit status; otherwise, it shall
+return the exit status of the command defined by the string of concatenated
+\fIargument\fPs separated by <space>s.
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.sp
+.RS
+.nf
+
+\fBfoo=10 x=foo
+y='$'$x
+echo $y
+\fP\fB$foo\fP
+\fBeval y='$'$x
+echo $y
+\fP\fB10\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fISpecial Built-In Utilities\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/ex.1p b/man-pages-posix-2003/man1p/ex.1p
new file mode 100644
index 0000000..474894a
--- /dev/null
+++ b/man-pages-posix-2003/man1p/ex.1p
@@ -0,0 +1,6061 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "EX" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ex
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ex \- text editor
+.SH SYNOPSIS
+.LP
+\fBex\fP \fB[\fP\fB-rR\fP\fB][\fP\fB-s | -v\fP\fB][\fP\fB-c\fP
+\fIcommand\fP\fB][\fP\fB-t\fP \fItagstring\fP\fB][\fP\fB-w\fP \fIsize\fP\fB][\fP\fIfile\fP
+\fB\&...\fP\fB]\fP\fB\fP
+.SH DESCRIPTION
+.LP
+The \fIex\fP utility is a line-oriented text editor. There are two
+other modes of the editor-open and visual-in which
+screen-oriented editing is available. This is described more fully
+by the \fIex\fP \fBopen\fP and \fBvisual\fP commands and in
+\fIvi\fP .
+.LP
+This section uses the term \fIedit buffer\fP to describe the current
+working text. No specific implementation is implied by
+this term. All editing changes are performed on the edit buffer, and
+no changes to it shall affect any file until an editor command
+writes the file.
+.LP
+Certain terminals do not have all the capabilities necessary to support
+the complete \fIex\fP definition, such as the
+full-screen editing commands ( \fIvisual mode\fP or \fIopen mode\fP).
+When these commands cannot be supported on such terminals,
+this condition shall not produce an error message such as "not an
+editor command" or report a syntax error. The implementation
+may either accept the commands and produce results on the screen that
+are the result of an unsuccessful attempt to meet the
+requirements of this volume of IEEE\ Std\ 1003.1-2001 or report an
+error describing the terminal-related deficiency.
+.SH OPTIONS
+.LP
+The \fIex\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-c\ \fP \fIcommand\fP
+Specify an initial command to be executed in the first edit buffer
+loaded from an existing file (see the EXTENDED DESCRIPTION
+section). Implementations may support more than a single \fB-c\fP
+option. In such implementations, the specified commands shall be
+executed in the order specified on the command line.
+.TP 7
+\fB-r\fP
+Recover the named files (see the EXTENDED DESCRIPTION section). Recovery
+information for a file shall be saved during an editor
+or system crash (for example, when the editor is terminated by a signal
+which the editor can catch), or after the use of an
+\fIex\fP \fBpreserve\fP command.
+.LP
+A \fIcrash\fP in this context is an unexpected failure of the system
+or utility that requires restarting the failed system or
+utility. A system crash implies that any utilities running at the
+time also crash. In the case of an editor or system crash, the
+number of changes to the edit buffer (since the most recent \fBpreserve\fP
+command) that will be recovered is unspecified.
+.LP
+If no \fIfile\fP operands are given and the \fB-t\fP option is not
+specified, all other options, the \fIEXINIT\fP variable,
+and any \fB.exrc\fP files shall be ignored; a list of all recoverable
+files available to the invoking user shall be written, and
+the editor shall exit normally without further action.
+.TP 7
+\fB-R\fP
+Set \fBreadonly\fP edit option.
+.TP 7
+\fB-s\fP
+Prepare \fIex\fP for batch use by taking the following actions:
+.RS
+.IP " *" 3
+Suppress writing prompts and informational (but not diagnostic) messages.
+.LP
+.IP " *" 3
+Ignore the value of \fITERM\fP and any implementation default terminal
+type and assume the terminal is a type incapable of
+supporting open or visual modes; see the \fBvisual\fP command and
+the description of \fIvi\fP .
+.LP
+.IP " *" 3
+Suppress the use of the \fIEXINIT\fP environment variable and the
+reading of any \fB.exrc\fP file; see the EXTENDED
+DESCRIPTION section.
+.LP
+.IP " *" 3
+Suppress autoindentation, ignoring the value of the \fBautoindent\fP
+edit option.
+.LP
+.RE
+.TP 7
+\fB-t\ \fP \fItagstring\fP
+Edit the file containing the specified \fItagstring\fP; see \fIctags\fP
+\&. The tags feature
+represented by \fB-t\fP \fItagstring\fP and the \fBtag\fP command
+is optional. It shall be provided on any system that also
+provides a conforming implementation of \fIctags\fP; otherwise, the
+use of \fB-t\fP
+produces undefined results. On any system, it shall be an error to
+specify more than a single \fB-t\fP option.
+.TP 7
+\fB-v\fP
+Begin in visual mode (see \fIvi\fP ).
+.TP 7
+\fB-w\ \fP \fIsize\fP
+Set the value of the \fIwindow\fP editor option to \fIsize\fP.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of a file to be edited.
+.sp
+.SH STDIN
+.LP
+The standard input consists of a series of commands and input text,
+as described in the EXTENDED DESCRIPTION section. The
+implementation may limit each line of standard input to a length of
+{LINE_MAX}.
+.LP
+If the standard input is not a terminal device, it shall be as if
+the \fB-s\fP option had been specified.
+.LP
+If a read from the standard input returns an error, or if the editor
+detects an end-of-file condition from the standard input,
+it shall be equivalent to a SIGHUP asynchronous event.
+.SH INPUT FILES
+.LP
+Input files shall be text files or files that would be text files
+except for an incomplete last line that is not longer than
+{LINE_MAX}-1 bytes in length and contains no NUL characters. By default,
+any incomplete last line shall be treated as if it had a
+trailing <newline>. The editing of other forms of files may optionally
+be allowed by \fIex\fP implementations.
+.LP
+The \fB.exrc\fP files and source files shall be text files consisting
+of \fIex\fP commands; see the EXTENDED DESCRIPTION
+section.
+.LP
+By default, the editor shall read lines from the files to be edited
+without interpreting any of those lines as any form of
+editor command.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIex\fP:
+.TP 7
+\fICOLUMNS\fP
+Override the system-selected horizontal screen size. See the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 8, Environment
+Variables for valid values and results when it is unset or null.
+.TP 7
+\fIEXINIT\fP
+Determine a list of \fIex\fP commands that are executed on editor
+start-up. See the EXTENDED DESCRIPTION section for more
+details of the initialization phase.
+.TP 7
+\fIHOME\fP
+Determine a pathname of a directory that shall be searched for an
+editor start-up file named \fB.exrc\fP; see the EXTENDED
+DESCRIPTION section.
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_COLLATE\fP
+.sp
+Determine the locale for the behavior of ranges, equivalence classes,
+and multi-character collating elements within regular
+expressions.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files), the
+behavior of character classes within regular expressions, the
+classification of characters as uppercase or lowercase letters, the
+case conversion of letters, and the detection of word
+boundaries.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fILINES\fP
+Override the system-selected vertical screen size, used as the number
+of lines in a screenful and the vertical screen size in
+visual mode. See the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 8,
+Environment Variables for valid values and results when it is unset
+or null.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fIPATH\fP
+Determine the search path for the shell command specified in the \fIex\fP
+editor commands \fB!\fP, \fBshell\fP, \fBread\fP,
+and \fBwrite\fP, and the open and visual mode command \fB!\fP; see
+the description of command search and execution in \fICommand Search
+and Execution\fP .
+.TP 7
+\fISHELL\fP
+Determine the preferred command line interpreter for use as the default
+value of the \fBshell\fP edit option.
+.TP 7
+\fITERM\fP
+Determine the name of the terminal type. If this variable is unset
+or null, an unspecified default terminal type shall be
+used.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+The following term is used in this and following sections to specify
+command and asynchronous event actions:
+.TP 7
+\fIcomplete\ write\fP
+.sp
+A complete write is a write of the entire contents of the edit buffer
+to a file of a type other than a terminal device, or the
+saving of the edit buffer caused by the user executing the \fIex\fP
+\fBpreserve\fP command. Writing the contents of the edit
+buffer to a temporary file that will be removed when the editor exits
+shall not be considered a complete write.
+.sp
+.LP
+The following actions shall be taken upon receipt of signals:
+.TP 7
+SIGINT
+If the standard input is not a terminal device, \fIex\fP shall not
+write the file or return to command or text input mode, and
+shall exit with a non-zero exit status.
+.LP
+Otherwise, if executing an open or visual text input mode command,
+\fIex\fP in receipt of SIGINT shall behave identically to
+its receipt of the <ESC> character.
+.LP
+Otherwise:
+.RS
+.IP " 1." 4
+If executing an \fIex\fP text input mode command, all input lines
+that have been completely entered shall be resolved into the
+edit buffer, and any partially entered line shall be discarded.
+.LP
+.IP " 2." 4
+If there is a currently executing command, it shall be aborted and
+a message displayed. Unless otherwise specified by the
+\fIex\fP or \fIvi\fP command descriptions, it is unspecified whether
+any lines modified by the
+executing command appear modified, or as they were before being modified
+by the executing command, in the buffer.
+.LP
+If the currently executing command was a motion command, its associated
+command shall be discarded.
+.LP
+.IP " 3." 4
+If in open or visual command mode, the terminal shall be alerted.
+.LP
+.IP " 4." 4
+The editor shall then return to command mode.
+.LP
+.RE
+.TP 7
+SIGCONT
+The screen shall be refreshed if in open or visual mode.
+.TP 7
+SIGHUP
+If the edit buffer has been modified since the last complete write,
+\fIex\fP shall attempt to save the edit buffer so that it
+can be recovered later using the \fB-r\fP option or the \fIex\fP \fBrecover\fP
+command. The editor shall not write the file or
+return to command or text input mode, and shall terminate with a non-zero
+exit status.
+.TP 7
+SIGTERM
+Refer to SIGHUP.
+.sp
+.LP
+The action taken for all other signals is unspecified.
+.SH STDOUT
+.LP
+The standard output shall be used only for writing prompts to the
+user, for informational messages, and for writing lines from
+the file.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+The output from \fIex\fP shall be text files.
+.SH EXTENDED DESCRIPTION
+.LP
+Only the \fIex\fP mode of the editor is described in this section.
+See \fIvi\fP for additional editing
+capabilities available in \fIex\fP.
+.LP
+When an error occurs, \fIex\fP shall write a message. If the terminal
+supports a standout mode (such as inverse video), the
+message shall be written in standout mode. If the terminal does not
+support a standout mode, and the edit option \fBerrorbells\fP
+is set, an alert action shall precede the error message.
+.LP
+By default, \fIex\fP shall start in command mode, which shall be indicated
+by a \fB:\fP prompt; see the \fBprompt\fP command.
+Text input mode can be entered by the \fBappend\fP, \fBinsert\fP,
+or \fBchange\fP commands; it can be exited (and command mode
+re-entered) by typing a period ( \fB'.'\fP ) alone at the beginning
+of a line.
+.SS Initialization in ex and vi
+.LP
+The following symbols are used in this and following sections to specify
+locations in the edit buffer:
+.TP 7
+\fIalternate\ and\ current\ pathnames\fP
+.sp
+Two pathnames, named \fIcurrent\fP and \fIalternate\fP, are maintained
+by the editor. Any \fIex\fP commands that take filenames
+as arguments shall set them as follows:
+.RS
+.IP " 1." 4
+If a \fIfile\fP argument is specified to the \fIex\fP \fBedit\fP,
+\fBex\fP, or \fBrecover\fP commands, or if an \fIex\fP
+\fBtag\fP command replaces the contents of the edit buffer.
+.RS
+.IP " a." 4
+If the command replaces the contents of the edit buffer, the current
+pathname shall be set to the \fIfile\fP argument or the
+file indicated by the tag, and the alternate pathname shall be set
+to the previous value of the current pathname.
+.LP
+.IP " b." 4
+Otherwise, the alternate pathname shall be set to the \fIfile\fP argument.
+.LP
+.RE
+.LP
+.IP " 2." 4
+If a \fIfile\fP argument is specified to the \fIex\fP \fBnext\fP command:
+.RS
+.IP " a." 4
+If the command replaces the contents of the edit buffer, the current
+pathname shall be set to the first \fIfile\fP argument,
+and the alternate pathname shall be set to the previous value of the
+current pathname.
+.LP
+.RE
+.LP
+.IP " 3." 4
+If a \fIfile\fP argument is specified to the \fIex\fP \fBfile\fP command,
+the current pathname shall be set to the
+\fIfile\fP argument, and the alternate pathname shall be set to the
+previous value of the current pathname.
+.LP
+.IP " 4." 4
+If a \fIfile\fP argument is specified to the \fIex\fP \fBread\fP and
+\fBwrite\fP commands (that is, when reading or writing
+a file, and not to the program named by the \fBshell\fP edit option),
+or a \fIfile\fP argument is specified to the \fIex\fP
+\fBxit\fP command:
+.RS
+.IP " a." 4
+If the current pathname has no value, the current pathname shall be
+set to the \fIfile\fP argument.
+.LP
+.IP " b." 4
+Otherwise, the alternate pathname shall be set to the \fIfile\fP argument.
+.LP
+.RE
+.LP
+.RE
+.LP
+If the alternate pathname is set to the previous value of the current
+pathname when the current pathname had no previous value,
+then the alternate pathname shall have no value as a result.
+.TP 7
+\fIcurrent\ line\fP
+.sp
+The line of the edit buffer referenced by the cursor. Each command
+description specifies the current line after the command has
+been executed, as the \fIcurrent line value\fP. When the edit buffer
+contains no lines, the current line shall be zero; see Addressing
+in ex .
+.TP 7
+\fIcurrent\ column\fP
+.sp
+The current display line column occupied by the cursor. (The columns
+shall be numbered beginning at 1.) Each command description
+specifies the current column after the command has been executed,
+as the \fIcurrent column\fP value. This column is an
+\fIideal\fP column that is remembered over the lifetime of the editor.
+The actual display line column upon which the cursor rests
+may be different from the current column; see the cursor positioning
+discussion in \fICommand
+Descriptions in vi\fP .
+.TP 7
+\fIset\ to\ non-<blank>\fP
+.sp
+A description for a current column value, meaning that the current
+column shall be set to the last display line column on which is
+displayed any part of the first non- <blank> of the line. If the line
+has no non- <blank> non- <newline>s, the
+current column shall be set to the last display line column on which
+is displayed any part of the last non- <newline> in the
+line. If the line is empty, the current column shall be set to column
+position 1.
+.sp
+.LP
+The length of lines in the edit buffer may be limited to {LINE_MAX}
+bytes. In open and visual mode, the length of lines in the
+edit buffer may be limited to the number of characters that will fit
+in the display. If either limit is exceeded during editing, an
+error message shall be written. If either limit is exceeded by a line
+read in from a file, an error message shall be written and
+the edit session may be terminated.
+.LP
+If the editor stops running due to any reason other than a user command,
+and the edit buffer has been modified since the last
+complete write, it shall be equivalent to a SIGHUP asynchronous event.
+If the system crashes, it shall be equivalent to a SIGHUP
+asynchronous event.
+.LP
+During initialization (before the first file is copied into the edit
+buffer or any user commands from the terminal are
+processed) the following shall occur:
+.IP " 1." 4
+If the environment variable \fIEXINIT\fP is set, the editor shall
+execute the \fIex\fP commands contained in that
+variable.
+.LP
+.IP " 2." 4
+If the \fIEXINIT\fP variable is not set, and all of the following
+are true:
+.RS
+.IP " a." 4
+The \fIHOME\fP environment variable is not null and not empty.
+.LP
+.IP " b." 4
+The file \fB.exrc\fP in the directory referred to by the \fIHOME\fP
+environment variable:
+.RS
+.IP " 1." 4
+Exists
+.LP
+.IP " 2." 4
+Is owned by the same user ID as the real user ID of the process or
+the process has appropriate privileges
+.LP
+.IP " 3." 4
+Is not writable by anyone other than the owner
+.LP
+.RE
+.LP
+.RE
+.LP
+the editor shall execute the \fIex\fP commands contained in that file.
+.LP
+.IP " 3." 4
+If and only if all of the following are true:
+.RS
+.IP " a." 4
+The current directory is not referred to by the \fIHOME\fP environment
+variable.
+.LP
+.IP " b." 4
+A command in the \fIEXINIT\fP environment variable or a command in
+the \fB.exrc\fP file in the directory referred to by the
+\fIHOME\fP environment variable sets the editor option \fBexrc\fP.
+.LP
+.IP " c." 4
+The \fB.exrc\fP file in the current directory:
+.RS
+.IP " 1." 4
+Exists
+.LP
+.IP " 2." 4
+Is owned by the same user ID as the real user ID of the process, or
+by one of a set of implementation-defined user IDs
+.LP
+.IP " 3." 4
+Is not writable by anyone other than the owner
+.LP
+.RE
+.LP
+.RE
+.LP
+the editor shall attempt to execute the \fIex\fP commands contained
+in that file.
+.LP
+.LP
+Lines in any \fB.exrc\fP file that are blank lines shall be ignored.
+If any \fB.exrc\fP file exists, but is not read for
+ownership or permission reasons, it shall be an error.
+.LP
+After the \fIEXINIT\fP variable and any \fB.exrc\fP files are processed,
+the first file specified by the user shall be edited,
+as follows:
+.IP " 1." 4
+If the user specified the \fB-t\fP option, the effect shall be as
+if the \fIex\fP \fBtag\fP command was entered with the
+specified argument, with the exception that if tag processing does
+not result in a file to edit, the effect shall be as described
+in step 3. below.
+.LP
+.IP " 2." 4
+Otherwise, if the user specified any command line \fIfile\fP arguments,
+the effect shall be as if the \fIex\fP \fBedit\fP
+command was entered with the first of those arguments as its \fIfile\fP
+argument.
+.LP
+.IP " 3." 4
+Otherwise, the effect shall be as if the \fIex\fP \fBedit\fP command
+was entered with a nonexistent filename as its
+\fIfile\fP argument. It is unspecified whether this action shall set
+the current pathname. In an implementation where this action
+does not set the current pathname, any editor command using the current
+pathname shall fail until an editor command sets the
+current pathname.
+.LP
+.LP
+If the \fB-r\fP option was specified, the first time a file in the
+initial argument list or a file specified by the \fB-t\fP
+option is edited, if recovery information has previously been saved
+about it, that information shall be recovered and the editor
+shall behave as if the contents of the edit buffer have already been
+modified. If there are multiple instances of the file to be
+recovered, the one most recently saved shall be recovered, and an
+informational message that there are previous versions of the
+file that can be recovered shall be written. If no recovery information
+about a file is available, an informational message to this
+effect shall be written, and the edit shall proceed as usual.
+.LP
+If the \fB-c\fP option was specified, the first time a file that already
+exists (including a file that might not exist but for
+which recovery information is available, when the \fB-r\fP option
+is specified) replaces or initializes the contents of the edit
+buffer, the current line shall be set to the last line of the edit
+buffer, the current column shall be set to non- <blank>,
+and the \fIex\fP commands specified with the \fB-c\fP option shall
+be executed. In this case, the current line and current column
+shall not be set as described for the command associated with the
+replacement or initialization of the edit buffer contents.
+However, if the \fB-t\fP option or a \fBtag\fP command is associated
+with this action, the \fB-c\fP option commands shall be
+executed and then the movement to the tag shall be performed.
+.LP
+The current argument list shall initially be set to the filenames
+specified by the user on the command line. If no filenames are
+specified by the user, the current argument list shall be empty. If
+the \fB-t\fP option was specified, it is unspecified whether
+any filename resulting from tag processing shall be prepended to the
+current argument list. In the case where the filename is added
+as a prefix to the current argument list, the current argument list
+reference shall be set to that filename. In the case where the
+filename is not added as a prefix to the current argument list, the
+current argument list reference shall logically be located
+before the first of the filenames specified on the command line (for
+example, a subsequent \fIex\fP \fBnext\fP command shall edit
+the first filename from the command line). If the \fB-t\fP option
+was not specified, the current argument list reference shall be
+to the first of the filenames on the command line.
+.SS Addressing in ex
+.LP
+Addressing in \fIex\fP relates to the current line and the current
+column; the address of a line is its 1-based line number,
+the address of a column is its 1-based count from the beginning of
+the line. Generally, the current line is the last line affected
+by a command. The current line number is the address of the current
+line. In each command description, the effect of the command on
+the current line number and the current column is described.
+.LP
+Addresses are constructed as follows:
+.IP " 1." 4
+The character \fB'.'\fP (period) shall address the current line.
+.LP
+.IP " 2." 4
+The character \fB'$'\fP shall address the last line of the edit buffer.
+.LP
+.IP " 3." 4
+The positive decimal number \fIn\fP shall address the \fIn\fPth line
+of the edit buffer.
+.LP
+.IP " 4." 4
+The address \fB"'x"\fP refers to the line marked with the mark name
+character \fB'x'\fP, which shall be a lowercase
+letter from the portable character set or one of the characters \fB'`'\fP
+or \fB'"\fP . It shall be an error if the line
+that was marked is not currently present in the edit buffer or the
+mark has not been set. Lines can be marked with the \fIex\fP
+\fBmark\fP or \fBk\fP commands, or the \fIvi\fP \fBm\fP command.
+.LP
+.IP " 5." 4
+A regular expression enclosed by slashes ( \fB'/'\fP ) shall address
+the first line found by searching forwards from the line
+following the current line toward the end of the edit buffer and stopping
+at the first line for which the line excluding the
+terminating <newline> matches the regular expression. As stated in
+Regular Expressions in ex,
+an address consisting of a null regular expression delimited by slashes
+\fB"//"\fP shall address the next line for which the
+line excluding the terminating <newline> matches the last regular
+expression encountered. In addition, the second slash can
+be omitted at the end of a command line. If the \fBwrapscan\fP edit
+option is set, the search shall wrap around to the beginning
+of the edit buffer and continue up to and including the current line,
+so that the entire edit buffer is searched. Within the
+regular expression, the sequence \fB"\\/"\fP shall represent a literal
+slash instead of the regular expression delimiter.
+.LP
+.IP " 6." 4
+A regular expression enclosed in question marks ( \fB'?'\fP ) shall
+address the first line found by searching backwards from
+the line preceding the current line toward the beginning of the edit
+buffer and stopping at the first line for which the line
+excluding the terminating <newline> matches the regular expression.
+An address consisting of a null regular expression
+delimited by question marks \fB"??"\fP shall address the previous
+line for which the line excluding the terminating
+<newline> matches the last regular expression encountered. In addition,
+the second question mark can be omitted at the end of
+a command line. If the \fBwrapscan\fP edit option is set, the search
+shall wrap around from the beginning of the edit buffer to
+the end of the edit buffer and continue up to and including the current
+line, so that the entire edit buffer is searched. Within
+the regular expression, the sequence \fB"\\?"\fP shall represent a
+literal question mark instead of the RE delimiter.
+.LP
+.IP " 7." 4
+A plus sign ( \fB'+'\fP ) or a minus sign ( \fB'-'\fP ) followed by
+a decimal number shall address the current line plus
+or minus the number. A \fB'+'\fP or \fB'-'\fP not followed by a decimal
+number shall address the current line plus or minus
+1.
+.LP
+.LP
+Addresses can be followed by zero or more address offsets, optionally
+<blank>-separated. Address offsets are constructed
+as follows:
+.IP " 1." 4
+A \fB'+'\fP or \fB'-'\fP immediately followed by a decimal number
+shall add (subtract) the indicated number of lines to
+(from) the address. A \fB'+'\fP or \fB'-'\fP not followed by a decimal
+number shall add (subtract) 1 to (from) the
+address.
+.LP
+.IP " 2." 4
+A decimal number shall add the indicated number of lines to the address.
+.LP
+.LP
+It shall not be an error for an intermediate address value to be less
+than zero or greater than the last line in the edit
+buffer. It shall be an error for the final address value to be less
+than zero or greater than the last line in the edit buffer.
+.LP
+Commands take zero, one, or two addresses; see the descriptions of
+\fI1addr\fP and \fI2addr\fP in Command Descriptions in ex . If more
+than the required number of addresses are provided to a command that
+requires zero addresses, it shall be an error. Otherwise, if more
+than the required number of addresses are provided to a command,
+the addresses specified first shall be evaluated and then discarded
+until the maximum number of valid addresses remain.
+.LP
+Addresses shall be separated from each other by a comma ( \fB','\fP
+) or a semicolon ( \fB';'\fP ). If no address is
+specified before or after a comma or semicolon separator, it shall
+be as if the address of the current line was specified before or
+after the separator. In the case of a semicolon separator, the current
+line ( \fB'.'\fP ) shall be set to the first address, and
+only then will the next address be calculated. This feature can be
+used to determine the starting line for forwards and backwards
+searches (see rules 5. and 6.).
+.LP
+A percent sign ( \fB'%'\fP ) shall be equivalent to entering the two
+addresses \fB"1,$"\fP .
+.LP
+Any delimiting <blank>s between addresses, address separators, or
+address offsets shall be discarded.
+.SS Command Line Parsing in ex
+.LP
+The following symbol is used in this and following sections to describe
+parsing behavior:
+.TP 7
+\fIescape\fP
+If a character is referred to as "backslash-escaped" or " <control>-V-escaped,"
+it shall mean that the character
+acquired or lost a special meaning by virtue of being preceded, respectively,
+by a backslash or <control>-V character. Unless
+otherwise specified, the escaping character shall be discarded at
+that time and shall not be further considered for any
+purpose.
+.sp
+.LP
+Command-line parsing shall be done in the following steps. For each
+step, characters already evaluated shall be ignored; that
+is, the phrase "leading character" refers to the next character that
+has not yet been evaluated.
+.IP " 1." 4
+Leading colon characters shall be skipped.
+.LP
+.IP " 2." 4
+Leading <blank>s shall be skipped.
+.LP
+.IP " 3." 4
+If the leading character is a double-quote character, the characters
+up to and including the next non-backslash-escaped
+<newline> shall be discarded, and any subsequent characters shall
+be parsed as a separate command.
+.LP
+.IP " 4." 4
+Leading characters that can be interpreted as addresses shall be evaluated;
+see Addressing in ex
+\&.
+.LP
+.IP " 5." 4
+Leading <blank>s shall be skipped.
+.LP
+.IP " 6." 4
+If the next character is a vertical-line character or a <newline>:
+.RS
+.IP " a." 4
+If the next character is a <newline>:
+.RS
+.IP " 1." 4
+If \fIex\fP is in open or visual mode, the current line shall be set
+to the last address specified, if any.
+.LP
+.IP " 2." 4
+Otherwise, if the last command was terminated by a vertical-line character,
+no action shall be taken; for example, the command
+\fB"||<newline>"\fP shall execute two implied commands, not three.
+.LP
+.IP " 3." 4
+Otherwise, step 6.b. shall apply.
+.LP
+.RE
+.LP
+.IP " b." 4
+Otherwise, the implied command shall be the \fBprint\fP command. The
+last \fB#\fP, \fBp\fP, and \fBl\fP flags specified to
+any \fIex\fP command shall be remembered and shall apply to this implied
+command. Executing the \fIex\fP \fBnumber\fP,
+\fBprint\fP, or \fBlist\fP command shall set the remembered flags
+to \fB#\fP, nothing, and \fBl\fP, respectively, plus any
+other flags specified for that execution of the \fBnumber\fP, \fBprint\fP,
+or \fBlist\fP command.
+.LP
+If \fIex\fP is not currently performing a \fBglobal\fP or \fBv\fP
+command, and no address or count is specified, the current
+line shall be incremented by 1 before the command is executed. If
+incrementing the current line would result in an address past the
+last line in the edit buffer, the command shall fail, and the increment
+shall not happen.
+.LP
+.IP " c." 4
+The <newline> or vertical-line character shall be discarded and any
+subsequent characters shall be parsed as a separate
+command.
+.LP
+.RE
+.LP
+.IP " 7." 4
+The command name shall be comprised of the next character (if the
+character is not alphabetic), or the next character and any
+subsequent alphabetic characters (if the character is alphabetic),
+with the following exceptions:
+.RS
+.IP " a." 4
+Commands that consist of any prefix of the characters in the command
+name \fBdelete\fP, followed immediately by any of the
+characters \fB'l'\fP, \fB'p'\fP, \fB'+'\fP, \fB'-'\fP, or \fB'#'\fP
+shall be interpreted as a \fBdelete\fP
+command, followed by a <blank>, followed by the characters that were
+not part of the prefix of the \fBdelete\fP command. The
+maximum number of characters shall be matched to the command name
+\fBdelete\fP; for example, \fB"del"\fP shall not be treated
+as \fB"de"\fP followed by the flag \fBl\fP.
+.LP
+.IP " b." 4
+Commands that consist of the character \fB'k'\fP, followed by a character
+that can be used as the name of a mark, shall be
+equivalent to the mark command followed by a <blank>, followed by
+the character that followed the \fB'k'\fP .
+.LP
+.IP " c." 4
+Commands that consist of the character \fB's'\fP, followed by characters
+that could be interpreted as valid options to the
+\fBs\fP command, shall be the equivalent of the \fBs\fP command, without
+any pattern or replacement values, followed by a
+<blank>, followed by the characters after the \fB's'\fP .
+.LP
+.RE
+.LP
+.IP " 8." 4
+The command name shall be matched against the possible command names,
+and a command name that contains a prefix matching the
+characters specified by the user shall be the executed command. In
+the case of commands where the characters specified by the user
+could be ambiguous, the executed command shall be as follows:
+.TS C
+center; l l l l l l l l.
+\fBa\fP \fBappend\fP n \fBnext\fP \fBt\fP t \fB\ \fP \fB\ \fP
+\fBc\fP \fBchange\fP p \fBprint\fP \fBu\fP undo \fB\ \fP \fB\ \fP
+\fBch\fP \fBchange\fP pr \fBprint\fP \fBun\fP undo \fB\ \fP \fB\ \fP
+\fBe\fP \fBedit\fP r \fBread\fP \fBv\fP v \fB\ \fP \fB\ \fP
+\fBm\fP \fBmove\fP re \fBread\fP \fBw\fP write \fB\ \fP \fB\ \fP
+\fBma\fP \fBmark\fP s \fBs\fP \fB\ \fP \ \fB\ \fP \fB\ \fP
+.TE
+.LP
+Implementation extensions with names causing similar ambiguities shall
+not be checked for a match until all possible matches for
+commands specified by IEEE\ Std\ 1003.1-2001 have been checked.
+.LP
+.IP " 9." 4
+If the command is a \fB!\fP command, or if the command is a \fBread\fP
+command followed by zero or more <blank>s and a
+\fB!\fP, or if the command is a \fBwrite\fP command followed by one
+or more <blank>s and a \fB!\fP, the rest of the
+command shall include all characters up to a non-backslash-escaped
+<newline>. The <newline> shall be discarded and any
+subsequent characters shall be parsed as a separate \fIex\fP command.
+.LP
+.IP "10." 4
+Otherwise, if the command is an \fBedit\fP, \fBex\fP, or \fBnext\fP
+command, or a \fBvisual\fP command while in open or
+visual mode, the next part of the command shall be parsed as follows:
+.RS
+.IP " a." 4
+Any \fB'!'\fP character immediately following the command shall be
+skipped and be part of the command.
+.LP
+.IP " b." 4
+Any leading <blank>s shall be skipped and be part of the command.
+.LP
+.IP " c." 4
+If the next character is a \fB'+'\fP, characters up to the first
+non-backslash-escaped <newline> or
+non-backslash-escaped <blank> shall be skipped and be part of the
+command.
+.LP
+.IP " d." 4
+The rest of the command shall be determined by the steps specified
+in paragraph 12.
+.LP
+.RE
+.LP
+.IP "11." 4
+Otherwise, if the command is a \fBglobal\fP, \fBopen\fP, \fBs\fP,
+or \fBv\fP command, the next part of the command shall be
+parsed as follows:
+.RS
+.IP " a." 4
+Any leading <blank>s shall be skipped and be part of the command.
+.LP
+.IP " b." 4
+If the next character is not an alphanumeric, double-quote, <newline>,
+backslash, or vertical-line character:
+.RS
+.IP " 1." 4
+The next character shall be used as a command delimiter.
+.LP
+.IP " 2." 4
+If the command is a \fBglobal\fP, \fBopen\fP, or \fBv\fP command,
+characters up to the first non-backslash-escaped
+<newline>, or first non-backslash-escaped delimiter character, shall
+be skipped and be part of the command.
+.LP
+.IP " 3." 4
+If the command is an \fBs\fP command, characters up to the first non-backslash-escaped
+<newline>, or second
+non-backslash-escaped delimiter character, shall be skipped and be
+part of the command.
+.LP
+.RE
+.LP
+.IP " c." 4
+If the command is a \fBglobal\fP or \fBv\fP command, characters up
+to the first non-backslash-escaped <newline> shall be
+skipped and be part of the command.
+.LP
+.IP " d." 4
+Otherwise, the rest of the command shall be determined by the steps
+specified in paragraph 12.
+.LP
+.RE
+.LP
+.IP "12." 4
+Otherwise:
+.RS
+.IP " a." 4
+If the command was a \fBmap\fP, \fBunmap\fP, \fBabbreviate\fP, or
+\fBunabbreviate\fP command, characters up to the first
+non- <control>-V-escaped <newline>, vertical-line, or double-quote
+character shall be skipped and be part of the
+command.
+.LP
+.IP " b." 4
+Otherwise, characters up to the first non-backslash-escaped <newline>,
+vertical-line, or double-quote character shall be
+skipped and be part of the command.
+.LP
+.IP " c." 4
+If the command was an \fBappend\fP, \fBchange\fP, or \fBinsert\fP
+command, and the step 12.b. ended at a vertical-line
+character, any subsequent characters, up to the next non-backslash-escaped
+<newline> shall be used as input text to the
+command.
+.LP
+.IP " d." 4
+If the command was ended by a double-quote character, all subsequent
+characters, up to the next non-backslash-escaped
+<newline>, shall be discarded.
+.LP
+.IP " e." 4
+The terminating <newline> or vertical-line character shall be discarded
+and any subsequent characters shall be parsed as a
+separate \fIex\fP command.
+.LP
+.RE
+.LP
+.LP
+Command arguments shall be parsed as described by the Synopsis and
+Description of each individual \fIex\fP command. This
+parsing shall not be <blank>-sensitive, except for the \fB!\fP argument,
+which must follow the command name without
+intervening <blank>s, and where it would otherwise be ambiguous. For
+example, \fIcount\fP and \fIflag\fP arguments need not
+be <blank>-separated because \fB"d22p"\fP is not ambiguous, but \fIfile\fP
+arguments to the \fIex\fP \fBnext\fP command
+must be separated by one or more <blank>s. Any <blank> in command
+arguments for the \fBabbreviate\fP,
+\fBunabbreviate\fP, \fBmap\fP, and \fBunmap\fP commands can be <control>-V-escaped,
+in which case the <blank> shall
+not be used as an argument delimiter. Any <blank> in the command argument
+for any other command can be backslash-escaped, in
+which case that <blank> shall not be used as an argument delimiter.
+.LP
+Within command arguments for the \fBabbreviate\fP, \fBunabbreviate\fP,
+\fBmap\fP, and \fBunmap\fP commands, any character
+can be <control>-V-escaped. All such escaped characters shall be treated
+literally and shall have no special meaning. Within
+command arguments for all other \fIex\fP commands that are not regular
+expressions or replacement strings, any character that
+would otherwise have a special meaning can be backslash-escaped. Escaped
+characters shall be treated literally, without special
+meaning as shell expansion characters or \fB'!'\fP, \fB'%'\fP, and
+\fB'#'\fP expansion characters. See Regular Expressions in ex and
+Replacement Strings in ex for descriptions of
+command arguments that are regular expressions or replacement strings.
+.LP
+Non-backslash-escaped \fB'%'\fP characters appearing in \fIfile\fP
+arguments to any \fIex\fP command shall be replaced by
+the current pathname; unescaped \fB'#'\fP characters shall be replaced
+by the alternate pathname. It shall be an error if
+\fB'%'\fP or \fB'#'\fP characters appear unescaped in an argument
+and their corresponding values are not set.
+.LP
+Non-backslash-escaped \fB'!'\fP characters in the arguments to either
+the \fIex\fP \fB!\fP command or the open and visual
+mode \fB!\fP command, or in the arguments to the \fIex\fP \fBread\fP
+command, where the first non- <blank> after the
+command name is a \fB'!'\fP character, or in the arguments to the
+\fIex\fP \fBwrite\fP command where the command name is
+followed by one or more <blank>s and the first non- <blank> after
+the command name is a \fB'!'\fP character, shall
+be replaced with the arguments to the last of those three commands
+as they appeared after all unescaped \fB'%'\fP, \fB'#'\fP,
+and \fB'!'\fP characters were replaced. It shall be an error if
+\fB'!'\fP characters appear unescaped in one of these
+commands and there has been no previous execution of one of these
+commands.
+.LP
+If an error occurs during the parsing or execution of an \fIex\fP
+command:
+.IP " *" 3
+An informational message to this effect shall be written. Execution
+of the \fIex\fP command shall stop, and the cursor (for
+example, the current line and column) shall not be further modified.
+.LP
+.IP " *" 3
+If the \fIex\fP command resulted from a map expansion, all characters
+from that map expansion shall be discarded, except as
+otherwise specified by the \fBmap\fP command.
+.LP
+.IP " *" 3
+Otherwise, if the \fIex\fP command resulted from the processing of
+an \fIEXINIT\fP environment variable, a \fB.exrc\fP file,
+a \fB:source\fP command, a \fB-c\fP option, or a \fB+\fP \fIcommand\fP
+specified to an \fIex\fP \fBedit\fP, \fBex\fP,
+\fBnext\fP, or \fBvisual\fP command, no further commands from the
+source of the commands shall be executed.
+.LP
+.IP " *" 3
+Otherwise, if the \fIex\fP command resulted from the execution of
+a buffer or a \fBglobal\fP or \fBv\fP command, no further
+commands caused by the execution of the buffer or the \fBglobal\fP
+or \fBv\fP command shall be executed.
+.LP
+.IP " *" 3
+Otherwise, if the \fIex\fP command was not terminated by a <newline>,
+all characters up to and including the next
+non-backslash-escaped <newline> shall be discarded.
+.LP
+.SS Input Editing in ex
+.LP
+The following symbol is used in this and the following sections to
+specify command actions:
+.TP 7
+\fIword\fP
+In the POSIX locale, a word consists of a maximal sequence of letters,
+digits, and underscores, delimited at both ends by
+characters other than letters, digits, or underscores, or by the beginning
+or end of a line or the edit buffer.
+.sp
+.LP
+When accepting input characters from the user, in either \fIex\fP
+command mode or \fIex\fP text input mode, \fIex\fP shall
+enable canonical mode input processing, as defined in the System Interfaces
+volume of IEEE\ Std\ 1003.1-2001.
+.LP
+If in \fIex\fP text input mode:
+.IP " 1." 4
+If the \fBnumber\fP edit option is set, \fIex\fP shall prompt for
+input using the line number that would be assigned to the
+line if it is entered, in the format specified for the \fIex\fP \fBnumber\fP
+command.
+.LP
+.IP " 2." 4
+If the \fBautoindent\fP edit option is set, \fIex\fP shall prompt
+for input using \fBautoindent\fP characters, as described
+by the \fBautoindent\fP edit option. \fBautoindent\fP characters shall
+follow the line number, if any.
+.LP
+.LP
+If in \fIex\fP command mode:
+.IP " 1." 4
+If the \fBprompt\fP edit option is set, input shall be prompted for
+using a single \fB':'\fP character; otherwise, there
+shall be no prompt.
+.LP
+.LP
+The input characters in the following sections shall have the following
+effects on the input line.
+.SS Scroll
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBeof
+\fP
+.fi
+.RE
+.sp
+.LP
+See the description of the \fIstty\fP \fIeof\fP character in \fIstty\fP
+\&.
+.LP
+If in \fIex\fP command mode:
+If the \fIeof\fP character is the first character entered on the line,
+the line shall be evaluated as if it contained
+two characters: a <control>-D and a <newline>.
+.LP
+Otherwise, the \fIeof\fP character shall have no special meaning.
+.sp
+.LP
+If in \fIex\fP text input mode:
+If the cursor follows an \fBautoindent\fP character, the \fBautoindent\fP
+characters in the line shall be modified so
+that a part of the next text input character will be displayed on
+the first column in the line after the previous \fBshiftwidth\fP
+edit option column boundary, and the user shall be prompted again
+for input for the same line.
+.LP
+Otherwise, if the cursor follows a \fB'0'\fP, which follows an \fBautoindent\fP
+character, and the \fB'0'\fP was the
+previous text input character, the \fB'0'\fP and all \fBautoindent\fP
+characters in the line shall be discarded, and the user
+shall be prompted again for input for the same line.
+.LP
+Otherwise, if the cursor follows a \fB'^'\fP, which follows an \fBautoindent\fP
+character, and the \fB'^'\fP was the
+previous text input character, the \fB'^'\fP and all \fBautoindent\fP
+characters in the line shall be discarded, and the user
+shall be prompted again for input for the same line. In addition,
+the \fBautoindent\fP level for the next input line shall be
+derived from the same line from which the \fBautoindent\fP level for
+the current input line was derived.
+.LP
+Otherwise, if there are no \fBautoindent\fP or text input characters
+in the line, the \fIeof\fP character shall be
+discarded.
+.LP
+Otherwise, the \fIeof\fP character shall have no special meaning.
+.SS <newline>
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB<newline>
+.sp
+
+<control>-J
+\fP
+.fi
+.RE
+.sp
+.LP
+If in \fIex\fP command mode:
+Cause the command line to be parsed; <control>-J shall be mapped to
+the <newline> for this
+purpose.
+.LP
+If in \fIex\fP text input mode:
+Terminate the current line. If there are no characters other than
+\fBautoindent\fP characters on the line, all
+characters on the line shall be discarded.
+.LP
+Prompt for text input on a new line after the current line. If the
+\fBautoindent\fP edit option is set, an appropriate number
+of \fBautoindent\fP characters shall be added as a prefix to the line
+as described by the \fIex\fP \fBautoindent\fP edit
+option.
+.SS <backslash>
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB<backslash>
+\fP
+.fi
+.RE
+.sp
+.LP
+Allow the entry of a subsequent <newline> or <control>-J as a literal
+character, removing any special meaning that
+it may have to the editor during text input mode. The backslash character
+shall be retained and evaluated when the command line is
+parsed, or retained and included when the input text becomes part
+of the edit buffer.
+.SS <control>-V
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB<control>-V
+\fP
+.fi
+.RE
+.sp
+.LP
+Allow the entry of any subsequent character as a literal character,
+removing any special meaning that it may have to the editor
+during text input mode. The <control>-V character shall be discarded
+before the command line is parsed or the input text
+becomes part of the edit buffer.
+.LP
+If the "literal next" functionality is performed by the underlying
+system, it is implementation-defined whether a character
+other than <control>-V performs this function.
+.SS <control>-W
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB<control>-W
+\fP
+.fi
+.RE
+.sp
+.LP
+Discard the <control>-W, and the word previous to it in the input
+line, including any <blank>s following the word
+and preceding the <control>-W. If the "word erase" functionality is
+performed by the underlying system, it is
+implementation-defined whether a character other than <control>-W
+performs this function.
+.SS Command Descriptions in ex
+.LP
+The following symbols are used in this section to represent command
+modifiers. Some of these modifiers can be omitted, in which
+case the specified defaults shall be used.
+.TP 7
+\fI1addr\fP
+A single line address, given in any of the forms described in Addressing
+in ex ; the default
+shall be the current line ( \fB'.'\fP ), unless otherwise specified.
+.LP
+If the line address is zero, it shall be an error, unless otherwise
+specified in the following command descriptions.
+.LP
+If the edit buffer is empty, and the address is specified with a command
+other than \fB=\fP, \fBappend\fP, \fBinsert\fP,
+\fBopen\fP, \fBput\fP, \fBread\fP, or \fBvisual\fP, or the address
+is not zero, it shall be an error.
+.TP 7
+\fI2addr\fP
+Two addresses specifying an inclusive range of lines. If no addresses
+are specified, the default for \fI2addr\fP shall be the
+current line only ( \fB".,."\fP ), unless otherwise specified in the
+following command descriptions. If one address is
+specified, \fI2addr\fP shall specify that line only, unless otherwise
+specified in the following command descriptions.
+.LP
+It shall be an error if the first address is greater than the second
+address.
+.LP
+If the edit buffer is empty, and the two addresses are specified with
+a command other than the \fB!\fP, \fBwrite\fP,
+\fBwq\fP, or \fBxit\fP commands, or either address is not zero, it
+shall be an error.
+.TP 7
+\fIcount\fP
+A positive decimal number. If \fIcount\fP is specified, it shall be
+equivalent to specifying an additional address to the
+command, unless otherwise specified by the following command descriptions.
+The additional address shall be equal to the last
+address specified to the command (either explicitly or by default)
+plus \fIcount\fP-1.
+.LP
+If this would result in an address greater than the last line of the
+edit buffer, it shall be corrected to equal the last line
+of the edit buffer.
+.TP 7
+\fIflags\fP
+One or more of the characters \fB'+'\fP, \fB'-'\fP, \fB'#'\fP,
+\fB'p'\fP, or \fB'l'\fP (ell). The flag
+characters can be <blank>-separated, and in any order or combination.
+The characters \fB'#'\fP, \fB'p'\fP, and
+\fB'l'\fP shall cause lines to be written in the format specified
+by the \fBprint\fP command with the specified \fIflags\fP.
+.LP
+The lines to be written are as follows:
+.RS
+.IP " 1." 4
+All edit buffer lines written during the execution of the \fIex\fP
+\fB&\fP, \fB~\fP, \fBlist\fP, \fBnumber\fP,
+\fBopen\fP, \fBprint\fP, \fBs\fP, \fBvisual\fP, and \fBz\fP commands
+shall be written as specified by \fIflags\fP.
+.LP
+.IP " 2." 4
+After the completion of an \fIex\fP command with a flag as an argument,
+the current line shall be written as specified by
+\fIflags\fP, unless the current line was the last line written by
+the command.
+.LP
+.RE
+.LP
+The characters \fB'+'\fP and \fB'-'\fP cause the value of the current
+line after the execution of the \fIex\fP command to
+be adjusted by the offset address as described in Addressing in ex
+\&. This adjustment shall occur
+before the current line is written as described in 2. above.
+.LP
+The default for \fIflags\fP shall be none.
+.TP 7
+\fIbuffer\fP
+One of a number of named areas for holding text. The named buffers
+are specified by the alphanumeric characters of the POSIX
+locale. There shall also be one "unnamed" buffer. When no buffer is
+specified for editor commands that use a buffer, the unnamed
+buffer shall be used. Commands that store text into buffers shall
+store the text as it was before the command took effect, and
+shall store text occurring earlier in the file before text occurring
+later in the file, regardless of how the text region was
+specified. Commands that store text into buffers shall store the text
+into the unnamed buffer as well as any specified buffer.
+.LP
+In \fIex\fP commands, buffer names are specified as the name by itself.
+In open or visual mode commands the name is preceded by
+a double quote ( \fB' )'\fP character.
+.LP
+If the specified buffer name is an uppercase character, and the buffer
+contents are to be modified, the buffer shall be appended
+to rather than being overwritten. If the buffer is not being modified,
+specifying the buffer name in lowercase and uppercase shall
+have identical results.
+.LP
+There shall also be buffers named by the numbers 1 through 9. In open
+and visual mode, if a region of text including characters
+from more than a single line is being modified by the \fIvi\fP \fBc\fP
+or \fBd\fP commands,
+the motion character associated with the \fBc\fP or \fBd\fP commands
+specifies that the buffer text shall be in line mode, or the
+commands \fB%\fP, \fB`\fP, \fB/\fP, \fB?\fP, \fB(\fP, \fB)\fP, \fBN\fP,
+\fBn\fP, \fB{\fP, or \fB}\fP are used to define a
+region of text for the \fBc\fP or \fBd\fP commands, the contents of
+buffers 1 through 8 shall be moved into the buffer named by
+the next numerically greater value, the contents of buffer 9 shall
+be discarded, and the region of text shall be copied into buffer
+1. This shall be in addition to copying the text into a user-specified
+buffer or unnamed buffer, or both. Numeric buffers can be
+specified as a source buffer for open and visual mode commands; however,
+specifying a numeric buffer as the write target of an open
+or visual mode command shall have unspecified results.
+.LP
+The text of each buffer shall have the characteristic of being in
+either line or character mode. Appending text to a non-empty
+buffer shall set the mode to match the characteristic of the text
+being appended. Appending text to a buffer shall cause the
+creation of at least one additional line in the buffer. All text stored
+into buffers by \fIex\fP commands shall be in line mode.
+The \fIex\fP commands that use buffers as the source of text specify
+individually how buffers of different modes are handled. Each
+open or visual mode command that uses buffers for any purpose specifies
+individually the mode of the text stored into the buffer
+and how buffers of different modes are handled.
+.TP 7
+\fIfile\fP
+Command text used to derive a pathname. The default shall be the current
+pathname, as defined previously, in which case, if no
+current pathname has yet been established it shall be an error, except
+where specifically noted in the individual command
+descriptions that follow. If the command text contains any of the
+characters \fB'~'\fP, \fB'{'\fP, \fB'['\fP,
+\fB'*'\fP, \fB'?'\fP, \fB'$'\fP, \fB'`'\fP, \fB'"\fP, \fB' ,'\fP
+and \fB'\\'\fP, it shall be subjected
+to the process of "shell expansions", as described below; if more
+than a single pathname results and the command expects only
+one, it shall be an error.
+.LP
+The process of shell expansions in the editor shall be done as follows.
+The \fIex\fP utility shall pass two arguments to the
+program named by the shell edit option; the first shall be \fB-c\fP,
+and the second shall be the string \fB"echo"\fP and the
+command text as a single argument. The standard output and standard
+error of that command shall replace the command text.
+.TP 7
+\fB!\fP
+A character that can be appended to the command name to modify its
+operation, as detailed in the individual command
+descriptions. With the exception of the \fIex\fP \fBread\fP, \fBwrite\fP,
+and \fB!\fP commands, the \fB'!'\fP character
+shall only act as a modifier if there are no <blank>s between it and
+the command name.
+.TP 7
+\fIremembered\ search\ direction\fP
+.sp
+The \fIvi\fP commands \fBN\fP and \fBn\fP begin searching in a forwards
+or backwards
+direction in the edit buffer based on a remembered search direction,
+which is initially unset, and is set by the \fIex\fP
+\fBglobal\fP, \fBv\fP, \fBs\fP, and \fBtag\fP commands, and the \fIvi\fP
+\fB/\fP and
+\fB?\fP commands.
+.sp
+.SS Abbreviate
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBab\fP\fB[\fP\fIbreviate\fP\fB][\fP\fIlhs rhs\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+If \fIlhs\fP and \fIrhs\fP are not specified, write the current list
+of abbreviations and do nothing more.
+.LP
+Implementations may restrict the set of characters accepted in \fIlhs\fP
+or \fIrh\fP, except that printable characters and
+<blank>s shall not be restricted. Additional restrictions shall be
+implementation-defined.
+.LP
+In both \fIlhs\fP and \fIrhs\fP, any character may be escaped with
+a <control>-V, in which case the character shall not
+be used to delimit \fIlhs\fP from \fIrhs\fP, and the escaping <control>-V
+shall be discarded.
+.LP
+In open and visual text input mode, if a non-word or <ESC> character
+that is not escaped by a <control>-V character
+is entered after a word character, a check shall be made for a set
+of characters matching \fIlhs\fP, in the text input entered
+during this command. If it is found, the effect shall be as if \fIrhs\fP
+was entered instead of \fIlhs\fP.
+.LP
+The set of characters that are checked is defined as follows:
+.IP " 1." 4
+If there are no characters inserted before the word and non-word or
+<ESC> characters that triggered the check, the set of
+characters shall consist of the word character.
+.LP
+.IP " 2." 4
+If the character inserted before the word and non-word or <ESC> characters
+that triggered the check is a word character,
+the set of characters shall consist of the characters inserted immediately
+before the triggering characters that are word
+characters, plus the triggering word character.
+.LP
+.IP " 3." 4
+If the character inserted before the word and non-word or <ESC> characters
+that triggered the check is not a word
+character, the set of characters shall consist of the characters that
+were inserted before the triggering characters that are
+neither <blank>s nor word characters, plus the triggering word character.
+.LP
+.LP
+It is unspecified whether the \fIlhs\fP argument entered for the \fIex\fP
+\fBabbreviate\fP and \fBunabbreviate\fP commands
+is replaced in this fashion. Regardless of whether or not the replacement
+occurs, the effect of the command shall be as if the
+replacement had not occurred.
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: Unchanged.
+.SS Append
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fI1addr\fP\fB]\fP \fBa\fP\fB[\fP\fBppend\fP\fB][\fP\fB!\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Enter \fIex\fP text input mode; the input text shall be placed after
+the specified line. If line zero is specified, the text
+shall be placed at the beginning of the edit buffer.
+.LP
+This command shall be affected by the \fBnumber\fP and \fBautoindent\fP
+edit options; following the command name with
+\fB'!'\fP shall cause the \fBautoindent\fP edit option setting to
+be toggled for the duration of this command only.
+.LP
+\fICurrent line\fP: Set to the last input line; if no lines were input,
+set to the specified line, or to the first line of the
+edit buffer if a line of zero was specified, or zero if the edit buffer
+is empty.
+.LP
+\fICurrent column\fP: Set to non- <blank>.
+.SS Arguments
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBar\fP\fB[\fP\fIgs\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Write the current argument list, with the current argument-list entry,
+if any, between \fB'['\fP and \fB']'\fP
+characters.
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: Unchanged.
+.SS Change
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fI2addr\fP\fB]\fP \fBc\fP\fB[\fP\fBhange\fP\fB][\fP\fB!\fP\fB][\fP\fIcount\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Enter \fIex\fP text input mode; the input text shall replace the specified
+lines. The specified lines shall be copied into the
+unnamed buffer, which shall become a line mode buffer.
+.LP
+This command shall be affected by the \fBnumber\fP and \fBautoindent\fP
+edit options; following the command name with
+\fB'!'\fP shall cause the \fBautoindent\fP edit option setting to
+be toggled for the duration of this command only.
+.LP
+\fICurrent line\fP: Set to the last input line; if no lines were input,
+set to the line before the first address, or to the
+first line of the edit buffer if there are no lines preceding the
+first address, or to zero if the edit buffer is empty.
+.LP
+\fICurrent column\fP: Set to non- <blank>.
+.SS Change Directory
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBchd\fP\fB[\fP\fBir\fP\fB][\fP\fB!\fP\fB][\fP\fIdirectory\fP\fB]\fP\fBcd\fP\fB[\fP\fB!\fP\fB][\fP\fIdirectory\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Change the current working directory to \fIdirectory\fP.
+.LP
+If no \fIdirectory\fP argument is specified, and the \fIHOME\fP environment
+variable is set to a non-null and non-empty value,
+\fIdirectory\fP shall default to the value named in the \fIHOME\fP
+environment variable. If the \fIHOME\fP environment variable
+is empty or is undefined, the default value of \fIdirectory\fP is
+implementation-defined.
+.LP
+If no \fB'!'\fP is appended to the command name, and the edit buffer
+has been modified since the last complete write, and the
+current pathname does not begin with a \fB'/'\fP, it shall be an
+error.
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: Unchanged.
+.SS Copy
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fI2addr\fP\fB]\fP \fBco\fP\fB[\fP\fBpy\fP\fB]\fP \fI1addr\fP \fB[\fP\fIflags\fP\fB]
+[\fP\fI2addr\fP\fB]\fP \fBt\fP \fI1addr\fP \fB[\fP\fIflags\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Copy the specified lines after the specified destination line; line
+zero specifies that the lines shall be placed at the
+beginning of the edit buffer.
+.LP
+\fICurrent line\fP: Set to the last line copied.
+.LP
+\fICurrent column\fP: Set to non- <blank>.
+.SS Delete
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fI2addr\fP\fB]\fP \fBd\fP\fB[\fP\fBelete\fP\fB][\fP\fIbuffer\fP\fB][\fP\fIcount\fP\fB][\fP\fIflags\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Delete the specified lines into a buffer (defaulting to the unnamed
+buffer), which shall become a line-mode buffer.
+.LP
+Flags can immediately follow the command name; see Command Line Parsing
+in ex .
+.LP
+\fICurrent line\fP: Set to the line following the deleted lines, or
+to the last line in the edit buffer if that line is past
+the end of the edit buffer, or to zero if the edit buffer is empty.
+.LP
+\fICurrent column\fP: Set to non- <blank>.
+.SS Edit
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBe\fP\fB[\fP\fBdit\fP\fB][\fP\fB!\fP\fB][\fP\fB+\fP\fIcommand\fP\fB][\fP\fIfile\fP\fB]\fP\fBex\fP\fB[\fP\fB!\fP\fB][\fP\fB+\fP\fIcommand\fP\fB][\fP\fIfile\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+If no \fB'!'\fP is appended to the command name, and the edit buffer
+has been modified since the last complete write, it
+shall be an error.
+.LP
+If \fIfile\fP is specified, replace the current contents of the edit
+buffer with the current contents of \fIfile\fP, and set
+the current pathname to \fIfile\fP. If \fIfile\fP is not specified,
+replace the current contents of the edit buffer with the
+current contents of the file named by the current pathname. If for
+any reason the current contents of the file cannot be accessed,
+the edit buffer shall be empty.
+.LP
+The \fB+\fP \fIcommand\fP option shall be <blank>-delimited; <blank>s
+within \fB+\fP \fIcommand\fP can be
+escaped by preceding them with a backslash character. The \fB+\fP
+\fIcommand\fP shall be interpreted as an \fIex\fP command
+immediately after the contents of the edit buffer have been replaced
+and the current line and column have been set.
+.LP
+If the edit buffer is empty:
+.LP
+\fICurrent line\fP: Set to 0.
+.LP
+\fICurrent column\fP: Set to 1.
+.LP
+Otherwise, if executed while in \fIex\fP command mode or if the \fB+\fP
+\fIcommand\fP argument is specified:
+.LP
+\fICurrent line\fP: Set to the last line of the edit buffer.
+.LP
+\fICurrent column\fP: Set to non- <blank>.
+.LP
+Otherwise, if \fIfile\fP is omitted or results in the current pathname:
+.LP
+\fICurrent line\fP: Set to the first line of the edit buffer.
+.LP
+\fICurrent column\fP: Set to non- <blank>.
+.LP
+Otherwise, if \fIfile\fP is the same as the last file edited, the
+line and column shall be set as follows; if the file was
+previously edited, the line and column may be set as follows:
+.LP
+\fICurrent line\fP: Set to the last value held when that file was
+last edited. If this value is not a valid line in the new
+edit buffer, set to the first line of the edit buffer.
+.LP
+\fICurrent column\fP: If the current line was set to the last value
+held when the file was last edited, set to the last value
+held when the file was last edited. Otherwise, or if the last value
+is not a valid column in the new edit buffer, set to non-
+<blank>.
+.LP
+Otherwise:
+.LP
+\fICurrent line\fP: Set to the first line of the edit buffer.
+.LP
+\fICurrent column\fP: Set to non- <blank>.
+.SS File
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBf\fP\fB[\fP\fBile\fP\fB][\fP\fIfile\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+If a \fIfile\fP argument is specified, the alternate pathname shall
+be set to the current pathname, and the current pathname
+shall be set to \fIfile\fP.
+.LP
+Write an informational message. If the file has a current pathname,
+it shall be included in this message; otherwise, the message
+shall indicate that there is no current pathname. If the edit buffer
+contains lines, the current line number and the number of
+lines in the edit buffer shall be included in this message; otherwise,
+the message shall indicate that the edit buffer is empty. If
+the edit buffer has been modified since the last complete write, this
+fact shall be included in this message. If the
+\fBreadonly\fP edit option is set, this fact shall be included in
+this message. The message may contain other unspecified
+information.
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: Unchanged.
+.SS Global
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fI2addr\fP\fB]\fP \fBg\fP\fB[\fP\fBlobal\fP\fB]\fP \fB/\fP\fIpattern\fP\fB/\fP \fB[\fP\fIcommands\fP\fB]
+[\fP\fI2addr\fP\fB]\fP \fBv /\fP\fIpattern\fP\fB/\fP \fB[\fP\fIcommands\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+The optional \fB'!'\fP character after the \fBglobal\fP command shall
+be the same as executing the \fBv\fP command.
+.LP
+If \fIpattern\fP is empty (for example, \fB"//"\fP ) or not specified,
+the last regular expression used in the editor
+command shall be used as the \fIpattern\fP. The \fIpattern\fP can
+be delimited by slashes (shown in the Synopsis), as well as any
+non-alphanumeric or non- <blank> other than backslash, vertical line,
+double quote, or <newline>.
+.LP
+If no lines are specified, the lines shall default to the entire file.
+.LP
+The \fBglobal\fP and \fBv\fP commands are logically two-pass operations.
+First, mark the lines within the specified lines for
+which the line excluding the terminating <newline> matches ( \fBglobal\fP)
+or does not match ( \fBv\fP or \fBglobal!\fP)
+the specified pattern. Second, execute the \fIex\fP commands given
+by \fIcommands\fP, with the current line ( \fB'.'\fP ) set
+to each marked line. If an error occurs during this process, or the
+contents of the edit buffer are replaced (for example, by the
+\fIex\fP \fB:edit\fP command) an error message shall be written and
+no more commands resulting from the execution of this command
+shall be processed.
+.LP
+Multiple \fIex\fP commands can be specified by entering multiple commands
+on a single line using a vertical line to delimit
+them, or one per line, by escaping each <newline> with a backslash.
+.LP
+If no commands are specified:
+.IP " 1." 4
+If in \fIex\fP command mode, it shall be as if the \fBprint\fP command
+were specified.
+.LP
+.IP " 2." 4
+Otherwise, no command shall be executed.
+.LP
+.LP
+For the \fBappend\fP, \fBchange\fP, and \fBinsert\fP commands, the
+input text shall be included as part of the command, and
+the terminating period can be omitted if the command ends the list
+of commands. The \fBopen\fP and \fBvisual\fP commands can be
+specified as one of the commands, in which case each marked line shall
+cause the editor to enter open or visual mode. If open or
+visual mode is exited using the \fIvi\fP \fBQ\fP command, the current
+line shall be set to the
+next marked line, and open or visual mode reentered, until the list
+of marked lines is exhausted.
+.LP
+The \fBglobal\fP, \fBv\fP, and \fBundo\fP commands cannot be used
+in \fIcommands\fP. Marked lines may be deleted by commands
+executed for lines occurring earlier in the file than the marked lines.
+In this case, no commands shall be executed for the deleted
+lines.
+.LP
+If the remembered search direction is not set, the \fBglobal\fP and
+\fBv\fP commands shall set it to forward.
+.LP
+The \fBautoprint\fP and \fBautoindent\fP edit options shall be inhibited
+for the duration of the \fBg\fP or \fBv\fP
+command.
+.LP
+\fICurrent line\fP: If no commands executed, set to the last marked
+line. Otherwise, as specified for the executed \fIex\fP
+commands.
+.LP
+\fICurrent column\fP: If no commands are executed, set to non- <blank>;
+otherwise, as specified for the individual
+\fIex\fP commands.
+.SS Insert
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fI1addr\fP\fB]\fP \fBi\fP\fB[\fP\fBnsert\fP\fB][\fP\fB!\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Enter \fIex\fP text input mode; the input text shall be placed before
+the specified line. If the line is zero or 1, the text
+shall be placed at the beginning of the edit buffer.
+.LP
+This command shall be affected by the \fBnumber\fP and \fBautoindent\fP
+edit options; following the command name with
+\fB'!'\fP shall cause the \fBautoindent\fP edit option setting to
+be toggled for the duration of this command only.
+.LP
+\fICurrent line\fP: Set to the last input line; if no lines were input,
+set to the line before the specified line, or to the
+first line of the edit buffer if there are no lines preceding the
+specified line, or zero if the edit buffer is empty.
+.LP
+\fICurrent column\fP: Set to non- <blank>.
+.SS Join
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fI2addr\fP\fB]\fP \fBj\fP\fB[\fP\fBoin\fP\fB][\fP\fB!\fP\fB][\fP\fIcount\fP\fB][\fP\fIflags\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+If \fIcount\fP is specified:
+If no address was specified, the \fBjoin\fP command shall behave as
+if \fI2addr\fP were the current line and the
+current line plus \fIcount\fP (.,. + \fIcount\fP).
+.LP
+If one address was specified, the \fBjoin\fP command shall behave
+as if \fI2addr\fP were the specified address and the
+specified address plus \fIcount\fP ( \fIaddr\fP, \fIaddr\fP + \fIcount\fP).
+.LP
+If two addresses were specified, the \fBjoin\fP command shall behave
+as if an additional address, equal to the last address
+plus \fIcount\fP -1 ( \fIaddr1\fP, \fIaddr2\fP, \fIaddr2\fP + \fIcount\fP
+-1), was specified.
+.LP
+If this would result in a second address greater than the last line
+of the edit buffer, it shall be corrected to be equal to the
+last line of the edit buffer.
+.LP
+If no \fIcount\fP is specified:
+If no address was specified, the \fBjoin\fP command shall behave as
+if \fI2addr\fP were the current line and the next
+line (.,. +1).
+.LP
+If one address was specified, the \fBjoin\fP command shall behave
+as if \fI2addr\fP were the specified address and the next
+line ( \fIaddr\fP, \fIaddr\fP +1).
+.LP
+Join the text from the specified lines together into a single line,
+which shall replace the specified lines.
+.LP
+If a \fB'!'\fP character is appended to the command name, the \fBjoin\fP
+shall be without modification of any line,
+independent of the current locale.
+.LP
+Otherwise, in the POSIX locale, set the current line to the first
+of the specified lines, and then, for each subsequent line,
+proceed as follows:
+.IP " 1." 4
+Discard leading <space>s from the line to be joined.
+.LP
+.IP " 2." 4
+If the line to be joined is now empty, delete it, and skip steps 3
+through 5.
+.LP
+.IP " 3." 4
+If the current line ends in a <blank>, or the first character of the
+line to be joined is a \fB')'\fP character, join
+the lines without further modification.
+.LP
+.IP " 4." 4
+If the last character of the current line is a \fB'.'\fP, join the
+lines with two <space>s between them.
+.LP
+.IP " 5." 4
+Otherwise, join the lines with a single <space> between them.
+.LP
+.LP
+\fICurrent line\fP: Set to the first line specified.
+.LP
+\fICurrent column\fP: Set to non- <blank>.
+.SS List
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fI2addr\fP\fB]\fP \fBl\fP\fB[\fP\fBist\fP\fB][\fP\fIcount\fP\fB][\fP\fIflags\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+This command shall be equivalent to the \fIex\fP command:
+.sp
+.RS
+.nf
+
+\fB[\fP\fI2addr\fP\fB]\fP \fBp\fP\fB[\fP\fBrint\fP\fB][\fP\fIcount\fP\fB]\fP \fBl\fP\fB[\fP\fIflags\fP\fB]\fP
+.fi
+.RE
+.LP
+See Print .
+.SS Map
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBmap\fP\fB[\fP\fB!\fP\fB][\fP\fIlhs rhs\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+If \fIlhs\fP and \fIrhs\fP are not specified:
+.IP " 1." 4
+If \fB'!'\fP is specified, write the current list of text input mode
+maps.
+.LP
+.IP " 2." 4
+Otherwise, write the current list of command mode maps.
+.LP
+.IP " 3." 4
+Do nothing more.
+.LP
+.LP
+Implementations may restrict the set of characters accepted in \fIlhs\fP
+or \fIrhs\fP, except that printable characters and
+<blank>s shall not be restricted. Additional restrictions shall be
+implementation-defined. In both \fIlhs\fP and \fIrhs\fP,
+any character can be escaped with a <control>-V, in which case the
+character shall not be used to delimit \fIlhs\fP from
+\fIrhs\fP, and the escaping <control>-V shall be discarded.
+.LP
+If the character \fB'!'\fP is appended to the \fBmap\fP command name,
+the mapping shall be effective during open or visual
+text input mode rather than \fBopen\fP or \fBvisual\fP command mode.
+This allows \fIlhs\fP to have two different \fBmap\fP
+definitions at the same time: one for command mode and one for text
+input mode.
+.LP
+For command mode mappings:
+When the \fIlhs\fP is entered as any part of a \fIvi\fP command in
+open or visual
+mode (but not as part of the arguments to the command), the action
+shall be as if the corresponding \fIrhs\fP had been entered.
+.LP
+If any character in the command, other than the first, is escaped
+using a <control>-V character, that character shall not
+be part of a match to an \fIlhs\fP.
+.LP
+It is unspecified whether implementations shall support \fBmap\fP
+commands where the \fIlhs\fP is more than a single character
+in length, where the first character of the \fIlhs\fP is printable.
+.LP
+If \fIlhs\fP contains more than one character and the first character
+is \fB'#'\fP, followed by a sequence of digits
+corresponding to a numbered function key, then when this function
+key is typed it shall be mapped to \fIrhs\fP. Characters other
+than digits following a \fB'#'\fP character also represent the function
+key named by the characters in the \fIlhs\fP following
+the \fB'#'\fP and may be mapped to \fIrhs\fP. It is unspecified how
+function keys are named or what function keys are
+supported.
+.LP
+For text input mode mappings:
+When the \fIlhs\fP is entered as any part of text entered in open
+or visual text input modes, the action shall be as
+if the corresponding \fIrhs\fP had been entered.
+.LP
+If any character in the input text is escaped using a <control>-V
+character, that character shall not be part of a match
+to an \fIlhs\fP.
+.LP
+It is unspecified whether the \fIlhs\fP text entered for subsequent
+\fBmap\fP or \fBunmap\fP commands is replaced with the
+\fIrhs\fP text for the purposes of the screen display; regardless
+of whether or not the display appears as if the corresponding
+\fIrhs\fP text was entered, the effect of the command shall be as
+if the \fIlhs\fP text was entered.
+.LP
+If only part of the \fIlhs\fP is entered, it is unspecified how long
+the editor will wait for additional, possibly matching
+characters before treating the already entered characters as not matching
+the \fIlhs\fP.
+.LP
+The \fIrhs\fP characters shall themselves be subject to remapping,
+unless otherwise specified by the \fBremap\fP edit option,
+except that if the characters in \fIlhs\fP occur as prefix characters
+in \fIrhs\fP, those characters shall not be remapped.
+.LP
+On block-mode terminals, the mapping need not occur immediately (for
+example, it may occur after the terminal transmits a group
+of characters to the system), but it shall achieve the same results
+as if it occurred immediately.
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: Unchanged.
+.SS Mark
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fI1addr\fP\fB]\fP \fBma\fP\fB[\fP\fBrk\fP\fB]\fP \fIcharacter
+\fP\fB[\fP\fI1addr\fP\fB]\fP \fBk\fP \fIcharacter\fP
+.fi
+.RE
+.sp
+.LP
+Implementations shall support \fIcharacter\fP values of a single lowercase
+letter of the POSIX locale and the characters
+\fB'`'\fP and \fB'"\fP ; support of other characters is implementation-defined.
+.LP
+If executing the \fIvi\fP \fBm\fP command, set the specified mark
+to the current line and
+1-based numbered character referenced by the current column, if any;
+otherwise, column position 1.
+.LP
+Otherwise, set the specified mark to the specified line and 1-based
+numbered first non- <blank> non- <newline> in
+the line, if any; otherwise, the last non- <newline> in the line,
+if any; otherwise, column position 1.
+.LP
+The mark shall remain associated with the line until the mark is reset
+or the line is deleted. If a deleted line is restored by
+a subsequent \fBundo\fP command, any marks previously associated with
+the line, which have not been reset, shall be restored as
+well. Any use of a mark not associated with a current line in the
+edit buffer shall be an error.
+.LP
+The marks \fB`\fP and \fB'\fP shall be set as described previously,
+immediately before the following events occur in the
+editor:
+.IP " 1." 4
+The use of \fB'$'\fP as an \fIex\fP address
+.LP
+.IP " 2." 4
+The use of a positive decimal number as an \fIex\fP address
+.LP
+.IP " 3." 4
+The use of a search command as an \fIex\fP address
+.LP
+.IP " 4." 4
+The use of a mark reference as an \fIex\fP address
+.LP
+.IP " 5." 4
+The use of the following open and visual mode commands: <control>-],
+\fB%\fP, \fB(\fP, \fB)\fP, \fB[\fP, \fB]\fP,
+\fB{\fP, \fB}\fP
+.LP
+.IP " 6." 4
+The use of the following open and visual mode commands: \fB'\fP, \fBG\fP,
+\fBH\fP, \fBL\fP, \fBM\fP, \fBz\fP if the
+current line will change as a result of the command
+.LP
+.IP " 7." 4
+The use of the open and visual mode commands: \fB/\fP, \fB?\fP, \fBN\fP,
+\fB`\fP, \fBn\fP if the current line or column
+will change as a result of the command
+.LP
+.IP " 8." 4
+The use of the \fIex\fP mode commands: \fBz\fP, \fBundo\fP, \fBglobal\fP,
+\fBv\fP
+.LP
+.LP
+For rules 1., 2., 3., and 4., the \fB`\fP and \fB'\fP marks shall
+not be set if the \fIex\fP command is parsed as specified
+by rule 6.a. in Command Line Parsing in ex .
+.LP
+For rules 5., 6., and 7., the \fB`\fP and \fB'\fP marks shall not
+be set if the commands are used as motion commands in open
+and visual mode.
+.LP
+For rules 1., 2., 3., 4., 5., 6., 7., and 8., the \fB`\fP and \fB'\fP
+marks shall not be set if the command fails.
+.LP
+The \fB`\fP and \fB'\fP marks shall be set as described previously,
+each time the contents of the edit buffer are replaced
+(including the editing of the initial buffer), if in open or visual
+mode, or if in \fBex\fP mode and the edit buffer is not empty,
+before any commands or movements (including commands or movements
+specified by the \fB-c\fP or \fB-t\fP options or the \fB+\fP
+\fIcommand\fP argument) are executed on the edit buffer. If in open
+or visual mode, the marks shall be set as if executing the \fIvi\fP
+\fBm\fP command; otherwise, as if executing the \fIex\fP \fBmark\fP
+command.
+.LP
+When changing from \fBex\fP mode to open or visual mode, if the \fB`\fP
+and \fB'\fP marks are not already set, the \fB`\fP
+and \fB'\fP marks shall be set as described previously.
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: Unchanged.
+.SS Move
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fI2addr\fP\fB]\fP \fBm\fP\fB[\fP\fBove\fP\fB]\fP \fI1addr\fP \fB\fP\fB[\fP\fIflags\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Move the specified lines after the specified destination line. A destination
+of line zero specifies that the lines shall be
+placed at the beginning of the edit buffer. It shall be an error if
+the destination line is within the range of lines to be
+moved.
+.LP
+\fICurrent line\fP: Set to the last of the moved lines.
+.LP
+\fICurrent column\fP: Set to non- <blank>.
+.SS Next
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBn\fP\fB[\fP\fBext\fP\fB][\fP\fB!\fP\fB][\fP\fB+\fP\fIcommand\fP\fB][\fP\fIfile\fP \fB...\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+If no \fB'!'\fP is appended to the command name, and the edit buffer
+has been modified since the last complete write, it
+shall be an error, unless the file is successfully written as specified
+by the \fBautowrite\fP option.
+.LP
+If one or more files is specified:
+.IP " 1." 4
+Set the argument list to the specified filenames.
+.LP
+.IP " 2." 4
+Set the current argument list reference to be the first entry in the
+argument list.
+.LP
+.IP " 3." 4
+Set the current pathname to the first filename specified.
+.LP
+.LP
+Otherwise:
+.IP " 1." 4
+It shall be an error if there are no more filenames in the argument
+list after the filename currently referenced.
+.LP
+.IP " 2." 4
+Set the current pathname and the current argument list reference to
+the filename after the filename currently referenced in the
+argument list.
+.LP
+.LP
+Replace the contents of the edit buffer with the contents of the file
+named by the current pathname. If for any reason the
+contents of the file cannot be accessed, the edit buffer shall be
+empty.
+.LP
+This command shall be affected by the \fBautowrite\fP and \fBwriteany\fP
+edit options.
+.LP
+The \fB+\fP \fIcommand\fP option shall be <blank>-delimited; <blank>s
+can be escaped by preceding them with a
+backslash character. The \fB+\fP \fIcommand\fP shall be interpreted
+as an \fIex\fP command immediately after the contents of the
+edit buffer have been replaced and the current line and column have
+been set.
+.LP
+\fICurrent line\fP: Set as described for the \fBedit\fP command.
+.LP
+\fICurrent column\fP: Set as described for the \fBedit\fP command.
+.SS Number
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fI2addr\fP\fB]\fP \fBnu\fP\fB[\fP\fBmber\fP\fB][\fP\fIcount\fP\fB][\fP\fIflags\fP\fB]
+[\fP\fI2addr\fP\fB]\fP \fB#\fP\fB[\fP\fIcount\fP\fB][\fP\fIflags\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+These commands shall be equivalent to the \fIex\fP command:
+.sp
+.RS
+.nf
+
+\fB[\fP\fI2addr\fP\fB]\fP \fBp\fP\fB[\fP\fBrint\fP\fB][\fP\fIcount\fP\fB]\fP \fB#\fP\fB[\fP\fIflags\fP\fB]\fP
+.fi
+.RE
+.LP
+See Print .
+.SS Open
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fI1addr\fP\fB]\fP \fBo\fP\fB[\fP\fBpen\fP\fB]\fP \fB/\fP\fIpattern\fP\fB/\fP \fB[\fP\fIflags\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+This command need not be supported on block-mode terminals or terminals
+with insufficient capabilities. If standard input,
+standard output, or standard error are not terminal devices, the results
+are unspecified.
+.LP
+Enter open mode.
+.LP
+The trailing delimiter can be omitted from \fIpattern\fP at the end
+of the command line. If \fIpattern\fP is empty (for
+example, \fB"//"\fP ) or not specified, the last regular expression
+used in the editor shall be used as the pattern. The pattern
+can be delimited by slashes (shown in the Synopsis), as well as any
+alphanumeric, or non- <blank> other than backslash,
+vertical line, double quote, or <newline>.
+.LP
+\fICurrent line\fP: Set to the specified line.
+.LP
+\fICurrent column\fP: Set to non- <blank>.
+.SS Preserve
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBpre\fP\fB[\fP\fBserve\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Save the edit buffer in a form that can later be recovered by using
+the \fB-r\fP option or by using the \fIex\fP
+\fBrecover\fP command. After the file has been preserved, a mail message
+shall be sent to the user. This message shall be readable
+by invoking the \fImailx\fP utility. The message shall contain the
+name of the file, the
+time of preservation, and an \fIex\fP command that could be used to
+recover the file. Additional information may be included in
+the mail message.
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: Unchanged.
+.SS Print
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fI2addr\fP\fB]\fP \fBp\fP\fB[\fP\fBrint\fP\fB][\fP\fIcount\fP\fB][\fP\fIflags\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Write the addressed lines. The behavior is unspecified if the number
+of columns on the display is less than the number of
+columns required to write any single character in the lines being
+written.
+.LP
+Non-printable characters, except for the <tab>, shall be written as
+implementation-defined multi-character sequences.
+.LP
+If the \fB#\fP flag is specified or the \fBnumber\fP edit option is
+set, each line shall be preceded by its line number in the
+following format:
+.sp
+.RS
+.nf
+
+\fB"%6d ", <\fP\fIline number\fP\fB>
+\fP
+.fi
+.RE
+.LP
+If the \fBl\fP flag is specified or the \fBlist\fP edit option is
+set:
+.IP " 1." 4
+The characters listed in the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Table 5-1, Escape Sequences and
+Associated Actions shall be written as the corresponding escape sequence.
+.LP
+.IP " 2." 4
+Non-printable characters not in the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Table 5-1, Escape Sequences and
+Associated Actions shall be written as one three-digit octal number
+(with a preceding backslash) for each byte in the character
+(most significant byte first). If the size of a byte on the system
+is greater than 9 bits, the format used for non-printable
+characters is implementation-defined.
+.LP
+.IP " 3." 4
+The end of each line shall be marked with a \fB'$'\fP, and literal
+\fB'$'\fP characters within the line shall be written
+with a preceding backslash.
+.LP
+.LP
+Long lines shall be folded; the length at which folding occurs is
+unspecified, but should be appropriate for the output
+terminal, considering the number of columns of the terminal.
+.LP
+If a line is folded, and the \fBl\fP flag is not specified and the
+\fBlist\fP edit option is not set, it is unspecified
+whether a multi-column character at the folding position is separated;
+it shall not be discarded.
+.LP
+\fICurrent line\fP: Set to the last written line.
+.LP
+\fICurrent column\fP: Unchanged if the current line is unchanged;
+otherwise, set to non- <blank>.
+.SS Put
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fI1addr\fP\fB]\fP \fBpu\fP\fB[\fP\fBt\fP\fB][\fP\fIbuffer\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Append text from the specified buffer (by default, the unnamed buffer)
+to the specified line; line zero specifies that the text
+shall be placed at the beginning of the edit buffer. Each portion
+of a line in the buffer shall become a new line in the edit
+buffer, regardless of the mode of the buffer.
+.LP
+\fICurrent line\fP: Set to the last line entered into the edit buffer.
+.LP
+\fICurrent column\fP: Set to non- <blank>.
+.SS Quit
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBq\fP\fB[\fP\fBuit\fP\fB][\fP\fB!\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+If no \fB'!'\fP is appended to the command name:
+.IP " 1." 4
+If the edit buffer has been modified since the last complete write,
+it shall be an error.
+.LP
+.IP " 2." 4
+If there are filenames in the argument list after the filename currently
+referenced, and the last command was not a \fBquit\fP,
+\fBwq\fP, \fBxit\fP, or \fBZZ\fP (see \fIExit\fP ) command, it shall
+be an error.
+.LP
+.LP
+Otherwise, terminate the editing session.
+.SS Read
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fI1addr\fP\fB]\fP \fBr\fP\fB[\fP\fBead\fP\fB][\fP\fB!\fP\fB][\fP\fIfile\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+If \fB'!'\fP is not the first non- <blank> to follow the command name,
+a copy of the specified file shall be appended
+into the edit buffer after the specified line; line zero specifies
+that the copy shall be placed at the beginning of the edit
+buffer. The number of lines and bytes read shall be written. If no
+\fIfile\fP is named, the current pathname shall be the default.
+If there is no current pathname, then \fIfile\fP shall become the
+current pathname. If there is no current pathname or \fIfile\fP
+operand, it shall be an error. Specifying a \fIfile\fP that is not
+of type regular shall have unspecified results.
+.LP
+Otherwise, if \fIfile\fP is preceded by \fB'!'\fP, the rest of the
+line after the \fB'!'\fP shall have \fB'%'\fP,
+\fB'#'\fP, and \fB'!'\fP characters expanded as described in Command
+Line Parsing in ex .
+.LP
+The \fIex\fP utility shall then pass two arguments to the program
+named by the shell edit option; the first shall be \fB-c\fP
+and the second shall be the expanded arguments to the \fBread\fP command
+as a single argument. The standard input of the program
+shall be set to the standard input of the \fIex\fP program when it
+was invoked. The standard error and standard output of the
+program shall be appended into the edit buffer after the specified
+line.
+.LP
+Each line in the copied file or program output (as delimited by <newline>s
+or the end of the file or output if it is not
+immediately preceded by a <newline>), shall be a separate line in
+the edit buffer. Any occurrences of <carriage-return>
+and <newline> pairs in the output shall be treated as single <newline>s.
+.LP
+The special meaning of the \fB'!'\fP following the \fBread\fP command
+can be overridden by escaping it with a backslash
+character.
+.LP
+\fICurrent line\fP: If no lines are added to the edit buffer, unchanged.
+Otherwise, if in open or visual mode, set to the first
+line entered into the edit buffer. Otherwise, set to the last line
+entered into the edit buffer.
+.LP
+\fICurrent column\fP: Set to non- <blank>.
+.SS Recover
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBrec\fP\fB[\fP\fBover\fP\fB][\fP\fB!\fP\fB]\fP \fIfile\fP
+.fi
+.RE
+.sp
+.LP
+If no \fB'!'\fP is appended to the command name, and the edit buffer
+has been modified since the last complete write, it
+shall be an error.
+.LP
+If no \fIfile\fP operand is specified, then the current pathname shall
+be used. If there is no current pathname or \fIfile\fP
+operand, it shall be an error.
+.LP
+If no recovery information has previously been saved about \fIfile\fP,
+the \fBrecover\fP command shall behave identically to
+the \fBedit\fP command, and an informational message to this effect
+shall be written.
+.LP
+Otherwise, set the current pathname to \fIfile\fP, and replace the
+current contents of the edit buffer with the recovered
+contents of \fIfile\fP. If there are multiple instances of the file
+to be recovered, the one most recently saved shall be
+recovered, and an informational message that there are previous versions
+of the file that can be recovered shall be written. The
+editor shall behave as if the contents of the edit buffer have already
+been modified.
+.LP
+\fICurrent file\fP: Set as described for the \fBedit\fP command.
+.LP
+\fICurrent column\fP: Set as described for the \fBedit\fP command.
+.SS Rewind
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBrew\fP\fB[\fP\fBind\fP\fB][\fP\fB!\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+If no \fB'!'\fP is appended to the command name, and the edit buffer
+has been modified since the last complete write, it
+shall be an error, unless the file is successfully written as specified
+by the \fBautowrite\fP option.
+.LP
+If the argument list is empty, it shall be an error.
+.LP
+The current argument list reference and the current pathname shall
+be set to the first filename in the argument list.
+.LP
+Replace the contents of the edit buffer with the contents of the file
+named by the current pathname. If for any reason the
+contents of the file cannot be accessed, the edit buffer shall be
+empty.
+.LP
+This command shall be affected by the \fBautowrite\fP and \fBwriteany\fP
+edit options.
+.LP
+\fICurrent line\fP: Set as described for the \fBedit\fP command.
+.LP
+\fICurrent column\fP: Set as described for the \fBedit\fP command.
+.SS Set
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBse\fP\fB[\fP\fBt\fP\fB][\fP\fIoption\fP\fB[\fP\fB=\fP\fB[\fP\fIvalue\fP\fB]]\fP \fB...\fP\fB][\fP\fBno\fP\fIoption\fP \fB...\fP\fB][\fP\fIoption\fP\fB? ...\fP\fB][\fP\fBall\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+When no arguments are specified, write the value of the \fBterm\fP
+edit option and those options whose values have been changed
+from the default settings; when the argument \fIall\fP is specified,
+write all of the option values.
+.LP
+Giving an option name followed by the character \fB'?'\fP shall cause
+the current value of that option to be written. The
+\fB'?'\fP can be separated from the option name by zero or more <blank>s.
+The \fB'?'\fP shall be necessary only for
+Boolean valued options. Boolean options can be given values by the
+form \fBset\fP \fIoption\fP to turn them on or \fBset\fP
+\fBno\fP \fIoption\fP to turn them off; string and numeric options
+can be assigned by the form \fBset\fP \fIoption\fP=
+\fIvalue\fP. Any <blank>s in strings can be included as is by preceding
+each <blank> with an escaping backslash. More
+than one option can be set or listed by a single set command by specifying
+multiple arguments, each separated from the next by one
+or more <blank>s.
+.LP
+See Edit Options in ex for details about specific options.
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: Unchanged.
+.SS Shell
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBsh\fP\fB[\fP\fBell\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Invoke the program named in the \fBshell\fP edit option with the single
+argument \fB-i\fP (interactive mode). Editing shall be
+resumed when the program exits.
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: Unchanged.
+.SS Source
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBso\fP\fB[\fP\fBurce\fP\fB]\fP \fIfile\fP
+.fi
+.RE
+.sp
+.LP
+Read and execute \fIex\fP commands from \fIfile\fP. Lines in the file
+that are blank lines shall be ignored.
+.LP
+\fICurrent line\fP: As specified for the individual \fIex\fP commands.
+.LP
+\fICurrent column\fP: As specified for the individual \fIex\fP commands.
+.SS Substitute
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fI2addr\fP\fB]\fP \fBs\fP\fB[\fP\fBubstitute\fP\fB][\fP\fB/\fP\fIpattern\fP\fB/\fP\fIrepl\fP\fB/\fP\fB[\fP\fIoptions\fP\fB][\fP\fIcount\fP\fB][\fP\fIflags\fP\fB]]\fP\fB
+.br
+
+\fP\fB[\fP\fI2addr\fP\fB]\fP \fB&\fP\fB[\fP\fIoptions\fP\fB][\fP\fIcount\fP\fB][\fP\fIflags\fP\fB]]\fP\fB
+.br
+
+\fP\fB[\fP\fI2addr\fP\fB]\fP \fB~\fP\fB[\fP\fIoptions\fP\fB][\fP\fIcount\fP\fB][\fP\fIflags\fP\fB]]\fP
+.fi
+.RE
+.sp
+.LP
+Replace the first instance of the pattern \fIpattern\fP by the string
+\fIrepl\fP on each specified line. (See Regular Expressions in ex
+and Replacement Strings in ex .) Any
+non-alphabetic, non- <blank> delimiter other than \fB'\\'\fP, \fB'|'\fP,
+double quote, or <newline> can be used
+instead of \fB'/'\fP . Backslash characters can be used to escape
+delimiters, backslash characters, and other special
+characters.
+.LP
+The trailing delimiter can be omitted from \fIpattern\fP or from \fIrepl\fP
+at the end of the command line. If both
+\fIpattern\fP and \fIrepl\fP are not specified or are empty (for example,
+\fB"//"\fP ), the last \fBs\fP command shall be
+repeated. If only \fIpattern\fP is not specified or is empty, the
+last regular expression used in the editor shall be used as the
+pattern. If only \fIrepl\fP is not specified or is empty, the pattern
+shall be replaced by nothing. If the entire replacement
+pattern is \fB'%'\fP, the last replacement pattern to an \fBs\fP
+command shall be used.
+.LP
+Entering a <carriage-return> in \fIrepl\fP (which requires an escaping
+backslash in \fIex\fP mode and an escaping
+<control>-V in open or \fIvi\fP mode) shall split the line at that
+point, creating a new
+line in the edit buffer. The <carriage-return> shall be discarded.
+.LP
+If \fIoptions\fP includes the letter \fB'g'\fP ( \fBglobal\fP), all
+non-overlapping instances of the pattern in the line
+shall be replaced.
+.LP
+If \fIoptions\fP includes the letter \fB'c'\fP ( \fBconfirm\fP), then
+before each substitution the line shall be written;
+the written line shall reflect all previous substitutions. On the
+following line, <space>s shall be written beneath the
+characters from the line that are before the \fIpattern\fP to be replaced,
+and \fB'^'\fP characters written beneath the
+characters included in the \fIpattern\fP to be replaced. The \fIex\fP
+utility shall then wait for a response from the user. An
+affirmative response shall cause the substitution to be done, while
+any other input shall not make the substitution. An affirmative
+response shall consist of a line with the affirmative response (as
+defined by the current locale) at the beginning of the line.
+This line shall be subject to editing in the same way as the \fIex\fP
+command line.
+.LP
+If interrupted (see the ASYNCHRONOUS EVENTS section), any modifications
+confirmed by the user shall be preserved in the edit
+buffer after the interrupt.
+.LP
+If the remembered search direction is not set, the \fBs\fP command
+shall set it to forward.
+.LP
+In the second Synopsis, the \fB&\fP command shall repeat the previous
+substitution, as if the \fB&\fP command were
+replaced by:
+.sp
+.RS
+.nf
+
+\fBs/\fP\fIpattern\fP\fB/\fP\fIrepl\fP\fB/
+\fP
+.fi
+.RE
+.LP
+where \fIpattern\fP and \fIrepl\fP are as specified in the previous
+\fBs\fP, \fB&\fP, or \fB~\fP command.
+.LP
+In the third Synopsis, the \fB~\fP command shall repeat the previous
+substitution, as if the \fB'~'\fP were
+replaced by:
+.sp
+.RS
+.nf
+
+\fBs/\fP\fIpattern\fP\fB/\fP\fIrepl\fP\fB/
+\fP
+.fi
+.RE
+.LP
+where \fIpattern\fP shall be the last regular expression specified
+to the editor, and \fIrepl\fP shall be from the previous
+substitution (including \fB&\fP and \fB~\fP) command.
+.LP
+These commands shall be affected by the \fILC_MESSAGES\fP environment
+variable.
+.LP
+\fICurrent line\fP: Set to the last line in which a substitution occurred,
+or, unchanged if no substitution occurred.
+.LP
+\fICurrent column\fP: Set to non- <blank>.
+.SS Suspend
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBsu\fP\fB[\fP\fBspend\fP\fB][\fP\fB!\fP\fB]\fP\fBst\fP\fB[\fP\fBop\fP\fB][\fP\fB!\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Allow control to return to the invoking process; \fIex\fP shall suspend
+itself as if it had received the SIGTSTP signal. The
+suspension shall occur only if job control is enabled in the invoking
+shell (see the description of \fIset\fP \fB-m\fP).
+.LP
+These commands shall be affected by the \fBautowrite\fP and \fBwriteany\fP
+edit options.
+.LP
+The current \fBsusp\fP character (see \fIstty\fP ) shall be equivalent
+to the \fBsuspend\fP
+command.
+.SS Tag
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBta\fP\fB[\fP\fBg\fP\fB][\fP\fB!\fP\fB]\fP \fItagstring\fP
+.fi
+.RE
+.sp
+.LP
+The results are unspecified if the format of a tags file is not as
+specified by the \fIctags\fP utility (see \fIctags\fP ) description.
+.LP
+The \fBtag\fP command shall search for \fItagstring\fP in the tag
+files referred to by the \fBtag\fP edit option, in the
+order they are specified, until a reference to \fItagstring\fP is
+found. Files shall be searched from beginning to end. If no
+reference is found, it shall be an error and an error message to this
+effect shall be written. If the reference is not found, or if
+an error occurs while processing a file referred to in the \fBtag\fP
+edit option, it shall be an error, and an error message shall
+be written at the first occurrence of such an error.
+.LP
+Otherwise, if the tags file contained a pattern, the pattern shall
+be treated as a regular expression used in the editor; for
+example, for the purposes of the \fBs\fP command.
+.LP
+If the \fItagstring\fP is in a file with a different name than the
+current pathname, set the current pathname to the name of
+that file, and replace the contents of the edit buffer with the contents
+of that file. In this case, if no \fB'!'\fP is appended
+to the command name, and the edit buffer has been modified since the
+last complete write, it shall be an error, unless the file is
+successfully written as specified by the \fBautowrite\fP option.
+.LP
+This command shall be affected by the \fBautowrite\fP, \fBtag\fP,
+\fBtaglength\fP, and \fBwriteany\fP edit options.
+.LP
+\fICurrent line\fP: If the tags file contained a line number, set
+to that line number. If the line number is larger than the
+last line in the edit buffer, an error message shall be written and
+the current line shall be set as specified for the \fBedit\fP
+command.
+.LP
+If the tags file contained a pattern, set to the first occurrence
+of the pattern in the file. If no matching pattern is found,
+an error message shall be written and the current line shall be set
+as specified for the \fBedit\fP command.
+.LP
+\fICurrent column\fP: If the tags file contained a line-number reference
+and that line-number was not larger than the last line
+in the edit buffer, or if the tags file contained a pattern and that
+pattern was found, set to non- <blank>. Otherwise, set
+as specified for the \fBedit\fP command.
+.SS Unabbreviate
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBuna\fP\fB[\fP\fBbbrev\fP\fB]\fP \fIlhs\fP
+.fi
+.RE
+.sp
+.LP
+If \fIlhs\fP is not an entry in the current list of abbreviations
+(see Abbreviate ), it shall be
+an error. Otherwise, delete \fIlhs\fP from the list of abbreviations.
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: Unchanged.
+.SS Undo
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBu\fP\fB[\fP\fBndo\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Reverse the changes made by the last command that modified the contents
+of the edit buffer, including \fBundo\fP. For this
+purpose, the \fBglobal\fP, \fBv\fP, \fBopen\fP, and \fBvisual\fP commands,
+and commands resulting from buffer executions and
+mapped character expansions, are considered single commands.
+.LP
+If no action that can be undone preceded the \fBundo\fP command, it
+shall be an error.
+.LP
+If the \fBundo\fP command restores lines that were marked, the mark
+shall also be restored unless it was reset subsequent to
+the deletion of the lines.
+.LP
+\fICurrent line\fP:
+.IP " 1." 4
+If lines are added or changed in the file, set to the first line added
+or changed.
+.LP
+.IP " 2." 4
+Set to the line before the first line deleted, if it exists.
+.LP
+.IP " 3." 4
+Set to 1 if the edit buffer is not empty.
+.LP
+.IP " 4." 4
+Set to zero.
+.LP
+.LP
+\fICurrent column\fP: Set to non- <blank>.
+.SS Unmap
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBunm\fP\fB[\fP\fBap\fP\fB][\fP\fB!\fP\fB]\fP \fIlhs\fP
+.fi
+.RE
+.sp
+.LP
+If \fB'!'\fP is appended to the command name, and if \fIlhs\fP is
+not an entry in the list of text input mode map
+definitions, it shall be an error. Otherwise, delete \fIlhs\fP from
+the list of text input mode map definitions.
+.LP
+If no \fB'!'\fP is appended to the command name, and if \fIlhs\fP
+is not an entry in the list of command mode map
+definitions, it shall be an error. Otherwise, delete \fIlhs\fP from
+the list of command mode map definitions.
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: Unchanged.
+.SS Version
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBve\fP\fB[\fP\fBrsion\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Write a message containing version information for the editor. The
+format of the message is unspecified.
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: Unchanged.
+.SS Visual
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fI1addr\fP\fB]\fP \fBvi\fP\fB[\fP\fBsual\fP\fB][\fP\fItype\fP\fB][\fP\fIcount\fP\fB][\fP\fIflags\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+If \fIex\fP is currently in open or visual mode, the Synopsis and
+behavior of the visual command shall be the same as the
+\fBedit\fP command, as specified by Edit .
+.LP
+Otherwise, this command need not be supported on block-mode terminals
+or terminals with insufficient capabilities. If standard
+input, standard output, or standard error are not terminal devices,
+the results are unspecified.
+.LP
+If \fIcount\fP is specified, the value of the \fBwindow\fP edit option
+shall be set to \fIcount\fP (as described in window ). If the \fB'^'\fP
+type character was also specified, the \fBwindow\fP edit option shall
+be set
+before being used by the type character.
+.LP
+Enter visual mode. If \fItype\fP is not specified, it shall be as
+if a \fItype\fP of \fB'+'\fP was specified. The
+\fItype\fP shall cause the following effects:
+.TP 7
+\fB+\fP
+Place the beginning of the specified line at the top of the display.
+.TP 7
+\fB-\fP
+Place the end of the specified line at the bottom of the display.
+.TP 7
+\fB\&.\fP
+Place the beginning of the specified line in the middle of the display.
+.TP 7
+\fB^\fP
+If the specified line is less than or equal to the value of the \fBwindow\fP
+edit option, set the line to 1; otherwise,
+decrement the line by the value of the \fBwindow\fP edit option minus
+1. Place the beginning of this line as close to the bottom
+of the displayed lines as possible, while still displaying the value
+of the \fBwindow\fP edit option number of lines.
+.sp
+.LP
+\fICurrent line\fP: Set to the specified line.
+.LP
+\fICurrent column\fP: Set to non- <blank>.
+.SS Write
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fI2addr\fP\fB]\fP \fBw\fP\fB[\fP\fBrite\fP\fB][\fP\fB!\fP\fB][\fP\fB>>\fP\fB][\fP\fIfile\fP\fB]
+[\fP\fI2addr\fP\fB]\fP \fBw\fP\fB[\fP\fBrite\fP\fB][\fP\fB!\fP\fB][\fP\fIfile\fP\fB]
+[\fP\fI2addr\fP\fB]\fP \fBwq\fP\fB[\fP\fB!\fP\fB][\fP\fB>>\fP\fB][\fP\fIfile\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+If no lines are specified, the lines shall default to the entire file.
+.LP
+The command \fBwq\fP shall be equivalent to a \fBwrite\fP command
+followed by a \fBquit\fP command; \fBwq!\fP shall be
+equivalent to \fBwrite!\fP followed by \fBquit\fP. In both cases,
+if the \fBwrite\fP command fails, the \fBquit\fP shall not be
+attempted.
+.LP
+If the command name is not followed by one or more <blank>s, or \fIfile\fP
+is not preceded by a \fB'!'\fP character,
+the \fBwrite\fP shall be to a file.
+.IP " 1." 4
+If the \fB>>\fP argument is specified, and the file already exists,
+the lines shall be appended to the file instead of
+replacing its contents. If the \fB>>\fP argument is specified, and
+the file does not already exist, it is unspecified
+whether the write shall proceed as if the \fB>>\fP argument had not
+been specified or if the write shall fail.
+.LP
+.IP " 2." 4
+If the \fBreadonly\fP edit option is set (see readonly ), the \fBwrite\fP
+shall fail.
+.LP
+.IP " 3." 4
+If \fIfile\fP is specified, and is not the current pathname, and the
+file exists, the \fBwrite\fP shall fail.
+.LP
+.IP " 4." 4
+If \fIfile\fP is not specified, the current pathname shall be used.
+If there is no current pathname, the \fBwrite\fP command
+shall fail.
+.LP
+.IP " 5." 4
+If the current pathname is used, and the current pathname has been
+changed by the \fBfile\fP or \fBread\fP commands, and the
+file exists, the \fBwrite\fP shall fail. If the \fBwrite\fP is successful,
+subsequent \fBwrite\fPs shall not fail for this
+reason (unless the current pathname is changed again).
+.LP
+.IP " 6." 4
+If the whole edit buffer is not being written, and the file to be
+written exists, the \fBwrite\fP shall fail.
+.LP
+.LP
+For rules 1., 2., 4., and 5., the \fBwrite\fP can be forced by appending
+the character \fB'!'\fP to the command name.
+.LP
+For rules 2., 4., and 5., the \fBwrite\fP can be forced by setting
+the \fBwriteany\fP edit option.
+.LP
+Additional, implementation-defined tests may cause the \fBwrite\fP
+to fail.
+.LP
+If the edit buffer is empty, a file without any contents shall be
+written.
+.LP
+An informational message shall be written noting the number of lines
+and bytes written.
+.LP
+Otherwise, if the command is followed by one or more <blank>s, and
+the file is preceded by \fB'!'\fP, the rest of the
+line after the \fB'!'\fP shall have \fB'%'\fP, \fB'#'\fP, and \fB'!'\fP
+characters expanded as described in Command Line Parsing in ex .
+.LP
+The \fIex\fP utility shall then pass two arguments to the program
+named by the \fBshell\fP edit option; the first shall be
+\fB-c\fP and the second shall be the expanded arguments to the \fBwrite\fP
+command as a single argument. The specified lines
+shall be written to the standard input of the command. The standard
+error and standard output of the program, if any, shall be
+written as described for the \fBprint\fP command. If the last character
+in that output is not a <newline>, a <newline>
+shall be written at the end of the output.
+.LP
+The special meaning of the \fB'!'\fP following the \fBwrite\fP command
+can be overridden by escaping it with a backslash
+character.
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: Unchanged.
+.SS Write and Exit
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fI2addr\fP\fB]\fP \fBx\fP\fB[\fP\fBit\fP\fB][\fP\fB!\fP\fB][\fP\fIfile\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+If the edit buffer has not been modified since the last complete \fBwrite\fP,
+\fBxit\fP shall be equivalent to the \fBquit\fP
+command, or if a \fB'!'\fP is appended to the command name, to \fBquit!\fP.
+.LP
+Otherwise, \fBxit\fP shall be equivalent to the \fBwq\fP command,
+or if a \fB'!'\fP is appended to the command name, to
+\fBwq!\fP.
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: Unchanged.
+.SS Yank
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fI2addr\fP\fB]\fP \fBya\fP\fB[\fP\fBnk\fP\fB][\fP\fIbuffer\fP\fB][\fP\fIcount\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Copy the specified lines to the specified buffer (by default, the
+unnamed buffer), which shall become a line-mode buffer.
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: Unchanged.
+.SS Adjust Window
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fI1addr\fP\fB]\fP \fBz\fP\fB[\fP\fB!\fP\fB][\fP\fItype\fP \fB...\fP\fB][\fP\fIcount\fP\fB][\fP\fIflags\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+If no line is specified, the current line shall be the default; if
+\fItype\fP is omitted as well, the current line value shall
+first be incremented by 1. If incrementing the current line would
+cause it to be greater than the last line in the edit buffer, it
+shall be an error.
+.LP
+If there are <blank>s between the \fItype\fP argument and the preceding
+\fBz\fP command name or optional \fB'!'\fP
+character, it shall be an error.
+.LP
+If \fIcount\fP is specified, the value of the \fBwindow\fP edit option
+shall be set to \fIcount\fP (as described in window ). If \fIcount\fP
+is omitted, it shall default to 2 times the value of the \fBscroll\fP
+edit
+option, or if \fB!\fP was specified, the number of lines in the display
+minus 1.
+.LP
+If \fItype\fP is omitted, then \fIcount\fP lines starting with the
+specified line shall be written. Otherwise, \fIcount\fP
+lines starting with the line specified by the \fItype\fP argument
+shall be written.
+.LP
+The \fItype\fP argument shall change the lines to be written. The
+possible values of \fItype\fP are as follows:
+.TP 7
+\fB-\fP
+The specified line shall be decremented by the following value:
+.sp
+.RS
+.nf
+
+\fB(((number of "-" characters) x\fP \fIcount\fP\fB) -1)
+\fP
+.fi
+.RE
+.LP
+If the calculation would result in a number less than 1, it shall
+be an error. Write lines from the edit buffer, starting at the
+new value of line, until \fIcount\fP lines or the last line in the
+edit buffer has been written.
+.TP 7
+\fB+\fP
+The specified line shall be incremented by the following value:
+.sp
+.RS
+.nf
+
+\fB(((number of "+" characters) -1) x\fP \fIcount\fP\fB) +1
+\fP
+.fi
+.RE
+.LP
+If the calculation would result in a number greater than the last
+line in the edit buffer, it shall be an error. Write lines
+from the edit buffer, starting at the new value of line, until \fIcount\fP
+lines or the last line in the edit buffer has been
+written.
+.TP 7
+\fB=\fP,\fB.\fP
+If more than a single \fB'.'\fP or \fB'='\fP is specified, it shall
+be an error. The following steps shall be taken:
+.RS
+.IP " 1." 4
+If \fIcount\fP is zero, nothing shall be written.
+.LP
+.IP " 2." 4
+Write as many of the \fIN\fP lines before the current line in the
+edit buffer as exist. If \fIcount\fP or \fB'!'\fP was
+specified, \fIN\fP shall be:
+.sp
+.RS
+.nf
+
+\fB(\fP\fIcount\fP \fB-1) /2
+\fP
+.fi
+.RE
+.LP
+Otherwise, \fIN\fP shall be:
+.sp
+.RS
+.nf
+
+\fB(\fP\fIcount\fP \fB-3) /2
+\fP
+.fi
+.RE
+.LP
+If \fIN\fP is a number less than 3, no lines shall be written.
+.LP
+.IP " 3." 4
+If \fB'='\fP was specified as the type character, write a line consisting
+of the smaller of the number of columns in the
+display divided by two, or 40 \fB'-'\fP characters.
+.LP
+.IP " 4." 4
+Write the current line.
+.LP
+.IP " 5." 4
+Repeat step 3.
+.LP
+.IP " 6." 4
+Write as many of the \fIN\fP lines after the current line in the edit
+buffer as exist. \fIN\fP shall be defined as in step 2.
+If \fIN\fP is a number less than 3, no lines shall be written. If
+\fIcount\fP is less than 3, no lines shall be written.
+.LP
+.RE
+.TP 7
+\fB^\fP
+The specified line shall be decremented by the following value:
+.sp
+.RS
+.nf
+
+\fB(((number of "^" characters) +1) x\fP \fIcount\fP\fB) -1
+\fP
+.fi
+.RE
+.LP
+If the calculation would result in a number less than 1, it shall
+be an error. Write lines from the edit buffer, starting at the
+new value of line, until \fIcount\fP lines or the last line in the
+edit buffer has been written.
+.sp
+.LP
+\fICurrent line\fP: Set to the last line written, unless the type
+is \fB=\fP, in which case, set to the specified line.
+.LP
+\fICurrent column\fP: Set to non- <blank>.
+.SS Escape
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB!\fP \fIcommand
+\fP\fB[\fP\fIaddr\fP\fB]\fP\fB!\fP \fIcommand\fP
+.fi
+.RE
+.sp
+.LP
+The contents of the line after the \fB'!'\fP shall have \fB'%'\fP,
+\fB'#'\fP, and \fB'!'\fP characters expanded as
+described in Command Line Parsing in ex . If the expansion causes
+the text of the line to change, it
+shall be redisplayed, preceded by a single \fB'!'\fP character.
+.LP
+The \fIex\fP utility shall execute the program named by the \fBshell\fP
+edit option. It shall pass two arguments to the
+program; the first shall be \fB-c\fP, and the second shall be the
+expanded arguments to the \fB!\fP command as a single
+argument.
+.LP
+If no lines are specified, the standard input, standard output, and
+standard error of the program shall be set to the standard
+input, standard output, and standard error of the \fIex\fP program
+when it was invoked. In addition, a warning message shall be
+written if the edit buffer has been modified since the last complete
+write, and the \fBwarn\fP edit option is set.
+.LP
+If lines are specified, they shall be passed to the program as standard
+input, and the standard output and standard error of the
+program shall replace those lines in the edit buffer. Each line in
+the program output (as delimited by <newline>s or the end
+of the output if it is not immediately preceded by a <newline>), shall
+be a separate line in the edit buffer. Any occurrences
+of <carriage-return> and <newline> pairs in the output shall be treated
+as single <newline>s. The specified lines
+shall be copied into the unnamed buffer before they are replaced,
+and the unnamed buffer shall become a line-mode buffer.
+.LP
+If in \fIex\fP mode, a single \fB'!'\fP character shall be written
+when the program completes.
+.LP
+This command shall be affected by the \fBshell\fP and \fBwarn\fP edit
+options. If no lines are specified, this command shall
+be affected by the \fBautowrite\fP and \fBwriteany\fP edit options.
+If lines are specified, this command shall be affected by the
+\fBautoprint\fP edit option.
+.LP
+\fICurrent line\fP:
+.IP " 1." 4
+If no lines are specified, unchanged.
+.LP
+.IP " 2." 4
+Otherwise, set to the last line read in, if any lines are read in.
+.LP
+.IP " 3." 4
+Otherwise, set to the line before the first line of the lines specified,
+if that line exists.
+.LP
+.IP " 4." 4
+Otherwise, set to the first line of the edit buffer if the edit buffer
+is not empty.
+.LP
+.IP " 5." 4
+Otherwise, set to zero.
+.LP
+.LP
+\fICurrent column\fP: If no lines are specified, unchanged. Otherwise,
+set to non- <blank>.
+.SS Shift Left
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fI2addr\fP\fB]\fP \fB<\fP\fB[\fP\fB< ...\fP\fB][\fP\fIcount\fP\fB][\fP\fIflags\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Shift the specified lines to the start of the line; the number of
+column positions to be shifted shall be the number of command
+characters times the value of the \fBshiftwidth\fP edit option. Only
+leading <blank>s shall be deleted or changed into other
+<blank>s in shifting; other characters shall not be affected.
+.LP
+Lines to be shifted shall be copied into the unnamed buffer, which
+shall become a line-mode buffer.
+.LP
+This command shall be affected by the \fBautoprint\fP edit option.
+.LP
+\fICurrent line\fP: Set to the last line in the lines specified.
+.LP
+\fICurrent column\fP: Set to non- <blank>.
+.SS Shift Right
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fI2addr\fP\fB]\fP \fB>\fP\fB[\fP\fB> ...\fP\fB][\fP\fIcount\fP\fB][\fP\fIflags\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Shift the specified lines away from the start of the line; the number
+of column positions to be shifted shall be the number of
+command characters times the value of the \fBshiftwidth\fP edit option.
+The shift shall be accomplished by adding <blank>s
+as a prefix to the line or changing leading <blank>s into other <blank>s.
+Empty lines shall not be changed.
+.LP
+Lines to be shifted shall be copied into the unnamed buffer, which
+shall become a line-mode buffer.
+.LP
+This command shall be affected by the \fBautoprint\fP edit option.
+.LP
+\fICurrent line\fP: Set to the last line in the lines specified.
+.LP
+\fICurrent column\fP: Set to non- <blank>.
+.SS <control>-D
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB<control>-D
+\fP
+.fi
+.RE
+.sp
+.LP
+Write the next \fIn\fP lines, where \fIn\fP is the minimum of the
+values of the \fBscroll\fP edit option and the number of
+lines after the current line in the edit buffer. If the current line
+is the last line of the edit buffer it shall be an error.
+.LP
+\fICurrent line\fP: Set to the last line written.
+.LP
+\fICurrent column\fP: Set to non- <blank>.
+.SS Write Line Number
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fI1addr\fP\fB]\fP \fB=\fP \fB[\fP\fIflags\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+If \fIline\fP is not specified, it shall default to the last line
+in the edit buffer. Write the line number of the specified
+line.
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: Unchanged.
+.SS Execute
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fI2addr\fP\fB]\fP \fB@\fP \fIbuffer\fP\fB[\fP\fI2addr\fP\fB]\fP \fB*\fP \fIbuffer\fP
+.fi
+.RE
+.sp
+.LP
+If no buffer is specified or is specified as \fB'@'\fP or \fB'*'\fP,
+the last buffer executed shall be used. If no
+previous buffer has been executed, it shall be an error.
+.LP
+For each line specified by the addresses, set the current line ( \fB'.'\fP
+) to the specified line, and execute the contents
+of the named \fIbuffer\fP (as they were at the time the \fB@\fP command
+was executed) as \fIex\fP commands. For each line of a
+line-mode buffer, and all but the last line of a character-mode buffer,
+the \fIex\fP command parser shall behave as if the line
+was terminated by a <newline>.
+.LP
+If an error occurs during this process, or a line specified by the
+addresses does not exist when the current line would be set
+to it, or more than a single line was specified by the addresses,
+and the contents of the edit buffer are replaced (for example, by
+the \fIex\fP \fB:edit\fP command) an error message shall be written,
+and no more commands resulting from the execution of this
+command shall be processed.
+.LP
+\fICurrent line\fP: As specified for the individual \fIex\fP commands.
+.LP
+\fICurrent column\fP: As specified for the individual \fIex\fP commands.
+.SS Regular Expressions in ex
+.LP
+The \fIex\fP utility shall support regular expressions that are a
+superset of the basic regular expressions described in the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, Section 9.3, Basic
+Regular Expressions. A null regular expression ( \fB"//"\fP ) shall
+be equivalent to the last regular expression
+encountered.
+.LP
+Regular expressions can be used in addresses to specify lines and,
+in some commands (for example, the \fBsubstitute\fP
+command), to specify portions of a line to be substituted.
+.LP
+The following constructs can be used to enhance the basic regular
+expressions:
+.TP 7
+\fB\\<\fP
+Match the beginning of a \fIword\fP. (See the definition of \fIword\fP
+at the beginning of Command
+Descriptions in ex .)
+.TP 7
+\fB\\>\fP
+Match the end of a \fIword\fP.
+.TP 7
+\fB~\fP
+Match the replacement part of the last \fBsubstitute\fP command. The
+tilde ( \fB'~'\fP ) character can be escaped in a
+regular expression to become a normal character with no special meaning.
+The backslash shall be discarded.
+.sp
+.LP
+When the editor option \fBmagic\fP is not set, the only characters
+with special meanings shall be \fB'^'\fP at the beginning
+of a pattern, \fB'$'\fP at the end of a pattern, and \fB'\\'\fP .
+The characters \fB'.'\fP, \fB'*'\fP, \fB'['\fP,
+and \fB'~'\fP shall be treated as ordinary characters unless preceded
+by a \fB'\\'\fP ; when preceded by a \fB'\\'\fP
+they shall regain their special meaning, or in the case of backslash,
+be handled as a single backslash. Backslashes used to escape
+other characters shall be discarded.
+.SS Replacement Strings in ex
+.LP
+The character \fB'&'\fP ( \fB'\\&'\fP if the editor option \fBmagic\fP
+is not set) in the replacement string shall
+stand for the text matched by the pattern to be replaced. The character
+\fB'~'\fP ( \fB'\\~'\fP if \fBmagic\fP is
+not set) shall be replaced by the replacement part of the previous
+\fBsubstitute\fP command. The sequence \fB'\\n'\fP, where
+\fIn\fP is an integer, shall be replaced by the text matched by the
+pattern enclosed in the \fIn\fPth set of parentheses
+\fB'\\('\fP and \fB'\\)'\fP .
+.LP
+The strings \fB'\\l'\fP, \fB'\\u'\fP, \fB'\\L'\fP, and \fB'\\U'\fP
+can be used to modify the case of elements in the
+replacement string (using the \fB'\\&'\fP or \fB"\\"\fP digit) notation.
+The string \fB'\\l'\fP ( \fB'\\u'\fP ) shall
+cause the character that follows to be converted to lowercase (uppercase).
+The string \fB'\\L'\fP ( \fB'\\U'\fP ) shall cause
+all characters subsequent to it to be converted to lowercase (uppercase)
+as they are inserted by the substitution until the string
+\fB'\\e'\fP or \fB'\\E'\fP, or the end of the replacement string,
+is encountered.
+.LP
+Otherwise, any character following a backslash shall be treated as
+that literal character, and the escaping backslash shall be
+discarded.
+.LP
+An example of case conversion with the \fBs\fP command is as follows:
+.sp
+.RS
+.nf
+
+\fB:\fP\fBp
+\fP\fBThe cat sat on the mat.
+:\fP\fBs/\\<.at\\>/\\u&/gp
+\fP\fBThe Cat Sat on the Mat.
+:\fP\fBs/S\\(.*\\)M/S\\U\\1\\eM/p
+\fP\fBThe Cat SAT ON THE Mat.\fP
+.fi
+.RE
+.SS Edit Options in ex
+.LP
+The \fIex\fP utility has a number of options that modify its behavior.
+These options have default settings, which can be
+changed using the \fBset\fP command.
+.LP
+Options are Boolean unless otherwise specified.
+.SS autoindent, ai
+.LP
+[Default \fIunset\fP]
+.LP
+If \fBautoindent\fP is set, each line in input mode shall be indented
+(using first as many <tab>s as possible, as
+determined by the editor option \fBtabstop\fP, and then using <space>s)
+to align with another line, as follows:
+.IP " 1." 4
+If in open or visual mode and the text input is part of a line-oriented
+command (see the EXTENDED DESCRIPTION in \fIvi\fP ), align to the
+first column.
+.LP
+.IP " 2." 4
+Otherwise, if in open or visual mode, indentation for each line shall
+be set as follows:
+.RS
+.IP " a." 4
+If a line was previously inserted as part of this command, it shall
+be set to the indentation of the last inserted line by
+default, or as otherwise specified for the <control>-D character in
+\fIInput Mode Commands
+in vi\fP .
+.LP
+.IP " b." 4
+Otherwise, it shall be set to the indentation of the previous current
+line, if any; otherwise, to the first column.
+.LP
+.RE
+.LP
+.IP " 3." 4
+For the \fIex\fP \fBa\fP, \fBi\fP, and \fBc\fP commands, indentation
+for each line shall be set as follows:
+.RS
+.IP " a." 4
+If a line was previously inserted as part of this command, it shall
+be set to the indentation of the last inserted line by
+default, or as otherwise specified for the \fIeof\fP character in
+Scroll .
+.LP
+.IP " b." 4
+Otherwise, if the command is the \fIex\fP \fBa\fP command, it shall
+be set to the line appended after, if any; otherwise to
+the first column.
+.LP
+.IP " c." 4
+Otherwise, if the command is the \fIex\fP \fBi\fP command, it shall
+be set to the line inserted before, if any; otherwise to
+the first column.
+.LP
+.IP " d." 4
+Otherwise, if the command is the \fIex\fP \fBc\fP command, it shall
+be set to the indentation of the line replaced.
+.LP
+.RE
+.LP
+.SS autoprint, ap
+.LP
+[Default \fIset\fP]
+.LP
+If \fBautoprint\fP is set, the current line shall be written after
+each \fIex\fP command that modifies the contents of the
+current edit buffer, and after each \fBtag\fP command for which the
+tag search pattern was found or tag line number was valid,
+unless:
+.IP " 1." 4
+The command was executed while in open or visual mode.
+.LP
+.IP " 2." 4
+The command was executed as part of a \fBglobal\fP or \fBv\fP command
+or \fB@\fP buffer execution.
+.LP
+.IP " 3." 4
+The command was the form of the \fBread\fP command that reads a file
+into the edit buffer.
+.LP
+.IP " 4." 4
+The command was the \fBappend\fP, \fBchange\fP, or \fBinsert\fP command.
+.LP
+.IP " 5." 4
+The command was not terminated by a <newline>.
+.LP
+.IP " 6." 4
+The current line shall be written by a flag specified to the command;
+for example, \fBdelete #\fP shall write the current line
+as specified for the flag modifier to the \fBdelete\fP command, and
+not as specified by the \fBautoprint\fP edit option.
+.LP
+.SS autowrite, aw
+.LP
+[Default \fIunset\fP]
+.LP
+If \fBautowrite\fP is set, and the edit buffer has been modified since
+it was last completely written to any file, the contents
+of the edit buffer shall be written as if the \fIex\fP \fBwrite\fP
+command had been specified without arguments, before each
+command affected by the \fBautowrite\fP edit option is executed. Appending
+the character \fB'!'\fP to the command name of any
+of the \fIex\fP commands except \fB'!'\fP shall prevent the write.
+If the write fails, it shall be an error and the command
+shall not be executed.
+.SS beautify, bf
+.LP
+[Default \fIunset\fP]
+.LP
+If \fBbeautify\fP is set, all non-printable characters, other than
+<tab>s, <newline>s, and <form-feed>s,
+shall be discarded from text read in from files.
+.SS directory, dir
+.LP
+[Default \fIimplementation-defined\fP]
+.LP
+The value of this option specifies the directory in which the editor
+buffer is to be placed. If this directory is not writable
+by the user, the editor shall quit.
+.SS edcompatible, ed
+.LP
+[Default \fIunset\fP]
+.LP
+Causes the presence of \fBg\fP and \fBc\fP suffixes on substitute
+commands to be remembered, and toggled by repeating the
+suffixes.
+.SS errorbells, eb
+.LP
+[Default \fIunset\fP]
+.LP
+If the editor is in \fIex\fP mode, and the terminal does not support
+a standout mode (such as inverse video), and
+\fBerrorbells\fP is set, error messages shall be preceded by alerting
+the terminal.
+.SS exrc
+.LP
+[Default \fIunset\fP]
+.LP
+If \fBexrc\fP is set, \fIex\fP shall access any \fB.exrc\fP file in
+the current directory, as described in Initialization in ex and vi
+\&. If \fBexrc\fP is not set, \fIex\fP shall ignore any \fB.exrc\fP
+file in the
+current directory during initialization, unless the current directory
+is that named by the \fIHOME\fP environment variable.
+.SS ignorecase, ic
+.LP
+[Default \fIunset\fP]
+.LP
+If \fBignorecase\fP is set, characters that have uppercase and lowercase
+representations shall have those representations
+considered as equivalent for purposes of regular expression comparison.
+.LP
+The \fBignorecase\fP edit option shall affect all remembered regular
+expressions; for example, unsetting the \fBignorecase\fP
+edit option shall cause a subsequent \fIvi\fP \fBn\fP command to search
+for the last basic
+regular expression in a case-sensitive fashion.
+.SS list
+.LP
+[Default \fIunset\fP]
+.LP
+If \fBlist\fP is set, edit buffer lines written while in \fIex\fP
+command mode shall be written as specified for the
+\fBprint\fP command with the \fBl\fP flag specified. In open or visual
+mode, each edit buffer line shall be displayed as
+specified for the \fIex\fP \fBprint\fP command with the \fBl\fP flag
+specified. In open or visual text input mode, when the
+cursor does not rest on any character in the line, it shall rest on
+the \fB'$'\fP marking the end of the line.
+.SS magic
+.LP
+[Default \fIset\fP]
+.LP
+If \fBmagic\fP is set, modify the interpretation of characters in
+regular expressions and substitution replacement strings (see
+Regular Expressions in ex and Replacement Strings in ex ).
+.SS mesg
+.LP
+[Default \fIset\fP]
+.LP
+If \fBmesg\fP is set, the permission for others to use the \fBwrite\fP
+or \fBtalk\fP commands to write to the terminal shall
+be turned on while in open or visual mode. The shell-level command
+\fImesg\fP \fBn\fP shall
+take precedence over any setting of the \fIex\fP \fBmesg\fP option;
+that is, if \fBmesg y\fP was issued before the editor
+started (or in a shell escape), such as:
+.sp
+.RS
+.nf
+
+\fB:!mesg y
+\fP
+.fi
+.RE
+.LP
+the \fBmesg\fP option in \fIex\fP shall suppress incoming messages,
+but the \fBmesg\fP option shall not enable incoming
+messages if \fBmesg n\fP was issued.
+.SS number, nu
+.LP
+[Default \fIunset\fP]
+.LP
+If \fBnumber\fP is set, edit buffer lines written while in \fIex\fP
+command mode shall be written with line numbers, in the
+format specified by the \fBprint\fP command with the \fB#\fP flag
+specified. In \fIex\fP text input mode, each line shall be
+preceded by the line number it will have in the file.
+.LP
+In open or visual mode, each edit buffer line shall be displayed with
+a preceding line number, in the format specified by the
+\fIex\fP \fBprint\fP command with the \fB#\fP flag specified. This
+line number shall not be considered part of the line for the
+purposes of evaluating the current column; that is, column position
+1 shall be the first column position after the format specified
+by the \fBprint\fP command.
+.SS paragraphs, para
+.LP
+[Default in the POSIX locale \fBIPLPPPQPP LIpplpipbp\fP]
+.LP
+The \fBparagraphs\fP edit option shall define additional paragraph
+boundaries for the open and visual mode commands. The
+\fBparagraphs\fP edit option can be set to a character string consisting
+of zero or more character pairs. It shall be an error to
+set it to an odd number of characters.
+.SS prompt
+.LP
+[Default \fIset\fP]
+.LP
+If \fBprompt\fP is set, \fIex\fP command mode input shall be prompted
+for with a colon ( \fB':'\fP ); when unset, no prompt
+shall be written.
+.SS readonly
+.LP
+[Default \fIsee text\fP]
+.LP
+If the \fBreadonly\fP edit option is set, read-only mode shall be
+enabled (see Write ). The
+\fBreadonly\fP edit option shall be initialized to set if either of
+the following conditions are true:
+.IP " *" 3
+The command-line option -R was specified.
+.LP
+.IP " *" 3
+Performing actions equivalent to the \fIaccess\fP() function called
+with the following
+arguments indicates that the file lacks write permission:
+.RS
+.IP " 1." 4
+The current pathname is used as the \fIpath\fP argument.
+.LP
+.IP " 2." 4
+The constant \fBW_OK\fP is used as the \fIamode\fP argument.
+.LP
+.RE
+.LP
+.LP
+The \fBreadonly\fP edit option may be initialized to set for other,
+implementation-defined reasons. The \fBreadonly\fP edit
+option shall not be initialized to unset based on any special privileges
+of the user or process. The \fBreadonly\fP edit option
+shall be reinitialized each time that the contents of the edit buffer
+are replaced (for example, by an \fBedit\fP or \fBnext\fP
+command) unless the user has explicitly set it, in which case it shall
+remain set until the user explicitly unsets it. Once unset,
+it shall again be reinitialized each time that the contents of the
+edit buffer are replaced.
+.SS redraw
+.LP
+[Default \fIunset\fP]
+.LP
+The editor simulates an intelligent terminal on a dumb terminal. (Since
+this is likely to require a large amount of output to
+the terminal, it is useful only at high transmission speeds.)
+.SS remap
+.LP
+[Default \fIset\fP]
+.LP
+If \fBremap\fP is set, map translation shall allow for maps defined
+in terms of other maps; translation shall continue until a
+final product is obtained. If unset, only a one-step translation shall
+be done.
+.SS report
+.LP
+[Default 5]
+.LP
+The value of this \fBreport\fP edit option specifies what number of
+lines being added, copied, deleted, or modified in the edit
+buffer will cause an informational message to be written to the user.
+The following conditions shall cause an informational
+message. The message shall contain the number of lines added, copied,
+deleted, or modified, but is otherwise unspecified.
+.IP " *" 3
+An \fIex\fP or \fIvi\fP editor command, other than \fBopen\fP, \fBundo\fP,
+or
+\fBvisual\fP, that modifies at least the value of the \fBreport\fP
+edit option number of lines, and which is not part of an
+\fIex\fP \fBglobal\fP or \fBv\fP command, or \fIex\fP or \fIvi\fP
+buffer execution, shall
+cause an informational message to be written.
+.LP
+.IP " *" 3
+An \fIex\fP \fByank\fP or \fIvi\fP \fBy\fP or \fBY\fP command, that
+copies at least the
+value of the \fBreport\fP edit option plus 1 number of lines, and
+which is not part of an \fIex\fP \fBglobal\fP or \fBv\fP
+command, or \fIex\fP or \fIvi\fP buffer execution, shall cause an
+informational message to be
+written.
+.LP
+.IP " *" 3
+An \fIex\fP \fBglobal\fP, \fBv\fP, \fBopen\fP, \fBundo\fP, or \fBvisual\fP
+command or \fIex\fP or \fIvi\fP buffer execution, that adds or deletes
+a total of at least the value of the \fBreport\fP edit
+option number of lines, and which is not part of an \fIex\fP \fBglobal\fP
+or \fBv\fP command, or \fIex\fP or \fIvi\fP buffer execution, shall
+cause an informational message to be written. (For example, if 3 lines
+were added and 8 lines deleted during an \fIex\fP \fBvisual\fP command,
+5 would be the number compared against the \fBreport\fP
+edit option after the command completed.)
+.LP
+.SS scroll, scr
+.LP
+[Default (number of lines in the display -1)/2]
+.LP
+The value of the \fBscroll\fP edit option shall determine the number
+of lines scrolled by the \fIex\fP <control>-D and
+\fBz\fP commands. For the \fIvi\fP <control>-D and <control>-U commands,
+it shall
+be the initial number of lines to scroll when no previous <control>-D
+or <control>-U command has been executed.
+.SS sections
+.LP
+[Default in the POSIX locale \fBNHSHH HUnhsh\fP]
+.LP
+The \fBsections\fP edit option shall define additional section boundaries
+for the open and visual mode commands. The
+\fBsections\fP edit option can be set to a character string consisting
+of zero or more character pairs; it shall be an error to
+set it to an odd number of characters.
+.SS shell, sh
+.LP
+[Default from the environment variable \fISHELL ]\fP
+.LP
+The value of this option shall be a string. The default shall be taken
+from the \fISHELL\fP environment variable. If the
+\fISHELL\fP environment variable is null or empty, the \fIsh\fP (see
+\fIsh\fP ) utility shall be the default.
+.SS shiftwidth, sw
+.LP
+[Default 8]
+.LP
+The value of this option shall give the width in columns of an indentation
+level used during autoindentation and by the shift
+commands ( \fB<\fP and \fB>\fP).
+.SS showmatch, sm
+.LP
+[Default \fIunset\fP]
+.LP
+The functionality described for the \fBshowmatch\fP edit option need
+not be supported on block-mode terminals or terminals with
+insufficient capabilities.
+.LP
+If \fBshowmatch\fP is set, in open or visual mode, when a \fB')'\fP
+or \fB'}'\fP is typed, if the matching \fB'('\fP
+or \fB'{'\fP is currently visible on the display, the matching \fB'('\fP
+or \fB'{'\fP shall be flagged moving the cursor
+to its location for an unspecified amount of time.
+.SS showmode
+.LP
+[Default \fIunset\fP]
+.LP
+If \fBshowmode\fP is set, in open or visual mode, the current mode
+that the editor is in shall be displayed on the last line of
+the display. Command mode and text input mode shall be differentiated;
+other unspecified modes and implementation-defined
+information may be displayed.
+.SS slowopen
+.LP
+[Default \fIunset\fP]
+.LP
+If \fBslowopen\fP is set during open and visual text input modes,
+the editor shall not update portions of the display other
+than those display line columns that display the characters entered
+by the user (see \fIInput
+Mode Commands in vi\fP ).
+.SS tabstop, ts
+.LP
+[Default 8]
+.LP
+The value of this edit option shall specify the column boundary used
+by a <tab> in the display (see autoprint, ap and \fIInput Mode Commands
+in vi\fP ).
+.SS taglength, tl
+.LP
+[Default zero]
+.LP
+The value of this edit option shall specify the maximum number of
+characters that are considered significant in the
+user-specified tag name and in the tag name from the tags file. If
+the value is zero, all characters in both tag names shall be
+significant.
+.SS tags
+.LP
+[Default \fIsee text\fP]
+.LP
+The value of this edit option shall be a string of <blank>-delimited
+pathnames of files used by the \fBtag\fP command.
+The default value is unspecified.
+.SS term
+.LP
+[Default from the environment variable \fITERM ]\fP
+.LP
+The value of this edit option shall be a string. The default shall
+be taken from the \fITERM\fP variable in the environment. If
+the \fITERM\fP environment variable is empty or null, the default
+is unspecified. The editor shall use the value of this edit
+option to determine the type of the display device.
+.LP
+The results are unspecified if the user changes the value of the term
+edit option after editor initialization.
+.SS terse
+.LP
+[Default \fIunset\fP]
+.LP
+If \fBterse\fP is set, error messages may be less verbose. However,
+except for this caveat, error messages are unspecified.
+Furthermore, not all error messages need change for different settings
+of this option.
+.SS warn
+.LP
+[Default \fIset\fP]
+.LP
+If \fBwarn\fP is set, and the contents of the edit buffer have been
+modified since they were last completely written, the
+editor shall write a warning message before certain \fB!\fP commands
+(see Escape ).
+.SS window
+.LP
+[Default \fIsee text\fP]
+.LP
+A value used in open and visual mode, by the <control>-B and <control>-F
+commands, and, in visual mode, to specify
+the number of lines displayed when the screen is repainted.
+.LP
+If the \fB-w\fP command-line option is not specified, the default
+value shall be set to the value of the \fILINES\fP
+environment variable. If the \fILINES\fP environment variable is empty
+or null, the default shall be the number of lines in the
+display minus 1.
+.LP
+Setting the \fBwindow\fP edit option to zero or to a value greater
+than the number of lines in the display minus 1 (either
+explicitly or based on the \fB-w\fP option or the \fILINES\fP environment
+variable) shall cause the \fBwindow\fP edit option to
+be set to the number of lines in the display minus 1.
+.LP
+The baud rate of the terminal line may change the default in an implementation-defined
+manner.
+.SS wrapmargin, wm
+.LP
+[Default 0]
+.LP
+If the value of this edit option is zero, it shall have no effect.
+.LP
+If not in the POSIX locale, the effect of this edit option is implementation-defined.
+.LP
+Otherwise, it shall specify a number of columns from the ending margin
+of the terminal.
+.LP
+During open and visual text input modes, for each character for which
+any part of the character is displayed in a column that is
+less than \fBwrapmargin\fP columns from the ending margin of the display
+line, the editor shall behave as follows:
+.IP " 1." 4
+If the character triggering this event is a <blank>, it, and all immediately
+preceding <blank>s on the current line
+entered during the execution of the current text input command, shall
+be discarded, and the editor shall behave as if the user had
+entered a single <newline> instead. In addition, if the next user-entered
+character is a <space>, it shall be discarded
+as well.
+.LP
+.IP " 2." 4
+Otherwise, if there are one or more <blank>s on the current line immediately
+preceding the last group of inserted non-
+<blank>s which was entered during the execution of the current text
+input command, the <blank>s shall be replaced as if
+the user had entered a single <newline> instead.
+.LP
+.LP
+If the \fBautoindent\fP edit option is set, and the events described
+in 1. or 2. are performed, any <blank>s at or after
+the cursor in the current line shall be discarded.
+.LP
+The ending margin shall be determined by the system or overridden
+by the user, as described for \fICOLUMNS\fP in the
+ENVIRONMENT VARIABLES section and the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 8, Environment Variables.
+.SS wrapscan, ws
+.LP
+[Default \fIset\fP]
+.LP
+If \fBwrapscan\fP is set, searches (the \fIex\fP \fB/\fP or \fB?\fP
+addresses, or open and visual mode \fB/\fP, \fB?\fP,
+\fBN\fP, and \fBn\fP commands) shall wrap around the beginning or
+end of the edit buffer; when unset, searches shall stop at the
+beginning or end of the edit buffer.
+.SS writeany, wa
+.LP
+[Default \fIunset\fP]
+.LP
+If \fBwriteany\fP is set, some of the checks performed when executing
+the \fIex\fP \fBwrite\fP commands shall be inhibited,
+as described in editor option \fBautowrite\fP.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+When any error is encountered and the standard input is not a terminal
+device file, \fIex\fP shall not write the file or return
+to command or text input mode, and shall terminate with a non-zero
+exit status.
+.LP
+Otherwise, when an unrecoverable error is encountered, it shall be
+equivalent to a SIGHUP asynchronous event.
+.LP
+Otherwise, when an error is encountered, the editor shall behave as
+specified in Command Line Parsing
+in ex .
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+If a SIGSEGV signal is received while \fIex\fP is saving a file, the
+file might not be successfully saved.
+.LP
+The \fBnext\fP command can accept more than one file, so usage such
+as:
+.sp
+.RS
+.nf
+
+\fBnext `ls [abc]*`
+\fP
+.fi
+.RE
+.LP
+is valid; it would not be valid for the \fBedit\fP or \fBread\fP commands,
+for example, because they expect only one file and
+unspecified results occur.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIex\fP/ \fIvi\fP specification is based on the historical practice
+found in the 4 BSD
+and System V implementations of \fIex\fP and \fIvi\fP. A freely redistributable
+implementation
+of \fIex\fP/ \fIvi\fP, which is tracking IEEE\ Std\ 1003.1-2001 fairly
+closely, and
+demonstrates the intended changes between historical implementations
+and IEEE\ Std\ 1003.1-2001, may be obtained by
+anonymous FTP from:
+.sp
+.RS
+.nf
+
+\fBftp://ftp.rdg.opengroup.org/pub/mirrors/nvi
+\fP
+.fi
+.RE
+.LP
+A \fIrestricted editor\fP (both the historical \fIred\fP utility and
+modifications to \fIex\fP) were considered and rejected
+for inclusion. Neither option provided the level of security that
+users might expect.
+.LP
+It is recognized that \fIex\fP visual mode and related features would
+be difficult, if not impossible, to implement
+satisfactorily on a block-mode terminal, or a terminal without any
+form of cursor addressing; thus, it is not a mandatory
+requirement that such features should work on all terminals. It is
+the intention, however, that an \fIex\fP implementation should
+provide the full set of capabilities on all terminals capable of supporting
+them.
+.SS Options
+.LP
+The \fB-c\fP replacement for \fB+\fP \fIcommand\fP was inspired by
+the \fB-e\fP option of \fIsed\fP. Historically, all such commands
+(see \fBedit\fP and \fBnext\fP as well) were executed
+from the last line of the edit buffer. This meant, for example, that
+\fB"+/pattern"\fP would fail unless the \fBwrapscan\fP
+option was set. IEEE\ Std\ 1003.1-2001 requires conformance to historical
+practice. Historically, some implementations
+restricted the \fIex\fP commands that could be listed as part of the
+command line arguments. For consistency,
+IEEE\ Std\ 1003.1-2001 does not permit these restrictions.
+.LP
+In historical implementations of the editor, the \fB-R\fP option (and
+the \fBreadonly\fP edit option) only prevented
+overwriting of files; appending to files was still permitted, mapping
+loosely into the \fIcsh\fP \fBnoclobber\fP variable. Some
+implementations, however, have not followed this semantic, and \fBreadonly\fP
+does not permit appending either.
+IEEE\ Std\ 1003.1-2001 follows the latter practice, believing that
+it is a more obvious and intuitive meaning of
+\fBreadonly\fP.
+.LP
+The \fB-s\fP option suppresses all interactive user feedback and is
+useful for editing scripts in batch jobs. The list of
+specific effects is historical practice. The terminal type "incapable
+of supporting open and visual modes" has historically been
+named "dumb".
+.LP
+The \fB-t\fP option was required because the \fIctags\fP utility appears
+in
+IEEE\ Std\ 1003.1-2001 and the option is available in all historical
+implementations of \fIex\fP.
+.LP
+Historically, the \fIex\fP and \fIvi\fP utilities accepted a \fB-x\fP
+option, which did
+encryption based on the algorithm found in the historical \fIcrypt\fP
+utility. The \fB-x\fP option for encryption, and the
+associated \fIcrypt\fP utility, were omitted because the algorithm
+used was not specifiable and the export control laws of some
+nations make it difficult to export cryptographic technology. In addition,
+it did not historically provide the level of security
+that users might expect.
+.SS Standard Input
+.LP
+An end-of-file condition is not equivalent to an end-of-file character.
+A common end-of-file character, <control>-D, is
+historically an \fIex\fP command.
+.LP
+There was no maximum line length in historical implementations of
+\fIex\fP. Specifically, as it was parsed in chunks, the
+addresses had a different maximum length than the filenames. Further,
+the maximum line buffer size was declared as BUFSIZ, which
+was different lengths on different systems. This version selected
+the value of {LINE_MAX} to impose a reasonable restriction on
+portable usage of \fIex\fP and to aid test suite writers in their
+development of realistic tests that exercise this limit.
+.SS Input Files
+.LP
+It was an explicit decision by the standard developers that a <newline>
+be added to any file lacking one. It was believed
+that this feature of \fIex\fP and \fIvi\fP was relied on by users
+in order to make text files
+lacking a trailing <newline> more portable. It is recognized that
+this will require a user-specified option or extension for
+implementations that permit \fIex\fP and \fIvi\fP to edit files of
+type other than text if
+such files are not otherwise identified by the system. It was agreed
+that the ability to edit files of arbitrary type can be
+useful, but it was not considered necessary to mandate that an \fIex\fP
+or \fIvi\fP
+implementation be required to handle files other than text files.
+.LP
+The paragraph in the INPUT FILES section, "By default, ...", is intended
+to close a long-standing security problem in
+\fIex\fP and \fIvi\fP; that of the "modeline" or "modelines" edit
+option. This feature
+allows any line in the first or last five lines of the file containing
+the strings \fB"ex:"\fP or \fB"vi:"\fP (and,
+apparently, \fB"ei:"\fP or \fB"vx:"\fP ) to be a line containing editor
+commands, and \fIex\fP interprets all the text up to
+the next \fB':'\fP or <newline> as a command. Consider the consequences,
+for example, of an unsuspecting user using
+\fIex\fP or \fIvi\fP as the editor when replying to a mail message
+in which a line such
+as:
+.sp
+.RS
+.nf
+
+\fBex:! rm -rf :
+\fP
+.fi
+.RE
+.LP
+appeared in the signature lines. The standard developers believed
+strongly that an editor should not by default interpret any
+lines of a file. Vendors are strongly urged to delete this feature
+from their implementations of \fIex\fP and \fIvi\fP.
+.SS Asynchronous Events
+.LP
+The intention of the phrase "complete write" is that the entire edit
+buffer be written to stable storage. The note regarding
+temporary files is intended for implementations that use temporary
+files to back edit buffers unnamed by the user.
+.LP
+Historically, SIGQUIT was ignored by \fIex\fP, but was the equivalent
+of the \fBQ\fP command in visual mode; that is, it
+exited visual mode and entered \fIex\fP mode. IEEE\ Std\ 1003.1-2001
+permits, but does not require, this behavior.
+Historically, SIGINT was often used by \fIvi\fP users to terminate
+text input mode (
+<control>-C is often easier to enter than <ESC>). Some implementations
+of \fIvi\fP
+alerted the terminal on this event, and some did not. IEEE\ Std\ 1003.1-2001
+requires that SIGINT behave identically to
+<ESC>, and that the terminal not be alerted.
+.LP
+Historically, suspending the \fIex\fP editor during text input mode
+was similar to SIGINT, as completed lines were retained,
+but any partial line discarded, and the editor returned to command
+mode. IEEE\ Std\ 1003.1-2001 is silent on this issue;
+implementations are encouraged to follow historical practice, where
+possible.
+.LP
+Historically, the \fIvi\fP editor did not treat SIGTSTP as an asynchronous
+event, and it was
+therefore impossible to suspend the editor in visual text input mode.
+There are two major reasons for this. The first is that
+SIGTSTP is a broadcast signal on UNIX systems, and the chain of events
+where the shell \fIexec\fPs an application that then \fIexec\fPs \fIvi\fP
+usually caused confusion for the
+terminal state if SIGTSTP was delivered to the process group in the
+default manner. The second was that most implementations of the
+UNIX \fIcurses\fP package are not reentrant, and the receipt of SIGTSTP
+at the wrong time will cause them to crash.
+IEEE\ Std\ 1003.1-2001 is silent on this issue; implementations are
+encouraged to treat suspension as an asynchronous event
+if possible.
+.LP
+Historically, modifications to the edit buffer made before SIGINT
+interrupted an operation were retained; that is, anywhere from
+zero to all of the lines to be modified might have been modified by
+the time the SIGINT arrived. These changes were not discarded
+by the arrival of SIGINT. IEEE\ Std\ 1003.1-2001 permits this behavior,
+noting that the \fBundo\fP command is required to
+be able to undo these partially completed commands.
+.LP
+The action taken for signals other than SIGINT, SIGCONT, SIGHUP, and
+SIGTERM is unspecified because some implementations attempt
+to save the edit buffer in a useful state when other signals are received.
+.SS Standard Error
+.LP
+For \fIex\fP/ \fIvi\fP, diagnostic messages are those messages reported
+as a result of a
+failed attempt to invoke \fIex\fP or \fIvi\fP, such as invalid options
+or insufficient
+resources, or an abnormal termination condition. Diagnostic messages
+should not be confused with the error messages generated by
+inappropriate or illegal user commands.
+.SS Initialization in ex and vi
+.LP
+If an \fIex\fP command (other than \fBcd\fP, \fBchdir\fP, or \fBsource\fP)
+has a filename argument, one or both of the
+alternate and current pathnames will be set. Informally, they are
+set as follows:
+.IP " 1." 4
+If the \fIex\fP command is one that replaces the contents of the edit
+buffer, and it succeeds, the current pathname will be set
+to the filename argument (the first filename argument in the case
+of the \fBnext\fP command) and the alternate pathname will be
+set to the previous current pathname, if there was one.
+.LP
+.IP " 2." 4
+In the case of the file read/write forms of the \fBread\fP and \fBwrite\fP
+commands, if there is no current pathname, the
+current pathname will be set to the filename argument.
+.LP
+.IP " 3." 4
+Otherwise, the alternate pathname will be set to the filename argument.
+.LP
+.LP
+For example, \fB:edit foo\fP and \fB:recover foo\fP, when successful,
+set the current pathname, and, if there was a previous
+current pathname, the alternate pathname. The commands \fB:write\fP,
+\fB!command\fP, and \fB:edit\fP set neither the current or
+alternate pathnames. If the \fB:edit foo\fP command were to fail for
+some reason, the alternate pathname would be set. The
+\fBread\fP and \fBwrite\fP commands set the alternate pathname to
+their \fIfile\fP argument, unless the current pathname is not
+set, in which case they set the current pathname to their \fIfile\fP
+arguments. The alternate pathname was not historically set by
+the \fB:source\fP command. IEEE\ Std\ 1003.1-2001 requires conformance
+to historical practice. Implementations adding
+commands that take filenames as arguments are encouraged to set the
+alternate pathname as described here.
+.LP
+Historically, \fIex\fP and \fIvi\fP read the \fB.exrc\fP file in the
+\fI$HOME\fP
+directory twice, if the editor was executed in the \fI$HOME\fP directory.
+IEEE\ Std\ 1003.1-2001 prohibits this
+behavior.
+.LP
+Historically, the 4 BSD \fIex\fP and \fIvi\fP read the \fI$HOME\fP
+and local \fB.exrc\fP
+files if they were owned by the real ID of the user, or the \fBsourceany\fP
+option was set, regardless of other considerations.
+This was a security problem because it is possible to put normal UNIX
+system commands inside a \fB.exrc\fP file.
+IEEE\ Std\ 1003.1-2001 does not specify the \fBsourceany\fP option,
+and historical implementations are encouraged to
+delete it.
+.LP
+The \fB.exrc\fP files must be owned by the real ID of the user, and
+not writable by anyone other than the owner. The
+appropriate privileges exception is intended to permit users to acquire
+special privileges, but continue to use the \fB.exrc\fP
+files in their home directories.
+.LP
+System V Release 3.2 and later \fIvi\fP implementations added the
+option \fB[no]exrc\fP.
+The behavior is that local \fB.exrc\fP files are read-only if the
+\fBexrc\fP option is set. The default for the \fBexrc\fP
+option was off, so by default, local \fB.exrc\fP files were not read.
+The problem this was intended to solve was that System V
+permitted users to give away files, so there is no possible ownership
+or writeability test to ensure that the file is safe. This is
+still a security problem on systems where users can give away files,
+but there is nothing additional that
+IEEE\ Std\ 1003.1-2001 can do. The implementation-defined exception
+is intended to permit groups to have local \fB.exrc\fP
+files that are shared by users, by creating pseudo-users to own the
+shared files.
+.LP
+IEEE\ Std\ 1003.1-2001 does not mention system-wide \fIex\fP and \fIvi\fP
+start-up
+files. While they exist in several implementations of \fIex\fP and
+\fIvi\fP, they are not
+present in any implementations considered historical practice by IEEE\ Std\ 1003.1-2001.
+Implementations that have such
+files should use them only if they are owned by the real user ID or
+an appropriate user (for example, root on UNIX systems) and if
+they are not writable by any user other than their owner. System-wide
+start-up files should be read before the \fIEXINIT\fP
+variable, \fB$HOME/.exrc\fP, or local \fB.exrc\fP files are evaluated.
+.LP
+Historically, any \fIex\fP command could be entered in the \fIEXINIT\fP
+variable or the \fB.exrc\fP file, although ones
+requiring that the edit buffer already contain lines of text generally
+caused historical implementations of the editor to drop
+\fBcore\fP. IEEE\ Std\ 1003.1-2001 requires that any \fIex\fP command
+be permitted in the \fIEXINIT\fP variable and
+\fB\&.exrc\fP files, for simplicity of specification and consistency,
+although many of them will obviously fail under many
+circumstances.
+.LP
+The initialization of the contents of the edit buffer uses the phrase
+"the effect shall be" with regard to various \fIex\fP
+commands. The intent of this phrase is that edit buffer contents loaded
+during the initialization phase not be lost; that is,
+loading the edit buffer should fail if the \fB.exrc\fP file read in
+the contents of a file and did not subsequently write the edit
+buffer. An additional intent of this phrase is to specify that the
+initial current line and column is set as specified for the
+individual \fIex\fP commands.
+.LP
+Historically, the \fB-t\fP option behaved as if the tag search were
+a \fB+\fP \fIcommand\fP; that is, it was executed from
+the last line of the file specified by the tag. This resulted in the
+search failing if the pattern was a forward search pattern and
+the \fBwrapscan\fP edit option was not set. IEEE\ Std\ 1003.1-2001
+does not permit this behavior, requiring that the
+search for the tag pattern be performed on the entire file, and, if
+not found, that the current line be set to a more reasonable
+location in the file.
+.LP
+Historically, the empty edit buffer presented for editing when a file
+was not specified by the user was unnamed. This is
+permitted by IEEE\ Std\ 1003.1-2001; however, implementations are
+encouraged to provide users a temporary filename for this
+buffer because it permits them the use of \fIex\fP commands that use
+the current pathname during temporary edit sessions.
+.LP
+Historically, the file specified using the \fB-t\fP option was not
+part of the current argument list. This practice is
+permitted by IEEE\ Std\ 1003.1-2001; however, implementations are
+encouraged to include its name in the current argument
+list for consistency.
+.LP
+Historically, the \fB-c\fP command was generally not executed until
+a file that already exists was edited.
+IEEE\ Std\ 1003.1-2001 requires conformance to this historical practice.
+Commands that could cause the \fB-c\fP command to
+be executed include the \fIex\fP commands \fBedit\fP, \fBnext\fP,
+\fBrecover\fP, \fBrewind\fP, and \fBtag\fP, and the \fIvi\fP commands
+<control>-^ and <control>-]. Historically, reading a file into an
+edit buffer did not cause the \fB-c\fP command to be executed (even
+though it might set the current pathname) with the exception
+that it did cause the \fB-c\fP command to be executed if: the editor
+was in \fIex\fP mode, the edit buffer had no current
+pathname, the edit buffer was empty, and no read commands had yet
+been attempted. For consistency and simplicity of specification,
+IEEE\ Std\ 1003.1-2001 does not permit this behavior.
+.LP
+Historically, the \fB-r\fP option was the same as a normal edit session
+if there was no recovery information available for the
+file. This allowed users to enter:
+.sp
+.RS
+.nf
+
+\fBvi -r *.c
+\fP
+.fi
+.RE
+.LP
+and recover whatever files were recoverable. In some implementations,
+recovery was attempted only on the first file named, and
+the file was not entered into the argument list; in others, recovery
+was attempted for each file named. In addition, some
+historical implementations ignored \fB-r\fP if \fB-t\fP was specified
+or did not support command line \fIfile\fP arguments with
+the \fB-t\fP option. For consistency and simplicity of specification,
+IEEE\ Std\ 1003.1-2001 disallows these special
+cases, and requires that recovery be attempted the first time each
+file is edited.
+.LP
+Historically, \fIvi\fP initialized the \fB`\fP and \fB'\fP marks,
+but \fIex\fP did not.
+This meant that if the first command in \fIex\fP mode was \fBvisual\fP
+or if an \fIex\fP command was executed first (for
+example, \fIvi\fP +10 \fIfile\fP), \fIvi\fP was entered
+without the marks being initialized. Because the standard developers
+believed the marks to be generally useful, and for consistency
+and simplicity of specification, IEEE\ Std\ 1003.1-2001 requires that
+they always be initialized if in open or visual mode,
+or if in \fIex\fP mode and the edit buffer is not empty. Not initializing
+it in \fIex\fP mode if the edit buffer is empty is
+historical practice; however, it has always been possible to set (and
+use) marks in empty edit buffers in open and visual mode edit
+sessions.
+.SS Addressing
+.LP
+Historically, \fIex\fP and \fIvi\fP accepted the additional addressing
+forms \fB'\\/'\fP
+and \fB'\\?'\fP . They were equivalent to \fB"//"\fP and \fB"??"\fP,
+respectively. They are not required by
+IEEE\ Std\ 1003.1-2001, mostly because nobody can remember whether
+they ever did anything different historically.
+.LP
+Historically, \fIex\fP and \fIvi\fP permitted an address of zero for
+several commands, and
+permitted the \fB%\fP address in empty files for others. For consistency,
+IEEE\ Std\ 1003.1-2001 requires support for the
+former in the few commands where it makes sense, and disallows it
+otherwise. In addition, because IEEE\ Std\ 1003.1-2001
+requires that \fB%\fP be logically equivalent to \fB"1,$"\fP, it
+is also supported where it makes sense and disallowed
+otherwise.
+.LP
+Historically, the \fB%\fP address could not be followed by further
+addresses. For consistency and simplicity of specification,
+IEEE\ Std\ 1003.1-2001 requires that additional addresses be supported.
+.LP
+All of the following are valid \fIaddresses\fP:
+.TP 7
+\fB+++\fP
+Three lines after the current line.
+.TP 7
+\fB/\fP\fIre\fP\fB/-\fP
+One line before the next occurrence of \fIre\fP.
+.TP 7
+\fB-2\fP
+Two lines before the current line.
+.TP 7
+\fB3\ ----\ 2\fP
+Line one (note intermediate negative address).
+.TP 7
+\fB1\ 2\ 3\fP
+Line six.
+.sp
+.LP
+Any number of addresses can be provided to commands taking addresses;
+for example, \fB"1,2,3,4,5p"\fP prints lines 4 and 5,
+because two is the greatest valid number of addresses accepted by
+the \fBprint\fP command. This, in combination with the semicolon
+delimiter, permits users to create commands based on ordered patterns
+in the file. For example, the command \fB3;/foo/;+2print\fP
+will display the first line after line 3 that contains the pattern
+\fIfoo\fP, plus the next two lines. Note that the address
+\fB3;\fP must be evaluated before being discarded because the search
+origin for the \fB/foo/\fP command depends on this.
+.LP
+Historically, values could be added to addresses by including them
+after one or more <blank>s; for example,
+\fB3\ -\ 5p\fP wrote the seventh line of the file, and \fB/foo/\ 5\fP
+was the same as \fB/foo/+5\fP. However, only
+absolute values could be added; for example, \fB5\ /foo/\fP was an
+error. IEEE\ Std\ 1003.1-2001 requires conformance
+to historical practice. Address offsets are separately specified from
+addresses because they could historically be provided to
+visual mode search commands.
+.LP
+Historically, any missing addresses defaulted to the current line.
+This was true for leading and trailing comma-delimited
+addresses, and for trailing semicolon-delimited addresses. For consistency,
+IEEE\ Std\ 1003.1-2001 requires it for leading
+semicolon addresses as well.
+.LP
+Historically, \fIex\fP and \fIvi\fP accepted the \fB'^'\fP character
+as both an address
+and as a flag offset for commands. In both cases it was identical
+to the \fB'-'\fP character. IEEE\ Std\ 1003.1-2001
+does not require or prohibit this behavior.
+.LP
+Historically, the enhancements to basic regular expressions could
+be used in addressing; for example, \fB'~'\fP,
+\fB'\\<'\fP, and \fB'\\>'\fP . IEEE\ Std\ 1003.1-2001 requires conformance
+to historical practice; that is, that
+regular expression usage be consistent, and that regular expression
+enhancements be supported wherever regular expressions are
+used.
+.SS Command Line Parsing in ex
+.LP
+Historical \fIex\fP command parsing was even more complex than that
+described here. IEEE\ Std\ 1003.1-2001 requires the
+subset of the command parsing that the standard developers believed
+was documented and that users could reasonably be expected to
+use in a portable fashion, and that was historically consistent between
+implementations. (The discarded functionality is obscure,
+at best.) Historical implementations will require changes in order
+to comply with IEEE\ Std\ 1003.1-2001; however, users
+are not expected to notice any of these changes. Most of the complexity
+in \fIex\fP parsing is to handle three special termination
+cases:
+.IP " 1." 4
+The \fB!\fP, \fBglobal\fP, \fBv\fP, and the filter versions of the
+\fBread\fP and \fBwrite\fP commands are delimited by
+<newline>s (they can contain vertical-line characters that are usually
+shell pipes).
+.LP
+.IP " 2." 4
+The \fBex\fP, \fBedit\fP, \fBnext\fP, and \fBvisual\fP in open and
+visual mode commands all take \fIex\fP commands,
+optionally containing vertical-line characters, as their first arguments.
+.LP
+.IP " 3." 4
+The \fBs\fP command takes a regular expression as its first argument,
+and uses the delimiting characters to delimit the
+command.
+.LP
+.LP
+Historically, vertical-line characters in the \fB+\fP \fIcommand\fP
+argument of the \fBex\fP, \fBedit\fP, \fBnext\fP,
+\fBvi\fP, and \fBvisual\fP commands, and in the \fIpattern\fP and
+\fIreplacement\fP parts of the \fBs\fP command, did not
+delimit the command, and in the filter cases for \fBread\fP and \fBwrite\fP,
+and the \fB!\fP, \fBglobal\fP, and \fBv\fP
+commands, they did not delimit the command at all. For example, the
+following commands are all valid:
+.sp
+.RS
+.nf
+
+\fB:\fP\fBedit +25 | s/abc/ABC/ file.c
+\fP\fB:\fP\fBs/ | /PIPE/
+\fP\fB:\fP\fBread !spell % | columnate
+\fP\fB:\fP\fBglobal/pattern/p | l
+\fP\fB:\fP\fBs/a/b/ | s/c/d | set
+\fP
+.fi
+.RE
+.LP
+Historically, empty or <blank> filled lines in \fB.exrc\fP files and
+\fBsource\fPd files (as well as \fIEXINIT\fP
+variables and \fIex\fP command scripts) were treated as default commands;
+that is, \fBprint\fP commands.
+IEEE\ Std\ 1003.1-2001 specifically requires that they be ignored
+when encountered in \fB.exrc\fP and \fBsource\fPd files
+to eliminate a common source of new user error.
+.LP
+Historically, \fIex\fP commands with multiple adjacent (or <blank>-separated)
+vertical lines were handled oddly when
+executed from \fIex\fP mode. For example, the command \fB|||\fP <carriage-return>,
+when the cursor was on line 1, displayed
+lines 2, 3, and 5 of the file. In addition, the command \fB|\fP would
+only display the line after the next line, instead of the
+next two lines. The former worked more logically when executed from
+\fIvi\fP mode, and
+displayed lines 2, 3, and 4. IEEE\ Std\ 1003.1-2001 requires the \fIvi\fP
+behavior;
+that is, a single default command and line number increment for each
+command separator, and trailing <newline>s after
+vertical-line separators are discarded.
+.LP
+Historically, \fIex\fP permitted a single extra colon as a leading
+command character; for example, \fB:g/pattern/:p\fP was a
+valid command. IEEE\ Std\ 1003.1-2001 generalizes this to require
+that any number of leading colon characters be
+stripped.
+.LP
+Historically, any prefix of the \fBdelete\fP command could be followed
+without intervening <blank>s by a flag character
+because in the command \fBd\ p\fP, \fIp\fP is interpreted as the buffer
+\fIp\fP. IEEE\ Std\ 1003.1-2001 requires
+conformance to historical practice.
+.LP
+Historically, the \fBk\fP command could be followed by the mark name
+without intervening <blank>s.
+IEEE\ Std\ 1003.1-2001 requires conformance to historical practice.
+.LP
+Historically, the \fBs\fP command could be immediately followed by
+flag and option characters; for example,
+\fBs/e/E/|s|sgc3p\fP was a valid command. However, flag characters
+could not stand alone; for example, the commands \fBsp\fP and
+\fBs\ l\fP would fail, while the command \fBsgp\fP and \fBs\ gl\fP
+would succeed. (Obviously, the \fB'#'\fP flag
+character was used as a delimiter character if it followed the command.)
+Another issue was that option characters had to precede
+flag characters even when the command was fully specified; for example,
+the command \fBs/e/E/pg\fP would fail, while the command
+\fBs/e/E/gp\fP would succeed. IEEE\ Std\ 1003.1-2001 requires conformance
+to historical practice.
+.LP
+Historically, the first command name that had a prefix matching the
+input from the user was the executed command; for example,
+\fBve\fP, \fBver\fP, and \fBvers\fP all executed the \fBversion\fP
+command. Commands were in a specific order, however, so that
+\fBa\fP matched \fBappend\fP, not \fBabbreviate\fP. IEEE\ Std\ 1003.1-2001
+requires conformance to historical practice.
+The restriction on command search order for implementations with extensions
+is to avoid the addition of commands such that the
+historical prefixes would fail to work portably.
+.LP
+Historical implementations of \fIex\fP and \fIvi\fP did not correctly
+handle multiple
+\fIex\fP commands, separated by vertical-line characters, that entered
+or exited visual mode or the editor. Because
+implementations of \fIvi\fP exist that do not exhibit this failure
+mode,
+IEEE\ Std\ 1003.1-2001 does not permit it.
+.LP
+The requirement that alphabetic command names consist of all following
+alphabetic characters up to the next non-alphabetic
+character means that alphabetic command names must be separated from
+their arguments by one or more non-alphabetic characters,
+normally a <blank> or \fB'!'\fP character, except as specified for
+the exceptions, the \fBdelete\fP, \fBk\fP, and
+\fBs\fP commands.
+.LP
+Historically, the repeated execution of the \fIex\fP default \fBprint\fP
+commands ( <control>-D, \fIeof\fP,
+<newline>, <carriage-return>) erased any prompting character and displayed
+the next lines without scrolling the
+terminal; that is, immediately below any previously displayed lines.
+This provided a cleaner presentation of the lines in the file
+for the user. IEEE\ Std\ 1003.1-2001 does not require this behavior
+because it may be impossible in some situations;
+however, implementations are strongly encouraged to provide this semantic
+if possible.
+.LP
+Historically, it was possible to change files in the middle of a command,
+and have the rest of the command executed in the new
+file; for example:
+.sp
+.RS
+.nf
+
+\fB:edit +25 file.c | s/abc/ABC/ | 1
+\fP
+.fi
+.RE
+.LP
+was a valid command, and the substitution was attempted in the newly
+edited file. IEEE\ Std\ 1003.1-2001 requires
+conformance to historical practice. The following commands are examples
+that exercise the \fIex\fP parser:
+.sp
+.RS
+.nf
+
+\fBecho 'foo | bar' > file1; echo 'foo/bar' > file2;
+vi
+:edit +1 | s/|/PIPE/ | w file1 | e file2 | 1 | s/\\//SLASH/ | wq
+\fP
+.fi
+.RE
+.LP
+Historically, there was no protection in editor implementations to
+avoid \fIex\fP \fBglobal\fP, \fBv\fP, \fB@\fP, or
+\fB*\fP commands changing edit buffers during execution of their associated
+commands. Because this would almost invariably result
+in catastrophic failure of the editor, and implementations exist that
+do exhibit these problems, IEEE\ Std\ 1003.1-2001
+requires that changing the edit buffer during a \fBglobal\fP or \fBv\fP
+command, or during a \fB@\fP or \fB*\fP command for
+which there will be more than a single execution, be an error. Implementations
+supporting multiple edit buffers simultaneously are
+strongly encouraged to apply the same semantics to switching between
+buffers as well.
+.LP
+The \fIex\fP command quoting required by IEEE\ Std\ 1003.1-2001 is
+a superset of the quoting in historical
+implementations of the editor. For example, it was not historically
+possible to escape a <blank> in a filename; for example,
+\fB:edit\ foo\\\\\\\ bar\fP would report that too many filenames had
+been entered for the edit command, and there was no
+method of escaping a <blank> in the first argument of an \fBedit\fP,
+\fBex\fP, \fBnext\fP, or \fBvisual\fP command at
+all. IEEE\ Std\ 1003.1-2001 extends historical practice, requiring
+that quoting behavior be made consistent across all
+\fIex\fP commands, except for the \fBmap\fP, \fBunmap\fP, \fBabbreviate\fP,
+and \fBunabbreviate\fP commands, which
+historically used <control>-V instead of backslashes for quoting.
+For those four commands, IEEE\ Std\ 1003.1-2001
+requires conformance to historical practice.
+.LP
+Backslash quoting in \fIex\fP is non-intuitive. Backslash escapes
+are ignored unless they escape a special character; for
+example, when performing \fIfile\fP argument expansion, the string
+\fB"\\\\%"\fP is equivalent to \fB'\\%'\fP, not
+\fB"\\<\fP\fIcurrent\ pathname\fP\fB>"\fP. This can be confusing for
+users because backslash is usually one of the
+characters that causes shell expansion to be performed, and therefore
+shell quoting rules must be taken into consideration.
+Generally, quoting characters are only considered if they escape a
+special character, and a quoting character must be provided for
+each layer of parsing for which the character is special. As another
+example, only a single backslash is necessary for the
+\fB'\\l'\fP sequence in substitute replacement patterns, because the
+character \fB'l'\fP is not special to any parsing layer
+above it.
+.LP
+<control>-V quoting in \fIex\fP is slightly different from backslash
+quoting. In the four commands where
+<control>-V quoting applies ( \fBabbreviate\fP, \fBunabbreviate\fP,
+\fBmap\fP, and \fBunmap\fP), any character may be
+escaped by a <control>-V whether it would have a special meaning or
+not. IEEE\ Std\ 1003.1-2001 requires conformance
+to historical practice.
+.LP
+Historical implementations of the editor did not require delimiters
+within character classes to be escaped; for example, the
+command \fB:s/[/]//\fP on the string \fB"xxx/yyy"\fP would delete
+the \fB'/'\fP from the string.
+IEEE\ Std\ 1003.1-2001 disallows this historical practice for consistency
+and because it places a large burden on
+implementations by requiring that knowledge of regular expressions
+be built into the editor parser.
+.LP
+Historically, quoting <newline>s in \fIex\fP commands was handled
+inconsistently. In most cases, the <newline>
+always terminated the command, regardless of any preceding escape
+character, because backslash characters did not escape
+<newline>s for most \fIex\fP commands. However, some \fIex\fP commands
+(for example, \fBs\fP, \fBmap\fP, and
+\fBabbreviation\fP) permitted <newline>s to be escaped (although in
+the case of \fBmap\fP and \fBabbreviation\fP,
+<control>-V characters escaped them instead of backslashes). This
+was true in not only the command line, but also
+\fB\&.exrc\fP and \fBsource\fPd files. For example, the command:
+.sp
+.RS
+.nf
+
+\fBmap = foo<control-V><newline>bar
+\fP
+.fi
+.RE
+.LP
+would succeed, although it was sometimes difficult to get the <control>-V
+and the inserted <newline> passed to the
+\fIex\fP parser. For consistency and simplicity of specification,
+IEEE\ Std\ 1003.1-2001 requires that it be possible to
+escape <newline>s in \fIex\fP commands at all times, using backslashes
+for most \fIex\fP commands, and using
+<control>-V characters for the \fBmap\fP and \fBabbreviation\fP commands.
+For example, the command \fBprint\fP
+<newline> \fBlist\fP is required to be parsed as the single command
+\fBprint\fP <newline> \fBlist\fP. While this
+differs from historical practice, IEEE\ Std\ 1003.1-2001 developers
+believed it unlikely that any script or user depended
+on the historical behavior.
+.LP
+Historically, an error in a command specified using the \fB-c\fP option
+did not cause the rest of the \fB-c\fP commands to be
+discarded. IEEE\ Std\ 1003.1-2001 disallows this for consistency with
+mapped keys, the \fB@\fP, \fBglobal\fP,
+\fBsource\fP, and \fBv\fP commands, the \fIEXINIT\fP environment variable,
+and the \fB.exrc\fP files.
+.SS Input Editing in ex
+.LP
+One of the common uses of the historical \fIex\fP editor is over slow
+network connections. Editors that run in canonical mode
+can require far less traffic to and from, and far less processing
+on, the host machine, as well as more easily supporting
+block-mode terminals. For these reasons, IEEE\ Std\ 1003.1-2001 requires
+that \fIex\fP be implemented using canonical mode
+input processing, as was done historically.
+.LP
+IEEE\ Std\ 1003.1-2001 does not require the historical 4 BSD input
+editing characters "word erase" or "literal
+next". For this reason, it is unspecified how they are handled by
+\fIex\fP, although they must have the required effect.
+Implementations that resolve them after the line has been ended using
+a <newline> or <control>-M character, and
+implementations that rely on the underlying system terminal support
+for this processing, are both conforming. Implementations are
+strongly urged to use the underlying system functionality, if at all
+possible, for compatibility with other system text input
+interfaces.
+.LP
+Historically, when the \fIeof\fP character was used to decrement the
+\fBautoindent\fP level, the cursor moved to display the
+new end of the \fBautoindent\fP characters, but did not move the cursor
+to a new line, nor did it erase the <control>-D
+character from the line. IEEE\ Std\ 1003.1-2001 does not specify that
+the cursor remain on the same line or that the rest
+of the line is erased; however, implementations are strongly encouraged
+to provide the best possible user interface; that is, the
+cursor should remain on the same line, and any <control>-D character
+on the line should be erased.
+.LP
+IEEE\ Std\ 1003.1-2001 does not require the historical 4 BSD input
+editing character "reprint", traditionally
+<control>-R, which redisplayed the current input from the user. For
+this reason, and because the functionality cannot be
+implemented after the line has been terminated by the user, IEEE\ Std\ 1003.1-2001
+makes no requirements about this
+functionality. Implementations are strongly urged to make this historical
+functionality available, if possible.
+.LP
+Historically, <control>-Q did not perform a literal next function
+in \fIex\fP, as it did in \fIvi\fP. IEEE\ Std\ 1003.1-2001 requires
+conformance to historical practice to avoid breaking
+historical \fIex\fP scripts and \fB.exrc\fP files.
+.SS eof
+.LP
+Whether the \fIeof\fP character immediately modifies the \fBautoindent\fP
+characters in the prompt is left unspecified so that
+implementations can conform in the presence of systems that do not
+support this functionality. Implementations are encouraged to
+modify the line and redisplay it immediately, if possible.
+.LP
+The specification of the handling of the \fIeof\fP character differs
+from historical practice only in that \fIeof\fP
+characters are not discarded if they follow normal characters in the
+text input. Historically, they were always discarded.
+.SS Command Descriptions in ex
+.LP
+Historically, several commands (for example, \fBglobal\fP, \fBv\fP,
+\fBvisual\fP, \fBs\fP, \fBwrite\fP, \fBwq\fP,
+\fByank\fP, \fB!\fP, \fB<\fP, \fB>\fP, \fB&\fP, and \fB~\fP) were
+executable in empty files (that is, the
+default address(es) were 0), or permitted explicit addresses of 0
+(for example, 0 was a valid address, or 0,0 was a valid range).
+Addresses of 0, or command execution in an empty file, make sense
+only for commands that add new text to the edit buffer or write
+commands (because users may wish to write empty files). IEEE\ Std\ 1003.1-2001
+requires this behavior for such commands and
+disallows it otherwise, for consistency and simplicity of specification.
+.LP
+A count to an \fIex\fP command has been historically corrected to
+be no greater than the last line in a file; for example, in a
+five-line file, the command \fB1,6print\fP would fail, but the command
+\fB1print300\fP would succeed.
+IEEE\ Std\ 1003.1-2001 requires conformance to historical practice.
+.LP
+Historically, the use of flags in \fIex\fP commands could be obscure.
+General historical practice was as described by
+IEEE\ Std\ 1003.1-2001, but there were some special cases. For instance,
+the \fBlist\fP, \fBnumber\fP, and \fBprint\fP
+commands ignored trailing address offsets; for example, \fB3p\ +++#\fP
+would display line 3, and 3 would be the current line
+after the execution of the command. The \fBopen\fP and \fBvisual\fP
+commands ignored both the trailing offsets and the trailing
+flags. Also, flags specified to the \fBopen\fP and \fBvisual\fP commands
+interacted badly with the \fBlist\fP edit option, and
+setting and then unsetting it during the open/visual session would
+cause \fIvi\fP to stop
+displaying lines in the specified format. For consistency and simplicity
+of specification, IEEE\ Std\ 1003.1-2001 does not
+permit any of these exceptions to the general rule.
+.LP
+IEEE\ Std\ 1003.1-2001 uses the word \fIcopy\fP in several places
+when discussing buffers. This is not intended to
+imply implementation.
+.LP
+Historically, \fIex\fP users could not specify numeric buffers because
+of the ambiguity this would cause; for example, in the
+command \fB3\ delete\ 2\fP, it is unclear whether 2 is a buffer name
+or a \fIcount\fP. IEEE\ Std\ 1003.1-2001
+requires conformance to historical practice by default, but does not
+preclude extensions.
+.LP
+Historically, the contents of the unnamed buffer were frequently discarded
+after commands that did not explicitly affect it; for
+example, when using the \fBedit\fP command to switch files. For consistency
+and simplicity of specification,
+IEEE\ Std\ 1003.1-2001 does not permit this behavior.
+.LP
+The \fIex\fP utility did not historically have access to the numeric
+buffers, and, furthermore, deleting lines in \fIex\fP did
+not modify their contents. For example, if, after doing a delete in
+\fIvi\fP, the user switched
+to \fIex\fP, did another delete, and then switched back to \fIvi\fP,
+the contents of the
+numeric buffers would not have changed. IEEE\ Std\ 1003.1-2001 requires
+conformance to historical practice. Numeric buffers
+are described in the \fIex\fP utility in order to confine the description
+of buffers to a single location in
+IEEE\ Std\ 1003.1-2001.
+.LP
+The metacharacters that trigger shell expansion in \fIfile\fP arguments
+match historical practice, as does the method for doing
+shell expansion. Implementations wishing to provide users with the
+flexibility to alter the set of metacharacters are encouraged to
+provide a \fBshellmeta\fP string edit option.
+.LP
+Historically, \fIex\fP commands executed from \fIvi\fP refreshed the
+screen when it did not
+strictly need to do so; for example, \fB:!date\ >\ /dev/null\fP does
+not require a screen refresh because the output of
+the UNIX \fIdate\fP command requires only a single line of the screen.
+IEEE\ Std\ 1003.1-2001 requires that the screen be refreshed if it
+has been overwritten, but makes no requirements as to
+how an implementation should make that determination. Implementations
+may prompt and refresh the screen regardless.
+.SS Abbreviate
+.LP
+Historical practice was that characters that were entered as part
+of an abbreviation replacement were subject to \fBmap\fP
+expansions, the \fBshowmatch\fP edit option, further abbreviation
+expansions, and so on; that is, they were logically pushed onto
+the terminal input queue, and were not a simple replacement. IEEE\ Std\ 1003.1-2001
+requires conformance to historical
+practice. Historical practice was that whenever a non-word character
+(that had not been escaped by a <control>-V) was entered
+after a word character, \fIvi\fP would check for abbreviations. The
+check was based on the type
+of the character entered before the word character of the word/non-word
+pair that triggered the check. The word character of the
+word/non-word pair that triggered the check and all characters entered
+before the trigger pair that were of that type were included
+in the check, with the exception of <blank>s, which always delimited
+the abbreviation.
+.LP
+This means that, for the abbreviation to work, the \fIlhs\fP must
+end with a word character, there can be no transitions from
+word to non-word characters (or \fIvice versa\fP) other than between
+the last and next-to-last characters in the \fIlhs\fP, and
+there can be no <blank>s in the \fIlhs\fP. In addition, because of
+the historical quoting rules, it was impossible to enter
+a literal <control>-V in the \fIlhs\fP. IEEE\ Std\ 1003.1-2001 requires
+conformance to historical practice.
+Historical implementations did not inform users when abbreviations
+that could never be used were entered; implementations are
+strongly encouraged to do so.
+.LP
+For example, the following abbreviations will work:
+.sp
+.RS
+.nf
+
+\fB:ab (p REPLACE
+:ab p REPLACE
+:ab ((p REPLACE
+\fP
+.fi
+.RE
+.LP
+The following abbreviations will not work:
+.sp
+.RS
+.nf
+
+\fB:ab ( REPLACE
+:ab (pp REPLACE
+\fP
+.fi
+.RE
+.LP
+Historical practice is that words on the \fIvi\fP colon command line
+were subject to
+abbreviation expansion, including the arguments to the \fBabbrev\fP
+(and more interestingly) the \fBunabbrev\fP command. Because
+there are implementations that do not do abbreviation expansion for
+the first argument to those commands, this is permitted, but
+not required, by IEEE\ Std\ 1003.1-2001. However, the following sequence:
+.sp
+.RS
+.nf
+
+\fB:ab foo bar
+:ab foo baz
+\fP
+.fi
+.RE
+.LP
+resulted in the addition of an abbreviation of \fB"baz"\fP for the
+string \fB"bar"\fP in historical \fIex\fP/ \fIvi\fP, and the sequence:
+.sp
+.RS
+.nf
+
+\fB:ab foo1 bar
+:ab foo2 bar
+:unabbreviate foo2
+\fP
+.fi
+.RE
+.LP
+deleted the abbreviation \fB"foo1"\fP, not \fB"foo2"\fP . These behaviors
+are not permitted by
+IEEE\ Std\ 1003.1-2001 because they clearly violate the expectations
+of the user.
+.LP
+It was historical practice that <control>-V, not backslash, characters
+be interpreted as escaping subsequent characters in
+the \fBabbreviate\fP command. IEEE\ Std\ 1003.1-2001 requires conformance
+to historical practice; however, it should be
+noted that an abbreviation containing a <blank> will never work.
+.SS Append
+.LP
+Historically, any text following a vertical-line command separator
+after an \fBappend\fP, \fBchange\fP, or \fBinsert\fP
+command became part of the insert text. For example, in the command:
+.sp
+.RS
+.nf
+
+\fB:g/pattern/append|stuff1
+\fP
+.fi
+.RE
+.LP
+a line containing the text \fB"stuff1"\fP would be appended to each
+line matching pattern. It was also historically valid to
+enter:
+.sp
+.RS
+.nf
+
+\fB:append|stuff1
+stuff2
+\&.
+\fP
+.fi
+.RE
+.LP
+and the text on the \fIex\fP command line would be appended along
+with the text inserted after it. There was an historical bug,
+however, that the user had to enter two terminating lines (the \fB'.'\fP
+lines) to terminate text input mode in this case.
+IEEE\ Std\ 1003.1-2001 requires conformance to historical practice,
+but disallows the historical need for multiple
+terminating lines.
+.SS Change
+.LP
+See the RATIONALE for the \fBappend\fP command. Historical practice
+for cursor positioning after the change command when no
+text is input, is as described in IEEE\ Std\ 1003.1-2001. However,
+one System V implementation is known to have been
+modified such that the cursor is positioned on the first address specified,
+and not on the line before the first address.
+IEEE\ Std\ 1003.1-2001 disallows this modification for consistency.
+.LP
+Historically, the \fBchange\fP command did not support buffer arguments,
+although some implementations allow the specification
+of an optional buffer. This behavior is neither required nor disallowed
+by IEEE\ Std\ 1003.1-2001.
+.SS Change Directory
+.LP
+A common extension in \fIex\fP implementations is to use the elements
+of a \fBcdpath\fP edit option as prefix directories for
+\fIpath\fP arguments to \fBchdir\fP that are relative pathnames and
+that do not have \fB'.'\fP or \fB".."\fP as their first
+component. Elements in the \fBcdpath\fP edit option are colon-separated.
+The initial value of the \fBcdpath\fP edit option is the
+value of the shell \fICDPATH\fP environment variable. This feature
+was not included in IEEE\ Std\ 1003.1-2001 because it
+does not exist in any of the implementations considered historical
+practice.
+.SS Copy
+.LP
+Historical implementations of \fIex\fP permitted copies to lines inside
+of the specified range; for example, \fB:2,5copy3\fP
+was a valid command. IEEE\ Std\ 1003.1-2001 requires conformance to
+historical practice.
+.SS Delete
+.LP
+IEEE\ Std\ 1003.1-2001 requires support for the historical parsing
+of a \fBdelete\fP command followed by flags, without
+any intervening <blank>s. For example:
+.TP 7
+\fB1dp\fP
+Deletes the first line and prints the line that was second.
+.TP 7
+\fB1delep\fP
+As for \fB1dp\fP.
+.TP 7
+\fB1d\fP
+Deletes the first line, saving it in buffer \fIp\fP.
+.TP 7
+\fB1d\ p1l\fP
+(Pee-one-ell.) Deletes the first line, saving it in buffer \fIp\fP,
+and listing the line that was second.
+.sp
+.SS Edit
+.LP
+Historically, any \fIex\fP command could be entered as a \fB+\fP \fIcommand\fP
+argument to the \fBedit\fP command, although
+some (for example, \fBinsert\fP and \fBappend\fP) were known to confuse
+historical implementations. For consistency and
+simplicity of specification, IEEE\ Std\ 1003.1-2001 requires that
+any command be supported as an argument to the
+\fBedit\fP command.
+.LP
+Historically, the command argument was executed with the current line
+set to the last line of the file, regardless of whether
+the \fBedit\fP command was executed from visual mode or not. IEEE\ Std\ 1003.1-2001
+requires conformance to historical
+practice.
+.LP
+Historically, the \fB+\fP \fIcommand\fP specified to the \fBedit\fP
+and \fBnext\fP commands was delimited by the first
+<blank>, and there was no way to quote them. For consistency, IEEE\ Std\ 1003.1-2001
+requires that the usual
+\fIex\fP backslash quoting be provided.
+.LP
+Historically, specifying the \fB+\fP \fIcommand\fP argument to the
+edit command required a filename to be specified as well;
+for example, \fB:edit\ +100\fP would always fail. For consistency
+and simplicity of specification,
+IEEE\ Std\ 1003.1-2001 does not permit this usage to fail for that
+reason.
+.LP
+Historically, only the cursor position of the last file edited was
+remembered by the editor. IEEE\ Std\ 1003.1-2001
+requires that this be supported; however, implementations are permitted
+to remember and restore the cursor position for any file
+previously edited.
+.SS File
+.LP
+Historical versions of the \fIex\fP editor \fBfile\fP command displayed
+a current line and number of lines in the edit buffer
+of 0 when the file was empty, while the \fIvi\fP <control>-G command
+displayed a current
+line and number of lines in the edit buffer of 1 in the same situation.
+IEEE\ Std\ 1003.1-2001 does not permit this
+discrepancy, instead requiring that a message be displayed indicating
+that the file is empty.
+.SS Global
+.LP
+The two-pass operation of the \fBglobal\fP and \fBv\fP commands is
+not intended to imply implementation, only the required
+result of the operation.
+.LP
+The current line and column are set as specified for the individual
+\fIex\fP commands. This requirement is cumulative; that is,
+the current line and column must track across all the commands executed
+by the \fBglobal\fP or \fBv\fP commands.
+.SS Insert
+.LP
+See the RATIONALE for the \fBappend\fP command.
+.LP
+Historically, \fBinsert\fP could not be used with an address of zero;
+that is, not when the edit buffer was empty.
+IEEE\ Std\ 1003.1-2001 requires that this command behave consistently
+with the \fBappend\fP command.
+.SS Join
+.LP
+The action of the \fBjoin\fP command in relation to the special characters
+is only defined for the POSIX locale because the
+correct amount of white space after a period varies; in Japanese none
+is required, in French only a single space, and so on.
+.SS List
+.LP
+The historical output of the \fBlist\fP command was potentially ambiguous.
+The standard developers believed correcting this to
+be more important than adhering to historical practice, and IEEE\ Std\ 1003.1-2001
+requires unambiguous output.
+.SS Map
+.LP
+Historically, command mode maps only applied to command names; for
+example, if the character \fB'x'\fP was mapped to
+\fB'y'\fP, the command \fBfx\fP searched for the \fB'x'\fP character,
+not the \fB'y'\fP character.
+IEEE\ Std\ 1003.1-2001 requires this behavior. Historically, entering
+<control>-V as the first character of a \fIvi\fP command was an error.
+Several implementations have extended the semantics of \fIvi\fP such
+that <control>-V means that the subsequent command character is not
+mapped. This is
+permitted, but not required, by IEEE\ Std\ 1003.1-2001. Regardless,
+using <control>-V to escape the second or later
+character in a sequence of characters that might match a \fBmap\fP
+command, or any character in text input mode, is historical
+practice, and stops the entered keys from matching a map. IEEE\ Std\ 1003.1-2001
+requires conformance to historical
+practice.
+.LP
+Historical implementations permitted digits to be used as a \fBmap\fP
+command \fIlhs\fP, but then ignored the map.
+IEEE\ Std\ 1003.1-2001 requires that the mapped digits not be ignored.
+.LP
+The historical implementation of the \fBmap\fP command did not permit
+\fBmap\fP commands that were more than a single
+character in length if the first character was printable. This behavior
+is permitted, but not required, by
+IEEE\ Std\ 1003.1-2001.
+.LP
+Historically, mapped characters were remapped unless the \fBremap\fP
+edit option was not set, or the prefix of the mapped
+characters matched the mapping characters; for example, in the \fBmap\fP:
+.sp
+.RS
+.nf
+
+\fB:map ab abcd
+\fP
+.fi
+.RE
+.LP
+the characters \fB"ab"\fP were used as is and were not remapped, but
+the characters \fB"cd"\fP were mapped if appropriate.
+This can cause infinite loops in the \fIvi\fP mapping mechanisms.
+IEEE\ Std\ 1003.1-2001 requires conformance to historical practice,
+and that such loops be interruptible.
+.LP
+Text input maps had the same problems with expanding the \fIlhs\fP
+for the \fIex\fP \fBmap!\fP and \fBunmap!\fP command as
+did the \fIex\fP \fBabbreviate\fP and \fBunabbreviate\fP commands.
+See the RATIONALE for the \fIex\fP \fBabbreviate\fP
+command. IEEE\ Std\ 1003.1-2001 requires similar modification of some
+historical practice for the \fBmap\fP and
+\fBunmap\fP commands, as described for the \fBabbreviate\fP and \fBunabbreviate\fP
+commands.
+.LP
+Historically, \fBmap\fPs that were subsets of other \fBmap\fPs behaved
+differently depending on the order in which they were
+defined. For example:
+.sp
+.RS
+.nf
+
+\fB:map! ab short
+:map! abc long
+\fP
+.fi
+.RE
+.LP
+would always translate the characters \fB"ab"\fP to \fB"short"\fP,
+regardless of how fast the characters \fB"abc"\fP
+were entered. If the entry order was reversed:
+.sp
+.RS
+.nf
+
+\fB:map! abc long
+:map! ab short
+\fP
+.fi
+.RE
+.LP
+the characters \fB"ab"\fP would cause the editor to pause, waiting
+for the completing \fB'c'\fP character, and the
+characters might never be mapped to \fB"short"\fP . For consistency
+and simplicity of specification,
+IEEE\ Std\ 1003.1-2001 requires that the shortest match be used at
+all times.
+.LP
+The length of time the editor spends waiting for the characters to
+complete the \fIlhs\fP is unspecified because the timing
+capabilities of systems are often inexact and variable, and it may
+depend on other factors such as the speed of the connection. The
+time should be long enough for the user to be able to complete the
+sequence, but not long enough for the user to have to wait. Some
+implementations of \fIvi\fP have added a \fBkeytime\fP option, which
+permits users to set the
+number of 0,1 seconds the editor waits for the completing characters.
+Because mapped terminal function and cursor keys tend to
+start with an <ESC> character, and <ESC> is the key ending \fIvi\fP
+text input
+mode, \fBmap\fPs starting with <ESC> characters are generally exempted
+from this timeout period, or, at least timed out
+differently.
+.SS Mark
+.LP
+Historically, users were able to set the "previous context" marks
+explicitly. In addition, the \fIex\fP commands \fB"\fP
+and \fB'`\fP and the \fIvi\fP commands \fB"\fP, \fB``\fP, \fB`'\fP,
+and \fB'`\fP all
+referred to the same mark. In addition, the previous context marks
+were not set if the command, with which the address setting the
+mark was associated, failed. IEEE\ Std\ 1003.1-2001 requires conformance
+to historical practice. Historically, if marked
+lines were deleted, the mark was also deleted, but would reappear
+if the change was undone. IEEE\ Std\ 1003.1-2001 requires
+conformance to historical practice.
+.LP
+The description of the special events that set the \fB`\fP and \fB'\fP
+marks matches historical practice. For example,
+historically the command \fB/a/,/b/\fP did not set the \fB`\fP and
+\fB'\fP marks, but the command \fB/a/,/b/delete\fP did.
+.SS Next
+.LP
+Historically, any \fIex\fP command could be entered as a \fB+\fP \fIcommand\fP
+argument to the \fBnext\fP command, although
+some (for example, \fBinsert\fP and \fBappend\fP) were known to confuse
+historical implementations.
+IEEE\ Std\ 1003.1-2001 requires that any command be permitted and
+that it behave as specified. The \fBnext\fP command can
+accept more than one file, so usage such as:
+.sp
+.RS
+.nf
+
+\fBnext `ls [abc] `
+\fP
+.fi
+.RE
+.LP
+is valid; it need not be valid for the \fBedit\fP or \fBread\fP commands,
+for example, because they expect only one
+filename.
+.LP
+Historically, the \fBnext\fP command behaved differently from the
+\fB:rewind\fP command in that it ignored the force flag if
+the \fBautowrite\fP flag was set. For consistency, IEEE\ Std\ 1003.1-2001
+does not permit this behavior.
+.LP
+Historically, the \fBnext\fP command positioned the cursor as if the
+file had never been edited before, regardless.
+IEEE\ Std\ 1003.1-2001 does not permit this behavior, for consistency
+with the \fBedit\fP command.
+.LP
+Implementations wanting to provide a counterpart to the \fBnext\fP
+command that edited the previous file have used the command
+\fBprev[ious],\fP which takes no \fIfile\fP argument. IEEE\ Std\ 1003.1-2001
+does not require this command.
+.SS Open
+.LP
+Historically, the \fBopen\fP command would fail if the \fBopen\fP
+edit option was not set. IEEE\ Std\ 1003.1-2001 does
+not mention the \fBopen\fP edit option and does not require this behavior.
+Some historical implementations do not permit entering
+open mode from open or visual mode, only from \fIex\fP mode. For consistency,
+IEEE\ Std\ 1003.1-2001 does not permit this
+behavior.
+.LP
+Historically, entering open mode from the command line (that is, \fIvi\fP
+\fB+open\fP)
+resulted in anomalous behaviors; for example, the \fIex\fP file and
+\fIset\fP
+commands, and the \fIvi\fP command <control>-G did not work. For consistency,
+IEEE\ Std\ 1003.1-2001 does not permit this behavior.
+.LP
+Historically, the \fBopen\fP command only permitted \fB'/'\fP characters
+to be used as the search pattern delimiter. For
+consistency, IEEE\ Std\ 1003.1-2001 requires that the search delimiters
+used by the \fBs\fP, \fBglobal\fP, and \fBv\fP
+commands be accepted as well.
+.SS Preserve
+.LP
+The \fBpreserve\fP command does not historically cause the file to
+be considered unmodified for the purposes of future commands
+that may exit the editor. IEEE\ Std\ 1003.1-2001 requires conformance
+to historical practice.
+.LP
+Historical documentation stated that mail was not sent to the user
+when preserve was executed; however, historical
+implementations did send mail in this case. IEEE\ Std\ 1003.1-2001
+requires conformance to the historical
+implementations.
+.SS Print
+.LP
+The writing of NUL by the \fBprint\fP command is not specified as
+a special case because the standard developers did not want
+to require \fIex\fP to support NUL characters. Historically, characters
+were displayed using the ARPA standard mappings, which are
+as follows:
+.IP " 1." 4
+Printable characters are left alone.
+.LP
+.IP " 2." 4
+Control characters less than \\177 are represented as \fB'^'\fP followed
+by the character offset from the \fB'@'\fP
+character in the ASCII map; for example, \\007 is represented as \fB'^G'\fP
+\&.
+.LP
+.IP " 3." 4
+\\177 is represented as \fB'^'\fP followed by \fB'?'\fP .
+.LP
+.LP
+The display of characters having their eighth bit set was less standard.
+Existing implementations use hex (0x00), octal (\\000),
+and a meta-bit display. (The latter displayed bytes that had their
+eighth bit set as the two characters \fB"M-"\fP followed by
+the seven-bit display as described above.) The latter probably has
+the best claim to historical practice because it was used for
+the \fB-v\fP option of 4 BSD and 4 BSD-derived versions of the \fIcat\fP
+utility since
+1980.
+.LP
+No specific display format is required by IEEE\ Std\ 1003.1-2001.
+.LP
+Explicit dependence on the ASCII character set has been avoided where
+possible, hence the use of the phrase an
+"implementation-defined multi-character sequence" for the display
+of non-printable characters in preference to the historical
+usage of, for instance, \fB"^I"\fP for the <tab>. Implementations
+are encouraged to conform to historical practice in the
+absence of any strong reason to diverge.
+.LP
+Historically, all \fIex\fP commands beginning with the letter \fB'p'\fP
+could be entered using capitalized versions of the
+commands; for example, \fBP[rint]\fP, \fBPre[serve]\fP, and \fBPu[t]\fP
+were all valid command names.
+IEEE\ Std\ 1003.1-2001 permits, but does not require, this historical
+practice because capital forms of the commands are
+used by some implementations for other purposes.
+.SS Put
+.LP
+Historically, an \fIex\fP \fBput\fP command, executed from open or
+visual mode, was the same as the open or visual mode
+\fBP\fP command, if the buffer was named and was cut in character
+mode, and the same as the \fBp\fP command if the buffer was
+named and cut in line mode. If the unnamed buffer was the source of
+the text, the entire line from which the text was taken was
+usually \fBput\fP, and the buffer was handled as if in line mode,
+but it was possible to get extremely anomalous behavior. In
+addition, using the \fBQ\fP command to switch into \fIex\fP mode,
+and then doing a \fBput\fP often resulted in errors as well,
+such as appending text that was unrelated to the (supposed) contents
+of the buffer. For consistency and simplicity of
+specification, IEEE\ Std\ 1003.1-2001 does not permit these behaviors.
+All \fIex\fP \fBput\fP commands are required to
+operate in line mode, and the contents of the buffers are not altered
+by changing the mode of the editor.
+.SS Read
+.LP
+Historically, an \fIex\fP \fBread\fP command executed from open or
+visual mode, executed in an empty file, left an empty line
+as the first line of the file. For consistency and simplicity of specification,
+IEEE\ Std\ 1003.1-2001 does not permit this
+behavior. Historically, a \fBread\fP in open or visual mode from a
+program left the cursor at the last line read in, not the
+first. For consistency, IEEE\ Std\ 1003.1-2001 does not permit this
+behavior.
+.LP
+Historical implementations of \fIex\fP were unable to undo \fBread\fP
+commands that read from the output of a program. For
+consistency, IEEE\ Std\ 1003.1-2001 does not permit this behavior.
+.LP
+Historically, the \fIex\fP and \fIvi\fP message after a successful
+\fBread\fP or
+\fBwrite\fP command specified "characters", not "bytes". IEEE\ Std\ 1003.1-2001
+requires that the number of bytes be
+displayed, not the number of characters, because it may be difficult
+in multi-byte implementations to determine the number of
+characters read. Implementations are encouraged to clarify the message
+displayed to the user.
+.LP
+Historically, reads were not permitted on files other than type regular,
+except that FIFO files could be read (probably only
+because they did not exist when \fIex\fP and \fIvi\fP were originally
+written). Because the
+historical \fIex\fP evaluated \fBread!\fP and \fBread\ !\fP equivalently,
+there can be no optional way to force the read.
+IEEE\ Std\ 1003.1-2001 permits, but does not require, this behavior.
+.SS Recover
+.LP
+Some historical implementations of the editor permitted users to recover
+the edit buffer contents from a previous edit session,
+and then exit without saving those contents (or explicitly discarding
+them). The intent of IEEE\ Std\ 1003.1-2001 in
+requiring that the edit buffer be treated as already modified is to
+prevent this user error.
+.SS Rewind
+.LP
+Historical implementations supported the \fBrewind\fP command when
+the user was editing the first file in the list; that is,
+the file that the \fBrewind\fP command would edit. IEEE\ Std\ 1003.1-2001
+requires conformance to historical practice.
+.SS Substitute
+.LP
+Historically, \fIex\fP accepted an \fBr\fP option to the \fBs\fP command.
+The effect of the \fBr\fP option was to use the
+last regular expression used in any command as the pattern, the same
+as the \fB~\fP command. The \fBr\fP option is not
+required by IEEE\ Std\ 1003.1-2001. Historically, the \fBc\fP and
+\fBg\fP options were toggled; for example, the command
+\fB:s/abc/def/\fP was the same as \fBs/abc/def/ccccgggg\fP. For simplicity
+of specification, IEEE\ Std\ 1003.1-2001 does
+not permit this behavior.
+.LP
+The tilde command is often used to replace the last search RE. For
+example, in the sequence:
+.sp
+.RS
+.nf
+
+\fBs/red/blue/
+/green
+~
+\fP
+.fi
+.RE
+.LP
+the \fB~\fP command is equivalent to:
+.sp
+.RS
+.nf
+
+\fBs/green/blue/
+\fP
+.fi
+.RE
+.LP
+Historically, \fIex\fP accepted all of the following forms:
+.sp
+.RS
+.nf
+
+\fBs/abc/def/
+s/abc/def
+s/abc/
+s/abc
+\fP
+.fi
+.RE
+.LP
+IEEE\ Std\ 1003.1-2001 requires conformance to this historical practice.
+.LP
+The \fBs\fP command presumes that the \fB'^'\fP character only occupies
+a single column in the display. Much of the
+\fIex\fP and \fIvi\fP specification presumes that the <space> only
+occupies a single
+column in the display. There are no known character sets for which
+this is not true.
+.LP
+Historically, the final column position for the substitute commands
+was based on previous column movements; a search for a
+pattern followed by a substitution would leave the column position
+unchanged, while a 0 command followed by a substitution would
+change the column position to the first non- <blank>. For consistency
+and simplicity of specification,
+IEEE\ Std\ 1003.1-2001 requires that the final column position always
+be set to the first non- <blank>.
+.SS Set
+.LP
+Historical implementations redisplayed all of the options for each
+occurrence of the \fBall\fP keyword.
+IEEE\ Std\ 1003.1-2001 permits, but does not require, this behavior.
+.SS Tag
+.LP
+No requirement is made as to where \fIex\fP and \fIvi\fP shall look
+for the file referenced
+by the tag entry. Historical practice has been to look for the path
+found in the \fBtags\fP file, based on the current directory.
+A useful extension found in some implementations is to look based
+on the directory containing the tags file that held the entry, as
+well. No requirement is made as to which reference for the tag in
+the tags file is used. This is deliberate, in order to permit
+extensions such as multiple entries in a tags file for a tag.
+.LP
+Because users often specify many different tags files, some of which
+need not be relevant or exist at any particular time,
+IEEE\ Std\ 1003.1-2001 requires that error messages about problem
+tags files be displayed only if the requested tag is not
+found, and then, only once for each time that the \fBtag\fP edit option
+is changed.
+.LP
+The requirement that the current edit buffer be unmodified is only
+necessary if the file indicated by the tag entry is not the
+same as the current file (as defined by the current pathname). Historically,
+the file would be reloaded if the filename had
+changed, as well as if the filename was different from the current
+pathname. For consistency and simplicity of specification,
+IEEE\ Std\ 1003.1-2001 does not permit this behavior, requiring that
+the name be the only factor in the decision.
+.LP
+Historically, \fIvi\fP only searched for tags in the current file
+from the current cursor to
+the end of the file, and therefore, if the \fBwrapscan\fP option was
+not set, tags occurring before the current cursor were not
+found. IEEE\ Std\ 1003.1-2001 considers this a bug, and implementations
+are required to search for the first occurrence in
+the file, regardless.
+.SS Undo
+.LP
+The \fBundo\fP description deliberately uses the word "modified".
+The \fBundo\fP command is not intended to undo commands
+that replace the contents of the edit buffer, such as \fBedit\fP,
+\fBnext\fP, \fBtag\fP, or \fBrecover\fP.
+.LP
+Cursor positioning after the \fBundo\fP command was inconsistent in
+the historical \fIvi\fP, sometimes attempting to restore the original
+cursor position ( \fBglobal\fP, \fBundo\fP,
+and \fBv\fP commands), and sometimes, in the presence of maps, placing
+the cursor on the last line added or changed instead of the
+first. IEEE\ Std\ 1003.1-2001 requires a simplified behavior for consistency
+and simplicity of specification.
+.SS Version
+.LP
+The \fBversion\fP command cannot be exactly specified since there
+is no widely-accepted definition of what the version
+information should contain. Implementations are encouraged to do something
+reasonably intelligent.
+.SS Write
+.LP
+Historically, the \fIex\fP and \fIvi\fP message after a successful
+\fBread\fP or
+\fBwrite\fP command specified "characters", not "bytes". IEEE\ Std\ 1003.1-2001
+requires that the number of bytes be
+displayed, not the number of characters because it may be difficult
+in multi-byte implementations to determine the number of
+characters written. Implementations are encouraged to clarify the
+message displayed to the user.
+.LP
+Implementation-defined tests are permitted so that implementations
+can make additional checks; for example, for locks or file
+modification times.
+.LP
+Historically, attempting to append to a nonexistent file caused an
+error. It has been left unspecified in
+IEEE\ Std\ 1003.1-2001 to permit implementations to let the \fBwrite\fP
+succeed, so that the append semantics are similar
+to those of the historical \fIcsh\fP.
+.LP
+Historical \fIvi\fP permitted empty edit buffers to be written. However,
+since the way \fIvi\fP got around dealing with "empty" files was to
+always have a line in the edit buffer, no
+matter what, it wrote them as files of a single, empty line. IEEE\ Std\ 1003.1-2001
+does not permit this behavior.
+.LP
+Historically, \fIex\fP restored standard output and standard error
+to their values as of when \fIex\fP was invoked, before
+writes to programs were performed. This could disturb the terminal
+configuration as well as be a security issue for some terminals.
+IEEE\ Std\ 1003.1-2001 does not permit this, requiring that the program
+output be captured and displayed as if by the
+\fIex\fP \fBprint\fP command.
+.SS Adjust Window
+.LP
+Historically, the line count was set to the value of the \fBscroll\fP
+option if the type character was end-of-file. This
+feature was broken on most historical implementations long ago, however,
+and is not documented anywhere. For this reason,
+IEEE\ Std\ 1003.1-2001 is resolutely silent.
+.LP
+Historically, the \fBz\fP command was <blank>-sensitive and \fBz\ +\fP
+and \fBz\ -\fP did different things than
+\fBz+\fP and \fBz-\fP because the type could not be distinguished
+from a flag. (The commands \fBz\\fP. and \fBz\ =\fP
+were historically invalid.) IEEE\ Std\ 1003.1-2001 requires conformance
+to this historical practice.
+.LP
+Historically, the \fBz\fP command was further <blank>-sensitive in
+that the \fIcount\fP could not be
+<blank>-delimited; for example, the commands \fBz=\ 5\fP and \fBz-\ 5\fP
+were also invalid. Because the
+\fIcount\fP is not ambiguous with respect to either the type character
+or the flags, this is not permitted by
+IEEE\ Std\ 1003.1-2001.
+.SS Escape
+.LP
+Historically, \fIex\fP filter commands only read the standard output
+of the commands, letting standard error appear on the
+terminal as usual. The \fIvi\fP utility, however, read both standard
+output and standard error.
+IEEE\ Std\ 1003.1-2001 requires the latter behavior for both \fIex\fP
+and \fIvi\fP,
+for consistency.
+.SS Shift Left and Shift Right
+.LP
+Historically, it was possible to add shift characters to increase
+the effect of the command; for example, \fB<<<\fP
+outdented (or \fB>>>\fP indented) the lines 3 levels of indentation
+instead of the default 1.
+IEEE\ Std\ 1003.1-2001 requires conformance to historical practice.
+.SS <control>-D
+.LP
+Historically, the <control>-D command erased the prompt, providing
+the user with an unbroken presentation of lines from
+the edit buffer. This is not required by IEEE\ Std\ 1003.1-2001; implementations
+are encouraged to provide it if possible.
+Historically, the <control>-D command took, and then ignored, a \fIcount\fP.
+IEEE\ Std\ 1003.1-2001 does not permit
+this behavior.
+.SS Write Line Number
+.LP
+Historically, the \fIex\fP \fB=\fP command, when executed in \fIex\fP
+mode in an empty edit buffer, reported 0, and from open
+or visual mode, reported 1. For consistency and simplicity of specification,
+IEEE\ Std\ 1003.1-2001 does not permit this
+behavior.
+.SS Execute
+.LP
+Historically, \fIex\fP did not correctly handle the inclusion of text
+input commands (that is, \fBappend\fP, \fBinsert\fP,
+and \fBchange\fP) in executed buffers. IEEE\ Std\ 1003.1-2001 does
+not permit this exclusion for consistency.
+.LP
+Historically, the logical contents of the buffer being executed did
+not change if the buffer itself were modified by the
+commands being executed; that is, buffer execution did not support
+self-modifying code. IEEE\ Std\ 1003.1-2001 requires
+conformance to historical practice.
+.LP
+Historically, the \fB@\fP command took a range of lines, and the \fB@\fP
+buffer was executed once per line, with the current
+line ( \fB'.'\fP ) set to each specified line. IEEE\ Std\ 1003.1-2001
+requires conformance to historical practice.
+.LP
+Some historical implementations did not notice if errors occurred
+during buffer execution. This, coupled with the ability to
+specify a range of lines for the \fIex\fP \fB@\fP command, makes it
+trivial to cause them to drop \fBcore\fP.
+IEEE\ Std\ 1003.1-2001 requires that implementations stop buffer execution
+if any error occurs, if the specified line
+doesn't exist, or if the contents of the edit buffer itself are replaced
+(for example, the buffer executes the \fIex\fP
+\fB:edit\fP command).
+.SS Regular Expressions in ex
+.LP
+Historical practice is that the characters in the replacement part
+of the last \fBs\fP command-that is, those matched by
+entering a \fB'~'\fP in the regular expression-were not further expanded
+by the regular expression engine. So, if the
+characters contained the string \fB"a.,"\fP they would match \fB'a'\fP
+followed by \fB".,"\fP and not \fB'a'\fP
+followed by any character. IEEE\ Std\ 1003.1-2001 requires conformance
+to historical practice.
+.SS Edit Options in ex
+.LP
+The following paragraphs describe the historical behavior of some
+edit options that were not, for whatever reason, included in
+IEEE\ Std\ 1003.1-2001. Implementations are strongly encouraged to
+only use these names if the functionality described here
+is fully supported.
+.TP 7
+\fBextended\fP
+The \fBextended\fP edit option has been used in some implementations
+of \fIvi\fP to
+provide extended regular expressions instead of basic regular expressions
+This option was omitted from
+IEEE\ Std\ 1003.1-2001 because it is not widespread historical practice.
+.TP 7
+\fBflash\fP
+The \fBflash\fP edit option historically caused the screen to flash
+instead of beeping on error. This option was omitted from
+IEEE\ Std\ 1003.1-2001 because it is not found in some historical
+implementations.
+.TP 7
+\fBhardtabs\fP
+The \fBhardtabs\fP edit option historically defined the number of
+columns between hardware tab settings. This option was
+omitted from IEEE\ Std\ 1003.1-2001 because it was believed to no
+longer be generally useful.
+.TP 7
+\fBmodeline\fP
+The \fBmodeline\fP (sometimes named \fBmodelines\fP) edit option historically
+caused \fIex\fP or \fIvi\fP to read the five first and last lines
+of the file for editor commands. This option is a
+security problem, and vendors are strongly encouraged to delete it
+from historical implementations.
+.TP 7
+\fBopen\fP
+The \fBopen\fP edit option historically disallowed the \fIex\fP \fBopen\fP
+and \fBvisual\fP commands. This edit option was
+omitted because these commands are required by IEEE\ Std\ 1003.1-2001.
+.TP 7
+\fBoptimize\fP
+The \fBoptimize\fP edit option historically expedited text throughput
+by setting the terminal to not do automatic
+<carriage-return>s when printing more than one logical line of output.
+This option was omitted from
+IEEE\ Std\ 1003.1-2001 because it was intended for terminals without
+addressable cursors, which are rarely, if ever, still
+used.
+.TP 7
+\fBruler\fP
+The \fBruler\fP edit option has been used in some implementations
+of \fIvi\fP to present a
+current row/column ruler for the user. This option was omitted from
+IEEE\ Std\ 1003.1-2001 because it is not widespread
+historical practice.
+.TP 7
+\fBsourceany\fP
+The \fBsourceany\fP edit option historically caused \fIex\fP or \fIvi\fP
+to source
+start-up files that were owned by users other than the user running
+the editor. This option is a security problem, and vendors are
+strongly encouraged to remove it from their implementations.
+.TP 7
+\fBtimeout\fP
+The \fBtimeout\fP edit option historically enabled the (now standard)
+feature of only waiting for a short period before
+returning keys that could be part of a macro. This feature was omitted
+from IEEE\ Std\ 1003.1-2001 because its behavior is
+now standard, it is not widely useful, and it was rarely documented.
+.TP 7
+\fBverbose\fP
+The \fBverbose\fP edit option has been used in some implementations
+of \fIvi\fP to cause
+\fIvi\fP to output error messages for common errors; for example,
+attempting to move the cursor
+past the beginning or end of the line instead of only alerting the
+screen. (The historical \fIvi\fP only alerted the terminal and presented
+no message for such errors. The historical editor
+option \fBterse\fP did not select when to present error messages,
+it only made existing error messages more or less verbose.) This
+option was omitted from IEEE\ Std\ 1003.1-2001 because it is not widespread
+historical practice; however, implementors are
+encouraged to use it if they wish to provide error messages for naive
+users.
+.TP 7
+\fBwraplen\fP
+The \fBwraplen\fP edit option has been used in some implementations
+of \fIvi\fP to specify
+an automatic margin measured from the left margin instead of from
+the right margin. This is useful when multiple screen sizes are
+being used to edit a single file. This option was omitted from IEEE\ Std\ 1003.1-2001
+because it is not widespread
+historical practice; however, implementors are encouraged to use it
+if they add this functionality.
+.sp
+.SS autoindent, ai
+.LP
+Historically, the command \fB0a\fP did not do any autoindentation,
+regardless of the current indentation of line 1.
+IEEE\ Std\ 1003.1-2001 requires that any indentation present in line
+1 be used.
+.SS autoprint, ap
+.LP
+Historically, the \fBautoprint\fP edit option was not completely consistent
+or based solely on modifications to the edit
+buffer. Exceptions were the \fBread\fP command (when reading from
+a file, but not from a filter), the \fBappend\fP,
+\fBchange\fP, \fBinsert\fP, \fBglobal\fP, and \fBv\fP commands, all
+of which were not affected by \fBautoprint\fP, and the
+\fBtag\fP command, which was affected by \fBautoprint\fP. IEEE\ Std\ 1003.1-2001
+requires conformance to historical
+practice.
+.LP
+Historically, the \fBautoprint\fP option only applied to the last
+of multiple commands entered using vertical-bar delimiters;
+for example, \fBdelete\fP <newline> was affected by \fBautoprint\fP,
+but \fBdelete|version\fP <newline> was not.
+IEEE\ Std\ 1003.1-2001 requires conformance to historical practice.
+.SS autowrite, aw
+.LP
+Appending the \fB'!'\fP character to the \fIex\fP \fBnext\fP command
+to avoid performing an automatic write was not
+supported in historical implementations. IEEE\ Std\ 1003.1-2001 requires
+that the behavior match the other \fIex\fP
+commands for consistency.
+.SS ignorecase, ic
+.LP
+Historical implementations of case-insensitive matching (the \fBignorecase\fP
+edit option) lead to counterintuitive situations
+when uppercase characters were used in range expressions. Historically,
+the process was as follows:
+.IP " 1." 4
+Take a line of text from the edit buffer.
+.LP
+.IP " 2." 4
+Convert uppercase to lowercase in text line.
+.LP
+.IP " 3." 4
+Convert uppercase to lowercase in regular expressions, except in character
+class specifications.
+.LP
+.IP " 4." 4
+Match regular expressions against text.
+.LP
+.LP
+This would mean that, with \fBignorecase\fP in effect, the text:
+.sp
+.RS
+.nf
+
+\fBThe cat sat on the mat
+\fP
+.fi
+.RE
+.LP
+would be matched by
+.sp
+.RS
+.nf
+
+\fB/^the/
+\fP
+.fi
+.RE
+.LP
+but not by:
+.sp
+.RS
+.nf
+
+\fB/^[A-Z]he/
+\fP
+.fi
+.RE
+.LP
+For consistency with other commands implementing regular expressions,
+IEEE\ Std\ 1003.1-2001 does not permit this
+behavior.
+.SS paragraphs, para
+.LP
+The ISO\ POSIX-2:1993 standard made the default \fBparagraphs\fP and
+\fBsections\fP edit options implementation-defined,
+arguing they were historically oriented to the UNIX system \fItroff\fP
+text formatter, and a "portable user" could use the
+\fB{\fP, \fB}\fP, \fB[[\fP, \fB]]\fP, \fB(\fP, and \fB)\fP commands
+in open or visual mode and have the cursor stop in
+unexpected places. IEEE\ Std\ 1003.1-2001 specifies their values in
+the POSIX locale because the unusual grouping (they
+only work when grouped into two characters at a time) means that they
+cannot be used for general-purpose movement, regardless.
+.SS readonly
+.LP
+Implementations are encouraged to provide the best possible information
+to the user as to the read-only status of the file, with
+the exception that they should not consider the current special privileges
+of the process. This provides users with a safety net
+because they must force the overwrite of read-only files, even when
+running with additional privileges.
+.LP
+The \fBreadonly\fP edit option specification largely conforms to historical
+practice. The only difference is that historical
+implementations did not notice that the user had set the \fBreadonly\fP
+edit option in cases where the file was already marked
+read-only for some reason, and would therefore reinitialize the \fBreadonly\fP
+edit option the next time the contents of the edit
+buffer were replaced. This behavior is disallowed by IEEE\ Std\ 1003.1-2001.
+.SS report
+.LP
+The requirement that lines copied to a buffer interact differently
+than deleted lines is historical practice. For example, if
+the \fBreport\fP edit option is set to 3, deleting 3 lines will cause
+a report to be written, but 4 lines must be copied before a
+report is written.
+.LP
+The requirement that the \fIex\fP \fBglobal\fP, \fBv\fP, \fBopen\fP,
+\fBundo\fP, and \fBvisual\fP commands present reports
+based on the total number of lines added or deleted during the command
+execution, and that commands executed by the \fBglobal\fP
+and \fBv\fP commands not present reports, is historical practice.
+IEEE\ Std\ 1003.1-2001 extends historical practice by
+requiring that buffer execution be treated similarly. The reasons
+for this are two-fold. Historically, only the report by the last
+command executed from the buffer would be seen by the user, as each
+new report would overwrite the last. In addition, the standard
+developers believed that buffer execution had more in common with
+\fBglobal\fP and \fBv\fP commands than it did with other
+\fIex\fP commands, and should behave similarly, for consistency and
+simplicity of specification.
+.SS showmatch, sm
+.LP
+The length of time the cursor spends on the matching character is
+unspecified because the timing capabilities of systems are
+often inexact and variable. The time should be long enough for the
+user to notice, but not long enough for the user to become
+annoyed. Some implementations of \fIvi\fP have added a \fBmatchtime\fP
+option that permits
+users to set the number of 0,1 second intervals the cursor pauses
+on the matching character.
+.SS showmode
+.LP
+The \fBshowmode\fP option has been used in some historical implementations
+of \fIex\fP and \fIvi\fP to display the current editing mode when
+in open or visual mode. The editing modes have
+generally included "command" and "input", and sometimes other modes
+such as "replace" and "change". The string was usually
+displayed on the bottom line of the screen at the far right-hand corner.
+In addition, a preceding \fB'*'\fP character often
+denoted whether the contents of the edit buffer had been modified.
+The latter display has sometimes been part of the
+\fBshowmode\fP option, and sometimes based on another option. This
+option was not available in the 4 BSD historical implementation
+of \fIvi\fP, but was viewed as generally useful, particularly to novice
+users, and is required
+by IEEE\ Std\ 1003.1-2001.
+.LP
+The \fBsmd\fP shorthand for the \fBshowmode\fP option was not present
+in all historical implementations of the editor.
+IEEE\ Std\ 1003.1-2001 requires it, for consistency.
+.LP
+Not all historical implementations of the editor displayed a mode
+string for command mode, differentiating command mode from
+text input mode by the absence of a mode string. IEEE\ Std\ 1003.1-2001
+permits this behavior for consistency with
+historical practice, but implementations are encouraged to provide
+a display string for both modes.
+.SS slowopen
+.LP
+Historically the \fBslowopen\fP option was automatically set if the
+terminal baud rate was less than 1200 baud, or if the baud
+rate was 1200 baud and the \fBredraw\fP option was not set. The \fBslowopen\fP
+option had two effects. First, when inserting
+characters in the middle of a line, characters after the cursor would
+not be pushed ahead, but would appear to be overwritten.
+Second, when creating a new line of text, lines after the current
+line would not be scrolled down, but would appear to be
+overwritten. In both cases, ending text input mode would cause the
+screen to be refreshed to match the actual contents of the edit
+buffer. Finally, terminals that were sufficiently intelligent caused
+the editor to ignore the \fBslowopen\fP option.
+IEEE\ Std\ 1003.1-2001 permits most historical behavior, extending
+historical practice to require \fBslowopen\fP behaviors
+if the edit option is set by the user.
+.SS tags
+.LP
+The default path for tags files is left unspecified as implementations
+may have their own \fBtags\fP implementations that do
+not correspond to the historical ones. The default \fBtags\fP option
+value should probably at least include the file
+\fB\&./tags\fP.
+.SS term
+.LP
+Historical implementations of \fIex\fP and \fIvi\fP ignored changes
+to the \fBterm\fP edit
+option after the initial terminal information was loaded. This is
+permitted by IEEE\ Std\ 1003.1-2001; however,
+implementations are encouraged to permit the user to modify their
+terminal type at any time.
+.SS terse
+.LP
+Historically, the \fBterse\fP edit option optionally provided a shorter,
+less descriptive error message, for some error
+messages. This is permitted, but not required, by IEEE\ Std\ 1003.1-2001.
+Historically, most common visual mode errors (for
+example, trying to move the cursor past the end of a line) did not
+result in an error message, but simply alerted the terminal.
+Implementations wishing to provide messages for novice users are urged
+to do so based on the \fBedit\fP option \fBverbose\fP, and
+not \fBterse\fP.
+.SS window
+.LP
+In historical implementations, the default for the \fBwindow\fP edit
+option was based on the baud rate as follows:
+.IP " 1." 4
+If the baud rate was less than 1200, the \fBedit\fP option \fBw300\fP
+set the window value; for example, the line:
+.sp
+.RS
+.nf
+
+\fBset w300=12
+\fP
+.fi
+.RE
+.LP
+would set the window option to 12 if the baud rate was less than 1200.
+.LP
+.IP " 2." 4
+If the baud rate was equal to 1200, the \fBedit\fP option \fBw1200\fP
+set the window value.
+.LP
+.IP " 3." 4
+If the baud rate was greater than 1200, the \fBedit\fP option \fBw9600\fP
+set the window value.
+.LP
+.LP
+The \fBw300\fP, \fBw1200\fP, and \fBw9600\fP options do not appear
+in IEEE\ Std\ 1003.1-2001 because of their
+dependence on specific baud rates.
+.LP
+In historical implementations, the size of the window displayed by
+various commands was related to, but not necessarily the same
+as, the \fBwindow\fP edit option. For example, the size of the window
+was set by the \fIex\fP command \fBvisual 10\fP, but it
+did not change the value of the \fBwindow\fP edit option. However,
+changing the value of the \fBwindow\fP edit option did change
+the number of lines that were displayed when the screen was repainted.
+IEEE\ Std\ 1003.1-2001 does not permit this behavior
+in the interests of consistency and simplicity of specification, and
+requires that all commands that change the number of lines
+that are displayed do it by setting the value of the \fBwindow\fP
+edit option.
+.SS wrapmargin, wm
+.LP
+Historically, the \fBwrapmargin\fP option did not affect maps inserting
+characters that also had associated \fIcount\fPs; for
+example \fB:map\ K\ 5aABC\ DEF\fP. Unfortunately, there are widely
+used maps that depend on this behavior. For
+consistency and simplicity of specification, IEEE\ Std\ 1003.1-2001
+does not permit this behavior.
+.LP
+Historically, \fBwrapmargin\fP was calculated using the column display
+width of all characters on the screen. For example, an
+implementation using \fB"^I"\fP to represent <tab>s when the \fBlist\fP
+edit option was set, where \fB'^'\fP and
+\fB'I'\fP each took up a single column on the screen, would calculate
+the \fBwrapmargin\fP based on a value of 2 for each
+<tab>. The \fBnumber\fP edit option similarly changed the effective
+length of the line as well.
+IEEE\ Std\ 1003.1-2001 requires conformance to historical practice.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fICommand Search and Execution\fP, \fIctags\fP, \fIed\fP, \fIsed\fP,
+\fIsh\fP, \fIstty\fP, \fIvi\fP, the System Interfaces volume
+of IEEE\ Std\ 1003.1-2001, \fIaccess\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/exec.1p b/man-pages-posix-2003/man1p/exec.1p
new file mode 100644
index 0000000..4f7539a
--- /dev/null
+++ b/man-pages-posix-2003/man1p/exec.1p
@@ -0,0 +1,162 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "EXEC" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" exec
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+exec \- execute commands and open, close, or copy file descriptors
+.SH SYNOPSIS
+.LP
+\fBexec\fP \fB[\fP\fIcommand\fP \fB[\fP\fIargument\fP \fB...\fP\fB]]\fP
+.SH DESCRIPTION
+.LP
+The \fIexec\fP utility shall open, close, and/or copy file descriptors
+as specified by any redirections as part of the
+command.
+.LP
+If \fIexec\fP is specified without \fIcommand\fP or \fIargument\fPs,
+and any file descriptors with numbers greater than 2 are
+opened with associated redirection statements, it is unspecified whether
+those file descriptors remain open when the shell invokes
+another utility. Scripts concerned that child shells could misuse
+open file descriptors can always close them explicitly, as shown
+in one of the following examples.
+.LP
+If \fIexec\fP is specified with \fIcommand\fP, it shall replace the
+shell with \fIcommand\fP without creating a new process.
+If \fIargument\fPs are specified, they shall be arguments to \fIcommand\fP.
+Redirection affects the current shell execution
+environment.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+See the DESCRIPTION.
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+None.
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+If \fIcommand\fP is specified, \fIexec\fP shall not return to the
+shell; rather, the exit status of the process shall be the
+exit status of the program implementing \fIcommand\fP, which overlaid
+the shell. If \fIcommand\fP is not found, the exit status
+shall be 127. If \fIcommand\fP is found, but it is not an executable
+utility, the exit status shall be 126. If a redirection error
+occurs (see \fIConsequences of Shell Errors\fP ), the shell shall
+exit with a value in
+the range 1-125. Otherwise, \fIexec\fP shall return a zero exit status.
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+Open \fIreadfile\fP as file descriptor 3 for reading:
+.sp
+.RS
+.nf
+
+\fBexec 3< readfile
+\fP
+.fi
+.RE
+.LP
+Open \fIwritefile\fP as file descriptor 4 for writing:
+.sp
+.RS
+.nf
+
+\fBexec 4> writefile
+\fP
+.fi
+.RE
+.LP
+Make file descriptor 5 a copy of file descriptor 0:
+.sp
+.RS
+.nf
+
+\fBexec 5<&0
+\fP
+.fi
+.RE
+.LP
+Close file descriptor 3:
+.sp
+.RS
+.nf
+
+\fBexec 3<&-
+\fP
+.fi
+.RE
+.LP
+Cat the file \fBmaggie\fP by replacing the current shell with the
+\fIcat\fP utility:
+.sp
+.RS
+.nf
+
+\fBexec cat maggie
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+Most historical implementations were not conformant in that:
+.sp
+.RS
+.nf
+
+\fBfoo=bar exec cmd
+\fP
+.fi
+.RE
+.LP
+did not pass \fBfoo\fP to \fBcmd\fP.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fISpecial Built-In Utilities\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/exit.1p b/man-pages-posix-2003/man1p/exit.1p
new file mode 100644
index 0000000..0fb1e1a
--- /dev/null
+++ b/man-pages-posix-2003/man1p/exit.1p
@@ -0,0 +1,123 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "EXIT" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" exit
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+exit \- cause the shell to exit
+.SH SYNOPSIS
+.LP
+\fBexit\fP \fB[\fP\fIn\fP\fB]\fP
+.SH DESCRIPTION
+.LP
+The \fIexit\fP utility shall cause the shell to exit with the exit
+status specified by the unsigned decimal integer \fIn\fP.
+If \fIn\fP is specified, but its value is not between 0 and 255 inclusively,
+the exit status is undefined.
+.LP
+A \fItrap\fP on \fBEXIT\fP shall be executed before the shell terminates,
+except when the
+\fIexit\fP utility is invoked in that \fItrap\fP itself, in which
+case the shell shall exit
+immediately.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+See the DESCRIPTION.
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+None.
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The exit status shall be \fIn\fP, if specified. Otherwise, the value
+shall be the exit value of the last command executed, or
+zero if no command was executed. When \fIexit\fP is executed in a
+\fItrap\fP action, the
+last command is considered to be the command that executed immediately
+preceding the \fItrap\fP action.
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+Exit with a \fItrue\fP value:
+.sp
+.RS
+.nf
+
+\fBexit 0
+\fP
+.fi
+.RE
+.LP
+Exit with a \fIfalse\fP value:
+.sp
+.RS
+.nf
+
+\fBexit 1
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+As explained in other sections, certain exit status values have been
+reserved for special uses and should be used by
+applications only for those purposes:
+.TP 7
+\ 126
+A file to be executed was found, but it was not an executable utility.
+.TP 7
+\ 127
+A utility to be executed was not found.
+.TP 7
+>128
+A command was interrupted by a signal.
+.sp
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fISpecial Built-In Utilities\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/expand.1p b/man-pages-posix-2003/man1p/expand.1p
new file mode 100644
index 0000000..deef86b
--- /dev/null
+++ b/man-pages-posix-2003/man1p/expand.1p
@@ -0,0 +1,166 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "EXPAND" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" expand
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+expand \- convert tabs to spaces
+.SH SYNOPSIS
+.LP
+\fBexpand\fP \fB[\fP\fB-t\fP \fItablist\fP\fB][\fP\fIfile\fP \fB...\fP\fB]\fP\fB\fP
+.SH DESCRIPTION
+.LP
+The \fIexpand\fP utility shall write files or the standard input to
+the standard output with <tab>s replaced with one or
+more <space>s needed to pad to the next tab stop. Any <backspace>s
+shall be copied to the output and cause the column
+position count for tab stop calculations to be decremented; the column
+position count shall not be decremented below zero.
+.SH OPTIONS
+.LP
+The \fIexpand\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following option shall be supported:
+.TP 7
+\fB-t\ \fP \fItablist\fP
+Specify the tab stops. The application shall ensure that the argument
+\fItablist\fP consists of either a single positive
+decimal integer or a list of tabstops. If a single number is given,
+tabs shall be set that number of column positions apart instead
+of the default 8.
+.LP
+If a list of tabstops is given, the application shall ensure that
+it consists of a list of two or more positive decimal
+integers, separated by <blank>s or commas, in ascending order. The
+tabs shall be set at those specific column positions. Each
+tab stop \fIN\fP shall be an integer value greater than zero, and
+the list is in strictly ascending order. This is taken to mean
+that, from the start of a line of output, tabbing to position \fIN\fP
+shall cause the next character output to be in the (
+\fIN\fP+1)th column position on that line.
+.LP
+In the event of \fIexpand\fP having to process a <tab> at a position
+beyond the last of those specified in a multiple
+tab-stop list, the <tab> shall be replaced by a single <space> in
+the output.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+The pathname of a text file to be used as input.
+.sp
+.SH STDIN
+.LP
+See the INPUT FILES section.
+.SH INPUT FILES
+.LP
+Input files shall be text files.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIexpand\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files), the
+processing of <tab>s and <space>s, and for the
+determination of the width in column positions each character would
+occupy on an output device.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The standard output shall be equivalent to the input files with <tab>s
+converted into the appropriate number of
+<space>s.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+The \fIexpand\fP utility shall terminate with an error message and
+non-zero exit status upon encountering difficulties
+accessing one of the \fIfile\fP operands.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIexpand\fP utility is useful for preprocessing text files (before
+sorting, looking at specific columns, and so on) that
+contain <tab>s.
+.LP
+See the Base Definitions volume of IEEE\ Std\ 1003.1-2001, Section
+3.103, Column Position.
+.LP
+The \fItablist\fP option-argument consists of integers in ascending
+order. Utility Syntax Guideline 8 mandates that
+\fIexpand\fP shall accept the integers (within the single argument)
+separated using either commas or <blank>s.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fItabs\fP, \fIunexpand\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/export.1p b/man-pages-posix-2003/man1p/export.1p
new file mode 100644
index 0000000..ee04566
--- /dev/null
+++ b/man-pages-posix-2003/man1p/export.1p
@@ -0,0 +1,165 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "EXPORT" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" export
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+export \- set the export attribute for variables
+.SH SYNOPSIS
+.LP
+\fBexport name\fP\fB[\fP\fB=\fP\fIword\fP\fB]\fP\fB...
+.br
+.sp
+export -p
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The shell shall give the \fIexport\fP attribute to the variables corresponding
+to the specified \fIname\fPs, which shall cause
+them to be in the environment of subsequently executed commands. If
+the name of a variable is followed by = \fIword\fP, then the
+value of that variable shall be set to \fIword\fP.
+.LP
+The \fIexport\fP special built-in shall support the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+When \fB-p\fP is specified, \fIexport\fP shall write to the standard
+output the names and values of all exported variables, in
+the following format:
+.sp
+.RS
+.nf
+
+\fB"export %s=%s\\n", <\fP\fIname\fP\fB>, <\fP\fIvalue\fP\fB>
+\fP
+.fi
+.RE
+.LP
+if \fIname\fP is set, and:
+.sp
+.RS
+.nf
+
+\fB"export %s\\n", <\fP\fIname\fP\fB>
+\fP
+.fi
+.RE
+.LP
+if \fIname\fP is unset.
+.LP
+The shell shall format the output, including the proper use of quoting,
+so that it is suitable for reinput to the shell as
+commands that achieve the same exporting results, except:
+.IP " 1." 4
+Read-only variables with values cannot be reset.
+.LP
+.IP " 2." 4
+Variables that were unset at the time they were output need not be
+reset to the unset state if a value is assigned to the
+variable between the time the state was saved and the time at which
+the saved output is reinput to the shell.
+.LP
+.LP
+When no arguments are given, the results are unspecified.
+.SH OPTIONS
+.LP
+See the DESCRIPTION.
+.SH OPERANDS
+.LP
+See the DESCRIPTION.
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+None.
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+See the DESCRIPTION.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+Zero.
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+Export \fIPWD\fP and \fIHOME\fP variables:
+.sp
+.RS
+.nf
+
+\fBexport PWD HOME
+\fP
+.fi
+.RE
+.LP
+Set and export the \fIPATH\fP variable:
+.sp
+.RS
+.nf
+
+\fBexport PATH=/local/bin:$PATH
+\fP
+.fi
+.RE
+.LP
+Save and restore all exported variables:
+.sp
+.RS
+.nf
+
+\fBexport -p >\fP \fItemp-file\fP\fBunset\fP \fIa lot of variables\fP\fB...\fP \fIprocessing\fP\fB.\fP \fItemp-file\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+Some historical shells use the no-argument case as the functional
+equivalent of what is required here with \fB-p\fP. This
+feature was left unspecified because it is not historical practice
+in all shells, and some scripts may rely on the now-unspecified
+results on their implementations. Attempts to specify the \fB-p\fP
+output as the default case were unsuccessful in achieving
+consensus. The \fB-p\fP option was added to allow portable access
+to the values that can be saved and then later restored using;
+for example, a \fIdot\fP script.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fISpecial Built-In Utilities\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/expr.1p b/man-pages-posix-2003/man1p/expr.1p
new file mode 100644
index 0000000..d22f428
--- /dev/null
+++ b/man-pages-posix-2003/man1p/expr.1p
@@ -0,0 +1,416 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "EXPR" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" expr
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+expr \- evaluate arguments as an expression
+.SH SYNOPSIS
+.LP
+\fBexpr\fP \fIoperand\fP
+.SH DESCRIPTION
+.LP
+The \fIexpr\fP utility shall evaluate an expression and write the
+result to standard output.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+The single expression evaluated by \fIexpr\fP shall be formed from
+the operands, as described in the EXTENDED DESCRIPTION
+section. The application shall ensure that each of the expression
+operator symbols:
+.sp
+.RS
+.nf
+
+\fB( ) | & = > >= < <= != + - * / % :
+\fP
+.fi
+.RE
+.LP
+and the symbols \fIinteger\fP and \fIstring\fP in the table are provided
+as separate arguments to \fIexpr\fP.
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIexpr\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_COLLATE\fP
+.sp
+Determine the locale for the behavior of ranges, equivalence classes,
+and multi-character collating elements within regular
+expressions and by the string comparison operators.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments) and the behavior of
+character classes within regular expressions.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The \fIexpr\fP utility shall evaluate the expression and write the
+result, followed by a <newline>, to standard
+output.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+The formation of the expression to be evaluated is shown in the following
+table. The symbols \fIexpr\fP, \fIexpr1\fP, and
+\fIexpr2\fP represent expressions formed from \fIinteger\fP and \fIstring\fP
+symbols and the expression operator symbols (all
+separate arguments) by recursive application of the constructs described
+in the table. The expressions are listed in order of
+increasing precedence, with equal-precedence operators grouped between
+horizontal lines. All of the operators shall be
+left-associative.
+.TS C
+center; l lw(40).
+\fBExpression\fP T{
+.na
+\fBDescription\fP
+.ad
+T}
+\fIexpr1\fP\ |\ \fIexpr2\fP T{
+.na
+Returns the evaluation of \fIexpr1\fP if it is neither null nor zero; otherwise, returns the evaluation of \fIexpr2\fP if it is not null; otherwise, zero.
+.ad
+T}
+\fIexpr1\fP\ &\ \fIexpr2\fP T{
+.na
+Returns the evaluation of \fIexpr1\fP if neither expression evaluates to null or zero; otherwise, returns zero.
+.ad
+T}
+\ T{
+.na
+Returns the result of a decimal integer comparison if both arguments are integers; otherwise, returns the result of a string comparison using the locale-specific collation sequence. The result of each comparison is 1 if the specified relationship is true, or 0 if the relationship is false.
+.ad
+T}
+\fIexpr1\fP\ =\ \fIexpr2\fP T{
+.na
+Equal.
+.ad
+T}
+\fIexpr1\fP\ >\ \fIexpr2\fP T{
+.na
+Greater than.
+.ad
+T}
+\fIexpr1\fP\ >=\ \fIexpr2\fP T{
+.na
+Greater than or equal.
+.ad
+T}
+\fIexpr1\fP\ <\ \fIexpr2\fP T{
+.na
+Less than.
+.ad
+T}
+\fIexpr1\fP\ <=\ \fIexpr2\fP T{
+.na
+Less than or equal.
+.ad
+T}
+\fIexpr1\fP\ !=\ \fIexpr2\fP T{
+.na
+Not equal.
+.ad
+T}
+\fIexpr1\fP\ +\ \fIexpr2\fP T{
+.na
+Addition of decimal integer-valued arguments.
+.ad
+T}
+\fIexpr1\fP\ -\ \fIexpr2\fP T{
+.na
+Subtraction of decimal integer-valued arguments.
+.ad
+T}
+\fIexpr1\fP\ *\ \fIexpr2\fP T{
+.na
+Multiplication of decimal integer-valued arguments.
+.ad
+T}
+\fIexpr1\fP\ /\ \fIexpr2\fP T{
+.na
+Integer division of decimal integer-valued arguments, producing an integer result.
+.ad
+T}
+\fIexpr1\fP\ %\ \fIexpr2\fP T{
+.na
+Remainder of integer division of decimal integer-valued arguments.
+.ad
+T}
+\fIexpr1\fP\ :\ \fIexpr2\fP T{
+.na
+Matching expression; see below.
+.ad
+T}
+(\ \fIexpr\fP\ ) T{
+.na
+Grouping symbols. Any expression can be placed within parentheses. Parentheses can be nested to a depth of {EXPR_NEST_MAX}.
+.ad
+T}
+\fIinteger\fP T{
+.na
+An argument consisting only of an (optional) unary minus followed by digits.
+.ad
+T}
+\fIstring\fP T{
+.na
+A string argument; see below.
+.ad
+T}
+.TE
+.SS Matching Expression
+.LP
+The \fB':'\fP matching operator shall compare the string resulting
+from the evaluation of \fIexpr1\fP with the regular
+expression pattern resulting from the evaluation of \fIexpr2\fP. Regular
+expression syntax shall be that defined in the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Section 9.3, Basic Regular
+Expressions, except that all patterns are anchored to the beginning
+of the string (that is, only sequences starting at the
+first character of a string are matched by the regular expression)
+and, therefore, it is unspecified whether \fB'^'\fP is a
+special character in that context. Usually, the matching operator
+shall return a string representing the number of characters
+matched ( \fB'0'\fP on failure). Alternatively, if the pattern contains
+at least one regular expression subexpression
+\fB"[\\(...\\)]"\fP, the string corresponding to \fB"\\1"\fP shall
+be returned.
+.SS String Operand
+.LP
+A string argument is an argument that cannot be identified as an \fIinteger\fP
+argument or as one of the expression operator
+symbols shown in the OPERANDS section.
+.LP
+The use of string arguments \fBlength\fP, \fBsubstr\fP, \fBindex\fP,
+or \fBmatch\fP produces unspecified results.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+The \fIexpression\fP evaluates to neither null nor zero.
+.TP 7
+\ 1
+The \fIexpression\fP evaluates to null or zero.
+.TP 7
+\ 2
+Invalid \fIexpression\fP.
+.TP 7
+>2
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+After argument processing by the shell, \fIexpr\fP is not required
+to be able to tell the difference between an operator and an
+operand except by the value. If \fB"$a"\fP is \fB'='\fP, the command:
+.sp
+.RS
+.nf
+
+\fBexpr $a = '='
+\fP
+.fi
+.RE
+.LP
+looks like:
+.sp
+.RS
+.nf
+
+\fBexpr = = =
+\fP
+.fi
+.RE
+.LP
+as the arguments are passed to \fIexpr\fP (and they all may be taken
+as the \fB'='\fP operator). The following works
+reliably:
+.sp
+.RS
+.nf
+
+\fBexpr X$a = X=
+\fP
+.fi
+.RE
+.LP
+Also note that this volume of IEEE\ Std\ 1003.1-2001 permits implementations
+to extend utilities. The \fIexpr\fP
+utility permits the integer arguments to be preceded with a unary
+minus. This means that an integer argument could look like an
+option. Therefore, the conforming application must employ the \fB"--"\fP
+construct of Guideline 10 of the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax
+Guidelines to protect its operands if there is any chance the first
+operand might be a negative integer (or any string with a
+leading minus).
+.SH EXAMPLES
+.LP
+The \fIexpr\fP utility has a rather difficult syntax:
+.IP " *" 3
+Many of the operators are also shell control operators or reserved
+words, so they have to be escaped on the command line.
+.LP
+.IP " *" 3
+Each part of the expression is composed of separate arguments, so
+liberal usage of <blank>s is required. For example:
+.TS C
+center; l l.
+\fBInvalid\fP \fBValid\fP
+\fIexpr\fP 1+2 \fIexpr\fP 1 + 2
+\fIexpr\fP "1 + 2" \fIexpr\fP 1 + 2
+\fIexpr\fP 1 + (2 * 3) \fIexpr\fP 1 + \\( 2 \\* 3 \\)
+.TE
+.LP
+.LP
+In many cases, the arithmetic and string features provided as part
+of the shell command language are easier to use than their
+equivalents in \fIexpr\fP. Newly written scripts should avoid \fIexpr\fP
+in favor of the new features within the shell; see \fIParameters and
+Variables\fP and \fIArithmetic
+Expansion\fP .
+.LP
+The following command:
+.sp
+.RS
+.nf
+
+\fBa=$(expr $a + 1)
+\fP
+.fi
+.RE
+.LP
+adds 1 to the variable \fIa\fP.
+.LP
+The following command, for \fB"$a"\fP equal to either \fB/usr/abc/file\fP
+or just \fBfile\fP:
+.sp
+.RS
+.nf
+
+\fBexpr $a : '.*/\\(.*\\)' \\| $a
+\fP
+.fi
+.RE
+.LP
+returns the last segment of a pathname (that is, \fBfile\fP). Applications
+should avoid the character \fB'/'\fP used alone
+as an argument; \fIexpr\fP may interpret it as the division operator.
+.LP
+The following command:
+.sp
+.RS
+.nf
+
+\fBexpr "//$a" : '.*/\\(.*\\)'
+\fP
+.fi
+.RE
+.LP
+is a better representation of the previous example. The addition of
+the \fB"//"\fP characters eliminates any ambiguity about
+the division operator and simplifies the whole expression. Also note
+that pathnames may contain characters contained in the
+\fIIFS\fP variable and should be quoted to avoid having \fB"$a"\fP
+expand into multiple arguments.
+.LP
+The following command:
+.sp
+.RS
+.nf
+
+\fBexpr "$VAR" : '.*'
+\fP
+.fi
+.RE
+.LP
+returns the number of characters in \fIVAR\fP.
+.SH RATIONALE
+.LP
+In an early proposal, EREs were used in the matching expression syntax.
+This was changed to BREs to avoid breaking historical
+applications.
+.LP
+The use of a leading circumflex in the BRE is unspecified because
+many historical implementations have treated it as a special
+character, despite their system documentation. For example:
+.sp
+.RS
+.nf
+
+\fBexpr foo : ^foo expr ^foo : ^foo
+\fP
+.fi
+.RE
+.LP
+return 3 and 0, respectively, on those systems; their documentation
+would imply the reverse. Thus, the anchoring condition is
+left unspecified to avoid breaking historical scripts relying on this
+undocumented feature.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIParameters and Variables\fP, \fIArithmetic
+Expansion\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/false.1p b/man-pages-posix-2003/man1p/false.1p
new file mode 100644
index 0000000..2e09a8d
--- /dev/null
+++ b/man-pages-posix-2003/man1p/false.1p
@@ -0,0 +1,80 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FALSE" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" false
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+false \- return false value
+.SH SYNOPSIS
+.LP
+\fBfalse\fP
+.SH DESCRIPTION
+.LP
+The \fIfalse\fP utility shall return with a non-zero exit code.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+None.
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+None.
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+Not used.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The \fIfalse\fP utility shall always exit with a value other than
+zero.
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fItrue\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/fc.1p b/man-pages-posix-2003/man1p/fc.1p
new file mode 100644
index 0000000..2f4afc5
--- /dev/null
+++ b/man-pages-posix-2003/man1p/fc.1p
@@ -0,0 +1,481 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FC" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fc
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fc \- process the command history list
+.SH SYNOPSIS
+.LP
+\fBfc\fP \fB[\fP\fB-r\fP\fB][\fP\fB-e\fP \fIeditor\fP\fB]
+[\fP\fIfirst\fP\fB[\fP\fIlast\fP\fB]]\fP\fB
+.br
+.sp
+fc -l\fP\fB[\fP\fB-nr\fP\fB] [\fP\fIfirst\fP\fB[\fP\fIlast\fP\fB]]\fP\fB
+.br
+.sp
+fc -s\fP\fB[\fP\fIold\fP\fB=\fP\fInew\fP\fB][\fP\fIfirst\fP\fB]\fP\fB\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfc\fP utility shall list, or shall edit and re-execute, commands
+previously entered to an interactive \fIsh\fP.
+.LP
+The command history list shall reference commands by number. The first
+number in the list is selected arbitrarily. The
+relationship of a number to its command shall not change except when
+the user logs in and no other process is accessing the list,
+at which time the system may reset the numbering to start the oldest
+retained command at another number (usually 1). When the
+number reaches an implementation-defined upper limit, which shall
+be no smaller than the value in \fIHISTSIZE\fP or 32767
+(whichever is greater), the shell may wrap the numbers, starting the
+next command with a lower number (usually 1). However, despite
+this optional wrapping of numbers, \fIfc\fP shall maintain the time-ordering
+sequence of the commands. For example, if four
+commands in sequence are given the numbers 32766, 32767, 1 (wrapped),
+and 2 as they are executed, command 32767 is considered the
+command previous to 1, even though its number is higher.
+.LP
+When commands are edited (when the \fB-l\fP option is not specified),
+the resulting lines shall be entered at the end of the
+history list and then re-executed by \fIsh\fP. The \fIfc\fP command
+that caused the editing
+shall not be entered into the history list. If the editor returns
+a non-zero exit status, this shall suppress the entry into the
+history list and the command re-execution. Any command line variable
+assignments or redirection operators used with \fIfc\fP shall
+affect both the \fIfc\fP command itself as well as the command that
+results; for example:
+.sp
+.RS
+.nf
+
+\fBfc -s -- -1 2>/dev/null
+\fP
+.fi
+.RE
+.LP
+reinvokes the previous command, suppressing standard error for both
+\fIfc\fP and the previous command.
+.SH OPTIONS
+.LP
+The \fIfc\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-e\ \fP \fIeditor\fP
+Use the editor named by \fIeditor\fP to edit the commands. The \fIeditor\fP
+string is a utility name, subject to search via
+the \fIPATH\fP variable (see the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 8, Environment Variables). The value in the \fIFCEDIT\fP variable
+shall be used as a
+default when \fB-e\fP is not specified. If \fIFCEDIT\fP is null or
+unset, \fIed\fP shall be
+used as the editor.
+.TP 7
+\fB-l\fP
+(The letter ell.) List the commands rather than invoking an editor
+on them. The commands shall be written in the sequence
+indicated by the \fIfirst\fP and \fIlast\fP operands, as affected
+by \fB-r\fP, with each command preceded by the command
+number.
+.TP 7
+\fB-n\fP
+Suppress command numbers when listing with \fB-l\fP.
+.TP 7
+\fB-r\fP
+Reverse the order of the commands listed (with \fB-l\fP) or edited
+(with neither \fB-l\fP nor \fB-s\fP).
+.TP 7
+\fB-s\fP
+Re-execute the command without invoking an editor.
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIfirst\fP,\ \fIlast\fP
+Select the commands to list or edit. The number of previous commands
+that can be accessed shall be determined by the value of
+the \fIHISTSIZE\fP variable. The value of \fIfirst\fP or \fIlast\fP
+or both shall be one of the following:
+.TP 7
+\fB[+]\fP\fInumber\fP
+.RS
+A positive number representing a command number; command numbers can
+be displayed with the \fB-l\fP option.
+.RE
+.TP 7
+\fB-\fP\fInumber\fP
+.RS
+A negative decimal number representing the command that was executed
+\fInumber\fP of commands previously. For example, -1 is
+the immediately previous command.
+.RE
+.TP 7
+\fIstring\fP
+.RS
+A string indicating the most recently entered command that begins
+with that string. If the \fIold\fP= \fInew\fP operand is
+not also specified with \fB-s\fP, the string form of the \fIfirst\fP
+operand cannot contain an embedded equal sign.
+.RE
+.sp
+.LP
+When the synopsis form with \fB-s\fP is used:
+.RS
+.IP " *" 3
+If \fIfirst\fP is omitted, the previous command shall be used.
+.LP
+.RE
+.LP
+For the synopsis forms without \fB-s\fP:
+.RS
+.IP " *" 3
+If \fIlast\fP is omitted, \fIlast\fP shall default to the previous
+command when \fB-l\fP is specified; otherwise, it shall
+default to \fIfirst\fP.
+.LP
+.IP " *" 3
+If \fIfirst\fP and \fIlast\fP are both omitted, the previous 16 commands
+shall be listed or the previous single command shall
+be edited (based on the \fB-l\fP option).
+.LP
+.IP " *" 3
+If \fIfirst\fP and \fIlast\fP are both present, all of the commands
+from \fIfirst\fP to \fIlast\fP shall be edited (without
+\fB-l\fP) or listed (with \fB-l\fP). Editing multiple commands shall
+be accomplished by presenting to the editor all of the
+commands at one time, each command starting on a new line. If \fIfirst\fP
+represents a newer command than \fIlast\fP, the
+commands shall be listed or edited in reverse sequence, equivalent
+to using \fB-r\fP. For example, the following commands on the
+first line are equivalent to the corresponding commands on the second:
+.sp
+.RS
+.nf
+
+\fBfc -r 10 20 fc 30 40
+fc 20 10 fc -r 40 30
+\fP
+.fi
+.RE
+.LP
+.IP " *" 3
+When a range of commands is used, it shall not be an error to specify
+\fIfirst\fP or \fIlast\fP values that are not in the
+history list; \fIfc\fP shall substitute the value representing the
+oldest or newest command in the list, as appropriate. For
+example, if there are only ten commands in the history list, numbered
+1 to 10:
+.sp
+.RS
+.nf
+
+\fBfc -l
+fc 1 99
+\fP
+.fi
+.RE
+.LP
+shall list and edit, respectively, all ten commands.
+.LP
+.RE
+.TP 7
+\fIold\fP=\fInew\fP
+Replace the first occurrence of string \fIold\fP in the commands to
+be re-executed by the string \fInew\fP.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIfc\fP:
+.TP 7
+\fIFCEDIT\fP
+This variable, when expanded by the shell, shall determine the default
+value for the \fB-e\fP \fIeditor\fP option's
+\fIeditor\fP option-argument. If \fIFCEDIT\fP is null or unset, \fIed\fP
+shall be used as the
+editor.
+.TP 7
+\fIHISTFILE\fP
+Determine a pathname naming a command history file. If the \fIHISTFILE\fP
+variable is not set, the shell may attempt to access
+or create a file \fB.sh_history\fP in the directory referred to by
+the \fIHOME\fP environment variable. If the shell cannot
+obtain both read and write access to, or create, the history file,
+it shall use an unspecified mechanism that allows the history to
+operate properly. (References to history "file" in this section shall
+be understood to mean this unspecified mechanism in such
+cases.) An implementation may choose to access this variable only
+when initializing the history file; this initialization shall
+occur when \fIfc\fP or \fIsh\fP first attempt to retrieve entries
+from, or add entries to, the
+file, as the result of commands issued by the user, the file named
+by the \fIENV\fP variable, or implementation-defined system
+start-up files. In some historical shells, the history file is initialized
+just after the \fIENV\fP file has been processed.
+Therefore, it is implementation-defined whether changes made to \fIHISTFILE\fP
+after the history file has been initialized are
+effective. Implementations may choose to disable the history list
+mechanism for users with appropriate privileges who do not set
+\fIHISTFILE ;\fP the specific circumstances under which this occurs
+are implementation-defined. If more than one instance of the
+shell is using the same history file, it is unspecified how updates
+to the history file from those shells interact. As entries are
+deleted from the history file, they shall be deleted oldest first.
+It is unspecified when history file entries are physically
+removed from the history file.
+.TP 7
+\fIHISTSIZE\fP
+Determine a decimal number representing the limit to the number of
+previous commands that are accessible. If this variable is
+unset, an unspecified default greater than or equal to 128 shall be
+used. The maximum number of commands in the history list is
+unspecified, but shall be at least 128. An implementation may choose
+to access this variable only when initializing the history
+file, as described under \fIHISTFILE\fP. Therefore, it is unspecified
+whether changes made to \fIHISTSIZE\fP after the history
+file has been initialized are effective.
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+When the \fB-l\fP option is used to list commands, the format of each
+command in the list shall be as follows:
+.sp
+.RS
+.nf
+
+\fB"%d\\t%s\\n", <\fP\fIline number\fP\fB>, <\fP\fIcommand\fP\fB>
+\fP
+.fi
+.RE
+.LP
+If both the \fB-l\fP and \fB-n\fP options are specified, the format
+of each command shall be:
+.sp
+.RS
+.nf
+
+\fB"\\t%s\\n", <\fP\fIcommand\fP\fB>
+\fP
+.fi
+.RE
+.LP
+If the <\fIcommand\fP> consists of more than one line, the lines after
+the first shall be displayed as:
+.sp
+.RS
+.nf
+
+\fB"\\t%s\\n", <\fP\fIcontinued-command\fP\fB>
+\fP
+.fi
+.RE
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion of the listing.
+.TP 7
+>0
+An error occurred.
+.sp
+.LP
+Otherwise, the exit status shall be that of the commands executed
+by \fIfc\fP.
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Since editors sometimes use file descriptors as integral parts of
+their editing, redirecting their file descriptors as part of
+the \fIfc\fP command can produce unexpected results. For example,
+if \fIvi\fP is the
+\fIFCEDIT\fP editor, the command:
+.sp
+.RS
+.nf
+
+\fBfc -s | more
+\fP
+.fi
+.RE
+.LP
+does not work correctly on many systems.
+.LP
+Users on windowing systems may want to have separate history files
+for each window by setting \fIHISTFILE\fP as follows:
+.sp
+.RS
+.nf
+
+\fBHISTFILE=$HOME/.sh_hist$$
+\fP
+.fi
+.RE
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+This utility is based on the \fIfc\fP built-in of the KornShell.
+.LP
+An early proposal specified the \fB-e\fP option as \fB[-e\fP \fIeditor\fP
+\fB[\fP \fIold\fP = \fInew\fP \fB]]\fP, which
+is not historical practice. Historical practice in \fIfc\fP of either
+\fB[-e\fP \fIeditor\fP \fB]\fP or \fB[-e - [\fP
+\fIold\fP = \fInew\fP \fB]]\fP is acceptable, but not both together.
+To clarify this, a new option \fB-s\fP was introduced
+replacing the \fB[-e -]\fP. This resolves the conflict and makes \fIfc\fP
+conform to the Utility Syntax Guidelines.
+.TP 7
+\fIHISTFILE\fP
+Some implementations of the KornShell check for the superuser and
+do not create a history file unless \fIHISTFILE\fP is set.
+This is done primarily to avoid creating unlinked files in the root
+file system when logging in during single-user mode.
+\fIHISTFILE\fP must be set for the superuser to have history.
+.TP 7
+\fIHISTSIZE\fP
+Needed to limit the size of history files. It is the intent of the
+standard developers that when two shells share the same
+history file, commands that are entered in one shell shall be accessible
+by the other shell. Because of the difficulties of
+synchronization over a network, the exact nature of the interaction
+is unspecified.
+.sp
+.LP
+The initialization process for the history file can be dependent on
+the system start-up files, in that they may contain commands
+that effectively preempt the settings the user has for \fIHISTFILE\fP
+and \fIHISTSIZE\fP. For example, function definition
+commands are recorded in the history file. If the system administrator
+includes function definitions in some system start-up file
+called before the \fIENV\fP file, the history file is initialized
+before the user can influence its characteristics. In some
+historical shells, the history file is initialized just after the
+\fIENV\fP file has been processed. Because of these situations,
+the text requires the initialization process to be implementation-defined.
+.LP
+Consideration was given to omitting the \fIfc\fP utility in favor
+of the command line editing feature in \fIsh\fP. For example, in \fIvi\fP
+editing mode, typing
+\fB"<ESC> v"\fP is equivalent to:
+.sp
+.RS
+.nf
+
+\fBEDITOR=vi fc
+\fP
+.fi
+.RE
+.LP
+However, the \fIfc\fP utility allows the user the flexibility to edit
+multiple commands simultaneously (such as \fIfc\fP 10
+20) and to use editors other than those supported by \fIsh\fP for
+command line editing.
+.LP
+In the KornShell, the alias \fBr\fP (``re-do") is preset to \fIfc\fP
+\fB-e -\fP (equivalent to the POSIX \fIfc\fP
+\fB-s\fP). This is probably an easier command name to remember than
+\fIfc\fP (``fix command"), but it does not meet the Utility
+Syntax Guidelines. Renaming \fIfc\fP to \fIhist\fP or \fIredo\fP was
+considered, but since this description closely matches
+historical KornShell practice already, such a renaming was seen as
+gratuitous. Users are free to create aliases whenever odd
+historical names such as \fIfc\fP, \fIawk\fP, \fIcat\fP,
+\fIgrep\fP, or \fIyacc\fP are standardized by
+POSIX.
+.LP
+Command numbers have no ordering effects; they are like serial numbers.
+The \fB-r\fP option and -\fInumber\fP operand address
+the sequence of command execution, regardless of serial numbers. So,
+for example, if the command number wrapped back to 1 at some
+arbitrary point, there would be no ambiguity associated with traversing
+the wrap point. For example, if the command history
+were:
+.sp
+.RS
+.nf
+
+\fB32766: echo 1
+32767: echo 2
+1: echo 3
+\fP
+.fi
+.RE
+.LP
+the number -2 refers to command 32767 because it is the second previous
+command, regardless of serial number.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsh\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/fg.1p b/man-pages-posix-2003/man1p/fg.1p
new file mode 100644
index 0000000..b0d9e18
--- /dev/null
+++ b/man-pages-posix-2003/man1p/fg.1p
@@ -0,0 +1,157 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FG" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fg
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fg \- run jobs in the foreground
+.SH SYNOPSIS
+.LP
+\fBfg\fP \fB[\fP\fIjob_id\fP\fB]\fP\fB\fP
+.SH DESCRIPTION
+.LP
+If job control is enabled (see the description of \fIset\fP \fB-m\fP),
+the
+\fIfg\fP utility shall move a background job from the current environment
+(see \fIShell
+Execution Environment\fP ) into the foreground.
+.LP
+Using \fIfg\fP to place a job into the foreground shall remove its
+process ID from the list of those "known in the current
+shell execution environment''; see \fIAsynchronous Lists\fP .
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIjob_id\fP
+Specify the job to be run as a foreground job. If no \fIjob_id\fP
+operand is given, the \fIjob_id\fP for the job that was
+most recently suspended, placed in the background, or run as a background
+job shall be used. The format of \fIjob_id\fP is
+described in the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Section 3.203, Job Control Job ID.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIfg\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The \fIfg\fP utility shall write the command line of the job to standard
+output in the following format:
+.sp
+.RS
+.nf
+
+\fB"%s\\n", <\fP\fIcommand\fP\fB>
+\fP
+.fi
+.RE
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+If job control is disabled, the \fIfg\fP utility shall exit with an
+error and no job shall be placed in the foreground.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The \fIfg\fP utility does not work as expected when it is operating
+in its own utility execution environment because that
+environment has no applicable jobs to manipulate. See the APPLICATION
+USAGE section for \fIbg\fP . For this
+reason, \fIfg\fP is generally implemented as a shell regular built-in.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The extensions to the shell specified in this volume of IEEE\ Std\ 1003.1-2001
+have mostly been based on features
+provided by the KornShell. The job control features provided by \fIbg\fP,
+\fIfg\fP, and \fIjobs\fP are also based on the KornShell. The standard
+developers examined the characteristics
+of the C shell versions of these utilities and found that differences
+exist. Despite widespread use of the C shell, the KornShell
+versions were selected for this volume of IEEE\ Std\ 1003.1-2001 to
+maintain a degree of uniformity with the rest of the
+KornShell features selected (such as the very popular command line
+editing features).
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIAsynchronous Lists\fP, \fIShell Execution
+Environment\fP, \fIbg\fP, \fIkill\fP(), \fIjobs\fP,
+\fIwait\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/file.1p b/man-pages-posix-2003/man1p/file.1p
new file mode 100644
index 0000000..dd88471
--- /dev/null
+++ b/man-pages-posix-2003/man1p/file.1p
@@ -0,0 +1,791 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FILE" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" file
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+file \- determine file type
+.SH SYNOPSIS
+.LP
+\fBfile\fP \fB[\fP\fB-dh\fP\fB][\fP\fB-M\fP \fIfile\fP\fB][\fP\fB-m\fP
+\fIfile\fP\fB]\fP
+\fIfile\fP \fB...
+.br
+.sp
+file -i\fP \fB[\fP\fB-h\fP\fB]\fP \fIfile\fP \fB... \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfile\fP utility shall perform a series of tests in sequence
+on each specified \fIfile\fP in an attempt to classify
+it:
+.IP " 1." 4
+If \fIfile\fP does not exist, cannot be read, or its file status could
+not be determined, the output shall indicate that the
+file was processed, but that its type could not be determined.
+.LP
+.IP " 2." 4
+If the file is not a regular file, its file type shall be identified.
+The file types directory, FIFO, socket, block special, and
+character special shall be identified as such. Other implementation-defined
+file types may also be identified. If \fIfile\fP is a
+symbolic link, by default the link shall be resolved and \fIfile\fP
+shall test the type of file referenced by the symbolic link.
+(See the \fB-h\fP and \fB-i\fP options below.)
+.LP
+.IP " 3." 4
+If the length of \fIfile\fP is zero, it shall be identified as an
+empty file.
+.LP
+.IP " 4." 4
+The \fIfile\fP utility shall examine an initial segment of \fIfile\fP
+and shall make a guess at identifying its contents based
+on position-sensitive tests. (The answer is not guaranteed to be correct;
+see the \fB-d\fP, \fB-M\fP, and \fB-m\fP options
+below.)
+.LP
+.IP " 5." 4
+The \fIfile\fP utility shall examine \fIfile\fP and make a guess at
+identifying its contents based on context-sensitive
+default system tests. (The answer is not guaranteed to be correct.)
+.LP
+.IP " 6." 4
+The file shall be identified as a data file.
+.LP
+.LP
+If \fIfile\fP does not exist, cannot be read, or its file status could
+not be determined, the output shall indicate that the
+file was processed, but that its type could not be determined.
+.LP
+If \fIfile\fP is a symbolic link, by default the link shall be resolved
+and \fIfile\fP shall test the type of file referenced
+by the symbolic link.
+.SH OPTIONS
+.LP
+The \fIfile\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines,
+except that the order of the \fB-m\fP,
+\fB-d\fP, and \fB-M\fP options shall be significant.
+.LP
+The following options shall be supported by the implementation:
+.TP 7
+\fB-d\fP
+Apply any position-sensitive default system tests and context-sensitive
+default system tests to the file. This is the default
+if no \fB-M\fP or \fB-m\fP option is specified.
+.TP 7
+\fB-h\fP
+When a symbolic link is encountered, identify the file as a symbolic
+link. If \fB-h\fP is not specified and \fIfile\fP is a
+symbolic link that refers to a nonexistent file, \fIfile\fP shall
+identify the file as a symbolic link, as if \fB-h\fP had been
+specified.
+.TP 7
+\fB-i\fP
+If a file is a regular file, do not attempt to classify the type of
+the file further, but identify the file as specified in the
+STDOUT section.
+.TP 7
+\fB-M\ \fP \fIfile\fP
+Specify the name of a file containing position-sensitive tests that
+shall be applied to a file in order to classify it (see the
+EXTENDED DESCRIPTION). No position-sensitive default system tests
+nor context-sensitive default system tests shall be applied
+unless the \fB-d\fP option is also specified.
+.TP 7
+\fB-m\ \fP \fIfile\fP
+Specify the name of a file containing position-sensitive tests that
+shall be applied to a file in order to classify it (see the
+EXTENDED DESCRIPTION).
+.sp
+.LP
+If the \fB-m\fP option is specified without specifying the \fB-d\fP
+option or the \fB-M\fP option, position-sensitive default
+system tests shall be applied after the position-sensitive tests specified
+by the \fB-m\fP option. If the \fB-M\fP option is
+specified with the \fB-d\fP option, the \fB-m\fP option, or both,
+or the \fB-m\fP option is specified with the \fB-d\fP option,
+the concatenation of the position-sensitive tests specified by these
+options shall be applied in the order specified by the
+appearance of these options. If a \fB-M\fP or \fB-m\fP \fIfile\fP
+option-argument is \fB-\fP, the results are unspecified.
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of a file to be tested.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+The \fIfile\fP can be any file type.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIfile\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard error and
+informative messages written to standard output.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+In the POSIX locale, the following format shall be used to identify
+each operand, \fIfile\fP specified:
+.sp
+.RS
+.nf
+
+\fB"%s: %s\\n", <\fP\fIfile\fP\fB>, <\fP\fItype\fP\fB>
+\fP
+.fi
+.RE
+.LP
+The values for <\fItype\fP> are unspecified, except that in the POSIX
+locale, if \fIfile\fP is identified as one of the
+types listed in the following table, <\fItype\fP> shall contain (but
+is not limited to) the corresponding string, unless the
+file is identified by a position-sensitive test specified by a \fB-M\fP
+or \fB-m\fP option. Each space shown in the strings shall
+be exactly one <space>.
+.br
+.sp
+.ce 1
+\fBTable: File Utility Output Strings\fP
+.TS C
+center; lw(40)1 lw(25)1 l.
+T{
+.na
+\fBIf \fIfile\fP is:\fP
+.ad
+T} T{
+.na
+\fB<\fItype\fP> shall contain the string:\fP
+.ad
+T} \fBNotes\fP
+T{
+.na
+Nonexistent
+.ad
+T} T{
+.na
+cannot open
+.ad
+T} \
+T{
+.na
+Block special
+.ad
+T} T{
+.na
+block special
+.ad
+T} 1
+T{
+.na
+Character special
+.ad
+T} T{
+.na
+character special
+.ad
+T} 1
+T{
+.na
+Directory
+.ad
+T} T{
+.na
+directory
+.ad
+T} 1
+T{
+.na
+FIFO
+.ad
+T} T{
+.na
+fifo
+.ad
+T} 1
+T{
+.na
+Socket
+.ad
+T} T{
+.na
+socket
+.ad
+T} 1
+T{
+.na
+Symbolic link
+.ad
+T} T{
+.na
+symbolic link to
+.ad
+T} 1
+T{
+.na
+Regular file
+.ad
+T} T{
+.na
+regular file
+.ad
+T} 1,2
+T{
+.na
+Empty regular file
+.ad
+T} T{
+.na
+empty
+.ad
+T} 3
+T{
+.na
+Regular file that cannot be read
+.ad
+T} T{
+.na
+cannot open
+.ad
+T} 3
+T{
+.na
+Executable binary
+.ad
+T} T{
+.na
+executable
+.ad
+T} 4,6
+T{
+.na
+\fIar\fP archive library (see \fIar\fP)
+.ad
+T} T{
+.na
+archive
+.ad
+T} 4,6
+T{
+.na
+Extended \fIcpio\fP format (see \fIpax\fP)
+.ad
+T} T{
+.na
+cpio archive
+.ad
+T} 4,6
+T{
+.na
+Extended \fItar\fP format (see \fBustar\fP in \fIpax\fP)
+.ad
+T} T{
+.na
+tar archive
+.ad
+T} 4,6
+T{
+.na
+Shell script
+.ad
+T} T{
+.na
+commands text
+.ad
+T} 5,6
+T{
+.na
+C-language source
+.ad
+T} T{
+.na
+c program text
+.ad
+T} 5,6
+T{
+.na
+FORTRAN source
+.ad
+T} T{
+.na
+fortran program text
+.ad
+T} 5,6
+T{
+.na
+Regular file whose type cannot be determined
+.ad
+T} T{
+.na
+data
+.ad
+T} \
+.TE
+.TP 7
+\fBNotes:\fP
+.RS
+.IP " 1." 4
+This is a file type test.
+.LP
+.IP " 2." 4
+This test is applied only if the \fB-i\fP option is specified.
+.LP
+.IP " 3." 4
+This test is applied only if the \fB-i\fP option is not specified.
+.LP
+.IP " 4." 4
+This is a position-sensitive default system test.
+.LP
+.IP " 5." 4
+This is a context-sensitive default system test.
+.LP
+.IP " 6." 4
+Position-sensitive default system tests and context-sensitive default
+system tests are not applied if the \fB-M\fP option is
+specified unless the \fB-d\fP option is also specified.
+.LP
+.RE
+.sp
+.LP
+In the POSIX locale, if \fIfile\fP is identified as a symbolic link
+(see the \fB-h\fP option), the following alternative
+output format shall be used:
+.sp
+.RS
+.nf
+
+\fB"%s: %s %s\\n", <\fP\fIfile\fP\fB>, <\fP\fItype\fP\fB>, <\fP\fIcontents of link\fP\fB>"
+\fP
+.fi
+.RE
+.LP
+If the file named by the \fIfile\fP operand does not exist, cannot
+be read, or the type of the file named by the \fIfile\fP
+operand cannot be determined, this shall not be considered an error
+that affects the exit status.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+A file specified as an option-argument to the \fB-m\fP or \fB-M\fP
+options shall contain one position-sensitive test per line,
+which shall be applied to the file. If the test succeeds, the message
+field of the line shall be printed and no further tests shall
+be applied, with the exception that tests on immediately following
+lines beginning with a single \fB'>'\fP character shall be
+applied.
+.LP
+Each line shall be composed of the following four <blank>-separated
+fields:
+.TP 7
+\fIoffset\fP
+An unsigned number (optionally preceded by a single \fB'>'\fP character)
+specifying the \fIoffset\fP, in bytes, of the
+value in the file that is to be compared against the \fIvalue\fP field
+of the line. If the file is shorter than the specified
+offset, the test shall fail.
+.LP
+If the \fIoffset\fP begins with the character \fB'>'\fP, the test
+contained in the line shall not be applied to the file
+unless the test on the last line for which the \fIoffset\fP did not
+begin with a \fB'>'\fP was successful. By default, the
+\fIoffset\fP shall be interpreted as an unsigned decimal number. With
+a leading 0x or 0X, the \fIoffset\fP shall be interpreted
+as a hexadecimal number; otherwise, with a leading 0, the \fIoffset\fP
+shall be interpreted as an octal number.
+.TP 7
+\fItype\fP
+The type of the value in the file to be tested. The type shall consist
+of the type specification characters \fBc\fP,
+\fBd\fP, \fBf\fP, \fBs\fP, and \fBu\fP, specifying character,
+signed decimal, floating point, string, and unsigned
+decimal, respectively.
+.LP
+The \fItype\fP string shall be interpreted as the bytes from the file
+starting at the specified \fIoffset\fP and including the
+same number of bytes specified by the \fIvalue\fP field. If insufficient
+bytes remain in the file past the \fIoffset\fP to match
+the \fIvalue\fP field, the test shall fail.
+.LP
+The type specification characters \fBd\fP, \fBf\fP, and \fBu\fP
+can be followed by an optional unsigned decimal
+integer that specifies the number of bytes represented by the type.
+The type specification character \fBf\fP can be followed by
+an optional \fBF\fP, \fBD\fP, or \fBL\fP, indicating that the value
+is of type \fBfloat\fP, \fBdouble\fP, or \fBlong
+double\fP, respectively. The type specification characters \fBd\fP
+and \fBu\fP can be followed by an optional \fBC\fP,
+\fBS\fP, \fBI\fP, or \fBL\fP, indicating that the value is of type
+\fBchar\fP, \fBshort\fP, \fBint\fP, or
+\fBlong\fP, respectively.
+.LP
+The default number of bytes represented by the type specifiers \fBd\fP,
+\fBf\fP, and \fBu\fP shall correspond to
+their respective C-language types as follows. If the system claims
+conformance to the C-Language Development Utilities option,
+those specifiers shall correspond to the default sizes used in the
+\fIc99\fP utility.
+Otherwise, the default sizes shall be implementation-defined.
+.LP
+For the type specifier characters \fBd\fP and \fBu\fP, the default
+number of bytes shall correspond to the size of a
+basic integer type of the implementation. For these specifier characters,
+the implementation shall support values of the optional
+number of bytes to be converted corresponding to the number of bytes
+in the C-language types \fBchar\fP, \fBshort\fP, \fBint\fP,
+or \fBlong\fP. These numbers can also be specified by an application
+as the characters \fBC\fP, \fBS\fP, \fBI\fP, and
+\fBL\fP, respectively. The byte order used when interpreting numeric
+values is implementation-defined, but shall correspond to
+the order in which a constant of the corresponding type is stored
+in memory on the system.
+.LP
+For the type specifier \fBf\fP, the default number of bytes shall
+correspond to the number of bytes in the basic double
+precision floating-point data type of the underlying implementation.
+The implementation shall support values of the optional number
+of bytes to be converted corresponding to the number of bytes in the
+C-language types \fBfloat\fP, \fBdouble\fP, and \fBlong
+double\fP. These numbers can also be specified by an application as
+the characters \fBF\fP, \fBD\fP, and \fBL\fP,
+respectively.
+.LP
+All type specifiers, except for \fBs\fP, can be followed by a mask
+specifier of the form &\fInumber\fP. The mask value
+shall be AND'ed with the value of the input file before the comparison
+with the \fIvalue\fP field of the line is made. By default,
+the mask shall be interpreted as an unsigned decimal number. With
+a leading 0x or 0X, the mask shall be interpreted as an unsigned
+hexadecimal number; otherwise, with a leading 0, the mask shall be
+interpreted as an unsigned octal number.
+.LP
+The strings \fBbyte\fP, \fBshort\fP, \fBlong\fP, and \fBstring\fP
+shall also be supported as type fields, being interpreted
+as \fBdC\fP, \fBdS\fP, \fBdL\fP, and \fBs\fP, respectively.
+.TP 7
+\fIvalue\fP
+The \fIvalue\fP to be compared with the value from the file.
+.LP
+If the specifier from the type field is \fBs\fP or \fBstring\fP, then
+interpret the value as a string. Otherwise, interpret
+it as a number. If the value is a string, then the test shall succeed
+only when a string value exactly matches the bytes from the
+file.
+.LP
+If the \fIvalue\fP is a string, it can contain the following sequences:
+.TP 7
+\\\fIcharacter\fP
+.RS
+The backslash-escape sequences as specified in the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Table 5-1, Escape
+Sequences and Associated Actions ( \fB'\\\\'\fP, \fB'\\a'\fP, \fB'\\b'\fP,
+\fB'\\f'\fP, \fB'\\n'\fP, \fB'\\r'\fP,
+\fB'\\t'\fP, \fB'\\v'\fP ). The results of using any other character,
+other than an octal digit, following the backslash are
+unspecified.
+.RE
+.TP 7
+\\\fIoctal\fP
+.RS
+Octal sequences that can be used to represent characters with specific
+coded values. An octal sequence shall consist of a
+backslash followed by the longest sequence of one, two, or three octal-digit
+characters (01234567). If the size of a byte on the
+system is greater than 9 bits, the valid escape sequence used to represent
+a byte is implementation-defined.
+.RE
+.sp
+.LP
+By default, any value that is not a string shall be interpreted as
+a signed decimal number. Any such value, with a leading 0x or
+0X, shall be interpreted as an unsigned hexadecimal number; otherwise,
+with a leading zero, the value shall be interpreted as an
+unsigned octal number.
+.LP
+If the value is not a string, it can be preceded by a character indicating
+the comparison to be performed. Permissible
+characters and the comparisons they specify are as follows:
+.TP 7
+\fB=\fP
+.RS
+The test shall succeed if the value from the file equals the \fIvalue\fP
+field.
+.RE
+.TP 7
+\fB<\fP
+.RS
+The test shall succeed if the value from the file is less than the
+\fIvalue\fP field.
+.RE
+.TP 7
+\fB>\fP
+.RS
+The test shall succeed if the value from the file is greater than
+the \fIvalue\fP field.
+.RE
+.TP 7
+\fB&\fP
+.RS
+The test shall succeed if all of the set bits in the \fIvalue\fP field
+are set in the value from the file.
+.RE
+.TP 7
+\fB^\fP
+.RS
+The test shall succeed if at least one of the set bits in the \fIvalue\fP
+field is not set in the value from the file.
+.RE
+.TP 7
+\fBx\fP
+.RS
+The test shall succeed if the file is large enough to contain a value
+of the type specified starting at the offset
+specified.
+.RE
+.sp
+.TP 7
+\fImessage\fP
+The \fImessage\fP to be printed if the test succeeds. The \fImessage\fP
+shall be interpreted using the notation for the \fIprintf\fP formatting
+specification; see \fIprintf\fP(). If the
+\fIvalue\fP field was a string, then the value from the file shall
+be the argument for the \fIprintf\fP formatting specification; otherwise,
+the value from the file shall be the
+argument.
+.sp
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The \fIfile\fP utility can only be required to guess at many of the
+file types because only exhaustive testing can determine
+some types with certainty. For example, binary data on some implementations
+might match the initial segment of an executable or a
+\fItar\fP archive.
+.LP
+Note that the table indicates that the output contains the stated
+string. Systems may add text before or after the string. For
+executables, as an example, the machine architecture and various facts
+about how the file was link-edited may be included. Note
+also that on systems that recognize shell script files starting with
+\fB"#!"\fP as executable files, these may be identified as
+executable binary files rather than as shell scripts.
+.SH EXAMPLES
+.LP
+Determine whether an argument is a binary executable file:
+.sp
+.RS
+.nf
+
+\fBfile "$1" | grep -Fq executable &&
+ printf "%s is executable.\\n" "$1"
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+The \fB-f\fP option was omitted because the same effect can (and should)
+be obtained using the \fIxargs\fP utility.
+.LP
+Historical versions of the \fIfile\fP utility attempt to identify
+the following types of files: symbolic link, directory,
+character special, block special, socket, \fItar\fP archive, \fIcpio\fP
+archive, SCCS archive, archive library, empty, \fIcompress\fP output,
+\fIpack\fP output, binary data, C source, FORTRAN source, assembler
+source, \fInroff\fP/ \fItroff\fP/ \fIeqn\fP/ \fItbl\fP source \fItroff\fP
+output, shell script, C shell script, English text,
+ASCII text, various executables, APL workspace, compiled terminfo
+entries, and CURSES screen images. Only those types that are
+reasonably well specified in POSIX or are directly related to POSIX
+utilities are listed in the table.
+.LP
+Historical systems have used a "magic file" named \fB/etc/magic\fP
+to help identify file types. Because it is generally
+useful for users and scripts to be able to identify special file types,
+the \fB-m\fP flag and a portable format for user-created
+magic files has been specified. No requirement is made that an implementation
+of \fIfile\fP use this method of identifying files,
+only that users be permitted to add their own classifying tests.
+.LP
+In addition, three options have been added to historical practice.
+The \fB-d\fP flag has been added to permit users to cause
+their tests to follow any default system tests. The \fB-i\fP flag
+has been added to permit users to test portably for regular
+files in shell scripts. The \fB-M\fP flag has been added to permit
+users to ignore any default system tests.
+.LP
+The IEEE\ Std\ 1003.1-2001 description of default system tests and
+the interaction between the \fB-d\fP, \fB-M\fP, and
+\fB-m\fP options did not clearly indicate that there were two types
+of "default system tests". The "position-sensitive tests''
+determine file types by looking for certain string or binary values
+at specific offsets in the file being examined. These
+position-sensitive tests were implemented in historical systems using
+the magic file described above. Some of these tests are now
+built into the \fIfile\fP utility itself on some implementations so
+the output can provide more detail than can be provided by
+magic files. For example, a magic file can easily identify a \fBcore\fP
+file on most implementations, but cannot name the program
+file that dropped the core. A magic file could produce output such
+as:
+.sp
+.RS
+.nf
+
+\fB/home/dwc/core: ELF 32-bit MSB core file SPARC Version 1
+\fP
+.fi
+.RE
+.LP
+but by building the test into the \fIfile\fP utility, you could get
+output such as:
+.sp
+.RS
+.nf
+
+\fB/home/dwc/core: ELF 32-bit MSB core file SPARC Version 1, from 'testprog'
+\fP
+.fi
+.RE
+.LP
+These extended built-in tests are still to be treated as position-sensitive
+default system tests even if they are not listed in
+\fB/etc/magic\fP or any other magic file.
+.LP
+The context-sensitive default system tests were always built into
+the \fIfile\fP utility. These tests looked for language
+constructs in text files trying to identify shell scripts, C, FORTRAN,
+and other computer language source files, and even plain
+text files. With the addition of the \fB-m\fP and \fB-M\fP options
+the distinction between position-sensitive and
+context-sensitive default system tests became important because the
+order of testing is important. The context-sensitive system
+default tests should never be applied before any position-sensitive
+tests even if the \fB-d\fP option is specified before a
+\fB-m\fP option or \fB-M\fP option due to the high probability that
+the context-sensitive system default tests will incorrectly
+identify arbitrary text files as text files before position-sensitive
+tests specified by the \fB-m\fP or \fB-M\fP option would be
+applied to give a more accurate identification.
+.LP
+Leaving the meaning of \fB-M -\fP and \fB-m -\fP unspecified allows
+an existing prototype of these options to continue to work
+in a backwards-compatible manner. (In that implementation, \fB-M -\fP
+was roughly equivalent to \fB-d\fP in
+IEEE\ Std\ 1003.1-2001.)
+.LP
+The historical \fB-c\fP option was omitted as not particularly useful
+to users or portable shell scripts. In addition, a
+reasonable implementation of the \fIfile\fP utility would report any
+errors found each time the magic file is read.
+.LP
+The historical format of the magic file was the same as that specified
+by the Rationale in the ISO\ POSIX-2:1993 standard
+for the \fIoffset\fP, \fIvalue\fP, and \fImessage\fP fields; however,
+it used less precise type fields than the format specified
+by the current normative text. The new type field values are a superset
+of the historical ones.
+.LP
+The following is an example magic file:
+.sp
+.RS
+.nf
+
+\fB0 short 070707 cpio archive
+0 short 0143561 Byte-swapped cpio archive
+0 string 070707 ASCII cpio archive
+0 long 0177555 Very old archive
+0 short 0177545 Old archive
+0 short 017437 Old packed data
+0 string \\037\\036 Packed data
+0 string \\377\\037 Compacted data
+0 string \\037\\235 Compressed data
+>2 byte&0x80 >0 Block compressed
+>2 byte&0x1f x %d bits
+0 string \\032\\001 Compiled Terminfo Entry
+0 short 0433 Curses screen image
+0 short 0434 Curses screen image
+0 string <ar> System V Release 1 archive
+0 string !<arch>\\n__.SYMDEF Archive random library
+0 string !<arch> Archive
+0 string ARF_BEGARF PHIGS clear text archive
+0 long 0x137A2950 Scalable OpenFont binary
+0 long 0x137A2951 Encrypted scalable OpenFont binary
+\fP
+.fi
+.RE
+.LP
+The use of a basic integer data type is intended to allow the implementation
+to choose a word size commonly used by applications
+on that architecture.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIar\fP, \fIls\fP, \fIpax\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/find.1p b/man-pages-posix-2003/man1p/find.1p
new file mode 100644
index 0000000..4cbe558
--- /dev/null
+++ b/man-pages-posix-2003/man1p/find.1p
@@ -0,0 +1,701 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FIND" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" find
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+find \- find files
+.SH SYNOPSIS
+.LP
+\fBfind\fP \fB[\fP\fB-H | -L\fP\fB]\fP \fIpath\fP \fB...\fP \fB[\fP\fIoperand_expression\fP
+\fB\&...\fP\fB]\fP
+.SH DESCRIPTION
+.LP
+The \fIfind\fP utility shall recursively descend the directory hierarchy
+from each file specified by \fIpath\fP, evaluating a
+Boolean expression composed of the primaries described in the OPERANDS
+section for each file encountered.
+.LP
+The \fIfind\fP utility shall be able to descend to arbitrary depths
+in a file hierarchy and shall not fail due to path length
+limitations (unless a \fIpath\fP operand specified by the application
+exceeds {PATH_MAX} requirements).
+.LP
+The \fIfind\fP utility shall detect infinite loops; that is, entering
+a previously visited directory that is an ancestor of the
+last file encountered. When it detects an infinite loop, \fIfind\fP
+shall write a diagnostic message to standard error and shall
+either recover its position in the hierarchy or terminate.
+.SH OPTIONS
+.LP
+The \fIfind\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported by the implementation:
+.TP 7
+\fB-H\fP
+Cause the file information and file type evaluated for each symbolic
+link encountered on the command line to be those of the
+file referenced by the link, and not the link itself. If the referenced
+file does not exist, the file information and type shall be
+for the link itself. File information for all symbolic links not on
+the command line shall be that of the link itself.
+.TP 7
+\fB-L\fP
+Cause the file information and file type evaluated for each symbolic
+link to be those of the file referenced by the link, and
+not the link itself.
+.sp
+.LP
+Specifying more than one of the mutually-exclusive options \fB-H\fP
+and \fB-L\fP shall not be considered an error. The last
+option specified shall determine the behavior of the utility.
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.LP
+The \fIpath\fP operand is a pathname of a starting point in the directory
+hierarchy.
+.LP
+The first argument that starts with a \fB'-'\fP, or is a \fB'!'\fP
+or a \fB'('\fP, and all subsequent arguments shall
+be interpreted as an \fIexpression\fP made up of the following primaries
+and operators. In the descriptions, wherever \fIn\fP is
+used as a primary argument, it shall be interpreted as a decimal integer
+optionally preceded by a plus ( \fB'+'\fP ) or minus (
+\fB'-'\fP ) sign, as follows:
+.TP 7
++\fIn\fP
+More than \fIn\fP.
+.TP 7
+\fIn\fP
+Exactly \fIn\fP.
+.TP 7
+-\fIn\fP
+Less than \fIn\fP.
+.sp
+.LP
+The following primaries shall be supported:
+.TP 7
+\fB-name\ \fP \fIpattern\fP
+.sp
+The primary shall evaluate as true if the basename of the filename
+being examined matches \fIpattern\fP using the pattern matching
+notation described in \fIPattern Matching Notation\fP .
+.TP 7
+\fB-nouser\fP
+The primary shall evaluate as true if the file belongs to a user ID
+for which the \fIgetpwuid\fP() function defined in the System Interfaces
+volume of
+IEEE\ Std\ 1003.1-2001 (or equivalent) returns NULL.
+.TP 7
+\fB-nogroup\fP
+The primary shall evaluate as true if the file belongs to a group
+ID for which the \fIgetgrgid\fP() function defined in the System Interfaces
+volume of
+IEEE\ Std\ 1003.1-2001 (or equivalent) returns NULL.
+.TP 7
+\fB-xdev\fP
+The primary shall always evaluate as true; it shall cause \fIfind\fP
+not to continue descending past directories that have a
+different device ID ( \fIst_dev\fP, see the \fIstat\fP() function
+defined in the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001). If any \fB-xdev\fP primary
+is specified, it shall apply to the entire
+expression even if the \fB-xdev\fP primary would not normally be evaluated.
+.TP 7
+\fB-prune\fP
+The primary shall always evaluate as true; it shall cause \fIfind\fP
+not to descend the current pathname if it is a directory.
+If the \fB-depth\fP primary is specified, the \fB-prune\fP primary
+shall have no effect.
+.TP 7
+\fB-perm\ [-]\fP\fImode\fP
+.sp
+The \fImode\fP argument is used to represent file mode bits. It shall
+be identical in format to the \fIsymbolic_mode\fP operand
+described in \fIchmod\fP(), and shall be interpreted as follows.
+To start, a template shall be assumed
+with all file mode bits cleared. An \fIop\fP symbol of \fB'+'\fP shall
+set the appropriate mode bits in the template;
+\fB'-'\fP shall clear the appropriate bits; \fB'='\fP shall set the
+appropriate mode bits, without regard to the contents of
+process' file mode creation mask. The \fIop\fP symbol of \fB'-'\fP
+cannot be the first character of \fImode\fP; this avoids
+ambiguity with the optional leading hyphen. Since the initial mode
+is all bits off, there are not any symbolic modes that need to
+use \fB'-'\fP as the first character.
+.LP
+If the hyphen is omitted, the primary shall evaluate as true when
+the file permission bits exactly match the value of the
+resulting template.
+.LP
+Otherwise, if \fImode\fP is prefixed by a hyphen, the primary shall
+evaluate as true if at least all the bits in the resulting
+template are set in the file permission bits.
+.TP 7
+\fB-perm\ [-]\fP\fIonum\fP
+.sp
+If the hyphen is omitted, the primary shall evaluate as true when
+the file permission bits exactly match the value of the octal
+number \fIonum\fP and only the bits corresponding to the octal mask
+07777 shall be compared. (See the description of the octal
+\fImode\fP in \fIchmod\fP().) Otherwise, if \fIonum\fP is prefixed
+by a hyphen, the primary shall
+evaluate as true if at least all of the bits specified in \fIonum\fP
+that are also set in the octal mask 07777 are set.
+.TP 7
+\fB-type\ \fP \fIc\fP
+The primary shall evaluate as true if the type of the file is \fIc\fP,
+where \fIc\fP is \fB'b'\fP, \fB'c'\fP,
+\fB'd'\fP, \fB'l'\fP, \fB'p'\fP, \fB'f'\fP, or \fB's'\fP for block
+special file, character special file,
+directory, symbolic link, FIFO, regular file, or socket, respectively.
+.TP 7
+\fB-links\ \fP \fIn\fP
+The primary shall evaluate as true if the file has \fIn\fP links.
+.TP 7
+\fB-user\ \fP \fIuname\fP
+The primary shall evaluate as true if the file belongs to the user
+\fIuname.\fP If \fIuname\fP is a decimal integer and the
+\fIgetpwnam\fP() (or equivalent) function does not return a valid
+user name, \fIuname\fP
+shall be interpreted as a user ID.
+.TP 7
+\fB-group\ \fP \fIgname\fP
+.sp
+The primary shall evaluate as true if the file belongs to the group
+\fIgname\fP. If \fIgname\fP is a decimal integer and the \fIgetgrnam\fP()
+(or equivalent) function does not return a valid group name, \fIgname\fP
+shall be interpreted as a group ID.
+.TP 7
+\fB-size\ \fP \fIn\fP\fB[c]\fP
+The primary shall evaluate as true if the file size in bytes, divided
+by 512 and rounded up to the next integer, is \fIn\fP.
+If \fIn\fP is followed by the character \fB'c'\fP, the size shall
+be in bytes.
+.TP 7
+\fB-atime\ \fP \fIn\fP
+The primary shall evaluate as true if the file access time subtracted
+from the initialization time, divided by 86400 (with any
+remainder discarded), is \fIn\fP.
+.TP 7
+\fB-ctime\ \fP \fIn\fP
+The primary shall evaluate as true if the time of last change of file
+status information subtracted from the initialization
+time, divided by 86400 (with any remainder discarded), is \fIn\fP.
+.TP 7
+\fB-mtime\ \fP \fIn\fP
+The primary shall evaluate as true if the file modification time subtracted
+from the initialization time, divided by 86400
+(with any remainder discarded), is \fIn\fP.
+.TP 7
+\fB-exec\ \fP \fIutility_name\ \fP \fB[\fP\fIargument\fP\ ...\fB]\ ;\fP
+.TP 7
+\fB-exec\ \fP \fIutility_name\ \fP \fB[\fP\fIargument\fP\ ...\fB]\ \ \fP
+{}\ +
+.sp
+The end of the primary expression shall be punctuated by a semicolon
+or by a plus sign. Only a plus sign that follows an argument
+containing the two characters \fB"{}"\fP shall punctuate the end of
+the primary expression. Other uses of the plus sign shall
+not be treated as special.
+.LP
+If the primary expression is punctuated by a semicolon, the utility
+\fIutility_name\fP shall be invoked once for each pathname
+and the primary shall evaluate as true if the utility returns a zero
+value as exit status. A \fIutility_name\fP or \fIargument\fP
+containing only the two characters \fB"{}"\fP shall be replaced by
+the current pathname.
+.LP
+If the primary expression is punctuated by a plus sign, the primary
+shall always evaluate as true, and the pathnames for which
+the primary is evaluated shall be aggregated into sets. The utility
+\fIutility_name\fP shall be invoked once for each set of
+aggregated pathnames. Each invocation shall begin after the last pathname
+in the set is aggregated, and shall be completed before
+the \fIfind\fP utility exits and before the first pathname in the
+next set (if any) is aggregated for this primary, but it is
+otherwise unspecified whether the invocation occurs before, during,
+or after the evaluations of other primaries. If any invocation
+returns a non-zero value as exit status, the \fIfind\fP utility shall
+return a non-zero exit status. An argument containing only
+the two characters \fB"{}"\fP shall be replaced by the set of aggregated
+pathnames, with each pathname passed as a separate
+argument to the invoked utility in the same order that it was aggregated.
+The size of any set of two or more pathnames shall be
+limited such that execution of the utility does not cause the system's
+{ARG_MAX} limit to be exceeded. If more than one argument
+containing only the two characters \fB"{}"\fP is present, the behavior
+is unspecified.
+.LP
+If a \fIutility_name\fP or \fIargument\fP string contains the two
+characters \fB"{}"\fP, but not just the two characters
+\fB"{}"\fP, it is implementation-defined whether \fIfind\fP replaces
+those two characters or uses the string without change.
+The current directory for the invocation of \fIutility_name\fP shall
+be the same as the current directory when the \fIfind\fP
+utility was started. If the \fIutility_name\fP names any of the special
+built-in utilities (see \fISpecial Built-In Utilities\fP ), the results
+are undefined.
+.TP 7
+\fB-ok\ \fP \fIutility_name\ \fP \fB[\fP\fIargument\fP\ ...\fB]\ ;\fP
+.sp
+The \fB-ok\fP primary shall be equivalent to \fB-exec\fP, except that
+the use of a plus sign to punctuate the end of the primary
+expression need not be supported, and \fIfind\fP shall request affirmation
+of the invocation of \fIutility_name\fP using the
+current file as an argument by writing to standard error as described
+in the STDERR section. If the response on standard input is
+affirmative, the utility shall be invoked. Otherwise, the command
+shall not be invoked and the value of the \fB-ok\fP operand
+shall be false.
+.TP 7
+\fB-print\fP
+The primary shall always evaluate as true; it shall cause the current
+pathname to be written to standard output.
+.TP 7
+\fB-newer\ \fP \fIfile\fP
+The primary shall evaluate as true if the modification time of the
+current file is more recent than the modification time of
+the file named by the pathname \fIfile\fP.
+.TP 7
+\fB-depth\fP
+The primary shall always evaluate as true; it shall cause descent
+of the directory hierarchy to be done so that all entries in
+a directory are acted on before the directory itself. If a \fB-depth\fP
+primary is not specified, all entries in a directory shall
+be acted on after the directory itself. If any \fB-depth\fP primary
+is specified, it shall apply to the entire expression even if
+the \fB-depth\fP primary would not normally be evaluated.
+.sp
+.LP
+The primaries can be combined using the following operators (in order
+of decreasing precedence):
+.TP 7
+(\ \fIexpression\fP\ )
+True if \fIexpression\fP is true.
+.TP 7
+\fB!\ \fP \fIexpression\fP
+Negation of a primary; the unary NOT operator.
+.TP 7
+\fIexpression\ \fP \fB[-a]\ \fP \fIexpression\fP
+.sp
+Conjunction of primaries; the AND operator is implied by the juxtaposition
+of two primaries or made explicit by the optional
+\fB-a\fP operator. The second expression shall not be evaluated if
+the first expression is false.
+.TP 7
+\fIexpression\ \fP \fB-o\ \fP \fIexpression\fP
+.sp
+Alternation of primaries; the OR operator. The second expression shall
+not be evaluated if the first expression is true.
+.sp
+.LP
+If no \fIexpression\fP is present, \fB-print\fP shall be used as the
+expression. Otherwise, if the given expression does not
+contain any of the primaries \fB-exec\fP, \fB-ok\fP, or \fB-print\fP,
+the given expression shall be effectively replaced by:
+.sp
+.RS
+.nf
+
+\fB(\fP \fIgiven_expression\fP \fB) -print
+\fP
+.fi
+.RE
+.LP
+The \fB-user\fP, \fB-group\fP, and \fB-newer\fP primaries each shall
+evaluate their respective arguments only once.
+.SH STDIN
+.LP
+If the \fB-ok\fP primary is used, the response shall be read from
+the standard input. An entire line shall be read as the
+response. Otherwise, the standard input shall not be used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIfind\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_COLLATE\fP
+.sp
+Determine the locale for the behavior of ranges, equivalence classes,
+and multi-character collating elements used in the pattern
+matching notation for the \fB-n\fP option and in the extended regular
+expression defined for the \fByesexpr\fP locale keyword in
+the \fILC_MESSAGES\fP category.
+.TP 7
+\fILC_CTYPE\fP
+This variable determines the locale for the interpretation of sequences
+of bytes of text data as characters (for example,
+single-byte as opposed to multi-byte characters in arguments), the
+behavior of character classes within the pattern matching
+notation used for the \fB-n\fP option, and the behavior of character
+classes within regular expressions used in the extended
+regular expression defined for the \fByesexpr\fP locale keyword in
+the \fILC_MESSAGES\fP category.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale for the processing of affirmative responses that
+should be used to affect the format and contents of
+diagnostic messages written to standard error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fIPATH\fP
+Determine the location of the \fIutility_name\fP for the \fB-exec\fP
+and \fB-ok\fP primaries, as described in the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 8, Environment
+Variables.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The \fB-print\fP primary shall cause the current pathnames to be written
+to standard output. The format shall be:
+.sp
+.RS
+.nf
+
+\fB"%s\\n", <\fP\fIpath\fP\fB>
+\fP
+.fi
+.RE
+.SH STDERR
+.LP
+The \fB-ok\fP primary shall write a prompt to standard error containing
+at least the \fIutility_name\fP to be invoked and the
+current pathname. In the POSIX locale, the last non- <blank> in the
+prompt shall be \fB'?'\fP . The exact format used is
+unspecified.
+.LP
+Otherwise, the standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+All \fIpath\fP operands were traversed successfully.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+When used in operands, pattern matching notation, semicolons, opening
+parentheses, and closing parentheses are special to the
+shell and must be quoted (see \fIQuoting\fP ).
+.LP
+The bit that is traditionally used for sticky (historically 01000)
+is specified in the \fB-perm\fP primary using the octal
+number argument form. Since this bit is not defined by this volume
+of IEEE\ Std\ 1003.1-2001, applications must not assume
+that it actually refers to the traditional sticky bit.
+.SH EXAMPLES
+.IP " 1." 4
+The following commands are equivalent:
+.sp
+.RS
+.nf
+
+\fBfind .
+find . -print
+\fP
+.fi
+.RE
+.LP
+They both write out the entire directory hierarchy from the current
+directory.
+.LP
+.IP " 2." 4
+The following command:
+.sp
+.RS
+.nf
+
+\fBfind / \\( -name tmp -o -name '*.xx' \\) -atime +7 -exec rm {} \\;
+\fP
+.fi
+.RE
+.LP
+removes all files named \fBtmp\fP or ending in \fB.xx\fP that have
+not been accessed for seven or more 24-hour periods.
+.LP
+.IP " 3." 4
+The following command:
+.sp
+.RS
+.nf
+
+\fBfind . -perm -o+w,+s
+\fP
+.fi
+.RE
+.LP
+prints ( \fB-print\fP is assumed) the names of all files in or below
+the current directory, with all of the file permission
+bits S_ISUID, S_ISGID, and S_IWOTH set.
+.LP
+.IP " 4." 4
+The following command:
+.sp
+.RS
+.nf
+
+\fBfind . -name SCCS -prune -o -print
+\fP
+.fi
+.RE
+.LP
+recursively prints pathnames of all files in the current directory
+and below, but skips directories named SCCS and files in
+them.
+.LP
+.IP " 5." 4
+The following command:
+.sp
+.RS
+.nf
+
+\fBfind . -print -name SCCS -prune
+\fP
+.fi
+.RE
+.LP
+behaves as in the previous example, but prints the names of the SCCS
+directories.
+.LP
+.IP " 6." 4
+The following command is roughly equivalent to the \fB-nt\fP extension
+to \fItest\fP:
+.sp
+.RS
+.nf
+
+\fBif [ -n "$(find file1 -prune -newer file2)" ]; then
+ printf %s\\\\n "file1 is newer than file2"
+fi
+\fP
+.fi
+.RE
+.LP
+.IP " 7." 4
+The descriptions of \fB-atime\fP, \fB-ctime\fP, and \fB-mtime\fP use
+the terminology \fIn\fP "86400 second periods
+(days)". For example, a file accessed at 23:59 is selected by:
+.sp
+.RS
+.nf
+
+\fBfind . -atime -1 -print
+\fP
+.fi
+.RE
+.LP
+at 00:01 the next day (less than 24 hours later, not more than one
+day ago); the midnight boundary between days has no effect on
+the 24-hour calculation.
+.LP
+.SH RATIONALE
+.LP
+The \fB-a\fP operator was retained as an optional operator for compatibility
+with historical shell scripts, even though it is
+redundant with expression concatenation.
+.LP
+The descriptions of the \fB'-'\fP modifier on the \fImode\fP and \fIonum\fP
+arguments to the \fB-perm\fP primary agree
+with historical practice on BSD and System V implementations. System
+V and BSD documentation both describe it in terms of checking
+additional bits; in fact, it uses the same bits, but checks for having
+at least all of the matching bits set instead of having
+exactly the matching bits set.
+.LP
+The exact format of the interactive prompts is unspecified. Only the
+general nature of the contents of prompts are specified
+because:
+.IP " *" 3
+Implementations may desire more descriptive prompts than those used
+on historical implementations.
+.LP
+.IP " *" 3
+Since the historical prompt strings do not terminate with <newline>s,
+there is no portable way for another program to
+interact with the prompts of this utility via pipes.
+.LP
+.LP
+Therefore, an application using this prompting option relies on the
+system to provide the most suitable dialog directly with the
+user, based on the general guidelines specified.
+.LP
+The \fB-name\fP \fIfile\fP operand was changed to use the shell pattern
+matching notation so that \fIfind\fP is consistent
+with other utilities using pattern matching.
+.LP
+The \fB-size\fP operand refers to the size of a file, rather than
+the number of blocks it may occupy in the file system. The
+intent is that the \fIst_size\fP field defined in the System Interfaces
+volume of IEEE\ Std\ 1003.1-2001 should be used,
+not the \fIst_blocks\fP found in historical implementations. There
+are at least two reasons for this:
+.IP " 1." 4
+In both System V and BSD, \fIfind\fP only uses \fIst_size\fP in size
+calculations for the operands specified by this volume of
+IEEE\ Std\ 1003.1-2001. (BSD uses \fIst_blocks\fP only when processing
+the \fB-ls\fP primary.)
+.LP
+.IP " 2." 4
+Users usually think of file size in terms of bytes, which is also
+the unit used by the \fIls\fP utility for the output from the \fB-l\fP
+option. (In both System V and BSD, \fIls\fP uses \fIst_size\fP for
+the \fB-l\fP option size field and uses \fIst_blocks\fP for the \fIls\fP
+\fB-s\fP calculations. This volume of IEEE\ Std\ 1003.1-2001 does
+not specify \fIls\fP \fB-s\fP.)
+.LP
+.LP
+The descriptions of \fB-atime\fP, \fB-ctime\fP, and \fB-mtime\fP were
+changed from the SVID description of \fIn\fP "days''
+to "24-hour periods". The description is also different in terms of
+the exact timeframe for the \fIn\fP case (\fIversus\fP the
+\fI+n\fP or \fI-n\fP), but it matches all known historical implementations.
+It refers to one 86400 second period in the past, not
+any time from the beginning of that period to the current time. For
+example, \fB-atime\fP 3 is true if the file was accessed any
+time in the period from 72 hours to 48 hours ago.
+.LP
+Historical implementations do not modify \fB"{}"\fP when it appears
+as a substring of an \fB-exec\fP or \fB-ok\fP
+\fIutility_name\fP or argument string. There have been numerous user
+requests for this extension, so this volume of
+IEEE\ Std\ 1003.1-2001 allows the desired behavior. At least one recent
+implementation does support this feature, but
+encountered several problems in managing memory allocation and dealing
+with multiple occurrences of \fB"{}"\fP in a string while
+it was being developed, so it is not yet required behavior.
+.LP
+Assuming the presence of \fB-print\fP was added to correct a historical
+pitfall that plagues novice users, it is entirely
+upwards-compatible from the historical System V \fIfind\fP utility.
+In its simplest form ( \fIfind\fP \fIdirectory\fP), it could
+be confused with the historical BSD fast \fIfind\fP. The BSD developers
+agreed that adding \fB-print\fP as a default expression
+was the correct decision and have added the fast \fIfind\fP functionality
+within a new utility called \fIlocate\fP.
+.LP
+Historically, the \fB-L\fP option was implemented using the primary
+\fB-follow\fP. The \fB-H\fP and \fB-L\fP options were
+added for two reasons. First, they offer a finer granularity of control
+and consistency with other programs that walk file
+hierarchies. Second, the \fB-follow\fP primary always evaluated to
+true. As they were historically really global variables that
+took effect before the traversal began, some valid expressions had
+unexpected results. An example is the expression \fB-print\fP
+\fB-o\fP \fB-follow\fP. Because \fB-print\fP always evaluates to true,
+the standard order of evaluation implies that
+\fB-follow\fP would never be evaluated. This was never the case. Historical
+practice for the \fB-follow\fP primary, however, is
+not consistent. Some implementations always follow symbolic links
+on the command line whether \fB-follow\fP is specified or not.
+Others follow symbolic links on the command line only if \fB-follow\fP
+is specified. Both behaviors are provided by the \fB-H\fP
+and \fB-L\fP options, but scripts using the current \fB-follow\fP
+primary would be broken if the \fB-follow\fP option is
+specified to work either way.
+.LP
+Since the \fB-L\fP option resolves all symbolic links and the \fB-type\fP
+\fIl\fP primary is true for symbolic links that
+still exist after symbolic links have been resolved, the command:
+.sp
+.RS
+.nf
+
+\fBfind -L . -type l
+\fP
+.fi
+.RE
+.LP
+prints a list of symbolic links reachable from the current directory
+that do not resolve to accessible files.
+.LP
+A feature of SVR4's \fIfind\fP utility was the \fB-exec\fP primary's
+\fB+\fP terminator. This allowed filenames containing
+special characters (especially <newline>s) to be grouped together
+without the problems that occur if such filenames are piped
+to \fIxargs\fP. Other implementations have added other ways to get
+around this problem,
+notably a \fB-print0\fP primary that wrote filenames with a null byte
+terminator. This was considered here, but not adopted. Using
+a null terminator meant that any utility that was going to process
+\fIfind\fP's \fB-print0\fP output had to add a new option to
+parse the null terminators it would now be reading.
+.LP
+The \fB"-exec ... {} +"\fP syntax adopted was a result of IEEE PASC
+Interpretation 1003.2 #210. It should be noted that this
+is an incompatible change to the ISO/IEC\ 9899:1999 standard. For
+example, the following command prints all files with a
+\fB'-'\fP after their name if they are regular files, and a \fB'+'\fP
+otherwise:
+.sp
+.RS
+.nf
+
+\fBfind / -type f -exec echo {} - ';' -o -exec echo {} + ';'
+\fP
+.fi
+.RE
+.LP
+The change invalidates usage like this. Even though the previous standard
+stated that this usage would work, in practice many
+did not support it and the standard developers felt it better to now
+state that this was not allowable.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIQuoting\fP, \fIPattern Matching
+Notation\fP, \fISpecial Built-In Utilities\fP, \fIchmod\fP(), \fIpax\fP,
+\fIsh\fP, \fItest\fP, the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+\fIgetgrgid\fP(), \fIgetpwuid\fP(), \fIstat\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/fold.1p b/man-pages-posix-2003/man1p/fold.1p
new file mode 100644
index 0000000..fd71f33
--- /dev/null
+++ b/man-pages-posix-2003/man1p/fold.1p
@@ -0,0 +1,230 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FOLD" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fold
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fold \- filter for folding lines
+.SH SYNOPSIS
+.LP
+\fBfold\fP \fB[\fP\fB-bs\fP\fB][\fP\fB-w\fP \fIwidth\fP\fB][\fP\fIfile\fP\fB...\fP\fB]\fP
+.SH DESCRIPTION
+.LP
+The \fIfold\fP utility is a filter that shall fold lines from its
+input files, breaking the lines to have a maximum of
+\fIwidth\fP column positions (or bytes, if the \fB-b\fP option is
+specified). Lines shall be broken by the insertion of a
+<newline> such that each output line (referred to later in this section
+as a \fIsegment\fP) is the maximum width possible
+that does not exceed the specified number of column positions (or
+bytes). A line shall not be broken in the middle of a character.
+The behavior is undefined if \fIwidth\fP is less than the number of
+columns any single character in the input would occupy.
+.LP
+If the <carriage-return>s, <backspace>s, or <tab>s are encountered
+in the input, and the \fB-b\fP option is
+not specified, they shall be treated specially:
+.TP 7
+<backspace>
+The current count of line width shall be decremented by one, although
+the count never shall become negative. The \fIfold\fP
+utility shall not insert a <newline> immediately before or after any
+<backspace>.
+.TP 7
+<carriage-return>
+.sp
+The current count of line width shall be set to zero. The \fIfold\fP
+utility shall not insert a <newline> immediately before
+or after any <carriage-return>.
+.TP 7
+<tab>
+Each <tab> encountered shall advance the column position pointer to
+the next tab stop. Tab stops shall be at each column
+position \fIn\fP such that \fIn\fP modulo 8 equals 1.
+.sp
+.SH OPTIONS
+.LP
+The \fIfold\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-b\fP
+Count \fIwidth\fP in bytes rather than column positions.
+.TP 7
+\fB-s\fP
+If a segment of a line contains a <blank> within the first \fIwidth\fP
+column positions (or bytes), break the line after
+the last such <blank> meeting the width constraints. If there is no
+<blank> meeting the requirements, the \fB-s\fP
+option shall have no effect for that output segment of the input line.
+.TP 7
+\fB-w\ \fP \fIwidth\fP
+Specify the maximum line length, in column positions (or bytes if
+\fB-b\fP is specified). The results are unspecified if
+\fIwidth\fP is not a positive decimal number. The default value shall
+be 80.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of a text file to be folded. If no \fIfile\fP operands
+are specified, the standard input shall be used.
+.sp
+.SH STDIN
+.LP
+The standard input shall be used only if no \fIfile\fP operands are
+specified. See the INPUT FILES section.
+.SH INPUT FILES
+.LP
+If the \fB-b\fP option is specified, the input files shall be text
+files except that the lines are not limited to {LINE_MAX}
+bytes in length. If the \fB-b\fP option is not specified, the input
+files shall be text files.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIfold\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files), and
+for the determination of the width in column positions each
+character would occupy on a constant-width font output device.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The standard output shall be a file containing a sequence of characters
+whose order shall be preserved from the input files,
+possibly with inserted <newline>s.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+All input files were processed successfully.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The \fIcut\fP and \fIfold\fP utilities can be used to create text
+files out of files with
+arbitrary line lengths. The \fIcut\fP utility should be used when
+the number of lines (or
+records) needs to remain constant. The \fIfold\fP utility should be
+used when the contents of long lines need to be kept
+contiguous.
+.LP
+The \fIfold\fP utility is frequently used to send text files to printers
+that truncate, rather than fold, lines wider than the
+printer is able to print (usually 80 or 132 column positions).
+.SH EXAMPLES
+.LP
+An example invocation that submits a file of possibly long lines to
+the printer (under the assumption that the user knows the
+line width of the printer to be assigned by \fIlp\fP):
+.sp
+.RS
+.nf
+
+\fBfold -w 132 bigfile | lp
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+Although terminal input in canonical processing mode requires the
+erase character (frequently set to <backspace>) to erase
+the previous character (not byte or column position), terminal output
+is not buffered and is extremely difficult, if not
+impossible, to parse correctly; the interpretation depends entirely
+on the physical device that actually displays/prints/stores the
+output. In all known internationalized implementations, the utilities
+producing output for mixed column-width output assume that a
+<backspace> backs up one column position and outputs enough <backspace>s
+to return to the start of the character when
+<backspace> is used to provide local line motions to support underlining
+and emboldening operations. Since \fIfold\fP
+without the \fB-b\fP option is dealing with these same constraints,
+<backspace> is always treated as backing up one column
+position rather than backing up one character.
+.LP
+Historical versions of the \fIfold\fP utility assumed 1 byte was one
+character and occupied one column position when written
+out. This is no longer always true. Since the most common usage of
+\fIfold\fP is believed to be folding long lines for output to
+limited-length output devices, this capability was preserved as the
+default case. The \fB-b\fP option was added so that
+applications could \fIfold\fP files with arbitrary length lines into
+text files that could then be processed by the standard
+utilities. Note that although the width for the \fB-b\fP option is
+in bytes, a line is never split in the middle of a character.
+(It is unspecified what happens if a width is specified that is too
+small to hold a single character found in the input followed by
+a <newline>.)
+.LP
+The tab stops are hardcoded to be every eighth column to meet historical
+practice. No new method of specifying other tab stops
+was invented.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcut\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/fort77.1p b/man-pages-posix-2003/man1p/fort77.1p
new file mode 100644
index 0000000..bc07d53
--- /dev/null
+++ b/man-pages-posix-2003/man1p/fort77.1p
@@ -0,0 +1,505 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FORT77" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fort77
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fort77 \- FORTRAN compiler (\fBFORTRAN\fP)
+.SH SYNOPSIS
+.LP
+\fBfort77\fP \fB[\fP\fB-c\fP\fB][\fP\fB-g\fP\fB][\fP\fB-L\fP
+\fIdirectory\fP\fB]\fP\fB...\fP \fB[\fP\fB-O\fP \fIoptlevel\fP\fB][\fP\fB-o\fP
+\fIoutfile\fP\fB][\fP\fB-s\fP\fB][\fP\fB-w\fP\fB]
+.br
+\fP \fB\ \ \ \ \ \ \fP \fB\fP\fIoperand\fP\fB... \fP
+.SH DESCRIPTION
+.LP
+The \fIfort77\fP utility is the interface to the FORTRAN compilation
+system; it shall accept the full FORTRAN-77 language
+defined by the ANSI\ X3.9-1978 standard. The system conceptually consists
+of a compiler and link editor. The files referenced
+by \fIoperand\fPs are compiled and linked to produce an executable
+file. It is unspecified whether the linking occurs entirely
+within the operation of \fIfort77\fP; some implementations may produce
+objects that are not fully resolved until the file is
+executed.
+.LP
+If the \fB-c\fP option is present, for all pathname operands of the
+form \fIfile\fP \fB.f\fP, the files:
+.sp
+.RS
+.nf
+
+\fB$(basename\fP \fIpathname\fP\fB.f).o
+\fP
+.fi
+.RE
+.LP
+shall be created or overwritten as the result of successful compilation.
+If the \fB-c\fP option is not specified, it is
+unspecified whether such \fB.o\fP files are created or deleted for
+the \fIfile\fP \fB.f\fP operands.
+.LP
+If there are no options that prevent link editing (such as \fB-c\fP)
+and all operands compile and link without error, the
+resulting executable file shall be written into the file named by
+the \fB-o\fP option (if present) or to the file \fBa.out\fP.
+The executable file shall be created as specified in the System Interfaces
+volume of IEEE\ Std\ 1003.1-2001, except that
+the file permissions shall be set to:
+.sp
+.RS
+.nf
+
+S_IRWXO | S_IRWXG | S_IRWXU
+.fi
+.RE
+.LP
+and that the bits specified by the \fIumask\fP of the process shall
+be cleared.
+.SH OPTIONS
+.LP
+The \fIfort77\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines,
+except that:
+.IP " *" 3
+The \fB-l\fP \fIlibrary\fP operands have the format of options, but
+their position within a list of operands affects the order
+in which libraries are searched.
+.LP
+.IP " *" 3
+The order of specifying the multiple \fB-L\fP options is significant.
+.LP
+.IP " *" 3
+Conforming applications shall specify each option separately; that
+is, grouping option letters (for example, \fB-cg\fP) need
+not be recognized by all implementations.
+.LP
+.LP
+The following options shall be supported:
+.TP 7
+\fB-c\fP
+Suppress the link-edit phase of the compilation, and do not remove
+any object files that are produced.
+.TP 7
+\fB-g\fP
+Produce symbolic information in the object or executable files; the
+nature of this information is unspecified, and may be
+modified by implementation-defined interactions with other options.
+.TP 7
+\fB-s\fP
+Produce object or executable files, or both, from which symbolic and
+other information not required for proper execution using
+the \fIexec\fP family of functions defined in the System Interfaces
+volume of IEEE\ Std\ 1003.1-2001 has been removed
+(stripped). If both \fB-g\fP and \fB-s\fP options are present, the
+action taken is unspecified.
+.TP 7
+\fB-o\ \fP \fIoutfile\fP
+Use the pathname \fIoutfile\fP, instead of the default \fBa.out\fP,
+for the executable file produced. If the \fB-o\fP option
+is present with \fB-c\fP, the result is unspecified.
+.TP 7
+\fB-L\ \fP \fIdirectory\fP
+Change the algorithm of searching for the libraries named in \fB-l\fP
+operands to look in the directory named by the
+\fIdirectory\fP pathname before looking in the usual places. Directories
+named in \fB-L\fP options shall be searched in the
+specified order. At least ten instances of this option shall be supported
+in a single \fIfort77\fP command invocation. If a
+directory specified by a \fB-L\fP option contains a file named \fBlibf.a\fP,
+the results are unspecified.
+.TP 7
+\fB-O\ \fP \fIoptlevel\fP
+Specify the level of code optimization. If the \fIoptlevel\fP option-argument
+is the digit \fB'0'\fP, all special code
+optimizations shall be disabled. If it is the digit \fB'1'\fP, the
+nature of the optimization is unspecified. If the \fB-O\fP
+option is omitted, the nature of the system's default optimization
+is unspecified. It is unspecified whether code generated in the
+presence of the \fB-O\fP 0 option is the same as that generated when
+\fB-O\fP is omitted. Other \fIoptlevel\fP values may be
+supported.
+.TP 7
+\fB-w\fP
+Suppress warnings.
+.sp
+.LP
+Multiple instances of \fB-L\fP options can be specified.
+.SH OPERANDS
+.LP
+An \fIoperand\fP is either in the form of a pathname or the form \fB-l\fP
+\fIlibrary\fP. At least one operand of the pathname
+form shall be specified. The following operands shall be supported:
+.TP 7
+\fIfile.\fP\fBf\fP
+The pathname of a FORTRAN source file to be compiled and optionally
+passed to the link editor. The filename operand shall be of
+this form if the \fB-c\fP option is used.
+.TP 7
+\fIfile.\fP\fBa\fP
+A library of object files typically produced by \fIar\fP, and passed
+directly to the link
+editor. Implementations may recognize implementation-defined suffixes
+other than \fB.a\fP as denoting object file libraries.
+.TP 7
+\fIfile.\fP\fBo\fP
+An object file produced by \fIfort77\fP \fB-c\fP and passed directly
+to the link editor. Implementations may recognize
+implementation-defined suffixes other than \fB.o\fP as denoting object
+files.
+.sp
+.LP
+The processing of other files is implementation-defined.
+.TP 7
+\fB-l\ \fP \fIlibrary\fP
+(The letter ell.) Search the library named:
+.sp
+.RS
+.nf
+
+\fBlib\fP\fIlibrary\fP\fB.a
+\fP
+.fi
+.RE
+.LP
+A library is searched when its name is encountered, so the placement
+of a \fB-l\fP operand is significant. Several standard
+libraries can be specified in this manner, as described in the EXTENDED
+DESCRIPTION section. Implementations may recognize
+implementation-defined suffixes other than \fB.a\fP as denoting libraries.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+The input file shall be one of the following: a text file containing
+FORTRAN source code; an object file in the format produced
+by \fIfort77\fP \fB-c\fP; or a library of object files, in the format
+produced by archiving zero or more object files, using \fIar\fP. Implementations
+may supply additional utilities that produce files in these formats.
+Additional input files are implementation-defined.
+.LP
+A <tab> encountered within the first six characters on a line of source
+code shall cause the compiler to interpret the
+following character as if it were the seventh character on the line
+(that is, in column 7).
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIfort77\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fITMPDIR\fP
+Determine the pathname that should override the default directory
+for temporary files, if any.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages. If
+more than one \fIfile\fP operand ending in \fB.f\fP (or
+possibly other unspecified suffixes) is given, for each such file:
+.sp
+.RS
+.nf
+
+\fB"%s:\\n", <\fP\fIfile\fP\fB>
+\fP
+.fi
+.RE
+.LP
+may be written to allow identification of the diagnostic message with
+the appropriate input file.
+.LP
+This utility may produce warning messages about certain conditions
+that do not warrant returning an error (non-zero) exit
+value.
+.SH OUTPUT FILES
+.LP
+Object files, listing files, and executable files shall be produced
+in unspecified formats.
+.SH EXTENDED DESCRIPTION
+.SS Standard Libraries
+.LP
+The \fIfort77\fP utility shall recognize the following \fB-l\fP operand
+for the standard library:
+.TP 7
+\fB-l\ f\fP
+This library contains all functions referenced in the ANSI\ X3.9-1978
+standard. This operand shall not be required to be
+present to cause a search of this library.
+.sp
+.LP
+In the absence of options that inhibit invocation of the link editor,
+such as \fB-c\fP, the \fIfort77\fP utility shall cause
+the equivalent of a \fB-l\ f\fP operand to be passed to the link editor
+as the last \fB-l\fP operand, causing it to be
+searched after all other object files and libraries are loaded.
+.LP
+It is unspecified whether the library \fBlibf.a\fP exists as a regular
+file. The implementation may accept as \fB-l\fP
+operands names of objects that do not exist as regular files.
+.SS External Symbols
+.LP
+The FORTRAN compiler and link editor shall support the significance
+of external symbols up to a length of at least 31 bytes;
+case folding is permitted. The action taken upon encountering symbols
+exceeding the implementation-defined maximum symbol length is
+unspecified.
+.LP
+The compiler and link editor shall support a minimum of 511 external
+symbols per source or object file, and a minimum of 4095
+external symbols total. A diagnostic message is written to standard
+output if the implementation-defined limit is exceeded; other
+actions are unspecified.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful compilation or link edit.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+When \fIfort77\fP encounters a compilation error, it shall write a
+diagnostic to standard error and continue to compile other
+source code operands. It shall return a non-zero exit status, but
+it is implementation-defined whether an object module is created.
+If the link edit is unsuccessful, a diagnostic message shall be written
+to standard error, and \fIfort77\fP shall exit with a
+non-zero status.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+The following usage example compiles \fBxyz.f\fP and creates the executable
+file \fBfoo\fP:
+.sp
+.RS
+.nf
+
+\fBfort77 -o foo xyz.f
+\fP
+.fi
+.RE
+.LP
+The following example compiles \fBxyz.f\fP and creates the object
+file \fBxyz.o\fP:
+.sp
+.RS
+.nf
+
+\fBfort77 -c xyz.f
+\fP
+.fi
+.RE
+.LP
+The following example compiles \fBxyz.f\fP and creates the executable
+file \fBa.out\fP:
+.sp
+.RS
+.nf
+
+\fBfort77 xyz.f
+\fP
+.fi
+.RE
+.LP
+The following example compiles \fBxyz.f\fP, links it with \fBb.o\fP,
+and creates the executable \fBa.out\fP:
+.sp
+.RS
+.nf
+
+\fBfort77 xyz.f b.o
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+The name of this utility was chosen as \fIfort77\fP to parallel the
+renaming of the C compiler. The name \fIf77\fP was not
+chosen to avoid problems with historical implementations. The ANSI\ X3.9-1978
+standard was selected as a normative reference
+because the ISO/IEC version of FORTRAN-77 has been superseded by the
+ISO/IEC\ 1539:1990 standard (Fortran-90).
+.LP
+The file inclusion and symbol definition \fB#define\fP mechanisms
+used by the \fIc99\fP
+utility were not included in this volume of IEEE\ Std\ 1003.1-2001-even
+though they are commonly implemented-since there is
+no requirement that the FORTRAN compiler use the C preprocessor.
+.LP
+The \fB-onetrip\fP option was not included in this volume of IEEE\ Std\ 1003.1-2001,
+even though many historical
+compilers support it, because it is derived from FORTRAN-66; it is
+an anachronism that should not be perpetuated.
+.LP
+Some implementations produce compilation listings. This aspect of
+FORTRAN has been left unspecified because there was
+controversy concerning the various methods proposed for implementing
+it: a \fB-V\fP option overlapped with historical vendor
+practice and a naming convention of creating files with \fB.l\fP suffixes
+collided with historical \fIlex\fP file naming practice.
+.LP
+There is no \fB-I\fP option in this version of this volume of IEEE\ Std\ 1003.1-2001
+to specify a directory for file
+inclusion. An INCLUDE directive has been a part of the Fortran-90
+discussions, but an interface supporting that standard is not in
+the current scope.
+.LP
+It is noted that many FORTRAN compilers produce an object module even
+when compilation errors occur; during a subsequent
+compilation, the compiler may patch the object module rather than
+recompiling all the code. Consequently, it is left to the
+implementor whether or not an object file is created.
+.LP
+A reference to MIL-STD-1753 was removed from an early proposal in
+response to a request from the POSIX FORTRAN-binding standard
+developers. It was not the intention of the standard developers to
+require certification of the FORTRAN compiler, and
+IEEE\ Std\ 1003.9-1992 does not specify the military standard or any
+special preprocessing requirements. Furthermore, use
+of that document would have been inappropriate for an international
+standard.
+.LP
+The specification of optimization has been subject to changes through
+early proposals. At one time, \fB-O\fP and \fB-N\fP were
+Booleans: optimize and do not optimize (with an unspecified default).
+Some historical practice led this to be changed to:
+.TP 7
+\fB-O\fP\ 0
+No optimization.
+.TP 7
+\fB-O\fP\ 1
+Some level of optimization.
+.TP 7
+\fB-O\ \fP \fIn\fP
+Other, unspecified levels of optimization.
+.sp
+.LP
+It is not always clear whether "good code generation" is the same
+thing as optimization. Simple optimizations of local actions
+do not usually affect the semantics of a program. The \fB-O\fP 0 option
+has been included to accommodate the very particular
+nature of scientific calculations in a highly optimized environment;
+compilers make errors. Some degree of optimization is
+expected, even if it is not documented here, and the ability to shut
+it off completely could be important when porting an
+application. An implementation may treat \fB-O\fP 0 as "do less than
+normal" if it wishes, but this is only meaningful if any of
+the operations it performs can affect the semantics of a program.
+It is highly dependent on the implementation whether doing less
+than normal is logical. It is not the intent of the \fB-O\fP 0 option
+to ask for inefficient code generation, but rather to assure
+that any semantically visible optimization is suppressed.
+.LP
+The specification of standard library access is consistent with the
+C compiler specification. Implementations are not required
+to have \fB/usr/lib/libf.a\fP, as many historical implementations
+do, but if not they are required to recognize \fBf\fP as a
+token.
+.LP
+External symbol size limits are in normative text; conforming applications
+need to know these limits. However, the minimum
+maximum symbol length should be taken as a constraint on a conforming
+application, not on an implementation, and consequently the
+action taken for a symbol exceeding the limit is unspecified. The
+minimum size for the external symbol table was added for similar
+reasons.
+.LP
+The CONSEQUENCES OF ERRORS section clearly specifies the behavior
+of the compiler when compilation or link-edit errors occur.
+The behavior of several historical implementations was examined, and
+the choice was made to be silent on the status of the
+executable, or \fBa.out\fP, file in the face of compiler or linker
+errors. If a linker writes the executable file, then links it
+on disk with \fIlseek\fP()s and \fIwrite\fP()s, the
+partially linked executable file can be left on disk and its execute
+bits turned off if the link edit fails. However, if the linker
+links the image in memory before writing the file to disk, it need
+not touch the executable file (if it already exists) because the
+link edit fails. Since both approaches are historical practice, a
+conforming application shall rely on the exit status of
+\fIfort77\fP, rather than on the existence or mode of the executable
+file.
+.LP
+The \fB-g\fP and \fB-s\fP options are not specified as mutually-exclusive.
+Historically these two options have been
+mutually-exclusive, but because both are so loosely specified, it
+seemed appropriate to leave their interaction unspecified.
+.LP
+The requirement that conforming applications specify compiler options
+separately is to reserve the multi-character option name
+space for vendor-specific compiler options, which are known to exist
+in many historical implementations. Implementations are not
+required to recognize, for example, \fB-gc\fP as if it were \fB-g\fP
+\fB-c\fP; nor are they forbidden from doing so. The
+SYNOPSIS shows all of the options separately to highlight this requirement
+on applications.
+.LP
+Echoing filenames to standard error is considered a diagnostic message
+because it would otherwise be difficult to associate an
+error message with the erring file. They are described with "may"
+to allow implementations to use other methods of identifying
+files and to parallel the description in \fIc99\fP.
+.SH FUTURE DIRECTIONS
+.LP
+A compilation system based on the ISO/IEC\ 1539:1990 standard (Fortran-90)
+may be considered for a future version; it may
+have a different utility name from \fIfort77\fP.
+.SH SEE ALSO
+.LP
+\fIar\fP, \fIasa\fP, \fIc99\fP, \fIumask\fP(), the System Interfaces
+volume of IEEE\ Std\ 1003.1-2001, \fIexec\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/fuser.1p b/man-pages-posix-2003/man1p/fuser.1p
new file mode 100644
index 0000000..187628e
--- /dev/null
+++ b/man-pages-posix-2003/man1p/fuser.1p
@@ -0,0 +1,205 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FUSER" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fuser
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fuser \- list process IDs of all processes that have one or more files
+open
+.SH SYNOPSIS
+.LP
+\fBfuser\fP \fB[\fP \fB-cfu\fP \fB]\fP \fIfile\fP \fB... \fP
+.SH DESCRIPTION
+.LP
+The \fIfuser\fP utility shall write to standard output the process
+IDs of processes running on the local system that have one
+or more named files open. For block special devices, all processes
+using any file on that device are listed.
+.LP
+The \fIfuser\fP utility shall write to standard error additional information
+about the named files indicating how the file is
+being used.
+.LP
+Any output for processes running on remote systems that have a named
+file open is unspecified.
+.LP
+A user may need appropriate privilege to invoke the \fIfuser\fP utility.
+.SH OPTIONS
+.LP
+The \fIfuser\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-c\fP
+The file is treated as a mount point and the utility shall report
+on any files open in the file system.
+.TP 7
+\fB-f\fP
+The report shall be only for the named files.
+.TP 7
+\fB-u\fP
+The user name, in parentheses, associated with each process ID written
+to standard output shall be written to standard
+error.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname on which the file or file system is to be reported.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+The user database.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIfuser\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The \fIfuser\fP utility shall write the process ID for each process
+using each file given as an operand to standard output in
+the following format:
+.sp
+.RS
+.nf
+
+\fB"%d", <\fP\fIprocess_id\fP\fB>
+\fP
+.fi
+.RE
+.SH STDERR
+.LP
+The \fIfuser\fP utility shall write diagnostic messages to standard
+error.
+.LP
+The \fIfuser\fP utility also shall write the following to standard
+error:
+.IP " *" 3
+The pathname of each named file is written followed immediately by
+a colon.
+.LP
+.IP " *" 3
+For each process ID written to standard output, the character \fB'c'\fP
+shall be written to standard error if the process is
+using the file as its current directory and the character \fB'r'\fP
+shall be written to standard error if the process is using
+the file as its root directory. Implementations may write other alphabetic
+characters to indicate other uses of files.
+.LP
+.IP " *" 3
+When the \fB-u\fP option is specified, characters indicating the use
+of the file shall be followed immediately by the user
+name, in parentheses, corresponding to the process' real user ID.
+If the user name cannot be resolved from the process' real user
+ID, the process' real user ID shall be written instead of the user
+name.
+.LP
+.LP
+When standard output and standard error are directed to the same file,
+the output shall be interleaved so that the filename
+appears at the start of each line, followed by the process ID and
+characters indicating the use of the file. Then, if the \fB-u\fP
+option is specified, the user name or user ID for each process using
+that file shall be written.
+.LP
+A <newline> shall be written to standard error after the last output
+described above for each \fIfile\fP operand.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+The command:
+.sp
+.RS
+.nf
+
+\fBfuser -fu .
+\fP
+.fi
+.RE
+.LP
+writes to standard output the process IDs of processes that are using
+the current directory and writes to standard error an
+indication of how those processes are using the directory and the
+user names associated with the processes that are using the
+current directory.
+.SH RATIONALE
+.LP
+The definition of the \fIfuser\fP utility follows existing practice.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+None.
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/gencat.1p b/man-pages-posix-2003/man1p/gencat.1p
new file mode 100644
index 0000000..b20e173
--- /dev/null
+++ b/man-pages-posix-2003/man1p/gencat.1p
@@ -0,0 +1,242 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GENCAT" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" gencat
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+gencat \- generate a formatted message catalog
+.SH SYNOPSIS
+.LP
+\fBgencat\fP \fIcatfile msgfile\fP\fB... \fP
+.SH DESCRIPTION
+.LP
+The \fIgencat\fP utility shall merge the message text source file
+\fImsgfile\fP into a formatted message catalog
+\fIcatfile\fP. The file \fIcatfile\fP shall be created if it does
+not already exist. If \fIcatfile\fP does exist, its messages
+shall be included in the new \fIcatfile\fP. If set and message numbers
+collide, the new message text defined in \fImsgfile\fP
+shall replace the old message text currently contained in \fIcatfile\fP.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIcatfile\fP
+A pathname of the formatted message catalog. If \fB'-'\fP is specified,
+standard output shall be used. The format of the
+message catalog produced is unspecified.
+.TP 7
+\fImsgfile\fP
+A pathname of a message text source file. If \fB'-'\fP is specified
+for an instance of \fImsgfile\fP, standard input shall
+be used. The format of message text source files is defined in the
+EXTENDED DESCRIPTION section.
+.sp
+.SH STDIN
+.LP
+The standard input shall not be used unless a \fImsgfile\fP operand
+is specified as \fB'-'\fP .
+.SH INPUT FILES
+.LP
+The input files shall be text files.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIgencat\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The standard output shall not be used unless the \fIcatfile\fP operand
+is specified as \fB'-'\fP .
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+The content of a message text file shall be in the format defined
+as follows. Note that the fields of a message text source line
+are separated by a single <blank>. Any other <blank>s are considered
+to be part of the subsequent field.
+.TP 7
+\fB$set\ \fP \fIn\ comment\fP
+.sp
+This line specifies the set identifier of the following messages until
+the next \fB$set\fP or end-of-file appears. The \fIn\fP
+denotes the set identifier, which is defined as a number in the range
+[1, {NL_SETMAX}] (see the \fI<limits.h>\fP header defined in the Base
+Definitions volume of
+IEEE\ Std\ 1003.1-2001). The application shall ensure that set identifiers
+are presented in ascending order within a single
+source file, but need not be contiguous. Any string following the
+set identifier shall be treated as a comment. If no \fB$set\fP
+directive is specified in a message text source file, all messages
+shall be located in an implementation-defined default message
+set NL_SETD (see the \fI<nl_types.h>\fP header defined in the Base
+Definitions
+volume of IEEE\ Std\ 1003.1-2001).
+.TP 7
+\fB$delset\ \fP \fIn\ comment\fP
+.sp
+This line deletes message set \fIn\fP from an existing message catalog.
+The \fIn\fP denotes the set number [1, {NL_SETMAX}]. Any
+string following the set number shall be treated as a comment.
+.TP 7
+\fB$\ \fP \fIcomment\fP
+A line beginning with \fB'$'\fP followed by a <blank> shall be treated
+as a comment.
+.TP 7
+\fIm\ message-text\fP
+.sp
+The \fIm\fP denotes the message identifier, which is defined as a
+number in the range [1, {NL_MSGMAX}] (see the \fI<limits.h>\fP header).
+The \fImessage-text\fP shall be stored in the message catalog
+with the set identifier specified by the last \fB$set\fP directive,
+and with message identifier \fIm\fP. If the
+\fImessage-text\fP is empty, and a <blank> field separator is present,
+an empty string shall be stored in the message
+catalog. If a message source line has a message number, but neither
+a field separator nor \fImessage-text\fP, the existing message
+with that number (if any) shall be deleted from the catalog. The application
+shall ensure that message identifiers are in ascending
+order within a single set, but need not be contiguous. The application
+shall ensure that the length of \fImessage-text\fP is in
+the range [0, {NL_TEXTMAX}] (see the \fI<limits.h>\fP header).
+.TP 7
+\fB$quote\ \fP \fIn\fP
+This line specifies an optional quote character \fIc\fP, which can
+be used to surround \fImessage-text\fP so that trailing
+spaces or null (empty) messages are visible in a message source line.
+By default, or if an empty \fB$quote\fP directive is
+supplied, no quoting of \fImessage-text\fP shall be recognized.
+.sp
+.LP
+Empty lines in a message text source file shall be ignored. The effects
+of lines starting with any character other than those
+defined above are implementation-defined.
+.LP
+Text strings can contain the special characters and escape sequences
+defined in the following table:
+.TS C
+center; l l l.
+\fBDescription\fP \fBSymbol\fP \fBSequence\fP
+<newline> NL(LF) \\n
+Horizontal-tab HT \\t
+<vertical-tab> VT \\v
+<backspace> BS \\b
+<carriage-return> CR \\r
+<form-feed> FF \\f
+Backslash \fB\\\fP \\\\
+Bit pattern \fBddd\fP \\ddd
+.TE
+.LP
+The escape sequence \fB"\\ddd"\fP consists of backslash followed by
+one, two, or three octal digits, which shall be taken to
+specify the value of the desired character. If the character following
+a backslash is not one of those specified, the backslash
+shall be ignored.
+.LP
+Backslash ( \fB'\\'\fP ) followed by a <newline> is also used to continue
+a string on the following line. Thus, the
+following two lines describe a single message string:
+.sp
+.RS
+.nf
+
+\fB1 This line continues \\
+to the next line
+\fP
+.fi
+.RE
+.LP
+which shall be equivalent to:
+.sp
+.RS
+.nf
+
+\fB1 This line continues to the next line
+\fP
+.fi
+.RE
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Message catalogs produced by \fIgencat\fP are binary encoded, meaning
+that their portability cannot be guaranteed between
+different types of machine. Thus, just as C programs need to be recompiled
+for each type of machine, so message catalogs must be
+recreated via \fIgencat\fP.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIiconv\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<limits.h>\fP, \fI<nl_types.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/get.1p b/man-pages-posix-2003/man1p/get.1p
new file mode 100644
index 0000000..cfe66d5
--- /dev/null
+++ b/man-pages-posix-2003/man1p/get.1p
@@ -0,0 +1,742 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GET" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" get
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+get \- get a version of an SCCS file (\fBDEVELOPMENT\fP)
+.SH SYNOPSIS
+.LP
+\fBget\fP \fB[\fP\fB-begkmnlLpst\fP\fB][\fP\fB-c\fP \fIcutoff\fP\fB][\fP\fB-i\fP
+\fIlist\fP\fB][\fP\fB-r\fP \fISID\fP\fB][\fP\fB-x\fP \fIlist\fP\fB]\fP
+\fIfile\fP\fB... \fP
+.SH DESCRIPTION
+.LP
+The \fIget\fP utility shall generate a text file from each named SCCS
+\fIfile\fP according to the specifications given by its
+options.
+.LP
+The generated text shall normally be written into a file called the
+\fBg-file\fP whose name is derived from the SCCS filename
+by simply removing the leading \fB"s."\fP .
+.SH OPTIONS
+.LP
+The \fIget\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-r\ \fP \fISID\fP
+Indicate the SCCS Identification String (SID) of the version (delta)
+of an SCCS file to be retrieved. The table shows, for the
+most useful cases, what version of an SCCS file is retrieved (as well
+as the SID of the version to be eventually created by \fIdelta\fP
+if the \fB-e\fP option is also used), as a function of the SID specified.
+.TP 7
+\fB-c\ \fP \fIcutoff\fP
+Indicate the \fIcutoff\fP date-time, in the form:
+.sp
+.RS
+.nf
+
+\fIYY\fP\fB[\fP\fIMM\fP\fB[\fP\fIDD\fP\fB[\fP\fIHH\fP\fB[\fP\fIMM\fP\fB[\fP\fISS\fP\fB]]]]]\fP
+.fi
+.RE
+.LP
+For the \fIYY\fP component, values in the range [69,99] shall refer
+to years 1969 to 1999 inclusive, and values in the range
+[00,68] shall refer to years 2000 to 2068 inclusive.
+.TP 7
+\fBNote:\fP
+.RS
+It is expected that in a future version of IEEE\ Std\ 1003.1-2001
+the default century inferred from a 2-digit year will
+change. (This would apply to all commands accepting a 2-digit year
+as input.)
+.RE
+.sp
+.LP
+No changes (deltas) to the SCCS file that were created after the specified
+\fIcutoff\fP date-time shall be included in the
+generated text file. Units omitted from the date-time default to their
+maximum possible values; for example, \fB-c\fP 7502 is
+equivalent to \fB-c\fP 750228235959.
+.LP
+Any number of non-numeric characters may separate the various 2-digit
+pieces of the \fIcutoff\fP date-time. This feature allows
+the user to specify a \fIcutoff\fP date in the form: \fB-c\fP "77/2/2\ 9:22:25".
+.TP 7
+\fB-e\fP
+Indicate that the \fIget\fP is for the purpose of editing or making
+a change (delta) to the SCCS file via a subsequent use of
+\fIdelta\fP. The \fB-e\fP option used in a \fIget\fP for a particular
+version (SID) of the
+SCCS file shall prevent further \fIget\fP commands from editing on
+the same SID until \fIdelta\fP is executed or the \fBj\fP (joint edit)
+flag is set in the SCCS file. Concurrent use of
+\fIget\fP \fB-e\fP for different SIDs is always allowed.
+.LP
+If the \fBg-file\fP generated by \fIget\fP with a \fB-e\fP option
+is accidentally ruined in the process of editing, it may be
+regenerated by re-executing the \fIget\fP command with the \fB-k\fP
+option in place of the \fB-e\fP option.
+.LP
+SCCS file protection specified via the ceiling, floor, and authorized
+user list stored in the SCCS file shall be enforced when
+the \fB-e\fP option is used.
+.TP 7
+\fB-b\fP
+Use with the \fB-e\fP option to indicate that the new delta should
+have an SID in a new branch as shown in the table below.
+This option shall be ignored if the \fBb\fP flag is not present in
+the file or if the retrieved delta is not a leaf delta. (A leaf
+delta is one that has no successors on the SCCS file tree.)
+.TP 7
+\fBNote:\fP
+.RS
+A branch delta may always be created from a non-leaf delta.
+.RE
+.sp
+.TP 7
+\fB-i\ \fP \fIlist\fP
+Indicate a \fIlist\fP of deltas to be included (forced to be applied)
+in the creation of the generated file. The \fIlist\fP
+has the following syntax:
+.sp
+.RS
+.nf
+
+\fB<list> ::= <range> | <list> , <range>
+<range> ::= SID | SID - SID
+\fP
+.fi
+.RE
+.LP
+SID, the SCCS Identification of a delta, may be in any form shown
+in the "SID Specified" column of the table in the EXTENDED
+DESCRIPTION section, except that the result of supplying a partial
+SID is unspecified. A diagnostic message shall be written if the
+first SID in the range is not an ancestor of the second SID in the
+range.
+.TP 7
+\fB-x\ \fP \fIlist\fP
+Indicate a \fIlist\fP of deltas to be excluded (forced not to be applied)
+in the creation of the generated file. See the
+\fB-i\fP option for the \fIlist\fP format.
+.TP 7
+\fB-k\fP
+Suppress replacement of identification keywords (see below) in the
+retrieved text by their value. The \fB-k\fP option shall be
+implied by the \fB-e\fP option.
+.TP 7
+\fB-l\fP
+Write a delta summary into an \fBl-file\fP.
+.TP 7
+\fB-L\fP
+Write a delta summary to standard output. All informative output that
+normally is written to standard output shall be written
+to standard error instead, unless the \fB-s\fP option is used, in
+which case it shall be suppressed.
+.TP 7
+\fB-p\fP
+Write the text retrieved from the SCCS file to the standard output.
+No \fBg-file\fP shall be created. All informative output
+that normally goes to the standard output shall go to standard error
+instead, unless the \fB-s\fP option is used, in which case it
+shall disappear.
+.TP 7
+\fB-s\fP
+Suppress all informative output normally written to standard output.
+However, fatal error messages (which shall always be
+written to the standard error) shall remain unaffected.
+.TP 7
+\fB-m\fP
+Precede each text line retrieved from the SCCS file by the SID of
+the delta that inserted the text line in the SCCS file. The
+format shall be:
+.sp
+.RS
+.nf
+
+\fB"%s\\t%s", <\fP\fISID\fP\fB>, <\fP\fItext line\fP\fB>
+\fP
+.fi
+.RE
+.TP 7
+\fB-n\fP
+Precede each generated text line with the %\fBM\fP% identification
+keyword value (see below). The format shall be:
+.sp
+.RS
+.nf
+
+\fB"%s\\t%s", <\fP\fI%M% value\fP\fB>, <\fP\fItext line\fP\fB>
+\fP
+.fi
+.RE
+.LP
+When both the \fB-m\fP and \fB-n\fP options are used, the <\fItext\ line\fP>
+shall be replaced by the \fB-m\fP
+option-generated format.
+.TP 7
+\fB-g\fP
+Suppress the actual retrieval of text from the SCCS file. It is primarily
+used to generate an \fBl-file\fP, or to verify the
+existence of a particular SID.
+.TP 7
+\fB-t\fP
+Use to access the most recently created (top) delta in a given release
+(for example, \fB-r 1\fP), or release and level (for
+example, \fB-r 1.2\fP).
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of an existing SCCS file or a directory. If \fIfile\fP
+is a directory, the \fIget\fP utility shall behave as
+though each file in the directory were specified as a named file,
+except that non-SCCS files (last component of the pathname does
+not begin with \fBs.\fP) and unreadable files shall be silently ignored.
+.LP
+If exactly one \fIfile\fP operand appears, and it is \fB'-'\fP, the
+standard input shall be read; each line of the standard
+input is taken to be the name of an SCCS file to be processed. Non-SCCS
+files and unreadable files shall be silently ignored.
+.sp
+.SH STDIN
+.LP
+The standard input shall be a text file used only if the \fIfile\fP
+operand is specified as \fB'-'\fP . Each line of the
+text file shall be interpreted as an SCCS pathname.
+.SH INPUT FILES
+.LP
+The SCCS files shall be files of an unspecified format.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIget\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard error,
+and informative messages written to standard output (or standard error,
+if the \fB-p\fP option is used).
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fITZ\fP
+Determine the timezone in which the times and dates written in the
+SCCS file are evaluated. If the \fITZ\fP variable is unset
+or NULL, an unspecified system default timezone is used.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+For each file processed, \fIget\fP shall write to standard output
+the SID being accessed and the number of lines retrieved from
+the SCCS file, in the following format:
+.sp
+.RS
+.nf
+
+\fB"%s\\n%d lines\\n", <\fP\fISID\fP\fB>, <\fP\fInumber of lines\fP\fB>
+\fP
+.fi
+.RE
+.LP
+If the \fB-e\fP option is used, the SID of the delta to be made shall
+appear after the SID accessed and before the number of
+lines generated, in the POSIX locale:
+.sp
+.RS
+.nf
+
+\fB"%s\\nnew delta %s\\n%d lines\\n", <\fP\fISID accessed\fP\fB>,
+ <\fP\fISID to be made\fP\fB>, <\fP\fInumber of lines\fP\fB>
+\fP
+.fi
+.RE
+.LP
+If there is more than one named file or if a directory or standard
+input is named, each pathname shall be written before each of
+the lines shown in one of the preceding formats:
+.sp
+.RS
+.nf
+
+\fB"\\n%s:\\n", <\fP\fIpathname\fP\fB>
+\fP
+.fi
+.RE
+.LP
+If the \fB-L\fP option is used, a delta summary shall be written following
+the format specified below for \fBl-files\fP.
+.LP
+If the \fB-i\fP option is used, included deltas shall be listed following
+the notation, in the POSIX locale:
+.sp
+.RS
+.nf
+
+\fB"Included:\\n"
+\fP
+.fi
+.RE
+.LP
+If the \fB-x\fP option is used, excluded deltas shall be listed following
+the notation, in the POSIX locale:
+.sp
+.RS
+.nf
+
+\fB"Excluded:\\n"
+\fP
+.fi
+.RE
+.LP
+If the \fB-p\fP or \fB-L\fP options are specified, the standard output
+shall consist of the text retrieved from the SCCS
+file.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages, except
+if the \fB-p\fP or \fB-L\fP options are specified, it
+shall include all informative messages normally sent to standard output.
+.SH OUTPUT FILES
+.LP
+Several auxiliary files may be created by \fIget\fP. These files are
+known generically as the \fBg-file\fP, \fBl-file\fP,
+\fBp-file\fP, and \fBz-file\fP. The letter before the hyphen is called
+the \fItag\fP. An auxiliary filename shall be formed from
+the SCCS filename: the application shall ensure that the last component
+of all SCCS filenames is of the form \fBs.\fP
+\fImodule-name\fP; the auxiliary files shall be named by replacing
+the leading \fBs\fP with the tag. The \fBg-file\fP shall be
+an exception to this scheme: the \fBg-file\fP is named by removing
+the \fBs.\fP prefix. For example, for \fBs.xyz.c\fP, the
+auxiliary filenames would be \fBxyz.c\fP, \fBl.xyz.c\fP, \fBp.xyz.c\fP,
+and \fBz.xyz.c\fP, respectively.
+.LP
+The \fBg-file\fP, which contains the generated text, shall be created
+in the current directory (unless the \fB-p\fP option is
+used). A \fBg-file\fP shall be created in all cases, whether or not
+any lines of text were generated by the \fIget\fP. It shall
+be owned by the real user. If the \fB-k\fP option is used or implied,
+the \fBg-file\fP shall be writable by the owner only
+(read-only for everyone else); otherwise, it shall be read-only. Only
+the real user need have write permission in the current
+directory.
+.LP
+The \fBl-file\fP shall contain a table showing which deltas were applied
+in generating the retrieved text. The \fBl-file\fP
+shall be created in the current directory if the \fB-l\fP option is
+used; it shall be read-only and it is owned by the real user.
+Only the real user need have write permission in the current directory.
+.LP
+Lines in the \fBl-file\fP shall have the following format:
+.sp
+.RS
+.nf
+
+\fB"%c%c%c %s\\t%s %s\\n", <\fP\fIcode1\fP\fB>, <\fP\fIcode2\fP\fB>, <\fP\fIcode3\fP\fB>,
+ <\fP\fISID\fP\fB>, <\fP\fIdate-time\fP\fB>, <\fP\fIlogin\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where the entries are:
+.TP 7
+<\fIcode1\fP>
+A <space> if the delta was applied; \fB'*'\fP otherwise.
+.TP 7
+<\fIcode2\fP>
+A <space> if the delta was applied or was not applied and ignored;
+\fB'*'\fP if the delta was not applied and was not
+ignored.
+.TP 7
+<\fIcode3\fP>
+A character indicating a special reason why the delta was or was not
+applied:
+.TP 7
+\fBI\fP
+.RS
+Included.
+.RE
+.TP 7
+\fBX\fP
+.RS
+Excluded.
+.RE
+.TP 7
+\fBC\fP
+.RS
+Cut off (by a \fB-c\fP option).
+.RE
+.sp
+.TP 7
+<\fIdate-time\fP>
+Date and time (using the format of the \fIdate\fP utility's \fB%y\fP
+/ \fB%m\fP /
+\fB%d\fP \fB%T\fP conversion specification format) of creation.
+.TP 7
+<\fIlogin\fP>
+Login name of person who created \fIdelta\fP.
+.sp
+.LP
+The comments and MR data shall follow on subsequent lines, indented
+one <tab>. A blank line shall terminate each
+entry.
+.LP
+The \fBp-file\fP shall be used to pass information resulting from
+a \fIget\fP with a \fB-e\fP option along to \fIdelta\fP. Its contents
+shall also be used to prevent a subsequent execution of \fIget\fP
+with a
+\fB-e\fP option for the same SID until \fIdelta\fP is executed or
+the joint edit flag,
+\fBj\fP, is set in the SCCS file. The \fBp-file\fP shall be created
+in the directory containing the SCCS file and the application
+shall ensure that the effective user has write permission in that
+directory. It shall be writable by owner only, and owned by the
+effective user. Each line in the \fBp-file\fP shall have the following
+format:
+.sp
+.RS
+.nf
+
+\fB"%s %s %s %s%s%s\\n", <\fP\fIg-file SID\fP\fB>,
+ <\fP\fISID of new delta\fP\fB>, <\fP\fIlogin-name of real user\fP\fB>,
+ <\fP\fIdate-time\fP\fB>, <\fP\fIi-value\fP\fB>, <\fP\fIx-value\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where <\fIi-value\fP> uses the format \fB""\fP if no \fB-i\fP option
+was specified, and shall use the format:
+.sp
+.RS
+.nf
+
+\fB" -i%s", <-i option\fP \fIoption-argument\fP\fB>
+\fP
+.fi
+.RE
+.LP
+if a \fB-i\fP option was specified and <\fIx-value\fP> uses the format
+\fB""\fP if no \fB-x\fP option was specified,
+and shall use the format:
+.sp
+.RS
+.nf
+
+\fB" -x%s", <-x option\fP \fIoption-argument\fP\fB>
+\fP
+.fi
+.RE
+.LP
+if a \fB-x\fP option was specified. There can be an arbitrary number
+of lines in the \fBp-file\fP at any time; no two lines
+shall have the same new delta SID.
+.LP
+The \fBz-file\fP shall serve as a lock-out mechanism against simultaneous
+updates. Its contents shall be the binary process ID
+of the command (that is, \fIget\fP) that created it. The \fBz-file\fP
+shall be created in the directory containing the SCCS file
+for the duration of \fIget\fP. The same protection restrictions as
+those for the \fBp-file\fP shall apply for the \fBz-file\fP.
+The \fBz-file\fP shall be created read-only.
+.br
+.SH EXTENDED DESCRIPTION
+.TS C
+center;c1 s1 s1 s1 s.
+\fBDetermination of SCCS Identification String\fP
+.T&
+ l1 l1 lw(22)1 l1 l.
+\fBSID*\fP \fB-b Keyletter\fP T{
+.na
+\fBOther\fP
+.ad
+T} \fBSID\fP \fBSID of Delta\fP
+\fBSpecified\fP \fBUsed&\fP T{
+.na
+\fBConditions\fP
+.ad
+T} \fBRetrieved\fP \fBto be Created\fP
+none&& no T{
+.na
+R defaults to mR
+.ad
+T} mR.mL mR.(mL+1)
+none&& yes T{
+.na
+R defaults to mR
+.ad
+T} mR.mL mR.mL.(mB+1).1
+R no T{
+.na
+R > mR
+.ad
+T} mR.mL R.1***
+R no T{
+.na
+R = mR
+.ad
+T} mR.mL mR.(mL+1)
+R yes T{
+.na
+R > mR
+.ad
+T} mR.mL mR.mL.(mB+1).1
+R yes T{
+.na
+R = mR
+.ad
+T} mR.mL mR.mL.(mB+1).1
+R - T{
+.na
+R < mR and R does not exist
+.ad
+T} hR.mL** hR.mL.(mB+1).1
+R - T{
+.na
+Trunk successor in release > R and R exists
+.ad
+T} R.mL R.mL.(mB+1).1
+R.L no T{
+.na
+No trunk successor
+.ad
+T} R.L R.(L+1)
+R.L yes T{
+.na
+No trunk successor
+.ad
+T} R.L R.L.(mB+1).1
+R.L - T{
+.na
+Trunk successor in release >= R
+.ad
+T} R.L R.L.(mB+1).1
+R.L.B no T{
+.na
+No branch successor
+.ad
+T} R.L.B.mS R.L.B.(mS+1)
+R.L.B yes T{
+.na
+No branch successor
+.ad
+T} R.L.B.mS R.L.(mB+1).1
+R.L.B.S no T{
+.na
+No branch successor
+.ad
+T} R.L.B.S R.L.B.(S+1)
+R.L.B.S yes T{
+.na
+No branch successor
+.ad
+T} R.L.B.S R.L.(mB+1).1
+R.L.B.S - T{
+.na
+Branch successor
+.ad
+T} R.L.B.S R.L.(mB+1).1
+.TE
+.TP 7
+*
+R, L, B, and S are the release, level, branch, and sequence components
+of the SID, respectively; m means maximum. Thus, for
+example, R.mL means "the maximum level number within release R'';
+R.L.(mB+1).1 means "the first sequence number on the new branch
+(that is, maximum branch number plus one) of level L within release
+R". Note that if the SID specified is of the form R.L, R.L.B,
+or R.L.B.S, each of the specified components shall exist.
+.TP 7
+**
+hR is the highest existing release that is lower than the specified,
+nonexistent, release R.
+.TP 7
+***
+This is used to force creation of the first delta in a new release.
+.TP 7
+&
+The \fB-b\fP option is effective only if the \fBb\fP flag is present
+in the file. An entry of \fB'-'\fP means
+"irrelevant".
+.TP 7
+&&
+This case applies if the \fBd\fP (default SID) flag is not present
+in the file. If the \fBd\fP flag is present in the file,
+then the SID obtained from the \fBd\fP flag is interpreted as if it
+had been specified on the command line. Thus, one of the other
+cases in this table applies.
+.sp
+.SS System Date and Time
+.LP
+When a \fBg-file\fP is generated, the creation time of deltas in the
+SCCS file may be taken into account. If any of these times
+are apparently in the future, the behavior is unspecified.
+.SS Identification Keywords
+.LP
+Identifying information shall be inserted into the text retrieved
+from the SCCS file by replacing identification keywords with
+their value wherever they occur. The following keywords may be used
+in the text stored in an SCCS file:
+.TP 7
+%\fBM\fP%
+Module name: either the value of the \fBm\fP flag in the file, or
+if absent, the name of the SCCS file with the leading
+\fBs.\fP removed.
+.TP 7
+%\fBI\fP%
+SCCS identification (SID) (%\fBR\fP%.%\fBL\fP% or %\fBR\fP%.%\fBL\fP%.%\fBB\fP%.%\fBS\fP%)
+of the retrieved text.
+.TP 7
+%\fBR\fP%
+Release.
+.TP 7
+%\fBL\fP%
+Level.
+.TP 7
+%\fBB\fP%
+Branch.
+.TP 7
+%\fBS\fP%
+Sequence.
+.TP 7
+%\fBD\fP%
+Current date (\fIYY\fP/\fIMM\fP/\fIDD\fP).
+.TP 7
+%\fBH\fP%
+Current date (\fIMM\fP/\fIDD\fP/\fIYY\fP).
+.TP 7
+%\fBT\fP%
+Current time (\fIHH\fP:\fIMM\fP:\fISS\fP).
+.TP 7
+%\fBE\fP%
+Date newest applied delta was created (\fIYY\fP/\fIMM\fP/\fIDD\fP).
+.TP 7
+%\fBG\fP%
+Date newest applied delta was created (\fIMM\fP/\fIDD\fP/\fIYY\fP).
+.TP 7
+%\fBU\fP%
+Time newest applied delta was created (\fIHH\fP:\fIMM\fP:\fISS\fP).
+.TP 7
+%\fBY\fP%
+Module type: value of the \fBt\fP flag in the SCCS file.
+.TP 7
+%\fBF\fP%
+SCCS filename.
+.TP 7
+%\fBP\fP%
+SCCS absolute pathname.
+.TP 7
+%\fBQ\fP%
+The value of the \fBq\fP flag in the file.
+.TP 7
+%\fBC\fP%
+Current line number. This keyword is intended for identifying messages
+output by the program, such as "this should not have
+happened" type errors. It is not intended to be used on every line
+to provide sequence numbers.
+.TP 7
+%\fBZ\fP%
+The four-character string \fB"@(#)"\fP recognizable by \fIwhat\fP.
+.TP 7
+%\fBW\fP%
+A shorthand notation for constructing \fIwhat\fP strings:
+.sp
+.RS
+.nf
+
+\fB%W%=%Z%%M%<tab>%I%
+\fP
+.fi
+.RE
+.TP 7
+%\fBA\fP%
+Another shorthand notation for constructing \fIwhat\fP strings:
+.sp
+.RS
+.nf
+
+\fB%A%=%Z%%Y%%M%%I%%Z%
+\fP
+.fi
+.RE
+.sp
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Problems can arise if the system date and time have been modified
+(for example, put forward and then back again, or
+unsynchronized clocks across a network) and can also arise when different
+values of the \fITZ\fP environment variable are
+used.
+.LP
+Problems of a similar nature can also arise for the operation of the
+\fIdelta\fP utility,
+which compares the previous file body against the working file as
+part of its normal operation.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+The \fB-lp\fP option may be withdrawn in a future version.
+.SH SEE ALSO
+.LP
+\fIadmin\fP, \fIdelta\fP, \fIprs\fP, \fIwhat\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/getconf.1p b/man-pages-posix-2003/man1p/getconf.1p
new file mode 100644
index 0000000..a13c195
--- /dev/null
+++ b/man-pages-posix-2003/man1p/getconf.1p
@@ -0,0 +1,464 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETCONF" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getconf
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getconf \- get configuration values
+.SH SYNOPSIS
+.LP
+\fBgetconf\fP \fB[\fP \fB-v specification\fP \fB]\fP \fIsystem_var\fP\fB
+.br
+.sp
+getconf\fP \fB[\fP \fB-v specification\fP \fB]\fP \fIpath_var pathname\fP\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+In the first synopsis form, the \fIgetconf\fP utility shall write
+to the standard output the value of the variable specified by
+the \fIsystem_var\fP operand.
+.LP
+In the second synopsis form, the \fIgetconf\fP utility shall write
+to the standard output the value of the variable specified
+by the \fIpath_var\fP operand for the path specified by the \fIpathname\fP
+operand.
+.LP
+The value of each configuration variable shall be determined as if
+it were obtained by calling the function from which it is
+defined to be available by this volume of IEEE\ Std\ 1003.1-2001 or
+by the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001 (see the OPERANDS section). The value shall
+reflect conditions in the current operating
+environment.
+.SH OPTIONS
+.LP
+The \fIgetconf\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following option shall be supported:
+.TP 7
+\fB-v\ \fP \fIspecification\fP
+.sp
+Indicate a specific specification and version for which configuration
+variables shall be determined. If this option is not
+specified, the values returned correspond to an implementation default
+conforming compilation environment.
+.LP
+If the command:
+.sp
+.RS
+.nf
+
+\fBgetconf _POSIX_V6_ILP32_OFF32
+\fP
+.fi
+.RE
+.LP
+does not write \fB"-1\\n"\fP or \fB"undefined\\n"\fP to standard output,
+then commands of the form:
+.sp
+.RS
+.nf
+
+\fBgetconf -v POSIX_V6_ILP32_OFF32 ...
+\fP
+.fi
+.RE
+.LP
+determine values for configuration variables corresponding to the
+POSIX_V6_ILP32_OFF32 compilation environment specified in \fIc99\fP,
+the EXTENDED DESCRIPTION.
+.LP
+If the command:
+.sp
+.RS
+.nf
+
+\fBgetconf _POSIX_V6_ILP32_OFFBIG
+\fP
+.fi
+.RE
+.LP
+does not write \fB"-1\\n"\fP or \fB"undefined\\n"\fP to standard output,
+then commands of the form:
+.sp
+.RS
+.nf
+
+\fBgetconf -v POSIX_V6_ILP32_OFFBIG ...
+\fP
+.fi
+.RE
+.LP
+determine values for configuration variables corresponding to the
+POSIX_V6_ILP32_OFFBIG compilation environment specified in \fIc99\fP,
+the EXTENDED DESCRIPTION.
+.LP
+If the command:
+.sp
+.RS
+.nf
+
+\fBgetconf _POSIX_V6_LP64_OFF64
+\fP
+.fi
+.RE
+.LP
+does not write \fB"-1\\n"\fP or \fB"undefined\\n"\fP to standard output,
+then commands of the form:
+.sp
+.RS
+.nf
+
+\fBgetconf -v POSIX_V6_LP64_OFF64 ...
+\fP
+.fi
+.RE
+.LP
+determine values for configuration variables corresponding to the
+POSIX_V6_LP64_OFF64 compilation environment specified in \fIc99\fP,
+the EXTENDED DESCRIPTION.
+.LP
+If the command:
+.sp
+.RS
+.nf
+
+\fBgetconf _POSIX_V6_LPBIG_OFFBIG
+\fP
+.fi
+.RE
+.LP
+does not write \fB"-1\\n"\fP or \fB"undefined\\n"\fP to standard output,
+then commands of the form:
+.sp
+.RS
+.nf
+
+\fBgetconf -v POSIX_V6_LPBIG_OFFBIG ...
+\fP
+.fi
+.RE
+.LP
+determine values for configuration variables corresponding to the
+POSIX_V6_LPBIG_OFFBIG compilation environment specified in \fIc99\fP,
+the EXTENDED DESCRIPTION.
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIpath_var\fP
+A name of a configuration variable. All of the variables in the Variable
+column of the table in the DESCRIPTION of the \fIfpathconf\fP() function
+defined in the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001, without the enclosing braces, shall be supported.
+The implementation may add other local
+variables.
+.TP 7
+\fIpathname\fP
+A pathname for which the variable specified by \fIpath_var\fP is to
+be determined.
+.TP 7
+\fIsystem_var\fP
+A name of a configuration variable. All of the following variables
+shall be supported:
+.RS
+.IP " *" 3
+The names in the Variable column of the table in the DESCRIPTION of
+the \fIsysconf\fP()
+function in the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+except for the entries corresponding to _SC_CLK_TCK,
+_SC_GETGR_R_SIZE_MAX, and _SC_GETPW_R_SIZE_MAX, without the enclosing
+braces.
+.LP
+For compatibility with earlier versions, the following variable names
+shall also be supported:
+.sp
+.RS
+.nf
+
+POSIX2_C_BIND
+POSIX2_C_DEV
+POSIX2_CHAR_TERM
+POSIX2_FORT_DEV
+POSIX2_FORT_RUN
+POSIX2_LOCALEDEF
+POSIX2_SW_DEV
+POSIX2_UPE
+POSIX2_VERSION
+.fi
+.RE
+.LP
+and shall be equivalent to the same name prefixed with an underscore.
+This requirement may be removed in a future version.
+.LP
+.IP " *" 3
+The names of the symbolic constants used as the \fIname\fP argument
+of the \fIconfstr\fP() function in the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001,
+without the _CS_ prefix.
+.LP
+.IP " *" 3
+The names of the symbolic constants listed under the headings ``Maximum
+Values'' and ``Minimum Values'' in the description of
+the \fI<limits.h>\fP header in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, without the enclosing braces.
+.LP
+For compatibility with earlier versions, the following variable names
+shall also be supported:
+.sp
+.RS
+.nf
+
+POSIX2_BC_BASE_MAX
+POSIX2_BC_DIM_MAX
+POSIX2_BC_SCALE_MAX
+POSIX2_BC_STRING_MAX
+POSIX2_COLL_WEIGHTS_MAX
+POSIX2_EXPR_NEST_MAX
+POSIX2_LINE_MAX
+POSIX2_RE_DUP_MAX
+.fi
+.RE
+.LP
+and shall be equivalent to the same name prefixed with an underscore.
+This requirement may be removed in a future version.
+.LP
+.RE
+.LP
+The implementation may add other local values.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIgetconf\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+If the specified variable is defined on the system and its value is
+described to be available from the \fIconfstr\fP() function defined
+in the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001, its value shall be written in the following
+format:
+.sp
+.RS
+.nf
+
+\fB"%s\\n", <\fP\fIvalue\fP\fB>
+\fP
+.fi
+.RE
+.LP
+Otherwise, if the specified variable is defined on the system, its
+value shall be written in the following format:
+.sp
+.RS
+.nf
+
+\fB"%d\\n", <\fP\fIvalue\fP\fB>
+\fP
+.fi
+.RE
+.LP
+If the specified variable is valid, but is undefined on the system,
+\fIgetconf\fP shall write using the following format:
+.sp
+.RS
+.nf
+
+\fB"undefined\\n"
+\fP
+.fi
+.RE
+.LP
+If the variable name is invalid or an error occurs, nothing shall
+be written to standard output.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+The specified variable is valid and information about its current
+state was written successfully.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+The following example illustrates the value of {NGROUPS_MAX}:
+.sp
+.RS
+.nf
+
+\fBgetconf NGROUPS_MAX
+\fP
+.fi
+.RE
+.LP
+The following example illustrates the value of {NAME_MAX} for a specific
+directory:
+.sp
+.RS
+.nf
+
+\fBgetconf NAME_MAX /usr
+\fP
+.fi
+.RE
+.LP
+The following example shows how to deal more carefully with results
+that might be unspecified:
+.sp
+.RS
+.nf
+
+\fBif value=$(getconf PATH_MAX /usr); then
+ if [ "$value" = "undefined" ]; then
+ echo PATH_MAX in /usr is infinite.
+ else
+ echo PATH_MAX in /usr is $value.
+ fi
+else
+ echo Error in getconf.
+fi
+\fP
+.fi
+.RE
+.LP
+Note that:
+.sp
+.RS
+.nf
+
+\fBsysconf(_SC_POSIX_C_BIND);
+\fP
+.fi
+.RE
+.LP
+and:
+.sp
+.RS
+.nf
+
+\fBsystem("getconf POSIX2_C_BIND");
+\fP
+.fi
+.RE
+.LP
+in a C program could give different answers. The \fIsysconf\fP() call
+supplies a value
+that corresponds to the conditions when the program was either compiled
+or executed, depending on the implementation; the \fIsystem\fP() call
+to \fIgetconf\fP always supplies a value corresponding to conditions
+when the
+program is executed.
+.SH RATIONALE
+.LP
+The original need for this utility, and for the \fIconfstr\fP() function,
+was to
+provide a way of finding the configuration-defined default value for
+the \fIPATH\fP environment variable. Since \fIPATH\fP can be
+modified by the user to include directories that could contain utilities
+replacing the standard utilities, shell scripts need a way
+to determine the system-supplied \fIPATH\fP environment variable value
+that contains the correct search path for the standard
+utilities. It was later suggested that access to the other variables
+described in this volume of IEEE\ Std\ 1003.1-2001
+could also be useful to applications.
+.LP
+This functionality of \fIgetconf\fP would not be adequately subsumed
+by another command such as:
+.sp
+.RS
+.nf
+
+\fBgrep\fP \fIvar\fP \fB/etc/conf
+\fP
+.fi
+.RE
+.LP
+because such a strategy would provide correct values for neither those
+variables that can vary at runtime, nor those that can
+vary depending on the path.
+.LP
+Early proposal versions of \fIgetconf\fP specified exit status 1 when
+the specified variable was valid, but not defined on the
+system. The output string \fB"undefined"\fP is now used to specify
+this case with exit code 0 because so many things depend on
+an exit code of zero when an invoked utility is successful.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIc99\fP, the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<limits.h>\fP, the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+\fIconfstr\fP(), \fIpathconf\fP(), \fIsysconf\fP(), \fIsystem\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/getopts.1p b/man-pages-posix-2003/man1p/getopts.1p
new file mode 100644
index 0000000..704f4fb
--- /dev/null
+++ b/man-pages-posix-2003/man1p/getopts.1p
@@ -0,0 +1,354 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETOPTS" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getopts
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getopts \- parse utility options
+.SH SYNOPSIS
+.LP
+\fBgetopts\fP \fIoptstring name\fP \fB[\fP\fIarg\fP\fB...\fP\fB]\fP
+.SH DESCRIPTION
+.LP
+The \fIgetopts\fP utility shall retrieve options and option-arguments
+from a list of parameters. It shall support the Utility
+Syntax Guidelines 3 to 10, inclusive, described in the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+Each time it is invoked, the \fIgetopts\fP utility shall place the
+value of the next option in the shell variable specified by
+the \fIname\fP operand and the index of the next argument to be processed
+in the shell variable \fIOPTIND\fP. Whenever the shell
+is invoked, \fIOPTIND\fP shall be initialized to 1.
+.LP
+When the option requires an option-argument, the \fIgetopts\fP utility
+shall place it in the shell variable \fIOPTARG\fP. If
+no option was found, or if the option that was found does not have
+an option-argument, \fIOPTARG\fP shall be unset.
+.LP
+If an option character not contained in the \fIoptstring\fP operand
+is found where an option character is expected, the shell
+variable specified by \fIname\fP shall be set to the question-mark
+( \fB'?'\fP ) character. In this case, if the first
+character in \fIoptstring\fP is a colon ( \fB':'\fP ), the shell variable
+\fIOPTARG\fP shall be set to the option character
+found, but no output shall be written to standard error; otherwise,
+the shell variable \fIOPTARG\fP shall be unset and a
+diagnostic message shall be written to standard error. This condition
+shall be considered to be an error detected in the way
+arguments were presented to the invoking application, but shall not
+be an error in \fIgetopts\fP processing.
+.LP
+If an option-argument is missing:
+.IP " *" 3
+If the first character of \fIoptstring\fP is a colon, the shell variable
+specified by \fIname\fP shall be set to the colon
+character and the shell variable \fIOPTARG\fP shall be set to the
+option character found.
+.LP
+.IP " *" 3
+Otherwise, the shell variable specified by \fIname\fP shall be set
+to the question-mark character, the shell variable
+\fIOPTARG\fP shall be unset, and a diagnostic message shall be written
+to standard error. This condition shall be considered to be
+an error detected in the way arguments were presented to the invoking
+application, but shall not be an error in \fIgetopts\fP
+processing; a diagnostic message shall be written as stated, but the
+exit status shall be zero.
+.LP
+.LP
+When the end of options is encountered, the \fIgetopts\fP utility
+shall exit with a return value greater than zero; the shell
+variable \fIOPTIND\fP shall be set to the index of the first non-option-argument,
+where the first \fB"--"\fP argument is
+considered to be an option-argument if there are no other non-option-arguments
+appearing before it, or the value \fB"$#"\fP +1
+if there are no non-option-arguments; the \fIname\fP variable shall
+be set to the question-mark character. Any of the following
+shall identify the end of options: the special option \fB"--"\fP,
+finding an argument that does not begin with a \fB'-'\fP,
+or encountering an error.
+.LP
+The shell variables \fIOPTIND\fP and \fIOPTARG\fP shall be local to
+the caller of \fIgetopts\fP and shall not be exported by
+default.
+.LP
+The shell variable specified by the \fIname\fP operand, \fIOPTIND
+,\fP and \fIOPTARG\fP shall affect the current shell
+execution environment; see \fIShell Execution Environment\fP .
+.LP
+If the application sets \fIOPTIND\fP to the value 1, a new set of
+parameters can be used: either the current positional
+parameters or new \fIarg\fP values. Any other attempt to invoke \fIgetopts\fP
+multiple times in a single shell execution
+environment with parameters (positional parameters or \fIarg\fP operands)
+that are not the same in all invocations, or with an
+\fIOPTIND\fP value modified to be a value other than 1, produces unspecified
+results.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIoptstring\fP
+A string containing the option characters recognized by the utility
+invoking \fIgetopts\fP. If a character is followed by a
+colon, the option shall be expected to have an argument, which should
+be supplied as a separate argument. Applications should
+specify an option character and its option-argument as separate arguments,
+but \fIgetopts\fP shall interpret the characters
+following an option character requiring arguments as an argument whether
+or not this is done. An explicit null option-argument need
+not be recognized if it is not supplied as a separate argument when
+\fIgetopts\fP is invoked. (See also the \fIgetopt\fP() function defined
+in the System Interfaces volume of IEEE\ Std\ 1003.1-2001.)
+The characters question-mark and colon shall not be used as option
+characters by an application. The use of other option characters
+that are not alphanumeric produces unspecified results. If the option-argument
+is not supplied as a separate argument from the
+option character, the value in \fIOPTARG\fP shall be stripped of the
+option character and the \fB'-'\fP . The first character
+in \fIoptstring\fP determines how \fIgetopts\fP behaves if an option
+character is not known or an option-argument is
+missing.
+.TP 7
+\fIname\fP
+The name of a shell variable that shall be set by the \fIgetopts\fP
+utility to the option character that was found.
+.sp
+.LP
+The \fIgetopts\fP utility by default shall parse positional parameters
+passed to the invoking shell procedure. If \fIarg\fPs
+are given, they shall be parsed instead of the positional parameters.
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIgetopts\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fIOPTIND\fP
+This variable shall be used by the \fIgetopts\fP utility as the index
+of the next argument to be processed.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+Whenever an error is detected and the first character in the \fIoptstring\fP
+operand is not a colon ( \fB':'\fP ), a
+diagnostic message shall be written to standard error with the following
+information in an unspecified format:
+.IP " *" 3
+The invoking program name shall be identified in the message. The
+invoking program name shall be the value of the shell special
+parameter 0 (see \fISpecial Parameters\fP ) at the time the \fIgetopts\fP
+utility is
+invoked. A name equivalent to:
+.sp
+.RS
+.nf
+
+\fBbasename "$0"
+\fP
+.fi
+.RE
+.LP
+may be used.
+.LP
+.IP " *" 3
+If an option is found that was not specified in \fIoptstring\fP, this
+error is identified and the invalid option character
+shall be identified in the message.
+.LP
+.IP " *" 3
+If an option requiring an option-argument is found, but an option-argument
+is not found, this error shall be identified and the
+invalid option character shall be identified in the message.
+.LP
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+An option, specified or unspecified by \fIoptstring\fP, was found.
+.TP 7
+>0
+The end of options was encountered or an error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Since \fIgetopts\fP affects the current shell execution environment,
+it is generally provided as a shell regular built-in. If
+it is called in a subshell or separate utility execution environment,
+such as one of the following:
+.sp
+.RS
+.nf
+
+\fB(getopts abc value "$@")
+nohup getopts ...
+find . -exec getopts ... \\;
+\fP
+.fi
+.RE
+.LP
+it does not affect the shell variables in the caller's environment.
+.LP
+Note that shell functions share \fIOPTIND\fP with the calling shell
+even though the positional parameters are changed. If the
+calling shell and any of its functions uses \fIgetopts\fP to parse
+arguments, the results are unspecified.
+.SH EXAMPLES
+.LP
+The following example script parses and displays its arguments:
+.sp
+.RS
+.nf
+
+\fBaflag=
+bflag=
+while getopts ab: name
+do
+ case $name in
+ a) aflag=1;;
+ b) bflag=1
+ bval="$OPTARG";;
+ ?) printf "Usage: %s: [-a] [-b value] args\\n" $0
+ exit 2;;
+ esac
+done
+if [ ! -z "$aflag" ]; then
+ printf "Option -a specified\\n"
+fi
+if [ ! -z "$bflag" ]; then
+ printf 'Option -b "%s" specified\\n' "$bval"
+fi
+shift $(($OPTIND - 1))
+printf "Remaining arguments are: %s\\n" "$*"
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+The \fIgetopts\fP utility was chosen in preference to the System V
+\fIgetopt\fP utility because \fIgetopts\fP handles
+option-arguments containing <blank>s.
+.LP
+The \fIOPTARG\fP variable is not mentioned in the ENVIRONMENT VARIABLES
+section because it does not affect the execution of
+\fIgetopts\fP; it is one of the few "output-only" variables used by
+the standard utilities.
+.LP
+The colon is not allowed as an option character because that is not
+historical behavior, and it violates the Utility Syntax
+Guidelines. The colon is now specified to behave as in the KornShell
+version of the \fIgetopts\fP utility; when used as the first
+character in the \fIoptstring\fP operand, it disables diagnostics
+concerning missing option-arguments and unexpected option
+characters. This replaces the use of the \fIOPTERR\fP variable that
+was specified in an early proposal.
+.LP
+The formats of the diagnostic messages produced by the \fIgetopts\fP
+utility and the \fIgetopt\fP() function are not fully specified because
+implementations with superior
+(``friendlier") formats objected to the formats used by some historical
+implementations. The standard developers considered it
+important that the information in the messages used be uniform between
+\fIgetopts\fP and \fIgetopt\fP(). Exact duplication of the messages
+might not be possible, particularly if a utility
+is built on another system that has a different \fIgetopt\fP() function,
+but the messages
+must have specific information included so that the program name,
+invalid option character, and type of error can be distinguished
+by a user.
+.LP
+Only a rare application program intercepts a \fIgetopts\fP standard
+error message and wants to parse it. Therefore,
+implementations are free to choose the most usable messages they can
+devise. The following formats are used by many historical
+implementations:
+.sp
+.RS
+.nf
+
+\fB"%s: illegal option -- %c\\n", <\fP\fIprogram name\fP\fB>, <\fP\fIoption character\fP\fB>
+.sp
+
+"%s: option requires an argument -- %c\\n", <\fP\fIprogram name\fP\fB>, \\
+ <\fP\fIoption character\fP\fB>
+\fP
+.fi
+.RE
+.LP
+Historical shells with built-in versions of \fIgetopt\fP() or \fIgetopts\fP
+have used
+different formats, frequently not even indicating the option character
+found in error.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fISpecial Parameters\fP, the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001, \fIgetopt\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/grep.1p b/man-pages-posix-2003/man1p/grep.1p
new file mode 100644
index 0000000..fd7dc0b
--- /dev/null
+++ b/man-pages-posix-2003/man1p/grep.1p
@@ -0,0 +1,455 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GREP" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" grep
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+grep \- search a file for a pattern
+.SH SYNOPSIS
+.LP
+\fBgrep\fP \fB[\fP\fB-E| -F\fP\fB][\fP\fB-c| -l| -q\fP\fB][\fP\fB-insvx\fP\fB]\fP
+\fB-e\fP
+\fIpattern_list...
+.br
+\fP \fB\ \ \ \ \ \ \fP \fI\fP\fB[\fP\fB-f\fP
+\fIpattern_file\fP\fB]\fP\fB...\fP\fB[\fP\fIfile\fP\fB...\fP\fB]\fP\fB
+.br
+.sp
+grep\fP \fB[\fP\fB-E| -F\fP\fB][\fP\fB-c| -l| -q\fP\fB][\fP\fB-insvx\fP\fB][\fP\fB-e\fP
+\fIpattern_list\fP\fB]...
+.br
+\fP \fB\ \ \ \ \ \ \fP \fB\fP\fB-f\fP
+\fIpattern_file\fP\fB...\fP\fB[\fP\fIfile\fP\fB...\fP\fB]\fP\fB
+.br
+.sp
+grep\fP \fB[\fP\fB-E| -F\fP\fB][\fP\fB-c| -l| -q\fP\fB][\fP\fB-insvx\fP\fB]\fP
+\fIpattern_list\fP\fB[\fP\fIfile\fP\fB...\fP\fB]\fP\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgrep\fP utility shall search the input files, selecting lines
+matching one or more patterns; the types of patterns are
+controlled by the options specified. The patterns are specified by
+the \fB-e\fP option, \fB-f\fP option, or the
+\fIpattern_list\fP operand. The \fIpattern_list\fP's value shall consist
+of one or more patterns separated by <newline>s;
+the \fIpattern_file\fP's contents shall consist of one or more patterns
+terminated by <newline>. By default, an input line
+shall be selected if any pattern, treated as an entire basic regular
+expression (BRE) as described in the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 9.3, Basic Regular Expressions,
+matches any part of the line excluding the terminating <newline>;
+a null BRE shall match every line. By default, each
+selected input line shall be written to the standard output.
+.LP
+Regular expression matching shall be based on text lines. Since a
+<newline> separates or terminates patterns (see the
+\fB-e\fP and \fB-f\fP options below), regular expressions cannot contain
+a <newline>. Similarly, since patterns are matched
+against individual lines (excluding the terminating <newline>s) of
+the input, there is no way for a pattern to match a
+<newline> found in the input.
+.SH OPTIONS
+.LP
+The \fIgrep\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-E\fP
+Match using extended regular expressions. Treat each pattern specified
+as an ERE, as described in the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 9.4, Extended Regular Expressions.
+If any entire ERE pattern matches some part of an input line excluding
+the terminating <newline>, the line shall be matched.
+A null ERE shall match every line.
+.TP 7
+\fB-F\fP
+Match using fixed strings. Treat each pattern specified as a string
+instead of a regular expression. If an input line contains
+any of the patterns as a contiguous sequence of bytes, the line shall
+be matched. A null string shall match every line.
+.TP 7
+\fB-c\fP
+Write only a count of selected lines to standard output.
+.TP 7
+\fB-e\ \fP \fIpattern_list\fP
+.sp
+Specify one or more patterns to be used during the search for input.
+The application shall ensure that patterns in
+\fIpattern_list\fP are separated by a <newline>. A null pattern can
+be specified by two adjacent <newline>s in
+\fIpattern_list\fP. Unless the \fB-E\fP or \fB-F\fP option is also
+specified, each pattern shall be treated as a BRE, as
+described in the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Section
+9.3, Basic Regular Expressions. Multiple \fB-e\fP and \fB-f\fP options
+shall be accepted by the \fIgrep\fP utility. All of
+the specified patterns shall be used when matching lines, but the
+order of evaluation is unspecified.
+.TP 7
+\fB-f\ \fP \fIpattern_file\fP
+.sp
+Read one or more patterns from the file named by the pathname \fIpattern_file\fP.
+Patterns in \fIpattern_file\fP shall be
+terminated by a <newline>. A null pattern can be specified by an empty
+line in \fIpattern_file\fP. Unless the \fB-E\fP or
+\fB-F\fP option is also specified, each pattern shall be treated as
+a BRE, as described in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 9.3, Basic Regular Expressions.
+.TP 7
+\fB-i\fP
+Perform pattern matching in searches without regard to case; see the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Section 9.2, Regular Expression General Requirements.
+.TP 7
+\fB-l\fP
+(The letter ell.) Write only the names of files containing selected
+lines to standard output. Pathnames shall be written once
+per file searched. If the standard input is searched, a pathname of
+\fB"(standard input)"\fP shall be written, in the POSIX
+locale. In other locales, \fB"standard input"\fP may be replaced by
+something more appropriate in those locales.
+.TP 7
+\fB-n\fP
+Precede each output line by its relative line number in the file,
+each file starting at line 1. The line number counter shall
+be reset for each file processed.
+.TP 7
+\fB-q\fP
+Quiet. Nothing shall be written to the standard output, regardless
+of matching lines. Exit with zero status if an input line is
+selected.
+.TP 7
+\fB-s\fP
+Suppress the error messages ordinarily written for nonexistent or
+unreadable files. Other error messages shall not be
+suppressed.
+.TP 7
+\fB-v\fP
+Select lines not matching any of the specified patterns. If the \fB-v\fP
+option is not specified, selected lines shall be
+those that match any of the specified patterns.
+.TP 7
+\fB-x\fP
+Consider only input lines that use all characters in the line excluding
+the terminating <newline> to match an entire
+fixed string or regular expression to be matching lines.
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIpattern_list\fP
+Specify one or more patterns to be used during the search for input.
+This operand shall be treated as if it were specified as
+\fB-e\fP \fIpattern_list\fP.
+.TP 7
+\fIfile\fP
+A pathname of a file to be searched for the patterns. If no \fIfile\fP
+operands are specified, the standard input shall be
+used.
+.sp
+.SH STDIN
+.LP
+The standard input shall be used only if no \fIfile\fP operands are
+specified. See the INPUT FILES section.
+.SH INPUT FILES
+.LP
+The input files shall be text files.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIgrep\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_COLLATE\fP
+.sp
+Determine the locale for the behavior of ranges, equivalence classes,
+and multi-character collating elements within regular
+expressions.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files) and
+the behavior of character classes within regular
+expressions.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+If the \fB-l\fP option is in effect, and the \fB-q\fP option is not,
+the following shall be written for each file containing
+at least one selected input line:
+.sp
+.RS
+.nf
+
+\fB"%s\\n", <\fP\fIfile\fP\fB>
+\fP
+.fi
+.RE
+.LP
+Otherwise, if more than one \fIfile\fP argument appears, and \fB-q\fP
+is not specified, the \fIgrep\fP utility shall prefix
+each output line by:
+.sp
+.RS
+.nf
+
+\fB"%s:", <\fP\fIfile\fP\fB>
+\fP
+.fi
+.RE
+.LP
+The remainder of each output line shall depend on the other options
+specified:
+.IP " *" 3
+If the \fB-c\fP option is in effect, the remainder of each output
+line shall contain:
+.sp
+.RS
+.nf
+
+\fB"%d\\n", <\fP\fIcount\fP\fB>
+\fP
+.fi
+.RE
+.LP
+.IP " *" 3
+Otherwise, if \fB-c\fP is not in effect and the \fB-n\fP option is
+in effect, the following shall be written to standard
+output:
+.sp
+.RS
+.nf
+
+\fB"%d:", <\fP\fIline number\fP\fB>
+\fP
+.fi
+.RE
+.LP
+.IP " *" 3
+Finally, the following shall be written to standard output:
+.sp
+.RS
+.nf
+
+\fB"%s", <\fP\fIselected-line contents\fP\fB>
+\fP
+.fi
+.RE
+.LP
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+One or more lines were selected.
+.TP 7
+\ 1
+No lines were selected.
+.TP 7
+>1
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+If the \fB-q\fP option is specified, the exit status shall be zero
+if an input line is selected, even if an error was detected.
+Otherwise, default actions shall be performed.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Care should be taken when using characters in \fIpattern_list\fP that
+may also be meaningful to the command interpreter. It is
+safest to enclose the entire \fIpattern_list\fP argument in single
+quotes:
+.sp
+.RS
+.nf
+
+\fB'...'
+\fP
+.fi
+.RE
+.LP
+The \fB-e\fP \fIpattern_list\fP option has the same effect as the
+\fIpattern_list\fP operand, but is useful when
+\fIpattern_list\fP begins with the hyphen delimiter. It is also useful
+when it is more convenient to provide multiple patterns as
+separate arguments.
+.LP
+Multiple \fB-e\fP and \fB-f\fP options are accepted and \fIgrep\fP
+uses all of the patterns it is given while matching input
+text lines. (Note that the order of evaluation is not specified. If
+an implementation finds a null string as a pattern, it is
+allowed to use that pattern first, matching every line, and effectively
+ignore any other patterns.)
+.LP
+The \fB-q\fP option provides a means of easily determining whether
+or not a pattern (or string) exists in a group of files.
+When searching several files, it provides a performance improvement
+(because it can quit as soon as it finds the first match) and
+requires less care by the user in choosing the set of files to supply
+as arguments (because it exits zero if it finds a match even
+if \fIgrep\fP detected an access or read error on earlier \fIfile\fP
+operands).
+.SH EXAMPLES
+.IP " 1." 4
+To find all uses of the word \fB"Posix"\fP (in any case) in file \fBtext.mm\fP
+and write with line numbers:
+.sp
+.RS
+.nf
+
+\fBgrep -i -n posix text.mm
+\fP
+.fi
+.RE
+.LP
+.IP " 2." 4
+To find all empty lines in the standard input:
+.sp
+.RS
+.nf
+
+\fBgrep ^$
+\fP
+.fi
+.RE
+.LP
+or:
+.sp
+.RS
+.nf
+
+\fBgrep -v .
+\fP
+.fi
+.RE
+.LP
+.IP " 3." 4
+Both of the following commands print all lines containing strings
+\fB"abc"\fP or \fB"def"\fP or both:
+.sp
+.RS
+.nf
+
+\fBgrep -E 'abc|def'
+.sp
+
+grep -F 'abc
+def'
+\fP
+.fi
+.RE
+.LP
+.IP " 4." 4
+Both of the following commands print all lines matching exactly \fB"abc"\fP
+or \fB"def"\fP :
+.sp
+.RS
+.nf
+
+\fBgrep -E '^abc$|^def$'
+.sp
+
+grep -F -x 'abc
+def'
+\fP
+.fi
+.RE
+.LP
+.SH RATIONALE
+.LP
+This \fIgrep\fP has been enhanced in an upwards-compatible way to
+provide the exact functionality of the historical
+\fIegrep\fP and \fIfgrep\fP commands as well. It was the clear intention
+of the standard developers to consolidate the three
+\fIgrep\fPs into a single command.
+.LP
+The old \fIegrep\fP and \fIfgrep\fP commands are likely to be supported
+for many years to come as implementation extensions,
+allowing historical applications to operate unmodified.
+.LP
+Historical implementations usually silently ignored all but one of
+multiply-specified \fB-e\fP and \fB-f\fP options, but were
+not consistent as to which specification was actually used.
+.LP
+The \fB-b\fP option was omitted from the OPTIONS section because block
+numbers are implementation-defined.
+.LP
+The System V restriction on using \fB-\fP to mean standard input was
+omitted.
+.LP
+A definition of action taken when given a null BRE or ERE is specified.
+This is an error condition in some historical
+implementations.
+.LP
+The \fB-l\fP option previously indicated that its use was undefined
+when no files were explicitly named. This behavior was
+historical and placed an unnecessary restriction on future implementations.
+It has been removed.
+.LP
+The historical BSD \fIgrep\fP \fB-s\fP option practice is easily duplicated
+by redirecting standard output to
+\fB/dev/null\fP. The \fB-s\fP option required here is from System
+V.
+.LP
+The \fB-x\fP option, historically available only with \fIfgrep\fP,
+is available here for all of the non-obsolescent
+versions.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsed\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/hash.1p b/man-pages-posix-2003/man1p/hash.1p
new file mode 100644
index 0000000..f12c1a5
--- /dev/null
+++ b/man-pages-posix-2003/man1p/hash.1p
@@ -0,0 +1,189 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "HASH" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" hash
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+hash \- remember or report utility locations
+.SH SYNOPSIS
+.LP
+\fBhash\fP \fB[\fP\fIutility\fP\fB...\fP\fB]\fP\fB
+.br
+.sp
+hash -r \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIhash\fP utility shall affect the way the current shell environment
+remembers the locations of utilities found as
+described in \fICommand Search and Execution\fP . Depending on the
+arguments
+specified, it shall add utility locations to its list of remembered
+locations or it shall purge the contents of the list. When no
+arguments are specified, it shall report on the contents of the list.
+.LP
+Utilities provided as built-ins to the shell shall not be reported
+by \fIhash\fP.
+.SH OPTIONS
+.LP
+The \fIhash\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following option shall be supported:
+.TP 7
+\fB-r\fP
+Forget all previously remembered utility locations.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIutility\fP
+The name of a utility to be searched for and added to the list of
+remembered locations. If \fIutility\fP contains one or more
+slashes, the results are unspecified.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIhash\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fIPATH\fP
+Determine the location of \fIutility\fP, as described in the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 8, Environment
+Variables.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The standard output of \fIhash\fP shall be used when no arguments
+are specified. Its format is unspecified, but includes the
+pathname of each utility in the list of remembered locations for the
+current shell environment. This list shall consist of those
+utilities named in previous \fIhash\fP invocations that have been
+invoked, and may contain those invoked and found through the
+normal command search process.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Since \fIhash\fP affects the current shell execution environment,
+it is always provided as a shell regular built-in. If it is
+called in a separate utility execution environment, such as one of
+the following:
+.sp
+.RS
+.nf
+
+\fBnohup hash -r
+find . -type f | xargs hash
+\fP
+.fi
+.RE
+.LP
+it does not affect the command search process of the caller's environment.
+.LP
+The \fIhash\fP utility may be implemented as an alias-for example,
+\fIalias\fP
+\fB-t\ -\fP, in which case utilities found through normal command
+search are not listed by the \fIhash\fP command.
+.LP
+The effects of \fIhash\fP \fB-r\fP can also be achieved portably by
+resetting the value of \fIPATH ;\fP in the simplest form,
+this can be:
+.sp
+.RS
+.nf
+
+\fBPATH="$PATH"
+\fP
+.fi
+.RE
+.LP
+The use of \fIhash\fP with \fIutility\fP names is unnecessary for
+most applications, but may provide a performance improvement
+on a few implementations; normally, the hashing process is included
+by default.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fICommand Search and Execution\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/head.1p b/man-pages-posix-2003/man1p/head.1p
new file mode 100644
index 0000000..4356b03
--- /dev/null
+++ b/man-pages-posix-2003/man1p/head.1p
@@ -0,0 +1,181 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "HEAD" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" head
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+head \- copy the first part of files
+.SH SYNOPSIS
+.LP
+\fBhead\fP \fB[\fP\fB-n\fP \fInumber\fP\fB][\fP\fIfile\fP\fB...\fP\fB]\fP
+.SH DESCRIPTION
+.LP
+The \fIhead\fP utility shall copy its input files to the standard
+output, ending the output for each file at a designated
+point.
+.LP
+Copying shall end at the point in each input file indicated by the
+\fB-n\fP \fInumber\fP option. The option-argument
+\fInumber\fP shall be counted in units of lines.
+.SH OPTIONS
+.LP
+The \fIhead\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following option shall be supported:
+.TP 7
+\fB-n\ \fP \fInumber\fP
+The first \fInumber\fP lines of each input file shall be copied to
+standard output. The application shall ensure that the
+\fInumber\fP option-argument is a positive decimal integer.
+.sp
+.LP
+When a file contains less than \fInumber\fP lines, it shall be copied
+to standard output in its entirety. This shall not be an
+error.
+.LP
+If no options are specified, \fIhead\fP shall act as if \fB-n 10\fP
+had been specified.
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of an input file. If no \fIfile\fP operands are specified,
+the standard input shall be used.
+.sp
+.SH STDIN
+.LP
+The standard input shall be used only if no \fIfile\fP operands are
+specified. See the INPUT FILES section.
+.SH INPUT FILES
+.LP
+Input files shall be text files, but the line length is not restricted
+to {LINE_MAX} bytes.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIhead\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The standard output shall contain designated portions of the input
+files.
+.LP
+If multiple \fIfile\fP operands are specified, \fIhead\fP shall precede
+the output for each with the header:
+.sp
+.RS
+.nf
+
+\fB"\\n==> %s <==\\n", <\fP\fIpathname\fP\fB>
+\fP
+.fi
+.RE
+.LP
+except that the first header written shall not include the initial
+<newline>.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The obsolescent \fB-\fP \fInumber\fP form is withdrawn in this version.
+Applications should use the \fB-n\fP \fInumber\fP
+option.
+.SH EXAMPLES
+.LP
+To write the first ten lines of all files (except those with a leading
+period) in the directory:
+.sp
+.RS
+.nf
+
+\fBhead *
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+Although it is possible to simulate \fIhead\fP with \fIsed\fP 10q
+for a single file, the
+standard developers decided that the popularity of \fIhead\fP on historical
+BSD systems warranted its inclusion alongside \fItail\fP.
+.LP
+This standard version of \fIhead\fP follows the Utility Syntax Guidelines.
+The \fB-n\fP option was added to this new interface
+so that \fIhead\fP and \fItail\fP would be more logically related.
+.LP
+There is no \fB-c\fP option (as there is in \fItail\fP) because it
+is not historical
+practice and because other utilities in this volume of IEEE\ Std\ 1003.1-2001
+provide similar functionality.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsed\fP, \fItail\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/iconv.1p b/man-pages-posix-2003/man1p/iconv.1p
new file mode 100644
index 0000000..23899d5
--- /dev/null
+++ b/man-pages-posix-2003/man1p/iconv.1p
@@ -0,0 +1,263 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ICONV" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" iconv
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+iconv \- codeset conversion
+.SH SYNOPSIS
+.LP
+\fBiconv\fP \fB[\fP\fB-cs\fP\fB]\fP \fB-f\fP \fIfrommap\fP \fB-t\fP
+\fItomap\fP \fB[\fP\fIfile\fP
+\fB\&...\fP\fB]\fP\fB
+.br
+.sp
+iconv -f\fP \fIfromcode\fP \fB[\fP\fB-cs\fP\fB] [\fP\fB-t\fP \fItocode\fP
+\fB[\fP\fIfile\fP
+\fB\&...\fP\fB]\fP\fB
+.br
+.sp
+iconv -t\fP \fItocode\fP \fB[\fP\fB-cs\fP\fB] [\fP\fB-f\fP \fIfromcode\fP\fB]
+[\fP\fIfile\fP
+\fB\&...\fP\fB]\fP\fB
+.br
+.sp
+iconv -l
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIiconv\fP utility shall convert the encoding of characters in
+\fIfile\fP from one codeset to another and write the
+results to standard output.
+.LP
+When the options indicate that charmap files are used to specify the
+codesets (see OPTIONS), the codeset conversion shall be
+accomplished by performing a logical join on the symbolic character
+names in the two charmaps. The implementation need not support
+the use of charmap files for codeset conversion unless the POSIX2_LOCALEDEF
+symbol is defined on the system.
+.SH OPTIONS
+.LP
+The \fIiconv\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-c\fP
+Omit any characters that are invalid in the codeset of the input file
+from the output. When \fB-c\fP is not used, the results
+of encountering invalid characters in the input stream (either those
+that are not characters in the codeset of the input file or
+that have no corresponding character in the codeset of the output
+file) shall be specified in the system documentation. The
+presence or absence of \fB-c\fP shall not affect the exit status of
+\fIiconv\fP.
+.TP 7
+\fB-f\ \fP \fIfromcodeset\fP
+.sp
+Identify the codeset of the input file. The implementation shall recognize
+the following two forms of the \fIfromcodeset\fP
+option-argument:
+.TP 7
+\fIfromcode\fP
+.RS
+The \fIfromcode\fP option-argument must not contain a slash character.
+It shall be interpreted as the name of one of the
+codeset descriptions provided by the implementation in an unspecified
+format. Valid values of \fIfromcode\fP are
+implementation-defined.
+.RE
+.TP 7
+\fIfrommap\fP
+.RS
+The \fIfrommap\fP option-argument must contain a slash character.
+It shall be interpreted as the pathname of a charmap file as
+defined in the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Section
+6.4, Character Set Description File. If the pathname does not represent
+a valid, readable charmap file, the results are
+undefined.
+.RE
+.sp
+.LP
+If this option is omitted, the codeset of the current locale shall
+be used.
+.TP 7
+\fB-l\fP
+Write all supported \fIfromcode\fP and \fItocode\fP values to standard
+output in an unspecified format.
+.TP 7
+\fB-s\fP
+Suppress any messages written to standard error concerning invalid
+characters. When \fB-s\fP is not used, the results of
+encountering invalid characters in the input stream (either those
+that are not valid characters in the codeset of the input file or
+that have no corresponding character in the codeset of the output
+file) shall be specified in the system documentation. The
+presence or absence of \fB-s\fP shall not affect the exit status of
+\fIiconv\fP.
+.TP 7
+\fB-t\ \fP \fItocodeset\fP
+Identify the codeset to be used for the output file. The implementation
+shall recognize the following two forms of the
+\fItocodeset\fP option-argument:
+.TP 7
+\fItocode\fP
+.RS
+The semantics shall be equivalent to the \fB-f\fP \fIfromcode\fP option.
+.RE
+.TP 7
+\fItomap\fP
+.RS
+The semantics shall be equivalent to the \fItomap\fP option.
+.RE
+.sp
+.LP
+If this option is omitted, the codeset of the current locale shall
+be used.
+.sp
+.LP
+If either \fB-f\fP or \fB-t\fP represents a charmap file, but the
+other does not (or is omitted), or both \fB-f\fP and
+\fB-t\fP are omitted, the results are undefined.
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of an input file. If no \fIfile\fP operands are specified,
+or if a \fIfile\fP operand is \fB'-'\fP, the
+standard input shall be used.
+.sp
+.SH STDIN
+.LP
+The standard input shall be used only if no \fIfile\fP operands are
+specified, or if a \fIfile\fP operand is \fB'-'\fP
+\&.
+.SH INPUT FILES
+.LP
+The input file shall be a text file.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIiconv\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments). During translation
+of the file, this variable is superseded by the use of the
+\fIfromcode\fP option-argument.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+When the \fB-l\fP option is used, the standard output shall contain
+all supported \fIfromcode\fP and \fItocode\fP values,
+written in an unspecified format.
+.LP
+When the \fB-l\fP option is not used, the standard output shall contain
+the sequence of characters read from the input files,
+translated to the specified codeset. Nothing else shall be written
+to the standard output.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The user must ensure that both charmap files use the same symbolic
+names for characters the two codesets have in common.
+.SH EXAMPLES
+.LP
+The following example converts the contents of file \fBmail.x400\fP
+from the ISO/IEC\ 6937:1994 standard codeset to the
+ISO/IEC\ 8859-1:1998 standard codeset, and stores the results in file
+\fBmail.local\fP:
+.sp
+.RS
+.nf
+
+\fBiconv -f IS6937 -t IS8859 mail.x400 > mail.local
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+The \fIiconv\fP utility can be used portably only when the user provides
+two charmap files as option-arguments. This is because
+a single charmap provided by the user cannot reliably be joined with
+the names in a system-provided character set description. The
+valid values for \fIfromcode\fP and \fItocode\fP are implementation-defined
+and do not have to have any relation to the charmap
+mechanisms. As an aid to interactive users, the \fB-l\fP option was
+adopted from the Plan 9 operating system. It writes
+information concerning these implementation-defined values. The format
+is unspecified because there are many possible useful
+formats that could be chosen, such as a matrix of valid combinations
+of \fIfromcode\fP and \fItocode\fP. The \fB-l\fP option is
+not intended for shell script usage; conforming applications will
+have to use charmaps.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgencat\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/id.1p b/man-pages-posix-2003/man1p/id.1p
new file mode 100644
index 0000000..376a222
--- /dev/null
+++ b/man-pages-posix-2003/man1p/id.1p
@@ -0,0 +1,328 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ID" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" id
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+id \- return user identity
+.SH SYNOPSIS
+.LP
+\fBid\fP \fB[\fP\fIuser\fP\fB]\fP\fB
+.br
+.sp
+id -G\fP\fB[\fP\fB-n\fP\fB] [\fP\fIuser\fP\fB]\fP\fB
+.br
+.sp
+id -g\fP\fB[\fP\fB-nr\fP\fB] [\fP\fIuser\fP\fB]\fP\fB
+.br
+.sp
+id -u\fP\fB[\fP\fB-nr\fP\fB] [\fP\fIuser\fP\fB]\fP\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+If no \fIuser\fP operand is provided, the \fIid\fP utility shall write
+the user and group IDs and the corresponding user and
+group names of the invoking process to standard output. If the effective
+and real IDs do not match, both shall be written. If
+multiple groups are supported by the underlying system (see the description
+of {NGROUPS_MAX} in the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001), the supplementary group affiliations of the
+invoking process shall also be written.
+.LP
+If a \fIuser\fP operand is provided and the process has the appropriate
+privileges, the user and group IDs of the selected user
+shall be written. In this case, effective IDs shall be assumed to
+be identical to real IDs. If the selected user has more than one
+allowable group membership listed in the group database, these shall
+be written in the same manner as the supplementary groups
+described in the preceding paragraph.
+.SH OPTIONS
+.LP
+The \fIid\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-G\fP
+Output all different group IDs (effective, real, and supplementary)
+only, using the format \fB"%u\\n"\fP . If there is more
+than one distinct group affiliation, output each such affiliation,
+using the format \fB"\ %u"\fP, before the
+<newline> is output.
+.TP 7
+\fB-g\fP
+Output only the effective group ID, using the format \fB"%u\\n"\fP
+\&.
+.TP 7
+\fB-n\fP
+Output the name in the format \fB"%s"\fP instead of the numeric ID
+using the format \fB"%u"\fP .
+.TP 7
+\fB-r\fP
+Output the real ID instead of the effective ID.
+.TP 7
+\fB-u\fP
+Output only the effective user ID, using the format \fB"%u\\n"\fP
+\&.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIuser\fP
+The login name for which information is to be written.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIid\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard error and
+informative messages written to standard output.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The following formats shall be used when the \fILC_MESSAGES\fP locale
+category specifies the POSIX locale. In other locales,
+the strings \fIuid\fP, \fIgid\fP, \fIeuid\fP, \fIegid\fP, and \fIgroups\fP
+may be replaced with more appropriate strings
+corresponding to the locale.
+.sp
+.RS
+.nf
+
+\fB"uid=%u(%s) gid=%u(%s)\\n", <\fP\fIreal user ID\fP\fB>, <\fP\fIuser-name\fP\fB>,
+ <\fP\fIreal group ID\fP\fB>, <\fP\fIgroup-name\fP\fB>
+\fP
+.fi
+.RE
+.LP
+If the effective and real user IDs do not match, the following shall
+be inserted immediately before the \fB'\\n'\fP character
+in the previous format:
+.sp
+.RS
+.nf
+
+\fB" euid=%u(%s)"
+\fP
+.fi
+.RE
+.LP
+with the following arguments added at the end of the argument list:
+.sp
+.RS
+.nf
+
+\fB<\fP\fIeffective user ID\fP\fB>, <\fP\fIeffective user-name\fP\fB>
+\fP
+.fi
+.RE
+.LP
+If the effective and real group IDs do not match, the following shall
+be inserted directly before the \fB'\\n'\fP character in
+the format string (and after any addition resulting from the effective
+and real user IDs not matching):
+.sp
+.RS
+.nf
+
+\fB" egid=%u(%s)"
+\fP
+.fi
+.RE
+.LP
+with the following arguments added at the end of the argument list:
+.sp
+.RS
+.nf
+
+\fB<\fP\fIeffective group-ID\fP\fB>, <\fP\fIeffective group name\fP\fB>
+\fP
+.fi
+.RE
+.LP
+If the process has supplementary group affiliations or the selected
+user is allowed to belong to multiple groups, the first
+shall be added directly before the <newline> in the format string:
+.sp
+.RS
+.nf
+
+\fB" groups=%u(%s)"
+\fP
+.fi
+.RE
+.LP
+with the following arguments added at the end of the argument list:
+.sp
+.RS
+.nf
+
+\fB<\fP\fIsupplementary group ID\fP\fB>, <\fP\fIsupplementary group name\fP\fB>
+\fP
+.fi
+.RE
+.LP
+and the necessary number of the following added after that for any
+remaining supplementary group IDs:
+.sp
+.RS
+.nf
+
+\fB",%u(%s)"
+\fP
+.fi
+.RE
+.LP
+and the necessary number of the following arguments added at the end
+of the argument list:
+.sp
+.RS
+.nf
+
+\fB<\fP\fIsupplementary group ID\fP\fB>, <\fP\fIsupplementary group name\fP\fB>
+\fP
+.fi
+.RE
+.LP
+If any of the user ID, group ID, effective user ID, effective group
+ID, or supplementary/multiple group IDs cannot be mapped by
+the system into printable user or group names, the corresponding \fB"(%s)"\fP
+and \fIname\fP argument shall be omitted from the
+corresponding format string.
+.LP
+When any of the options are specified, the output format shall be
+as described in the OPTIONS section.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Output produced by the \fB-G\fP option and by the default case could
+potentially produce very long lines on systems that
+support large numbers of supplementary groups. (On systems with user
+and group IDs that are 32-bit integers and with group names
+with a maximum of 8 bytes per name, 93 supplementary groups plus distinct
+effective and real group and user IDs could theoretically
+overflow the 2048-byte {LINE_MAX} text file line limit on the default
+output case. It would take about 186 supplementary groups to
+overflow the 2048-byte barrier using \fIid\fP \fB-G\fP). This is not
+expected to be a problem in practice, but in cases where it
+is a concern, applications should consider using \fIfold\fP \fB-s\fP
+before postprocessing
+the output of \fIid\fP.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The functionality provided by the 4 BSD \fIgroups\fP utility can be
+simulated using:
+.sp
+.RS
+.nf
+
+\fBid -Gn [ user ]
+\fP
+.fi
+.RE
+.LP
+The 4 BSD command \fIgroups\fP was considered, but it was not included
+because it did not provide the functionality of the
+\fIid\fP utility of the SVID. Also, it was thought that it would be
+easier to modify \fIid\fP to provide the additional
+functionality necessary to systems with multiple groups than to invent
+another command.
+.LP
+The options \fB-u\fP, \fB-g\fP, \fB-n\fP, and \fB-r\fP were added
+to ease the use of \fIid\fP with shell commands
+substitution. Without these options it is necessary to use some preprocessor
+such as \fIsed\fP
+to select the desired piece of information. Since output such as that
+produced by:
+.sp
+.RS
+.nf
+
+\fBid -u -n
+\fP
+.fi
+.RE
+.LP
+is frequently wanted, it seemed desirable to add the options.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfold\fP, \fIlogname\fP, \fIwho\fP, the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIgetgid\fP(), \fIgetgroups\fP(),
+\fIgetuid\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/ipcrm.1p b/man-pages-posix-2003/man1p/ipcrm.1p
new file mode 100644
index 0000000..5c0811e
--- /dev/null
+++ b/man-pages-posix-2003/man1p/ipcrm.1p
@@ -0,0 +1,159 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "IPCRM" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ipcrm
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ipcrm \- remove an XSI message queue, semaphore set, or shared memory
+segment identifier
+.SH SYNOPSIS
+.LP
+\fBipcrm\fP \fB[\fP \fB-q msgid | -Q msgkey | -s semid | -S semkey
+|
+.br
+\ \ \ \ \ \ -m shmid | -M shmkey\fP \fB]\fP \fB... \fP
+.SH DESCRIPTION
+.LP
+The \fIipcrm\fP utility shall remove zero or more message queues,
+semaphore sets, or shared memory segments. The interprocess
+communication facilities to be removed are specified by the options.
+.LP
+Only a user with appropriate privilege shall be allowed to remove
+an interprocess communication facility that was not created by
+or owned by the user invoking \fIipcrm\fP.
+.SH OPTIONS
+.LP
+The \fIipcrm\fP facility supports the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-q\ \fP \fImsgid\fP
+Remove the message queue identifier \fImsgid\fP from the system and
+destroy the message queue and data structure associated
+with it.
+.TP 7
+\fB-m\ \fP \fIshmid\fP
+Remove the shared memory identifier \fIshmid\fP from the system. The
+shared memory segment and data structure associated with
+it shall be destroyed after the last detach.
+.TP 7
+\fB-s\ \fP \fIsemid\fP
+Remove the semaphore identifier \fIsemid\fP from the system and destroy
+the set of semaphores and data structure associated
+with it.
+.TP 7
+\fB-Q\ \fP \fImsgkey\fP
+Remove the message queue identifier, created with key \fImsgkey\fP,
+from the system and destroy the message queue and data
+structure associated with it.
+.TP 7
+\fB-M\ \fP \fIshmkey\fP
+Remove the shared memory identifier, created with key \fIshmkey\fP,
+from the system. The shared memory segment and data
+structure associated with it shall be destroyed after the last detach.
+.TP 7
+\fB-S\ \fP \fIsemkey\fP
+Remove the semaphore identifier, created with key \fIsemkey\fP, from
+the system and destroy the set of semaphores and data
+structure associated with it.
+.sp
+.SH OPERANDS
+.LP
+None.
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIipcrm\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIipcs\fP, the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+\fImsgctl\fP(), \fIsemctl\fP(), \fIshmctl\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/ipcs.1p b/man-pages-posix-2003/man1p/ipcs.1p
new file mode 100644
index 0000000..f0400fe
--- /dev/null
+++ b/man-pages-posix-2003/man1p/ipcs.1p
@@ -0,0 +1,564 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "IPCS" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ipcs
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ipcs \- report XSI interprocess communication facilities status
+.SH SYNOPSIS
+.LP
+\fBipcs\fP \fB[\fP\fB-qms\fP\fB][\fP\fB-a | -bcopt\fP\fB]\fP\fB\fP
+.SH DESCRIPTION
+.LP
+The \fIipcs\fP utility shall write information about active interprocess
+communication facilities.
+.LP
+Without options, information shall be written in short format for
+message queues, shared memory segments, and semaphore sets
+that are currently active in the system. Otherwise, the information
+that is displayed is controlled by the options specified.
+.SH OPTIONS
+.LP
+The \fIipcs\fP facility supports the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Section 12.2, Utility Syntax Guidelines.
+.LP
+The \fIipcs\fP utility accepts the following options:
+.TP 7
+\fB-q\fP
+Write information about active message queues.
+.TP 7
+\fB-m\fP
+Write information about active shared memory segments.
+.TP 7
+\fB-s\fP
+Write information about active semaphore sets.
+.sp
+.LP
+If \fB-q\fP, \fB-m\fP, or \fB-s\fP are specified, only information
+about those facilities shall be written. If none of these
+three are specified, information about all three shall be written
+subject to the following options:
+.TP 7
+\fB-a\fP
+Use all print options. (This is a shorthand notation for \fB-b\fP,
+\fB-c\fP, \fB-o\fP, \fB-p\fP, and \fB-t\fP.)
+.TP 7
+\fB-b\fP
+Write information on maximum allowable size. (Maximum number of bytes
+in messages on queue for message queues, size of segments
+for shared memory, and number of semaphores in each set for semaphores.)
+.TP 7
+\fB-c\fP
+Write creator's user name and group name; see below.
+.TP 7
+\fB-o\fP
+Write information on outstanding usage. (Number of messages on queue
+and total number of bytes in messages on queue for message
+queues, and number of processes attached to shared memory segments.)
+.TP 7
+\fB-p\fP
+Write process number information. (Process ID of the last process
+to send a message and process ID of the last process to
+receive a message on message queues, process ID of the creating process,
+and process ID of the last process to attach or detach on
+shared memory segments.)
+.TP 7
+\fB-t\fP
+Write time information. (Time of the last control operation that changed
+the access permissions for all facilities, time of the
+last \fImsgsnd\fP() and \fImsgrcv\fP() operations
+on message queues, time of the last \fIshmat\fP() and \fIshmdt\fP()
+operations on shared memory, and time of the last \fIsemop\fP() operation
+on semaphores.)
+.sp
+.SH OPERANDS
+.LP
+None.
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.IP " *" 3
+The group database
+.LP
+.IP " *" 3
+The user database
+.LP
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIipcs\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fITZ\fP
+Determine the timezone for the date and time strings written by \fIipcs\fP.
+If \fITZ\fP is unset or null, an unspecified
+default timezone shall be used.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+An introductory line shall be written with the format:
+.sp
+.RS
+.nf
+
+\fB"IPC status from %s as of %s\\n", <\fP\fIsource\fP\fB>, <\fP\fIdate\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where <\fIsource\fP> indicates the source used to gather the statistics
+and <\fIdate\fP> is the information that
+would be produced by the \fIdate\fP command when invoked in the POSIX
+locale.
+.LP
+The \fIipcs\fP utility then shall create up to three reports depending
+upon the \fB-q\fP, \fB-m\fP, and \fB-s\fP options.
+The first report shall indicate the status of message queues, the
+second report shall indicate the status of shared memory
+segments, and the third report shall indicate the status of semaphore
+sets.
+.LP
+If the corresponding facility is not installed or has not been used
+since the last reboot, then the report shall be written out
+in the format:
+.sp
+.RS
+.nf
+
+\fB"%s facility not in system.\\n", <\fP\fIfacility\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where <\fIfacility\fP> is \fIMessage Queue\fP, \fIShared Memory\fP,
+or \fISemaphore\fP, as appropriate. If the
+facility has been installed and has been used since the last reboot,
+column headings separated by one or more spaces and followed
+by a <newline> shall be written as indicated below followed by the
+facility name written out using the format:
+.sp
+.RS
+.nf
+
+\fB"%s:\\n", <\fP\fIfacility\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where <\fIfacility\fP> is \fIMessage Queues\fP, \fIShared Memory\fP,
+or \fISemaphores\fP, as appropriate. On the
+second and third reports the column headings need not be written if
+the last column headings written already provide column
+headings for all information in that report.
+.LP
+The column headings provided in the first column below and the meaning
+of the information in those columns shall be given in
+order below; the letters in parentheses indicate the options that
+shall cause the corresponding column to appear; "all" means
+that the column shall always appear. Each column is separated by one
+or more <space>s. Note that these options only determine
+what information is provided for each report; they do not determine
+which reports are written.
+.TP 7
+T (all)
+Type of facility:
+.TP 7
+\fBq\fP
+.RS
+Message queue.
+.RE
+.TP 7
+\fBm\fP
+.RS
+Shared memory segment.
+.RE
+.TP 7
+\fBs\fP
+.RS
+Semaphore.
+.RE
+.sp
+.LP
+This field is a single character written using the format \fB%c\fP
+\&.
+.TP 7
+ID (all)
+The identifier for the facility entry. This field shall be written
+using the format \fB%d\fP .
+.TP 7
+KEY (all)
+The key used as an argument to \fImsgget\fP(), \fIsemget\fP(), or
+\fIshmget\fP() to create the facility
+entry.
+.TP 7
+\fBNote:\fP
+.RS
+The key of a shared memory segment is changed to IPC_PRIVATE when
+the segment has been removed until all processes attached to
+the segment detach it.
+.RE
+.sp
+This field shall be written using the format \fB0x%x\fP.
+.TP 7
+MODE (all)
+The facility access modes and flags. The mode shall consist of 11
+characters that are interpreted as follows.
+.LP
+The first character shall be:
+.TP 7
+\fBS\fP
+.RS
+If a process is waiting on a \fImsgsnd\fP() operation.
+.RE
+.TP 7
+\fB-\fP
+.RS
+If the above is not true.
+.RE
+.sp
+.LP
+The second character shall be:
+.TP 7
+\fBR\fP
+.RS
+If a process is waiting on a \fImsgrcv\fP() operation.
+.RE
+.TP 7
+\fBC\fP\ or\ \fB-\fP
+.RS
+If the associated shared memory segment is to be cleared when the
+first attach operation is executed.
+.RE
+.TP 7
+\fB-\fP
+.RS
+If none of the above is true.
+.RE
+.sp
+.LP
+The next nine characters shall be interpreted as three sets of three
+bits each. The first set refers to the owner's permissions;
+the next to permissions of others in the usergroup of the facility
+entry; and the last to all others. Within each set, the first
+character indicates permission to read, the second character indicates
+permission to write or alter the facility entry, and the
+last character is a minus sign ( \fB'-'\fP ).
+.LP
+The permissions shall be indicated as follows:
+.TP 7
+\fIr\fP
+.RS
+If read permission is granted.
+.RE
+.TP 7
+\fIw\fP
+.RS
+If write permission is granted.
+.RE
+.TP 7
+\fIa\fP
+.RS
+If alter permission is granted.
+.RE
+.TP 7
+\fB-\fP
+.RS
+If the indicated permission is not granted.
+.RE
+.sp
+.LP
+The first character following the permissions specifies if there is
+an alternate or additional access control method associated
+with the facility. If there is no alternate or additional access control
+method associated with the facility, a single
+<space> shall be written; otherwise, another printable character is
+written.
+.TP 7
+OWNER (all)
+The user name of the owner of the facility entry. If the user name
+of the owner is found in the user database, at least the
+first eight column positions of the name shall be written using the
+format \fB%s\fP . Otherwise, the user ID of the owner shall
+be written using the format \fB%d\fP .
+.TP 7
+GROUP (all)
+The group name of the owner of the facility entry. If the group name
+of the owner is found in the group database, at least the
+first eight column positions of the name shall be written using the
+format \fB%s\fP . Otherwise, the group ID of the owner shall
+be written using the format \fB%d\fP .
+.sp
+.LP
+The following nine columns shall be only written out for message queues:
+.TP 7
+CREATOR (\fBa\fP,\fBc\fP)
+The user name of the creator of the facility entry. If the user name
+of the creator is found in the user database, at least the
+first eight column positions of the name shall be written using the
+format \fB%s\fP . Otherwise, the user ID of the creator
+shall be written using the format \fB%d\fP .
+.TP 7
+CGROUP (\fBa\fP,\fBc\fP)
+The group name of the creator of the facility entry. If the group
+name of the creator is found in the group database, at least
+the first eight column positions of the name shall be written using
+the format \fB%s\fP . Otherwise, the group ID of the creator
+shall be written using the format \fB%d\fP .
+.TP 7
+CBYTES (\fBa\fP,\fBo\fP)
+The number of bytes in messages currently outstanding on the associated
+message queue. This field shall be written using the
+format \fB%d\fP .
+.TP 7
+QNUM (\fBa\fP,\fBo\fP)
+The number of messages currently outstanding on the associated message
+queue. This field shall be written using the format
+\fB%d\fP .
+.TP 7
+QBYTES (\fBa\fP,\fBb\fP)
+The maximum number of bytes allowed in messages outstanding on the
+associated message queue. This field shall be written using
+the format \fB%d\fP .
+.TP 7
+LSPID (\fBa\fP,\fBp\fP)
+The process ID of the last process to send a message to the associated
+queue. This field shall be written using the format:
+.sp
+.RS
+.nf
+
+\fB"%d", <\fP\fIpid\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where <\fIpid\fP> is 0 if no message has been sent to the corresponding
+message queue; otherwise, <\fIpid\fP>
+shall be the process ID of the last process to send a message to the
+queue.
+.TP 7
+LRPID (\fBa\fP,\fBp\fP)
+The process ID of the last process to receive a message from the associated
+queue. This field shall be written using the
+format:
+.sp
+.RS
+.nf
+
+\fB"%d", <\fP\fIpid\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where <\fIpid\fP> is 0 if no message has been received from the corresponding
+message queue; otherwise,
+<\fIpid\fP> shall be the process ID of the last process to receive
+a message from the queue.
+.TP 7
+STIME (\fBa\fP,\fBt\fP)
+The time the last message was sent to the associated queue. If a message
+has been sent to the corresponding message queue, the
+hour, minute, and second of the last time a message was sent to the
+queue shall be written using the format \fB%d\fP :
+\fB%2.2d\fP : \fB%2.2d\fP . Otherwise, the format \fB"\ no-entry"\fP
+shall be written.
+.TP 7
+RTIME (\fBa\fP,\fBt\fP)
+The time the last message was received from the associated queue.
+If a message has been received from the corresponding message
+queue, the hour, minute, and second of the last time a message was
+received from the queue shall be written using the format
+\fB%d\fP : \fB%2.2d\fP : \fB%2.2d\fP . Otherwise, the format \fB"\ no-entry"\fP
+shall be written.
+.sp
+.LP
+The following eight columns shall be only written out for shared memory
+segments.
+.TP 7
+CREATOR (\fBa\fP,\fBc\fP)
+The user of the creator of the facility entry. If the user name of
+the creator is found in the user database, at least the
+first eight column positions of the name shall be written using the
+format \fB%s\fP . Otherwise, the user ID of the creator
+shall be written using the format \fB%d\fP .
+.TP 7
+CGROUP (\fBa\fP,\fBc\fP)
+The group name of the creator of the facility entry. If the group
+name of the creator is found in the group database, at least
+the first eight column positions of the name shall be written using
+the format \fB%s\fP . Otherwise, the group ID of the creator
+shall be written using the format \fB%d\fP .
+.TP 7
+NATTCH (\fBa\fP,\fBo\fP)
+The number of processes attached to the associated shared memory segment.
+This field shall be written using the format
+\fB%d\fP .
+.TP 7
+SEGSZ (\fBa\fP,\fBb\fP)
+The size of the associated shared memory segment. This field shall
+be written using the format \fB%d\fP .
+.TP 7
+CPID (\fBa\fP,\fBp\fP)
+The process ID of the creator of the shared memory entry. This field
+shall be written using the format \fB%d\fP .
+.TP 7
+LPID (\fBa\fP,\fBp\fP)
+The process ID of the last process to attach or detach the shared
+memory segment. This field shall be written using the format:
+.sp
+.RS
+.nf
+
+\fB"%d", <\fP\fIpid\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where <\fIpid\fP> is 0 if no process has attached the corresponding
+shared memory segment; otherwise, <\fIpid\fP>
+shall be the process ID of the last process to attach or detach the
+segment.
+.TP 7
+ATIME (\fBa\fP,\fBt\fP)
+The time the last attach on the associated shared memory segment was
+completed. If the corresponding shared memory segment has
+ever been attached, the hour, minute, and second of the last time
+the segment was attached shall be written using the format
+\fB%d\fP : \fB%2.2d\fP : \fB%2.2d\fP . Otherwise, the format \fB"\ no-entry"\fP
+shall be written.
+.TP 7
+DTIME (\fBa\fP,\fBt\fP)
+The time the last detach on the associated shared memory segment was
+completed. If the corresponding shared memory segment has
+ever been detached, the hour, minute, and second of the last time
+the segment was detached shall be written using the format
+\fB%d\fP : \fB%2.2d\fP : \fB%2.2d\fP . Otherwise, the format \fB"\ no-entry"\fP
+shall be written.
+.sp
+.LP
+The following four columns shall be only written out for semaphore
+sets:
+.TP 7
+CREATOR (\fBa\fP,\fBc\fP)
+The user of the creator of the facility entry. If the user name of
+the creator is found in the user database, at least the
+first eight column positions of the name shall be written using the
+format \fB%s\fP . Otherwise, the user ID of the creator
+shall be written using the format \fB%d\fP .
+.TP 7
+CGROUP (\fBa\fP,\fBc\fP)
+The group name of the creator of the facility entry. If the group
+name of the creator is found in the group database, at least
+the first eight column positions of the name shall be written using
+the format \fB%s\fP . Otherwise, the group ID of the creator
+shall be written using the format \fB%d\fP .
+.TP 7
+NSEMS (\fBa\fP,\fBb\fP)
+The number of semaphores in the set associated with the semaphore
+entry. This field shall be written using the format
+\fB%d\fP .
+.TP 7
+OTIME (\fBa\fP,\fBt\fP)
+The time the last semaphore operation on the set associated with the
+semaphore entry was completed. If a semaphore operation
+has ever been performed on the corresponding semaphore set, the hour,
+minute, and second of the last semaphore operation on the
+semaphore set shall be written using the format \fB%d\fP : \fB%2.2d\fP
+: \fB%2.2d\fP . Otherwise, the format
+\fB"\ no-entry"\fP shall be written.
+.sp
+.LP
+The following column shall be written for all three reports when it
+is requested:
+.TP 7
+CTIME (\fBa\fP,\fBt\fP)
+The time the associated entry was created or changed. The hour, minute,
+and second of the time when the associated entry was
+created shall be written using the format \fB%d\fP : \fB%2.2d\fP :
+\fB%2.2d\fP .
+.sp
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Things can change while \fIipcs\fP is running; the information it
+gives is guaranteed to be accurate only when it was
+retrieved.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fImsgrcv\fP(),
+\fImsgsnd\fP(), \fIsemget\fP(), \fIsemop\fP(), \fIshmat\fP(), \fIshmdt\fP(),
+\fIshmget\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/jobs.1p b/man-pages-posix-2003/man1p/jobs.1p
new file mode 100644
index 0000000..af33c5f
--- /dev/null
+++ b/man-pages-posix-2003/man1p/jobs.1p
@@ -0,0 +1,318 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "JOBS" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" jobs
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+jobs \- display status of jobs in the current session
+.SH SYNOPSIS
+.LP
+\fBjobs\fP \fB[\fP\fB-l| -p\fP\fB][\fP\fIjob_id\fP\fB...\fP\fB]\fP\fB\fP
+.SH DESCRIPTION
+.LP
+The \fIjobs\fP utility shall display the status of jobs that were
+started in the current shell environment; see \fIShell Execution Environment\fP
+\&.
+.LP
+When \fIjobs\fP reports the termination status of a job, the shell
+shall remove its process ID from the list of those "known
+in the current shell execution environment''; see \fIAsynchronous
+Lists\fP .
+.SH OPTIONS
+.LP
+The \fIjobs\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-l\fP
+(The letter ell.) Provide more information about each job listed.
+This information shall include the job number, current job,
+process group ID, state, and the command that formed the job.
+.TP 7
+\fB-p\fP
+Display only the process IDs for the process group leaders of the
+selected jobs.
+.sp
+.LP
+By default, the \fIjobs\fP utility shall display the status of all
+stopped jobs, running background jobs and all jobs whose
+status has changed and have not been reported by the shell.
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIjob_id\fP
+Specifies the jobs for which the status is to be displayed. If no
+\fIjob_id\fP is given, the status information for all jobs
+shall be displayed. The format of \fIjob_id\fP is described in the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, Section 3.203,
+Job Control Job ID.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIjobs\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard error and
+informative messages written to standard output.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+If the \fB-p\fP option is specified, the output shall consist of one
+line for each process ID:
+.sp
+.RS
+.nf
+
+\fB"%d\\n", <\fP\fIprocess ID\fP\fB>
+\fP
+.fi
+.RE
+.LP
+Otherwise, if the \fB-l\fP option is not specified, the output shall
+be a series of lines of the form:
+.sp
+.RS
+.nf
+
+\fB"[%d] %c %s %s\\n", <\fP\fIjob-number\fP\fB>, <\fP\fIcurrent\fP\fB>, <\fP\fIstate\fP\fB>, <\fP\fIcommand\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where the fields shall be as follows:
+.TP 7
+<\fIcurrent\fP>
+The character \fB'+'\fP identifies the job that would be used as a
+default for the \fIfg\fP or \fIbg\fP utilities; this job can also
+be specified
+using the \fIjob_id\fP %+ or \fB"%%"\fP . The character \fB'-'\fP
+identifies the job that would become the default if the
+current default job were to exit; this job can also be specified using
+the \fIjob_id\fP %-. For other jobs, this field is a
+<space>. At most one job can be identified with \fB'+'\fP and at most
+one job can be identified with \fB'-'\fP . If
+there is any suspended job, then the current job shall be a suspended
+job. If there are at least two suspended jobs, then the
+previous job also shall be a suspended job.
+.TP 7
+<\fIjob-number\fP>
+A number that can be used to identify the process group to the \fIwait\fP,
+\fIfg\fP, \fIbg\fP, and \fIkill\fP utilities. Using these utilities,
+the job can be identified by prefixing the job number
+with \fB'%'\fP .
+.TP 7
+<\fIstate\fP>
+One of the following strings (in the POSIX locale):
+.TP 7
+\fBRunning\fP
+.RS
+Indicates that the job has not been suspended by a signal and has
+not exited.
+.RE
+.TP 7
+\fBDone\fP
+.RS
+Indicates that the job completed and returned exit status zero.
+.RE
+.TP 7
+\fBDone\fP(\fIcode\fP)
+.RS
+Indicates that the job completed normally and that it exited with
+the specified non-zero exit status, \fIcode\fP, expressed as
+a decimal number.
+.RE
+.TP 7
+\fBStopped\fP
+.RS
+Indicates that the job was suspended by the SIGTSTP signal.
+.RE
+.TP 7
+\fBStopped\fP\ (\fBSIGTSTP\fP)
+.RS
+.sp
+Indicates that the job was suspended by the SIGTSTP signal.
+.RE
+.TP 7
+\fBStopped\fP\ (\fBSIGSTOP\fP)
+.RS
+.sp
+Indicates that the job was suspended by the SIGSTOP signal.
+.RE
+.TP 7
+\fBStopped\fP\ (\fBSIGTTIN\fP)
+.RS
+.sp
+Indicates that the job was suspended by the SIGTTIN signal.
+.RE
+.TP 7
+\fBStopped\fP\ (\fBSIGTTOU\fP)
+.RS
+.sp
+Indicates that the job was suspended by the SIGTTOU signal.
+.RE
+.sp
+.LP
+The implementation may substitute the string \fBSuspended\fP in place
+of \fBStopped\fP. If the job was terminated by a signal,
+the format of <\fIstate\fP> is unspecified, but it shall be visibly
+distinct from all of the other <\fIstate\fP>
+formats shown here and shall indicate the name or description of the
+signal causing the termination.
+.TP 7
+<\fIcommand\fP>
+The associated command that was given to the shell.
+.sp
+.LP
+If the \fB-l\fP option is specified, a field containing the process
+group ID shall be inserted before the <\fIstate\fP>
+field. Also, more processes in a process group may be output on separate
+lines, using only the process ID and
+<\fIcommand\fP> fields.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The \fB-p\fP option is the only portable way to find out the process
+group of a job because different implementations have
+different strategies for defining the process group of the job. Usage
+such as $( \fIjobs\fP \fB-p\fP) provides a way of referring
+to the process group of the job in an implementation-independent way.
+.LP
+The \fIjobs\fP utility does not work as expected when it is operating
+in its own utility execution environment because that
+environment has no applicable jobs to manipulate. See the APPLICATION
+USAGE section for \fIbg\fP . For this
+reason, \fIjobs\fP is generally implemented as a shell regular built-in.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+Both \fB"%%"\fP and \fB"%+"\fP are used to refer to the current job.
+Both forms are of equal validity-the \fB"%%"\fP
+mirroring \fB"$$"\fP and \fB"%+"\fP mirroring the output of \fIjobs\fP.
+Both forms reflect historical practice of the
+KornShell and the C shell with job control.
+.LP
+The job control features provided by \fIbg\fP, \fIfg\fP,
+and \fIjobs\fP are based on the KornShell. The standard developers
+examined the characteristics of the C shell versions of these
+utilities and found that differences exist. Despite widespread use
+of the C shell, the KornShell versions were selected for this
+volume of IEEE\ Std\ 1003.1-2001 to maintain a degree of uniformity
+with the rest of the KornShell features selected (such
+as the very popular command line editing features).
+.LP
+The \fIjobs\fP utility is not dependent on the job control option,
+as are the seemingly related \fIbg\fP and \fIfg\fP utilities because
+\fIjobs\fP is useful for
+examining background jobs, regardless of the condition of job control.
+When the user has invoked a \fIset\fP \fB+m\fP command and job control
+has been turned off, \fIjobs\fP can still be
+used to examine the background jobs associated with that current session.
+Similarly, \fIkill\fP can then be used to kill background jobs with
+\fIkill\fP% <\fIbackground job number\fP>.
+.LP
+The output for terminated jobs is left unspecified to accommodate
+various historical systems. The following formats have been
+witnessed:
+.IP " 1." 4
+\fBKilled\fP( \fIsignal name\fP)
+.LP
+.IP " 2." 4
+\fIsignal name\fP
+.LP
+.IP " 3." 4
+\fIsignal name\fP( \fBcoredump\fP)
+.LP
+.IP " 4." 4
+\fIsignal description\fP- \fBcore dumped\fP
+.LP
+.LP
+Most users should be able to understand these formats, although it
+means that applications have trouble parsing them.
+.LP
+The calculation of job IDs was not described since this would suggest
+an implementation, which may impose unnecessary
+restrictions.
+.LP
+In an early proposal, a \fB-n\fP option was included to "Display the
+status of jobs that have changed, exited, or stopped
+since the last status report". It was removed because the shell always
+writes any changed status of jobs before each prompt.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIShell Execution Environment\fP, \fIbg\fP, \fIfg\fP, \fIkill\fP(),
+\fIwait\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/join.1p b/man-pages-posix-2003/man1p/join.1p
new file mode 100644
index 0000000..bac22e1
--- /dev/null
+++ b/man-pages-posix-2003/man1p/join.1p
@@ -0,0 +1,415 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "JOIN" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" join
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+join \- relational database operator
+.SH SYNOPSIS
+.LP
+\fBjoin\fP \fB[\fP\fB-a\fP \fIfile_number\fP \fB| -v\fP \fIfile_number\fP\fB][\fP\fB-e\fP
+\fIstring\fP\fB][\fP\fB-o\fP \fIlist\fP\fB][\fP\fB-t\fP \fIchar\fP\fB]
+.br
+\fP \fB\ \ \ \ \ \ \fP \fB[\fP\fB-1\fP \fIfield\fP\fB][\fP\fB-2\fP
+\fIfield\fP\fB]\fP
+\fIfile1 file2\fP
+.SH DESCRIPTION
+.LP
+The \fIjoin\fP utility shall perform an equality join on the files
+\fIfile1\fP and \fIfile2\fP. The joined files shall be
+written to the standard output.
+.LP
+The join field is a field in each file on which the files are compared.
+The \fIjoin\fP utility shall write one line in the
+output for each pair of lines in \fIfile1\fP and \fIfile2\fP that
+have identical join fields. The output line by default shall
+consist of the join field, then the remaining fields from \fIfile1\fP,
+then the remaining fields from \fIfile2\fP. This format
+can be changed by using the \fB-o\fP option (see below). The \fB-a\fP
+option can be used to add unmatched lines to the output.
+The \fB-v\fP option can be used to output only unmatched lines.
+.LP
+The files \fIfile1\fP and \fIfile2\fP shall be ordered in the collating
+sequence of \fIsort\fP \fB-b\fP on the fields on which they shall
+be joined, by default the first in each line.
+All selected output shall be written in the same collating sequence.
+.LP
+The default input field separators shall be <blank>s. In this case,
+multiple separators shall count as one field
+separator, and leading separators shall be ignored. The default output
+field separator shall be a <space>.
+.LP
+The field separator and collating sequence can be changed by using
+the \fB-t\fP option (see below).
+.LP
+If the same key appears more than once in either file, all combinations
+of the set of remaining fields in \fIfile1\fP and the
+set of remaining fields in \fIfile2\fP are output in the order of
+the lines encountered.
+.LP
+If the input files are not in the appropriate collating sequence,
+the results are unspecified.
+.SH OPTIONS
+.LP
+The \fIjoin\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-a\ \fP \fIfile_number\fP
+.sp
+Produce a line for each unpairable line in file \fIfile_number\fP,
+where \fIfile_number\fP is 1 or 2, in addition to the default
+output. If both \fB-a\fP1 and \fB-a\fP2 are specified, all unpairable
+lines shall be output.
+.TP 7
+\fB-e\ \fP \fIstring\fP
+Replace empty output fields in the list selected by \fB-o\fP with
+the string \fIstring\fP.
+.TP 7
+\fB-o\ \fP \fIlist\fP
+Construct the output line to comprise the fields specified in \fIlist\fP,
+each element of which shall have one of the
+following two forms:
+.RS
+.IP " 1." 4
+\fIfile_number.field\fP, where \fIfile_number\fP is a file number
+and \fIfield\fP is a decimal integer field number
+.LP
+.IP " 2." 4
+0 (zero), representing the join field
+.LP
+.RE
+.LP
+The elements of \fIlist\fP shall be either comma-separated or <blank>-separated,
+as specified in Guideline 8 of the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility
+Syntax
+Guidelines. The fields specified by \fIlist\fP shall be written for
+all selected output lines. Fields selected by \fIlist\fP
+that do not appear in the input shall be treated as empty output fields.
+(See the \fB-e\fP option.) Only specifically requested
+fields shall be written. The application shall ensure that \fIlist\fP
+is a single command line argument.
+.TP 7
+\fB-t\ \fP \fIchar\fP
+Use character \fIchar\fP as a separator, for both input and output.
+Every appearance of \fIchar\fP in a line shall be
+significant. When this option is specified, the collating sequence
+shall be the same as \fIsort\fP without the \fB-b\fP option.
+.TP 7
+\fB-v\ \fP \fIfile_number\fP
+.sp
+Instead of the default output, produce a line only for each unpairable
+line in \fIfile_number\fP, where \fIfile_number\fP is 1 or
+2. If both \fB-v\fP1 and \fB-v\fP2 are specified, all unpairable lines
+shall be output.
+.TP 7
+\fB-1\ \fP \fIfield\fP
+Join on the \fIfield\fPth field of file 1. Fields are decimal integers
+starting with 1.
+.TP 7
+\fB-2\ \fP \fIfield\fP
+Join on the \fIfield\fPth field of file 2. Fields are decimal integers
+starting with 1.
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIfile1\fP,\ \fIfile2\fP
+A pathname of a file to be joined. If either of the \fIfile1\fP or
+\fIfile2\fP operands is \fB'-'\fP, the standard input
+shall be used in its place.
+.sp
+.SH STDIN
+.LP
+The standard input shall be used only if the \fIfile1\fP or \fIfile2\fP
+operand is \fB'-'\fP . See the INPUT FILES
+section.
+.SH INPUT FILES
+.LP
+The input files shall be text files.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIjoin\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_COLLATE\fP
+.sp
+Determine the locale of the collating sequence \fIjoin\fP expects
+to have been used when the input files were sorted.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The \fIjoin\fP utility output shall be a concatenation of selected
+character fields. When the \fB-o\fP option is not
+specified, the output shall be:
+.sp
+.RS
+.nf
+
+\fB"%s%s%s\\n", <\fP\fIjoin field\fP\fB>, <\fP\fIother file1 fields\fP\fB>,
+ <\fP\fIother file2 fields\fP\fB>
+\fP
+.fi
+.RE
+.LP
+If the join field is not the first field in a file, the <\fIother\ file\ fields\fP>
+for that file shall be:
+.sp
+.RS
+.nf
+
+\fB<\fP\fIfields preceding join field\fP\fB>, <\fP\fIfields following join field\fP\fB>
+\fP
+.fi
+.RE
+.LP
+When the \fB-o\fP option is specified, the output format shall be:
+.sp
+.RS
+.nf
+
+\fB"%s\\n", <\fP\fIconcatenation of fields\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where the concatenation of fields is described by the \fB-o\fP option,
+above.
+.LP
+For either format, each field (except the last) shall be written with
+its trailing separator character. If the separator is the
+default ( <blank>s), a single <space> shall be written after each
+field (except the last).
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+All input files were output successfully.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Pathnames consisting of numeric digits or of the form \fIstring.string\fP
+should not be specified directly following the
+\fB-o\fP list.
+.SH EXAMPLES
+.LP
+The \fB-o\fP 0 field essentially selects the union of the join fields.
+For example, given file \fBphone\fP:
+.sp
+.RS
+.nf
+
+\fB!Name Phone Number
+Don +1 123-456-7890
+Hal +1 234-567-8901
+Yasushi +2 345-678-9012
+\fP
+.fi
+.RE
+.LP
+and file \fBfax\fP:
+.sp
+.RS
+.nf
+
+\fB!Name Fax Number
+Don +1 123-456-7899
+Keith +1 456-789-0122
+Yasushi +2 345-678-9011
+\fP
+.fi
+.RE
+.LP
+(where the large expanses of white space are meant to each represent
+a single <tab>), the command:
+.sp
+.RS
+.nf
+
+\fBjoin -t "<tab>" -a 1 -a 2 -e '(unknown)' -o 0,1.2,2.2 phone fax
+\fP
+.fi
+.RE
+.LP
+would produce:
+.sp
+.RS
+.nf
+
+\fB!Name Phone Number Fax Number
+Don +1 123-456-7890 +1 123-456-7899
+Hal +1 234-567-8901 (unknown)
+Keith (unknown) +1 456-789-0122
+Yasushi +2 345-678-9012 +2 345-678-9011
+\fP
+.fi
+.RE
+.LP
+Multiple instances of the same key will produce combinatorial results.
+The following:
+.sp
+.RS
+.nf
+
+\fBfa:
+ a x
+ a y
+ a z
+fb:
+ a p
+\fP
+.fi
+.RE
+.LP
+will produce:
+.sp
+.RS
+.nf
+
+\fBa x p
+a y p
+a z p
+\fP
+.fi
+.RE
+.LP
+And the following:
+.sp
+.RS
+.nf
+
+\fBfa:
+ a b c
+ a d e
+fb:
+ a w x
+ a y z
+ a o p
+\fP
+.fi
+.RE
+.LP
+will produce:
+.sp
+.RS
+.nf
+
+\fBa b c w x
+a b c y z
+a b c o p
+a d e w x
+a d e y z
+a d e o p
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+The \fB-e\fP option is only effective when used with \fB-o\fP because,
+unless specific fields are identified using \fB-o\fP,
+\fIjoin\fP is not aware of what fields might be empty. The exception
+to this is the join field, but identifying an empty join
+field with the \fB-e\fP string is not historical practice and some
+scripts might break if this were changed.
+.LP
+The 0 field in the \fB-o\fP list was adopted from the Tenth Edition
+version of \fIjoin\fP to satisfy international objections
+that the \fIjoin\fP in the base documents does not support the "full
+join" or "outer join" described in relational database
+literature. Although it has been possible to include a join field
+in the output (by default, or by field number using \fB-o\fP),
+the join field could not be included for an unpaired line selected
+by \fB-a\fP. The \fB-o\fP 0 field essentially selects the
+union of the join fields.
+.LP
+This sort of outer join was not possible with the \fIjoin\fP commands
+in the base documents. The \fB-o\fP 0 field was chosen
+because it is an upwards-compatible change for applications. An alternative
+was considered: have the join field represent the union
+of the fields in the files (where they are identical for matched lines,
+and one or both are null for unmatched lines). This was not
+adopted because it would break some historical applications.
+.LP
+The ability to specify \fIfile2\fP as \fB-\fP is not historical practice;
+it was added for completeness.
+.LP
+The \fB-v\fP option is not historical practice, but was considered
+necessary because it permitted the writing of \fIonly\fP
+those lines that do not match on the join field, as opposed to the
+\fB-a\fP option, which prints both lines that do and do not
+match. This additional facility is parallel with the \fB-v\fP option
+of \fIgrep\fP.
+.LP
+Some historical implementations have been encountered where a blank
+line in one of the input files was considered to be the end
+of the file; the description in this volume of IEEE\ Std\ 1003.1-2001
+does not cite this as an allowable case.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIawk\fP, \fIcomm\fP, \fIsort\fP, \fIuniq\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/kill.1p b/man-pages-posix-2003/man1p/kill.1p
new file mode 100644
index 0000000..ddcb8e2
--- /dev/null
+++ b/man-pages-posix-2003/man1p/kill.1p
@@ -0,0 +1,398 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "KILL" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" kill
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+kill \- terminate or signal processes
+.SH SYNOPSIS
+.LP
+\fBkill -s\fP \fIsignal_name pid\fP \fB...
+.br
+.sp
+kill -l\fP \fB[\fP\fIexit_status\fP\fB]\fP\fB
+.br
+.sp
+\fP
+.LP
+\fBkill\fP \fB[\fP\fB-\fP\fIsignal_name\fP\fB]\fP \fIpid\fP \fB...
+.br
+.sp
+kill\fP \fB[\fP\fB-\fP\fIsignal_number\fP\fB]\fP \fIpid\fP \fB...
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIkill\fP utility shall send a signal to the process or processes
+specified by each \fIpid\fP operand.
+.LP
+For each \fIpid\fP operand, the \fIkill\fP utility shall perform actions
+equivalent to the \fIkill\fP() function defined in the System Interfaces
+volume of IEEE\ Std\ 1003.1-2001
+called with the following arguments:
+.IP " *" 3
+The value of the \fIpid\fP operand shall be used as the \fIpid\fP
+argument.
+.LP
+.IP " *" 3
+The \fIsig\fP argument is the value specified by the \fB-s\fP option,
+\fB-\fP \fIsignal_number\fP option, or the \fB-\fP
+\fIsignal_name\fP option, or by SIGTERM, if none of these options
+is specified.
+.LP
+.SH OPTIONS
+.LP
+The \fIkill\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines,
+\ except that
+in the last two SYNOPSIS forms, the \fB-\fP \fIsignal_number\fP and
+\fB-\fP \fIsignal_name\fP options are usually more than a
+single character.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-l\fP
+(The letter ell.) Write all values of \fIsignal_name\fP supported
+by the implementation, if no operand is given. If an
+\fIexit_status\fP operand is given and it is a value of the \fB'?'\fP
+shell special parameter (see \fISpecial Parameters\fP and \fIwait\fP()
+) corresponding to a process
+that was terminated by a signal, the \fIsignal_name\fP corresponding
+to the signal that terminated the process shall be written.
+If an \fIexit_status\fP operand is given and it is the unsigned decimal
+integer value of a signal number, the \fIsignal_name\fP
+(the symbolic constant name without the \fBSIG\fP prefix defined in
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001)
+corresponding to that signal shall be written. Otherwise, the results
+are unspecified.
+.TP 7
+\fB-s\ \fP \fIsignal_name\fP
+.sp
+Specify the signal to send, using one of the symbolic names defined
+in the \fI<signal.h>\fP header. Values of \fIsignal_name\fP shall
+be recognized in a
+case-independent fashion, without the \fBSIG\fP prefix. In addition,
+the symbolic name 0 shall be recognized, representing the
+signal value zero. The corresponding signal shall be sent instead
+of SIGTERM.
+.TP 7
+\fB-\fP\fIsignal_name\fP
+.sp
+Equivalent to \fB-s\fP \fIsignal_name\fP.
+.TP 7
+\fB-\fP\fIsignal_number\fP
+.sp
+Specify a non-negative decimal integer, \fIsignal_number\fP, representing
+the signal to be used instead of SIGTERM, as the
+\fIsig\fP argument in the effective call to \fIkill\fP(). The correspondence
+between integer
+values and the \fIsig\fP value used is shown in the following table.
+.LP
+The effects of specifying any \fIsignal_number\fP other than those
+listed in the table are undefined.
+.sp
+.sp
+.TS C
+center; l l.
+\fIsignal_number\fP \fB\fIsig\fP Value\fP
+0 0
+1 SIGHUP
+2 SIGINT
+3 SIGQUIT
+6 SIGABRT
+9 SIGKILL
+14 SIGALRM
+15 SIGTERM
+.TE
+.LP
+If the first argument is a negative integer, it shall be interpreted
+as a \fB-\fP \fIsignal_number\fP option, not as a
+negative \fIpid\fP operand specifying a process group.
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIpid\fP
+One of the following:
+.RS
+.IP " 1." 4
+A decimal integer specifying a process or process group to be signaled.
+The process or processes selected by positive, negative,
+and zero values of the \fIpid\fP operand shall be as described for
+the \fIkill\fP()
+function. If process number 0 is specified, all processes in the current
+process group shall be signaled. For the effects of
+negative \fIpid\fP numbers, see the \fIkill\fP() function defined
+in the System Interfaces
+volume of IEEE\ Std\ 1003.1-2001. If the first \fIpid\fP operand is
+negative, it should be preceded by \fB"--"\fP to
+keep it from being interpreted as an option.
+.LP
+.IP " 2." 4
+A job control job ID (see the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Section 3.203, Job Control Job ID) that identifies a background process
+group to be
+signaled. The job control job ID notation is applicable only for invocations
+of \fIkill\fP in the current shell execution
+environment; see \fIShell Execution Environment\fP .
+.LP
+.RE
+.TP 7
+\fIexit_status\fP
+A decimal integer specifying a signal number or the exit status of
+a process terminated by a signal.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIkill\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+When the \fB-l\fP option is not specified, the standard output shall
+not be used.
+.LP
+When the \fB-l\fP option is specified, the symbolic name of each signal
+shall be written in the following format:
+.sp
+.RS
+.nf
+
+\fB"%s%c", <\fP\fIsignal_name\fP\fB>, <\fP\fIseparator\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where the <\fIsignal_name\fP> is in uppercase, without the \fBSIG\fP
+prefix, and the <\fIseparator\fP> shall be
+either a <newline> or a <space>. For the last signal written, <\fIseparator\fP>
+shall be a <newline>.
+.LP
+When both the \fB-l\fP option and \fIexit_status\fP operand are specified,
+the symbolic name of the corresponding signal shall
+be written in the following format:
+.sp
+.RS
+.nf
+
+\fB"%s\\n", <\fP\fIsignal_name\fP\fB>
+\fP
+.fi
+.RE
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+At least one matching process was found for each \fIpid\fP operand,
+and the specified signal was successfully processed for at
+least one matching process.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Process numbers can be found by using \fIps\fP.
+.LP
+The job control job ID notation is not required to work as expected
+when \fIkill\fP is operating in its own utility execution
+environment. In either of the following examples:
+.sp
+.RS
+.nf
+
+\fBnohup kill %1 &
+system("kill %1");
+\fP
+.fi
+.RE
+.LP
+the \fIkill\fP operates in a different environment and does not share
+the shell's understanding of job numbers.
+.SH EXAMPLES
+.LP
+Any of the commands:
+.sp
+.RS
+.nf
+
+\fBkill -9 100 -165
+kill -s kill 100 -165
+kill -s KILL 100 -165
+\fP
+.fi
+.RE
+.LP
+sends the SIGKILL signal to the process whose process ID is 100 and
+to all processes whose process group ID is 165, assuming the
+sending process has permission to send that signal to the specified
+processes, and that they exist.
+.LP
+The System Interfaces volume of IEEE\ Std\ 1003.1-2001 and this volume
+of IEEE\ Std\ 1003.1-2001 do not require
+specific signal numbers for any \fIsignal_names\fP. Even the \fB-\fP
+\fIsignal_number\fP option provides symbolic (although
+numeric) names for signals. If a process is terminated by a signal,
+its exit status indicates the signal that killed it, but the
+exact values are not specified. The \fIkill\fP \fB-l\fP option, however,
+can be used to map decimal signal numbers and exit
+status values into the name of a signal. The following example reports
+the status of a terminated job:
+.sp
+.RS
+.nf
+
+\fBjob
+stat=$?
+if [ $stat -eq 0 ]
+then
+ echo job completed successfully.
+elif [ $stat -gt 128 ]
+then
+ echo job terminated by signal SIG$(kill -l $stat).
+else
+ echo job terminated with error code $stat.
+fi
+\fP
+.fi
+.RE
+.LP
+To send the default signal to a process group (say 123), an application
+should use a command similar to one of the
+following:
+.sp
+.RS
+.nf
+
+\fBkill -TERM -123
+kill -- -123
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+The \fB-l\fP option originated from the C shell, and is also implemented
+in the KornShell. The C shell output can consist of
+multiple output lines because the signal names do not always fit on
+a single line on some terminal screens. The KornShell output
+also included the implementation-defined signal numbers and was considered
+by the standard developers to be too difficult for
+scripts to parse conveniently. The specified output format is intended
+not only to accommodate the historical C shell output, but
+also to permit an entirely vertical or entirely horizontal listing
+on systems for which this is appropriate.
+.LP
+An early proposal invented the name SIGNULL as a \fIsignal_name\fP
+for signal 0 (used by the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001 to test for the existence of a process without
+sending it a signal). Since the \fIsignal_name\fP 0
+can be used in this case unambiguously, SIGNULL has been removed.
+.LP
+An early proposal also required symbolic \fIsignal_name\fPs to be
+recognized with or without the \fBSIG\fP prefix. Historical
+versions of \fIkill\fP have not written the \fBSIG\fP prefix for the
+\fB-l\fP option and have not recognized the \fBSIG\fP
+prefix on \fIsignal_name\fPs. Since neither applications portability
+nor ease-of-use would be improved by requiring this
+extension, it is no longer required.
+.LP
+To avoid an ambiguity of an initial negative number argument specifying
+either a signal number or a process group,
+IEEE\ Std\ 1003.1-2001 mandates that it is always considered the former
+by implementations that support the XSI option. It
+also requires that conforming applications always use the \fB"--"\fP
+options terminator argument when specifying a process
+group, unless an option is also specified.
+.LP
+The \fB-s\fP option was added in response to international interest
+in providing some form of \fIkill\fP that meets the
+Utility Syntax Guidelines.
+.LP
+The job control job ID notation is not required to work as expected
+when \fIkill\fP is operating in its own utility execution
+environment. In either of the following examples:
+.sp
+.RS
+.nf
+
+\fBnohup kill %1 &
+system("kill %1");
+\fP
+.fi
+.RE
+.LP
+the \fIkill\fP operates in a different environment and does not understand
+how the shell has managed its job numbers.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIShell Command Language\fP, \fIps\fP, \fIwait\fP(), the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIkill\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<signal.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/lex.1p b/man-pages-posix-2003/man1p/lex.1p
new file mode 100644
index 0000000..744a309
--- /dev/null
+++ b/man-pages-posix-2003/man1p/lex.1p
@@ -0,0 +1,959 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "LEX" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" lex
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+lex \- generate programs for lexical tasks (\fBDEVELOPMENT\fP)
+.SH SYNOPSIS
+.LP
+\fBlex\fP \fB[\fP\fB-t\fP\fB][\fP\fB-n|-v\fP\fB][\fP\fIfile\fP \fB...\fP\fB]\fP\fB\fP
+.SH DESCRIPTION
+.LP
+The \fIlex\fP utility shall generate C programs to be used in lexical
+processing of character input, and that can be used as an
+interface to \fIyacc\fP. The C programs shall be generated from \fIlex\fP
+source code and
+conform to the ISO\ C standard. Usually, the \fIlex\fP utility shall
+write the program it generates to the file
+\fBlex.yy.c\fP; the state of this file is unspecified if \fIlex\fP
+exits with a non-zero exit status. See the EXTENDED
+DESCRIPTION section for a complete description of the \fIlex\fP input
+language.
+.SH OPTIONS
+.LP
+The \fIlex\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-n\fP
+Suppress the summary of statistics usually written with the \fB-v\fP
+option. If no table sizes are specified in the \fIlex\fP
+source code and the \fB-v\fP option is not specified, then \fB-n\fP
+is implied.
+.TP 7
+\fB-t\fP
+Write the resulting program to standard output instead of \fBlex.yy.c\fP.
+.TP 7
+\fB-v\fP
+Write a summary of \fIlex\fP statistics to the standard output. (See
+the discussion of \fIlex\fP table sizes in Definitions in lex .) If
+the \fB-t\fP option is specified and \fB-n\fP is not specified, this
+report shall
+be written to standard error. If table sizes are specified in the
+\fIlex\fP source code, and if the \fB-n\fP option is not
+specified, the \fB-v\fP option may be enabled.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of an input file. If more than one such \fIfile\fP is specified,
+all files shall be concatenated to produce a
+single \fIlex\fP program. If no \fIfile\fP operands are specified,
+or if a \fIfile\fP operand is \fB'-'\fP, the standard
+input shall be used.
+.sp
+.SH STDIN
+.LP
+The standard input shall be used if no \fIfile\fP operands are specified,
+or if a \fIfile\fP operand is \fB'-'\fP . See
+INPUT FILES.
+.SH INPUT FILES
+.LP
+The input files shall be text files containing \fIlex\fP source code,
+as described in the EXTENDED DESCRIPTION section.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIlex\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_COLLATE\fP
+.sp
+Determine the locale for the behavior of ranges, equivalence classes,
+and multi-character collating elements within regular
+expressions. If this variable is not set to the POSIX locale, the
+results are unspecified.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files), and
+the behavior of character classes within regular expressions.
+If this variable is not set to the POSIX locale, the results are unspecified.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+If the \fB-t\fP option is specified, the text file of C source code
+output of \fIlex\fP shall be written to standard
+output.
+.LP
+If the \fB-t\fP option is not specified:
+.IP " *" 3
+Implementation-defined informational, error, and warning messages
+concerning the contents of \fIlex\fP source code input shall
+be written to either the standard output or standard error.
+.LP
+.IP " *" 3
+If the \fB-v\fP option is specified and the \fB-n\fP option is not
+specified, \fIlex\fP statistics shall also be written to
+either the standard output or standard error, in an implementation-defined
+format. These statistics may also be generated if table
+sizes are specified with a \fB'%'\fP operator in the \fIDefinitions\fP
+section, as long as the \fB-n\fP option is not
+specified.
+.LP
+.SH STDERR
+.LP
+If the \fB-t\fP option is specified, implementation-defined informational,
+error, and warning messages concerning the contents
+of \fIlex\fP source code input shall be written to the standard error.
+.LP
+If the \fB-t\fP option is not specified:
+.IP " 1." 4
+Implementation-defined informational, error, and warning messages
+concerning the contents of \fIlex\fP source code input shall
+be written to either the standard output or standard error.
+.LP
+.IP " 2." 4
+If the \fB-v\fP option is specified and the \fB-n\fP option is not
+specified, \fIlex\fP statistics shall also be written to
+either the standard output or standard error, in an implementation-defined
+format. These statistics may also be generated if table
+sizes are specified with a \fB'%'\fP operator in the \fIDefinitions\fP
+section, as long as the \fB-n\fP option is not
+specified.
+.LP
+.SH OUTPUT FILES
+.LP
+A text file containing C source code shall be written to \fBlex.yy.c\fP,
+or to the standard output if the \fB-t\fP option is
+present.
+.SH EXTENDED DESCRIPTION
+.LP
+Each input file shall contain \fIlex\fP source code, which is a table
+of regular expressions with corresponding actions in the
+form of C program fragments.
+.LP
+When \fBlex.yy.c\fP is compiled and linked with the \fIlex\fP library
+(using the \fB-l\ l\fP operand with \fIc99\fP), the resulting program
+shall read character input from the standard input and shall
+partition it into strings that match the given expressions.
+.LP
+When an expression is matched, these actions shall occur:
+.IP " *" 3
+The input string that was matched shall be left in \fIyytext\fP as
+a null-terminated string; \fIyytext\fP shall either be an
+external character array or a pointer to a character string. As explained
+in Definitions in lex,
+the type can be explicitly selected using the \fB%array\fP or \fB%pointer\fP
+declarations, but the default is
+implementation-defined.
+.LP
+.IP " *" 3
+The external \fBint\fP \fIyyleng\fP shall be set to the length of
+the matching string.
+.LP
+.IP " *" 3
+The expression's corresponding program fragment, or action, shall
+be executed.
+.LP
+.LP
+During pattern matching, \fIlex\fP shall search the set of patterns
+for the single longest possible match. Among rules that
+match the same number of characters, the rule given first shall be
+chosen.
+.LP
+The general format of \fIlex\fP source shall be:
+.sp
+.RS
+.nf
+
+\fIDefinitions\fP
+\fB%%\fP
+\fIRules\fP
+\fB%%\fP
+\fIUser\fPSubroutines
+.fi
+.RE
+.LP
+The first \fB"%%"\fP is required to mark the beginning of the rules
+(regular expressions and actions); the second
+\fB"%%"\fP is required only if user subroutines follow.
+.LP
+Any line in the \fIDefinitions\fP section beginning with a <blank>
+shall be assumed to be a C program fragment and shall
+be copied to the external definition area of the \fBlex.yy.c\fP file.
+Similarly, anything in the \fIDefinitions\fP section
+included between delimiter lines containing only \fB"%{"\fP and \fB"%}"\fP
+shall also be copied unchanged to the external
+definition area of the \fBlex.yy.c\fP file.
+.LP
+Any such input (beginning with a <blank> or within \fB"%{"\fP and
+\fB"%}"\fP delimiter lines) appearing at the
+beginning of the \fIRules\fP section before any rules are specified
+shall be written to \fBlex.yy.c\fP after the declarations of
+variables for the \fIyylex\fP() function and before the first line
+of code in \fIyylex\fP(). Thus, user variables local to
+\fIyylex\fP() can be declared here, as well as application code to
+execute upon entry to \fIyylex\fP().
+.LP
+The action taken by \fIlex\fP when encountering any input beginning
+with a <blank> or within \fB"%{"\fP and
+\fB"%}"\fP delimiter lines appearing in the \fIRules\fP section but
+coming after one or more rules is undefined. The presence
+of such input may result in an erroneous definition of the \fIyylex\fP()
+function.
+.SS Definitions in lex
+.LP
+\fIDefinitions\fP appear before the first \fB"%%"\fP delimiter. Any
+line in this section not contained between \fB"%{"\fP
+and \fB"%}"\fP lines and not beginning with a <blank> shall be assumed
+to define a \fIlex\fP substitution string. The
+format of these lines shall be:
+.sp
+.RS
+.nf
+
+\fIname substitute\fP
+.fi
+.RE
+.LP
+If a \fIname\fP does not meet the requirements for identifiers in
+the ISO\ C standard, the result is undefined. The string
+\fIsubstitute\fP shall replace the string { \fIname\fP} when it is
+used in a rule. The \fIname\fP string shall be recognized in
+this context only when the braces are provided and when it does not
+appear within a bracket expression or within double-quotes.
+.LP
+In the \fIDefinitions\fP section, any line beginning with a \fB'%'\fP
+(percent sign) character and followed by an
+alphanumeric word beginning with either \fB's'\fP or \fB'S'\fP shall
+define a set of start conditions. Any line beginning
+with a \fB'%'\fP followed by a word beginning with either \fB'x'\fP
+or \fB'X'\fP shall define a set of exclusive start
+conditions. When the generated scanner is in a \fB%s\fP state, patterns
+with no state specified shall be also active; in a
+\fB%x\fP state, such patterns shall not be active. The rest of the
+line, after the first word, shall be considered to be one or
+more <blank>-separated names of start conditions. Start condition
+names shall be constructed in the same way as definition
+names. Start conditions can be used to restrict the matching of regular
+expressions to one or more states as described in Regular Expressions
+in lex .
+.LP
+Implementations shall accept either of the following two mutually-exclusive
+declarations in the \fIDefinitions\fP section:
+.TP 7
+\fB%array\fP
+Declare the type of \fIyytext\fP to be a null-terminated character
+array.
+.TP 7
+\fB%pointer\fP
+Declare the type of \fIyytext\fP to be a pointer to a null-terminated
+character string.
+.sp
+.LP
+The default type of \fIyytext\fP is implementation-defined. If an
+application refers to \fIyytext\fP outside of the scanner
+source file (that is, via an \fBextern\fP), the application shall
+include the appropriate \fB%array\fP or \fB%pointer\fP
+declaration in the scanner source file.
+.LP
+Implementations shall accept declarations in the \fIDefinitions\fP
+section for setting certain internal table sizes. The
+declarations are shown in the following table.
+.sp
+.ce 1
+\fBTable: Table Size Declarations in \fIlex\fP\fP
+.TS C
+center; l2 l2 l.
+\fBDeclaration\fP \fBDescription\fP \fBMinimum Value\fP
+%\fBp\fP \fIn\fP Number of positions 2500
+%\fBn\fP \fIn\fP Number of states 500
+%\fBa\fP \fIn\fP Number of transitions 2000
+%\fBe\fP \fIn\fP Number of parse tree nodes 1000
+%\fBk\fP \fIn\fP Number of packed character classes 1000
+%\fBo\fP \fIn\fP Size of the output array 3000
+.TE
+.LP
+In the table, \fIn\fP represents a positive decimal integer, preceded
+by one or more <blank>s. The exact meaning of these
+table size numbers is implementation-defined. The implementation shall
+document how these numbers affect the \fIlex\fP utility and
+how they are related to any output that may be generated by the implementation
+should limitations be encountered during the
+execution of \fIlex\fP. It shall be possible to determine from this
+output which of the table size values needs to be modified to
+permit \fIlex\fP to successfully generate tables for the input language.
+The values in the column Minimum Value represent the
+lowest values conforming implementations shall provide.
+.SS Rules in lex
+.LP
+The rules in \fIlex\fP source files are a table in which the left
+column contains regular expressions and the right column
+contains actions (C program fragments) to be executed when the expressions
+are recognized.
+.sp
+.RS
+.nf
+
+\fIERE action
+ERE action\fP\fB...
+\fP
+.fi
+.RE
+.LP
+The extended regular expression (ERE) portion of a row shall be separated
+from \fIaction\fP by one or more <blank>s. A
+regular expression containing <blank>s shall be recognized under one
+of the following conditions:
+.IP " *" 3
+The entire expression appears within double-quotes.
+.LP
+.IP " *" 3
+The <blank>s appear within double-quotes or square brackets.
+.LP
+.IP " *" 3
+Each <blank> is preceded by a backslash character.
+.LP
+.SS User Subroutines in lex
+.LP
+Anything in the user subroutines section shall be copied to \fBlex.yy.c\fP
+following \fIyylex\fP().
+.SS Regular Expressions in lex
+.LP
+The \fIlex\fP utility shall support the set of extended regular expressions
+(see the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 9.4, Extended Regular Expressions),
+with the following additions and exceptions to the syntax:
+.TP 7
+\fB"..."\fP
+Any string enclosed in double-quotes shall represent the characters
+within the double-quotes as themselves, except that
+backslash escapes (which appear in the following table) shall be recognized.
+Any backslash-escape sequence shall be terminated by
+the closing quote. For example, \fB"\\01"\fP \fB"1"\fP represents
+a single string: the octal value 1 followed by the character
+\fB'1'\fP .
+.TP 7
+<\fIstate\fP>\fIr\fP,\ <\fIstate1,state2,\fP...>\fIr\fP
+.sp
+The regular expression \fIr\fP shall be matched only when the program
+is in one of the start conditions indicated by \fIstate\fP,
+\fIstate1\fP, and so on; see Actions in lex . (As an exception to
+the typographical conventions of
+the rest of this volume of IEEE\ Std\ 1003.1-2001, in this case <\fIstate\fP>
+does not represent a metavariable, but
+the literal angle-bracket characters surrounding a symbol.) The start
+condition shall be recognized as such only at the beginning
+of a regular expression.
+.TP 7
+\fIr\fP/\fIx\fP
+The regular expression \fIr\fP shall be matched only if it is followed
+by an occurrence of regular expression \fIx\fP (
+\fIx\fP is the instance of trailing context, further defined below).
+The token returned in \fIyytext\fP shall only match
+\fIr\fP. If the trailing portion of \fIr\fP matches the beginning
+of \fIx\fP, the result is unspecified. The \fIr\fP expression
+cannot include further trailing context or the \fB'$'\fP (match-end-of-line)
+operator; \fIx\fP cannot include the \fB'^'\fP
+(match-beginning-of-line) operator, nor trailing context, nor the
+\fB'$'\fP operator. That is, only one occurrence of trailing
+context is allowed in a \fIlex\fP regular expression, and the \fB'^'\fP
+operator only can be used at the beginning of such an
+expression.
+.TP 7
+{\fIname\fP}
+When \fIname\fP is one of the substitution symbols from the \fIDefinitions\fP
+section, the string, including the enclosing
+braces, shall be replaced by the \fIsubstitute\fP value. The \fIsubstitute\fP
+value shall be treated in the extended regular
+expression as if it were enclosed in parentheses. No substitution
+shall occur if { \fIname\fP} occurs within a bracket expression
+or within double-quotes.
+.sp
+.LP
+Within an ERE, a backslash character shall be considered to begin
+an escape sequence as specified in the table in the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 5, File Format
+Notation (
+\fB'\\\\'\fP, \fB'\\a'\fP, \fB'\\b'\fP, \fB'\\f'\fP, \fB'\\n'\fP,
+\fB'\\r'\fP, \fB'\\t'\fP, \fB'\\v'\fP ). In
+addition, the escape sequences in the following table shall be recognized.
+.LP
+A literal <newline> cannot occur within an ERE; the escape sequence
+\fB'\\n'\fP can be used to represent a
+<newline>. A <newline> shall not be matched by a period operator.
+.br
+.sp
+.ce 1
+\fBTable: Escape Sequences in \fIlex\fP\fP
+.TS C
+center; l1 lw(30)1 lw(30).
+\fBEscape\fP T{
+.na
+\fB\ \fP
+.ad
+T} T{
+.na
+\fB\ \fP
+.ad
+T}
+\fBSequence\fP T{
+.na
+\fBDescription\fP
+.ad
+T} T{
+.na
+\fBMeaning\fP
+.ad
+T}
+\\\fIdigits\fP T{
+.na
+A backslash character followed by the longest sequence of one, two, or three octal-digit characters (01234567). If all of the digits are 0 (that is, representation of the NUL character), the behavior is undefined.
+.ad
+T} T{
+.na
+The character whose encoding is represented by the one, two, or three-digit octal integer. If the size of a byte on the system is greater than nine bits, the valid escape sequence used to represent a byte is implementation-defined. Multi-byte characters require multiple, concatenated escape sequences of this type, including the leading \fB'\\'\fP for each byte.
+.ad
+T}
+\\x\fIdigits\fP T{
+.na
+A backslash character followed by the longest sequence of hexadecimal-digit characters (01234567abcdefABCDEF). If all of the digits are 0 (that is, representation of the NUL character), the behavior is undefined.
+.ad
+T} T{
+.na
+The character whose encoding is represented by the hexadecimal integer.
+.ad
+T}
+\\c T{
+.na
+A backslash character followed by any character not described in this table or in the table in the Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 5, File Format Notation ( \fB'\\\\'\fP, \fB'\\a'\fP, \fB'\\b'\fP, \fB'\\f'\fP, \fB'\\n'\fP, \fB'\\r'\fP, \fB'\\t'\fP, \fB'\\v'\fP ).
+.ad
+T} T{
+.na
+The character \fB'c'\fP, unchanged.
+.ad
+T}
+.TE
+.TP 7
+\fBNote:\fP
+If a \fB'\\x'\fP sequence needs to be immediately followed by a hexadecimal
+digit character, a sequence such as
+\fB"\\x1"\fP \fB"1"\fP can be used, which represents a character containing
+the value 1, followed by the character
+\fB'1'\fP .
+.sp
+.LP
+The order of precedence given to extended regular expressions for
+\fIlex\fP differs from that specified in the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Section 9.4, Extended Regular
+Expressions. The order of precedence for \fIlex\fP shall be as shown
+in the following table, from high to low.
+.TP 7
+\fBNote:\fP
+The escaped characters entry is not meant to imply that these are
+operators, but they are included in the table to show their
+relationships to the true operators. The start condition, trailing
+context, and anchoring notations have been omitted from the
+table because of the placement restrictions described in this section;
+they can only appear at the beginning or ending of an
+ERE.
+.sp
+.sp
+.sp
+.ce 1
+\fBTable: ERE Precedence in \fIlex\fP\fP
+.TS C
+center; l2 l.
+\fBExtended Regular Expression\fP \fBPrecedence\fP
+collation-related bracket symbols [= =] [: :] [. .]
+escaped characters \\<\fIspecial character\fP>
+bracket expression [ ]
+quoting "..."
+grouping ( )
+definition {\fIname\fP}
+single-character RE duplication * + ?
+concatenation \
+interval expression {m,n}
+alternation |
+.TE
+.LP
+The ERE anchoring operators \fB'^'\fP and \fB'$'\fP do not appear
+in the table. With \fIlex\fP regular expressions, these
+operators are restricted in their use: the \fB'^'\fP operator can
+only be used at the beginning of an entire regular expression,
+and the \fB'$'\fP operator only at the end. The operators apply to
+the entire regular expression. Thus, for example, the pattern
+\fB"(^abc)|(def$)"\fP is undefined; it can instead be written as two
+separate rules, one with the regular expression
+\fB"^abc"\fP and one with \fB"def$"\fP, which share a common action
+via the special \fB'|'\fP action (see below). If the
+pattern were written \fB"^abc|def$"\fP, it would match either \fB"abc"\fP
+or \fB"def"\fP on a line by itself.
+.LP
+Unlike the general ERE rules, embedded anchoring is not allowed by
+most historical \fIlex\fP implementations. An example of
+embedded anchoring would be for patterns such as \fB"(^|\ )foo(\ |$)"\fP
+to match \fB"foo"\fP when it exists as a
+complete word. This functionality can be obtained using existing \fIlex\fP
+features:
+.sp
+.RS
+.nf
+
+\fB^foo/[ \\n] |
+" foo"/[ \\n] /* Found foo as a separate word. */
+\fP
+.fi
+.RE
+.LP
+Note also that \fB'$'\fP is a form of trailing context (it is equivalent
+to \fB"/\\n"\fP ) and as such cannot be used with
+regular expressions containing another instance of the operator (see
+the preceding discussion of trailing context).
+.LP
+The additional regular expressions trailing-context operator \fB'/'\fP
+can be used as an ordinary character if presented
+within double-quotes, \fB"/"\fP ; preceded by a backslash, \fB"\\/"\fP
+; or within a bracket expression, \fB"[/]"\fP . The
+start-condition \fB'<'\fP and \fB'>'\fP operators shall be special
+only in a start condition at the beginning of a
+regular expression; elsewhere in the regular expression they shall
+be treated as ordinary characters.
+.SS Actions in lex
+.LP
+The action to be taken when an ERE is matched can be a C program fragment
+or the special actions described below; the program
+fragment can contain one or more C statements, and can also include
+special actions. The empty C statement \fB';'\fP shall be a
+valid action; any string in the \fBlex.yy.c\fP input that matches
+the pattern portion of such a rule is effectively ignored or
+skipped. However, the absence of an action shall not be valid, and
+the action \fIlex\fP takes in such a condition is
+undefined.
+.LP
+The specification for an action, including C statements and special
+actions, can extend across several lines if enclosed in
+braces:
+.sp
+.RS
+.nf
+
+\fIERE\fP \fB<\fP\fIone or more blanks\fP\fB> {\fP \fIprogram statement
+ program statement\fP \fB}
+\fP
+.fi
+.RE
+.LP
+The default action when a string in the input to a \fBlex.yy.c\fP
+program is not matched by any expression shall be to copy the
+string to the output. Because the default behavior of a program generated
+by \fIlex\fP is to read the input and copy it to the
+output, a minimal \fIlex\fP source program that has just \fB"%%"\fP
+shall generate a C program that simply copies the input to
+the output unchanged.
+.LP
+Four special actions shall be available:
+.sp
+.RS
+.nf
+
+\fB| ECHO; REJECT; BEGIN
+\fP
+.fi
+.RE
+.TP 7
+\fB|\fP
+The action \fB'|'\fP means that the action for the next rule is the
+action for this rule. Unlike the other three actions,
+\fB'|'\fP cannot be enclosed in braces or be semicolon-terminated;
+the application shall ensure that it is specified alone, with
+no other actions.
+.TP 7
+\fBECHO;\fP
+Write the contents of the string \fIyytext\fP on the output.
+.TP 7
+\fBREJECT;\fP
+Usually only a single expression is matched by a given string in the
+input. \fBREJECT\fP means "continue to the next
+expression that matches the current input", and shall cause whatever
+rule was the second choice after the current rule to be
+executed for the same input. Thus, multiple rules can be matched and
+executed for one input string or overlapping input strings.
+For example, given the regular expressions \fB"xyz"\fP and \fB"xy"\fP
+and the input \fB"xyz"\fP, usually only the regular
+expression \fB"xyz"\fP would match. The next attempted match would
+start after \fBz.\fP If the last action in the
+\fB"xyz"\fP rule is \fBREJECT\fP, both this rule and the \fB"xy"\fP
+rule would be executed. The \fBREJECT\fP action may be
+implemented in such a fashion that flow of control does not continue
+after it, as if it were equivalent to a \fBgoto\fP to another
+part of \fIyylex\fP(). The use of \fBREJECT\fP may result in somewhat
+larger and slower scanners.
+.TP 7
+\fBBEGIN\fP
+The action:
+.sp
+.RS
+.nf
+
+\fBBEGIN\fP \fInewstate\fP\fB;
+\fP
+.fi
+.RE
+.LP
+switches the state (start condition) to \fInewstate\fP. If the string
+\fInewstate\fP has not been declared previously as a
+start condition in the \fIDefinitions\fP section, the results are
+unspecified. The initial state is indicated by the digit
+\fB'0'\fP or the token \fBINITIAL\fP.
+.sp
+.LP
+The functions or macros described below are accessible to user code
+included in the \fIlex\fP input. It is unspecified whether
+they appear in the C code output of \fIlex\fP, or are accessible only
+through the \fB-l\ l\fP operand to \fIc99\fP (the \fIlex\fP library).
+.TP 7
+\fBint\ \fP \fIyylex\fP(\fBvoid\fP)
+.sp
+Performs lexical analysis on the input; this is the primary function
+generated by the \fIlex\fP utility. The function shall return
+zero when the end of input is reached; otherwise, it shall return
+non-zero values (tokens) determined by the actions that are
+selected.
+.TP 7
+\fBint\ \fP \fIyymore\fP(\fBvoid\fP)
+.sp
+When called, indicates that when the next input string is recognized,
+it is to be appended to the current value of \fIyytext\fP
+rather than replacing it; the value in \fIyyleng\fP shall be adjusted
+accordingly.
+.TP 7
+\fBint\ \fP \fIyyless\fP(\fBint\ \fP \fIn\fP)
+.sp
+Retains \fIn\fP initial characters in \fIyytext\fP, NUL-terminated,
+and treats the remaining characters as if they had not been
+read; the value in \fIyyleng\fP shall be adjusted accordingly.
+.TP 7
+\fBint\ \fP \fIinput\fP(\fBvoid\fP)
+.sp
+Returns the next character from the input, or zero on end-of-file.
+It shall obtain input from the stream pointer \fIyyin\fP,
+although possibly via an intermediate buffer. Thus, once scanning
+has begun, the effect of altering the value of \fIyyin\fP is
+undefined. The character read shall be removed from the input stream
+of the scanner without any processing by the scanner.
+.TP 7
+\fBint\ \fP \fIunput\fP(\fBint\ \fP \fIc\fP)
+.sp
+Returns the character \fB'c'\fP to the input; \fIyytext\fP and \fIyyleng\fP
+are undefined until the next expression is
+matched. The result of using \fIunput\fP() for more characters than
+have been input is unspecified.
+.sp
+.LP
+The following functions shall appear only in the \fIlex\fP library
+accessible through the \fB-l\ l\fP operand; they can
+therefore be redefined by a conforming application:
+.TP 7
+\fBint\ \fP \fIyywrap\fP(\fBvoid\fP)
+.sp
+Called by \fIyylex\fP() at end-of-file; the default \fIyywrap\fP()
+shall always return 1. If the application requires
+\fIyylex\fP() to continue processing with another source of input,
+then the application can include a function \fIyywrap\fP(),
+which associates another file with the external variable \fBFILE *\fP
+\fIyyin\fP and shall return a value of zero.
+.TP 7
+\fBint\ \fP \fImain\fP(\fBint\ \fP \fIargc\fP, \fBchar *\fP\fIargv\fP[])
+.sp
+Calls \fIyylex\fP() to perform lexical analysis, then exits. The user
+code can contain \fImain\fP() to perform
+application-specific operations, calling \fIyylex\fP() as applicable.
+.sp
+.LP
+Except for \fIinput\fP(), \fIunput\fP(), and \fImain\fP(), all external
+and static names generated by \fIlex\fP shall begin
+with the prefix \fByy\fP or \fBYY\fP.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Conforming applications are warned that in the \fIRules\fP section,
+an ERE without an action is not acceptable, but need not be
+detected as erroneous by \fIlex\fP. This may result in compilation
+or runtime errors.
+.LP
+The purpose of \fIinput\fP() is to take characters off the input stream
+and discard them as far as the lexical analysis is
+concerned. A common use is to discard the body of a comment once the
+beginning of a comment is recognized.
+.LP
+The \fIlex\fP utility is not fully internationalized in its treatment
+of regular expressions in the \fIlex\fP source code or
+generated lexical analyzer. It would seem desirable to have the lexical
+analyzer interpret the regular expressions given in the
+\fIlex\fP source according to the environment specified when the lexical
+analyzer is executed, but this is not possible with the
+current \fIlex\fP technology. Furthermore, the very nature of the
+lexical analyzers produced by \fIlex\fP must be closely tied to
+the lexical requirements of the input language being described, which
+is frequently locale-specific anyway. (For example, writing
+an analyzer that is used for French text is not automatically useful
+for processing other languages.)
+.SH EXAMPLES
+.LP
+The following is an example of a \fIlex\fP program that implements
+a rudimentary scanner for a Pascal-like syntax:
+.sp
+.RS
+.nf
+
+\fB%{
+/* Need this for the call to atof() below. */
+#include <math.h>
+/* Need this for printf(), fopen(), and stdin below. */
+#include <stdio.h>
+%}
+.sp
+
+DIGIT [0-9]
+ID [a-z][a-z0-9]*
+.sp
+
+%%
+.sp
+
+{DIGIT}+ {
+ printf("An integer: %s (%d)\\n", yytext,
+ atoi(yytext));
+ }
+.sp
+
+{DIGIT}+"."{DIGIT}* {
+ printf("A float: %s (%g)\\n", yytext,
+ atof(yytext));
+ }
+.sp
+
+if|then|begin|end|procedure|function {
+ printf("A keyword: %s\\n", yytext);
+ }
+.sp
+
+{ID} printf("An identifier: %s\\n", yytext);
+.sp
+
+"+"|"-"|"*"|"/" printf("An operator: %s\\n", yytext);
+.sp
+
+"{"[^}\\n]*"}" /* Eat up one-line comments. */
+.sp
+
+[ \\t\\n]+ /* Eat up white space. */
+.sp
+
+\&. printf("Unrecognized character: %s\\n", yytext);
+.sp
+
+%%
+.sp
+
+int main(int argc, char *argv[])
+{
+ ++argv, --argc; /* Skip over program name. */
+ if (argc > 0)
+ yyin = fopen(argv[0], "r");
+ else
+ yyin = stdin;
+.sp
+
+ yylex();
+}
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+Even though the \fB-c\fP option and references to the C language are
+retained in this description, \fIlex\fP may be
+generalized to other languages, as was done at one time for EFL, the
+Extended FORTRAN Language. Since the \fIlex\fP input
+specification is essentially language-independent, versions of this
+utility could be written to produce Ada, Modula-2, or Pascal
+code, and there are known historical implementations that do so.
+.LP
+The current description of \fIlex\fP bypasses the issue of dealing
+with internationalized EREs in the \fIlex\fP source code or
+generated lexical analyzer. If it follows the model used by \fIawk\fP
+(the source code is
+assumed to be presented in the POSIX locale, but input and output
+are in the locale specified by the environment variables), then
+the tables in the lexical analyzer produced by \fIlex\fP would interpret
+EREs specified in the \fIlex\fP source in terms of the
+environment variables specified when \fIlex\fP was executed. The desired
+effect would be to have the lexical analyzer interpret
+the EREs given in the \fIlex\fP source according to the environment
+specified when the lexical analyzer is executed, but this is
+not possible with the current \fIlex\fP technology.
+.LP
+The description of octal and hexadecimal-digit escape sequences agrees
+with the ISO\ C standard use of escape sequences. See
+the RATIONALE for \fIed\fP for a discussion of bytes larger than 9
+bits being represented by octal values.
+Hexadecimal values can represent larger bytes and multi-byte characters
+directly, using as many digits as required.
+.LP
+There is no detailed output format specification. The observed behavior
+of \fIlex\fP under four different historical
+implementations was that none of these implementations consistently
+reported the line numbers for error and warning messages.
+Furthermore, there was a desire that \fIlex\fP be allowed to output
+additional diagnostic messages. Leaving message formats
+unspecified avoids these formatting questions and problems with internationalization.
+.LP
+Although the \fB%x\fP specifier for \fIexclusive\fP start conditions
+is not historical practice, it is believed to be a
+minor change to historical implementations and greatly enhances the
+usability of \fIlex\fP programs since it permits an
+application to obtain the expected functionality with fewer statements.
+.LP
+The \fB%array\fP and \fB%pointer\fP declarations were added as a compromise
+between historical systems. The System V-based
+\fIlex\fP copies the matched text to a \fIyytext\fP array. The \fIflex\fP
+program, supported in BSD and GNU systems, uses a
+pointer. In the latter case, significant performance improvements
+are available for some scanners. Most historical programs should
+require no change in porting from one system to another because the
+string being referenced is null-terminated in both cases. (The
+method used by \fIflex\fP in its case is to null-terminate the token
+in place by remembering the character that used to come right
+after the token and replacing it before continuing on to the next
+scan.) Multi-file programs with external references to
+\fIyytext\fP outside the scanner source file should continue to operate
+on their historical systems, but would require one of the
+new declarations to be considered strictly portable.
+.LP
+The description of EREs avoids unnecessary duplication of ERE details
+because their meanings within a \fIlex\fP ERE are the
+same as that for the ERE in this volume of IEEE\ Std\ 1003.1-2001.
+.LP
+The reason for the undefined condition associated with text beginning
+with a <blank> or within \fB"%{"\fP and
+\fB"%}"\fP delimiter lines appearing in the \fIRules\fP section is
+historical practice. Both the BSD and System V \fIlex\fP
+copy the indented (or enclosed) input in the \fIRules\fP section (except
+at the beginning) to unreachable areas of the
+\fIyylex\fP() function (the code is written directly after a \fIbreak\fP
+statement). In some cases, the System V \fIlex\fP generates an error
+message or a syntax error, depending on the form of indented
+input.
+.LP
+The intention in breaking the list of functions into those that may
+appear in \fBlex.yy.c\fP \fIversus\fP those that only
+appear in \fBlibl.a\fP is that only those functions in \fBlibl.a\fP
+can be reliably redefined by a conforming application.
+.LP
+The descriptions of standard output and standard error are somewhat
+complicated because historical \fIlex\fP implementations
+chose to issue diagnostic messages to standard output (unless \fB-t\fP
+was given). IEEE\ Std\ 1003.1-2001 allows this
+behavior, but leaves an opening for the more expected behavior of
+using standard error for diagnostics. Also, the System V behavior
+of writing the statistics when any table sizes are given is allowed,
+while BSD-derived systems can avoid it. The programmer can
+always precisely obtain the desired results by using either the \fB-t\fP
+or \fB-n\fP options.
+.LP
+The OPERANDS section does not mention the use of \fB-\fP as a synonym
+for standard input; not all historical implementations
+support such usage for any of the \fIfile\fP operands.
+.LP
+A description of the \fItranslation table\fP was deleted from early
+proposals because of its relatively low usage in historical
+applications.
+.LP
+The change to the definition of the \fIinput\fP() function that allows
+buffering of input presents the opportunity for major
+performance gains in some applications.
+.LP
+The following examples clarify the differences between \fIlex\fP regular
+expressions and regular expressions appearing
+elsewhere in this volume of IEEE\ Std\ 1003.1-2001. For regular expressions
+of the form \fB"r/x"\fP, the string
+matching \fIr\fP is always returned; confusion may arise when the
+beginning of \fIx\fP matches the trailing portion of \fIr\fP.
+For example, given the regular expression \fB"a*b/cc"\fP and the input
+\fB"aaabcc"\fP, \fIyytext\fP would contain the
+string \fB"aaab"\fP on this match. But given the regular expression
+\fB"x*/xy"\fP and the input \fB"xxxy"\fP, the token
+\fBxxx\fP, not \fBxx\fP, is returned by some implementations because
+\fBxxx\fP matches \fB"x*"\fP .
+.LP
+In the rule \fB"ab*/bc"\fP, the \fB"b*"\fP at the end of \fIr\fP
+extends \fIr\fP's match into the beginning of the
+trailing context, so the result is unspecified. If this rule were
+\fB"ab/bc"\fP, however, the rule matches the text
+\fB"ab"\fP when it is followed by the text \fB"bc"\fP . In this latter
+case, the matching of \fIr\fP cannot extend into the
+beginning of \fIx\fP, so the result is specified.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIc99\fP, \fIed\fP, \fIyacc\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/link.1p b/man-pages-posix-2003/man1p/link.1p
new file mode 100644
index 0000000..21dbe32
--- /dev/null
+++ b/man-pages-posix-2003/man1p/link.1p
@@ -0,0 +1,132 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "LINK" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" link
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+link \- call link function
+.SH SYNOPSIS
+.LP
+\fBlink\fP \fIfile1 file2\fP\fB\fP
+.SH DESCRIPTION
+.LP
+The \fIlink\fP utility shall perform the function call:
+.sp
+.RS
+.nf
+
+\fBlink(\fP\fIfile1\fP\fB,\fP \fIfile2\fP\fB);
+\fP
+.fi
+.RE
+.LP
+A user may need appropriate privilege to invoke the \fIlink\fP utility.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIfile1\fP
+The pathname of an existing file.
+.TP 7
+\fIfile2\fP
+The pathname of the new directory entry to be created.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+Not used.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIlink\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+.sp
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+None.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIln\fP, \fIunlink\fP(), the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001, \fIlink\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/ln.1p b/man-pages-posix-2003/man1p/ln.1p
new file mode 100644
index 0000000..affbae2
--- /dev/null
+++ b/man-pages-posix-2003/man1p/ln.1p
@@ -0,0 +1,267 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "LN" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ln
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ln \- link files
+.SH SYNOPSIS
+.LP
+\fBln\fP \fB[\fP\fB-fs\fP\fB]\fP \fIsource_file target_file\fP\fB
+.br
+.sp
+ln\fP \fB[\fP\fB-fs\fP\fB]\fP \fIsource_file\fP \fB...\fP \fItarget_dir\fP\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+In the first synopsis form, the \fIln\fP utility shall create a new
+directory entry (link) at the destination path specified by
+the \fItarget_file\fP operand. If the \fB-s\fP option is specified,
+a symbolic link shall be created for the file specified by
+the \fIsource_file\fP operand. This first synopsis form shall be assumed
+when the final operand does not name an existing
+directory; if more than two operands are specified and the final is
+not an existing directory, an error shall result.
+.LP
+In the second synopsis form, the \fIln\fP utility shall create a new
+directory entry (link), or if the \fB-s\fP option is
+specified a symbolic link, for each file specified by a \fIsource_file\fP
+operand, at a destination path in the existing directory
+named by \fItarget_dir\fP.
+.LP
+If the last operand specifies an existing file of a type not specified
+by the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001, the behavior is implementation-defined.
+.LP
+The corresponding destination path for each \fIsource_file\fP shall
+be the concatenation of the target directory pathname, a
+slash character, and the last pathname component of the \fIsource_file\fP.
+The second synopsis form shall be assumed when the
+final operand names an existing directory.
+.LP
+For each \fIsource_file\fP:
+.IP " 1." 4
+If the destination path exists:
+.RS
+.IP " a." 4
+If the \fB-f\fP option is not specified, \fIln\fP shall write a diagnostic
+message to standard error, do nothing more with the
+current \fIsource_file\fP, and go on to any remaining \fIsource_files\fP.
+.LP
+.IP " b." 4
+Actions shall be performed equivalent to the \fIunlink\fP() function
+defined in the
+System Interfaces volume of IEEE\ Std\ 1003.1-2001, called using \fIdestination\fP
+as the \fIpath\fP argument. If this
+fails for any reason, \fIln\fP shall write a diagnostic message to
+standard error, do nothing more with the current
+\fIsource_file\fP, and go on to any remaining \fIsource_files\fP.
+.LP
+.RE
+.LP
+.IP " 2." 4
+If the \fB-s\fP option is specified, \fIln\fP shall create a symbolic
+link named by the destination path and containing as its
+pathname \fIsource_file\fP. The \fIln\fP utility shall do nothing
+more with \fIsource_file\fP and shall go on to any remaining
+files.
+.LP
+.IP " 3." 4
+If \fIsource_file\fP is a symbolic link, actions shall be performed
+equivalent to the \fIlink\fP() function using the object that \fIsource_file\fP
+references as the \fIpath1\fP
+argument and the destination path as the \fIpath2\fP argument. The
+\fIln\fP utility shall do nothing more with \fIsource_file\fP
+and shall go on to any remaining files.
+.LP
+.IP " 4." 4
+Actions shall be performed equivalent to the \fIlink\fP() function
+defined in the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001 using \fIsource_file\fP
+as the \fIpath1\fP argument, and the destination path
+as the \fIpath2\fP argument.
+.LP
+.SH OPTIONS
+.LP
+The \fIln\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following option shall be supported:
+.TP 7
+\fB-f\fP
+Force existing destination pathnames to be removed to allow the link.
+.TP 7
+\fB-s\fP
+Create symbolic links instead of hard links.
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIsource_file\fP
+A pathname of a file to be linked. If the \fB-s\fP option is specified,
+no restrictions on the type of file or on its
+existence shall be made. If the \fB-s\fP option is not specified,
+whether a directory can be linked is
+implementation-defined.
+.TP 7
+\fItarget_file\fP
+The pathname of the new directory entry to be created.
+.TP 7
+\fItarget_dir\fP
+A pathname of an existing directory in which the new directory entries
+are created.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIln\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+All the specified files were linked successfully.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+Some historic versions of \fIln\fP (including the one specified by
+the SVID) unlink the destination file, if it exists, by
+default. If the mode does not permit writing, these versions prompt
+for confirmation before attempting the unlink. In these
+versions the \fB-f\fP option causes \fIln\fP not to attempt to prompt
+for confirmation.
+.LP
+This allows \fIln\fP to succeed in creating links when the target
+file already exists, even if the file itself is not writable
+(although the directory must be). Early proposals specified this functionality.
+.LP
+This volume of IEEE\ Std\ 1003.1-2001 does not allow the \fIln\fP
+utility to unlink existing destination paths by
+default for the following reasons:
+.IP " *" 3
+The \fIln\fP utility has historically been used to provide locking
+for shell applications, a usage that is incompatible with
+\fIln\fP unlinking the destination path by default. There was no corresponding
+technical advantage to adding this
+functionality.
+.LP
+.IP " *" 3
+This functionality gave \fIln\fP the ability to destroy the link structure
+of files, which changes the historical behavior of
+\fIln\fP.
+.LP
+.IP " *" 3
+This functionality is easily replicated with a combination of \fIrm\fP
+and \fIln\fP.
+.LP
+.IP " *" 3
+It is not historical practice in many systems; BSD and BSD-derived
+systems do not support this behavior. Unfortunately,
+whichever behavior is selected can cause scripts written expecting
+the other behavior to fail.
+.LP
+.IP " *" 3
+It is preferable that \fIln\fP perform in the same manner as the \fIlink\fP()
+function,
+which does not permit the target to exist already.
+.LP
+.LP
+This volume of IEEE\ Std\ 1003.1-2001 retains the \fB-f\fP option
+to provide support for shell scripts depending on the
+SVID semantics. It seems likely that shell scripts would not be written
+to handle prompting by \fIln\fP and would therefore have
+specified the \fB-f\fP option.
+.LP
+The \fB-f\fP option is an undocumented feature of many historical
+versions of the \fIln\fP utility, allowing linking to
+directories. These versions require modification.
+.LP
+Early proposals of this volume of IEEE\ Std\ 1003.1-2001 also required
+a \fB-i\fP option, which behaved like the
+\fB-i\fP options in \fIcp\fP and \fImv\fP, prompting for
+confirmation before unlinking existing files. This was not historical
+practice for the \fIln\fP utility and has been omitted.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIchmod\fP(), \fIfind\fP, \fIpax\fP, \fIrm\fP, the System Interfaces
+volume of IEEE\ Std\ 1003.1-2001, \fIlink\fP(), \fIunlink\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/locale.1p b/man-pages-posix-2003/man1p/locale.1p
new file mode 100644
index 0000000..91016cd
--- /dev/null
+++ b/man-pages-posix-2003/man1p/locale.1p
@@ -0,0 +1,446 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "LOCALE" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" locale
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+locale \- get locale-specific information
+.SH SYNOPSIS
+.LP
+\fBlocale\fP \fB[\fP\fB-a| -m\fP\fB]\fP\fB
+.br
+.sp
+locale\fP \fB[\fP\fB-ck\fP\fB]\fP \fIname\fP\fB...
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIlocale\fP utility shall write information about the current
+locale environment, or all public locales, to the standard
+output. For the purposes of this section, a \fIpublic locale\fP is
+one provided by the implementation that is accessible to the
+application.
+.LP
+When \fIlocale\fP is invoked without any arguments, it shall summarize
+the current locale environment for each locale category
+as determined by the settings of the environment variables defined
+in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 7, Locale.
+.LP
+When invoked with operands, it shall write values that have been assigned
+to the keywords in the locale categories, as
+follows:
+.IP " *" 3
+Specifying a keyword name shall select the named keyword and the category
+containing that keyword.
+.LP
+.IP " *" 3
+Specifying a category name shall select the named category and all
+keywords in that category.
+.LP
+.SH OPTIONS
+.LP
+The \fIlocale\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-a\fP
+Write information about all available public locales. The available
+locales shall include \fBPOSIX\fP, representing the POSIX
+locale. The manner in which the implementation determines what other
+locales are available is implementation-defined.
+.TP 7
+\fB-c\fP
+Write the names of selected locale categories; see the STDOUT section.
+The \fB-c\fP option increases readability when more
+than one category is selected (for example, via more than one keyword
+name or via a category name). It is valid both with and
+without the \fB-k\fP option.
+.TP 7
+\fB-k\fP
+Write the names and values of selected keywords. The implementation
+may omit values for some keywords; see the OPERANDS
+section.
+.TP 7
+\fB-m\fP
+Write names of available charmaps; see the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 6.1, Portable Character Set.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIname\fP
+The name of a locale category as defined in the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Chapter 7, Locale, the name of a keyword
+in a locale category, or the reserved name
+\fBcharmap\fP. The named category or keyword shall be selected for
+output. If a single \fIname\fP represents both a locale
+category name and a keyword name in the current locale, the results
+are unspecified. Otherwise, both category and keyword names can
+be specified as \fIname\fP operands, in any sequence. It is implementation-defined
+whether any keyword values are written for the
+categories \fILC_CTYPE\fP and \fILC_COLLATE\fP.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIlocale\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.LP
+The application shall ensure that the \fILANG\fP, \fILC_*\fP, and
+\fINLSPATH\fP environment variables specify the current locale
+environment to be written out; they shall be used
+if the \fB-a\fP option is not specified.
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+If \fIlocale\fP is invoked without any options or operands, the names
+and values of the \fILANG\fP and \fILC_*\fP environment
+variables described in this volume of IEEE\ Std\ 1003.1-2001 shall
+be written to the standard output, one variable per
+line, with \fILANG\fP first, and each line using the following format.
+Only those variables set in the environment and not
+overridden by \fILC_ALL\fP shall be written using this format:
+.sp
+.RS
+.nf
+
+\fB"%s=%s\\n", <\fP\fIvariable_name\fP\fB>, <\fP\fIvalue\fP\fB>
+\fP
+.fi
+.RE
+.LP
+The names of those \fILC_*\fP variables associated with locale categories
+defined in this volume of
+IEEE\ Std\ 1003.1-2001 that are not set in the environment or are
+overridden by \fILC_ALL\fP shall be written in the
+following format:
+.sp
+.RS
+.nf
+
+\fB"%s=\\"%s\\"\\n", <\fP\fIvariable_name\fP\fB>, <\fP\fIimplied value\fP\fB>
+\fP
+.fi
+.RE
+.LP
+The <\fIimplied\ value\fP> shall be the name of the locale that has
+been selected for that category by the
+implementation, based on the values in \fILANG\fP and \fILC_ALL\fP,
+as described in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 8, Environment Variables.
+.LP
+The <\fIvalue\fP> and <\fIimplied\ value\fP> shown above shall be
+properly quoted for possible later reentry
+to the shell. The <\fIvalue\fP> shall not be quoted using double-quotes
+(so that it can be distinguished by the user from
+the <\fIimplied\ value\fP> case, which always requires double-quotes).
+.LP
+The \fILC_ALL\fP variable shall be written last, using the first format
+shown above. If it is not set, it shall be written
+as:
+.sp
+.RS
+.nf
+
+\fB"LC_ALL=\\n"
+\fP
+.fi
+.RE
+.LP
+If any arguments are specified:
+.IP " 1." 4
+If the \fB-a\fP option is specified, the names of all the public locales
+shall be written, each in the following format:
+.sp
+.RS
+.nf
+
+\fB"%s\\n", <\fP\fIlocale name\fP\fB>
+\fP
+.fi
+.RE
+.LP
+.IP " 2." 4
+If the \fB-c\fP option is specified, the names of all selected categories
+shall be written, each in the following format:
+.sp
+.RS
+.nf
+
+\fB"%s\\n", <\fP\fIcategory name\fP\fB>
+\fP
+.fi
+.RE
+.LP
+If keywords are also selected for writing (see following items), the
+category name output shall precede the keyword output for
+that category.
+.LP
+If the \fB-c\fP option is not specified, the names of the categories
+shall not be written; only the keywords, as selected by
+the <\fIname\fP> operand, shall be written.
+.LP
+.IP " 3." 4
+If the \fB-k\fP option is specified, the names and values of selected
+keywords shall be written. If a value is non-numeric, it
+shall be written in the following format:
+.sp
+.RS
+.nf
+
+\fB"%s=\\"%s\\"\\n", <\fP\fIkeyword name\fP\fB>, <\fP\fIkeyword value\fP\fB>
+\fP
+.fi
+.RE
+.LP
+If the keyword was \fBcharmap\fP, the name of the charmap (if any)
+that was specified via the \fIlocaledef\fP \fB-f\fP option when the
+locale was created shall be written, with the word
+\fBcharmap\fP as <\fIkeyword\ name\fP>.
+.LP
+If a value is numeric, it shall be written in one of the following
+formats:
+.sp
+.RS
+.nf
+
+\fB"%s=%d\\n", <\fP\fIkeyword name\fP\fB>, <\fP\fIkeyword value\fP\fB>
+.sp
+
+"%s=%c%o\\n", <\fP\fIkeyword name\fP\fB>, <\fP\fIescape character\fP\fB>, <\fP\fIkeyword value\fP\fB>
+.sp
+
+"%s=%cx%x\\n", <\fP\fIkeyword name\fP\fB>, <\fP\fIescape character\fP\fB>, <\fP\fIkeyword value\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where the <\fIescape\ character\fP> is that identified by the \fBescape_char\fP
+keyword in the current locale; see
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, Section 7.3,
+Locale
+Definition.
+.LP
+Compound keyword values (list entries) shall be separated in the output
+by semicolons. When included in keyword values, the
+semicolon, the double-quote, the backslash, and any control character
+shall be preceded (escaped) with the escape character.
+.LP
+.IP " 4." 4
+If the \fB-k\fP option is not specified, selected keyword values shall
+be written, each in the following format:
+.sp
+.RS
+.nf
+
+\fB"%s\\n", <\fP\fIkeyword value\fP\fB>
+\fP
+.fi
+.RE
+.LP
+If the keyword was \fBcharmap\fP, the name of the charmap (if any)
+that was specified via the \fIlocaledef\fP \fB-f\fP option when the
+locale was created shall be written.
+.LP
+.IP " 5." 4
+If the \fB-m\fP option is specified, then a list of all available
+charmaps shall be written, each in the format:
+.sp
+.RS
+.nf
+
+\fB"%s\\n", <\fP\fIcharmap\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where <\fIcharmap\fP> is in a format suitable for use as the option-argument
+to the \fIlocaledef\fP \fB-f\fP option.
+.LP
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+All the requested information was found and output successfully.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+If the \fILANG\fP environment variable is not set or set to an empty
+value, or one of the \fILC_*\fP environment variables is
+set to an unrecognized value, the actual locales assumed (if any)
+are implementation-defined as described in the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 8, Environment Variables.
+.LP
+Implementations are not required to write out the actual values for
+keywords in the categories \fILC_CTYPE\fP and \fILC_COLLATE
+;\fP however, they must write out the categories (allowing an application
+to determine, for example, which character classes are
+available).
+.SH EXAMPLES
+.LP
+In the following examples, the assumption is that locale environment
+variables are set as follows:
+.sp
+.RS
+.nf
+
+\fBLANG=locale_x
+LC_COLLATE=locale_y
+\fP
+.fi
+.RE
+.LP
+The command \fIlocale\fP would result in the following output:
+.sp
+.RS
+.nf
+
+\fBLANG=locale_x
+LC_CTYPE="locale_x"
+LC_COLLATE=locale_y
+LC_TIME="locale_x"
+LC_NUMERIC="locale_x"
+LC_MONETARY="locale_x"
+LC_MESSAGES="locale_x"
+LC_ALL=
+\fP
+.fi
+.RE
+.LP
+The order of presentation of the categories is not specified by this
+volume of IEEE\ Std\ 1003.1-2001.
+.LP
+The command:
+.sp
+.RS
+.nf
+
+\fBLC_ALL=POSIX locale -ck decimal_point
+\fP
+.fi
+.RE
+.LP
+would produce:
+.sp
+.RS
+.nf
+
+\fBLC_NUMERIC
+decimal_point="."
+\fP
+.fi
+.RE
+.LP
+The following command shows an application of \fIlocale\fP to determine
+whether a user-supplied response is affirmative:
+.sp
+.RS
+.nf
+
+\fBif printf "%s\\n" "$response" | grep -Eq "$(locale yesexpr)"
+then
+ affirmative processing goes here
+else
+ non-affirmative processing goes here
+fi
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+The output for categories \fILC_CTYPE\fP and \fILC_COLLATE\fP has
+been made implementation-defined because there is a
+questionable value in having a shell script receive an entire array
+of characters. It is also difficult to return a logical
+collation description, short of returning a complete \fIlocaledef\fP
+source.
+.LP
+The \fB-m\fP option was included to allow applications to query for
+the existence of charmaps. The output is a list of the
+charmaps (implementation-supplied and user-supplied, if any) on the
+system.
+.LP
+The \fB-c\fP option was included for readability when more than one
+category is selected (for example, via more than one
+keyword name or via a category name). It is valid both with and without
+the \fB-k\fP option.
+.LP
+The \fBcharmap\fP keyword, which returns the name of the charmap (if
+any) that was used when the current locale was created,
+was included to allow applications needing the information to retrieve
+it.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIlocaledef\fP, the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Section 7.3, Locale Definition
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/localedef.1p b/man-pages-posix-2003/man1p/localedef.1p
new file mode 100644
index 0000000..00f526e
--- /dev/null
+++ b/man-pages-posix-2003/man1p/localedef.1p
@@ -0,0 +1,312 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "LOCALEDEF" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" localedef
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+localedef \- define locale environment
+.SH SYNOPSIS
+.LP
+\fBlocaledef\fP \fB[\fP\fB-c\fP\fB][\fP\fB-f\fP \fIcharmap\fP\fB][\fP\fB-i\fP
+\fIsourcefile\fP\fB][\fP\fB-u\fP \fIcode_set_name\fP\fB]\fP \fIname\fP
+.SH DESCRIPTION
+.LP
+The \fIlocaledef\fP utility shall convert source definitions for locale
+categories into a format usable by the functions and
+utilities whose operational behavior is determined by the setting
+of the locale environment variables defined in the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 7, Locale. It
+is
+implementation-defined whether users have the capability to create
+new locales, in addition to those supplied by the
+implementation. If the symbolic constant POSIX2_LOCALEDEF is defined,
+the system supports the creation of new locales. On
+XSI-conformant systems, the symbolic constant POSIX2_LOCALEDEF shall
+be defined.
+.LP
+The utility shall read source definitions for one or more locale categories
+belonging to the same locale from the file named in
+the \fB-i\fP option (if specified) or from standard input.
+.LP
+The \fIname\fP operand identifies the target locale. The utility shall
+support the creation of \fIpublic\fP, or generally
+accessible locales, as well as \fIprivate\fP, or restricted-access
+locales. Implementations may restrict the capability to create
+or modify public locales to users with the appropriate privileges.
+.LP
+Each category source definition shall be identified by the corresponding
+environment variable name and terminated by an
+\fBEND\fP \fIcategory-name\fP statement. The following categories
+shall be supported. In addition, the input may contain source
+for implementation-defined categories.
+.TP 7
+\fILC_CTYPE\fP
+Defines character classification and case conversion.
+.TP 7
+\fILC_COLLATE\fP
+.sp
+Defines collation rules.
+.TP 7
+\fILC_MONETARY\fP
+.sp
+Defines the format and symbols used in formatting of monetary information.
+.TP 7
+\fILC_NUMERIC\fP
+.sp
+Defines the decimal delimiter, grouping, and grouping symbol for non-monetary
+numeric editing.
+.TP 7
+\fILC_TIME\fP
+Defines the format and content of date and time information.
+.TP 7
+\fILC_MESSAGES\fP
+.sp
+Defines the format and values of affirmative and negative responses.
+.sp
+.SH OPTIONS
+.LP
+The \fIlocaledef\fP utility shall conform to the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-c\fP
+Create permanent output even if warning messages have been issued.
+.TP 7
+\fB-f\ \fP \fIcharmap\fP
+Specify the pathname of a file containing a mapping of character symbols
+and collating element symbols to actual character
+encodings. The format of the \fIcharmap\fP is described in the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Section 6.4, Character
+Set Description File. The application shall ensure that this
+option is specified if symbolic names (other than collating symbols
+defined in a \fBcollating-symbol\fP keyword) are used. If the
+\fB-f\fP option is not present, an implementation-defined character
+mapping shall be used.
+.TP 7
+\fB-i\ \fP \fIinputfile\fP
+The pathname of a file containing the source definitions. If this
+option is not present, source definitions shall be read from
+standard input. The format of the \fIinputfile\fP is described in
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Section 7.3, Locale Definition.
+.TP 7
+\fB-u\ \fP \fIcode_set_name\fP
+.sp
+Specify the name of a codeset used as the target mapping of character
+symbols and collating element symbols whose encoding values
+are defined in terms of the ISO/IEC\ 10646-1:2000 standard position
+constant values.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIname\fP
+Identifies the locale; see the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 7, Locale for a description of the use of this name. If the
+name contains one or more
+slash characters, \fIname\fP shall be interpreted as a pathname where
+the created locale definitions shall be stored. If
+\fIname\fP does not contain any slash characters, the interpretation
+of the name is implementation-defined and the locale shall be
+public. This capability may be restricted to users with appropriate
+privileges. (As a consequence of specifying one \fIname\fP,
+although several categories can be processed in one execution, only
+categories belonging to the same locale can be processed.)
+.sp
+.SH STDIN
+.LP
+Unless the \fB-i\fP option is specified, the standard input shall
+be a text file containing one or more locale category source
+definitions, as described in the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Section 7.3, Locale Definition. When lines are continued using the
+escape character
+mechanism, there is no limit to the length of the accumulated continued
+line.
+.SH INPUT FILES
+.LP
+The character set mapping file specified as the \fIcharmap\fP option-argument
+is described in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 6.4, Character Set Description File.
+If
+a locale category source definition contains a \fBcopy\fP statement,
+as defined in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 7, Locale, and the \fBcopy\fP statement
+names a
+valid, existing locale, then \fIlocaledef\fP shall behave as if the
+source definition had contained a valid category source
+definition for the named locale.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIlocaledef\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_COLLATE\fP
+.sp
+(This variable has no affect on \fIlocaledef\fP; the POSIX locale
+is used for this category.)
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files). This
+variable has no affect on the processing of \fIlocaledef\fP
+input data; the POSIX locale is used for this purpose, regardless
+of the value of this variable.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The utility shall report all categories successfully processed, in
+an unspecified format.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+The format of the created output is unspecified. If the \fIname\fP
+operand does not contain a slash, the existence of an output
+file for the locale is unspecified.
+.SH EXTENDED DESCRIPTION
+.LP
+When the \fB-u\fP option is used, the \fIcode_set_name\fP option-argument
+shall be interpreted as an implementation-defined
+name of a codeset to which the ISO/IEC\ 10646-1:2000 standard position
+constant values shall be converted via an
+implementation-defined method. Both the ISO/IEC\ 10646-1:2000 standard
+position constant values and other formats (decimal,
+hexadecimal, or octal) shall be valid as encoding values within the
+\fIcharmap\fP file. The codeset represented by the
+implementation-defined name can be any codeset that is supported by
+the implementation.
+.LP
+When conflicts occur between the \fIcharmap\fP specification of <\fIcode_set_name\fP>,
+<\fImb_cur_max\fP>, or
+<\fImb_cur_min\fP> and the implementation-defined interpretation of
+these respective items for the codeset represented by
+the \fB-u\fP option-argument \fIcode_set_name\fP, the result is unspecified.
+.LP
+When conflicts occur between the \fIcharmap\fP encoding values specified
+for symbolic names of characters of the portable
+character set and the implementation-defined assignment of character
+encoding values, the result is unspecified.
+.LP
+If a non-printable character in the \fIcharmap\fP has a width specified
+that is not \fB-1\fP, \fIlocaledef\fP shall generate
+a warning.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+No errors occurred and the locales were successfully created.
+.TP 7
+\ 1
+Warnings occurred and the locales were successfully created.
+.TP 7
+\ 2
+The locale specification exceeded implementation limits or the coded
+character set or sets used were not supported by the
+implementation, and no locale was created.
+.TP 7
+\ 3
+The capability to create new locales is not supported by the implementation.
+.TP 7
+>3
+Warnings or errors occurred and no output was created.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+If an error is detected, no permanent output shall be created.
+.LP
+If warnings occur, permanent output shall be created if the \fB-c\fP
+option was specified. The following conditions shall cause
+warning messages to be issued:
+.IP " *" 3
+If a symbolic name not found in the \fIcharmap\fP file is used for
+the descriptions of the \fILC_CTYPE\fP or \fILC_COLLATE\fP
+categories (for other categories, this shall be an error condition).
+.LP
+.IP " *" 3
+If the number of operands to the \fBorder\fP keyword exceeds the {COLL_WEIGHTS_MAX}
+limit.
+.LP
+.IP " *" 3
+If optional keywords not supported by the implementation are present
+in the source.
+.LP
+.IP " *" 3
+If a non-printable character has a width specified other than -1.
+.LP
+.LP
+Other implementation-defined conditions may also cause warnings.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The \fIcharmap\fP definition is optional, and is contained outside
+the locale definition. This allows both completely
+self-defined source files, and generic sources (applicable to more
+than one codeset). To aid portability, all \fIcharmap\fP
+definitions must use the same symbolic names for the portable character
+set. As explained in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 6.4, Character Set Description File,
+it
+is implementation-defined whether or not users or applications can
+provide additional character set description files. Therefore,
+the \fB-f\fP option might be operable only when an implementation-defined
+\fIcharmap\fP is named.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The output produced by the \fIlocaledef\fP utility is implementation-defined.
+The \fIname\fP operand is used to identify the
+specific locale. (As a consequence, although several categories can
+be processed in one execution, only categories belonging to the
+same locale can be processed.)
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIlocale\fP, the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Section 7.3, Locale Definition
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/logger.1p b/man-pages-posix-2003/man1p/logger.1p
new file mode 100644
index 0000000..c570289
--- /dev/null
+++ b/man-pages-posix-2003/man1p/logger.1p
@@ -0,0 +1,165 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "LOGGER" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" logger
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+logger \- log messages
+.SH SYNOPSIS
+.LP
+\fBlogger\fP \fIstring\fP \fB...\fP
+.SH DESCRIPTION
+.LP
+The \fIlogger\fP utility saves a message, in an unspecified manner
+and format, containing the \fIstring\fP operands provided
+by the user. The messages are expected to be evaluated later by personnel
+performing system administration tasks.
+.LP
+It is implementation-defined whether messages written in locales other
+than the POSIX locale are effective.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIstring\fP
+One of the string arguments whose contents are concatenated together,
+in the order specified, separated by single
+<space>s.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIlogger\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard error.
+(This means diagnostics from \fIlogger\fP to the user or application,
+not diagnostic messages that the user is sending to the
+system administrator.)
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+Unspecified.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+This utility allows logging of information for later use by a system
+administrator or programmer in determining why
+non-interactive utilities have failed. The locations of the saved
+messages, their format, and retention period are all unspecified.
+There is no method for a conforming application to read messages,
+once written.
+.SH EXAMPLES
+.LP
+A batch application, running non-interactively, tries to read a configuration
+file and fails; it may attempt to notify the
+system administrator with:
+.sp
+.RS
+.nf
+
+\fBlogger myname: unable to read file foo. [timestamp]
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+The standard developers believed strongly that some method of alerting
+administrators to errors was necessary. The obvious
+example is a batch utility, running non-interactively, that is unable
+to read its configuration files or that is unable to create
+or write its results file. However, the standard developers did not
+wish to define the format or delivery mechanisms as they have
+historically been (and will probably continue to be) very system-specific,
+as well as involving functionality clearly outside the
+scope of this volume of IEEE\ Std\ 1003.1-2001.
+.LP
+The text with \fILC_MESSAGES\fP about diagnostic messages means diagnostics
+from \fIlogger\fP to the user or application, not
+diagnostic messages that the user is sending to the system administrator.
+.LP
+Multiple \fIstring\fP arguments are allowed, similar to \fIecho\fP,
+for ease-of-use.
+.LP
+Like the utilities \fImailx\fP and \fIlp\fP,
+\fIlogger\fP is admittedly difficult to test. This was not deemed
+sufficient justification to exclude these utilities from this
+volume of IEEE\ Std\ 1003.1-2001. It is also arguable that they are,
+in fact, testable, but that the tests themselves are
+not portable.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIlp\fP, \fImailx\fP, \fIwrite\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/logname.1p b/man-pages-posix-2003/man1p/logname.1p
new file mode 100644
index 0000000..2f542fd
--- /dev/null
+++ b/man-pages-posix-2003/man1p/logname.1p
@@ -0,0 +1,134 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "LOGNAME" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" logname
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+logname \- return the user's login name
+.SH SYNOPSIS
+.LP
+\fBlogname\fP
+.SH DESCRIPTION
+.LP
+The \fIlogname\fP utility shall write the user's login name to standard
+output. The login name shall be the string that would
+be returned by the \fIgetlogin\fP() function defined in the System
+Interfaces volume of
+IEEE\ Std\ 1003.1-2001. Under the conditions where the \fIgetlogin\fP()
+function
+would fail, the \fIlogname\fP utility shall write a diagnostic message
+to standard error and exit with a non-zero exit status.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+None.
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIlogname\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The \fIlogname\fP utility output shall be a single line consisting
+of the user's login name:
+.sp
+.RS
+.nf
+
+\fB"%s\\n", <\fP\fIlogin name\fP\fB>
+\fP
+.fi
+.RE
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The \fIlogname\fP utility explicitly ignores the \fILOGNAME\fP environment
+variable because environment changes could produce
+erroneous results.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fBpasswd\fP file is not listed as required because the implementation
+may have other means of mapping login names.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIid\fP, \fIwho\fP, the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001, \fIgetlogin\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/lp.1p b/man-pages-posix-2003/man1p/lp.1p
new file mode 100644
index 0000000..e721c49
--- /dev/null
+++ b/man-pages-posix-2003/man1p/lp.1p
@@ -0,0 +1,393 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "LP" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" lp
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+lp \- send files to a printer
+.SH SYNOPSIS
+.LP
+\fBlp\fP \fB[\fP\fB-c\fP\fB][\fP\fB-d\fP \fIdest\fP\fB][\fP\fB-n\fP
+\fIcopies\fP\fB][\fP\fB-msw\fP\fB][\fP\fB-o\fP \fIoption\fP\fB]\fP\fB...\fP
+\fB[\fP\fB-t\fP
+\fItitle\fP\fB][\fP\fIfile\fP\fB...\fP\fB]\fP
+.SH DESCRIPTION
+.LP
+The \fIlp\fP utility shall copy the input files to an output destination
+in an unspecified manner. The default output
+destination should be to a hardcopy device, such as a printer or microfilm
+recorder, that produces non-volatile, human-readable
+documents. If such a device is not available to the application, or
+if the system provides no such device, the \fIlp\fP utility
+shall exit with a non-zero exit status.
+.LP
+The actual writing to the output device may occur some time after
+the \fIlp\fP utility successfully exits. During the portion
+of the writing that corresponds to each input file, the implementation
+shall guarantee exclusive access to the device.
+.LP
+The \fIlp\fP utility shall associate a unique \fIrequest ID\fP with
+each request.
+.LP
+Normally, a banner page is produced to separate and identify each
+print job. This page may be suppressed by
+implementation-defined conditions, such as an operator command or
+one of the \fB-o\fP \fIoption\fP values.
+.SH OPTIONS
+.LP
+The \fIlp\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-c\fP
+Exit only after further access to any of the input files is no longer
+required. The application can then safely delete or
+modify the files without affecting the output operation. Normally,
+files are not copied, but are linked whenever possible. If the
+\fB-c\fP option is not given, then the user should be careful not
+to remove any of the files before the request has been printed
+in its entirety. It should also be noted that in the absence of the
+\fB-c\fP option, any changes made to the named files after the
+request is made but before it is printed may be reflected in the printed
+output. On some implementations, \fB-c\fP may be on by
+default.
+.TP 7
+\fB-d\ \fP \fIdest\fP
+Specify a string that names the destination ( \fIdest\fP). If \fIdest\fP
+is a printer, the request shall be printed only on
+that specific printer. If \fIdest\fP is a class of printers, the request
+shall be printed on the first available printer that is a
+member of the class. Under certain conditions (printer unavailability,
+file space limitation, and so on), requests for specific
+destinations need not be accepted. Destination names vary between
+systems.
+.LP
+If \fB-d\fP is not specified, and neither the \fILPDEST\fP nor \fIPRINTER\fP
+environment variable is set, an unspecified
+destination is used. The \fB-d\fP \fIdest\fP option shall take precedence
+over \fILPDEST\fP, which in turn shall take
+precedence over \fIPRINTER\fP. Results are undefined when \fIdest\fP
+contains a value that is not a valid destination name.
+.TP 7
+\fB-m\fP
+Send mail (see \fImailx\fP ) after the files have been printed. By
+default, no mail is sent upon
+normal completion of the print request.
+.TP 7
+\fB-n\ \fP \fIcopies\fP
+Write \fIcopies\fP number of copies of the files, where \fIcopies\fP
+is a positive decimal integer. The methods for producing
+multiple copies and for arranging the multiple copies when multiple
+\fIfile\fP operands are used are unspecified, except that each
+file shall be output as an integral whole, not interleaved with portions
+of other files.
+.TP 7
+\fB-o\ \fP \fIoption\fP
+Specify printer-dependent or class-dependent \fIoption\fPs. Several
+such \fIoption\fPs may be collected by specifying the
+\fB-o\fP option more than once.
+.TP 7
+\fB-s\fP
+Suppress messages from \fIlp\fP.
+.TP 7
+\fB-t\ \fP \fItitle\fP
+Write \fItitle\fP on the banner page of the output.
+.TP 7
+\fB-w\fP
+Write a message on the user's terminal after the files have been printed.
+If the user is not logged in, then mail shall be sent
+instead.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of a file to be output. If no \fIfile\fP operands are specified,
+or if a \fIfile\fP operand is \fB'-'\fP, the
+standard input shall be used. If a \fIfile\fP operand is used, but
+the \fB-c\fP option is not specified, the process performing
+the writing to the output device may have user and group permissions
+that differ from that of the process invoking \fIlp\fP.
+.sp
+.SH STDIN
+.LP
+The standard input shall be used only if no \fIfile\fP operands are
+specified, or if a \fIfile\fP operand is \fB'-'\fP .
+See the INPUT FILES section.
+.SH INPUT FILES
+.LP
+The input files shall be text files.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIlp\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard error and
+informative messages written to standard output.
+.TP 7
+\fILC_TIME\fP
+Determine the format and contents of date and time strings displayed
+in the \fIlp\fP banner page, if any.
+.TP 7
+\fILPDEST\fP
+Determine the destination. If the \fILPDEST\fP environment variable
+is not set, the \fIPRINTER\fP environment variable shall
+be used. The \fB-d\fP \fIdest\fP option takes precedence over \fILPDEST
+\&.\fP Results are undefined when \fB-d\fP is not
+specified and \fILPDEST\fP contains a value that is not a valid destination
+name.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fIPRINTER\fP
+Determine the output device or destination. If the \fILPDEST\fP and
+\fIPRINTER\fP environment variables are not set, an
+unspecified output device is used. The \fB-d\fP \fIdest\fP option
+and the \fILPDEST\fP environment variable shall take
+precedence over \fIPRINTER\fP. Results are undefined when \fB-d\fP
+is not specified, \fILPDEST\fP is unset, and \fIPRINTER\fP
+contains a value that is not a valid device or destination name.
+.TP 7
+\fITZ\fP
+Determine the timezone used to calculate date and time strings displayed
+in the \fIlp\fP banner page, if any. If \fITZ\fP is
+unset or null, an unspecified default timezone shall be used.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The \fIlp\fP utility shall write a \fIrequest ID\fP to the standard
+output, unless \fB-s\fP is specified. The format of the
+message is unspecified. The request ID can be used on systems supporting
+the historical \fIcancel\fP and \fIlpstat\fP
+utilities.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+All input files were processed successfully.
+.TP 7
+>0
+No output device was available, or an error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The \fIpr\fP and \fIfold\fP utilities can be used to
+achieve reasonable formatting for the implementation's default page
+size.
+.LP
+A conforming application can use one of the \fIfile\fP operands only
+with the \fB-c\fP option or if the file is publicly
+readable and guaranteed to be available at the time of printing. This
+is because IEEE\ Std\ 1003.1-2001 gives the
+implementation the freedom to queue up the request for printing at
+some later time by a different process that might not be able to
+access the file.
+.SH EXAMPLES
+.IP " 1." 4
+To print file \fIfile\fP:
+.sp
+.RS
+.nf
+
+\fBlp -c\fP \fIfile\fP
+.fi
+.RE
+.LP
+.IP " 2." 4
+To print multiple files with headers:
+.sp
+.RS
+.nf
+
+\fBpr\fP \fIfile1 file2\fP \fB| lp
+\fP
+.fi
+.RE
+.LP
+.SH RATIONALE
+.LP
+The \fIlp\fP utility was designed to be a basic version of a utility
+that is already available in many historical
+implementations. The standard developers considered that it should
+be implementable simply as:
+.sp
+.RS
+.nf
+
+\fBcat "$@" > /dev/lp
+\fP
+.fi
+.RE
+.LP
+after appropriate processing of options, if that is how the implementation
+chose to do it and if exclusive access could be
+granted (so that two users did not write to the device simultaneously).
+Although in the future the standard developers may add
+other options to this utility, it should always be able to execute
+with no options or operands and send the standard input to an
+unspecified output device.
+.LP
+This volume of IEEE\ Std\ 1003.1-2001 makes no representations concerning
+the format of the printed output, except that
+it must be "human-readable" and "non-volatile". Thus, writing by default
+to a disk or tape drive or a display terminal would
+not qualify. (Such destinations are not prohibited when \fB-d\fP \fIdest\fP,
+\fILPDEST\fP, or \fIPRINTER\fP are used,
+however.)
+.LP
+This volume of IEEE\ Std\ 1003.1-2001 is worded such that a "print
+job" consisting of multiple input files, possibly
+in multiple copies, is guaranteed to print so that any one file is
+not intermixed with another, but there is no statement that all
+the files or copies have to print out together.
+.LP
+The \fB-c\fP option may imply a spooling operation, but this is not
+required. The utility can be implemented to wait until the
+printer is ready and then wait until it is finished. Because of that,
+there is no attempt to define a queuing mechanism
+(priorities, classes of output, and so on).
+.LP
+On some historical systems, the request ID reported on the STDOUT
+can be used to later cancel or find the status of a request
+using utilities not defined in this volume of IEEE\ Std\ 1003.1-2001.
+.LP
+Although the historical System V \fIlp\fP and BSD \fIlpr\fP utilities
+have provided similar functionality, they used different
+names for the environment variable specifying the destination printer.
+Since the name of the utility here is \fIlp\fP,
+\fILPDEST\fP (used by the System V \fIlp\fP utility) was given precedence
+over \fIPRINTER\fP (used by the BSD \fIlpr\fP
+utility). Since environments of users frequently contain one or the
+other environment variable, the \fIlp\fP utility is required
+to recognize both. If this was not done, many applications would send
+output to unexpected output devices when users moved from
+system to system.
+.LP
+Some have commented that \fIlp\fP has far too little functionality
+to make it worthwhile. Requests have proposed additional
+options or operands or both that added functionality. The requests
+included:
+.IP " *" 3
+Wording \fIrequiring\fP the output to be "hardcopy"
+.LP
+.IP " *" 3
+A requirement for multiple printers
+.LP
+.IP " *" 3
+Options for supporting various page-description languages
+.LP
+.LP
+Given that a compliant system is not required to even have a printer,
+placing further restrictions upon the behavior of the
+printer is not useful. Since hardcopy format is so application-dependent,
+it is difficult, if not impossible, to select a
+reasonable subset of functionality that should be required on all
+compliant systems.
+.LP
+The term \fIunspecified\fP is used in this section in lieu of \fIimplementation-defined\fP
+as most known implementations would
+not be able to make definitive statements in their conformance documents;
+the existence and usage of printers is very dependent on
+how the system administrator configures each individual system.
+.LP
+Since the default destination, device type, queuing mechanisms, and
+acceptable forms of input are all unspecified, usage
+guidelines for what a conforming application can do are as follows:
+.IP " *" 3
+Use the command in a pipeline, or with \fB-c\fP, so that there are
+no permission problems and the files can be safely deleted
+or modified.
+.LP
+.IP " *" 3
+Limit output to text files of reasonable line lengths and printable
+characters and include no device-specific formatting
+information, such as a page description language. The meaning of "reasonable"
+in this context can only be answered as a
+quality-of-implementation issue, but it should be apparent from historical
+usage patterns in the industry and the locale. The \fIpr\fP and \fIfold\fP
+utilities can be used to achieve
+reasonable formatting for the default page size of the implementation.
+.LP
+.LP
+Alternatively, the application can arrange its installation in such
+a way that it requires the system administrator or operator
+to provide the appropriate information on \fIlp\fP options and environment
+variable values.
+.LP
+At a minimum, having this utility in this volume of IEEE\ Std\ 1003.1-2001
+tells the industry that conforming
+applications require a means to print output and provides at least
+a command name and \fILPDEST\fP routing mechanism that can be
+used for discussions between vendors, application writers, and users.
+The use of "should" in the DESCRIPTION of \fIlp\fP clearly
+shows the intent of the standard developers, even if they cannot mandate
+that all systems (such as laptops) have printers.
+.LP
+This volume of IEEE\ Std\ 1003.1-2001 does not specify what the ownership
+of the process performing the writing to the
+output device may be. If \fB-c\fP is not used, it is unspecified whether
+the process performing the writing to the output device
+has permission to read \fIfile\fP if there are any restrictions in
+place on who may read \fIfile\fP until after it is printed.
+Also, if \fB-c\fP is not used, the results of deleting \fIfile\fP
+before it is printed are unspecified.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fImailx\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/ls.1p b/man-pages-posix-2003/man1p/ls.1p
new file mode 100644
index 0000000..88b075b
--- /dev/null
+++ b/man-pages-posix-2003/man1p/ls.1p
@@ -0,0 +1,742 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "LS" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ls
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ls \- list directory contents
+.SH SYNOPSIS
+.LP
+\fBls\fP \fB[\fP\fB-CFRacdilqrtu1\fP\fB][\fP\fB-H | -L\fP
+\fB][\fP\fB-fgmnopsx\fP\fB][\fP\fIfile\fP\fB...\fP\fB]\fP
+.SH DESCRIPTION
+.LP
+For each operand that names a file of a type other than directory
+or symbolic link to a directory, \fIls\fP shall write the
+name of the file as well as any requested, associated information.
+For each operand that names a file of type directory, \fIls\fP
+shall write the names of files contained within the directory as well
+as any requested, associated information. If one of the
+\fB-d\fP, \fB-F\fP, or \fB-l\fP options are specified, and one of
+the \fB-H\fP or \fB-L\fP options are not specified, for each
+operand that names a file of type symbolic link to a directory, \fIls\fP
+shall write the name of the file as well as any
+requested, associated information. If none of the \fB-d\fP, \fB-F\fP,
+or \fB-l\fP options are specified, or the \fB-H\fP or
+\fB-L\fP options are specified, for each operand that names a file
+of type symbolic link to a directory, \fIls\fP shall write the
+names of files contained within the directory as well as any requested,
+associated information.
+.LP
+If no operands are specified, \fIls\fP shall write the contents of
+the current directory. If more than one operand is
+specified, \fIls\fP shall write non-directory operands first; it shall
+sort directory and non-directory operands separately
+according to the collating sequence in the current locale.
+.LP
+The \fIls\fP utility shall detect infinite loops; that is, entering
+a previously visited directory that is an ancestor of the
+last file encountered. When it detects an infinite loop, \fIls\fP
+shall write a diagnostic message to standard error and shall
+either recover its position in the hierarchy or terminate.
+.SH OPTIONS
+.LP
+The \fIls\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-C\fP
+Write multi-text-column output with entries sorted down the columns,
+according to the collating sequence. The number of text
+columns and the column separator characters are unspecified, but should
+be adapted to the nature of the output device.
+.TP 7
+\fB-F\fP
+Do not follow symbolic links named as operands unless the \fB-H\fP
+or \fB-L\fP options are specified. Write a slash (
+\fB'/'\fP ) immediately after each pathname that is a directory, an
+asterisk ( \fB'*'\fP ) after each that is executable, a
+vertical bar ( \fB'|'\fP ) after each that is a FIFO, and an at sign
+( \fB'@'\fP ) after each that is a symbolic link. For
+other file types, other symbols may be written.
+.TP 7
+\fB-H\fP
+If a symbolic link referencing a file of type directory is specified
+on the command line, \fIls\fP shall evaluate the file
+information and file type to be those of the file referenced by the
+link, and not the link itself; however, \fIls\fP shall write
+the name of the link itself and not the file referenced by the link.
+.TP 7
+\fB-L\fP
+Evaluate the file information and file type for all symbolic links
+(whether named on the command line or encountered in a file
+hierarchy) to be those of the file referenced by the link, and not
+the link itself; however, \fIls\fP shall write the name of the
+link itself and not the file referenced by the link. When \fB-L\fP
+is used with \fB-l\fP, write the contents of symbolic links in
+the long format (see the STDOUT section).
+.TP 7
+\fB-R\fP
+Recursively list subdirectories encountered.
+.TP 7
+\fB-a\fP
+Write out all directory entries, including those whose names begin
+with a period ( \fB'.'\fP ). Entries beginning with a
+period shall not be written out unless explicitly referenced, the
+\fB-a\fP option is supplied, or an implementation-defined
+condition shall cause them to be written.
+.TP 7
+\fB-c\fP
+Use time of last modification of the file status information (see
+\fI<sys/stat.h>\fP in the System Interfaces volume of IEEE\ Std\ 1003.1-2001)
+instead of last modification of the file itself for sorting ( \fB-t\fP)
+or writing ( \fB-l\fP).
+.TP 7
+\fB-d\fP
+Do not follow symbolic links named as operands unless the \fB-H\fP
+or \fB-L\fP options are specified. Do not treat
+directories differently than other types of files. The use of \fB-d\fP
+with \fB-R\fP produces unspecified results.
+.TP 7
+\fB-f\fP
+Force each argument to be interpreted as a directory and list the
+name found in each slot. This option shall turn off \fB-l\fP,
+\fB-t\fP, \fB-s\fP, and \fB-r\fP, and shall turn on \fB-a\fP; the
+order is the order in which entries appear in the directory.
+.TP 7
+\fB-g\fP
+The same as \fB-l\fP, except that the owner shall not be written.
+.TP 7
+\fB-i\fP
+For each file, write the file's file serial number (see \fIstat\fP()
+in the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001).
+.TP 7
+\fB-l\fP
+(The letter ell.) Do not follow symbolic links named as operands unless
+the \fB-H\fP or \fB-L\fP options are specified. Write
+out in long format (see the STDOUT section). When \fB-l\fP (ell) is
+specified, -1 (one) shall be assumed.
+.TP 7
+\fB-m\fP
+Stream output format; list files across the page, separated by commas.
+.TP 7
+\fB-n\fP
+The same as \fB-l\fP, except that the owner's UID and GID numbers
+shall be written, rather than the associated character strings.
+.TP 7
+\fB-o\fP
+The same as \fB-l\fP, except that the group shall not be written.
+.TP 7
+\fB-p\fP
+Write a slash ( \fB'/'\fP ) after each filename if that file is a
+directory.
+.TP 7
+\fB-q\fP
+Force each instance of non-printable filename characters and <tab>s
+to be written as the question-mark ( \fB'?'\fP )
+character. Implementations may provide this option by default if the
+output is to a terminal device.
+.TP 7
+\fB-r\fP
+Reverse the order of the sort to get reverse collating sequence or
+oldest first.
+.TP 7
+\fB-s\fP
+Indicate the total number of file system blocks consumed by each file
+displayed. The block size is implementation-defined.
+.TP 7
+\fB-t\fP
+Sort with the primary key being time modified (most recently modified
+first) and the secondary key being filename in the
+collating sequence.
+.TP 7
+\fB-u\fP
+Use time of last access (see \fI<sys/stat.h>\fP) instead of last modification
+of the file for sorting ( \fB-t\fP) or writing ( \fB-l\fP).
+.TP 7
+\fB-x\fP
+The same as \fB-C\fP, except that the multi-text-column output is
+produced with entries sorted across, rather than down, the
+columns.
+.TP 7
+\fB-1\fP
+(The numeric digit one.) Force output to be one entry per line.
+.sp
+.LP
+Specifying more than one of the options in the following mutually-exclusive
+pairs shall not be considered an error: \fB-C\fP
+and \fB-l\fP (ell), \fB-m\fP and \fB-l\fP (ell), \fB-x\fP and \fB-l\fP
+(ell), \fB-C\fP and \fB-1\fP (one), \fB-H\fP and \fB-L\fP, \fB-c\fP
+and \fB-u\fP. The last option
+specified in each pair shall determine the output format.
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of a file to be written. If the file specified is not found,
+a diagnostic message shall be output on standard
+error.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIls\fP:
+.TP 7
+\fICOLUMNS\fP
+Determine the user's preferred column position width for writing multiple
+text-column output. If this variable contains a
+string representing a decimal integer, the \fIls\fP utility shall
+calculate how many pathname text columns to write (see
+\fB-C\fP) based on the width provided. If \fICOLUMNS\fP is not set
+or invalid, an implementation-defined number of column
+positions shall be assumed, based on the implementation's knowledge
+of the output device. The column width chosen to write the
+names of files in any given directory shall be constant. Filenames
+shall not be truncated to fit into the multiple text-column
+output.
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_COLLATE\fP
+.sp
+Determine the locale for character collation information in determining
+the pathname collation sequence.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments) and which characters
+are defined as printable (character class \fBprint\fP).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fILC_TIME\fP
+Determine the format and contents for date and time strings written
+by \fIls\fP.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fITZ\fP
+Determine the timezone for date and time strings written by \fIls\fP.
+If \fITZ\fP is unset or null, an unspecified default
+timezone shall be used.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The default format shall be to list one entry per line to standard
+output; the exceptions are to terminals or when one of the
+\fB-C\fP, \fB-m\fP, or \fB-x\fP options is specified. If the
+output is to a terminal, the format is implementation-defined.
+.LP
+When \fB-m\fP is specified, the format used shall be:
+.sp
+.RS
+.nf
+
+\fB"%s, %s, ...\\n", <\fP\fIfilename1\fP\fB>, <\fP\fIfilename2\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where the largest number of filenames shall be written without exceeding
+the length of the line.
+.LP
+If the \fB-i\fP option is specified, the file's file serial number
+(see \fI<sys/stat.h>\fP) shall be written in the following format
+before any other output for
+the corresponding entry:
+.sp
+.RS
+.nf
+
+\fB%u ", <\fP\fIfile serial number\fP\fB>
+\fP
+.fi
+.RE
+.LP
+If the \fB-l\fP option is specified without \fB-L\fP, the following
+information shall be written:
+.sp
+.RS
+.nf
+
+\fB"%s %u %s %s %u %s %s\\n", <\fP\fIfile mode\fP\fB>, <\fP\fInumber of links\fP\fB>,
+ <\fP\fIowner name\fP\fB>, <\fP\fIgroup name\fP\fB>, <\fP\fInumber of bytes in the file\fP\fB>,
+ <\fP\fIdate and time\fP\fB>, <\fP\fIpathname\fP\fB>
+\fP
+.fi
+.RE
+.LP
+If the file is a symbolic link, this information shall be about the
+link itself and the <\fIpathname\fP> field shall be
+of the form:
+.sp
+.RS
+.nf
+
+\fB"%s -> %s", <\fP\fIpathname of link\fP\fB>, <\fP\fIcontents of link\fP\fB>
+\fP
+.fi
+.RE
+.LP
+If both \fB-l\fP and \fB-L\fP are specified, the following information
+shall be written:
+.sp
+.RS
+.nf
+
+\fB"%s %u %s %s %u %s %s\\n", <\fP\fIfile mode\fP\fB>, <\fP\fInumber of links\fP\fB>,
+ <\fP\fIowner name\fP\fB>, <\fP\fIgroup name\fP\fB>, <\fP\fInumber of bytes in the file\fP\fB>,
+ <\fP\fIdate and time\fP\fB>, <\fP\fIpathname of link\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where all fields except <\fIpathname of link\fP> shall be for the
+file resolved from the symbolic link.
+.LP
+The \fB-g\fP, \fB-n\fP, and \fB-o\fP options use the same format as
+\fB-l\fP, but with omitted items and their associated
+<blank>s. See the OPTIONS section.
+.LP
+In both the preceding \fB-l\fP forms, if <\fIowner name\fP> or <\fIgroup
+name\fP> cannot be determined, or if
+\fB-n\fP is given, they shall be replaced with their associated
+numeric values using the format \fB%u\fP .
+.LP
+The <\fIdate\ and\ time\fP> field shall contain the appropriate date
+and timestamp of when the file was last
+modified. In the POSIX locale, the field shall be the equivalent of
+the output of the following \fIdate\fP command:
+.sp
+.RS
+.nf
+
+\fBdate "+%b %e %H:%M"
+\fP
+.fi
+.RE
+.LP
+if the file has been modified in the last six months, or:
+.sp
+.RS
+.nf
+
+\fBdate "+%b %e %Y"
+\fP
+.fi
+.RE
+.LP
+(where two <space>s are used between \fB%e\fP and \fB%Y\fP ) if the
+file has not been modified in the last six
+months or if the modification date is in the future, except that,
+in both cases, the final <newline> produced by \fIdate\fP shall not
+be included and the output shall be as if the \fIdate\fP command were
+executed at the time of the last modification date of the file rather
+than
+the current time. When the \fILC_TIME\fP locale category is not set
+to the POSIX locale, a different format and order of
+presentation of this field may be used.
+.LP
+If the file is a character special or block special file, the size
+of the file may be replaced with implementation-defined
+information associated with the device in question.
+.LP
+If the pathname was specified as a \fIfile\fP operand, it shall be
+written as specified.
+.LP
+The file mode written under the \fB-l\fP, \fB-g\fP, \fB-n\fP, and
+\fB-o\fP options shall consist of the following format:
+.sp
+.RS
+.nf
+
+\fB"%c%s%s%s%c", <\fP\fIentry type\fP\fB>, <\fP\fIowner permissions\fP\fB>,
+ <\fP\fIgroup permissions\fP\fB>, <\fP\fIother permissions\fP\fB>,
+ <\fP\fIoptional alternate access method flag\fP\fB>
+\fP
+.fi
+.RE
+.LP
+The <\fIoptional\ alternate\ access\ method\ flag\fP> shall be a single
+<space> if there is no
+alternate or additional access control method associated with the
+file; otherwise, a printable character shall be used.
+.LP
+The <\fIentry\ type\fP> character shall describe the type of file,
+as follows:
+.TP 7
+\fBd\fP
+Directory.
+.TP 7
+\fBb\fP
+Block special file.
+.TP 7
+\fBc\fP
+Character special file.
+.TP 7
+\fBl\fP\ (ell)
+Symbolic link.
+.TP 7
+\fBp\fP
+FIFO.
+.TP 7
+\fB-\fP
+Regular file.
+.sp
+.LP
+Implementations may add other characters to this list to represent
+other implementation-defined file types.
+.LP
+The next three fields shall be three characters each:
+.TP 7
+<\fIowner permissions\fP>
+.sp
+Permissions for the file owner class (see the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 4.4, File Access Permissions).
+.TP 7
+<\fIgroup permissions\fP>
+.sp
+Permissions for the file group class.
+.TP 7
+<\fIother permissions\fP>
+.sp
+Permissions for the file other class.
+.sp
+.LP
+Each field shall have three character positions:
+.IP " 1." 4
+If \fB'r'\fP, the file is readable; if \fB'-'\fP, the file is not
+readable.
+.LP
+.IP " 2." 4
+If \fB'w'\fP, the file is writable; if \fB'-'\fP, the file is not
+writable.
+.LP
+.IP " 3." 4
+The first of the following that applies:
+.TP 7
+\fBS\fP
+.RS
+If in <\fIowner\ permissions\fP>, the file is not executable and set-user-ID
+mode is set. If in
+<\fIgroup\ permissions\fP>, the file is not executable and set-group-ID
+mode is set.
+.RE
+.TP 7
+\fBs\fP
+.RS
+If in <\fIowner\ permissions\fP>, the file is executable and set-user-ID
+mode is set. If in
+<\fIgroup\ permissions\fP>, the file is executable and set-group-ID
+mode is set.
+.RE
+.TP 7
+\fBT\fP
+.RS
+If in <\fIother\ permissions\fP> and the file is a directory, search
+permission is not granted to others, and the
+restricted deletion flag is set.
+.RE
+.TP 7
+\fBt\fP
+.RS
+If in <\fIother\ permissions\fP> and the file is a directory, search
+permission is granted to others, and the restricted
+deletion flag is set.
+.RE
+.TP 7
+\fBx\fP
+.RS
+The file is executable or the directory is searchable.
+.RE
+.TP 7
+\fB-\fP
+.RS
+None of the attributes of \fB'S'\fP, \fB's'\fP, \fB'T'\fP, \fB't'\fP,
+or \fB'x'\fP applies.
+.RE
+.sp
+.LP
+Implementations may add other characters to this list for the third
+character position. Such additions shall, however, be
+written in lowercase if the file is executable or searchable, and
+in uppercase if it is not.
+.LP
+.LP
+If any of the \fB-l\fP, \fB-g\fP, \fB-n\fP, \fB-o\fP, or \fB-s\fP
+options is specified, each list of files within the directory shall
+be preceded by a status line indicating the number
+of file system blocks occupied by files in the directory in 512-byte
+units, rounded up to the next integral number of units, if
+necessary. In the POSIX locale, the format shall be:
+.sp
+.RS
+.nf
+
+\fB"total %u\\n", <\fP\fInumber of units in the directory\fP\fB>
+\fP
+.fi
+.RE
+.LP
+If more than one directory, or a combination of non-directory files
+and directories are written, either as a result of
+specifying multiple operands, or the \fB-R\fP option, each list of
+files within a directory shall be preceded by:
+.sp
+.RS
+.nf
+
+\fB"\\n%s:\\n", <\fP\fIdirectory name\fP\fB>
+\fP
+.fi
+.RE
+.LP
+If this string is the first thing to be written, the first <newline>
+shall not be written. This output shall precede the
+number of units in the directory.
+.LP
+If the \fB-s\fP option is given, each file shall be written with the
+number of blocks used by the file. Along with \fB-C\fP,
+\fB-1\fP, \fB-m\fP, or \fB-x\fP, the number and a <space> shall precede
+the filename; with \fB-g\fP, \fB-l\fP,
+\fB-n\fP, or \fB-o\fP, they shall precede each line describing a file.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Many implementations use the equal sign ( \fB'='\fP ) to denote sockets
+bound to the file system for the \fB-F\fP option.
+Similarly, many historical implementations use the \fB's'\fP character
+to denote sockets as the entry type characters for the
+\fB-l\fP option.
+.LP
+It is difficult for an application to use every part of the file modes
+field of \fIls\fP \fB-l\fP in a portable manner.
+Certain file types and executable bits are not guaranteed to be exactly
+as shown, as implementations may have extensions.
+Applications can use this field to pass directly to a user printout
+or prompt, but actions based on its contents should generally
+be deferred, instead, to the \fItest\fP utility.
+.LP
+The output of \fIls\fP (with the \fB-l\fP and related options) contains
+information that logically could be used by utilities
+such as \fIchmod\fP and \fItouch\fP to restore files
+to a known state. However, this information is presented in a format
+that cannot be used directly by those utilities or be easily
+translated into a format that can be used. A character has been added
+to the end of the permissions string so that applications at
+least have an indication that they may be working in an area they
+do not understand instead of assuming that they can translate the
+permissions string into something that can be used. Future issues
+or related documents may define one or more specific characters
+to be used based on different standard additional or alternative access
+control mechanisms.
+.LP
+As with many of the utilities that deal with filenames, the output
+of \fIls\fP for multiple files or in one of the long listing
+formats must be used carefully on systems where filenames can contain
+embedded white space. Systems and system administrators
+should institute policies and user training to limit the use of such
+filenames.
+.LP
+The number of disk blocks occupied by the file that it reports varies
+depending on underlying file system type, block size units
+reported, and the method of calculating the number of blocks. On some
+file system types, the number is the actual number of blocks
+occupied by the file (counting indirect blocks and ignoring holes
+in the file); on others it is calculated based on the file size
+(usually making an allowance for indirect blocks, but ignoring holes).
+.SH EXAMPLES
+.LP
+An example of a small directory tree being fully listed with \fIls\fP
+\fB-laRF\ a\fP in the POSIX locale:
+.sp
+.RS
+.nf
+
+\fBtotal 11
+drwxr-xr-x 3 hlj prog 64 Jul 4 12:07 ./
+drwxrwxrwx 4 hlj prog 3264 Jul 4 12:09 ../
+drwxr-xr-x 2 hlj prog 48 Jul 4 12:07 b/
+-rwxr--r-- 1 hlj prog 572 Jul 4 12:07 foo*
+.sp
+
+a/b:
+total 4
+drwxr-xr-x 2 hlj prog 48 Jul 4 12:07 ./
+drwxr-xr-x 3 hlj prog 64 Jul 4 12:07 ../
+-rw-r--r-- 1 hlj prog 700 Jul 4 12:07 bar
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+Some historical implementations of the \fIls\fP utility show all entries
+in a directory except dot and dot-dot when a superuser
+invokes \fIls\fP without specifying the \fB-a\fP option. When "normal"
+users invoke \fIls\fP without specifying \fB-a\fP,
+they should not see information about any files with names beginning
+with a period unless they were named as \fIfile\fP
+operands.
+.LP
+Implementations are expected to traverse arbitrary depths when processing
+the \fB-R\fP option. The only limitation on depth
+should be based on running out of physical storage for keeping track
+of untraversed directories.
+.LP
+The \fB-1\fP (one) option was historically found in BSD and BSD-derived
+implementations only. It is required in this volume of
+IEEE\ Std\ 1003.1-2001 so that conforming applications might ensure
+that output is one entry per line, even if the output
+is to a terminal.
+.LP
+Generally, this volume of IEEE\ Std\ 1003.1-2001 is silent about what
+happens when options are given multiple times. In
+the cases of \fB-C\fP, \fB-l\fP, and \fB-1\fP, however, it does specify
+the results of these overlapping options. Since
+\fIls\fP is one of the most aliased commands, it is important that
+the implementation perform intuitively. For example, if the
+alias were:
+.sp
+.RS
+.nf
+
+\fBalias ls="ls -C"
+\fP
+.fi
+.RE
+.LP
+and the user typed \fIls\fP \fB-1\fP, single-text-column output should
+result, not an error.
+.LP
+The BSD \fIls\fP provides a \fB-A\fP option (like \fB-a\fP, but dot
+and dot-dot are not written out). The small difference
+from \fB-a\fP did not seem important enough to require both.
+.LP
+Implementations may make \fB-q\fP the default for terminals to prevent
+trojan horse attacks on terminals with special escape
+sequences. This is not required because:
+.IP " *" 3
+Some control characters may be useful on some terminals; for example,
+a system might write them as \fB"\\001"\fP or
+\fB"^A"\fP .
+.LP
+.IP " *" 3
+Special behavior for terminals is not relevant to applications portability.
+.LP
+.LP
+An early proposal specified that the optional alternate access method
+flag had to be \fB'+'\fP if there was an alternate
+access method used on the file or <space> if there was not. This was
+changed to be <space> if there is not and a single
+printable character if there is. This was done for three reasons:
+.IP " 1." 4
+There are historical implementations using characters other than \fB'+'\fP
+\&.
+.LP
+.IP " 2." 4
+There are implementations that vary this character used in that position
+to distinguish between various alternate access methods
+in use.
+.LP
+.IP " 3." 4
+The standard developers did not want to preclude future specifications
+that might need a way to specify more than one alternate
+access method.
+.LP
+.LP
+Nonetheless, implementations providing a single alternate access method
+are encouraged to use \fB'+'\fP .
+.LP
+In an early proposal, the units used to specify the number of blocks
+occupied by files in a directory in an \fIls\fP \fB-l\fP
+listing were implementation-defined. This was because BSD systems
+have historically used 1024-byte units and System V systems have
+historically used 512-byte units. It was pointed out by BSD developers
+that their system has used 512-byte units in some places and
+1024-byte units in other places. (System V has consistently used 512.)
+Therefore, this volume of IEEE\ Std\ 1003.1-2001
+usually specifies 512. Future releases of BSD are expected to consistently
+provide 512 bytes as a default with a way of specifying
+1024-byte units where appropriate.
+.LP
+The <\fIdate\ and\ time\fP> field in the \fB-l\fP format is specified
+only for the POSIX locale. As noted, the
+format can be different in other locales. No mechanism for defining
+this is present in this volume of
+IEEE\ Std\ 1003.1-2001, as the appropriate vehicle is a messaging
+system; that is, the format should be specified as a
+"message".
+.SH FUTURE DIRECTIONS
+.LP
+The \fB-s\fP uses implementation-defined units and cannot be used
+portably; it may be withdrawn in a future version.
+.SH SEE ALSO
+.LP
+\fIchmod\fP(), \fIfind\fP, the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001, \fIstat\fP(), the Base Definitions volume
+of
+IEEE\ Std\ 1003.1-2001, \fI<sys/stat.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/m4.1p b/man-pages-posix-2003/man1p/m4.1p
new file mode 100644
index 0000000..992756d
--- /dev/null
+++ b/man-pages-posix-2003/man1p/m4.1p
@@ -0,0 +1,561 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "M4" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" m4
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+m4 \- macro processor (\fBDEVELOPMENT\fP)
+.SH SYNOPSIS
+.LP
+\fBm4\fP \fB[\fP\fB-s\fP\fB][\fP\fB-D\fP
+\fIname\fP\fB[\fP\fB=\fP\fIval\fP\fB]]\fP\fB...\fP\fB[\fP\fB-U\fP
+\fIname\fP\fB]\fP\fB...\fP \fIfile\fP\fB...
+\fP
+.SH DESCRIPTION
+.LP
+The \fIm4\fP utility is a macro processor that shall read one or more
+text files, process them according to their included
+macro statements, and write the results to standard output.
+.SH OPTIONS
+.LP
+The \fIm4\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines,
+except that the order of the \fB-D\fP and
+\fB-U\fP options shall be significant.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-s\fP
+Enable line synchronization output for the \fIc99\fP preprocessor
+phase (that is,
+\fB#line\fP directives).
+.TP 7
+\fB-D\ \fP \fIname\fP\fB[\fP=\fIval\fP\fB]\fP
+.sp
+Define \fIname\fP to \fIval\fP or to null if = \fIval\fP is omitted.
+.TP 7
+\fB-U\ \fP \fIname\fP
+Undefine \fIname\fP.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of a text file to be processed. If no \fIfile\fP is given,
+or if it is \fB'-'\fP, the standard input shall be
+read.
+.sp
+.SH STDIN
+.LP
+The standard input shall be a text file that is used if no \fIfile\fP
+operand is given, or if it is \fB'-'\fP .
+.SH INPUT FILES
+.LP
+The input file named by the \fIfile\fP operand shall be a text file.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIm4\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The standard output shall be the same as the input files, after being
+processed for macro expansion.
+.SH STDERR
+.LP
+The standard error shall be used to display strings with the \fBerrprint\fP
+macro, macro tracing enabled by the \fBtraceon\fP
+macro, the defined text for macros written by the \fBdumpdef\fP macro,
+or for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+The \fIm4\fP utility shall compare each token from the input against
+the set of built-in and user-defined macros. If the token
+matches the name of a macro, then the token shall be replaced by the
+macro's defining text, if any, and rescanned for matching
+macro names. Once no portion of the token matches the name of a macro,
+it shall be written to standard output. Macros may have
+arguments, in which case the arguments shall be substituted into the
+defining text before it is rescanned.
+.LP
+Macro calls have the form:
+.sp
+.RS
+.nf
+
+\fIname\fP\fB(\fP\fIarg1\fP\fB,\fP \fIarg2\fP\fB, ...,\fP \fIargn\fP\fB)
+\fP
+.fi
+.RE
+.LP
+Macro names shall consist of letters, digits, and underscores, where
+the first character is not a digit. Tokens not of this form
+shall not be treated as macros.
+.LP
+The application shall ensure that the left parenthesis immediately
+follows the name of the macro. If a token matching the name
+of a macro is not followed by a left parenthesis, it is handled as
+a use of that macro without arguments.
+.LP
+If a macro name is followed by a left parenthesis, its arguments are
+the comma-separated tokens between the left parenthesis and
+the matching right parenthesis. Unquoted <blank>s and <newline>s preceding
+each argument shall be ignored. All other
+characters, including trailing <blank>s and <newline>s, are retained.
+Commas enclosed between left and right
+parenthesis characters do not delimit arguments.
+.LP
+Arguments are positionally defined and referenced. The string \fB"$1"\fP
+in the defining text shall be replaced by the first
+argument. Systems shall support at least nine arguments; only the
+first nine can be referenced, using the strings \fB"$1"\fP to
+\fB"$9"\fP, inclusive. The string \fB"$0"\fP is replaced with the
+name of the macro. The string \fB"$#"\fP is replaced by
+the number of arguments as a string. The string \fB"$*"\fP is replaced
+by a list of all of the arguments, separated by commas.
+The string \fB"$@"\fP is replaced by a list of all of the arguments
+separated by commas, and each argument is quoted using the
+current left and right quoting strings.
+.LP
+If fewer arguments are supplied than are in the macro definition,
+the omitted arguments are taken to be null. It is not an error
+if more arguments are supplied than are in the macro definition.
+.LP
+No special meaning is given to any characters enclosed between matching
+left and right quoting strings, but the quoting strings
+are themselves discarded. By default, the left quoting string consists
+of a grave accent ( \fB'`'\fP ) and the right quoting
+string consists of an acute accent ( \fB'"\fP ); see also the \fBchangequote\fP
+macro.
+.LP
+Comments are written but not scanned for matching macro names; by
+default, the begin-comment string consists of the number sign
+character and the end-comment string consists of a <newline>. See
+also the \fBchangecom\fP and \fBdnl\fP macros.
+.LP
+The \fIm4\fP utility shall make available the following built-in macros.
+They can be redefined, but once this is done the
+original meaning is lost. Their values shall be null unless otherwise
+stated. In the descriptions below, the term \fIdefining
+text\fP refers to the value of the macro: the second argument to the
+\fBdefine\fP macro, among other things. Except for the first
+argument to the \fBeval\fP macro, all numeric arguments to built-in
+macros shall be interpreted as decimal values. The string
+values produced as the defining text of the \fBdecr\fP, \fBdivnum\fP,
+\fBincr\fP, \fBindex\fP, \fBlen\fP, and \fBsysval\fP
+built-in macros shall be in the form of a decimal-constant as defined
+in the C language.
+.TP 7
+\fBchangecom\fP
+The \fBchangecom\fP macro shall set the begin-comment and end-comment
+strings. With no arguments, the comment mechanism shall
+be disabled. With a single argument, that argument shall become the
+begin-comment string and the <newline> shall become the
+end-comment string. With two arguments, the first argument shall become
+the begin-comment string and the second argument shall
+become the end-comment string. Systems shall support comment strings
+of at least five characters.
+.TP 7
+\fBchangequote\fP
+The \fBchangequote\fP macro shall set the begin-quote and end-quote
+strings. With no arguments, the quote strings shall be set
+to the default values (that is, \fB`'\fP). With a single argument,
+that argument shall become the begin-quote string and the
+<newline> shall become the end-quote string. With two arguments, the
+first argument shall become the begin-quote string and
+the second argument shall become the end-quote string. Systems shall
+support quote strings of at least five characters.
+.TP 7
+\fBdecr\fP
+The defining text of the \fBdecr\fP macro shall be its first argument
+decremented by 1. It shall be an error to specify an
+argument containing any non-numeric characters.
+.TP 7
+\fBdefine\fP
+The second argument shall become the defining text of the macro whose
+name is the first argument.
+.TP 7
+\fBdefn\fP
+The defining text of the \fBdefn\fP macro shall be the quoted definition
+(using the current quoting strings) of its
+arguments.
+.TP 7
+\fBdivert\fP
+The \fIm4\fP utility maintains nine temporary buffers, numbered 1
+to 9, inclusive. When the last of the input has been
+processed, any output that has been placed in these buffers shall
+be written to standard output in buffer-numerical order. The
+\fBdivert\fP macro shall divert future output to the buffer specified
+by its argument. Specifying no argument or an argument of 0
+shall resume the normal output process. Output diverted to a stream
+other than 0 to 9 shall be discarded. It shall be an error to
+specify an argument containing any non-numeric characters.
+.TP 7
+\fBdivnum\fP
+The defining text of the \fBdivnum\fP macro shall be the number of
+the current output stream as a string.
+.TP 7
+\fBdnl\fP
+The \fBdnl\fP macro shall cause \fIm4\fP to discard all input characters
+up to and including the next <newline>.
+.TP 7
+\fBdumpdef\fP
+The \fBdumpdef\fP macro shall write the defined text to standard error
+for each of the macros specified as arguments, or, if
+no arguments are specified, for all macros.
+.TP 7
+\fBerrprint\fP
+The \fBerrprint\fP macro shall write its arguments to standard error.
+.TP 7
+\fBeval\fP
+The \fBeval\fP macro shall evaluate its first argument as an arithmetic
+expression, using 32-bit signed integer arithmetic.
+All of the C-language operators shall be supported, except for:
+.sp
+.RS
+.nf
+
+\fB[]
+->
+++
+--
+(\fP\fItype\fP\fB)
+unary *
+\fP\fIsizeof\fP\fB,
+\&.
+?:
+unary &
+\fP
+.fi
+.RE
+.LP
+and all assignment operators. It shall be an error to specify any
+of these operators. Precedence and associativity shall be as
+in the ISO\ C standard. Systems shall support octal and hexadecimal
+numbers as in the ISO\ C standard. The second argument,
+if specified, shall set the radix for the result; the default is 10.
+The third argument, if specified, sets the minimum number of
+digits in the result. It shall be an error to specify the second or
+third argument containing any non-numeric characters.
+.TP 7
+\fBifdef\fP
+If the first argument to the \fBifdef\fP macro is defined, the defining
+text shall be the second argument. Otherwise, the
+defining text shall be the third argument, if specified, or the null
+string, if not.
+.TP 7
+\fBifelse\fP
+The \fBifelse\fP macro takes three or more arguments. If the first
+two arguments compare as equal strings (after macro
+expansion of both arguments), the defining text shall be the third
+argument. If the first two arguments do not compare as equal
+strings and there are three arguments, the defining text shall be
+null. If the first two arguments do not compare as equal strings
+and there are four or five arguments, the defining text shall be the
+fourth argument. If the first two arguments do not compare as
+equal strings and there are six or more arguments, the first three
+arguments shall be discarded and processing shall restart with
+the remaining arguments.
+.TP 7
+\fBinclude\fP
+The defining text for the \fBinclude\fP macro shall be the contents
+of the file named by the first argument. It shall be an
+error if the file cannot be read.
+.TP 7
+\fBincr\fP
+The defining text of the \fBincr\fP macro shall be its first argument
+incremented by 1. It shall be an error to specify an
+argument containing any non-numeric characters.
+.TP 7
+\fBindex\fP
+The defining text of the \fBindex\fP macro shall be the first character
+position (as a string) in the first argument where a
+string matching the second argument begins (zero origin), or -1 if
+the second argument does not occur.
+.TP 7
+\fBlen\fP
+The defining text of the \fBlen\fP macro shall be the length (as a
+string) of the first argument.
+.TP 7
+\fBm4exit\fP
+Exit from the \fIm4\fP utility. If the first argument is specified,
+it is the exit code. The default is zero. It shall be an
+error to specify an argument containing any non-numeric characters.
+.TP 7
+\fBm4wrap\fP
+The first argument shall be processed when EOF is reached. If the
+\fBm4wrap\fP macro is used multiple times, the arguments
+specified shall be processed in the order in which the \fBm4wrap\fP
+macros were processed.
+.TP 7
+\fBmaketemp\fP
+The defining text shall be the first argument, with any trailing \fB'X'\fP
+characters replaced with the current process ID
+as a string.
+.TP 7
+\fBpopdef\fP
+The \fBpopdef\fP macro shall delete the current definition of its
+arguments, replacing that definition with the previous one.
+If there is no previous definition, the macro is undefined.
+.TP 7
+\fBpushdef\fP
+The \fBpushdef\fP macro shall be equivalent to the \fBdefine\fP macro
+with the exception that it shall preserve any current
+definition for future retrieval using the \fBpopdef\fP macro.
+.TP 7
+\fBshift\fP
+The defining text for the \fBshift\fP macro shall be all of its arguments
+except for the first one.
+.TP 7
+\fBsinclude\fP
+The \fBsinclude\fP macro shall be equivalent to the \fBinclude\fP
+macro, except that it shall not be an error if the file is
+inaccessible.
+.TP 7
+\fBsubstr\fP
+The defining text for the \fBsubstr\fP macro shall be the substring
+of the first argument beginning at the zero-offset
+character position specified by the second argument. The third argument,
+if specified, shall be the number of characters to select;
+if not specified, the characters from the starting point to the end
+of the first argument shall become the defining text. It shall
+not be an error to specify a starting point beyond the end of the
+first argument and the defining text shall be null. It shall be
+an error to specify an argument containing any non-numeric characters.
+.TP 7
+\fBsyscmd\fP
+The \fBsyscmd\fP macro shall interpret its first argument as a shell
+command line. The defining text shall be the string
+result of that command. No output redirection shall be performed by
+the \fIm4\fP utility. The exit status value from the command
+can be retrieved using the \fBsysval\fP macro.
+.TP 7
+\fBsysval\fP
+The defining text of the \fBsysval\fP macro shall be the exit value
+of the utility last invoked by the \fBsyscmd\fP macro (as
+a string).
+.TP 7
+\fBtraceon\fP
+The \fBtraceon\fP macro shall enable tracing for the macros specified
+as arguments, or, if no arguments are specified, for all
+macros. The trace output shall be written to standard error in an
+unspecified format.
+.TP 7
+\fBtraceoff\fP
+The \fBtraceoff\fP macro shall disable tracing for the macros specified
+as arguments, or, if no arguments are specified, for
+all macros.
+.TP 7
+\fBtranslit\fP
+The defining text of the \fBtranslit\fP macro shall be the first argument
+with every character that occurs in the second
+argument replaced with the corresponding character from the third
+argument.
+.TP 7
+\fBundefine\fP
+The \fBundefine\fP macro shall delete all definitions (including those
+preserved using the \fBpushdef\fP macro) of the macros
+named by its arguments.
+.TP 7
+\fBundivert\fP
+The \fBundivert\fP macro shall cause immediate output of any text
+in temporary buffers named as arguments, or all temporary
+buffers if no arguments are specified. Buffers can be undiverted into
+other temporary buffers. Undiverting shall discard the
+contents of the temporary buffer. It shall be an error to specify
+an argument containing any non-numeric characters.
+.sp
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred
+.sp
+.LP
+If the \fBm4exit\fP macro is used, the exit value can be specified
+by the input file.
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The \fBdefn\fP macro is useful for renaming macros, especially built-ins.
+.SH EXAMPLES
+.LP
+If the file \fBm4src\fP contains the lines:
+.sp
+.RS
+.nf
+
+\fBThe value of `VER' is "VER".
+ifdef(`VER', "VER" is defined to be VER., VER is not defined.)
+ifelse(VER, 1, "VER" is `VER'.)
+ifelse(VER, 2, "VER" is `VER'., "VER" is not 2.)
+end
+\fP
+.fi
+.RE
+.LP
+then the command
+.sp
+.RS
+.nf
+
+\fBm4 m4src
+\fP
+.fi
+.RE
+.LP
+or the command:
+.sp
+.RS
+.nf
+
+\fBm4 -U VER m4src
+\fP
+.fi
+.RE
+.LP
+produces the output:
+.sp
+.RS
+.nf
+
+\fBThe value of VER is "VER".
+VER is not defined.
+.sp
+
+VER is not 2.
+end
+\fP
+.fi
+.RE
+.LP
+The command:
+.sp
+.RS
+.nf
+
+\fBm4 -D VER m4src
+\fP
+.fi
+.RE
+.LP
+produces the output:
+.sp
+.RS
+.nf
+
+\fBThe value of VER is "".
+VER is defined to be .
+.sp
+
+VER is not 2.
+end
+\fP
+.fi
+.RE
+.LP
+The command:
+.sp
+.RS
+.nf
+
+\fBm4 -D VER=1 m4src
+\fP
+.fi
+.RE
+.LP
+produces the output:
+.sp
+.RS
+.nf
+
+\fBThe value of VER is "1".
+VER is defined to be 1.
+VER is 1.
+VER is not 2.
+end
+\fP
+.fi
+.RE
+.LP
+The command:
+.sp
+.RS
+.nf
+
+\fBm4 -D VER=2 m4src
+.sp
+
+produces the output:
+The value of VER is "2".
+VER is defined to be 2.
+.sp
+
+VER is 2.
+end
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIc99\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/mailx.1p b/man-pages-posix-2003/man1p/mailx.1p
new file mode 100644
index 0000000..86d45f6
--- /dev/null
+++ b/man-pages-posix-2003/man1p/mailx.1p
@@ -0,0 +1,2213 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MAILX" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" mailx
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+mailx \- process messages
+.SH SYNOPSIS
+.SS Send Mode
+.sp
+.RS
+.nf
+
+\fBmailx\fP \fB[\fP\fB-s\fP \fIsubject\fP\fB]\fP \fIaddress\fP\fB...
+\fP
+.fi
+.RE
+.SS Receive Mode
+.sp
+.RS
+.nf
+
+\fBmailx -e
+.sp
+
+.sp
+
+mailx\fP \fB[\fP\fB-HiNn\fP\fB][\fP\fB-F\fP\fB][\fP\fB-u\fP \fIuser\fP\fB]\fP\fB
+.br
+
+.sp
+
+mailx -f\fP\fB[\fP\fB-HiNn\fP\fB][\fP\fB-F\fP\fB][\fP\fIfile\fP\fB]\fP\fB
+.br
+
+\fP
+.fi
+.RE
+.SH DESCRIPTION
+.LP
+The \fImailx\fP utility provides a message sending and receiving facility.
+It has two major modes, selected by the options
+used: Send Mode and Receive Mode.
+.LP
+On systems that do not support the User Portability Utilities option,
+an application using \fImailx\fP shall have the ability
+to send messages in an unspecified manner (Send Mode). Unless the
+first character of one or more lines is tilde ( \fB'~'\fP
+), all characters in the input message shall appear in the delivered
+message, but additional characters may be inserted in the
+message before it is retrieved.
+.LP
+On systems supporting the User Portability Utilities option, mail-receiving
+capabilities and other interactive features, Receive
+Mode, described below, also shall be enabled.
+.SS Send Mode
+.LP
+Send Mode can be used by applications or users to send messages from
+the text in standard input.
+.SS Receive Mode
+.LP
+Receive Mode is more oriented towards interactive users. Mail can
+be read and sent in this interactive mode.
+.LP
+When reading mail, \fImailx\fP provides commands to facilitate saving,
+deleting, and responding to messages. When sending mail,
+\fImailx\fP allows editing, reviewing, and other modification of the
+message as it is entered.
+.LP
+Incoming mail shall be stored in one or more unspecified locations
+for each user, collectively called the system \fImailbox\fP
+for that user. When \fImailx\fP is invoked in Receive Mode, the system
+mailbox shall be the default place to find new mail. As
+messages are read, they shall be marked to be moved to a secondary
+file for storage, unless specific action is taken. This
+secondary file is called the \fBmbox\fP and is normally located in
+the directory referred to by the \fIHOME\fP environment
+variable (see \fIMBOX\fP in the ENVIRONMENT VARIABLES section for
+a description of this file). Messages shall remain in this file
+until explicitly removed. When the \fB-f\fP option is used to read
+mail messages from secondary files, messages shall be retained
+in those files unless specifically removed. All three of these locations-system
+mailbox, \fBmbox\fP, and secondary file-are
+referred to in this section as simply "mailboxes", unless more specific
+identification is required.
+.SH OPTIONS
+.LP
+The \fImailx\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported. (Only the \fB-s\fP \fIsubject\fP
+option shall be required on all systems. The other
+options are required only on systems supporting the User Portability
+Utilities option.)
+.TP 7
+\fB-e\fP
+Test for the presence of mail in the system mailbox. The \fImailx\fP
+utility shall write nothing and exit with a successful
+return code if there is mail to read.
+.TP 7
+\fB-f\fP
+Read messages from the file named by the \fIfile\fP operand instead
+of the system mailbox. (See also \fBfolder\fP.) If no
+\fIfile\fP operand is specified, read messages from \fBmbox\fP instead
+of the system mailbox.
+.TP 7
+\fB-F\fP
+Record the message in a file named after the first recipient. The
+name is the login-name portion of the address found first on
+the \fBTo:\fP line in the mail header. Overrides the \fBrecord\fP
+variable, if set (see Internal
+Variables in mailx .)
+.TP 7
+\fB-H\fP
+Write a header summary only.
+.TP 7
+\fB-i\fP
+Ignore interrupts. (See also \fBignore\fP.)
+.TP 7
+\fB-n\fP
+Do not initialize from the system default start-up file. See the EXTENDED
+DESCRIPTION section.
+.TP 7
+\fB-N\fP
+Do not write an initial header summary.
+.TP 7
+\fB-s\ \fP \fIsubject\fP
+Set the \fBSubject\fP header field to \fIsubject\fP. All characters
+in the \fIsubject\fP string shall appear in the
+delivered message. The results are unspecified if \fIsubject\fP is
+longer than {LINE_MAX} - 10 bytes or contains a
+<newline>.
+.TP 7
+\fB-u\ \fP \fIuser\fP
+Read the system mailbox of the login name \fIuser\fP. This shall only
+be successful if the invoking user has the appropriate
+privileges to read the system mailbox of that user.
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIaddress\fP
+Addressee of message. When \fB-n\fP is specified and no user start-up
+files are accessed (see the EXTENDED DESCRIPTION
+section), the user or application shall ensure this is an address
+to pass to the mail delivery system. Any system or user start-up
+files may enable aliases (see \fBalias\fP under Commands in mailx
+) that may modify the form of
+\fIaddress\fP before it is passed to the mail delivery system.
+.TP 7
+\fIfile\fP
+A pathname of a file to be read instead of the system mailbox when
+\fB-f\fP is specified. The meaning of the \fIfile\fP
+option-argument shall be affected by the contents of the \fBfolder\fP
+internal variable; see Internal
+Variables in mailx .
+.sp
+.SH STDIN
+.LP
+When \fImailx\fP is invoked in Send Mode (the first synopsis line),
+standard input shall be the message to be delivered to the
+specified addresses. When in Receive Mode, user commands shall be
+accepted from \fIstdin\fP. If the User Portability Utilities
+option is not supported, standard input lines beginning with a tilde
+( \fB'~'\fP ) character produce unspecified
+results.
+.LP
+If the User Portability Utilities option is supported, then in both
+Send and Receive Modes, standard input lines beginning with
+the escape character (usually tilde ( \fB'~'\fP )) shall affect processing
+as described in Command Escapes in mailx .
+.SH INPUT FILES
+.LP
+When \fImailx\fP is used as described by this volume of IEEE\ Std\ 1003.1-2001,
+the \fIfile\fP option-argument (see
+the \fB-f\fP option) and the \fBmbox\fP shall be text files containing
+mail messages, formatted as described in the OUTPUT FILES
+section. The nature of the system mailbox is unspecified; it need
+not be a file.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fImailx\fP:
+.TP 7
+\fIDEAD\fP
+Determine the pathname of the file in which to save partial messages
+in case of interrupts or delivery errors. The default
+shall be \fBdead.letter\fP in the directory named by the \fIHOME\fP
+variable. The behavior of \fImailx\fP in saving partial
+messages is unspecified if the User Portability Utilities option is
+not supported and \fIDEAD\fP is not defined with the value
+\fB/dev/null\fP.
+.TP 7
+\fIEDITOR\fP
+Determine the name of a utility to invoke when the \fBedit\fP (see
+Commands in mailx ) or
+\fB~e\fP (see Command Escapes in mailx ) command is used. The default
+editor is unspecified.
+\ On XSI-conformant systems it is \fIed\fP. The effects of this variable
+are unspecified if the User Portability Utilities option is not
+supported.
+.TP 7
+\fIHOME\fP
+Determine the pathname of the user's home directory.
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files) and
+the handling of case-insensitive address and header-field
+comparisons.
+.TP 7
+\fILC_TIME\fP
+Determine the format and contents of the date and time strings written
+by \fImailx\fP.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard error and
+informative messages written to standard output.
+.TP 7
+\fILISTER\fP
+Determine a string representing the command for writing the contents
+of the \fBfolder\fP directory to standard output when the
+\fBfolders\fP command is given (see \fBfolders\fP in Commands in mailx
+). Any string acceptable as
+a \fIcommand_string\fP operand to the \fIsh\fP \fB-c\fP command shall
+be valid. If this
+variable is null or not set, the output command shall be \fIls\fP.
+The effects of this variable
+are unspecified if the User Portability Utilities option is not supported.
+.TP 7
+\fIMAILRC\fP
+Determine the pathname of the start-up file. The default shall be
+\fB\&.mailrc\fP in the directory referred to by the
+\fIHOME\fP environment variable. The behavior of \fImailx\fP is unspecified
+if the User Portability Utilities option is not
+supported and \fIMAILRC\fP is not defined with the value \fB/dev/null\fP.
+.TP 7
+\fIMBOX\fP
+Determine a pathname of the file to save messages from the system
+mailbox that have been read. The \fBexit\fP command shall
+override this function, as shall saving the message explicitly in
+another file. The default shall be \fBmbox\fP in the directory
+named by the \fIHOME\fP variable. The effects of this variable are
+unspecified if the User Portability Utilities option is not
+supported.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fIPAGER\fP
+Determine a string representing an output filtering or pagination
+command for writing the output to the terminal. Any string
+acceptable as a \fIcommand_string\fP operand to the \fIsh\fP \fB-c\fP
+command shall be valid.
+When standard output is a terminal device, the message output shall
+be piped through the command if the \fImailx\fP internal
+variable \fBcrt\fP is set to a value less the number of lines in the
+message; see Internal Variables in
+mailx . If the \fIPAGER\fP variable is null or not set, the paginator
+shall be either \fImore\fP or another paginator utility documented
+in the system documentation. The effects of this
+variable are unspecified if the User Portability Utilities option
+is not supported.
+.TP 7
+\fISHELL\fP
+Determine the name of a preferred command interpreter. The default
+shall be \fIsh\fP. The
+effects of this variable are unspecified if the User Portability Utilities
+option is not supported.
+.TP 7
+\fITERM\fP
+If the internal variable \fBscreen\fP is not specified, determine
+the name of the terminal type to indicate in an unspecified
+manner the number of lines in a screenful of headers. If \fITERM\fP
+is not set or is set to null, an unspecified default terminal
+type shall be used and the value of a screenful is unspecified. The
+effects of this variable are unspecified if the User
+Portability Utilities option is not supported.
+.TP 7
+\fITZ\fP
+This variable may determine the timezone used to calculate date and
+time strings written by \fImailx\fP. If \fITZ\fP is unset
+or null, an unspecified default timezone shall be used.
+.TP 7
+\fIVISUAL\fP
+Determine a pathname of a utility to invoke when the \fBvisual\fP
+command (see Commands in
+mailx ) or \fB~v\fP command-escape (see Command Escapes in mailx )
+is used. If this
+variable is null or not set, the full-screen editor shall be \fIvi\fP.
+The effects of this
+variable are unspecified if the User Portability Utilities option
+is not supported.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+When \fImailx\fP is in Send Mode and standard input is not a terminal,
+it shall take the standard action for all signals.
+.LP
+In Receive Mode, or in Send Mode when standard input is a terminal,
+if a SIGINT signal is received:
+.IP " 1." 4
+If in command mode, the current command, if there is one, shall be
+aborted, and a command-mode prompt shall be written.
+.LP
+.IP " 2." 4
+If in input mode:
+.RS
+.IP " a." 4
+If \fBignore\fP is set, \fImailx\fP shall write \fB"@\\n"\fP, discard
+the current input line, and continue processing,
+bypassing the message-abort mechanism described in item 2b.
+.LP
+.IP " b." 4
+If the interrupt was received while sending mail, either when in Receive
+Mode or in Send Mode, a message shall be written, and
+another subsequent interrupt, with no other intervening characters
+typed, shall be required to abort the mail message. If in
+Receive Mode and another interrupt is received, a command-mode prompt
+shall be written. If in Send Mode and another interrupt is
+received, \fImailx\fP shall terminate with a non-zero status.
+.LP
+In both cases listed in item b, if the message is not empty:
+.RS
+.IP "i. " 5
+If \fBsave\fP is enabled and the file named by \fIDEAD\fP can be created,
+the message shall be written to the file named by
+\fIDEAD\fP. If the file exists, the message shall be written to replace
+the contents of the file.
+.LP
+.IP "ii." 5
+If \fBsave\fP is not enabled, or the file named by \fIDEAD\fP cannot
+be created, the message shall not be saved.
+.LP
+.RE
+.LP
+.RE
+.LP
+.LP
+The \fImailx\fP utility shall take the standard action for all other
+signals.
+.SH STDOUT
+.LP
+In command and input modes, all output, including prompts and messages,
+shall be written to standard output.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+Various \fImailx\fP commands and command escapes can create or add
+to files, including the \fBmbox\fP, the dead-letter file,
+and secondary mailboxes. When \fImailx\fP is used as described in
+this volume of IEEE\ Std\ 1003.1-2001, these files shall
+be text files, formatted as follows:
+\fBline beginning with\fP \fBFrom<space>
+.br
+[\fP\fBone or more\fP \fIheader-lines\fP; see Commands in mailx \fB]
+.br
+\fP \fIempty line
+.br
+\fP \fB[\fP\fBzero or more\fP \fIbody lines
+.br
+empty line\fP\fB]
+.br
+[\fP\fBline beginning with\fP \fBFrom<space>...]\fP
+.LP
+where each message begins with the \fBFrom\ <space>\fP line shown,
+preceded by the beginning of the file or an empty
+line. (The \fBFrom <space>\fP line is considered to be part of the
+message header, but not one of the header-lines referred
+to in Commands in mailx ; thus, it shall not be affected by the \fBdiscard\fP,
+\fBignore\fP, or
+\fBretain\fP commands.) The formats of the remainder of the \fBFrom
+<space>\fP line and any additional header lines are
+unspecified, except that none shall be empty. The format of a message
+body line is also unspecified, except that no line following
+an empty line shall start with \fBFrom <space>\fP; \fImailx\fP shall
+modify any such user-entered message body lines
+(following an empty line and beginning with \fBFrom <space>\fP) by
+adding one or more characters to precede the \fB'F'\fP
+; it may add these characters to \fBFrom <space>\fP lines that are
+not preceded by an empty line.
+.LP
+When a message from the system mailbox or entered by the user is not
+a text file, it is implementation-defined how such a
+message is stored in files written by \fImailx\fP.
+.SH EXTENDED DESCRIPTION
+.LP
+The entire EXTENDED DESCRIPTION section shall apply only to implementations
+supporting the User Portability Utilities
+option.
+.LP
+The \fImailx\fP utility cannot guarantee support for all character
+encodings in all circumstances. For example, inter-system
+mail may be restricted to 7-bit data by the underlying network, 8-bit
+data need not be portable to non-internationalized systems,
+and so on. Under these circumstances, it is recommended that only
+characters defined in the ISO/IEC\ 646:1991 standard
+International Reference Version (equivalent to ASCII) 7-bit range
+of characters be used.
+.LP
+When \fImailx\fP is invoked using one of the Receive Mode synopsis
+forms, it shall write a page of header-summary lines (if
+\fB-N\fP was not specified and there are messages, see below), followed
+by a prompt indicating that \fImailx\fP can accept
+regular commands (see Commands in mailx ); this is termed \fIcommand
+mode\fP. The page of
+header-summary lines shall contain the first new message if there
+are new messages, or the first unread message if there are unread
+messages, or the first message. When \fImailx\fP is invoked using
+the Send Mode synopsis and standard input is a terminal, if no
+subject is specified on the command line and the \fBasksub\fP variable
+is set, a prompt for the subject shall be written. At this
+point, \fImailx\fP shall be in input mode. This input mode shall also
+be entered when using one of the Receive Mode synopsis forms
+and a reply or new message is composed using the \fBreply\fP, \fBReply\fP,
+\fBfollowup\fP, \fBFollowup\fP, or \fBmail\fP
+commands and standard input is a terminal. When the message is typed
+and the end of the message is encountered, the message shall
+be passed to the mail delivery software. Commands can be entered by
+beginning a line with the escape character (by default, tilde (
+\fB'~'\fP )) followed by a single command letter and optional arguments.
+See Commands in
+mailx for a summary of these commands. It is unspecified what effect
+these commands will have if standard input is not a
+terminal when a message is entered using either the Send Mode synopsis,
+or the Read Mode commands \fBreply\fP, \fBReply\fP,
+\fBfollowup\fP, \fBFollowup\fP, or \fBmail\fP.
+.TP 7
+\fBNote:\fP
+For notational convenience, this section uses the default escape character,
+tilde, in all references and examples.
+.sp
+.LP
+At any time, the behavior of \fImailx\fP shall be governed by a set
+of environmental and internal variables. These are flags
+and valued parameters that can be set and cleared via the \fImailx\fP
+\fBset\fP and \fBunset\fP commands.
+.LP
+Regular commands are of the form:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcommand\fP\fB] [\fP\fImsglist\fP\fB] [\fP\fIargument\fP \fB...\fP\fB]
+\fP
+.fi
+.RE
+.LP
+If no \fIcommand\fP is specified in command mode, \fBnext\fP shall
+be assumed. In input mode, commands shall be recognized by
+the escape character, and lines not treated as commands shall be taken
+as input for the message.
+.LP
+In command mode, each message shall be assigned a sequential number,
+starting with 1.
+.LP
+All messages have a state that shall affect how they are displayed
+in the header summary and how they are retained or deleted
+upon termination of \fImailx\fP. There is at any time the notion of
+a \fIcurrent\fP message, which shall be marked by a
+\fB'>'\fP at the beginning of a line in the header summary. When \fImailx\fP
+is invoked using one of the Receive Mode
+synopsis forms, the current message shall be the first new message,
+if there is a new message, or the first unread message if there
+is an unread message, or the first message if there are any messages,
+or unspecified if there are no messages in the mailbox. Each
+command that takes an optional list of messages (\fImsglist\fP) or
+an optional single message (\fImessage\fP) on which to operate
+shall leave the current message set to the highest-numbered message
+of the messages specified, unless the command deletes messages,
+in which case the current message shall be set to the first undeleted
+message (that is, a message not in the deleted state) after
+the highest-numbered message deleted by the command, if one exists,
+or the first undeleted message before the highest-numbered
+message deleted by the command, if one exists, or to an unspecified
+value if there are no remaining undeleted messages. All
+messages shall be in one of the following states:
+.TP 7
+\fInew\fP
+The message is present in the system mailbox and has not been viewed
+by the user or moved to any other state. Messages in state
+\fInew\fP when \fImailx\fP quits shall be retained in the system mailbox.
+.TP 7
+\fIunread\fP
+The message has been present in the system mailbox for more than one
+invocation of \fImailx\fP and has not been viewed by the
+user or moved to any other state. Messages in state \fIunread\fP when
+\fImailx\fP quits shall be retained in the system
+mailbox.
+.TP 7
+\fIread\fP
+The message has been processed by one of the following commands: \fB~f\fP,
+\fB~m\fP, \fB~F\fP,
+\fB~M\fP, \fBcopy\fP, \fBmbox\fP, \fBnext\fP, \fBpipe\fP, \fBprint\fP,
+\fBPrint\fP, \fBtop\fP, \fBtype\fP,
+\fBType\fP, \fBundelete\fP. The \fBdelete\fP, \fBdp\fP, and \fBdt\fP
+commands may also cause the next message to be marked as
+\fIread\fP, depending on the value of the \fBautoprint\fP variable.
+Messages that are in the system mailbox and in state
+\fIread\fP when \fImailx\fP quits shall be saved in the \fBmbox\fP,
+unless the internal variable \fBhold\fP was set. Messages
+that are in the \fBmbox\fP or in a secondary mailbox and in state
+\fIread\fP when \fImailx\fP quits shall be retained in their
+current location.
+.TP 7
+\fIdeleted\fP
+The message has been processed by one of the following commands: \fBdelete\fP,
+\fBdp\fP, \fBdt\fP. Messages in state
+\fIdeleted\fP when \fImailx\fP quits shall be deleted. Deleted messages
+shall be ignored until \fImailx\fP quits or changes
+mailboxes or they are specified to the undelete command; for example,
+the message specification / \fIstring\fP shall only search
+the subject lines of messages that have not yet been deleted, unless
+the command operating on the list of messages is
+\fBundelete\fP. No deleted message or deleted message header shall
+be displayed by any \fImailx\fP command other than
+\fBundelete\fP.
+.TP 7
+\fIpreserved\fP
+The message has been processed by a \fBpreserve\fP command. When \fImailx\fP
+quits, the message shall be retained in its
+current location.
+.TP 7
+\fIsaved\fP
+The message has been processed by one of the following commands: \fBsave\fP
+or \fBwrite\fP. If the current mailbox is the
+system mailbox, and the internal variable \fBkeepsave\fP is set, messages
+in the state saved shall be saved to the file designated
+by the \fIMBOX\fP variable (see the ENVIRONMENT VARIABLES section).
+If the current mailbox is the system mailbox, messages in the
+state \fIsaved\fP shall be deleted from the current mailbox, when
+the \fBquit\fP or \fBfile\fP command is used to exit the
+current mailbox.
+.sp
+.LP
+The header-summary line for each message shall indicate the state
+of the message.
+.LP
+Many commands take an optional list of messages ( \fImsglist\fP) on
+which to operate, which defaults to the current message. A
+\fImsglist\fP is a list of message specifications separated by <blank>s,
+which can include:
+.TP 7
+\fBn\fP
+Message number \fIn\fP.
+.TP 7
+\fB+\fP
+The next undeleted message, or the next deleted message for the \fBundelete\fP
+command.
+.TP 7
+\fB-\fP
+The next previous undeleted message, or the next previous deleted
+message for the \fBundelete\fP command.
+.TP 7
+\fB\&.\fP
+The current message.
+.TP 7
+\fB^\fP
+The first undeleted message, or the first deleted message for the
+\fBundelete\fP command.
+.TP 7
+\fB$\fP
+The last message.
+.TP 7
+\fB*\fP
+All messages.
+.TP 7
+\fBn-m\fP
+An inclusive range of message numbers.
+.TP 7
+\fIaddress\fP
+All messages from \fIaddress\fP; any address as shown in a header
+summary shall be matchable in this form.
+.TP 7
+/\fIstring\fP
+All messages with \fIstring\fP in the subject line (case ignored).
+.TP 7
+\fB:c\fP
+All messages of type \fIc\fP, where \fIc\fP shall be one of:
+.TP 7
+\fBd\fP
+.RS
+Deleted messages.
+.RE
+.TP 7
+\fBn\fP
+.RS
+New messages.
+.RE
+.TP 7
+\fBo\fP
+.RS
+Old messages (any not in state \fIread\fP or \fInew\fP).
+.RE
+.TP 7
+\fBr\fP
+.RS
+Read messages.
+.RE
+.TP 7
+\fBu\fP
+.RS
+Unread messages.
+.RE
+.sp
+.sp
+.LP
+Other commands take an optional message ( \fImessage\fP) on which
+to operate, which defaults to the current message. All of the
+forms allowed for \fImsglist\fP are also allowed for \fImessage\fP,
+but if more than one message is specified, only the first
+shall be operated on.
+.LP
+Other arguments are usually arbitrary strings whose usage depends
+on the command involved.
+.SS Start-Up in mailx
+.LP
+At start-up time, \fImailx\fP shall take the following steps in sequence:
+.IP " 1." 4
+Establish all variables at their stated default values.
+.LP
+.IP " 2." 4
+Process command line options, overriding corresponding default values.
+.LP
+.IP " 3." 4
+Import any of the \fIDEAD\fP, \fIEDITOR\fP, \fIMBOX\fP, \fILISTER
+,\fP \fIPAGER\fP, \fISHELL\fP, or \fIVISUAL\fP
+variables that are present in the environment, overriding the corresponding
+default values.
+.LP
+.IP " 4." 4
+Read \fImailx\fP commands from an unspecified system start-up file,
+unless the \fB-n\fP option is given, to initialize any
+internal \fImailx\fP variables and aliases.
+.LP
+.IP " 5." 4
+Process the start-up file of \fImailx\fP commands named in the user
+\fIMAILRC\fP variable.
+.LP
+.LP
+Most regular \fImailx\fP commands are valid inside start-up files,
+the most common use being to set up initial display options
+and alias lists. The following commands shall be invalid in the start-up
+file: \fB!\fP, \fBedit\fP, \fBhold\fP, \fBmail\fP,
+\fBpreserve\fP, \fBreply\fP, \fBReply\fP, \fBshell\fP, \fBvisual\fP,
+\fBCopy\fP, \fBfollowup\fP, and \fBFollowup\fP. Any
+errors in the start-up file shall either cause \fImailx\fP to terminate
+with a diagnostic message and a non-zero status or to
+continue after writing a diagnostic message, ignoring the remainder
+of the lines in the start-up file.
+.LP
+A blank line in a start-up file shall be ignored.
+.SS Internal Variables in mailx
+.LP
+The following variables are internal \fImailx\fP variables. Each internal
+variable can be set via the \fImailx\fP \fBset\fP
+command at any time. The \fBunset\fP and \fBset\ no\fP \fIname\fP
+commands can be used to erase variables.
+.LP
+In the following list, variables shown as:
+.sp
+.RS
+.nf
+
+\fBvariable
+\fP
+.fi
+.RE
+.LP
+represent Boolean values. Variables shown as:
+.sp
+.RS
+.nf
+
+\fBvariable=\fP\fIvalue\fP
+.fi
+.RE
+.LP
+shall be assigned string or numeric values. For string values, the
+rules in Commands in mailx
+concerning filenames and quoting shall also apply.
+.LP
+The defaults specified here may be changed by the implementation-defined
+system start-up file unless the user specifies the
+\fB-n\fP option.
+.TP 7
+\fBallnet\fP
+All network names whose login name components match shall be treated
+as identical. This shall cause the \fImsglist\fP message
+specifications to behave similarly. The default shall be \fBnoallnet\fP.
+See also the \fBalternates\fP command and the
+\fBmetoo\fP variable.
+.TP 7
+\fBappend\fP
+Append messages to the end of the \fBmbox\fP file upon termination
+instead of placing them at the beginning. The default shall
+be \fBnoappend\fP. This variable shall not affect the \fBsave\fP command
+when saving to \fBmbox\fP.
+.TP 7
+\fBask\fP,\ \fBasksub\fP
+Prompt for a subject line on outgoing mail if one is not specified
+on the command line with the \fB-s\fP option. The
+\fBask\fP and \fBasksub\fP forms are synonyms; the system shall refer
+to \fBasksub\fP and \fBnoasksub\fP in its messages, but
+shall accept \fBask\fP and \fBnoask\fP as user input to mean \fBasksub\fP
+and \fBnoasksub\fP. It shall not be possible to set
+both \fBask\fP and \fBnoasksub\fP, or \fBnoask\fP and \fBasksub\fP.
+The default shall be \fBasksub\fP, but no prompting shall
+be done if standard input is not a terminal.
+.TP 7
+\fBaskbcc\fP
+Prompt for the blind copy list. The default shall be \fBnoaskbcc\fP.
+.TP 7
+\fBaskcc\fP
+Prompt for the copy list. The default shall be \fBnoaskcc\fP.
+.TP 7
+\fBautoprint\fP
+Enable automatic writing of messages after \fBdelete\fP and \fBundelete\fP
+commands. The default shall be
+\fBnoautoprint\fP.
+.TP 7
+\fBbang\fP
+Enable the special-case treatment of exclamation marks ( \fB'!'\fP
+) in escape command lines; see the \fBescape\fP command
+and Command Escapes in mailx . The default shall be \fBnobang\fP,
+disabling the expansion of
+\fB'!'\fP in the \fIcommand\fP argument to the \fB~!\fP command and
+the \fB~<!\fP \fIcommand\fP escape.
+.TP 7
+\fBcmd\fP=\fIcommand\fP
+.sp
+Set the default command to be invoked by the \fBpipe\fP command. The
+default shall be \fBnocmd\fP.
+.TP 7
+\fBcrt\fP=\fInumber\fP
+Pipe messages having more than \fInumber\fP lines through the command
+specified by the value of the \fIPAGER\fP variable. The
+default shall be \fBnocrt\fP. If it is set to null, the value used
+is implementation-defined.
+.TP 7
+\fBdebug\fP
+Enable verbose diagnostics for debugging. Messages are not delivered.
+The default shall be \fBnodebug\fP.
+.TP 7
+\fBdot\fP
+When \fBdot\fP is set, a period on a line by itself during message
+input from a terminal shall also signify end-of-file (in
+addition to normal end-of-file). The default shall be \fBnodot\fP.
+If \fBignoreeof\fP is set (see below), a setting of
+\fBnodot\fP shall be ignored and the period is the only method to
+terminate input mode.
+.TP 7
+\fBescape\fP=\fIc\fP
+Set the command escape character to be the character \fB'c'\fP . By
+default, the command escape character shall be tilde. If
+\fBescape\fP is unset, tilde shall be used; if it is set to null,
+command escaping shall be disabled.
+.TP 7
+\fBflipr\fP
+Reverse the meanings of the \fBR\fP and \fBr\fP commands. The default
+shall be \fBnoflipr\fP.
+.TP 7
+\fBfolder\fP=\fIdirectory\fP
+.sp
+The default directory for saving mail files. User-specified filenames
+beginning with a plus sign ( \fB'+'\fP ) shall be expanded
+by preceding the filename with this directory name to obtain the real
+pathname. If \fIdirectory\fP does not start with a slash (
+\fB'/'\fP ), the contents of \fIHOME\fP shall be prefixed to it. The
+default shall be \fBnofolder\fP. If \fBfolder\fP is
+unset or set to null, user-specified filenames beginning with \fB'+'\fP
+shall refer to files in the current directory that begin
+with the literal \fB'+'\fP character. See also \fBoutfolder\fP below.
+The \fBfolder\fP value need not affect the processing of
+the files named in \fIMBOX\fP and \fIDEAD\fP.
+.TP 7
+\fBheader\fP
+Enable writing of the header summary when entering \fImailx\fP in
+Receive Mode. The default shall be \fBheader\fP.
+.TP 7
+\fBhold\fP
+Preserve all messages that are read in the system mailbox instead
+of putting them in the \fBmbox\fP save file. The default
+shall be \fBnohold\fP.
+.TP 7
+\fBignore\fP
+Ignore interrupts while entering messages. The default shall be \fBnoignore\fP.
+.TP 7
+\fBignoreeof\fP
+Ignore normal end-of-file during message input. Input can be terminated
+only by entering a period ( \fB'.'\fP ) on a line by
+itself or by the \fB~.\fP command escape. The default shall be \fBnoignoreeof\fP.
+See also \fBdot\fP above.
+.TP 7
+\fBindentprefix\fP=\fIstring\fP
+.sp
+A string that shall be added as a prefix to each line that is inserted
+into the message by the \fB~m\fP command escape. This
+variable shall default to one <tab>.
+.TP 7
+\fBkeep\fP
+When a system mailbox, secondary mailbox, or \fBmbox\fP is empty,
+truncate it to zero length instead of removing it. The
+default shall be \fBnokeep\fP.
+.TP 7
+\fBkeepsave\fP
+Keep the messages that have been saved from the system mailbox into
+other files in the file designated by the variable \fIMBOX
+,\fP instead of deleting them. The default shall be \fBnokeepsave\fP.
+.TP 7
+\fBmetoo\fP
+Suppress the deletion of the login name of the user from the recipient
+list when replying to a message or sending to a group.
+The default shall be \fBnometoo\fP.
+.TP 7
+\fBonehop\fP
+When responding to a message that was originally sent to several recipients,
+the other recipient addresses are normally forced to
+be relative to the originating author's machine for the response.
+This flag disables alteration of the recipients' addresses,
+improving efficiency in a network where all machines can send directly
+to all other machines (that is, one hop away). The default
+shall be \fBnoonehop\fP.
+.TP 7
+\fBoutfolder\fP
+Cause the files used to record outgoing messages to be located in
+the directory specified by the \fBfolder\fP variable unless
+the pathname is absolute. The default shall be \fBnooutfolder\fP.
+See the \fBrecord\fP variable.
+.TP 7
+\fBpage\fP
+Insert a <form-feed> after each message sent through the pipe created
+by the \fBpipe\fP command. The default shall be
+\fBnopage\fP.
+.TP 7
+\fBprompt\fP=\fIstring\fP
+.sp
+Set the command-mode prompt to \fIstring\fP. If \fIstring\fP is null
+or if \fBnoprompt\fP is set, no prompting shall occur. The
+default shall be to prompt with the string \fB"?\ "\fP .
+.TP 7
+\fBquiet\fP
+Refrain from writing the opening message and version when entering
+\fImailx\fP. The default shall be \fBnoquiet\fP.
+.TP 7
+\fBrecord\fP=\fIfile\fP
+Record all outgoing mail in the file with the pathname \fIfile\fP.
+The default shall be \fBnorecord\fP. See also
+\fBoutfolder\fP above.
+.TP 7
+\fBsave\fP
+Enable saving of messages in the dead-letter file on interrupt or
+delivery error. See the variable \fIDEAD\fP for the location
+of the dead-letter file. The default shall be \fBsave\fP.
+.TP 7
+\fBscreen\fP=\fInumber\fP
+.sp
+Set the number of lines in a screenful of headers for the \fBheaders\fP
+and \fBz\fP commands. If \fBscreen\fP is not specified,
+a value based on the terminal type identified by the \fITERM\fP environment
+variable, the window size, the baud rate, or some
+combination of these shall be used.
+.TP 7
+\fBsendwait\fP
+Wait for the background mailer to finish before returning. The default
+shall be \fBnosendwait\fP.
+.TP 7
+\fBshowto\fP
+When the sender of the message was the user who is invoking \fImailx\fP,
+write the information from the \fBTo:\fP line
+instead of the \fBFrom:\fP line in the header summary. The default
+shall be \fBnoshowto\fP.
+.TP 7
+\fBsign\fP=\fIstring\fP
+Set the variable inserted into the text of a message when the \fB~a\fP
+command escape is given. The default shall be
+\fBnosign\fP. The character sequences \fB'\\t'\fP and \fB'\\n'\fP
+shall be recognized in the variable as <tab>s and
+<newline>s, respectively. (See also \fB~i\fP in Command Escapes in
+mailx .)
+.TP 7
+\fBSign\fP=\fIstring\fP
+Set the variable inserted into the text of a message when the \fB~A\fP
+command escape is given. The default shall be
+\fBnoSign\fP. The character sequences \fB'\\t'\fP and \fB'\\n'\fP
+shall be recognized in the variable as <tab>s and
+<newline>s, respectively.
+.TP 7
+\fBtoplines\fP=\fInumber\fP
+.sp
+Set the number of lines of the message to write with the \fBtop\fP
+command. The default shall be 5.
+.sp
+.SS Commands in mailx
+.LP
+The following \fImailx\fP commands shall be provided. In the following
+list, header refers to lines from the message header, as
+shown in the OUTPUT FILES section. Header-line refers to lines within
+the header that begin with one or more non-white-space
+characters, immediately followed by a colon and white space and continuing
+until the next line beginning with a non-white-space
+character or an empty line. Header-field refers to the portion of
+a header line prior to the first colon in that line.
+.LP
+For each of the commands listed below, the command can be entered
+as the abbreviation (those characters in the Synopsis command
+word preceding the \fB'['\fP ), the full command (all characters shown
+for the command word, omitting the \fB'['\fP and
+\fB']'\fP ), or any truncation of the full command down to the abbreviation.
+For example, the \fBexit\fP command (shown as
+\fBex[it]\fP in the Synopsis) can be entered as \fBex\fP, \fBexi\fP,
+or \fBexit\fP.
+.LP
+The arguments to commands can be quoted, using the following methods:
+.IP " *" 3
+An argument can be enclosed between paired double-quotes ( \fB""\fP
+) or single-quotes ( \fB''\fP ); any white space,
+shell word expansion, or backslash characters within the quotes shall
+be treated literally as part of the argument. A double-quote
+shall be treated literally within single-quotes and \fIvice versa\fP.
+These special properties of the quote marks shall occur only
+when they are paired at the beginning and end of the argument.
+.LP
+.IP " *" 3
+A backslash outside of the enclosing quotes shall be discarded and
+the following character treated literally as part of the
+argument.
+.LP
+.IP " *" 3
+An unquoted backslash at the end of a command line shall be discarded
+and the next line shall continue the command.
+.LP
+.LP
+Filenames, where expected, shall be subjected to the following transformations,
+in sequence:
+.IP " *" 3
+If the filename begins with an unquoted plus sign, and the \fBfolder\fP
+variable is defined (see the \fBfolder\fP variable),
+the plus sign shall be replaced by the value of the \fBfolder\fP variable
+followed by a slash. If the \fBfolder\fP variable is
+unset or is set to null, the filename shall be unchanged.
+.LP
+.IP " *" 3
+Shell word expansions shall be applied to the filename (see \fIWord
+Expansions\fP ). If
+more than a single pathname results from this expansion and the command
+is expecting one file, the effects are unspecified.
+.LP
+.SS Declare Aliases
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBa\fP\fB[\fP\fBlias\fP\fB] [\fP\fIalias\fP \fB[\fP\fIaddress\fP\fB...\fP\fB]]\fP\fBg\fP\fB[\fP\fBroup\fP\fB] [\fP\fIalias\fP \fB[\fP\fIaddress\fP\fB...\fP\fB]]\fP
+.fi
+.RE
+.sp
+.LP
+Add the given addresses to the alias specified by \fIalias\fP. The
+names shall be substituted when \fIalias\fP is used as a
+recipient address specified by the user in an outgoing message (that
+is, other recipients addressed indirectly through the
+\fBreply\fP command shall not be substituted in this manner). Mail
+address alias substitution shall apply only when the alias
+string is used as a full address; for example, when \fBhlj\fP is an
+alias, \fIhlj@posix.com\fP does not trigger the alias
+substitution. If no arguments are given, write a listing of the current
+aliases to standard output. If only an \fIalias\fP
+argument is given, write a listing of the specified alias to standard
+output. These listings need not reflect the same order of
+addresses that were entered.
+.SS Declare Alternatives
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBalt\fP\fB[\fP\fBernates\fP\fB]\fP \fIname\fP\fB...
+\fP
+.fi
+.RE
+.sp
+.LP
+(See also the \fBmetoo\fP command.) Declare a list of alternative
+names for the user's login. When responding to a message,
+these names shall be removed from the list of recipients for the response.
+The comparison of names shall be in a case-insensitive
+manner. With no arguments, \fBalternates\fP shall write the current
+list of alternative names.
+.SS Change Current Directory
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBcd\fP \fB[\fP\fIdirectory\fP\fB]\fP\fBch\fP\fB[\fP\fBdir\fP\fB] [\fP\fIdirectory\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Change directory. If \fIdirectory\fP is not specified, the contents
+of \fIHOME\fP shall be used.
+.SS Copy Messages
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBc\fP\fB[\fP\fBopy\fP\fB] [\fP\fIfile\fP\fB]\fP\fBc\fP\fB[\fP\fBopy\fP\fB] [\fP\fImsglist\fP\fB]\fP \fIfile\fP\fBC\fP\fB[\fP\fBopy\fP\fB] [\fP\fImsglist\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Copy messages to the file named by the pathname \fIfile\fP without
+marking the messages as saved. Otherwise, it shall be
+equivalent to the \fBsave\fP command.
+.LP
+In the capitalized form, save the specified messages in a file whose
+name is derived from the author of the message to be saved,
+without marking the messages as saved. Otherwise, it shall be equivalent
+to the \fBSave\fP command.
+.SS Delete Messages
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBd\fP\fB[\fP\fBelete\fP\fB] [\fP\fImsglist\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Mark messages for deletion from the mailbox. The deletions shall not
+occur until \fImailx\fP quits (see the \fBquit\fP
+command) or changes mailboxes (see the \fBfolder\fP command). If \fBautoprint\fP
+is set and there are messages remaining after
+the \fBdelete\fP command, the current message shall be written as
+described for the \fBprint\fP command (see the \fBprint\fP
+command); otherwise, the \fImailx\fP prompt shall be written.
+.SS Discard Header Fields
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBdi\fP\fB[\fP\fBscard\fP\fB] [\fP\fIheader-field\fP\fB...\fP\fB]\fP\fBig\fP\fB[\fP\fBnore\fP\fB] [\fP\fIheader-field\fP\fB...\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Suppress the specified header fields when writing messages. Specified
+\fIheader-fields\fP shall be added to the list of
+suppressed header fields. Examples of header fields to ignore are
+\fBstatus\fP and \fBcc\fP. The fields shall be included when
+the message is saved. The \fBPrint\fP and \fBType\fP commands shall
+override this command. The comparison of header fields shall
+be in a case-insensitive manner. If no arguments are specified, write
+a list of the currently suppressed header fields to standard
+output; the listing need not reflect the same order of header fields
+that were entered.
+.LP
+If both \fBretain\fP and \fBdiscard\fP commands are given, \fBdiscard\fP
+commands shall be ignored.
+.SS Delete Messages and Display
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBdp\fP \fB[\fP\fImsglist\fP\fB]\fP\fBdt\fP \fB[\fP\fImsglist\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Delete the specified messages as described for the \fBdelete\fP command,
+except that the \fBautoprint\fP variable shall have
+no effect, and the current message shall be written only if it was
+set to a message after the last message deleted by the command.
+Otherwise, an informational message to the effect that there are no
+further messages in the mailbox shall be written, followed by
+the \fImailx\fP prompt.
+.SS Echo a String
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBec\fP\fB[\fP\fBho\fP\fB]\fP \fIstring\fP \fB...
+\fP
+.fi
+.RE
+.sp
+.LP
+Echo the given strings, equivalent to the shell \fIecho\fP utility.
+.SS Edit Messages
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBe\fP\fB[\fP\fBdit\fP\fB] [\fP\fImsglist\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Edit the given messages. The messages shall be placed in a temporary
+file and the utility named by the \fIEDITOR\fP variable is
+invoked to edit each file in sequence. The default \fIEDITOR\fP is
+unspecified.
+.LP
+The \fBedit\fP command does not modify the contents of those messages
+in the mailbox.
+.SS Exit
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBex\fP\fB[\fP\fBit\fP\fB]\fP\fBx\fP\fB[\fP\fBit\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Exit from \fImailx\fP without changing the mailbox. No messages shall
+be saved in the \fBmbox\fP (see also \fBquit\fP).
+.SS Change Folder
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBfi\fP\fB[\fP\fBle\fP\fB] [\fP\fIfile\fP\fB]\fP\fBfold\fP\fB[\fP\fBer\fP\fB] [\fP\fIfile\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Quit (see the \fBquit\fP command) from the current file of messages
+and read in the file named by the pathname \fIfile\fP. If
+no argument is given, the name and status of the current mailbox shall
+be written.
+.LP
+Several unquoted special characters shall be recognized when used
+as \fIfile\fP names, with the following substitutions:
+.TP 7
+\fB%\fP
+The system mailbox for the invoking user.
+.TP 7
+\fB%\fP\fIuser\fP
+The system mailbox for \fIuser\fP.
+.TP 7
+\fB#\fP
+The previous file.
+.TP 7
+\fB&\fP
+The current \fBmbox\fP.
+.TP 7
+\fB+\fP\fIfile\fP
+The named file in the \fBfolder\fP directory. (See the \fBfolder\fP
+variable.)
+.sp
+.LP
+The default file shall be the current mailbox.
+.SS Display List of Folders
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBfolders\fP
+.fi
+.RE
+.sp
+.LP
+Write the names of the files in the directory set by the \fBfolder\fP
+variable. The command specified by the \fILISTER\fP
+environment variable shall be used (see the ENVIRONMENT VARIABLES
+section).
+.SS Follow Up Specified Messages
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBfo\fP\fB[\fP\fBllowup\fP\fB] [\fP\fImessage\fP\fB]\fP\fBF\fP\fB[\fP\fBollowup\fP\fB] [\fP\fImsglist\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+In the lowercase form, respond to a message, recording the response
+in a file whose name is derived from the author of the
+message. See also the \fBsave\fP and \fBcopy\fP commands and \fBoutfolder\fP.
+.LP
+In the capitalized form, respond to the first message in the \fImsglist\fP,
+sending the message to the author of each message
+in the \fImsglist\fP. The subject line shall be taken from the first
+message and the response shall be recorded in a file whose
+name is derived from the author of the first message. See also the
+\fBSave\fP and \fBCopy\fP commands and \fBoutfolder\fP.
+.LP
+Both forms shall override the \fBrecord\fP variable, if set.
+.SS Display Header Summary for Specified Messages
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBf\fP\fB[\fP\fBrom\fP\fB] [\fP\fImsglist\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Write the header summary for the specified messages.
+.SS Display Header Summary
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBh\fP\fB[\fP\fBeaders\fP\fB] [\fP\fImessage\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Write the page of headers that includes the message specified. If
+the \fImessage\fP argument is not specified, the current
+message shall not change. However, if the \fImessage\fP argument is
+specified, the current message shall become the message that
+appears at the top of the page of headers that includes the message
+specified. The \fBscreen\fP variable sets the number of
+headers per page. See also the \fBz\fP command.
+.SS Help
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBhel\fP\fB[\fP\fBp\fP\fB]\fP\fB?
+\fP
+.fi
+.RE
+.sp
+.LP
+Write a summary of commands.
+.SS Hold Messages
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBho\fP\fB[\fP\fBld\fP\fB] [\fP\fImsglist\fP\fB]\fP\fBpre\fP\fB[\fP\fBserve\fP\fB] [\fP\fImsglist\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Mark the messages in \fImsglist\fP to be retained in the mailbox when
+\fImailx\fP terminates. This shall override any commands
+that might previously have marked the messages to be deleted. During
+the current invocation of \fImailx\fP, only the
+\fBdelete\fP, \fBdp\fP, or \fBdt\fP commands shall remove the \fIpreserve\fP
+marking of a message.
+.SS Execute Commands Conditionally
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBi\fP\fB[\fP\fBf\fP\fB]\fP \fBs|r
+\fP\fImail-command\fP\fBs
+el\fP\fB[\fP\fBse\fP\fB]
+\fP\fImail-command\fP\fBs
+en\fP\fB[\fP\fBdif\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Execute commands conditionally, where \fBif\ s\fP executes the following
+\fImail-command\fPs, up to an \fBelse\fP or
+\fBendif\fP, if the program is in Send Mode, and \fBif\ r\fP shall
+cause the \fImail-command\fPs to be executed only in
+Receive Mode.
+.SS List Available Commands
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBl\fP\fB[\fP\fBist\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Write a list of all commands available. No explanation shall be given.
+.SS Mail a Message
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBm\fP\fB[\fP\fBail\fP\fB]\fP \fIaddress\fP\fB...
+\fP
+.fi
+.RE
+.sp
+.LP
+Mail a message to the specified addresses or aliases.
+.SS Direct Messages to mbox
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBmb\fP\fB[\fP\fBox\fP\fB] [\fP\fImsglist\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Arrange for the given messages to end up in the \fBmbox\fP save file
+when \fImailx\fP terminates normally. See \fIMBOX\fP.
+See also the \fBexit\fP and \fBquit\fP commands.
+.SS Process Next Specified Message
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBn\fP\fB[\fP\fBext\fP\fB] [\fP\fImessage\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+If the current message has not been written (for example, by the \fBprint\fP
+command) since \fImailx\fP started or since any
+other message was the current message, behave as if the \fBprint\fP
+command was entered. Otherwise, if there is an undeleted
+message after the current message, make it the current message and
+behave as if the \fBprint\fP command was entered. Otherwise, an
+informational message to the effect that there are no further messages
+in the mailbox shall be written, followed by the
+\fImailx\fP prompt.
+.SS Pipe Message
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBpi\fP\fB[\fP\fBpe\fP\fB] [[\fP\fImsglist\fP\fB]\fP \fIcommand\fP\fB]\fP\fB|\fP \fB[[\fP\fImsglist\fP\fB]\fP \fIcommand\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Pipe the messages through the given \fIcommand\fP by invoking the
+command interpreter specified by \fISHELL\fP with two
+arguments: \fB-c\fP and \fIcommand\fP. (See also \fIsh\fP \fB-c\fP.)
+The application shall
+ensure that the command is given as a single argument. Quoting, described
+previously, can be used to accomplish this. If no
+arguments are given, the current message shall be piped through the
+command specified by the value of the \fBcmd\fP variable. If
+the \fBpage\fP variable is set, a <form-feed> shall be inserted after
+each message.
+.SS Display Message with Headers
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBP\fP\fB[\fP\fBrint\fP\fB] [\fP\fImsglist\fP\fB]\fP\fBT\fP\fB[\fP\fBype\fP\fB] [\fP\fImsglist\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Write the specified messages, including all header lines, to standard
+output. Override suppression of lines by the
+\fBdiscard\fP, \fBignore\fP, and \fBretain\fP commands. If \fBcrt\fP
+is set, the messages longer than the number of lines
+specified by the \fBcrt\fP variable shall be paged through the command
+specified by the \fIPAGER\fP environment variable.
+.SS Display Message
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBp\fP\fB[\fP\fBrint\fP\fB] [\fP\fImsglist\fP\fB]\fP\fBt\fP\fB[\fP\fBype\fP\fB] [\fP\fImsglist\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Write the specified messages to standard output. If \fBcrt\fP is set,
+the messages longer than the number of lines specified by
+the \fBcrt\fP variable shall be paged through the command specified
+by the \fIPAGER\fP environment variable.
+.SS Quit
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBq\fP\fB[\fP\fBuit\fP\fB]
+\fP\fIend-of-file\fP
+.fi
+.RE
+.sp
+.LP
+Terminate \fImailx\fP, storing messages that were read in \fBmbox\fP
+(if the current mailbox is the system mailbox and unless
+\fBhold\fP is set), deleting messages that have been explicitly saved
+(unless \fBkeepsave\fP is set), discarding messages that
+have been deleted, and saving all remaining messages in the mailbox.
+.SS Reply to a Message List
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBR\fP\fB[\fP\fBeply\fP\fB] [\fP\fImsglist\fP\fB]\fP\fBR\fP\fB[\fP\fBespond\fP\fB] [\fP\fImsglist\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Mail a reply message to the sender of each message in the \fImsglist\fP.
+The subject line shall be formed by concatenating
+\fBRe:\fP <space> (unless it already begins with that string) and
+the subject from the first message. If \fBrecord\fP is
+set to a filename, the response shall be saved at the end of that
+file.
+.LP
+See also the \fBflipr\fP variable.
+.SS Reply to a Message
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBr\fP\fB[\fP\fBeply\fP\fB] [\fP\fImessage\fP\fB]\fP\fBr\fP\fB[\fP\fBespond\fP\fB] [\fP\fImessage\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Mail a reply message to all recipients included in the header of the
+message. The subject line shall be formed by concatenating
+\fBRe:\fP <space> (unless it already begins with that string) and
+the subject from the message. If \fBrecord\fP is set to a
+filename, the response shall be saved at the end of that file.
+.LP
+See also the \fBflipr\fP variable.
+.SS Retain Header Fields
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBret\fP\fB[\fP\fBain\fP\fB] [\fP\fIheader-field\fP\fB...\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Retain the specified header fields when writing messages. This command
+shall override all \fBdiscard\fP and \fBignore\fP
+commands. The comparison of header fields shall be in a case-insensitive
+manner. If no arguments are specified, write a list of the
+currently retained header fields to standard output; the listing need
+not reflect the same order of header fields that were
+entered.
+.SS Save Messages
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBs\fP\fB[\fP\fBave\fP\fB] [\fP\fIfile\fP\fB]\fP\fBs\fP\fB[\fP\fBave\fP\fB] [\fP\fImsglist\fP\fB]\fP \fIfile\fP\fBS\fP\fB[\fP\fBave\fP\fB] [\fP\fImsglist\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Save the specified messages in the file named by the pathname \fIfile\fP,
+or the \fBmbox\fP if the \fIfile\fP argument is
+omitted. The file shall be created if it does not exist; otherwise,
+the messages shall be appended to the file. The message shall
+be put in the state \fIsaved\fP, and shall behave as specified in
+the description of the \fIsaved\fP state when the current
+mailbox is exited by the \fBquit\fP or \fBfile\fP command.
+.LP
+In the capitalized form, save the specified messages in a file whose
+name is derived from the author of the first message. The
+name of the file shall be taken to be the author's name with all network
+addressing stripped off. See also the \fBCopy\fP,
+\fBfollowup\fP, and \fBFollowup\fP commands and \fBoutfolder\fP variable.
+.SS Set Variables
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBse\fP\fB[\fP\fBt\fP\fB] [\fP\fIname\fP\fB[\fP\fB=\fP\fB[\fP\fIstring\fP\fB]]\fP \fB...\fP\fB] [\fP\fIname\fP\fB=\fP\fInumber\fP \fB...\fP\fB] [\fP\fBno\fP\fIname\fP \fB...\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Define one or more variables called \fIname\fP. The variable can be
+given a null, string, or numeric value. Quoting and
+backslash escapes can occur anywhere in \fIstring\fP, as described
+previously, as if the \fIstring\fP portion of the argument
+were the entire argument. The forms \fIname\fP and \fIname\fP= shall
+be equivalent to \fIname\fP="" for variables that take
+string values. The \fBset\fP command without arguments shall write
+a list of all defined variables and their values. The \fBno\fP
+\fIname\fP form shall be equivalent to \fBunset\fP \fIname\fP.
+.SS Invoke a Shell
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBsh\fP\fB[\fP\fBell\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Invoke an interactive command interpreter (see also \fISHELL ).\fP
+.SS Display Message Size
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBsi\fP\fB[\fP\fBze\fP\fB] [\fP\fImsglist\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Write the size in bytes of each of the specified messages.
+.SS Read mailx Commands From a File
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBso\fP\fB[\fP\fBurce\fP\fB]\fP \fIfile\fP
+.fi
+.RE
+.sp
+.LP
+Read and execute commands from the file named by the pathname \fIfile\fP
+and return to command mode.
+.SS Display Beginning of Messages
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBto\fP\fB[\fP\fBp\fP\fB] [\fP\fImsglist\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Write the top few lines of each of the specified messages. If the
+\fBtoplines\fP variable is set, it is taken as the number of
+lines to write. The default shall be 5.
+.SS Touch Messages
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBtou\fP\fB[\fP\fBch\fP\fB] [\fP\fImsglist\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Touch the specified messages. If any message in \fImsglist\fP is not
+specifically deleted nor saved in a file, it shall be
+placed in the \fBmbox\fP upon normal termination. See \fBexit\fP and
+\fBquit\fP.
+.SS Delete Aliases
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBuna\fP\fB[\fP\fBlias\fP\fB] [\fP\fIalias\fP\fB]\fP\fB...
+\fP
+.fi
+.RE
+.sp
+.LP
+Delete the specified alias names. If a specified alias does not exist,
+the results are unspecified.
+.SS Undelete Messages
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBu\fP\fB[\fP\fBndelete\fP\fB] [\fP\fImsglist\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Change the state of the specified messages from deleted to read. If
+\fBautoprint\fP is set, the last message of those restored
+shall be written. If \fImsglist\fP is not specified, the message shall
+be selected as follows:
+.IP " *" 3
+If there are any deleted messages that follow the current message,
+the first of these shall be chosen.
+.LP
+.IP " *" 3
+Otherwise, the last deleted message that also precedes the current
+message shall be chosen.
+.LP
+.SS Unset Variables
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBuns\fP\fB[\fP\fBet\fP\fB]\fP \fIname\fP\fB...
+\fP
+.fi
+.RE
+.sp
+.LP
+Cause the specified variables to be erased.
+.SS Edit Message with Full-Screen Editor
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBv\fP\fB[\fP\fBisual\fP\fB] [\fP\fImsglist\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Edit the given messages with a screen editor. Each message shall be
+placed in a temporary file, and the utility named by the
+\fIVISUAL\fP variable shall be invoked to edit each file in sequence.
+The default editor shall be \fIvi\fP.
+.LP
+The \fBvisual\fP command does not modify the contents of those messages
+in the mailbox.
+.SS Write Messages to a File
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBw\fP\fB[\fP\fBrite\fP\fB] [\fP\fImsglist\fP\fB]\fP \fIfile\fP
+.fi
+.RE
+.sp
+.LP
+Write the given messages to the file specified by the pathname \fIfile\fP,
+minus the message header. Otherwise, it shall be
+equivalent to the \fBsave\fP command.
+.SS Scroll Header Display
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBz\fP\fB[\fP\fB+|-\fP\fB]\fP
+.fi
+.RE
+.sp
+.LP
+Scroll the header display forward (if \fB'+'\fP is specified or if
+no option is specified) or backward (if \fB'-'\fP is
+specified) one screenful. The number of headers written shall be set
+by the \fBscreen\fP variable.
+.SS Invoke Shell Command
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB!\fP\fIcommand\fP
+.fi
+.RE
+.sp
+.LP
+Invoke the command interpreter specified by \fISHELL\fP with two arguments:
+\fB-c\fP and \fIcommand\fP. (See also \fIsh\fP \fB-c\fP.) If the \fBbang\fP
+variable is set, each unescaped occurrence of \fB'!'\fP in
+\fIcommand\fP shall be replaced with the command executed by the previous
+\fB!\fP command or \fB~!\fP command escape.
+.SS Null Command
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB#\fP \fIcomment\fP
+.fi
+.RE
+.sp
+.LP
+This null command (comment) shall be ignored by \fImailx\fP.
+.SS Display Current Message Number
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB=
+\fP
+.fi
+.RE
+.sp
+.LP
+Write the current message number.
+.SS Command Escapes in mailx
+.LP
+The following commands can be entered only from input mode, by beginning
+a line with the escape character (by default, tilde (
+\fB'~'\fP )). See the \fBescape\fP variable description for changing
+this special character. The format for the commands
+shall be:
+.sp
+.RS
+.nf
+
+\fB<\fP\fIescape-character\fP\fB><\fP\fIcommand-char\fP\fB><\fP\fIseparator\fP\fB>\fP\fB[\fP\fB<\fP\fIarguments\fP\fB>\fP\fB]\fP
+.fi
+.RE
+.LP
+where the <\fIseparator\fP> can be zero or more <blank>s.
+.LP
+In the following descriptions, the application shall ensure that the
+argument \fIcommand\fP (but not \fImailx-command)\fP is a
+shell command string. Any string acceptable to the command interpreter
+specified by the \fISHELL\fP variable when it is invoked as
+\fISHELL\fP \fB-c\fP \fIcommand_string\fP shall be valid. The command
+can be presented as multiple arguments (that is, quoting
+is not required).
+.LP
+Command escapes that are listed with \fImsglist\fP or \fImailx-command\fP
+arguments are invalid in Send Mode and produce
+unspecified results.
+.TP 7
+\fB~!\ \fP \fIcommand\fP
+Invoke the command interpreter specified by \fISHELL\fP with two arguments:
+\fB-c\fP and \fIcommand\fP; and then return to
+input mode. If the \fBbang\fP variable is set, each unescaped occurrence
+of \fB'!'\fP in \fIcommand\fP shall be replaced with
+the command executed by the previous \fB!\fP command or \fB~!\fP command
+escape.
+.TP 7
+\fB~.\fP
+Simulate end-of-file (terminate message input).
+.TP 7
+\fB~:\ \fP \fImailx-command\fP,\ \fB~_\ \fP \fImailx-command\fP
+.sp
+Perform the command-level request.
+.TP 7
+\fB~?\fP
+Write a summary of command escapes.
+.TP 7
+\fB~A\fP
+This shall be equivalent to \fB~i\ Sign\fP.
+.TP 7
+\fB~a\fP
+This shall be equivalent to \fB~i\ sign\fP.
+.TP 7
+\fB~b\ \fP \fIname\fP...
+Add the \fIname\fPs to the blind carbon copy ( \fBBcc\fP) list.
+.TP 7
+\fB~c\ \fP \fIname\fP...
+Add the \fIname\fPs to the carbon copy ( \fBCc\fP) list.
+.TP 7
+\fB~d\fP
+Read in the dead-letter file. See \fIDEAD\fP for a description of
+this file.
+.TP 7
+\fB~e\fP
+Invoke the editor, as specified by the \fIEDITOR\fP environment variable,
+on the partial message.
+.TP 7
+\fB~f\ [\fP\fImsglist\fP\fB]\fP
+Forward the specified messages. The specified messages shall be inserted
+into the current message without alteration. This
+command escape also shall insert message headers into the message
+with field selection affected by the \fBdiscard\fP,
+\fBignore\fP, and \fBretain\fP commands.
+.TP 7
+\fB~F\ [\fP\fImsglist\fP\fB]\fP
+This shall be the equivalent of the \fB~f\fP command escape, except
+that all headers shall be included in the message,
+regardless of previous \fBdiscard\fP, \fBignore\fP, and \fBretain\fP
+commands.
+.TP 7
+\fB~h\fP
+If standard input is a terminal, prompt for a \fBSubject\fP line and
+the \fBTo\fP, \fBCc\fP, and \fBBcc\fP lists. Other
+implementation-defined headers may also be presented for editing.
+If the field is written with an initial value, it can be edited
+as if it had just been typed.
+.TP 7
+\fB~i\ \fP \fIstring\fP
+Insert the value of the named variable, followed by a <newline>, into
+the text of the message. If the string is unset or
+null, the message shall not be changed.
+.TP 7
+\fB~m\ [\fP\fImsglist\fP\fB]\fP
+Insert the specified messages into the message, prefixing non-empty
+lines with the string in the \fBindentprefix\fP variable.
+This command escape also shall insert message headers into the message,
+with field selection affected by the \fBdiscard\fP,
+\fBignore\fP, and \fBretain\fP commands.
+.TP 7
+\fB~M\ [\fP\fImsglist\fP\fB]\fP
+This shall be the equivalent of the \fB~m\fP command escape, except
+that all headers shall be included in the message,
+regardless of previous \fBdiscard\fP, \fBignore\fP, and \fBretain\fP
+commands.
+.TP 7
+\fB~p\fP
+Write the message being entered. If the message is longer than \fBcrt\fP
+lines (see Internal
+Variables in mailx ), the output shall be paginated as described for
+the \fIPAGER\fP variable.
+.TP 7
+\fB~q\fP
+Quit (see the \fBquit\fP command) from input mode by simulating an
+interrupt. If the body of the message is not empty, the
+partial message shall be saved in the dead-letter file. See \fIDEAD\fP
+for a description of this file.
+.TP 7
+\fB~r\ \fP \fIfile\fP,\ \fB~<\ \fP
+\fIfile\fP,\ \fB~r\ !\fP\fIcommand\fP,\ \fB~<\ !\fP\fIcommand\fP
+.sp
+Read in the file specified by the pathname \fIfile\fP. If the argument
+begins with an exclamation mark ( \fB'!'\fP ), the rest
+of the string shall be taken as an arbitrary system command; the command
+interpreter specified by \fISHELL\fP shall be invoked
+with two arguments: \fB-c\fP and \fIcommand\fP. The standard output
+of \fIcommand\fP shall be inserted into the message.
+.TP 7
+\fB~s\ \fP \fIstring\fP
+Set the subject line to \fIstring\fP.
+.TP 7
+\fB~t\ \fP \fIname\fP...
+Add the given \fIname\fPs to the \fBTo\fP list.
+.TP 7
+\fB~v\fP
+Invoke the full-screen editor, as specified by the \fIVISUAL\fP environment
+variable, on the partial message.
+.TP 7
+\fB~w\ \fP \fIfile\fP
+Write the partial message, without the header, onto the file named
+by the pathname \fIfile\fP. The file shall be created or
+the message shall be appended to it if the file exists.
+.TP 7
+\fB~x\fP
+Exit as with \fB~q\fP, except the message shall not be saved in the
+dead-letter file.
+.TP 7
+\fB~|\ \fP \fIcommand\fP
+Pipe the body of the message through the given \fIcommand\fP by invoking
+the command interpreter specified by \fISHELL\fP
+with two arguments: \fB-c\fP and \fIcommand\fP. If the \fIcommand\fP
+returns a successful exit status, the standard output of
+the command shall replace the message. Otherwise, the message shall
+remain unchanged. If the \fIcommand\fP fails, an error message
+giving the exit status shall be written.
+.sp
+.SH EXIT STATUS
+.LP
+When the \fB-e\fP option is specified, the following exit values are
+returned:
+.TP 7
+\ 0
+Mail was found.
+.TP 7
+>0
+Mail was not found or an error occurred.
+.sp
+.LP
+Otherwise, the following exit values are returned:
+.TP 7
+\ 0
+Successful completion; note that this status implies that all messages
+were \fIsent\fP, but it gives no assurances that any of
+them were actually \fIdelivered\fP.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+When in input mode (Receive Mode) or Send Mode:
+.IP " *" 3
+If an error is encountered processing a command escape (see Command
+Escapes in mailx ), a
+diagnostic message shall be written to standard error, and the message
+being composed may be modified, but this condition shall not
+prevent the message from being sent.
+.LP
+.IP " *" 3
+Other errors shall prevent the sending of the message.
+.LP
+.LP
+When in command mode:
+.IP " *" 3
+Default.
+.LP
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Delivery of messages to remote systems requires the existence of communication
+paths to such systems. These need not exist.
+.LP
+Input lines are limited to {LINE_MAX} bytes, but mailers between systems
+may impose more severe line-length restrictions. This
+volume of IEEE\ Std\ 1003.1-2001 does not place any restrictions on
+the length of messages handled by \fImailx\fP, and for
+delivery of local messages the only limitations should be the normal
+problems of available disk space for the target mail file.
+When sending messages to external machines, applications are advised
+to limit messages to less than 100000 bytes because some mail
+gateways impose message-length restrictions.
+.LP
+The format of the system mailbox is intentionally unspecified. Not
+all systems implement system mailboxes as flat files,
+particularly with the advent of multimedia mail messages. Some system
+mailboxes may be multiple files, others records in a
+database. The internal format of the messages themselves is specified
+with the historical format from Version\ 7, but only
+after the messages have been saved in some file other than the system
+mailbox. This was done so that many historical applications
+expecting text-file mailboxes are not broken.
+.LP
+Some new formats for messages can be expected in the future, probably
+including binary data, bit maps, and various multimedia
+objects. As described here, \fImailx\fP is not prohibited from handling
+such messages, but it must store them as text files in
+secondary mailboxes (unless some extension, such as a variable or
+command line option, is used to change the stored format). Its
+method of doing so is implementation-defined and might include translating
+the data into text file-compatible or readable form or
+omitting certain portions of the message from the stored output.
+.LP
+The \fBdiscard\fP and \fBignore\fP commands are not inverses of the
+\fBretain\fP command. The \fBretain\fP command discards
+all header-fields except those explicitly retained. The \fBdiscard\fP
+command keeps all header-fields except those explicitly
+discarded. If headers exist on the retained header list, \fBdiscard\fP
+and \fBignore\fP commands are ignored.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The standard developers felt strongly that a method for applications
+to send messages to specific users was necessary. The
+obvious example is a batch utility, running non-interactively, that
+wishes to communicate errors or results to a user. However, the
+actual format, delivery mechanism, and method of reading the message
+are clearly beyond the scope of this volume of
+IEEE\ Std\ 1003.1-2001.
+.LP
+The intent of this command is to provide a simple, portable interface
+for sending messages non-interactively. It merely defines
+a "front-end" to the historical mail system. It is suggested that
+implementations explicitly denote the sender and recipient in
+the body of the delivered message. Further specification of formats
+for either the message envelope or the message itself were
+deliberately not made, as the industry is in the midst of changing
+from the current standards to a more internationalized standard
+and it is probably incorrect, at this time, to require either one.
+.LP
+Implementations are encouraged to conform to the various delivery
+mechanisms described in the CCITT X.400 standards or to the
+equivalent Internet standards, described in Internet Request for Comment
+(RFC) documents RFC\ 819, RFC\ 822, RFC\ 920,
+RFC\ 921, and RFC\ 1123.
+.LP
+Many historical systems modified each body line that started with
+\fBFrom\ \fP by prefixing the \fB'F'\fP with
+\fB'>'\fP . It is unnecessary, but allowed, to do that when the string
+does not follow a blank line because it cannot be
+confused with the next header.
+.LP
+The \fBedit\fP and \fBvisual\fP commands merely edit the specified
+messages in a temporary file. They do not modify the
+contents of those messages in the mailbox; such a capability could
+be added as an extension, such as by using different command
+names.
+.LP
+The restriction on a subject line being {LINE_MAX}-10 bytes is based
+on the historical format that consumes 10 bytes for
+\fBSubject:\ \fP and the trailing <newline>. Many historical mailers
+that a message may encounter on other systems are
+not able to handle lines that long, however.
+.LP
+Like the utilities \fIlogger\fP and \fIlp\fP,
+\fImailx\fP admittedly is difficult to test. This was not deemed sufficient
+justification to exclude this utility from this volume
+of IEEE\ Std\ 1003.1-2001. It is also arguable that it is, in fact,
+testable, but that the tests themselves are not
+portable.
+.LP
+When \fImailx\fP is being used by an application that wishes to receive
+the results as if none of the User Portability
+Utilities option features were supported, the \fIDEAD\fP environment
+variable must be set to \fB/dev/null\fP. Otherwise, it may
+be subject to the file creations described in \fImailx\fP ASYNCHRONOUS
+EVENTS. Similarly, if the \fIMAILRC\fP environment
+variable is not set to \fB/dev/null\fP, historical versions of \fImailx\fP
+and \fIMail\fP read initialization commands from a
+file before processing begins. Since the initialization that a user
+specifies could alter the contents of messages an application
+is trying to send, such applications must set \fIMAILRC\fP to \fB/dev/null\fP.
+.LP
+The description of \fILC_TIME\fP uses "may affect" because many historical
+implementations do not or cannot manipulate the
+date and time strings in the incoming mail headers. Some headers found
+in incoming mail do not have enough information to determine
+the timezone in which the mail originated, and, therefore, \fImailx\fP
+cannot convert the date and time strings into the internal
+form that then is parsed by routines like \fIstrftime\fP() that can
+take \fILC_TIME\fP
+settings into account. Changing all these times to a user-specified
+format is allowed, but not required.
+.LP
+The paginator selected when \fIPAGER\fP is null or unset is partially
+unspecified to allow the System V historical practice of
+using \fIpg\fP as the default. Bypassing the pagination function,
+such as by declaring that \fIcat\fP is the paginator, would not meet
+with the intended meaning of this description. However, any
+"portable user" would have to set \fIPAGER\fP explicitly to get his
+or her preferred paginator on all systems. The paginator
+choice was made partially unspecified, unlike the \fIVISUAL\fP editor
+choice (mandated to be \fIvi\fP) because most historical pagers follow
+a common theme of user input, whereas editors differ
+dramatically.
+.LP
+Options to specify addresses as \fBcc\fP (carbon copy) or \fBbcc\fP
+(blind carbon copy) were considered to be format details
+and were omitted.
+.LP
+A zero exit status implies that all messages were \fIsent\fP, but
+it gives no assurances that any of them were actually
+\fIdelivered\fP. The reliability of the delivery mechanism is unspecified
+and is an appropriate marketing distinction between
+systems.
+.LP
+In order to conform to the Utility Syntax Guidelines, a solution was
+required to the optional \fIfile\fP option-argument to
+\fB-f\fP. By making \fIfile\fP an operand, the guidelines are satisfied
+and users remain portable. However, it does force
+implementations to support usage such as:
+.sp
+.RS
+.nf
+
+\fBmailx -fin mymail.box
+\fP
+.fi
+.RE
+.LP
+The \fBno\fP \fIname\fP method of unsetting variables is not present
+in all historical systems, but it is in System V and
+provides a logical set of commands corresponding to the format of
+the display of options from the \fImailx\fP \fIset\fP command without
+arguments.
+.LP
+The \fBask\fP and \fBasksub\fP variables are the names selected by
+BSD and System V, respectively, for the same feature. They
+are synonyms in this volume of IEEE\ Std\ 1003.1-2001.
+.LP
+The \fImailx\fP \fIecho\fP command was not documented in the BSD version
+and has been
+omitted here because it is not obviously useful for interactive users.
+.LP
+The default prompt on the System V \fImailx\fP is a question mark,
+on BSD \fIMail\fP an ampersand. Since this volume of
+IEEE\ Std\ 1003.1-2001 chose the \fImailx\fP name, it kept the System
+V default, assuming that BSD users would not have
+difficulty with this minor incompatibility (that they can override).
+.LP
+The meanings of \fBr\fP and \fBR\fP are reversed between System V
+\fImailx\fP and SunOS \fIMail\fP. Once again, since this
+volume of IEEE\ Std\ 1003.1-2001 chose the \fImailx\fP name, it kept
+the System V default, but allows the SunOS user to
+achieve the desired results using \fBflipr\fP, an internal variable
+in System V \fImailx\fP, although it has not been documented
+in the SVID.
+.LP
+The \fBindentprefix\fP variable, the \fBretain\fP and \fBunalias\fP
+commands, and the \fB~F\fP and \fB~M\fP
+command escapes were adopted from 4.3 BSD \fIMail\fP.
+.LP
+The \fBversion\fP command was not included because no sufficiently
+general specification of the version information could be
+devised that would still be useful to a portable user. This command
+name should be used by suppliers who wish to provide version
+information about the \fImailx\fP command.
+.LP
+The "implementation-specific (unspecified) system start-up file" historically
+has been named \fB/etc/mailx.rc\fP, but this
+specific name and location are not required.
+.LP
+The intent of the wording for the \fBnext\fP command is that if any
+command has already displayed the current message it should
+display a following message, but, otherwise, it should display the
+current message. Consider the command sequence:
+.sp
+.RS
+.nf
+
+\fBnext 3
+delete 3
+next
+\fP
+.fi
+.RE
+.LP
+where the \fBautoprint\fP option was not set. The normative text specifies
+that the second \fBnext\fP command should display a
+message following the third message, because even though the current
+message has not been displayed since it was set by the
+\fBdelete\fP command, it has been displayed since the current message
+was anything other than message number 3. This does not
+always match historical practice in some implementations, where the
+command file address followed by \fBnext\fP (or the default
+command) would skip the message for which the user had searched.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIShell Command Language\fP, \fIed\fP, \fIls\fP, \fImore\fP,
+\fIvi\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/make.1p b/man-pages-posix-2003/man1p/make.1p
new file mode 100644
index 0000000..42554ee
--- /dev/null
+++ b/man-pages-posix-2003/man1p/make.1p
@@ -0,0 +1,1758 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MAKE" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" make
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+make \- maintain, update, and regenerate groups of programs (\fBDEVELOPMENT\fP)
+.SH SYNOPSIS
+.LP
+\fBmake\fP \fB[\fP\fB-einpqrst\fP\fB][\fP\fB-f\fP \fImakefile\fP\fB]\fP\fB...\fP\fB[\fP
+\fB-k| -S\fP\fB][\fP\fImacro\fP\fB=\fP\fIvalue\fP\fB]\fP\fB...
+.br
+\ \ \ \ \ \ \fP \fB[\fP\fItarget_name\fP\fB...\fP\fB]\fP\fB\fP
+.SH DESCRIPTION
+.LP
+The \fImake\fP utility shall update files that are derived from other
+files. A typical case is one where object files are
+derived from the corresponding source files. The \fImake\fP utility
+examines time relationships and shall update those derived
+files (called targets) that have modified times earlier than the modified
+times of the files (called prerequisites) from which they
+are derived. A description file (makefile) contains a description
+of the relationships between files, and the commands that need to
+be executed to update the targets to reflect changes in their prerequisites.
+Each specification, or rule, shall consist of a
+target, optional prerequisites, and optional commands to be executed
+when a prerequisite is newer than the target. There are two
+types of rule:
+.IP " 1." 4
+\fIInference rules\fP, which have one target name with at least one
+period ( \fB'.'\fP ) and no slash ( \fB'/'\fP )
+.LP
+.IP " 2." 4
+\fITarget rules\fP, which can have more than one target name
+.LP
+.LP
+In addition, \fImake\fP shall have a collection of built-in macros
+and inference rules that infer prerequisite relationships to
+simplify maintenance of programs.
+.LP
+To receive exactly the behavior described in this section, the user
+shall ensure that a portable makefile shall:
+.IP " *" 3
+Include the special target \fB.POSIX\fP
+.LP
+.IP " *" 3
+Omit any special target reserved for implementations (a leading period
+followed by uppercase letters) that has not been
+specified by this section
+.LP
+.LP
+The behavior of \fImake\fP is unspecified if either or both of these
+conditions are not met.
+.SH OPTIONS
+.LP
+The \fImake\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-e\fP
+Cause environment variables, including those with null values, to
+override macro assignments within makefiles.
+.TP 7
+\fB-f\ \fP \fImakefile\fP
+Specify a different makefile. The argument \fImakefile\fP is a pathname
+of a description file, which is also referred to as
+the \fImakefile\fP. A pathname of \fB'-'\fP shall denote the standard
+input. There can be multiple instances of this option,
+and they shall be processed in the order specified. The effect of
+specifying the same option-argument more than once is
+unspecified.
+.TP 7
+\fB-i\fP
+Ignore error codes returned by invoked commands. This mode is the
+same as if the special target \fB.IGNORE\fP were specified
+without prerequisites.
+.TP 7
+\fB-k\fP
+Continue to update other targets that do not depend on the current
+target if a non-ignored error occurs while executing the
+commands to bring a target up-to-date.
+.TP 7
+\fB-n\fP
+Write commands that would be executed on standard output, but do not
+execute them. However, lines with a plus sign (
+\fB'+'\fP ) prefix shall be executed. In this mode, lines with an
+at sign ( \fB'@'\fP ) character prefix shall be written to
+standard output.
+.TP 7
+\fB-p\fP
+Write to standard output the complete set of macro definitions and
+target descriptions. The output format is unspecified.
+.TP 7
+\fB-q\fP
+Return a zero exit value if the target file is up-to-date; otherwise,
+return an exit value of 1. Targets shall not be updated
+if this option is specified. However, a makefile command line (associated
+with the targets) with a plus sign ( \fB'+'\fP )
+prefix shall be executed.
+.TP 7
+\fB-r\fP
+Clear the suffix list and do not use the built-in rules.
+.TP 7
+\fB-S\fP
+Terminate \fImake\fP if an error occurs while executing the commands
+to bring a target up-to-date. This shall be the default
+and the opposite of \fB-k\fP.
+.TP 7
+\fB-s\fP
+Do not write makefile command lines or touch messages (see \fB-t\fP)
+to standard output before executing. This mode shall be
+the same as if the special target \fB.SILENT\fP were specified without
+prerequisites.
+.TP 7
+\fB-t\fP
+Update the modification time of each target as though a \fItouch\fP
+\fItarget\fP had
+been executed. Targets that have prerequisites but no commands (see
+Target Rules ), or that are
+already up-to-date, shall not be touched in this manner. Write messages
+to standard output for each target file indicating the name
+of the file and that it was touched. Normally, the \fImakefile\fP
+command lines associated with each target are not executed.
+However, a command line with a plus sign ( \fB'+'\fP ) prefix shall
+be executed.
+.sp
+.LP
+Any options specified in the \fIMAKEFLAGS\fP environment variable
+shall be evaluated before any options specified on the
+\fImake\fP utility command line. If the \fB-k\fP and \fB-S\fP options
+are both specified on the \fImake\fP utility command line
+or by the \fIMAKEFLAGS\fP environment variable, the last option specified
+shall take precedence. If the \fB-f\fP or \fB-p\fP
+options appear in the \fIMAKEFLAGS\fP environment variable, the result
+is undefined.
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fItarget_name\fP
+Target names, as defined in the EXTENDED DESCRIPTION section. If no
+target is specified, while \fImake\fP is processing the
+makefiles, the first target that \fImake\fP encounters that is not
+a special target or an inference rule shall be used.
+.TP 7
+\fImacro\fP=\fIvalue\fP
+Macro definitions, as defined in Macros .
+.sp
+.LP
+If the \fItarget_name\fP and \fImacro\fP= \fIvalue\fP operands are
+intermixed on the \fImake\fP utility command line, the
+results are unspecified.
+.SH STDIN
+.LP
+The standard input shall be used only if the \fImakefile\fP option-argument
+is \fB'-'\fP . See the INPUT FILES section.
+.SH INPUT FILES
+.LP
+The input file, otherwise known as the makefile, is a text file containing
+rules, macro definitions, and comments. See the
+EXTENDED DESCRIPTION section.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fImake\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fIMAKEFLAGS\fP
+.sp
+This variable shall be interpreted as a character string representing
+a series of option characters to be used as the default
+options. The implementation shall accept both of the following formats
+(but need not accept them when intermixed):
+.RS
+.IP " *" 3
+The characters are option letters without the leading hyphens or <blank>
+separation used on a \fImake\fP utility command
+line.
+.LP
+.IP " *" 3
+The characters are formatted in a manner similar to a portion of the
+\fImake\fP utility command line: options are preceded by
+hyphens and <blank>-separated as described in the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+The \fImacro\fP= \fIvalue\fP macro
+definition operands can also be included. The difference between the
+contents of \fIMAKEFLAGS\fP and the \fImake\fP utility
+command line is that the contents of the variable shall not be subjected
+to the word expansions (see \fIWord Expansions\fP ) associated with
+parsing the command line values.
+.LP
+.RE
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fIPROJECTDIR\fP
+.sp
+Provide a directory to be used to search for SCCS files not found
+in the current directory. In all of the following cases, the
+search for SCCS files is made in the directory \fBSCCS\fP in the identified
+directory. If the value of \fIPROJECTDIR\fP begins
+with a slash, it shall be considered an absolute pathname; otherwise,
+the value of \fIPROJECTDIR\fP is treated as a user name and
+that user's initial working directory shall be examined for a subdirectory
+\fBsrc\fP or \fBsource\fP. If such a directory is
+found, it shall be used. Otherwise, the value is used as a relative
+pathname.
+.LP
+If \fIPROJECTDIR\fP is not set or has a null value, the search for
+SCCS files shall be made in the directory \fBSCCS\fP in the
+current directory.
+.LP
+The setting of \fIPROJECTDIR\fP affects all files listed in the remainder
+of this utility description for files with a
+component named \fBSCCS\fP.
+.sp
+.LP
+The value of the \fISHELL\fP environment variable shall not be used
+as a macro and shall not be modified by defining the
+\fBSHELL\fP macro in a makefile or on the command line. All other
+environment variables, including those with null values, shall
+be used as macros, as defined in Macros .
+.SH ASYNCHRONOUS EVENTS
+.LP
+If not already ignored, \fImake\fP shall trap SIGHUP, SIGTERM, SIGINT,
+and SIGQUIT and remove the current target unless the
+target is a directory or the target is a prerequisite of the special
+target \fB.PRECIOUS\fP or unless one of the \fB-n\fP,
+\fB-p\fP, or \fB-q\fP options was specified. Any targets removed in
+this manner shall be reported in diagnostic messages of
+unspecified format, written to standard error. After this cleanup
+process, if any, \fImake\fP shall take the standard action for
+all other signals.
+.SH STDOUT
+.LP
+The \fImake\fP utility shall write all commands to be executed to
+standard output unless the \fB-s\fP option was specified,
+the command is prefixed with an at sign, or the special target \fB.SILENT\fP
+has either the current target as a prerequisite or
+has no prerequisites. If \fImake\fP is invoked without any work needing
+to be done, it shall write a message to standard output
+indicating that no action was taken. If the \fB-t\fP option is present
+and a file is touched, \fImake\fP shall write to standard
+output a message of unspecified format indicating that the file was
+touched, including the filename of the file.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+Files can be created when the \fB-t\fP option is present. Additional
+files can also be created by the utilities invoked by
+\fImake\fP.
+.SH EXTENDED DESCRIPTION
+.LP
+The \fImake\fP utility attempts to perform the actions required to
+ensure that the specified targets are up-to-date. A target
+is considered out-of-date if it is older than any of its prerequisites
+or if it does not exist. The \fImake\fP utility shall treat
+all prerequisites as targets themselves and recursively ensure that
+they are up-to-date, processing them in the order in which they
+appear in the rule. The \fImake\fP utility shall use the modification
+times of files to determine whether the corresponding
+targets are out-of-date.
+.LP
+After \fImake\fP has ensured that all of the prerequisites of a target
+are up-to-date and if the target is out-of-date, the
+commands associated with the target entry shall be executed. If there
+are no commands listed for the target, the target shall be
+treated as up-to-date.
+.SS Makefile Syntax
+.LP
+A makefile can contain rules, macro definitions (see Macros ), and
+comments. There are two kinds
+of rules: \fIinference rules\fP and \fItarget rules\fP. The \fImake\fP
+utility shall contain a set of built-in inference rules.
+If the \fB-r\fP option is present, the built-in rules shall not be
+used and the suffix list shall be cleared. Additional rules of
+both types can be specified in a makefile. If a rule is defined more
+than once, the value of the rule shall be that of the last one
+specified. Macros can also be defined more than once, and the value
+of the macro is specified in Macros . Comments start with a number
+sign ( \fB'#'\fP ) and continue until an unescaped <newline>
+is reached.
+.LP
+By default, the following files shall be tried in sequence: \fB./makefile\fP
+and \fB./Makefile\fP. If neither
+\fB\&./makefile\fP or \fB./Makefile\fP are found, other implementation-defined
+files may also be tried. On
+XSI-conformant systems, the additional files \fB./s.makefile\fP, \fBSCCS/s.makefile\fP,
+\fB\&./s.Makefile\fP, and
+\fBSCCS/s.Makefile\fP shall also be tried.
+.LP
+The \fB-f\fP option shall direct \fImake\fP to ignore any of these
+default files and use the specified argument as a makefile
+instead. If the \fB'-'\fP argument is specified, standard input shall
+be used.
+.LP
+The term \fImakefile\fP is used to refer to any rules provided by
+the user, whether in \fB./makefile\fP or its variants, or
+specified by the \fB-f\fP option.
+.LP
+The rules in makefiles shall consist of the following types of lines:
+target rules, including special targets (see Target Rules ), inference
+rules (see Inference Rules ), macro definitions
+(see Macros ), empty lines, and comments.
+.LP
+When an escaped <newline> (one preceded by a backslash) is found anywhere
+in the makefile except in a command line, it
+shall be replaced, along with any leading white space on the following
+line, with a single <space>. When an escaped
+<newline> is found in a command line in a makefile, the command line
+shall contain the backslash, the <newline>, and
+the next line, except that the first character of the next line shall
+not be included if it is a <tab>.
+.SS Makefile Execution
+.LP
+Makefile command lines shall be processed one at a time by writing
+the makefile command line to the standard output (unless one
+of the conditions listed under \fB'@'\fP suppresses the writing) and
+executing the command(s) in the line. A <tab> may
+precede the command to standard output. Command execution shall be
+as if the makefile command line were the argument to the \fIsystem\fP()
+function. The environment for the command being executed shall contain
+all of
+the variables in the environment of \fImake\fP.
+.LP
+By default, when \fImake\fP receives a non-zero status from the execution
+of a command, it shall terminate with an error
+message to standard error.
+.LP
+Makefile command lines can have one or more of the following prefixes:
+a hyphen ( \fB'-'\fP ), an at sign ( \fB'@'\fP ),
+or a plus sign ( \fB'+'\fP ). These shall modify the way in which
+\fImake\fP processes the command. When a command is written
+to standard output, the prefix shall not be included in the output.
+.TP 7
+\fB-\fP
+If the command prefix contains a hyphen, or the \fB-i\fP option is
+present, or the special target \fB.IGNORE\fP has either
+the current target as a prerequisite or has no prerequisites, any
+error found while executing the command shall be ignored.
+.TP 7
+\fB@\fP
+If the command prefix contains an at sign and the \fImake\fP utility
+command line \fB-n\fP option is not specified, or the
+\fB-s\fP option is present, or the special target \fB.SILENT\fP has
+either the current target as a prerequisite or has no
+prerequisites, the command shall not be written to standard output
+before it is executed.
+.TP 7
+\fB+\fP
+If the command prefix contains a plus sign, this indicates a makefile
+command line that shall be executed even if \fB-n\fP,
+\fB-q\fP, or \fB-t\fP is specified.
+.sp
+.SS Target Rules
+.LP
+Target rules are formatted as follows:
+.sp
+.RS
+.nf
+
+\fItarget\fP \fB[\fP\fItarget\fP\fB...\fP\fB]\fP\fB:\fP \fB[\fP\fIprerequisite\fP\fB...\fP\fB][;\fP\fIcommand\fP\fB]
+[\fP\fB<tab>\fP\fIcommand\fP\fB<tab>\fP\fIcommand\fP\fB...\fP\fB]\fP\fB
+.br
+
+\fP\fIline that does not begin with\fP \fB<tab>
+\fP
+.fi
+.RE
+.LP
+Target entries are specified by a <blank>-separated, non-null list
+of targets, then a colon, then a
+<blank>-separated, possibly empty list of prerequisites. Text following
+a semicolon, if any, and all following lines that
+begin with a <tab>, are makefile command lines to be executed to update
+the target. The first non-empty line that does not
+begin with a <tab> or \fB'#'\fP shall begin a new entry. An empty
+or blank line, or a line beginning with \fB'#'\fP,
+may begin a new entry.
+.LP
+Applications shall select target names from the set of characters
+consisting solely of periods, underscores, digits, and
+alphabetics from the portable character set (see the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Section 6.1, Portable Character
+Set). Implementations may allow other characters in
+target names as extensions. The interpretation of targets containing
+the characters \fB'%'\fP and \fB''\fP is
+implementation-defined.
+.LP
+A target that has prerequisites, but does not have any commands, can
+be used to add to the prerequisite list for that target.
+Only one target rule for any given target can contain commands.
+.LP
+Lines that begin with one of the following are called \fIspecial targets\fP
+and control the operation of \fImake\fP:
+.TP 7
+\fB\&.DEFAULT\fP
+If the makefile uses this special target, the application shall ensure
+that it is specified with commands, but without
+prerequisites. The commands shall be used by \fImake\fP if there are
+no other rules available to build a target.
+.TP 7
+\fB\&.IGNORE\fP
+Prerequisites of this special target are targets themselves; this
+shall cause errors from commands associated with them to be
+ignored in the same manner as specified by the \fB-i\fP option. Subsequent
+occurrences of \fB.IGNORE\fP shall add to the list of
+targets ignoring command errors. If no prerequisites are specified,
+\fImake\fP shall behave as if the \fB-i\fP option had been
+specified and errors from all commands associated with all targets
+shall be ignored.
+.TP 7
+\fB\&.POSIX\fP
+The application shall ensure that this special target is specified
+without prerequisites or commands. If it appears as the
+first non-comment line in the makefile, \fImake\fP shall process the
+makefile as specified by this section; otherwise, the
+behavior of \fImake\fP is unspecified.
+.TP 7
+\fB\&.PRECIOUS\fP
+Prerequisites of this special target shall not be removed if \fImake\fP
+receives one of the asynchronous events explicitly
+described in the ASYNCHRONOUS EVENTS section. Subsequent occurrences
+of \fB.PRECIOUS\fP shall add to the list of precious files.
+If no prerequisites are specified, all targets in the makefile shall
+be treated as if specified with \fB.PRECIOUS\fP.
+.TP 7
+\fB\&.SCCS_GET\fP
+The application shall ensure that this special target is specified
+without prerequisites. If this special target is included in a
+makefile, the commands specified with this target shall replace the
+default commands associated with this special target (see Default
+Rules ). The commands specified with this target are used to get all
+SCCS files that are not
+found in the current directory.
+.LP
+When source files are named in a dependency list, \fImake\fP shall
+treat them just like any other target. Because the source
+file is presumed to be present in the directory, there is no need
+to add an entry for it to the makefile. When a target has no
+dependencies, but is present in the directory, \fImake\fP shall assume
+that that file is up-to-date. If, however, an SCCS file
+named \fBSCCS/s.\fP \fIsource_file\fP is found for a target \fIsource_file\fP,
+\fImake\fP compares the timestamp of the target
+file with that of the \fBSCCS/s.source_file\fP to ensure the target
+is up-to-date. If the target is missing, or if the SCCS file
+is newer, \fImake\fP shall automatically issue the commands specified
+for the \fB.SCCS_GET\fP special target to retrieve the most
+recent version. However, if the target is writable by anyone, \fImake\fP
+shall not retrieve a new version.
+.TP 7
+\fB\&.SILENT\fP
+Prerequisites of this special target are targets themselves; this
+shall cause commands associated with them not to be written
+to the standard output before they are executed. Subsequent occurrences
+of \fB.SILENT\fP shall add to the list of targets with
+silent commands. If no prerequisites are specified, \fImake\fP shall
+behave as if the \fB-s\fP option had been specified and no
+commands or touch messages associated with any target shall be written
+to standard output.
+.TP 7
+\fB\&.SUFFIXES\fP
+Prerequisites of \fB.SUFFIXES\fP shall be appended to the list of
+known suffixes and are used in conjunction with the
+inference rules (see Inference Rules ). If \fB.SUFFIXES\fP does not
+have any prerequisites, the
+list of known suffixes shall be cleared.
+.sp
+.LP
+The special targets \fB.IGNORE\fP, \fB.POSIX\fP, \fB.PRECIOUS\fP,
+\fB\&.SILENT\fP, and \fB.SUFFIXES\fP shall be specified
+without commands.
+.LP
+Targets with names consisting of a leading period followed by the
+uppercase letters \fB"POSIX"\fP and then any other
+characters are reserved for future standardization. Targets with names
+consisting of a leading period followed by one or more
+uppercase letters are reserved for implementation extensions.
+.SS Macros
+.LP
+Macro definitions are in the form:
+.sp
+.RS
+.nf
+
+\fIstring1\fP \fB=\fP \fB[\fP\fIstring2\fP\fB]\fP
+.fi
+.RE
+.LP
+The macro named \fIstring1\fP is defined as having the value of \fIstring2\fP,
+where \fIstring2\fP is defined as all
+characters, if any, after the equal sign, up to a comment character
+( \fB'#'\fP ) or an unescaped <newline>. Any
+<blank>s immediately before or after the equal sign shall be ignored.
+.LP
+Applications shall select macro names from the set of characters consisting
+solely of periods, underscores, digits, and
+alphabetics from the portable character set (see the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Section 6.1, Portable Character
+Set). A macro name shall not contain an equals sign.
+Implementations may allow other characters in macro names as extensions.
+.LP
+Macros can appear anywhere in the makefile. Macro expansions using
+the forms $( \fIstring1\fP) or ${ \fIstring1\fP} shall be
+replaced by \fIstring2\fP, as follows:
+.IP " *" 3
+Macros in target lines shall be evaluated when the target line is
+read.
+.LP
+.IP " *" 3
+Macros in makefile command lines shall be evaluated when the command
+is executed.
+.LP
+.IP " *" 3
+Macros in the string before the equals sign in a macro definition
+shall be evaluated when the macro assignment is made.
+.LP
+.IP " *" 3
+Macros after the equals sign in a macro definition shall not be evaluated
+until the defined macro is used in a rule or command,
+or before the equals sign in a macro definition.
+.LP
+.LP
+The parentheses or braces are optional if \fIstring1\fP is a single
+character. The macro $$ shall be replaced by the single
+character \fB'$'\fP . If \fIstring1\fP in a macro expansion contains
+a macro expansion, the results are unspecified.
+.LP
+Macro expansions using the forms $( \fIstring1\fP \fB[:\fP \fIsubst1\fP
+\fB=[\fP \fIsubst2\fP \fB]]\fP) or ${
+\fIstring1\fP \fB[:\fP \fIsubst1\fP \fB=[\fP \fIsubst2\fP \fB]]\fP}
+can be used to replace all occurrences of \fIsubst1\fP
+with \fIsubst2\fP when the macro substitution is performed. The \fIsubst1\fP
+to be replaced shall be recognized when it is a
+suffix at the end of a word in \fIstring1\fP (where a \fIword\fP,
+in this context, is defined to be a string delimited by the
+beginning of the line, a <blank>, or a <newline>). If \fIstring1\fP
+in a macro expansion contains a macro expansion,
+the results are unspecified.
+.LP
+Macro expansions in \fIstring1\fP of macro definition lines shall
+be evaluated when read. Macro expansions in \fIstring2\fP of
+macro definition lines shall be performed when the macro identified
+by \fIstring1\fP is expanded in a rule or command.
+.LP
+Macro definitions shall be taken from the following sources, in the
+following logical order, before the makefile(s) are
+read.
+.IP " 1." 4
+Macros specified on the \fImake\fP utility command line, in the order
+specified on the command line. It is unspecified whether
+the internal macros defined in Internal Macros are accepted from this
+source.
+.LP
+.IP " 2." 4
+Macros defined by the \fIMAKEFLAGS\fP environment variable, in the
+order specified in the environment variable. It is
+unspecified whether the internal macros defined in Internal Macros
+are accepted from this
+source.
+.LP
+.IP " 3." 4
+The contents of the environment, excluding the \fIMAKEFLAGS\fP and
+\fISHELL\fP variables and including the variables with null
+values.
+.LP
+.IP " 4." 4
+Macros defined in the inference rules built into \fImake\fP.
+.LP
+.LP
+Macro definitions from these sources shall not override macro definitions
+from a lower-numbered source. Macro definitions from a
+single source (for example, the \fImake\fP utility command line, the
+\fIMAKEFLAGS\fP environment variable, or the other
+environment variables) shall override previous macro definitions from
+the same source.
+.LP
+Macros defined in the makefile(s) shall override macro definitions
+that occur before them in the makefile(s) and macro
+definitions from source 4. If the \fB-e\fP option is not specified,
+macros defined in the makefile(s) shall override macro
+definitions from source 3. Macros defined in the makefile(s) shall
+not override macro definitions from source 1 or source 2.
+.LP
+Before the makefile(s) are read, all of the \fImake\fP utility command
+line options (except \fB-f\fP and \fB-p\fP) and
+\fImake\fP utility command line macro definitions (except any for
+the \fIMAKEFLAGS\fP macro), not already included in the
+\fIMAKEFLAGS\fP macro, shall be added to the \fIMAKEFLAGS\fP macro,
+quoted in an implementation-defined manner such that when
+\fIMAKEFLAGS\fP is read by another instance of the \fImake\fP command,
+the original macro's value is recovered. Other
+implementation-defined options and macros may also be added to the
+\fIMAKEFLAGS\fP macro. If this modifies the value of the
+\fIMAKEFLAGS\fP macro, or, if the \fIMAKEFLAGS\fP macro is modified
+at any subsequent time, the \fIMAKEFLAGS\fP environment
+variable shall be modified to match the new value of the \fIMAKEFLAGS\fP
+macro. The result of setting \fIMAKEFLAGS\fP in the
+Makefile is unspecified.
+.LP
+Before the makefile(s) are read, all of the \fImake\fP utility command
+line macro definitions (except the \fIMAKEFLAGS\fP
+macro or the \fISHELL\fP macro) shall be added to the environment
+of \fImake\fP. Other implementation-defined variables may also
+be added to the environment of \fImake\fP.
+.LP
+The \fBSHELL\fP macro shall be treated specially. It shall be provided
+by \fImake\fP and set to the pathname of the shell
+command language interpreter (see \fIsh\fP ). The \fISHELL\fP environment
+variable shall not affect the
+value of the \fBSHELL\fP macro. If \fBSHELL\fP is defined in the makefile
+or is specified on the command line, it shall replace
+the original value of the \fBSHELL\fP macro, but shall not affect
+the \fISHELL\fP environment variable. Other effects of defining
+\fBSHELL\fP in the makefile or on the command line are implementation-defined.
+.SS Inference Rules
+.LP
+Inference rules are formatted as follows:
+.sp
+.RS
+.nf
+
+\fItarget\fP\fB:
+<tab>\fP\fIcommand
+\fP\fB[\fP\fB<tab>\fP\fIcommand\fP\fB]\fP\fB...
+.sp
+
+\fP\fIline that does not begin with\fP \fB<tab>\fP \fIor\fP \fB#
+\fP
+.fi
+.RE
+.LP
+The application shall ensure that the \fItarget\fP portion is a valid
+target name (see Target
+Rules ) of the form \fB.s2\fP or \fB.s1.s2\fP (where \fB.s1\fP and
+\fB\&.s2\fP are suffixes that have been given as
+prerequisites of the \fB.SUFFIXES\fP special target and \fIs1\fP and
+\fIs2\fP do not contain any slashes or periods.) If there
+is only one period in the target, it is a single-suffix inference
+rule. Targets with two periods are double-suffix inference rules.
+Inference rules can have only one target before the colon.
+.LP
+The application shall ensure that the makefile does not specify prerequisites
+for inference rules; no characters other than
+white space shall follow the colon in the first line, except when
+creating the \fIempty rule,\fP described below. Prerequisites
+are inferred, as described below.
+.LP
+Inference rules can be redefined. A target that matches an existing
+inference rule shall overwrite the old inference rule. An
+empty rule can be created with a command consisting of simply a semicolon
+(that is, the rule still exists and is found during
+inference rule search, but since it is empty, execution has no effect).
+The empty rule can also be formatted as follows:
+.sp
+.RS
+.nf
+
+\fIrule\fP\fB: ;
+\fP
+.fi
+.RE
+.LP
+where zero or more <blank>s separate the colon and semicolon.
+.LP
+The \fImake\fP utility uses the suffixes of targets and their prerequisites
+to infer how a target can be made up-to-date. A
+list of inference rules defines the commands to be executed. By default,
+\fImake\fP contains a built-in set of inference rules.
+Additional rules can be specified in the makefile.
+.LP
+The special target \fB.SUFFIXES\fP contains as its prerequisites a
+list of suffixes that shall be used by the inference rules.
+The order in which the suffixes are specified defines the order in
+which the inference rules for the suffixes are used. New
+suffixes shall be appended to the current list by specifying a \fB.SUFFIXES\fP
+special target in the makefile. A \fB.SUFFIXES\fP
+target with no prerequisites shall clear the list of suffixes. An
+empty \fB.SUFFIXES\fP target followed by a new \fB.SUFFIXES\fP
+list is required to change the order of the suffixes.
+.LP
+Normally, the user would provide an inference rule for each suffix.
+The inference rule to update a target with a suffix
+\fB\&.s1\fP from a prerequisite with a suffix \fB.s2\fP is specified
+as a target \fB.s2.s1\fP. The internal macros provide the
+means to specify general inference rules (see Internal Macros ).
+.LP
+When no target rule is found to update a target, the inference rules
+shall be checked. The suffix of the target ( \fB.s1\fP) to
+be built is compared to the list of suffixes specified by the \fB.SUFFIXES\fP
+special targets. If the \fB.s1\fP suffix is found
+in \fB.SUFFIXES\fP, the inference rules shall be searched in the order
+defined for the first \fB.s2.s1\fP rule whose prerequisite
+file ( \fB$*.s2\fP) exists. If the target is out-of-date with respect
+to this prerequisite, the commands for that inference rule
+shall be executed.
+.LP
+If the target to be built does not contain a suffix and there is no
+rule for the target, the single suffix inference rules shall
+be checked. The single-suffix inference rules define how to build
+a target if a file is found with a name that matches the target
+name with one of the single suffixes appended. A rule with one suffix
+\fB\&.s2\fP is the definition of how to build \fItarget\fP
+from \fBtarget.s2\fP. The other suffix ( \fB.s1\fP) is treated as
+null.
+.LP
+A
+tilde ( \fB'~'\fP ) in the above rules refers to an SCCS file in the
+current directory. Thus, the rule \fB.c~.o\fP
+would transform an SCCS C-language source file into an object file
+( \fB.o\fP). Because the \fBs.\fP of the SCCS files is a
+prefix, it is incompatible with \fImake\fP's suffix point of view.
+Hence, the \fB'~'\fP is a way of changing any file
+reference into an SCCS file reference.
+.SS Libraries
+.LP
+If a target or prerequisite contains parentheses, it shall be treated
+as a member of an archive library. For the \fIlib\fP(
+\fImember\fP \fB.o\fP) expression \fIlib\fP refers to the name of
+the archive library and \fImember\fP \fB.o\fP to the member
+name. The application shall ensure that the member is an object file
+with the \fB.o\fP suffix. The modification time of the
+expression is the modification time for the member as kept in the
+archive library; see \fIar\fP . The
+\fB\&.a\fP suffix shall refer to an archive library. The \fB.s2.a\fP
+rule shall be used to update a member in the library from a
+file with a suffix \fB.s2\fP.
+.SS Internal Macros
+.LP
+The \fImake\fP utility shall maintain five internal macros that can
+be used in target and inference rules. In order to clearly
+define the meaning of these macros, some clarification of the terms
+\fItarget rule\fP, \fIinference rule\fP, \fItarget\fP, and
+\fIprerequisite\fP is necessary.
+.LP
+Target rules are specified by the user in a makefile for a particular
+target. Inference rules are user-specified or
+\fImake\fP-specified rules for a particular class of target name.
+Explicit prerequisites are those prerequisites specified in a
+makefile on target lines. Implicit prerequisites are those prerequisites
+that are generated when inference rules are used.
+Inference rules are applied to implicit prerequisites or to explicit
+prerequisites that do not have target rules defined for them
+in the makefile. Target rules are applied to targets specified in
+the makefile.
+.LP
+Before any target in the makefile is updated, each of its prerequisites
+(both explicit and implicit) shall be updated. This
+shall be accomplished by recursively processing each prerequisite.
+Upon recursion, each prerequisite shall become a target itself.
+Its prerequisites in turn shall be processed recursively until a target
+is found that has no prerequisites, at which point the
+recursion stops. The recursion shall then back up, updating each target
+as it goes.
+.LP
+In the definitions that follow, the word \fItarget\fP refers to one
+of:
+.IP " *" 3
+A target specified in the makefile
+.LP
+.IP " *" 3
+An explicit prerequisite specified in the makefile that becomes the
+target when \fImake\fP processes it during recursion
+.LP
+.IP " *" 3
+An implicit prerequisite that becomes a target when \fImake\fP processes
+it during recursion
+.LP
+.LP
+In the definitions that follow, the word \fIprerequisite\fP refers
+to one of the following:
+.IP " *" 3
+An explicit prerequisite specified in the makefile for a particular
+target
+.LP
+.IP " *" 3
+An implicit prerequisite generated as a result of locating an appropriate
+inference rule and corresponding file that matches the
+suffix of the target
+.LP
+.LP
+The five internal macros are:
+.TP 7
+$@
+The $@ shall evaluate to the full target name of the current target,
+or the archive filename part of a library archive target.
+It shall be evaluated for both target and inference rules.
+.LP
+For example, in the \fB.c.a\fP inference rule, $@ represents the out-of-date
+\fB\&.a\fP file to be built. Similarly, in a
+makefile target rule to build \fBlib.a\fP from \fBfile.c\fP, $@ represents
+the out-of-date \fBlib.a\fP.
+.TP 7
+$%
+The $% macro shall be evaluated only when the current target is an
+archive library member of the form \fIlibname\fP(
+\fImember\fP \fB.o\fP). In these cases, $@ shall evaluate to \fIlibname\fP
+and $% shall evaluate to \fImember\fP \fB.o\fP. The
+$% macro shall be evaluated for both target and inference rules.
+.LP
+For example, in a makefile target rule to build \fBlib.a\fP( \fBfile.o\fP),
+$% represents \fBfile.o\fP, as opposed to $@,
+which represents \fBlib.a\fP.
+.TP 7
+$?
+The $? macro shall evaluate to the list of prerequisites that are
+newer than the current target. It shall be evaluated for both
+target and inference rules.
+.LP
+For example, in a makefile target rule to build \fIprog\fP from \fBfile1.o\fP,
+\fBfile2.o\fP, and \fBfile3.o\fP, and where
+\fIprog\fP is not out-of-date with respect to \fBfile1.o\fP, but is
+out-of-date with respect to \fBfile2.o\fP and
+\fBfile3.o\fP, $? represents \fBfile2.o\fP and \fBfile3.o\fP.
+.TP 7
+$<
+In an inference rule, the $< macro shall evaluate to the filename
+whose existence allowed the inference rule to be chosen
+for the target. In the \fB.DEFAULT\fP rule, the $< macro shall evaluate
+to the current target name. The meaning of the $<
+macro shall be otherwise unspecified.
+.LP
+For example, in the \fB.c.a\fP inference rule, $< represents the prerequisite
+\fB\&.c\fP file.
+.TP 7
+$*
+The $* macro shall evaluate to the current target name with its suffix
+deleted. It shall be evaluated at least for inference
+rules.
+.LP
+For example, in the \fB.c.a\fP inference rule, $*.o represents the
+out-of-date \fB.o\fP file that corresponds to the
+prerequisite \fB.c\fP file.
+.sp
+.LP
+Each of the internal macros has an alternative form. When an uppercase
+\fB'D'\fP or \fB'F'\fP is appended to any of the
+macros, the meaning shall be changed to the \fIdirectory part\fP for
+\fB'D'\fP and \fIfilename part\fP for \fB'F'\fP . The
+directory part is the path prefix of the file without a trailing slash;
+for the current directory, the directory part is
+\fB'.'\fP . When the $? macro contains more than one prerequisite
+filename, the $(?D) and $(?F) (or ${?D} and ${?F}) macros
+expand to a list of directory name parts and filename parts respectively.
+.LP
+For the target \fIlib\fP( \fImember\fP \fB.o\fP) and the \fBs2.a\fP
+rule, the internal macros shall be defined as:
+.TP 7
+$<
+\fImember\fP \fB.s2\fP
+.TP 7
+$*
+\fImember\fP
+.TP 7
+$@
+\fIlib\fP
+.TP 7
+$?
+\fImember\fP \fB.s2\fP
+.TP 7
+$%
+\fImember\fP \fB.o\fP
+.sp
+.SS Default Rules
+.LP
+The default rules for \fImake\fP shall achieve results that are the
+same as if the following were used. Implementations that do
+not support the C-Language Development Utilities option may omit \fBCC\fP,
+\fBCFLAGS\fP, \fBYACC\fP, \fBYFLAGS\fP, \fBLEX\fP,
+\fBLFLAGS\fP, \fBLDFLAGS\fP, and the \fB.c\fP, \fB.y\fP, and \fB.l\fP
+inference rules. Implementations that do not support
+FORTRAN may omit \fBFC\fP, \fBFFLAGS\fP, and the \fB.f\fP inference
+rules. Implementations may provide additional macros and
+rules.
+.sp
+.RS
+.nf
+
+\fISPECIAL TARGETS\fP\fB
+.br
+
+
+\&.SCCS_GET: sccs $(SCCSFLAGS) get $(SCCSGETFLAGS) $@
+
+.sp
+
+
+\&.SUFFIXES: .o .c .y .l .a .sh .f .c~ .y~ .l~ .sh~ .f~
+.sp
+
+\fP\fIMACROS\fP\fB
+.br
+
+MAKE=make
+AR=ar
+ARFLAGS=-rv
+YACC=yacc
+YFLAGS=
+LEX=lex
+LFLAGS=
+LDFLAGS=
+CC=c99
+CFLAGS=-O
+FC=fort77
+FFLAGS=-O 1
+
+GET=get
+GFLAGS=
+SCCSFLAGS=
+SCCSGETFLAGS=-s
+
+.sp
+
+\fP\fISINGLE SUFFIX RULES\fP\fB
+.br
+
+\&.c:
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
+.sp
+
+\&.f:
+ $(FC) $(FFLAGS) $(LDFLAGS) -o $@ $<
+.sp
+
+\&.sh:
+ cp $< $@
+ chmod a+x $@
+.sp
+
+
+\&.c~:
+ $(GET) $(GFLAGS) -p $< > $*.c
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $*.c
+.sp
+
+\&.f~:
+ $(GET) $(GFLAGS) -p $< > $*.f
+ $(FC) $(FFLAGS) $(LDFLAGS) -o $@ $*.f
+.sp
+
+\&.sh~:
+ $(GET) $(GFLAGS) -p $< > $*.sh
+ cp $*.sh $@
+ chmod a+x $@
+
+.sp
+
+\fP\fIDOUBLE SUFFIX RULES\fP\fB
+.br
+
+\&.c.o:
+ $(CC) $(CFLAGS) -c $<
+.sp
+
+\&.f.o:
+ $(FC) $(FFLAGS) -c $<
+.sp
+
+\&.y.o:
+ $(YACC) $(YFLAGS) $<
+ $(CC) $(CFLAGS) -c y.tab.c
+ rm -f y.tab.c
+ mv y.tab.o $@
+.sp
+
+\&.l.o:
+ $(LEX) $(LFLAGS) $<
+ $(CC) $(CFLAGS) -c lex.yy.c
+ rm -f lex.yy.c
+ mv lex.yy.o $@
+.sp
+
+\&.y.c:
+ $(YACC) $(YFLAGS) $<
+ mv y.tab.c $@
+.sp
+
+\&.l.c:
+ $(LEX) $(LFLAGS) $<
+ mv lex.yy.c $@
+.sp
+
+
+\&.c~.o:
+ $(GET) $(GFLAGS) -p $< > $*.c
+ $(CC) $(CFLAGS) -c $*.c
+.sp
+
+\&.f~.o:
+ $(GET) $(GFLAGS) -p $< > $*.f
+ $(FC) $(FFLAGS) -c $*.f
+.sp
+
+\&.y~.o:
+ $(GET) $(GFLAGS) -p $< > $*.y
+ $(YACC) $(YFLAGS) $*.y
+ $(CC) $(CFLAGS) -c y.tab.c
+ rm -f y.tab.c
+ mv y.tab.o $@
+.sp
+
+\&.l~.o:
+ $(GET) $(GFLAGS) -p $< > $*.l
+ $(LEX) $(LFLAGS) $*.l
+ $(CC) $(CFLAGS) -c lex.yy.c
+ rm -f lex.yy.c
+ mv lex.yy.o $@
+.sp
+
+\&.y~.c:
+ $(GET) $(GFLAGS) -p $< > $*.y
+ $(YACC) $(YFLAGS) $*.y
+ mv y.tab.c $@
+.sp
+
+\&.l~.c:
+ $(GET) $(GFLAGS) -p $< > $*.l
+ $(LEX) $(LFLAGS) $*.l
+ mv lex.yy.c $@
+
+.sp
+
+\&.c.a:
+ $(CC) -c $(CFLAGS) $<
+ $(AR) $(ARFLAGS) $@ $*.o
+ rm -f $*.o
+.sp
+
+\&.f.a:
+ $(FC) -c $(FFLAGS) $<
+ $(AR) $(ARFLAGS) $@ $*.o
+ rm -f $*.o
+\fP
+.fi
+.RE
+.SH EXIT STATUS
+.LP
+When the \fB-q\fP option is specified, the \fImake\fP utility shall
+exit with one of the following values:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+\ 1
+The target was not up-to-date.
+.TP 7
+>1
+An error occurred.
+.sp
+.LP
+When the \fB-q\fP option is not specified, the \fImake\fP utility
+shall exit with one of the following values:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+If there is a source file (such as \fB./source.c\fP) and there are
+two SCCS files corresponding to it ( \fB./s.source.c\fP and
+\fB\&./SCCS/s.source.c\fP), on XSI-conformant systems \fImake\fP uses
+the SCCS file in the current directory. However, users are
+advised to use the underlying SCCS utilities ( \fIadmin\fP, \fIdelta\fP,
+\fIget\fP, and so on) or the \fIsccs\fP utility for all source files
+in a given directory. If both forms are used for a given
+source file, future developers are very likely to be confused.
+.LP
+It is incumbent upon portable makefiles to specify the \fB.POSIX\fP
+special target in order to guarantee that they are not
+affected by local extensions.
+.LP
+The \fB-k\fP and \fB-S\fP options are both present so that the relationship
+between the command line, the \fIMAKEFLAGS\fP
+variable, and the makefile can be controlled precisely. If the \fBk\fP
+flag is passed in \fIMAKEFLAGS\fP and a command is of the
+form:
+.sp
+.RS
+.nf
+
+\fB$(MAKE) -S foo
+\fP
+.fi
+.RE
+.LP
+then the default behavior is restored for the child \fImake\fP.
+.LP
+When the \fB-n\fP option is specified, it is always added to \fIMAKEFLAGS
+\&.\fP This allows a recursive \fImake\fP \fB-n\fP
+\fItarget\fP to be used to see all of the action that would be taken
+to update \fItarget\fP.
+.LP
+Because of widespread historical practice, interpreting a \fB'#'\fP
+number sign inside a variable as the start of a comment
+has the unfortunate side effect of making it impossible to place a
+number sign in a variable, thus forbidding something like:
+.sp
+.RS
+.nf
+
+\fBCFLAGS = "-D COMMENT_CHAR='#'"
+\fP
+.fi
+.RE
+.LP
+Many historical \fImake\fP utilities stop chaining together inference
+rules when an intermediate target is nonexistent. For
+example, it might be possible for a \fImake\fP to determine that both
+\fB\&.y.c\fP and \fB.c.o\fP could be used to convert a
+\fB\&.y\fP to a \fB.o\fP. Instead, in this case, \fImake\fP requires
+the use of a \fB.y.o\fP rule.
+.LP
+The best way to provide portable makefiles is to include all of the
+rules needed in the makefile itself. The rules provided use
+only features provided by other parts of this volume of IEEE\ Std\ 1003.1-2001.
+The default rules include rules for
+optional commands in this volume of IEEE\ Std\ 1003.1-2001. Only rules
+pertaining to commands that are provided are needed
+in an implementation's default set.
+.LP
+Macros used within other macros are evaluated when the new macro is
+used rather than when the new macro is defined.
+Therefore:
+.sp
+.RS
+.nf
+
+\fBMACRO =\fP \fIvalue1\fP\fBNEW = $(MACRO)
+MACRO =\fP \fIvalue2\fP\fB
+.br
+
+target:
+ echo $(NEW)
+\fP
+.fi
+.RE
+.LP
+would produce \fIvalue2\fP and not \fIvalue1\fP since \fBNEW\fP was
+not expanded until it was needed in the \fIecho\fP command line.
+.LP
+Some historical applications have been known to intermix \fItarget_name\fP
+and \fImacro=name\fP operands on the command line,
+expecting that all of the macros are processed before any of the targets
+are dealt with. Conforming applications do not do this,
+although some backwards-compatibility support may be included in some
+implementations.
+.LP
+The following characters in filenames may give trouble: \fB'='\fP,
+\fB':'\fP, \fB'`'\fP, \fB'"\fP, and
+\fB'@'\fP . For inference rules, the description of $< and $? seem
+similar. However, an example shows the minor difference.
+In a makefile containing:
+.sp
+.RS
+.nf
+
+\fBfoo.o: foo.h
+\fP
+.fi
+.RE
+.LP
+if \fBfoo.h\fP is newer than \fBfoo.o\fP, yet \fBfoo.c\fP is older
+than \fBfoo.o\fP, the built-in rule to make \fBfoo.o\fP
+from \fBfoo.c\fP is used, with $< equal to \fBfoo.c\fP and $? equal
+to \fBfoo.h\fP. If \fBfoo.c\fP is also newer than
+\fBfoo.o\fP, $< is equal to \fBfoo.c\fP and $? is equal to \fBfoo.h
+foo.c\fP.
+.SH EXAMPLES
+.IP " 1." 4
+The following command:
+.sp
+.RS
+.nf
+
+\fBmake
+\fP
+.fi
+.RE
+.LP
+makes the first target found in the makefile.
+.LP
+.IP " 2." 4
+The following command:
+.sp
+.RS
+.nf
+
+\fBmake junk
+\fP
+.fi
+.RE
+.LP
+makes the target \fBjunk\fP.
+.LP
+.IP " 3." 4
+The following makefile says that \fBpgm\fP depends on two files, \fBa.o\fP
+and \fBb.o\fP, and that they in turn depend on
+their corresponding source files ( \fBa.c\fP and \fBb.c\fP), and a
+common file \fBincl.h\fP:
+.sp
+.RS
+.nf
+
+\fBpgm: a.o b.o
+ c99 a.o b.o -o pgm
+a.o: incl.h a.c
+ c99 -c a.c
+b.o: incl.h b.c
+ c99 -c b.c
+\fP
+.fi
+.RE
+.LP
+.IP " 4." 4
+An example for making optimized \fB.o\fP files from \fB.c\fP files
+is:
+.sp
+.RS
+.nf
+
+\fB\&.c.o:
+ c99 -c -O $*.c
+\fP
+.fi
+.RE
+.LP
+or:
+.sp
+.RS
+.nf
+
+\fB\&.c.o:
+ c99 -c -O $<
+\fP
+.fi
+.RE
+.LP
+.IP " 5." 4
+The most common use of the archive interface follows. Here, it is
+assumed that the source files are all C-language source:
+.sp
+.RS
+.nf
+
+\fBlib: lib(file1.o) lib(file2.o) lib(file3.o)
+ @echo lib is now up-to-date
+\fP
+.fi
+.RE
+.LP
+The \fB.c.a\fP rule is used to make \fBfile1.o\fP, \fBfile2.o\fP,
+and \fBfile3.o\fP and insert them into \fBlib\fP.
+.LP
+The treatment of escaped <newline>s throughout the makefile is historical
+practice. For example, the inference rule:
+.sp
+.RS
+.nf
+
+\fB\&.c.o\\
+:
+\fP
+.fi
+.RE
+.LP
+works, and the macro:
+.sp
+.RS
+.nf
+
+\fBf= bar baz\\
+ biz
+a:
+ echo ==$f==
+\fP
+.fi
+.RE
+.LP
+echoes \fB"==bar\ baz\ biz=="\fP .
+.LP
+If $? were:
+.sp
+.RS
+.nf
+
+\fB/usr/include/stdio.h /usr/include/unistd.h foo.h
+\fP
+.fi
+.RE
+.LP
+then $(?D) would be:
+.sp
+.RS
+.nf
+
+\fB/usr/include /usr/include .
+\fP
+.fi
+.RE
+.LP
+and $(?F) would be:
+.sp
+.RS
+.nf
+
+\fBstdio.h unistd.h foo.h
+\fP
+.fi
+.RE
+.LP
+.IP " 6." 4
+The contents of the built-in rules can be viewed by running:
+.sp
+.RS
+.nf
+
+\fBmake -p -f /dev/null 2>/dev/null
+\fP
+.fi
+.RE
+.LP
+.SH RATIONALE
+.LP
+The \fImake\fP utility described in this volume of IEEE\ Std\ 1003.1-2001
+is intended to provide the means for changing
+portable source code into executables that can be run on an IEEE\ Std\ 1003.1-2001-conforming
+system. It reflects the most
+common features present in System V and BSD \fImake\fPs.
+.LP
+Historically, the \fImake\fP utility has been an especially fertile
+ground for vendor and research organization-specific syntax
+modifications and extensions. Examples include:
+.IP " *" 3
+Syntax supporting parallel execution (such as from various multi-processor
+vendors, GNU, and others)
+.LP
+.IP " *" 3
+Additional "operators" separating targets and their prerequisites
+(System V, BSD, and others)
+.LP
+.IP " *" 3
+Specifying that command lines containing the strings \fB"${MAKE}"\fP
+and \fB"$(MAKE)"\fP are executed when the \fB-n\fP
+option is specified (GNU and System V)
+.LP
+.IP " *" 3
+Modifications of the meaning of internal macros when referencing libraries
+(BSD and others)
+.LP
+.IP " *" 3
+Using a single instance of the shell for all of the command lines
+of the target (BSD and others)
+.LP
+.IP " *" 3
+Allowing spaces as well as tabs to delimit command lines (BSD)
+.LP
+.IP " *" 3
+Adding C preprocessor-style "include" and "ifdef" constructs (System
+V, GNU, BSD, and others)
+.LP
+.IP " *" 3
+Remote execution of command lines (Sprite and others)
+.LP
+.IP " *" 3
+Specifying additional special targets (BSD, System V, and most others)
+.LP
+.LP
+Additionally, many vendors and research organizations have rethought
+the basic concepts of \fImake\fP, creating vastly
+extended, as well as completely new, syntaxes. Each of these versions
+of \fImake\fP fulfills the needs of a different community of
+users; it is unreasonable for this volume of IEEE\ Std\ 1003.1-2001
+to require behavior that would be incompatible (and
+probably inferior) to historical practice for such a community.
+.LP
+In similar circumstances, when the industry has enough sufficiently
+incompatible formats as to make them irreconcilable, this
+volume of IEEE\ Std\ 1003.1-2001 has followed one or both of two courses
+of action. Commands have been renamed ( \fIcksum\fP, \fIecho\fP, and
+\fIpax\fP) and/or command line options have been provided to select
+the desired behavior ( \fIgrep\fP, \fIod\fP, and \fIpax\fP).
+.LP
+Because the syntax specified for the \fImake\fP utility is, by and
+large, a subset of the syntaxes accepted by almost all
+versions of \fImake\fP, it was decided that it would be counter-productive
+to change the name. And since the makefile itself is a
+basic unit of portability, it would not be completely effective to
+reserve a new option letter, such as \fImake\fP \fB-P\fP, to
+achieve the portable behavior. Therefore, the special target \fB.POSIX\fP
+was added to the makefile, allowing users to specify
+"standard" behavior. This special target does not preclude extensions
+in the \fImake\fP utility, nor does it preclude such
+extensions being used by the makefile specifying the target; it does,
+however, preclude any extensions from being applied that
+could alter the behavior of previously valid syntax; such extensions
+must be controlled via command line options or new special
+targets. It is incumbent upon portable makefiles to specify the \fB.POSIX\fP
+special target in order to guarantee that they are
+not affected by local extensions.
+.LP
+The portable version of \fImake\fP described in this reference page
+is not intended to be the state-of-the-art software
+generation tool and, as such, some newer and more leading-edge features
+have not been included. An attempt has been made to
+describe the portable makefile in a manner that does not preclude
+such extensions as long as they do not disturb the portable
+behavior described here.
+.LP
+When the \fB-n\fP option is specified, it is always added to \fIMAKEFLAGS
+\&.\fP This allows a recursive \fImake\fP \fB-n\fP
+\fItarget\fP to be used to see all of the action that would be taken
+to update \fItarget\fP.
+.LP
+The definition of \fIMAKEFLAGS\fP allows both the System V letter
+string and the BSD command line formats. The two formats are
+sufficiently different to allow implementations to support both without
+ambiguity.
+.LP
+Early proposals stated that an "unquoted" number sign was treated
+as the start of a comment. The \fImake\fP utility does not
+pay any attention to quotes. A number sign starts a comment regardless
+of its surroundings.
+.LP
+The text about "other implementation-defined pathnames may also be
+tried" in addition to \fB./makefile\fP and
+\fB\&./Makefile\fP is to allow such extensions as \fBSCCS/s.Makefile\fP
+and other variations. It was made an implementation-defined
+requirement (as opposed to unspecified behavior) to highlight surprising
+implementations that might select something unexpected
+like \fB/etc/Makefile\fP. XSI-conformant systems also try \fB./s.makefile\fP,
+\fBSCCS/s.makefile\fP, \fB./s.Makefile\fP, and
+\fBSCCS/s.Makefile\fP.
+.LP
+Early proposals contained the macro \fBNPROC\fP as a means of specifying
+that \fImake\fP should use \fIn\fP processes to do
+the work required. While this feature is a valuable extension for
+many systems, it is not common usage and could require other
+non-trivial extensions to makefile syntax. This extension is not required
+by this volume of IEEE\ Std\ 1003.1-2001, but
+could be provided as a compatible extension. The macro \fBPARALLEL\fP
+is used by some historical systems with essentially the same
+meaning (but without using a name that is a common system limit value).
+It is suggested that implementors recognize the existing
+use of \fBNPROC\fP and/or \fBPARALLEL\fP as extensions to \fImake\fP.
+.LP
+The default rules are based on System V. The default \fBCC=\fP value
+is \fIc99\fP instead
+of \fIcc\fP because this volume of IEEE\ Std\ 1003.1-2001 does not
+standardize the utility named \fIcc\fP. Thus, every
+conforming application would be required to define \fBCC=\fP \fIc99\fP
+to expect to run.
+There is no advantage conferred by the hope that the makefile might
+hit the "preferred" compiler because this cannot be
+guaranteed to work. Also, since the portable makescript can only use
+the \fIc99\fP options, no
+advantage is conferred in terms of what the script can do. It is a
+quality-of-implementation issue as to whether \fIc99\fP is as valuable
+as \fIcc\fP.
+.LP
+The \fB-d\fP option to \fImake\fP is frequently used to produce debugging
+information, but is too implementation-defined to
+add to this volume of IEEE\ Std\ 1003.1-2001.
+.LP
+The \fB-p\fP option is not passed in \fIMAKEFLAGS\fP on most historical
+implementations and to change this would cause many
+implementations to break without sufficiently increased portability.
+.LP
+Commands that begin with a plus sign ( \fB'+'\fP ) are executed even
+if the \fB-n\fP option is present. Based on the GNU
+version of \fImake\fP, the behavior of \fB-n\fP when the plus-sign
+prefix is encountered has been extended to apply to \fB-q\fP
+and \fB-t\fP as well. However, the System V convention of forcing
+command execution with \fB-n\fP when the command line of a
+target contains either of the strings \fB"$(MAKE)"\fP or \fB"${MAKE}"\fP
+has not been adopted. This functionality appeared in
+early proposals, but the danger of this approach was pointed out with
+the following example of a portion of a makefile:
+.sp
+.RS
+.nf
+
+\fBsubdir:
+ cd subdir; rm all_the_files; $(MAKE)
+\fP
+.fi
+.RE
+.LP
+The loss of the System V behavior in this case is well-balanced by
+the safety afforded to other makefiles that were not aware of
+this situation. In any event, the command line plus-sign prefix can
+provide the desired functionality.
+.LP
+The double colon in the target rule format is supported in BSD systems
+to allow more than one target line containing the same
+target name to have commands associated with it. Since this is not
+functionality described in the SVID or XPG3 it has been allowed
+as an extension, but not mandated.
+.LP
+The default rules are provided with text specifying that the built-in
+rules shall be the same as if the listed set were used.
+The intent is that implementations should be able to use the rules
+without change, but will be allowed to alter them in ways that
+do not affect the primary behavior.
+.LP
+The best way to provide portable makefiles is to include all of the
+rules needed in the makefile itself. The rules provided use
+only features provided by other portions of this volume of IEEE\ Std\ 1003.1-2001.
+The default rules include rules for
+optional commands in this volume of IEEE\ Std\ 1003.1-2001. Only rules
+pertaining to commands that are provided are needed
+in the default set of an implementation.
+.LP
+One point of discussion was whether to drop the default rules list
+from this volume of IEEE\ Std\ 1003.1-2001. They
+provide convenience, but do not enhance portability of applications.
+The prime benefit is in portability of users who wish to type
+\fImake\fP \fIcommand\fP and have the command build from a \fBcommand.c\fP
+file.
+.LP
+The historical \fIMAKESHELL\fP feature was omitted. In some implementations
+it is used to let a user override the shell to be
+used to run \fImake\fP commands. This was confusing; for a portable
+\fImake\fP, the shell should be chosen by the makefile writer
+or specified on the \fImake\fP command line and not by a user running
+\fImake\fP.
+.LP
+The \fImake\fP utilities in most historical implementations process
+the prerequisites of a target in left-to-right order, and
+the makefile format requires this. It supports the standard idiom
+used in many makefiles that produce \fIyacc\fP programs; for example:
+.sp
+.RS
+.nf
+
+\fBfoo: y.tab.o lex.o main.o
+ $(CC) $(CFLAGS) -o $\fP@ \fBt.tab.o lex.o main.o
+\fP
+.fi
+.RE
+.LP
+In this example, if \fImake\fP chose any arbitrary order, the \fBlex.o\fP
+might not be made with the correct \fBy.tab.h\fP.
+Although there may be better ways to express this relationship, it
+is widely used historically. Implementations that desire to
+update prerequisites in parallel should require an explicit extension
+to \fImake\fP or the makefile format to accomplish it, as
+described previously.
+.LP
+The algorithm for determining a new entry for target rules is partially
+unspecified. Some historical \fImake\fPs allow blank,
+empty, or comment lines within the collection of commands marked by
+leading <tab>s. A conforming makefile must ensure that
+each command starts with a <tab>, but implementations are free to
+ignore blank, empty, and comment lines without triggering
+the start of a new entry.
+.LP
+The ASYNCHRONOUS EVENTS section includes having SIGTERM and SIGHUP,
+along with the more traditional SIGINT and SIGQUIT, remove
+the current target unless directed not to do so. SIGTERM and SIGHUP
+were added to parallel other utilities that have historically
+cleaned up their work as a result of these signals. When \fImake\fP
+receives any signal other than SIGQUIT, it is required to
+resend itself the signal it received so that it exits with a status
+that reflects the signal. The results from SIGQUIT are
+partially unspecified because, on systems that create \fBcore\fP files
+upon receipt of SIGQUIT, the \fBcore\fP from \fImake\fP
+would conflict with a \fBcore\fP file from the command that was running
+when the SIGQUIT arrived. The main concern was to prevent
+damaged files from appearing up-to-date when \fImake\fP is rerun.
+.LP
+The \fB.PRECIOUS\fP special target was extended to affect all targets
+globally (by specifying no prerequisites). The
+\fB\&.IGNORE\fP and \fB.SILENT\fP special targets were extended to allow
+prerequisites; it was judged to be more useful in some
+cases to be able to turn off errors or echoing for a list of targets
+than for the entire makefile. These extensions to \fImake\fP
+in System V were made to match historical practice from the BSD \fImake\fP.
+.LP
+Macros are not exported to the environment of commands to be run.
+This was never the case in any historical \fImake\fP and
+would have serious consequences. The environment is the same as the
+environment to \fImake\fP except that \fIMAKEFLAGS\fP and
+macros defined on the \fImake\fP command line are added.
+.LP
+Some implementations do not use \fIsystem\fP() for all command lines,
+as required by the
+portable makefile format; as a performance enhancement, they select
+lines without shell metacharacters for direct execution by \fIexecve\fP().
+There is no requirement that \fIsystem\fP() be used specifically,
+but merely that the same results be achieved. The
+metacharacters typically used to bypass the direct \fIexecve\fP()
+execution have been any
+of:
+.sp
+.RS
+.nf
+
+\fB= | ^ ( ) ; & < > * ? [ ] : $ ` ' " \\ \\n
+\fP
+.fi
+.RE
+.LP
+The default in some advanced versions of \fImake\fP is to group all
+the command lines for a target and execute them using a
+single shell invocation; the System V method is to pass each line
+individually to a separate shell. The single-shell method has the
+advantages in performance and the lack of a requirement for many continued
+lines. However, converting to this newer method has
+caused portability problems with many historical makefiles, so the
+behavior with the POSIX makefile is specified to be the same as
+that of System V. It is suggested that the special target \fB.ONESHELL\fP
+be used as an implementation extension to achieve the
+single-shell grouping for a target or group of targets.
+.LP
+Novice users of \fImake\fP have had difficulty with the historical
+need to start commands with a <tab>. Since it is often
+difficult to discern differences between <tab>s and <space>s on terminals
+or printed listings, confusing bugs can
+arise. In early proposals, an attempt was made to correct this problem
+by allowing leading <blank>s instead of <tab>s.
+However, implementors reported many makefiles that failed in subtle
+ways following this change, and it is difficult to implement a
+\fImake\fP that unambiguously can differentiate between macro and
+command lines. There is extensive historical practice of
+allowing leading spaces before macro definitions. Forcing macro lines
+into column 1 would be a significant backwards-compatibility
+problem for some makefiles. Therefore, historical practice was restored.
+.LP
+The System V INCLUDE feature was considered, but not included. This
+would treat a line that began in the first column and
+contained INCLUDE <\fIfilename\fP> as an indication to read <\fIfilename\fP>
+at that point in the makefile. This is
+difficult to use in a portable way, and it raises concerns about nesting
+levels and diagnostics. System V, BSD, GNU, and others
+have used different methods for including files.
+.LP
+The System V dynamic dependency feature was not included. It would
+support:
+.sp
+.RS
+.nf
+
+\fBcat: $$@.c
+\fP
+.fi
+.RE
+.LP
+that would expand to;
+.sp
+.RS
+.nf
+
+\fBcat: cat.c
+\fP
+.fi
+.RE
+.LP
+This feature exists only in the new version of System V \fImake\fP
+and, while useful, is not in wide usage. This means that
+macros are expanded twice for prerequisites: once at makefile parse
+time and once at target update time.
+.LP
+Consideration was given to adding metarules to the POSIX \fImake\fP.
+This would make \fB%.o:\ %.c\fP the same as
+\fB\&.c.o:\fP. This is quite useful and available from some vendors,
+but it would cause too many changes to this \fImake\fP to
+support. It would have introduced rule chaining and new substitution
+rules. However, the rules for target names have been set to
+reserve the \fB'%'\fP and \fB''\fP characters. These are traditionally
+used to implement metarules and quoting of target
+names, respectively. Implementors are strongly encouraged to use these
+characters only for these purposes.
+.LP
+A request was made to extend the suffix delimiter character from a
+period to any character. The metarules feature in newer
+\fImake\fPs solves this problem in a more general way. This volume
+of IEEE\ Std\ 1003.1-2001 is staying with the more
+conservative historical definition.
+.LP
+The standard output format for the \fB-p\fP option is not described
+because it is primarily a debugging option and because the
+format is not generally useful to programs. In historical implementations
+the output is not suitable for use in generating
+makefiles. The \fB-p\fP format has been variable across historical
+implementations. Therefore, the definition of \fB-p\fP was
+only to provide a consistently named option for obtaining \fImake\fP
+script debugging information.
+.LP
+Some historical implementations have not cleared the suffix list with
+\fB-r\fP.
+.LP
+Implementations should be aware that some historical applications
+have intermixed \fItarget_name\fP and \fImacro\fP=
+\fIvalue\fP operands on the command line, expecting that all of the
+macros are processed before any of the targets are dealt with.
+Conforming applications do not do this, but some backwards-compatibility
+support may be warranted.
+.LP
+Empty inference rules are specified with a semicolon command rather
+than omitting all commands, as described in an early
+proposal. The latter case has no traditional meaning and is reserved
+for implementation extensions, such as in GNU \fImake\fP.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIShell Command Language\fP, \fIar\fP, \fIc99\fP, \fIget\fP,
+\fIlex\fP, \fIsccs\fP, \fIsh\fP, \fIyacc\fP, the System Interfaces
+volume
+of IEEE\ Std\ 1003.1-2001, \fIexec\fP, \fIsystem\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/man.1p b/man-pages-posix-2003/man1p/man.1p
new file mode 100644
index 0000000..f6cac5e
--- /dev/null
+++ b/man-pages-posix-2003/man1p/man.1p
@@ -0,0 +1,249 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MAN" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" man
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+man \- display system documentation
+.SH SYNOPSIS
+.LP
+\fBman\fP \fB[\fP\fB-k\fP\fB]\fP \fIname\fP\fB...\fP
+.SH DESCRIPTION
+.LP
+The \fIman\fP utility shall write information about each of the \fIname\fP
+operands. If \fIname\fP is the name of a standard
+utility, \fIman\fP at a minimum shall write a message describing the
+syntax used by the standard utility, its options, and
+operands. If more information is available, the \fIman\fP utility
+shall provide it in an implementation-defined manner.
+.LP
+An implementation may provide information for values of \fIname\fP
+other than the standard utilities. Standard utilities that
+are listed as optional and that are not supported by the implementation
+either shall cause a brief message indicating that fact to
+be displayed or shall cause a full display of information as described
+previously.
+.SH OPTIONS
+.LP
+The \fIman\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following option shall be supported:
+.TP 7
+\fB-k\fP
+Interpret \fIname\fP operands as keywords to be used in searching
+a utilities summary database that contains a brief purpose
+entry for each standard utility and write lines from the summary database
+that match any of the keywords. The keyword search shall
+produce results that are the equivalent of the output of the following
+command:
+.sp
+.RS
+.nf
+
+\fBgrep -Ei '
+\fP\fIname
+name\fP\fB...
+'\fP \fIsummary-database\fP
+.fi
+.RE
+.LP
+This assumes that the \fIsummary-database\fP is a text file with a
+single entry per line; this organization is not required and
+the example using \fIgrep\fP \fB-Ei\fP is merely illustrative of the
+type of search
+intended. The purpose entry to be included in the database shall consist
+of a terse description of the purpose of the utility.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIname\fP
+A keyword or the name of a standard utility. When \fB-k\fP is not
+specified and \fIname\fP does not represent one of the
+standard utilities, the results are unspecified.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIman\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and in the summary database).
+The value of \fILC_CTYPE\fP need not affect the format
+of the information written about the \fIname\fP operands.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard error and
+informative messages written to standard output.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fIPAGER\fP
+Determine an output filtering command for writing the output to a
+terminal. Any string acceptable as a \fIcommand_string\fP
+operand to the \fIsh\fP \fB-c\fP command shall be valid. When standard
+output is a terminal
+device, the reference page output shall be piped through the command.
+If the \fIPAGER\fP variable is null or not set, the command
+shall be either \fImore\fP or another paginator utility documented
+in the system
+documentation.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The \fIman\fP utility shall write text describing the syntax of the
+utility \fIname\fP, its options and its operands, or, when
+\fB-k\fP is specified, lines from the summary database. The format
+of this text is implementation-defined.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+It is recognized that the \fIman\fP utility is only of minimal usefulness
+as specified. The opinion of the standard developers
+was strongly divided as to how much or how little information \fIman\fP
+should be required to provide. They considered, however,
+that the provision of some portable way of accessing documentation
+would aid user portability. The arguments against a fuller
+specification were:
+.IP " *" 3
+Large quantities of documentation should not be required on a system
+that does not have excess disk space.
+.LP
+.IP " *" 3
+The current manual system does not present information in a manner
+that greatly aids user portability.
+.LP
+.IP " *" 3
+A "better help system" is currently an area in which vendors feel
+that they can add value to their POSIX implementations.
+.LP
+.LP
+The \fB-f\fP option was considered, but due to implementation differences,
+it was not included in this volume of
+IEEE\ Std\ 1003.1-2001.
+.LP
+The description was changed to be more specific about what has to
+be displayed for a utility. The standard developers considered
+it insufficient to allow a display of only the synopsis without giving
+a short description of what each option and operand
+does.
+.LP
+The "purpose" entry to be included in the database can be similar
+to the section title (less the numeric prefix) from this
+volume of IEEE\ Std\ 1003.1-2001 for each utility. These titles are
+similar to those used in historical systems for this
+purpose.
+.LP
+See \fImailx\fP for rationale concerning the default paginator.
+.LP
+The caveat in the \fILC_CTYPE\fP description was added because it
+is not a requirement that an implementation provide reference
+pages for all of its supported locales on each system; changing \fILC_CTYPE\fP
+does not necessarily translate the reference page
+into another language. This is equivalent to the current state of
+\fILC_MESSAGES\fP in
+IEEE\ Std\ 1003.1-2001-locale-specific messages are not yet a requirement.
+.LP
+The historical \fIMANPATH\fP variable is not included in POSIX because
+no attempt is made to specify naming conventions for
+reference page files, nor even to mandate that they are files at all.
+On some implementations they could be a true database, a
+hypertext file, or even fixed strings within the \fIman\fP executable.
+The standard developers considered the portability of
+reference pages to be outside their scope of work. However, users
+should be aware that \fIMANPATH\fP is implemented on a number of
+historical systems and that it can be used to tailor the search pattern
+for reference pages from the various categories (utilities,
+functions, file formats, and so on) when the system administrator
+reveals the location and conventions for reference pages on the
+system.
+.LP
+The keyword search can rely on at least the text of the section titles
+from these utility descriptions, and the implementation
+may add more keywords. The term "section titles" refers to the strings
+such as:
+.sp
+.RS
+.nf
+
+\fBman - Display system documentation
+ps - Report process status
+\fP
+.fi
+.RE
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fImore\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/mesg.1p b/man-pages-posix-2003/man1p/mesg.1p
new file mode 100644
index 0000000..222f2fa
--- /dev/null
+++ b/man-pages-posix-2003/man1p/mesg.1p
@@ -0,0 +1,165 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MESG" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" mesg
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+mesg \- permit or deny messages
+.SH SYNOPSIS
+.LP
+\fBmesg\fP \fB[\fP\fBy|n\fP\fB]\fP\fB\fP
+.SH DESCRIPTION
+.LP
+The \fImesg\fP utility shall control whether other users are allowed
+to send messages via \fIwrite\fP, \fItalk\fP, or other utilities to
+a terminal
+device. The terminal device affected shall be determined by searching
+for the first terminal in the sequence of devices associated
+with standard input, standard output, and standard error, respectively.
+With no arguments, \fImesg\fP shall report the current
+state without changing it. Processes with appropriate privileges may
+be able to send messages to the terminal independent of the
+current state.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+The following operands shall be supported in the POSIX locale:
+.TP 7
+\fIy\fP
+Grant permission to other users to send messages to the terminal device.
+.TP 7
+\fIn\fP
+Deny permission to other users to send messages to the terminal device.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fImesg\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written (by \fImesg\fP) to
+standard error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+If no operand is specified, \fImesg\fP shall display the current terminal
+state in an unspecified format.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Receiving messages is allowed.
+.TP 7
+\ 1
+Receiving messages is not allowed.
+.TP 7
+>1
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The mechanism by which the message status of the terminal is changed
+is unspecified. Therefore, unspecified actions may cause
+the status of the terminal to change after \fImesg\fP has successfully
+completed. These actions may include, but are not limited
+to: another invocation of the \fImesg\fP utility, login procedures;
+invocation of the \fIstty\fP utility, invocation of the \fIchmod\fP
+utility or
+\fIchmod\fP() function, and so on.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The terminal changed by \fImesg\fP is that associated with the standard
+input, output, or error, rather than the controlling
+terminal for the session. This is because users logged in more than
+once should be able to change any of their login terminals
+without having to stop the job running in those sessions. This is
+not a security problem involving the terminals of other users
+because appropriate privileges would be required to affect the terminal
+of another user.
+.LP
+The method of checking each of the first three file descriptors in
+sequence until a terminal is found was adopted from System
+V.
+.LP
+The file \fB/dev/tty\fP is not specified for the terminal device because
+it was thought to be too restrictive. Typical
+environment changes for the \fIn\fP operand are that write permissions
+are removed for \fIothers\fP and \fIgroup\fP from the
+appropriate device. It was decided to leave the actual description
+of what is done as unspecified because of potential differences
+between implementations.
+.LP
+The format for standard output is unspecified because of differences
+between historical implementations. This output is
+generally not useful to shell scripts (they can use the exit status),
+so exact parsing of the output is unnecessary.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fItalk\fP, \fIwrite\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/mkdir.1p b/man-pages-posix-2003/man1p/mkdir.1p
new file mode 100644
index 0000000..14ec198
--- /dev/null
+++ b/man-pages-posix-2003/man1p/mkdir.1p
@@ -0,0 +1,199 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MKDIR" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" mkdir
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+mkdir \- make directories
+.SH SYNOPSIS
+.LP
+\fBmkdir\fP \fB[\fP\fB-p\fP\fB][\fP\fB-m\fP \fImode\fP\fB]\fP \fIdir\fP\fB...\fP
+.SH DESCRIPTION
+.LP
+The \fImkdir\fP utility shall create the directories specified by
+the operands, in the order specified.
+.LP
+For each \fIdir\fP operand, the \fImkdir\fP utility shall perform
+actions equivalent to the \fImkdir\fP() function defined in the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001,
+called with the following arguments:
+.IP " 1." 4
+The \fIdir\fP operand is used as the \fIpath\fP argument.
+.LP
+.IP " 2." 4
+The value of the bitwise-inclusive OR of S_IRWXU, S_IRWXG, and S_IRWXO
+is used as the \fImode\fP argument. (If the \fB-m\fP
+option is specified, the \fImode\fP option-argument overrides this
+default.)
+.LP
+.SH OPTIONS
+.LP
+The \fImkdir\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-m\ \fP \fImode\fP
+Set the file permission bits of the newly-created directory to the
+specified \fImode\fP value. The \fImode\fP option-argument
+shall be the same as the \fImode\fP operand defined for the \fIchmod\fP
+utility. In the
+\fIsymbolic_mode\fP strings, the \fIop\fP characters \fB'+'\fP and
+\fB'-'\fP shall be interpreted relative to an assumed
+initial mode of \fIa\fP= \fIrwx\fP; \fB'+'\fP shall add permissions
+to the default mode, \fB'-'\fP shall delete permissions
+from the default mode.
+.TP 7
+\fB-p\fP
+Create any missing intermediate pathname components.
+.LP
+For each \fIdir\fP operand that does not name an existing directory,
+effects equivalent to those caused by the following
+command shall occur:
+.sp
+.RS
+.nf
+
+\fBmkdir -p -m $(umask -S),u+wx $(dirname\fP \fIdir\fP\fB) &&
+mkdir\fP \fB[\fP\fB-m\fP \fImode\fP\fB]\fP \fIdir\fP
+.fi
+.RE
+.LP
+where the \fB-m\fP \fImode\fP option represents that option supplied
+to the original invocation of \fImkdir\fP, if any.
+.LP
+Each \fIdir\fP operand that names an existing directory shall be ignored
+without error.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIdir\fP
+A pathname of a directory to be created.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fImkdir\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+All the specified directories were created successfully or the \fB-p\fP
+option was specified and all the specified directories
+now exist.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The default file mode for directories is \fIa\fP= \fIrwx\fP (777 on
+most systems) with selected permissions removed in
+accordance with the file mode creation mask. For intermediate pathname
+components created by \fImkdir\fP, the mode is the default
+modified by \fIu\fP+ \fIwx\fP so that the subdirectories can always
+be created regardless of the file mode creation mask; if
+different ultimate permissions are desired for the intermediate directories,
+they can be changed afterwards with \fIchmod\fP.
+.LP
+Note that some of the requested directories may have been created
+even if an error occurs.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The System V \fB-m\fP option was included to control the file mode.
+.LP
+The System V \fB-p\fP option was included to create any needed intermediate
+directories and to complement the functionality
+provided by \fIrmdir\fP for removing directories in the path prefix
+as they become empty.
+Because no error is produced if any path component already exists,
+the \fB-p\fP option is also useful to ensure that a particular
+directory exists.
+.LP
+The functionality of \fImkdir\fP is described substantially through
+a reference to the \fImkdir\fP() function in the System Interfaces
+volume of IEEE\ Std\ 1003.1-2001. For
+example, by default, the mode of the directory is affected by the
+file mode creation mask in accordance with the specified behavior
+of the \fImkdir\fP() function. In this way, there is less duplication
+of effort required for
+describing details of the directory creation.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIchmod\fP(), \fIrm\fP, \fIrmdir\fP(), \fIumask\fP(), the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001, \fImkdir\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/mkfifo.1p b/man-pages-posix-2003/man1p/mkfifo.1p
new file mode 100644
index 0000000..8846973
--- /dev/null
+++ b/man-pages-posix-2003/man1p/mkfifo.1p
@@ -0,0 +1,168 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MKFIFO" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" mkfifo
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+mkfifo \- make FIFO special files
+.SH SYNOPSIS
+.LP
+\fBmkfifo\fP \fB[\fP\fB-m\fP \fImode\fP\fB]\fP \fIfile\fP\fB...\fP
+.SH DESCRIPTION
+.LP
+The \fImkfifo\fP utility shall create the FIFO special files specified
+by the operands, in the order specified.
+.LP
+For each \fIfile\fP operand, the \fImkfifo\fP utility shall perform
+actions equivalent to the \fImkfifo\fP() function defined in the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001,
+called with the following arguments:
+.IP " 1." 4
+The \fIfile\fP operand is used as the \fIpath\fP argument.
+.LP
+.IP " 2." 4
+The value of the bitwise-inclusive OR of S_IRUSR, S_IWUSR, S_IRGRP,
+S_IWGRP, S_IROTH, and S_IWOTH is used as the \fImode\fP
+argument. (If the \fB-m\fP option is specified, the value of the \fImkfifo\fP()
+\fImode\fP argument is unspecified, but the FIFO shall at no time
+have permissions less restrictive than the \fB-m\fP \fImode\fP
+option-argument.)
+.LP
+.SH OPTIONS
+.LP
+The \fImkfifo\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following option shall be supported:
+.TP 7
+\fB-m\ \fP \fImode\fP
+Set the file permission bits of the newly-created FIFO to the specified
+\fImode\fP value. The \fImode\fP option-argument
+shall be the same as the \fImode\fP operand defined for the \fIchmod\fP
+utility. In the
+\fIsymbolic_mode\fP strings, the \fIop\fP characters \fB'+'\fP and
+\fB'-'\fP shall be interpreted relative to an assumed
+initial mode of \fIa\fP= \fIrw\fP.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of the FIFO special file to be created.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fImkfifo\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+All the specified FIFO special files were created successfully.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+This utility was added to permit shell applications to create FIFO
+special files.
+.LP
+The \fB-m\fP option was added to control the file mode, for consistency
+with the similar functionality provided by the \fImkdir\fP utility.
+.LP
+Early proposals included a \fB-p\fP option similar to the \fImkdir\fP
+\fB-p\fP option
+that created intermediate directories leading up to the FIFO specified
+by the final component. This was removed because it is not
+commonly needed and is not common practice with similar utilities.
+.LP
+The functionality of \fImkfifo\fP is described substantially through
+a reference to the \fImkfifo\fP() function in the System Interfaces
+volume of IEEE\ Std\ 1003.1-2001. For
+example, by default, the mode of the FIFO file is affected by the
+file mode creation mask in accordance with the specified behavior
+of the \fImkfifo\fP() function. In this way, there is less duplication
+of effort required
+for describing details of the file creation.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIchmod\fP(), \fIumask\fP(), the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001, \fImkfifo\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/more.1p b/man-pages-posix-2003/man1p/more.1p
new file mode 100644
index 0000000..1dc451d
--- /dev/null
+++ b/man-pages-posix-2003/man1p/more.1p
@@ -0,0 +1,1074 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MORE" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" more
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+more \- display files on a page-by-page basis
+.SH SYNOPSIS
+.LP
+\fBmore\fP \fB[\fP\fB-ceisu\fP\fB][\fP\fB-n\fP \fInumber\fP\fB][\fP\fB-p\fP
+\fIcommand\fP\fB][\fP\fB-t\fP \fItagstring\fP\fB][\fP\fIfile\fP \fB...\fP\fB]\fP\fB\fP
+.SH DESCRIPTION
+.LP
+The \fImore\fP utility shall read files and either write them to the
+terminal on a page-by-page basis or filter them to
+standard output. If standard output is not a terminal device, all
+input files shall be copied to standard output in their entirety,
+without modification, except as specified for the \fB-s\fP option.
+If standard output is a terminal device, the files shall be
+written a number of lines (one screenful) at a time under the control
+of user commands. See the EXTENDED DESCRIPTION section.
+.LP
+Certain block-mode terminals do not have all the capabilities necessary
+to support the complete \fImore\fP definition; they are
+incapable of accepting commands that are not terminated with a <newline>.
+Implementations that support such terminals shall
+provide an operating mode to \fImore\fP in which all commands can
+be terminated with a <newline> on those terminals. This
+mode:
+.IP " *" 3
+Shall be documented in the system documentation
+.LP
+.IP " *" 3
+Shall, at invocation, inform the user of the terminal deficiency that
+requires the <newline> usage and provide
+instructions on how this warning can be suppressed in future invocations
+.LP
+.IP " *" 3
+Shall not be required for implementations supporting only fully capable
+terminals
+.LP
+.IP " *" 3
+Shall not affect commands already requiring <newline>s
+.LP
+.IP " *" 3
+Shall not affect users on the capable terminals from using \fImore\fP
+as described in this volume of
+IEEE\ Std\ 1003.1-2001
+.LP
+.SH OPTIONS
+.LP
+The \fImore\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-c\fP
+If a screen is to be written that has no lines in common with the
+current screen, or \fImore\fP is writing its first screen,
+\fImore\fP shall not scroll the screen, but instead shall redraw each
+line of the screen in turn, from the top of the screen to
+the bottom. In addition, if \fImore\fP is writing its first screen,
+the screen shall be cleared. This option may be silently
+ignored on devices with insufficient terminal capabilities.
+.TP 7
+\fB-e\fP
+By default, \fImore\fP shall exit immediately after writing the last
+line of the last file in the argument list. If the
+\fB-e\fP option is specified:
+.RS
+.IP " 1." 4
+If there is only a single file in the argument list and that file
+was completely displayed on a single screen, \fImore\fP shall
+exit immediately after writing the last line of that file.
+.LP
+.IP " 2." 4
+Otherwise, \fImore\fP shall exit only after reaching end-of-file on
+the last file in the argument list twice without an
+intervening operation. See the EXTENDED DESCRIPTION section.
+.LP
+.RE
+.TP 7
+\fB-i\fP
+Perform pattern matching in searches without regard to case; see the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Section 9.2, Regular Expression General Requirements.
+.TP 7
+\fB-n\ \fP \fInumber\fP
+Specify the number of lines per screenful. The \fInumber\fP argument
+is a positive decimal integer. The \fB-n\fP option shall
+override any values obtained from any other source.
+.TP 7
+\fB-p\ \fP \fIcommand\fP
+Each time a screen from a new file is displayed or redisplayed (including
+as a result of \fImore\fP commands; for example,
+\fB:p\fP), execute the \fImore\fP command(s) in the command arguments
+in the order specified, as if entered by the user after the
+first screen has been displayed. No intermediate results shall be
+displayed (that is, if the command is a movement to a screen
+different from the normal first screen, only the screen resulting
+from the command shall be displayed.) If any of the commands fail
+for any reason, an informational message to this effect shall be written,
+and no further commands specified using the \fB-p\fP
+option shall be executed for this file.
+.TP 7
+\fB-s\fP
+Behave as if consecutive empty lines were a single empty line.
+.TP 7
+\fB-t\ \fP \fItagstring\fP
+Write the screenful of the file containing the tag named by the \fItagstring\fP
+argument. See the \fIctags\fP utility. The tags feature represented
+by \fB-t\fP \fItagstring\fP and the \fB:t\fP command is
+optional. It shall be provided on any system that also provides a
+conforming implementation of \fIctags\fP; otherwise, the use of \fB-t\fP
+produces undefined results.
+.LP
+The filename resulting from the \fB-t\fP option shall be logically
+added as a prefix to the list of command line files, as if
+specified by the user. If the tag named by the \fItagstring\fP argument
+is not found, it shall be an error, and \fImore\fP shall
+take no further action.
+.LP
+If the tag specifies a line number, the first line of the display
+shall contain the beginning of that line. If the tag specifies
+a pattern, the first line of the display shall contain the beginning
+of the matching text from the first line of the file that
+contains that pattern. If the line does not exist in the file or matching
+text is not found, an informational message to this
+effect shall be displayed, and \fImore\fP shall display the default
+screen as if \fB-t\fP had not been specified.
+.LP
+If both the \fB-t\fP \fItagstring\fP and \fB-p\fP \fIcommand\fP options
+are given, the \fB-t\fP \fItagstring\fP shall be
+processed first; that is, the file and starting line for the display
+shall be as specified by \fB-t\fP, and then the \fB-p\fP
+\fImore\fP command shall be executed. If the line (matching text)
+specified by the \fB-t\fP command does not exist (is not
+found), no \fB-p\fP \fImore\fP command shall be executed for this
+file at any time.
+.TP 7
+\fB-u\fP
+Treat a <backspace> as a printable control character, displayed as
+an implementation-defined character sequence (see the
+EXTENDED DESCRIPTION section), suppressing backspacing and the special
+handling that produces underlined or standout mode text on
+some terminal types. Also, do not ignore a <carriage-return> at the
+end of a line.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of an input file. If no \fIfile\fP operands are specified,
+the standard input shall be used. If a \fIfile\fP is
+\fB'-'\fP, the standard input shall be read at that point in the
+sequence.
+.sp
+.SH STDIN
+.LP
+The standard input shall be used only if no \fIfile\fP operands are
+specified, or if a \fIfile\fP operand is \fB'-'\fP
+\&.
+.SH INPUT FILES
+.LP
+The input files being examined shall be text files. If standard output
+is a terminal, standard error shall be used to read
+commands from the user. If standard output is a terminal, standard
+error is not readable, and command input is needed, \fImore\fP
+may attempt to obtain user commands from the controlling terminal
+(for example, \fB/dev/tty\fP); otherwise, \fImore\fP shall
+terminate with an error indicating that it was unable to read user
+commands. If standard output is not a terminal, no error shall
+result if standard error cannot be opened for reading.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fImore\fP:
+.TP 7
+\fICOLUMNS\fP
+Override the system-selected horizontal display line size. See the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 8, Environment Variables for valid values and results when
+it is unset or
+null.
+.TP 7
+\fIEDITOR\fP
+Used by the \fBv\fP command to select an editor. See the EXTENDED
+DESCRIPTION section.
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_COLLATE\fP
+.sp
+Determine the locale for the behavior of ranges, equivalence classes,
+and multi-character collating elements within regular
+expressions.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files) and
+the behavior of character classes within regular
+expressions.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard error and
+informative messages written to standard output.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fILINES\fP
+Override the system-selected vertical screen size, used as the number
+of lines in a screenful. See the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Chapter 8, Environment Variables for valid
+values and
+results when it is unset or null. The \fB-n\fP option shall take precedence
+over the \fILINES\fP variable for determining the
+number of lines in a screenful.
+.TP 7
+\fIMORE\fP
+Determine a string containing options described in the OPTIONS section
+preceded with hyphens and <blank>-separated as on
+the command line. Any command line options shall be processed after
+those in the \fIMORE\fP variable, as if the command line were:
+.sp
+.RS
+.nf
+
+\fBmore $MORE\fP \fIoptions operands\fP
+.fi
+.RE
+.LP
+The \fIMORE\fP variable shall take precedence over the \fITERM\fP
+and \fILINES\fP variables for determining the number of
+lines in a screenful.
+.TP 7
+\fITERM\fP
+Determine the name of the terminal type. If this variable is unset
+or null, an unspecified default terminal type is used.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The standard output shall be used to write the contents of the input
+files.
+.SH STDERR
+.LP
+The standard error shall be used for diagnostic messages and user
+commands (see the INPUT FILES section), and, if standard
+output is a terminal device, to write a prompting string. The prompting
+string shall appear on the screen line below the last line
+of the file displayed in the current screenful. The prompt shall contain
+the name of the file currently being examined and shall
+contain an end-of-file indication and the name of the next file, if
+any, when prompting at the end-of-file. If an error or
+informational message is displayed, it is unspecified whether it is
+contained in the prompt. If it is not contained in the prompt,
+it shall be displayed and then the user shall be prompted for a continuation
+character, at which point another message or the user
+prompt may be displayed. The prompt is otherwise unspecified. It is
+unspecified whether informational messages are written for
+other user commands.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+The following section describes the behavior of \fImore\fP when the
+standard output is a terminal device. If the standard
+output is not a terminal device, no options other than \fB-s\fP shall
+have any effect, and all input files shall be copied to
+standard output otherwise unmodified, at which time \fImore\fP shall
+exit without further action.
+.LP
+The number of lines available per screen shall be determined by the
+\fB-n\fP option, if present, or by examining values in the
+environment (see the ENVIRONMENT VARIABLES section). If neither method
+yields a number, an unspecified number of lines shall be
+used.
+.LP
+The maximum number of lines written shall be one less than this number,
+because the screen line after the last line written
+shall be used to write a user prompt and user input. If the number
+of lines in the screen is less than two, the results are
+undefined. It is unspecified whether user input is permitted to be
+longer than the remainder of the single line where the prompt
+has been written.
+.LP
+The number of columns available per line shall be determined by examining
+values in the environment (see the ENVIRONMENT
+VARIABLES section), with a default value as described in the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 8, Environment
+Variables.
+.LP
+Lines that are longer than the display shall be folded; the length
+at which folding occurs is unspecified, but should be
+appropriate for the output device. Folding may occur between glyphs
+of single characters that take up multiple display columns.
+.LP
+When standard output is a terminal and \fB-u\fP is not specified,
+\fImore\fP shall treat <backspace>s and
+<carriage-return>s specially:
+.IP " *" 3
+A character, followed first by a sequence of \fIn\fP <backspace>s
+(where \fIn\fP is the same as the number of column
+positions that the character occupies), then by \fIn\fP underscore
+characters ( \fB'_'\fP ), shall cause that character to be
+written as underlined text, if the terminal type supports that. The
+\fIn\fP underscore characters, followed first by \fIn\fP
+<backspace>s, then any character with \fIn\fP column positions, shall
+also cause that character to be written as underlined
+text, if the terminal type supports that.
+.LP
+.IP " *" 3
+A sequence of \fIn\fP <backspace>s (where \fIn\fP is the same as the
+number of column positions that the previous
+character occupies) that appears between two identical printable characters
+shall cause the first of those two characters to be
+written as emboldened text (that is, visually brighter, standout mode,
+or inverse-video mode), if the terminal type supports that,
+and the second to be discarded. Immediately subsequent occurrences
+of <backspace>/ character pairs for that same character
+shall also be discarded. (For example, the sequence \fB"a\\ba\\ba\\ba"\fP
+is interpreted as a single emboldened \fB'a'\fP .)
+.LP
+.IP " *" 3
+The \fImore\fP utility shall logically discard all other <backspace>s
+from the line as well as the character which
+precedes them, if any.
+.LP
+.IP " *" 3
+A <carriage-return> at the end of a line shall be ignored, rather
+than being written as a non-printable character, as
+described in the next paragraph.
+.LP
+.LP
+It is implementation-defined how other non-printable characters are
+written. Implementations should use the same format that
+they use for the \fIex\fP \fBprint\fP command; see the OPTIONS section
+within the \fIed\fP utility. It is unspecified whether a multi-column
+character shall be separated if it crosses a
+display line boundary; it shall not be discarded. The behavior is
+unspecified if the number of columns on the display is less than
+the number of columns any single character in the line being displayed
+would occupy.
+.LP
+When each new file is displayed (or redisplayed), \fImore\fP shall
+write the first screen of the file. Once the initial screen
+has been written, \fImore\fP shall prompt for a user command. If the
+execution of the user command results in a screen that has
+lines in common with the current screen, and the device has sufficient
+terminal capabilities, \fImore\fP shall scroll the screen;
+otherwise, it is unspecified whether the screen is scrolled or redrawn.
+.LP
+For all files but the last (including standard input if no file was
+specified, and for the last file as well, if the \fB-e\fP
+option was not specified), when \fImore\fP has written the last line
+in the file, \fImore\fP shall prompt for a user command.
+This prompt shall contain the name of the next file as well as an
+indication that \fImore\fP has reached end-of-file. If the user
+command is \fBf\fP, <control>-F, <space>, \fBj\fP, <newline>, \fBd\fP,
+<control>-D, or \fBs\fP,
+\fImore\fP shall display the next file. Otherwise, if displaying the
+last file, \fImore\fP shall exit. Otherwise, \fImore\fP
+shall execute the user command specified.
+.LP
+Several of the commands described in this section display a previous
+screen from the input stream. In the case that text is
+being taken from a non-rewindable stream, such as a pipe, it is implementation-defined
+how much backwards motion is supported. If a
+command cannot be executed because of a limitation on backwards motion,
+an error message to this effect shall be displayed, the
+current screen shall not change, and the user shall be prompted for
+another command.
+.LP
+If a command cannot be performed because there are insufficient lines
+to display, \fImore\fP shall alert the terminal. If a
+command cannot be performed because there are insufficient lines to
+display or a \fB/\fP command fails: if the input is the
+standard input, the last screen in the file may be displayed; otherwise,
+the current file and screen shall not change, and the user
+shall be prompted for another command.
+.LP
+The interactive commands in the following sections shall be supported.
+Some commands can be preceded by a decimal integer,
+called \fIcount\fP in the following descriptions. If not specified
+with the command, \fIcount\fP shall default to 1. In the
+following descriptions, \fIpattern\fP is a basic regular expression,
+as described in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 9.3, Basic Regular Expressions. The
+term "examine" is historical usage meaning "open the file for viewing'';
+for example, \fImore\fP \fBfoo\fP would be expressed
+as examining file \fBfoo\fP.
+.LP
+In the following descriptions, unless otherwise specified, \fIline\fP
+is a line in the \fImore\fP display, not a line from the
+file being examined.
+.LP
+In the following descriptions, the \fIcurrent position\fP refers to
+two things:
+.IP " 1." 4
+The position of the current line on the screen
+.LP
+.IP " 2." 4
+The line number (in the file) of the current line on the screen
+.LP
+.LP
+Usually, the line on the screen corresponding to the current position
+is the third line on the screen. If this is not possible
+(there are fewer than three lines to display or this is the first
+page of the file, or it is the last page of the file), then the
+current position is either the first or last line on the screen as
+described later.
+.SS Help
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBh
+\fP
+.fi
+.RE
+.sp
+.LP
+Write a summary of these commands and other implementation-defined
+commands. The behavior shall be as if the \fImore\fP utility
+were executed with the \fB-e\fP option on a file that contained the
+summary information. The user shall be prompted as described
+earlier in this section when end-of-file is reached. If the user command
+is one of those specified to continue to the next file,
+\fImore\fP shall return to the file and screen state from which the
+\fBh\fP command was executed.
+.SS Scroll Forward One Screenful
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP\fBf
+\fP\fB[\fP\fIcount\fP\fB]\fP\fB<control>-F
+\fP
+.fi
+.RE
+.sp
+.LP
+Scroll forward \fIcount\fP lines, with a default of one screenful.
+If \fIcount\fP is more than the screen size, only the final
+screenful shall be written.
+.SS Scroll Backward One Screenful
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP\fBb
+\fP\fB[\fP\fIcount\fP\fB]\fP\fB<control>-B
+\fP
+.fi
+.RE
+.sp
+.LP
+Scroll backward \fIcount\fP lines, with a default of one screenful
+(see the \fB-n\fP option). If \fIcount\fP is more than the
+screen size, only the final screenful shall be written.
+.SS Scroll Forward One Line
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP\fB<space>
+\fP\fB[\fP\fIcount\fP\fB]\fP\fBj
+\fP\fB[\fP\fIcount\fP\fB]\fP\fB<newline>
+\fP
+.fi
+.RE
+.sp
+.LP
+Scroll forward \fIcount\fP lines. The default \fIcount\fP for the
+<space> shall be one screenful; for \fBj\fP and
+<newline>, one line. The entire \fIcount\fP lines shall be written,
+even if \fIcount\fP is more than the screen size.
+.SS Scroll Backward One Line
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP\fBk
+\fP
+.fi
+.RE
+.sp
+.LP
+Scroll backward \fIcount\fP lines. The entire \fIcount\fP lines shall
+be written, even if \fIcount\fP is more than the screen
+size.
+.SS Scroll Forward One Half Screenful
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP\fBd
+\fP\fB[\fP\fIcount\fP\fB]\fP\fB<control>-D
+\fP
+.fi
+.RE
+.sp
+.LP
+Scroll forward \fIcount\fP lines, with a default of one half of the
+screen size. If \fIcount\fP is specified, it shall become
+the new default for subsequent \fBd\fP, <control>-D, and \fBu\fP commands.
+.SS Skip Forward One Line
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP\fBs
+\fP
+.fi
+.RE
+.sp
+.LP
+Display the screenful beginning with the line \fIcount\fP lines after
+the last line on the current screen. If \fIcount\fP
+would cause the current position to be such that less than one screenful
+would be written, the last screenful in the file shall be
+written.
+.SS Scroll Backward One Half Screenful
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP\fBu
+\fP\fB[\fP\fIcount\fP\fB]\fP\fB<control>-U
+\fP
+.fi
+.RE
+.sp
+.LP
+Scroll backward \fIcount\fP lines, with a default of one half of the
+screen size. If \fIcount\fP is specified, it shall become
+the new default for subsequent \fBd\fP, <control>-D, \fBu\fP, and
+<control>-U commands. The entire \fIcount\fP lines
+shall be written, even if \fIcount\fP is more than the screen size.
+.SS Go to Beginning of File
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP\fBg
+\fP
+.fi
+.RE
+.sp
+.LP
+Display the screenful beginning with line \fIcount\fP.
+.SS Go to End-of-File
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP\fBG
+\fP
+.fi
+.RE
+.sp
+.LP
+If \fIcount\fP is specified, display the screenful beginning with
+the line \fIcount\fP. Otherwise, display the last screenful
+of the file.
+.SS Refresh the Screen
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBr
+<control>-L
+\fP
+.fi
+.RE
+.sp
+.LP
+Refresh the screen.
+.SS Discard and Refresh
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBR
+\fP
+.fi
+.RE
+.sp
+.LP
+Refresh the screen, discarding any buffered input. If the current
+file is non-seekable, buffered input shall not be discarded
+and the \fBR\fP command shall be equivalent to the \fBr\fP command.
+.SS Mark Position
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBm\fP\fIletter\fP
+.fi
+.RE
+.sp
+.LP
+Mark the current position with the letter named by \fIletter\fP, where
+\fIletter\fP represents the name of one of the
+lowercase letters of the portable character set. When a new file is
+examined, all marks may be lost.
+.SS Return to Mark
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB'\fP\fIletter\fP
+.fi
+.RE
+.sp
+.LP
+Return to the position that was previously marked with the letter
+named by \fIletter\fP, making that line the current
+position.
+.SS Return to Previous Position
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB''
+\fP
+.fi
+.RE
+.sp
+.LP
+Return to the position from which the last large movement command
+was executed (where a "large movement" is defined as any
+movement of more than a screenful of lines). If no such movements
+have been made, return to the beginning of the file.
+.SS Search Forward for Pattern
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP\fB/\fP\fB[\fP\fB!\fP\fB]\fP\fIpattern\fP\fB<newline>
+\fP
+.fi
+.RE
+.sp
+.LP
+Display the screenful beginning with the \fIcount\fPth line containing
+the pattern. The search shall start after the first line
+currently displayed. The null regular expression ( \fB'/'\fP followed
+by a <newline>) shall repeat the search using the
+previous regular expression, with a default \fIcount\fP. If the character
+\fB'!'\fP is included, the matching lines shall be
+those that do not contain the \fIpattern\fP. If no match is found
+for the \fIpattern\fP, a message to that effect shall be
+displayed.
+.SS Search Backward for Pattern
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP\fB?\fP\fB[\fP\fB!\fP\fB]\fP\fIpattern\fP\fB<newline>
+\fP
+.fi
+.RE
+.sp
+.LP
+Display the screenful beginning with the \fIcount\fPth previous line
+containing the pattern. The search shall start on the last
+line before the first line currently displayed. The null regular expression
+( \fB'?'\fP followed by a <newline>) shall
+repeat the search using the previous regular expression, with a default
+\fIcount\fP. If the character \fB'!'\fP is included,
+matching lines shall be those that do not contain the \fIpattern\fP.
+If no match is found for the \fIpattern\fP, a message to
+that effect shall be displayed.
+.SS Repeat Search
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP\fBn
+\fP
+.fi
+.RE
+.sp
+.LP
+Repeat the previous search for \fIcount\fPth line containing the last
+\fIpattern\fP (or not containing the last
+\fIpattern\fP, if the previous search was \fB"/!"\fP or \fB"?!"\fP
+).
+.SS Repeat Search in Reverse
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP\fBN
+\fP
+.fi
+.RE
+.sp
+.LP
+Repeat the search in the opposite direction of the previous search
+for the \fIcount\fPth line containing the last
+\fIpattern\fP (or not containing the last \fIpattern\fP, if the previous
+search was \fB"/!"\fP or \fB"?!"\fP ).
+.SS Examine New File
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB:e\fP \fB[\fP\fIfilename\fP\fB]\fP\fB<newline>
+\fP
+.fi
+.RE
+.sp
+.LP
+Examine a new file. If the \fIfilename\fP argument is not specified,
+the current file (see the \fB:n\fP and \fB:p\fP commands
+below) shall be re-examined. The \fIfilename\fP shall be subjected
+to the process of shell word expansions (see \fIWord Expansions\fP
+); if more than a single pathname results, the effects are unspecified.
+If
+\fIfilename\fP is a number sign ( \fB'#'\fP ), the previously examined
+file shall be re-examined. If \fIfilename\fP is not
+accessible for any reason (including that it is a non-seekable file),
+an error message to this effect shall be displayed and the
+current file and screen shall not change.
+.SS Examine Next File
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP\fB:n
+\fP
+.fi
+.RE
+.sp
+.LP
+Examine the next file. If a number \fIcount\fP is specified, the \fIcount\fPth
+next file shall be examined. If \fIfilename\fP
+refers to a non-seekable file, the results are unspecified.
+.SS Examine Previous File
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP\fB:p
+\fP
+.fi
+.RE
+.sp
+.LP
+Examine the previous file. If a number \fIcount\fP is specified, the
+\fIcount\fPth previous file shall be examined. If
+\fIfilename\fP refers to a non-seekable file, the results are unspecified.
+.SS Go to Tag
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB:t\fP \fItagstring\fP\fB<newline>
+\fP
+.fi
+.RE
+.sp
+.LP
+If the file containing the tag named by the \fItagstring\fP argument
+is not the current file, examine the file, as if the
+\fB:e\fP command was executed with that file as the argument. Otherwise,
+or in addition, display the screenful beginning with the
+tag, as described for the \fB-t\fP option (see the OPTIONS section).
+If the \fIctags\fP
+utility is not supported by the system, the use of \fB:t\fP produces
+undefined results.
+.SS Invoke Editor
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBv
+\fP
+.fi
+.RE
+.sp
+.LP
+Invoke an editor to edit the current file being examined. If standard
+input is being examined, the results are unspecified. The
+name of the editor shall be taken from the environment variable \fIEDITOR
+,\fP or shall default to \fIvi\fP. If the last pathname component
+in \fIEDITOR\fP is either \fIvi\fP or \fIex\fP, the editor shall be
+invoked with a \fB-c\fP
+\fIlinenumber\fP command line argument, where \fIlinenumber\fP is
+the line number of the file line containing the display line
+currently displayed as the first line of the screen. It is implementation-defined
+whether line-setting options are passed to
+editors other than \fIvi\fP and \fIex\fP.
+.LP
+When the editor exits, \fImore\fP shall resume with the same file
+and screen as when the editor was invoked.
+.SS Display Position
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB=
+<control>-G
+\fP
+.fi
+.RE
+.sp
+.LP
+Write a message for which the information references the first byte
+of the line after the last line of the file on the screen.
+This message shall include the name of the file currently being examined,
+its number relative to the total number of files there
+are to examine, the line number in the file, the byte number and the
+total bytes in the file, and what percentage of the file
+precedes the current position. If \fImore\fP is reading from standard
+input, or the file is shorter than a single screen, the line
+number, the byte number, the total bytes, and the percentage need
+not be written.
+.SS Quit
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBq
+:q
+ZZ
+\fP
+.fi
+.RE
+.sp
+.LP
+Exit \fImore\fP.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+If an error is encountered accessing a file when using the \fB:n\fP
+command, \fImore\fP shall attempt to examine the next file
+in the argument list, but the final exit status shall be affected.
+If an error is encountered accessing a file via the \fB:p\fP
+command, \fImore\fP shall attempt to examine the previous file in
+the argument list, but the final exit status shall be affected.
+If an error is encountered accessing a file via the \fB:e\fP command,
+\fImore\fP shall remain in the current file and the final
+exit status shall not be affected.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+When the standard output is not a terminal, only the \fB-s\fP filter-modification
+option is effective. This is based on
+historical practice. For example, a typical implementation of \fIman\fP
+pipes its output
+through \fImore\fP \fB-s\fP to squeeze excess white space for terminal
+users. When \fIman\fP
+is piped to \fIlp\fP, however, it is undesirable for this squeezing
+to happen.
+.SH EXAMPLES
+.LP
+The \fB-p\fP allows arbitrary commands to be executed at the start
+of each file. Examples are:
+.TP 7
+\fImore\ \fP \fB-p\ G\ \fP \fIfile1\ file2\fP
+.sp
+Examine each file starting with its last screenful.
+.TP 7
+\fImore\ \fP \fB-p\ \fP 100\ \fIfile1\ file2\fP
+.sp
+Examine each file starting with line 100 in the current position (usually
+the third line, so line 98 would be the first line
+written).
+.TP 7
+\fImore\ \fP \fB-p\ \fP /100\ \fIfile1\ file2\fP
+.sp
+Examine each file starting with the first line containing the string
+\fB"100"\fP in the current position
+.sp
+.SH RATIONALE
+.LP
+The \fImore\fP utility, available in BSD and BSD-derived systems,
+was chosen as the prototype for the POSIX file display
+program since it is more widely available than either the public-domain
+program \fIless\fP or than \fIpg\fP, a pager provided in
+System V. The 4.4 BSD \fImore\fP is the model for the features selected;
+it is almost fully upwards-compatible from the 4.3 BSD
+version in wide use and has become more amenable for \fIvi\fP users.
+Several features
+originally derived from various file editors, found in both \fIless\fP
+and \fIpg\fP, have been added to this volume of
+IEEE\ Std\ 1003.1-2001 as they have proved extremely popular with
+users.
+.LP
+There are inconsistencies between \fImore\fP and \fIvi\fP that result
+from historical
+practice. For example, the single-character commands \fBh\fP, \fBf\fP,
+\fBb\fP, and <space> are screen movers in
+\fImore\fP, but cursor movers in \fIvi\fP. These inconsistencies were
+maintained because the
+cursor movements are not applicable to \fImore\fP and the powerful
+functionality achieved without the use of the control key
+justifies the differences.
+.LP
+The tags interface has been included in a program that is not a text
+editor because it promotes another degree of consistent
+operation with \fIvi\fP. It is conceivable that the paging environment
+of \fImore\fP would be
+superior for browsing source code files in some circumstances.
+.LP
+The operating mode referred to for block-mode terminals effectively
+adds a <newline> to each Synopsis line that currently
+has none. So, for example, \fBd\fP <newline> would page one screenful.
+The mode could be triggered by a command line option,
+environment variable, or some other method. The details are not imposed
+by this volume of IEEE\ Std\ 1003.1-2001 because
+there are so few systems known to support such terminals. Nevertheless,
+it was considered that all systems should be able to
+support \fImore\fP given the exception cited for this small community
+of terminals because, in comparison to \fIvi\fP, the cursor movements
+are few and the command set relatively amenable to the optional
+<newline>s.
+.LP
+Some versions of \fImore\fP provide a shell escaping mechanism similar
+to the \fIex\fP
+\fB!\fP command. The standard developers did not consider that this
+was necessary in a paginator, particularly given the wide
+acceptance of multiple window terminals and job control features.
+(They chose to retain such features in the editors and \fImailx\fP
+because the shell interaction also gives an opportunity to modify
+the editing buffer,
+which is not applicable to \fImore\fP.)
+.LP
+The \fB-p\fP (position) option replaces the \fB+\fP command because
+of the Utility Syntax Guidelines. In early proposals, it
+took a \fIpattern\fP argument, but historical \fIless\fP provided
+the \fImore\fP general facility of a command. It would have
+been desirable to use the same \fB-c\fP as \fIex\fP and \fIvi\fP,
+but the letter was already in use.
+.LP
+The text stating "from a non-rewindable stream ... implementations
+may limit the amount of backwards motion supported" would
+allow an implementation that permitted no backwards motion beyond
+text already on the screen. It was not possible to require a
+minimum amount of backwards motion that would be effective for all
+conceivable device types. The implementation should allow the
+user to back up as far as possible, within device and reasonable memory
+allocation constraints.
+.LP
+Historically, non-printable characters were displayed using the ARPA
+standard mappings, which are as follows:
+.IP " 1." 4
+Printable characters are left alone.
+.LP
+.IP " 2." 4
+Control characters less than \\177 are represented as followed by
+the character offset from the \fB'@'\fP character in the
+ASCII map; for example, \\007 is represented as \fB'G'\fP .
+.LP
+.IP " 3." 4
+\\177 is represented as followed by \fB'?'\fP .
+.LP
+.LP
+The display of characters having their eighth bit set was less standard.
+Existing implementations use hex (0x00), octal (\\000),
+and a meta-bit display. (The latter displayed characters with their
+eighth bit set as the two characters \fB"M-"\fP, followed
+by the seven-bit display as described previously.) The latter probably
+has the best claim to historical practice because it was
+used with the \fB-v\fP option of 4 BSD and 4 BSD-derived versions
+of the \fIcat\fP utility
+since 1980.
+.LP
+No specific display format is required by IEEE\ Std\ 1003.1-2001.
+Implementations are encouraged to conform to historic
+practice in the absence of any strong reason to diverge.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIShell Command Language\fP, \fIctags\fP, \fIed\fP, \fIex\fP,
+\fIvi\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/mv.1p b/man-pages-posix-2003/man1p/mv.1p
new file mode 100644
index 0000000..08e0d84
--- /dev/null
+++ b/man-pages-posix-2003/man1p/mv.1p
@@ -0,0 +1,381 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MV" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" mv
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+mv \- move files
+.SH SYNOPSIS
+.LP
+\fBmv\fP \fB[\fP\fB-fi\fP\fB]\fP \fIsource_file target_file\fP\fB
+.br
+.sp
+mv\fP \fB[\fP\fB-fi\fP\fB]\fP \fIsource_file\fP\fB...\fP \fItarget_file\fP\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+In the first synopsis form, the \fImv\fP utility shall move the file
+named by the \fIsource_file\fP operand to the destination
+specified by the \fItarget_file\fP. This first synopsis form is assumed
+when the final operand does not name an existing directory
+and is not a symbolic link referring to an existing directory.
+.LP
+In the second synopsis form, \fImv\fP shall move each file named by
+a \fIsource_file\fP operand to a destination file in the
+existing directory named by the \fItarget_dir\fP operand, or referenced
+if \fItarget_dir\fP is a symbolic link referring to an
+existing directory. The destination path for each \fIsource_file\fP
+shall be the concatenation of the target directory, a single
+slash character, and the last pathname component of the \fIsource_file\fP.
+This second form is assumed when the final operand
+names an existing directory.
+.LP
+If any operand specifies an existing file of a type not specified
+by the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001, the behavior is implementation-defined.
+.LP
+For each \fIsource_file\fP the following steps shall be taken:
+.IP " 1." 4
+If the destination path exists, the \fB-f\fP option is not specified,
+and either of the following conditions is true:
+.RS
+.IP " a." 4
+The permissions of the destination path do not permit writing and
+the standard input is a terminal.
+.LP
+.IP " b." 4
+The \fB-i\fP option is specified.
+.LP
+.RE
+.LP
+the \fImv\fP utility shall write a prompt to standard error and read
+a line from standard input. If the response is not
+affirmative, \fImv\fP shall do nothing more with the current \fIsource_file\fP
+and go on to any remaining
+\fIsource_file\fPs.
+.LP
+.IP " 2." 4
+The \fImv\fP utility shall perform actions equivalent to the \fIrename\fP()
+function
+defined in the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+called with the following arguments:
+.RS
+.IP " a." 4
+The \fIsource_file\fP operand is used as the \fIold\fP argument.
+.LP
+.IP " b." 4
+The destination path is used as the \fInew\fP argument.
+.LP
+.RE
+.LP
+If this succeeds, \fImv\fP shall do nothing more with the current
+\fIsource_file\fP and go on to any remaining
+\fIsource_file\fPs. If this fails for any reasons other than those
+described for the \fIerrno\fP [EXDEV] in the System Interfaces
+volume of IEEE\ Std\ 1003.1-2001, \fImv\fP shall write a diagnostic
+message to standard error, do nothing more with the
+current \fIsource_file\fP, and go on to any remaining \fIsource_file\fPs.
+.LP
+.IP " 3." 4
+If the destination path exists, and it is a file of type directory
+and \fIsource_file\fP is not a file of type directory, or it
+is a file not of type directory and \fIsource_file\fP is a file of
+type directory, \fImv\fP shall write a diagnostic message to
+standard error, do nothing more with the current \fIsource_file\fP,
+and go on to any remaining \fIsource_file\fPs.
+.LP
+.IP " 4." 4
+If the destination path exists, \fImv\fP shall attempt to remove it.
+If this fails for any reason, \fImv\fP shall write a
+diagnostic message to standard error, do nothing more with the current
+\fIsource_file\fP, and go on to any remaining
+\fIsource_file\fPs.
+.LP
+.IP " 5." 4
+The file hierarchy rooted in \fIsource_file\fP shall be duplicated
+as a file hierarchy rooted in the destination path. If
+\fIsource_file\fP or any of the files below it in the hierarchy are
+symbolic links, the links themselves shall be duplicated,
+including their contents, rather than any files to which they refer.
+The following characteristics of each file in the file
+hierarchy shall be duplicated:
+.RS
+.IP " *" 3
+The time of last data modification and time of last access
+.LP
+.IP " *" 3
+The user ID and group ID
+.LP
+.IP " *" 3
+The file mode
+.LP
+.RE
+.LP
+If the user ID, group ID, or file mode of a regular file cannot be
+duplicated, the file mode bits S_ISUID and S_ISGID shall not
+be duplicated.
+.LP
+When files are duplicated to another file system, the implementation
+may require that the process invoking \fImv\fP has read
+access to each file being duplicated.
+.LP
+If the duplication of the file hierarchy fails for any reason, \fImv\fP
+shall write a diagnostic message to standard error, do
+nothing more with the current \fIsource_file\fP, and go on to any
+remaining \fIsource_file\fPs.
+.LP
+If the duplication of the file characteristics fails for any reason,
+\fImv\fP shall write a diagnostic message to standard
+error, but this failure shall not cause \fImv\fP to modify its exit
+status.
+.LP
+.IP " 6." 4
+The file hierarchy rooted in \fIsource_file\fP shall be removed. If
+this fails for any reason, \fImv\fP shall write a
+diagnostic message to the standard error, do nothing more with the
+current \fIsource_file\fP, and go on to any remaining
+\fIsource_file\fPs.
+.LP
+.SH OPTIONS
+.LP
+The \fImv\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-f\fP
+Do not prompt for confirmation if the destination path exists. Any
+previous occurrence of the \fB-i\fP option is ignored.
+.TP 7
+\fB-i\fP
+Prompt for confirmation if the destination path exists. Any previous
+occurrence of the \fB-f\fP option is ignored.
+.sp
+.LP
+Specifying more than one of the \fB-f\fP or \fB-i\fP options shall
+not be considered an error. The last option specified shall
+determine the behavior of \fImv\fP.
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIsource_file\fP
+A pathname of a file or directory to be moved.
+.TP 7
+\fItarget_file\fP
+A new pathname for the file or directory being moved.
+.TP 7
+\fItarget_dir\fP
+A pathname of an existing directory into which to move the input files.
+.sp
+.SH STDIN
+.LP
+The standard input shall be used to read an input line in response
+to each prompt specified in the STDERR section. Otherwise,
+the standard input shall not be used.
+.SH INPUT FILES
+.LP
+The input files specified by each \fIsource_file\fP operand can be
+of any file type.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fImv\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_COLLATE\fP
+.sp
+Determine the locale for the behavior of ranges, equivalence classes,
+and multi-character collating elements used in the extended
+regular expression defined for the \fByesexpr\fP locale keyword in
+the \fILC_MESSAGES\fP category.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files), the
+behavior of character classes used in the extended regular
+expression defined for the \fByesexpr\fP locale keyword in the \fILC_MESSAGES\fP
+category.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale for the processing of affirmative responses that
+should be used to affect the format and contents of
+diagnostic messages written to standard error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+Prompts shall be written to the standard error under the conditions
+specified in the DESCRIPTION section. The prompts shall
+contain the destination pathname, but their format is otherwise unspecified.
+Otherwise, the standard error shall be used only for
+diagnostic messages.
+.SH OUTPUT FILES
+.LP
+The output files may be of any file type.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+All input files were moved successfully.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+If the copying or removal of \fIsource_file\fP is prematurely terminated
+by a signal or error, \fImv\fP may leave a partial
+copy of \fIsource_file\fP at the source or destination. The \fImv\fP
+utility shall not modify both \fIsource_file\fP and the
+destination path simultaneously; termination at any point shall leave
+either \fIsource_file\fP or the destination path
+complete.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Some implementations mark for update the \fIst_ctime\fP field of renamed
+files and some do not. Applications which make use of
+the \fIst_ctime\fP field may behave differently with respect to renamed
+files unless they are designed to allow for either
+behavior.
+.SH EXAMPLES
+.LP
+If the current directory contains only files \fBa\fP (of any type
+defined by the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001), \fBb\fP (also of any type), and a directory
+\fBc\fP:
+.sp
+.RS
+.nf
+
+\fBmv a b c
+mv c d
+\fP
+.fi
+.RE
+.LP
+results with the original files \fBa\fP and \fBb\fP residing in the
+directory \fBd\fP in the current directory.
+.SH RATIONALE
+.LP
+Early proposals diverged from the SVID and BSD historical practice
+in that they required that when the destination path exists,
+the \fB-f\fP option is not specified, and input is not a terminal,
+\fImv\fP fails. This was done for compatibility with \fIcp\fP. The
+current text returns to historical practice. It should be noted that
+this is consistent
+with the \fIrename\fP() function defined in the System Interfaces
+volume of
+IEEE\ Std\ 1003.1-2001, which does not require write permission on
+the target.
+.LP
+For absolute clarity, paragraph (1), describing the behavior of \fImv\fP
+when prompting for confirmation, should be interpreted
+in the following manner:
+.sp
+.RS
+.nf
+
+\fBif (exists AND (NOT f_option) AND
+ ((not_writable AND input_is_terminal) OR i_option))
+\fP
+.fi
+.RE
+.LP
+The \fB-i\fP option exists on BSD systems, giving applications and
+users a way to avoid accidentally unlinking files when
+moving others. When the standard input is not a terminal, the 4.3
+BSD \fImv\fP deletes all existing destination paths without
+prompting, even when \fB-i\fP is specified; this is inconsistent with
+the behavior of the 4.3 BSD \fIcp\fP utility, which always generates
+an error when the file is unwritable and the standard input is
+not a terminal. The standard developers decided that use of \fB-i\fP
+is a request for interaction, so when the destination path
+exists, the utility takes instructions from whatever responds to standard
+input.
+.LP
+The \fIrename\fP() function is able to move directories within the
+same file system.
+Some historical versions of \fImv\fP have been able to move directories,
+but not to a different file system. The standard
+developers considered that this was an annoying inconsistency, so
+this volume of IEEE\ Std\ 1003.1-2001 requires
+directories to be able to be moved even across file systems. There
+is no \fB-R\fP option to confirm that moving a directory is
+actually intended, since such an option was not required for moving
+directories in historical practice. Requiring the application
+to specify it sometimes, depending on the destination, seemed just
+as inconsistent. The semantics of the \fIrename\fP() function were
+preserved as much as possible. For example, \fImv\fP is not permitted
+to "rename" files to or from directories, even though they might be
+empty and removable.
+.LP
+Historic implementations of \fImv\fP did not exit with a non-zero
+exit status if they were unable to duplicate any file
+characteristics when moving a file across file systems, nor did they
+write a diagnostic message for the user. The former behavior
+has been preserved to prevent scripts from breaking; a diagnostic
+message is now required, however, so that users are alerted that
+the file characteristics have changed.
+.LP
+The exact format of the interactive prompts is unspecified. Only the
+general nature of the contents of prompts are specified
+because implementations may desire more descriptive prompts than those
+used on historical implementations. Therefore, an
+application not using the \fB-f\fP option or using the \fB-i\fP option
+relies on the system to provide the most suitable dialog
+directly with the user, based on the behavior specified.
+.LP
+When \fImv\fP is dealing with a single file system and \fIsource_file\fP
+is a symbolic link, the link itself is moved as a
+consequence of the dependence on the \fIrename\fP() functionality,
+per the DESCRIPTION.
+Across file systems, this has to be made explicit.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcp\fP, \fIln\fP, the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001, \fIrename\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/newgrp.1p b/man-pages-posix-2003/man1p/newgrp.1p
new file mode 100644
index 0000000..6799e86
--- /dev/null
+++ b/man-pages-posix-2003/man1p/newgrp.1p
@@ -0,0 +1,272 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "NEWGRP" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" newgrp
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+newgrp \- change to a new group
+.SH SYNOPSIS
+.LP
+\fBnewgrp\fP \fB[\fP\fB-l\fP\fB][\fP\fIgroup\fP\fB]\fP\fB\fP
+.SH DESCRIPTION
+.LP
+The \fInewgrp\fP utility shall create a new shell execution environment
+with a new real and effective group identification. Of
+the attributes listed in \fIShell Execution Environment\fP, the new
+shell execution
+environment shall retain the working directory, file creation mask,
+and exported variables from the previous environment (that is,
+open files, traps, unexported variables, alias definitions, shell
+functions, and \fIset\fP options may be lost). All other aspects of
+the process environment that are
+preserved by the \fIexec\fP family of functions defined in the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001 shall
+also be preserved by \fInewgrp\fP; whether other aspects are preserved
+is unspecified.
+.LP
+A failure to assign the new group identifications (for example, for
+security or password-related reasons) shall not prevent the
+new shell execution environment from being created.
+.LP
+The \fInewgrp\fP utility shall affect the supplemental groups for
+the process as follows:
+.IP " *" 3
+On systems where the effective group ID is normally in the supplementary
+group list (or whenever the old effective group ID
+actually is in the supplementary group list):
+.RS
+.IP " *" 3
+If the new effective group ID is also in the supplementary group list,
+\fInewgrp\fP shall change the effective group ID.
+.LP
+.IP " *" 3
+If the new effective group ID is not in the supplementary group list,
+\fInewgrp\fP shall add the new effective group ID to the
+list, if there is room to add it.
+.LP
+.RE
+.LP
+.IP " *" 3
+On systems where the effective group ID is not normally in the supplementary
+group list (or whenever the old effective group ID
+is not in the supplementary group list):
+.RS
+.IP " *" 3
+If the new effective group ID is in the supplementary group list,
+\fInewgrp\fP shall delete it.
+.LP
+.IP " *" 3
+If the old effective group ID is not in the supplementary list, \fInewgrp\fP
+shall add it if there is room.
+.LP
+.RE
+.LP
+.TP 7
+\fBNote:\fP
+The System Interfaces volume of IEEE\ Std\ 1003.1-2001 does not specify
+whether the effective group ID of a process is
+included in its supplementary group list.
+.sp
+.LP
+With no operands, \fInewgrp\fP shall change the effective group back
+to the groups identified in the user's user entry, and
+shall set the list of supplementary groups to that set in the user's
+group database entries.
+.LP
+If a password is required for the specified group, and the user is
+not listed as a member of that group in the group database,
+the user shall be prompted to enter the correct password for that
+group. If the user is listed as a member of that group, no
+password shall be requested. If no password is required for the specified
+group, it is implementation-defined whether users not
+listed as members of that group can change to that group. Whether
+or not a password is required, implementation-defined system
+accounting or security mechanisms may impose additional authorization
+restrictions that may cause \fInewgrp\fP to write a
+diagnostic message and suppress the changing of the group identification.
+.SH OPTIONS
+.LP
+The \fInewgrp\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following option shall be supported:
+.TP 7
+\fB-l\fP
+(The letter ell.) Change the environment to what would be expected
+if the user actually logged in again.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIgroup\fP
+A group name from the group database or a non-negative numeric group
+ID. Specifies the group ID to which the real and effective
+group IDs shall be set. If \fIgroup\fP is a non-negative numeric string
+and exists in the group database as a group name (see \fIgetgrnam\fP()),
+the numeric group ID associated with that group name shall be used
+as the
+group ID.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+The file \fB/dev/tty\fP shall be used to read a single line of text
+for password checking, when one is required.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fInewgrp\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used for diagnostic messages and a prompt
+string for a password, if one is required. Diagnostic
+messages may be written in cases where the exit status is not available.
+See the EXIT STATUS section.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+If \fInewgrp\fP succeeds in creating a new shell execution environment,
+whether or not the group identification was changed
+successfully, the exit status shall be the exit status of the shell.
+Otherwise, the following exit value shall be returned:
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+The invoking shell may terminate.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+There is no convenient way to enter a password into the group database.
+Use of group passwords is not encouraged, because by
+their very nature they encourage poor security practices. Group passwords
+may disappear in the future.
+.LP
+A common implementation of \fInewgrp\fP is that the current shell
+uses \fIexec\fP to overlay itself with \fInewgrp\fP, which
+in turn overlays itself with a new shell after changing group. On
+some implementations, however, this may not occur and
+\fInewgrp\fP may be invoked as a subprocess.
+.LP
+The \fInewgrp\fP command is intended only for use from an interactive
+terminal. It does not offer a useful interface for the
+support of applications.
+.LP
+The exit status of \fInewgrp\fP is generally inapplicable. If \fInewgrp\fP
+is used in a script, in most cases it successfully
+invokes a new shell and the rest of the original shell script is bypassed
+when the new shell exits. Used interactively,
+\fInewgrp\fP displays diagnostic messages to indicate problems. But
+usage such as:
+.sp
+.RS
+.nf
+
+\fBnewgrp foo
+echo $?
+\fP
+.fi
+.RE
+.LP
+is not useful because the new shell might not have access to any status
+\fInewgrp\fP may have generated (and most historical
+systems do not provide this status). A zero status echoed here does
+not necessarily indicate that the user has changed to the new
+group successfully. Following \fInewgrp\fP with the \fIid\fP command
+provides a portable means
+of determining whether the group change was successful or not.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+Most historical implementations use one of the \fIexec\fP functions
+to implement the behavior of \fInewgrp\fP. Errors detected
+before the \fIexec\fP leave the environment unchanged, while errors
+detected after the \fIexec\fP leave the user in a changed
+environment. While it would be useful to have \fInewgrp\fP issue a
+diagnostic message to tell the user that the environment
+changed, it would be inappropriate to require this change to some
+historical implementations.
+.LP
+The password mechanism is allowed in the group database, but how this
+would be implemented is not specified.
+.LP
+The \fInewgrp\fP utility was retained in this volume of IEEE\ Std\ 1003.1-2001,
+even given the existence of the
+multiple group permissions feature in the System Interfaces volume
+of IEEE\ Std\ 1003.1-2001, for several reasons. First,
+in some implementations, the group ownership of a newly created file
+is determined by the group of the directory in which the file
+is created, as allowed by the System Interfaces volume of IEEE\ Std\ 1003.1-2001;
+on other implementations, the group
+ownership of a newly created file is determined by the effective group
+ID. On implementations of the latter type, \fInewgrp\fP
+allows files to be created with a specific group ownership. Finally,
+many implementations use the real group ID in accounting, and
+on such systems, \fInewgrp\fP allows the accounting identity of the
+user to be changed.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIShell Command Language\fP, \fIsh\fP, the System Interfaces
+volume of IEEE\ Std\ 1003.1-2001, \fIexec\fP, \fIgetgrnam\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/nice.1p b/man-pages-posix-2003/man1p/nice.1p
new file mode 100644
index 0000000..58e8280
--- /dev/null
+++ b/man-pages-posix-2003/man1p/nice.1p
@@ -0,0 +1,258 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "NICE" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" nice
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+nice \- invoke a utility with an altered nice value
+.SH SYNOPSIS
+.LP
+\fBnice\fP \fB[\fP\fB-n\fP \fIincrement\fP\fB]\fP \fIutility\fP
+\fB[\fP\fIargument\fP\fB...\fP\fB]\fP\fB\fP
+.SH DESCRIPTION
+.LP
+The \fInice\fP utility shall invoke a utility, requesting that it
+be run with a different nice value (see the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Section 3.239, Nice Value). With
+no
+options and only if the user has appropriate privileges, the executed
+utility shall be run with a nice value that is some
+implementation-defined quantity less than or equal to the nice value
+of the current process. If the user lacks appropriate
+privileges to affect the nice value in the requested manner, the \fInice\fP
+utility shall not affect the nice value; in this case,
+a warning message may be written to standard error, but this shall
+not prevent the invocation of \fIutility\fP or affect the exit
+status.
+.SH OPTIONS
+.LP
+The \fInice\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following option is supported:
+.TP 7
+\fB-n\ \fP \fIincrement\fP
+A positive or negative decimal integer which shall have the same effect
+on the execution of the utility as if the utility had
+called the \fInice\fP() function with the numeric value of the \fIincrement\fP
+option-argument.
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIutility\fP
+The name of a utility that is to be invoked. If the \fIutility\fP
+operand names any of the special built-in utilities in \fISpecial
+Built-In Utilities\fP, the results are undefined.
+.TP 7
+\fIargument\fP
+Any string to be supplied as an argument when invoking the utility
+named by the \fIutility\fP operand.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fInice\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fIPATH\fP
+Determine the search path used to locate the utility to be invoked.
+See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 8, Environment Variables.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+If \fIutility\fP is invoked, the exit status of \fInice\fP shall be
+the exit status of \fIutility\fP; otherwise, the
+\fInice\fP utility shall exit with one of the following values:
+.TP 7
+1-125
+An error occurred in the \fInice\fP utility.
+.TP 7
+\ \ 126
+The utility specified by \fIutility\fP was found but could not be
+invoked.
+.TP 7
+\ \ 127
+The utility specified by \fIutility\fP could not be found.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The only guaranteed portable uses of this utility are:
+.TP 7
+\fInice\ utility\fP
+.sp
+Run \fIutility\fP with the default lower nice value.
+.TP 7
+\fInice\ \fP \fB-n\ \fP <\fIpositive\ integer\fP>\fI\ utility\fP
+.sp
+Run \fIutility\fP with a lower nice value.
+.sp
+.LP
+On some implementations they have no discernible effect on the invoked
+utility and on some others they are exactly
+equivalent.
+.LP
+Historical systems have frequently supported the <\fIpositive integer\fP>
+up to 20. Since there is no error penalty
+associated with guessing a number that is too high, users without
+access to the system conformance document (to see what limits are
+actually in place) could use the historical 1 to 20 range or attempt
+to use very large numbers if the job should be truly low
+priority.
+.LP
+The nice value of a process can be displayed using the command:
+.sp
+.RS
+.nf
+
+\fBps -o nice
+\fP
+.fi
+.RE
+.LP
+The \fIcommand\fP, \fIenv\fP, \fInice\fP, \fInohup\fP, \fItime\fP,
+and \fIxargs\fP utilities have been specified to use exit code 127
+if an error occurs so that
+applications can distinguish "failure to find a utility" from "invoked
+utility exited with an error indication". The value 127
+was chosen because it is not commonly used for other meanings; most
+utilities use small values for "normal error conditions" and
+the values above 128 can be confused with termination due to receipt
+of a signal. The value 126 was chosen in a similar manner to
+indicate that the utility could be found, but not invoked. Some scripts
+produce meaningful error messages differentiating the 126
+and 127 cases. The distinction between exit codes 126 and 127 is based
+on KornShell practice that uses 127 when all attempts to
+\fIexec\fP the utility fail with [ENOENT], and uses 126 when any attempt
+to \fIexec\fP the utility fails for any other
+reason.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+Due to the text about the limits of the nice value being implementation-defined,
+\fInice\fP is not actually required to change
+the nice value of the executed command; the limits could be zero differences
+from the system default, although the implementor is
+required to document this fact in the conformance document.
+.LP
+The 4.3 BSD version of \fInice\fP does not check whether \fIincrement\fP
+is a valid decimal integer. The command \fInice\fP
+\fB-x\fP \fIutility\fP, for example, would be treated the same as
+the command \fInice\fP \fB--1\fP \fIutility\fP. If the user
+does not have appropriate privileges, this results in a "permission
+denied" error. This is considered a bug.
+.LP
+When a user without appropriate privileges gives a negative \fIincrement\fP,
+System V treats it like the command \fInice\fP
+\fB-0\fP \fIutility\fP, while 4.3 BSD writes a "permission denied"
+message and does not run the utility. Neither was considered
+clearly superior, so the behavior was left unspecified.
+.LP
+The C shell has a built-in version of \fInice\fP that has a different
+interface from the one described in this volume of
+IEEE\ Std\ 1003.1-2001.
+.LP
+The term "utility" is used, rather than "command", to highlight the
+fact that shell compound commands, pipelines, and so on,
+cannot be used. Special built-ins also cannot be used. However, "utility"
+includes user application programs and shell scripts,
+not just utilities defined in this volume of IEEE\ Std\ 1003.1-2001.
+.LP
+Historical implementations of \fInice\fP provide a nice value range
+of 40 or 41 discrete steps, with the default nice value
+being the midpoint of that range. By default, they lower the nice
+value of the executed utility by 10.
+.LP
+Some historical documentation states that the \fIincrement\fP value
+must be within a fixed range. This is misleading; the valid
+\fIincrement\fP values on any invocation are determined by the current
+process nice value, which is not always the default.
+.LP
+The definition of nice value is not intended to suggest that all processes
+in a system have priorities that are comparable.
+Scheduling policy extensions such as the realtime priorities in the
+System Interfaces volume of IEEE\ Std\ 1003.1-2001 make
+the notion of a single underlying priority for all scheduling policies
+problematic. Some implementations may implement the
+\fInice\fP-related features to affect all processes on the system,
+others to affect just the general time-sharing activities
+implied by this volume of IEEE\ Std\ 1003.1-2001, and others may have
+no effect at all. Because of the use of
+"implementation-defined" in \fInice\fP and \fIrenice\fP, a wide range
+of implementation
+strategies are possible.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIShell Command Language\fP, \fIrenice\fP, the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001, \fInice\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/nl.1p b/man-pages-posix-2003/man1p/nl.1p
new file mode 100644
index 0000000..682b259
--- /dev/null
+++ b/man-pages-posix-2003/man1p/nl.1p
@@ -0,0 +1,290 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "NL" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" nl
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+nl \- line numbering filter
+.SH SYNOPSIS
+.LP
+\fBnl\fP \fB[\fP\fB-p\fP\fB][\fP\fB-b\fP \fItype\fP\fB][\fP\fB-d\fP
+\fIdelim\fP\fB][\fP\fB-f\fP \fItype\fP\fB][\fP\fB-h\fP \fItype\fP\fB][\fP\fB-i\fP
+\fIincr\fP\fB][\fP\fB-l\fP
+\fInum\fP\fB][\fP\fB-n\fP \fIformat\fP\fB]
+.br
+\fP \fB\ \ \ \ \ \ \fP \fB[\fP\fB-s\fP \fIsep\fP\fB][\fP\fB-v\fP
+\fIstartnum\fP\fB][\fP\fB-w\fP \fIwidth\fP\fB][\fP\fIfile\fP\fB]\fP\fB\fP
+.SH DESCRIPTION
+.LP
+The \fInl\fP utility shall read lines from the named \fIfile\fP or
+the standard input if no \fIfile\fP is named and shall
+reproduce the lines to standard output. Lines shall be numbered on
+the left. Additional functionality may be provided in accordance
+with the command options in effect.
+.LP
+The \fInl\fP utility views the text it reads in terms of logical pages.
+Line numbering shall be reset at the start of each
+logical page. A logical page consists of a header, a body, and a footer
+section. Empty sections are valid. Different line numbering
+options are independently available for header, body, and footer (for
+example, no numbering of header and footer lines while
+numbering blank lines only in the body).
+.LP
+The starts of logical page sections shall be signaled by input lines
+containing nothing but the following delimiter
+characters:
+.TS C
+center; l l.
+\fBLine\fP \fBStart of\fP
+\\:\\:\\: Header
+\\:\\: Body
+\\: Footer
+.TE
+.LP
+Unless otherwise specified, \fInl\fP shall assume the text being read
+is in a single logical page body.
+.SH OPTIONS
+.LP
+The \fInl\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+Only one file can be named.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-b\ \fP \fItype\fP
+Specify which logical page body lines shall be numbered. Recognized
+\fItypes\fP and their meaning are:
+.TP 7
+\fBa\fP
+.RS
+Number all lines.
+.RE
+.TP 7
+\fBt\fP
+.RS
+Number only non-empty lines.
+.RE
+.TP 7
+\fBn\fP
+.RS
+No line numbering.
+.RE
+.TP 7
+\fBp\fP\fIstring\fP
+.RS
+Number only lines that contain the basic regular expression specified
+in \fIstring\fP.
+.RE
+.sp
+.LP
+The default \fItype\fP for logical page body shall be \fBt\fP (text
+lines numbered).
+.TP 7
+\fB-d\ \fP \fIdelim\fP
+Specify the delimiter characters that indicate the start of a logical
+page section. These can be changed from the default
+characters \fB"\\:"\fP to two user-specified characters. If only one
+character is entered, the second character shall remain the
+default character \fB':'\fP .
+.TP 7
+\fB-f\ \fP \fItype\fP
+Specify the same as \fBb\fP \fItype\fP except for footer. The default
+for logical page footer shall be \fBn\fP (no lines
+numbered).
+.TP 7
+\fB-h\ \fP \fItype\fP
+Specify the same as \fBb\fP \fItype\fP except for header. The default
+\fItype\fP for logical page header shall be \fBn\fP
+(no lines numbered).
+.TP 7
+\fB-i\ \fP \fIincr\fP
+Specify the increment value used to number logical page lines. The
+default shall be 1.
+.TP 7
+\fB-l\ \fP \fInum\fP
+Specify the number of blank lines to be considered as one. For example,
+\fB-l\ 2\fP results in only the second adjacent
+blank line being numbered (if the appropriate \fB-h\ a\fP, \fB-b\ a\fP,
+or \fB-f\ a\fP option is set). The default
+shall be 1.
+.TP 7
+\fB-n\ \fP \fIformat\fP
+Specify the line numbering format. Recognized values are: \fBln\fP,
+left justified, leading zeros suppressed; \fBrn\fP, right
+justified, leading zeros suppressed; \fBrz\fP, right justified, leading
+zeros kept. The default \fIformat\fP shall be \fBrn\fP
+(right justified).
+.TP 7
+\fB-p\fP
+Specify that numbering should not be restarted at logical page delimiters.
+.TP 7
+\fB-s\ \fP \fIsep\fP
+Specify the characters used in separating the line number and the
+corresponding text line. The default \fIsep\fP shall be a
+<tab>.
+.TP 7
+\fB-v\ \fP \fIstartnum\fP
+Specify the initial value used to number logical page lines. The default
+shall be 1.
+.TP 7
+\fB-w\ \fP \fIwidth\fP
+Specify the number of characters to be used for the line number. The
+default \fIwidth\fP shall be 6.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of a text file to be line-numbered.
+.sp
+.SH STDIN
+.LP
+The standard input is a text file that is used if no \fIfile\fP operand
+is given.
+.SH INPUT FILES
+.LP
+The input file named by the \fIfile\fP operand is a text file.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fInl\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_COLLATE\fP
+.sp
+Determine the locale for the behavior of ranges, equivalence classes,
+and multi-character collating elements within regular
+expressions.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files), the
+behavior of character classes within regular expressions, and
+for deciding which characters are in character class \fBgraph\fP (for
+the \fB-b\ t\fP, \fB-f\ t\fP, and \fB-h\ t\fP
+options).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The standard output shall be a text file in the following format:
+.sp
+.RS
+.nf
+
+\fB"%s%s%s", <\fP\fIline number\fP\fB>, <\fP\fIseparator\fP\fB>, <\fP\fIinput line\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where <\fIline\ number\fP> is one of the following numeric formats:
+.TP 7
+\fB%6d\fP
+When the \fBrn\fP format is used (the default; see \fB-n\fP).
+.TP 7
+\fB%06d\fP
+When the \fBrz\fP format is used.
+.TP 7
+\fB%-6d\fP
+When the \fBln\fP format is used.
+.TP 7
+<empty>
+When line numbers are suppressed for a portion of the page; the <\fIseparator\fP>
+is also suppressed.
+.sp
+.LP
+In the preceding list, the number 6 is the default width; the \fB-w\fP
+option can change this value.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+In using the \fB-d\fP \fIdelim\fP option, care should be taken to
+escape characters that have special meaning to the command
+interpreter.
+.SH EXAMPLES
+.LP
+The command:
+.sp
+.RS
+.nf
+
+\fBnl -v 10 -i 10 -d \\!+ file1
+\fP
+.fi
+.RE
+.LP
+numbers \fIfile1\fP starting at line number 10 with an increment of
+10. The logical page delimiter is \fB"!+"\fP . Note that
+the \fB'!'\fP has to be escaped when using \fIcsh\fP as a command
+interpreter because of its history substitution syntax. For
+\fIksh\fP and \fIsh\fP the escape is not necessary, but does not do
+any harm.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpr\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/nm.1p b/man-pages-posix-2003/man1p/nm.1p
new file mode 100644
index 0000000..12be33b
--- /dev/null
+++ b/man-pages-posix-2003/man1p/nm.1p
@@ -0,0 +1,397 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "NM" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" nm
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+nm \- write the name list of an object file (\fBDEVELOPMENT\fP)
+.SH SYNOPSIS
+.LP
+\fBnm\fP \fB[\fP\fB-APv\fP\fB][\fP\fB-efox\fP\fB][\fP \fB-g| -u\fP\fB][\fP\fB-t\fP
+\fIformat\fP\fB]\fP \fIfile\fP\fB... \fP
+.SH DESCRIPTION
+.LP
+This utility shall be provided on systems that support both the User
+Portability Utilities option and the Software Development
+Utilities option. On other systems it is optional. Certain options
+are only available on XSI-conformant systems.
+.LP
+The \fInm\fP utility shall display symbolic information appearing
+in the object file, executable file, or object-file library
+named by \fIfile\fP. If no symbolic information is available for a
+valid input file, the \fInm\fP utility shall report that fact,
+but not consider it an error condition.
+.LP
+The default base used when numeric values are written is unspecified.
+\ On XSI-conformant systems, it shall be decimal.
+.SH OPTIONS
+.LP
+The \fInm\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-A\fP
+Write the full pathname or library name of an object on each line.
+.TP 7
+\fB-e\fP
+Write only external (global) and static symbol information.
+.TP 7
+\fB-f\fP
+Produce full output. Write redundant symbols ( \fB.text\fP, \fB.data\fP,
+and \fB.bss\fP), normally suppressed.
+.TP 7
+\fB-g\fP
+Write only external (global) symbol information.
+.TP 7
+\fB-o\fP
+Write numeric values in octal (equivalent to \fB-t\ o\fP).
+.TP 7
+\fB-P\fP
+Write information in a portable output format, as specified in the
+STDOUT section.
+.TP 7
+\fB-t\ \fP \fIformat\fP
+Write each numeric value in the specified format. The format shall
+be dependent on the single character used as the
+\fIformat\fP option-argument:
+.TP 7
+\fBd\fP
+.RS
+The offset is written in decimal (default).
+.RE
+.TP 7
+\fBo\fP
+.RS
+The offset is written in octal.
+.RE
+.TP 7
+\fBx\fP
+.RS
+The offset is written in hexadecimal.
+.RE
+.sp
+.TP 7
+\fB-u\fP
+Write only undefined symbols.
+.TP 7
+\fB-v\fP
+Sort output by value instead of alphabetically.
+.TP 7
+\fB-x\fP
+Write numeric values in hexadecimal (equivalent to \fB-t\ x\fP).
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of an object file, executable file, or object-file library.
+.sp
+.SH STDIN
+.LP
+See the INPUT FILES section.
+.SH INPUT FILES
+.LP
+The input file shall be an object file, an object-file library whose
+format is the same as those produced by the \fIar\fP utility for link
+editing, or an executable file. The \fInm\fP utility may accept additional
+implementation-defined object library formats for the input file.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fInm\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_COLLATE\fP
+.sp
+Determine the locale for character collation information for the symbol-name
+and symbol-value collation sequences.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+If symbolic information is present in the input files, then for each
+file or for each member of an archive, the \fInm\fP
+utility shall write the following information to standard output.
+By default, the format is unspecified, but the output shall be
+sorted alphabetically by symbol name:
+.IP " *" 3
+Library or object name, if \fB-A\fP is specified
+.LP
+.IP " *" 3
+Symbol name
+.LP
+.IP " *" 3
+Symbol type, which shall either be one of the following single characters
+or an implementation-defined type represented by a
+single character:
+.TP 7
+\fBA\fP
+.RS
+Global absolute symbol.
+.RE
+.TP 7
+\fBa\fP
+.RS
+Local absolute symbol.
+.RE
+.TP 7
+\fBB\fP
+.RS
+Global "bss" (that is, uninitialized data space) symbol.
+.RE
+.TP 7
+\fBb\fP
+.RS
+Local bss symbol.
+.RE
+.TP 7
+\fBD\fP
+.RS
+Global data symbol.
+.RE
+.TP 7
+\fBd\fP
+.RS
+Local data symbol.
+.RE
+.TP 7
+\fBT\fP
+.RS
+Global text symbol.
+.RE
+.TP 7
+\fBt\fP
+.RS
+Local text symbol.
+.RE
+.TP 7
+\fBU\fP
+.RS
+Undefined symbol.
+.RE
+.sp
+.LP
+.IP " *" 3
+Value of the symbol
+.LP
+.IP " *" 3
+The size associated with the symbol, if applicable
+.LP
+.LP
+This information may be supplemented by additional information specific
+to the implementation.
+.LP
+If the \fB-P\fP option is specified, the previous information shall
+be displayed using the following portable format. The three
+versions differ depending on whether \fB-t\ d\fP, \fB-t\ o\fP, or
+\fB-t\ x\fP was specified, respectively:
+.sp
+.RS
+.nf
+
+\fB"%s%s %s %d %d\\n", <\fP\fIlibrary/object name\fP\fB>, <\fP\fIname\fP\fB>, <\fP\fItype\fP\fB>,
+ <\fP\fIvalue\fP\fB>, <\fP\fIsize\fP\fB>
+.sp
+
+"%s%s %s %o %o\\n", <\fP\fIlibrary/object name\fP\fB>, <\fP\fIname\fP\fB>, <\fP\fItype\fP\fB>,
+ <\fP\fIvalue\fP\fB>, <\fP\fIsize\fP\fB>
+.sp
+
+"%s%s %s %x %x\\n", <\fP\fIlibrary/object name\fP\fB>, <\fP\fIname\fP\fB>, <\fP\fItype\fP\fB>,
+ <\fP\fIvalue\fP\fB>, <\fP\fIsize\fP\fB>
+\fP
+.fi
+.RE
+where <\fIlibrary/object\ name\fP> shall be formatted as follows:
+.IP " *" 3
+If \fB-A\fP is not specified, <\fIlibrary/object\ name\fP> shall be
+an empty string.
+.LP
+.IP " *" 3
+If \fB-A\fP is specified and the corresponding \fIfile\fP operand
+does not name a library:
+.sp
+.RS
+.nf
+
+\fB"%s: ", <\fP\fIfile\fP\fB>
+\fP
+.fi
+.RE
+.LP
+.IP " *" 3
+If \fB-A\fP is specified and the corresponding \fIfile\fP operand
+names a library. In this case,
+<\fIobject\ file\fP> shall name the object file in the library containing
+the symbol being described:
+.sp
+.RS
+.nf
+
+\fB"%s[%s]: ", <\fP\fIfile\fP\fB>, <\fP\fIobject file\fP\fB>
+\fP
+.fi
+.RE
+.LP
+.LP
+If \fB-A\fP is not specified, then if more than one \fIfile\fP operand
+is specified or if only one \fIfile\fP operand is
+specified and it names a library, \fInm\fP shall write a line identifying
+the object containing the following symbols before the
+lines containing those symbols, in the form:
+.IP " *" 3
+If the corresponding \fIfile\fP operand does not name a library:
+.sp
+.RS
+.nf
+
+\fB"%s:\\n", <\fP\fIfile\fP\fB>
+\fP
+.fi
+.RE
+.LP
+.IP " *" 3
+If the corresponding \fIfile\fP operand names a library; in this case,
+<\fIobject\ file\fP> shall be the name of the
+file in the library containing the following symbols:
+.sp
+.RS
+.nf
+
+\fB"%s[%s]:\\n", <\fP\fIfile\fP\fB>, <\fP\fIobject file\fP\fB>
+\fP
+.fi
+.RE
+.LP
+.LP
+If \fB-P\fP is specified, but \fB-t\fP is not, the format shall be
+as if \fB-t\ x\fP had been specified.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Mechanisms for dynamic linking make this utility less meaningful when
+applied to an executable file because a dynamically linked
+executable may omit numerous library routines that would be found
+in a statically linked executable.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+Historical implementations of \fInm\fP have used different bases for
+numeric output and supplied different default types of
+symbols that were reported. The \fB-t\fP \fIformat\fP option, similar
+to that used in \fIod\fP and \fIstrings\fP, can be used to specify
+the numeric
+base; \fB-g\fP and \fB-u\fP can be used to restrict the amount of
+output or the types of symbols included in the output.
+.LP
+The compromise of using \fB-t\fP \fIformat\fP \fIversus\fP using \fB-d\fP,
+\fB-o\fP, and other similar options was
+necessary because of differences in the meaning of \fB-o\fP between
+implementations. The \fB-o\fP option from BSD has been
+provided here as \fB-A\fP to avoid confusion with the \fB-o\fP from
+System V (which has been provided here as \fB-t\fP and as
+\fB-o\fP on XSI-conformant systems).
+.LP
+The option list was significantly reduced from that provided by historical
+implementations.
+.LP
+The \fInm\fP description is a subset of both the System V and BSD
+\fInm\fP utilities with no specified default output.
+.LP
+It was recognized that mechanisms for dynamic linking make this utility
+less meaningful when applied to an executable file
+(because a dynamically linked executable file may omit numerous library
+routines that would be found in a statically linked
+executable file), but the value of \fInm\fP during software development
+was judged to outweigh other limitations.
+.LP
+The default output format of \fInm\fP is not specified because of
+differences in historical implementations. The \fB-P\fP
+option was added to allow some type of portable output format. After
+a comparison of the different formats used in SunOS, BSD,
+SVR3, and SVR4, it was decided to create one that did not match the
+current format of any of these four systems. The format devised
+is easy to parse by humans, easy to parse in shell scripts, and does
+not need to vary depending on locale (because no English
+descriptions are included). All of the systems currently have the
+information available to use this format.
+.LP
+The format given in \fInm\fP STDOUT uses spaces between the fields,
+which may be any number of <blank>s required to align
+the columns. The single-character types were selected to match historical
+practice, and the requirement that implementation
+additions also be single characters made parsing the information easier
+for shell scripts.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIar\fP, \fIc99\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/nohup.1p b/man-pages-posix-2003/man1p/nohup.1p
new file mode 100644
index 0000000..16d4362
--- /dev/null
+++ b/man-pages-posix-2003/man1p/nohup.1p
@@ -0,0 +1,220 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "NOHUP" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" nohup
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+nohup \- invoke a utility immune to hangups
+.SH SYNOPSIS
+.LP
+\fBnohup\fP \fIutility\fP \fB[\fP\fIargument\fP\fB...\fP\fB]\fP
+.SH DESCRIPTION
+.LP
+The \fInohup\fP utility shall invoke the utility named by the \fIutility\fP
+operand with arguments supplied as the
+\fIargument\fP operands. At the time the named \fIutility\fP is invoked,
+the SIGHUP signal shall be set to be ignored.
+.LP
+If the standard output is a terminal, all output written by the named
+\fIutility\fP to its standard output shall be appended to
+the end of the file \fBnohup.out\fP in the current directory. If \fBnohup.out\fP
+cannot be created or opened for appending, the
+output shall be appended to the end of the file \fBnohup.out\fP in
+the directory specified by the \fIHOME\fP environment
+variable. If neither file can be created or opened for appending,
+\fIutility\fP shall not be invoked. If a file is created, the
+file's permission bits shall be set to S_IRUSR | S_IWUSR.
+.LP
+If the standard error is a terminal, all output written by the named
+\fIutility\fP to its standard error shall be redirected to
+the same file descriptor as the standard output.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIutility\fP
+The name of a utility that is to be invoked. If the \fIutility\fP
+operand names any of the special built-in utilities in \fISpecial
+Built-In Utilities\fP, the results are undefined.
+.TP 7
+\fIargument\fP
+Any string to be supplied as an argument when invoking the utility
+named by the \fIutility\fP operand.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fInohup\fP:
+.TP 7
+\fIHOME\fP
+Determine the pathname of the user's home directory: if the output
+file \fBnohup.out\fP cannot be created in the current
+directory, the \fInohup\fP utility shall use the directory named by
+\fIHOME\fP to create the file.
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fIPATH\fP
+Determine the search path that is used to locate the utility to be
+invoked. See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 8, Environment Variables.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+The \fInohup\fP utility shall take the standard action for all signals
+except that SIGHUP shall be ignored.
+.SH STDOUT
+.LP
+If the standard output is not a terminal, the standard output of \fInohup\fP
+shall be the standard output generated by the
+execution of the \fIutility\fP specified by the operands. Otherwise,
+nothing shall be written to the standard output.
+.SH STDERR
+.LP
+If the standard output is a terminal, a message shall be written to
+the standard error, indicating the name of the file to which
+the output is being appended. The name of the file shall be either
+\fBnohup.out\fP or \fB$HOME/nohup.out\fP.
+.SH OUTPUT FILES
+.LP
+If the standard output is a terminal, all output written by the named
+\fIutility\fP to the standard output and standard error
+is appended to the file \fBnohup.out\fP, which is created if it does
+not already exist.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+126
+The utility specified by \fIutility\fP was found but could not be
+invoked.
+.TP 7
+127
+An error occurred in the \fInohup\fP utility or the utility specified
+by \fIutility\fP could not be found.
+.sp
+.LP
+Otherwise, the exit status of \fInohup\fP shall be that of the utility
+specified by the \fIutility\fP operand.
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The \fIcommand\fP, \fIenv\fP, \fInice\fP, \fInohup\fP, \fItime\fP,
+and \fIxargs\fP utilities have been specified to use exit code 127
+if an error occurs so that
+applications can distinguish "failure to find a utility" from "invoked
+utility exited with an error indication". The value 127
+was chosen because it is not commonly used for other meanings; most
+utilities use small values for "normal error conditions" and
+the values above 128 can be confused with termination due to receipt
+of a signal. The value 126 was chosen in a similar manner to
+indicate that the utility could be found, but not invoked. Some scripts
+produce meaningful error messages differentiating the 126
+and 127 cases. The distinction between exit codes 126 and 127 is based
+on KornShell practice that uses 127 when all attempts to
+\fIexec\fP the utility fail with [ENOENT], and uses 126 when any attempt
+to \fIexec\fP the utility fails for any other
+reason.
+.SH EXAMPLES
+.LP
+It is frequently desirable to apply \fInohup\fP to pipelines or lists
+of commands. This can be done by placing pipelines and
+command lists in a single file; this file can then be invoked as a
+utility, and the \fInohup\fP applies to everything in the
+file.
+.LP
+Alternatively, the following command can be used to apply \fInohup\fP
+to a complex command:
+.sp
+.RS
+.nf
+
+\fBnohup sh -c '\fP\fIcomplex-command-line\fP\fB'
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+The 4.3 BSD version ignores SIGTERM and SIGHUP, and if \fB./nohup.out\fP
+cannot be used, it fails instead of trying to use
+\fB$HOME/nohup.out\fP.
+.LP
+The \fIcsh\fP utility has a built-in version of \fInohup\fP that acts
+differently from the \fInohup\fP defined in this volume
+of IEEE\ Std\ 1003.1-2001.
+.LP
+The term \fIutility\fP is used, rather than \fIcommand\fP, to highlight
+the fact that shell compound commands, pipelines,
+special built-ins, and so on, cannot be used directly. However, \fIutility\fP
+includes user application programs and shell
+scripts, not just the standard utilities.
+.LP
+Historical versions of the \fInohup\fP utility use default file creation
+semantics. Some more recent versions use the
+permissions specified here as an added security precaution.
+.LP
+Some historical implementations ignore SIGQUIT in addition to SIGHUP;
+others ignore SIGTERM. An early proposal allowed, but did
+not require, SIGQUIT to be ignored. Several reviewers objected that
+\fInohup\fP should only modify the handling of SIGHUP as
+required by this volume of IEEE\ Std\ 1003.1-2001.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIShell Command Language\fP, \fIsh\fP, the System Interfaces
+volume of IEEE\ Std\ 1003.1-2001, \fIsignal\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/od.1p b/man-pages-posix-2003/man1p/od.1p
new file mode 100644
index 0000000..f4042c5
--- /dev/null
+++ b/man-pages-posix-2003/man1p/od.1p
@@ -0,0 +1,647 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "OD" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" od
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+od \- dump files in various formats
+.SH SYNOPSIS
+.LP
+\fBod\fP \fB[\fP\fB-v\fP\fB][\fP\fB-A\fP \fIaddress_base\fP\fB][\fP\fB-j\fP
+\fIskip\fP\fB][\fP\fB-N\fP
+\fIcount\fP\fB][\fP\fB-t\fP \fItype_string\fP\fB]\fP\fB...
+.br
+\ \ \ \ \ \ \fP \fB[\fP\fIfile\fP\fB...\fP\fB]\fP\fB
+.br
+.sp
+\fP
+.LP
+\fBod\fP \fB[\fP\fB-bcdosx\fP\fB][\fP\fIfile\fP\fB]
+[[\fP\fB+\fP\fB]\fP\fIoffset\fP\fB[\fP\fB.\fP\fB][\fP\fBb\fP\fB]]\fP\fB\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIod\fP utility shall write the contents of its input files to
+standard output in a user-specified format.
+.SH OPTIONS
+.LP
+The \fIod\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines,
+except that the order of presentation of the
+\fB-t\fP options and the \fB-bcdosx\fP options
+is significant.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-A\ \fP \fIaddress_base\fP
+.sp
+Specify the input offset base. See the EXTENDED DESCRIPTION section.
+The application shall ensure that the \fIaddress_base\fP
+option-argument is a character. The characters \fB'd'\fP, \fB'o'\fP,
+and \fB'x'\fP specify that the offset base shall be
+written in decimal, octal, or hexadecimal, respectively. The character
+\fB'n'\fP specifies that the offset shall not be
+written.
+.TP 7
+\fB-b\fP
+Interpret bytes in octal. This shall be equivalent to \fB-t\ o1\fP.
+.TP 7
+\fB-c\fP
+Interpret bytes as characters specified by the current setting of
+the \fILC_CTYPE\fP category. Certain non-graphic characters
+appear as C escapes: \fB"NUL=\\0"\fP, \fB"BS=\\b"\fP, \fB"FF=\\f"\fP,
+\fB"NL=\\n"\fP, \fB"CR=\\r"\fP,
+\fB"HT=\\t"\fP ; others appear as 3-digit octal numbers.
+.TP 7
+\fB-d\fP
+Interpret \fIword\fPs (two-byte units) in unsigned decimal. This shall
+be equivalent to \fB-t\ u2\fP.
+.TP 7
+\fB-j\ \fP \fIskip\fP
+Jump over \fIskip\fP bytes from the beginning of the input. The \fIod\fP
+utility shall read or seek past the first
+\fIskip\fP bytes in the concatenated input files. If the combined
+input is not at least \fIskip\fP bytes long, the \fIod\fP
+utility shall write a diagnostic message to standard error and exit
+with a non-zero exit status.
+.LP
+By default, the \fIskip\fP option-argument shall be interpreted as
+a decimal number. With a leading 0x or 0X, the offset shall
+be interpreted as a hexadecimal number; otherwise, with a leading
+\fB'0'\fP, the offset shall be interpreted as an octal
+number. Appending the character \fB'b'\fP, \fB'k'\fP, or \fB'm'\fP
+to offset shall cause it to be interpreted as a
+multiple of 512, 1024, or 1048576 bytes, respectively. If the \fIskip\fP
+number is hexadecimal, any appended \fB'b'\fP shall be
+considered to be the final hexadecimal digit.
+.TP 7
+\fB-N\ \fP \fIcount\fP
+Format no more than \fIcount\fP bytes of input. By default, \fIcount\fP
+shall be interpreted as a decimal number. With a
+leading 0x or 0X, \fIcount\fP shall be interpreted as a hexadecimal
+number; otherwise, with a leading \fB'0'\fP, it shall be
+interpreted as an octal number. If \fIcount\fP bytes of input (after
+successfully skipping, if \fB-j\fP \fIskip\fP is specified)
+are not available, it shall not be considered an error; the \fIod\fP
+utility shall format the input that is available.
+.TP 7
+\fB-o\fP
+Interpret \fIword\fPs (two-byte units) in octal. This shall be equivalent
+to \fB-t\ o2\fP.
+.TP 7
+\fB-s\fP
+Interpret \fIword\fPs (two-byte units) in signed decimal. This shall
+be equivalent to \fB-t\ d2\fP.
+.TP 7
+\fB-t\ \fP \fItype_string\fP
+.sp
+Specify one or more output types. See the EXTENDED DESCRIPTION section.
+The application shall ensure that the \fItype_string\fP
+option-argument is a string specifying the types to be used when writing
+the input data. The string shall consist of the type
+specification characters \fBa\fP, \fBc\fP, \fBd\fP, \fBf\fP, \fBo\fP,
+\fBu\fP, and \fBx\fP, specifying
+named character, character, signed decimal, floating point, octal,
+unsigned decimal, and hexadecimal, respectively. The type
+specification characters \fBd\fP, \fBf\fP, \fBo\fP, \fBu\fP, and
+\fBx\fP can be followed by an optional unsigned
+decimal integer that specifies the number of bytes to be transformed
+by each instance of the output type. The type specification
+character \fBf\fP can be followed by an optional \fBF\fP, \fBD\fP,
+or \fBL\fP indicating that the conversion should
+be applied to an item of type \fBfloat\fP, \fBdouble\fP, or \fBlong
+double\fP, respectively. The type specification characters
+\fBd\fP, \fBo\fP, \fBu\fP, and \fBx\fP can be followed by an optional
+\fBC\fP, \fBS\fP, \fBI\fP, or
+\fBL\fP indicating that the conversion should be applied to an item
+of type \fBchar\fP, \fBshort\fP, \fBint\fP, or
+\fBlong\fP, respectively. Multiple types can be concatenated within
+the same \fItype_string\fP and multiple \fB-t\fP options can
+be specified. Output lines shall be written for each type specified
+in the order in which the type specification characters are
+specified.
+.TP 7
+\fB-v\fP
+Write all input data. Without the \fB-v\fP option, any number of groups
+of output lines, which would be identical to the
+immediately preceding group of output lines (except for the byte offsets),
+shall be replaced with a line containing only an
+asterisk ( \fB'*'\fP ).
+.TP 7
+\fB-x\fP
+Interpret \fIword\fPs (two-byte units) in hexadecimal. This shall
+be equivalent to \fB-t\ x2\fP.
+.sp
+.LP
+Multiple types can be specified by using multiple \fB-bcdostx\fP options.
+Output lines are written for each type specified in the
+order in which the types are specified.
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of a file to be read. If no \fIfile\fP operands are specified,
+the standard input shall be used.
+.LP
+If there are no more than two operands, none of the \fB-A\fP, \fB-j\fP,
+\fB-N\fP, or \fB-t\fP options is specified, and
+either of the following is true: the first character of the last operand
+is a plus sign ( \fB'+'\fP ), or there are two operands
+and the first character of the last operand is numeric; the last
+operand shall be interpreted as an offset operand on
+XSI-conformant systems. Under these conditions, the results are
+unspecified on systems that are not XSI-conformant systems.
+.TP 7
+\fB[+]\fP\fIoffset\fP\fB[.][b]\fP
+The \fIoffset\fP operand specifies the offset in the file where dumping
+is to commence. This operand is normally interpreted as
+octal bytes. If \fB'.'\fP is appended, the offset shall be interpreted
+in decimal. If \fB'b'\fP is appended, the offset shall
+be interpreted in units of 512 bytes.
+.sp
+.SH STDIN
+.LP
+The standard input shall be used only if no \fIfile\fP operands are
+specified. See the INPUT FILES section.
+.SH INPUT FILES
+.LP
+The input files can be any file type.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIod\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fILC_NUMERIC\fP
+.sp
+Determine the locale for selecting the radix character used when writing
+floating-point formatted output.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+See the EXTENDED DESCRIPTION section.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+The \fIod\fP utility shall copy sequentially each input file to standard
+output, transforming the input data according to the
+output types specified by the \fB-t\fP option or the \fB-bcdosx\fP
+options. If no output type is specified, the default output shall
+be as if \fB-t\ oS\fP had been
+specified.
+.LP
+The number of bytes transformed by the output type specifier \fBc\fP
+may be variable depending on the \fILC_CTYPE\fP
+category.
+.LP
+The default number of bytes transformed by output type specifiers
+\fBd\fP, \fBf\fP, \fBo\fP, \fBu\fP, and
+\fBx\fP corresponds to the various C-language types as follows. If
+the \fIc99\fP compiler
+is present on the system, these specifiers shall correspond to the
+sizes used by default in that compiler. Otherwise, these sizes
+may vary among systems that conform to IEEE\ Std\ 1003.1-2001.
+.IP " *" 3
+For the type specifier characters \fBd\fP, \fBo\fP, \fBu\fP, and
+\fBx\fP, the default number of bytes shall
+correspond to the size of the underlying implementation's basic integer
+type. For these specifier characters, the implementation
+shall support values of the optional number of bytes to be converted
+corresponding to the number of bytes in the C-language types
+\fBchar\fP, \fBshort\fP, \fBint\fP, and \fBlong\fP. These numbers
+can also be specified by an application as the characters
+\fB'C'\fP, \fB'S'\fP, \fB'I'\fP, and \fB'L'\fP, respectively.
+The implementation shall also support the values 1,
+2, 4, and 8, even if it provides no C-Language types of those sizes.
+The implementation shall support the decimal value
+corresponding to the C-language type \fBlong long\fP. The byte order
+used when interpreting numeric values is
+implementation-defined, but shall correspond to the order in which
+a constant of the corresponding type is stored in memory on the
+system.
+.LP
+.IP " *" 3
+For the type specifier character \fBf\fP, the default number of bytes
+shall correspond to the number of bytes in the
+underlying implementation's basic double precision floating-point
+data type. The implementation shall support values of the
+optional number of bytes to be converted corresponding to the number
+of bytes in the C-language types \fBfloat,\fP \fBdouble\fP,
+and \fBlong double\fP. These numbers can also be specified by an application
+as the characters \fB'F'\fP, \fB'D'\fP, and
+\fB'L'\fP, respectively.
+.LP
+.LP
+The type specifier character \fBa\fP specifies that bytes shall be
+interpreted as named characters from the International
+Reference Version (IRV) of the ISO/IEC\ 646:1991 standard. Only the
+least significant seven bits of each byte shall be used for
+this type specification. Bytes with the values listed in the following
+table shall be written using the corresponding names for
+those characters.
+.br
+.sp
+.ce 1
+\fBTable: Named Characters in \fIod\fP\fP
+.TS C
+center; l2 l2 l2 l2 l2 l2 l2 l.
+\fBValue\fP \fBName\fP \fBValue\fP \fBName\fP \fBValue\fP \fBName\fP \fBValue\fP \fBName\fP
+\\000 \fBnul\fP \\001 \fBsoh\fP \\002 \fBstx\fP \\003 \fBetx\fP
+\\004 \fBeot\fP \\005 \fBenq\fP \\006 \fBack\fP \\007 \fBbel\fP
+\\010 \fBbs\fP \\011 \fBht\fP \\012 \fBlf or nl\fP \\013 \fBvt\fP
+\\014 \fBff\fP \\015 \fBcr\fP \\016 \fBso\fP \\017 \fBsi\fP
+\\020 \fBdle\fP \\021 \fBdc1\fP \\022 \fBdc2\fP \\023 \fBdc3\fP
+\\024 \fBdc4\fP \\025 \fBnak\fP \\026 \fBsyn\fP \\027 \fBetb\fP
+\\030 \fBcan\fP \\031 \fBem\fP \\032 \fBsub\fP \\033 \fBesc\fP
+\\034 \fBfs\fP \\035 \fBgs\fP \\036 \fBrs\fP \\037 \fBus\fP
+\\040 \fBsp\fP \\177 \fBdel\fP \ \fB\ \fP \ \fB\ \fP
+.TE
+.TP 7
+\fBNote:\fP
+The \fB"\\012"\fP value may be written either as \fBlf\fP or \fBnl\fP.
+.sp
+.LP
+The type specifier character \fBc\fP specifies that bytes shall be
+interpreted as characters specified by the current setting
+of the \fILC_CTYPE\fP locale category. Characters listed in the table
+in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 5, File Format Notation ( \fB'\\\\'\fP
+,
+\fB'\\a'\fP, \fB'\\b'\fP, \fB'\\f'\fP, \fB'\\n'\fP, \fB'\\r'\fP,
+\fB'\\t'\fP, \fB'\\v'\fP ) shall be written as
+the corresponding escape sequences, except that backslash shall be
+written as a single backslash and a NUL shall be written as
+\fB'\\0'\fP . Other non-printable characters shall be written as one
+three-digit octal number for each byte in the character. If
+the size of a byte on the system is greater than nine bits, the format
+used for non-printable characters is implementation-defined.
+Printable multi-byte characters shall be written in the area corresponding
+to the first byte of the character; the two-character
+sequence \fB"**"\fP shall be written in the area corresponding to
+each remaining byte in the character, as an indication that
+the character is continued. When either the \fB-j\fP \fIskip\fP or
+\fB-N\fP \fIcount\fP option is specified along with the
+\fBc\fP type specifier, and this results in an attempt to start or
+finish in the middle of a multi-byte character, the result is
+implementation-defined.
+.LP
+The input data shall be manipulated in blocks, where a block is defined
+as a multiple of the least common multiple of the number
+of bytes transformed by the specified output types. If the least common
+multiple is greater than 16, the results are unspecified.
+Each input block shall be written as transformed by each output type,
+one per written line, in the order that the output types were
+specified. If the input block size is larger than the number of bytes
+transformed by the output type, the output type shall
+sequentially transform the parts of the input block, and the output
+from each of the transformations shall be separated by one or
+more <blank>s.
+.LP
+If, as a result of the specification of the \fB-N\fP option or end-of-file
+being reached on the last input file, input data
+only partially satisfies an output type, the input shall be extended
+sufficiently with null bytes to write the last byte of the
+input.
+.LP
+Unless \fB-A\ n\fP is specified, the first output line produced for
+each input block shall be preceded by the input offset,
+cumulative across input files, of the next byte to be written. The
+format of the input offset is unspecified; however, it shall not
+contain any <blank>s, shall start at the first character of the output
+line, and shall be followed by one or more
+<blank>s. In addition, the offset of the byte following the last byte
+written shall be written after all the input data has
+been processed, but shall not be followed by any <blank>s.
+.LP
+If no \fB-A\fP option is specified, the input offset base is unspecified.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+All input files were processed successfully.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+XSI-conformant applications are warned not to use filenames starting
+with \fB'+'\fP or a first operand starting with a
+numeric character so that the old functionality can be maintained
+by implementations, unless they specify one of the \fB-A\fP,
+\fB-j\fP, or \fB-N\fP options. To guarantee that one of these filenames
+is always interpreted as a filename, an application could
+always specify the address base format with the \fB-A\fP option.
+.SH EXAMPLES
+.LP
+If a file containing 128 bytes with decimal values zero to 127, in
+increasing order, is supplied as standard input to the
+command:
+.sp
+.RS
+.nf
+
+\fBod -A d -t a
+\fP
+.fi
+.RE
+.LP
+on an implementation using an input block size of 16 bytes, the standard
+output, independent of the current locale setting,
+would be similar to:
+.sp
+.RS
+.nf
+
+\fB0000000 nul soh stx etx eot enq ack bel bs ht nl vt ff cr so si
+0000016 dle dc1 dc2 dc3 dc4 nak syn etb can em sub esc fs gs rs us
+0000032 sp ! " # $ % & ' ( ) * + , - . /
+0000048 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
+0000064 @ A B C D E F G H I J K L M N O
+0000080 P Q R S T U V W X Y Z [ \\ ] ^ _
+0000096 ` a b c d e f g h i j k l m n o
+0000112 p q r s t u v w x y z { | } ~ del
+0000128
+\fP
+.fi
+.RE
+.LP
+Note that this volume of IEEE\ Std\ 1003.1-2001 allows \fBnl\fP or
+\fBlf\fP to be used as the name for the
+ISO/IEC\ 646:1991 standard IRV character with decimal value 10. The
+IRV names this character \fBlf\fP (line feed), but
+traditional implementations have referred to this character as newline
+( \fBnl\fP) and the POSIX locale character set symbolic
+name for the corresponding character is a <newline>.
+.LP
+The command:
+.sp
+.RS
+.nf
+
+\fBod -A o -t o2x2x -N 18
+\fP
+.fi
+.RE
+.LP
+on a system with 32-bit words and an implementation using an input
+block size of 16 bytes could write 18 bytes in approximately
+the following format:
+.sp
+.RS
+.nf
+
+\fB0000000 032056 031440 041123 042040 052516 044530 020043 031464
+ 342e 3320 4253 4420 554e 4958 2023 3334
+ 342e3320 42534420 554e4958 20233334
+0000020 032472
+ 353a
+ 353a0000
+0000022
+\fP
+.fi
+.RE
+.LP
+The command:
+.sp
+.RS
+.nf
+
+\fBod -A d -t f -t o4 -t x4 -N 24 -j 0x15
+\fP
+.fi
+.RE
+.LP
+on a system with 64-bit doubles (for example, IEEE\ Std\ 754-1985
+double precision floating-point format) would skip 21
+bytes of input data and then write 24 bytes in approximately the following
+format:
+.sp
+.RS
+.nf
+
+\fB0000000 1.00000000000000e+00 1.57350000000000e+01
+ 07774000000 00000000000 10013674121 35341217270
+ 3ff00000 00000000 402f3851 eb851eb8
+0000016 1.40668230000000e+02
+ 10030312542 04370303230
+ 40619562 23e18698
+0000024
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+The \fIod\fP utility went through several names in early proposals,
+including \fIhd\fP, \fIxd\fP, and most recently
+\fIhexdump\fP. There were several objections to all of these based
+on the following reasons:
+.IP " *" 3
+The \fIhd\fP and \fIxd\fP names conflicted with historical utilities
+that behaved differently.
+.LP
+.IP " *" 3
+The \fIhexdump\fP description was much more complex than needed for
+a simple dump utility.
+.LP
+.IP " *" 3
+The \fIod\fP utility has been available on all historical implementations
+and there was no need to create a new name for a
+utility so similar to the historical \fIod\fP utility.
+.LP
+.LP
+The original reasons for not standardizing historical \fIod\fP were
+also fairly widespread. Those reasons are given below along
+with rationale explaining why the standard developers believe that
+this version does not suffer from the indicated problem:
+.IP " *" 3
+The BSD and System V versions of \fIod\fP have diverged, and the intersection
+of features provided by both does not meet the
+needs of the user community. In fact, the System V version only provides
+a mechanism for dumping octal bytes and \fBshort\fPs,
+signed and unsigned decimal \fBshort\fPs, hexadecimal \fBshort\fPs,
+and ASCII characters. BSD added the ability to dump
+\fBfloat\fPs, \fBdouble\fPs, named ASCII characters, and octal, signed
+decimal, unsigned decimal, and hexadecimal \fBlong\fPs.
+The version presented here provides more normalized forms for dumping
+bytes, \fBshort\fPs, \fBint\fPs, and \fBlong\fPs in octal,
+signed decimal, unsigned decimal, and hexadecimal; \fBfloat\fP, \fBdouble\fP,
+and \fBlong double\fP; and named ASCII as well as
+current locale characters.
+.LP
+.IP " *" 3
+It would not be possible to come up with a compatible superset of
+the BSD and System V flags that met the requirements of the
+standard developers. The historical default \fIod\fP output is the
+specified default output of this utility. None of the option
+letters chosen for this version of \fIod\fP conflict with any of the
+options to historical versions of \fIod\fP.
+.LP
+.IP " *" 3
+On systems with different sizes for \fBshort\fP, \fBint\fP, and \fBlong\fP,
+there was no way to ask for dumps of \fBint\fPs,
+even in the BSD version. Because of the way options are named, the
+name space could not be extended to solve these problems. This
+is why the \fB-t\fP option was added (with type specifiers more closely
+matched to the \fIprintf\fP() formats used in the rest of this volume
+of IEEE\ Std\ 1003.1-2001) and the
+optional field sizes were added to the \fBd\fP, \fBf\fP, \fBo\fP,
+\fBu\fP, and \fBx\fP type specifiers. It is
+also one of the reasons why the historical practice was not mandated
+as a required obsolescent form of \fIod\fP. (Although the old
+versions of \fIod\fP are not listed as an obsolescent form, implementations
+are urged to continue to recognize the older forms for
+several more years.) The \fBa\fP, \fBc\fP, \fBf\fP, \fBo\fP, and
+\fBx\fP types match the meaning of the
+corresponding format characters in the historical implementations
+of \fIod\fP except for the default sizes of the fields
+converted. The \fBd\fP format is signed in this volume of IEEE\ Std\ 1003.1-2001
+to match the \fIprintf\fP() notation. (Historical versions of \fIod\fP
+used \fBd\fP as a synonym for
+\fBu\fP in this version. The System V implementation uses \fBs\fP
+for signed decimal; BSD uses \fBi\fP for signed decimal
+and \fBs\fP for null-terminated strings.) Other than \fBd\fP and \fBu\fP,
+all of the type specifiers match format
+characters in the historical BSD version of \fBod\fP.
+.LP
+The sizes of the C-language types \fBchar\fP, \fBshort\fP, \fBint\fP,
+\fBlong\fP, \fBfloat\fP, \fBdouble\fP, and \fBlong
+double\fP are used even though it is recognized that there may be
+zero or more than one compiler for the C language on an
+implementation and that they may use different sizes for some of these
+types. (For example, one compiler might use 2 bytes
+\fBshort\fPs, 2 bytes \fBint\fPs, and 4 bytes \fBlong\fPs, while another
+compiler (or an option to the same compiler) uses 2
+bytes \fBshort\fPs, 4 bytes \fBint\fPs, and 4 bytes \fBlong\fPs.)
+Nonetheless, there has to be a basic size known by the
+implementation for these types, corresponding to the values reported
+by invocations of the \fIgetconf\fP utility when called with \fIsystem_var\fP
+operands {UCHAR_MAX}, {USHORT_MAX},
+{UINT_MAX}, and {ULONG_MAX} for the types \fBchar\fP, \fBshort\fP,
+\fBint\fP, and \fBlong\fP, respectively. There are similar
+constants required by the ISO\ C standard, but not required by the
+System Interfaces volume of IEEE\ Std\ 1003.1-2001
+or this volume of IEEE\ Std\ 1003.1-2001. They are {FLT_MANT_DIG},
+{DBL_MANT_DIG}, and {LDBL_MANT_DIG} for the types
+\fBfloat\fP, \fBdouble\fP, and \fBlong double\fP, respectively. If
+the optional \fIc99\fP
+utility is provided by the implementation and used as specified by
+this volume of IEEE\ Std\ 1003.1-2001, these are the
+sizes that would be provided. If an option is used that specifies
+different sizes for these types, there is no guarantee that the
+\fIod\fP utility is able to interpret binary data output by such a
+program correctly.
+.LP
+This volume of IEEE\ Std\ 1003.1-2001 requires that the numeric values
+of these lengths be recognized by the \fIod\fP
+utility and that symbolic forms also be recognized. Thus, a conforming
+application can always look at an array of \fBunsigned
+long\fP data elements using \fIod\fP \fB-t\fP \fIuL\fP.
+.LP
+.IP " *" 3
+The method of specifying the format for the address field based on
+specifying a starting offset in a file unnecessarily tied the
+two together. The \fB-A\fP option now specifies the address base and
+the \fB-S\fP option specifies a starting offset.
+.LP
+.IP " *" 3
+It would be difficult to break the dependence on U.S. ASCII to achieve
+an internationalized utility. It does not seem to be any
+harder for \fIod\fP to dump characters in the current locale than
+it is for the \fIed\fP or \fIsed\fP \fBl\fP commands. The \fBc\fP
+type specifier does this without difficulty and is
+completely compatible with the historical implementations of the \fBc\fP
+format character when the current locale uses a superset
+of the ISO/IEC\ 646:1991 standard as a codeset. The \fBa\fP type specifier
+(from the BSD \fBa\fP format character) was left
+as a portable means to dump ASCII (or more correctly ISO/IEC\ 646:1991
+standard (IRV)) so that headers produced by \fIpax\fP could be deciphered
+even on systems that do not use the ISO/IEC\ 646:1991 standard as
+a
+subset of their base codeset.
+.LP
+.LP
+The use of \fB"**"\fP as an indication of continuation of a multi-byte
+character in \fBc\fP specifier output was chosen
+based on seeing an implementation that uses this method. The continuation
+bytes have to be marked in a way that is not ambiguous
+with another single-byte or multi-byte character.
+.LP
+An early proposal used \fB-S\fP and \fB-n\fP, respectively, for the
+\fB-j\fP and \fB-N\fP options eventually selected. These
+were changed to avoid conflicts with historical implementations.
+.LP
+The original standard specified \fB-t o2\fP as the default when no
+output type was given. This was changed to \fB-t oS\fP (the
+length of a \fBshort\fP) to accommodate a supercomputer implementation
+that historically used 64 bits as its default (and that
+defined shorts as 64 bits). This change should not affect conforming
+applications. The requirement to support lengths of 1, 2, and
+4 was added at the same time to address an historical implementation
+that had no two-byte data types in its C compiler.
+.LP
+The use of a basic integer data type is intended to allow the implementation
+to choose a word size commonly used by applications
+on that architecture.
+.SH FUTURE DIRECTIONS
+.LP
+All option and operand interfaces marked as extensions may be withdrawn
+in a future version.
+.SH SEE ALSO
+.LP
+\fIc99\fP, \fIsed\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/paste.1p b/man-pages-posix-2003/man1p/paste.1p
new file mode 100644
index 0000000..34ad905
--- /dev/null
+++ b/man-pages-posix-2003/man1p/paste.1p
@@ -0,0 +1,305 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PASTE" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" paste
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+paste \- merge corresponding or subsequent lines of files
+.SH SYNOPSIS
+.LP
+\fBpaste\fP \fB[\fP\fB-s\fP\fB][\fP\fB-d\fP \fIlist\fP\fB]\fP \fIfile\fP\fB...\fP
+.SH DESCRIPTION
+.LP
+The \fIpaste\fP utility shall concatenate the corresponding lines
+of the given input files, and write the resulting lines to
+standard output.
+.LP
+The default operation of \fIpaste\fP shall concatenate the corresponding
+lines of the input files. The <newline> of every
+line except the line from the last input file shall be replaced with
+a <tab>.
+.LP
+If an end-of-file condition is detected on one or more input files,
+but not all input files, \fIpaste\fP shall behave as though
+empty lines were read from the files on which end-of-file was detected,
+unless the \fB-s\fP option is specified.
+.SH OPTIONS
+.LP
+The \fIpaste\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-d\ \fP \fIlist\fP
+Unless a backslash character appears in \fIlist\fP, each character
+in \fIlist\fP is an element specifying a delimiter
+character. If a backslash character appears in \fIlist\fP, the backslash
+character and one or more characters following it are an
+element specifying a delimiter character as described below. These
+elements specify one or more delimiters to use, instead of the
+default <tab>, to replace the <newline> of the input lines. The elements
+in \fIlist\fP shall be used circularly; that
+is, when the list is exhausted the first element from the list is
+reused. When the \fB-s\fP option is specified:
+.RS
+.IP " *" 3
+The last <newline> in a file shall not be modified.
+.LP
+.IP " *" 3
+The delimiter shall be reset to the first element of \fIlist\fP after
+each \fIfile\fP operand is processed.
+.LP
+.RE
+.LP
+When the \fB-s\fP option is not specified:
+.RS
+.IP " *" 3
+The <newline>s in the file specified by the last \fIfile\fP operand
+shall not be modified.
+.LP
+.IP " *" 3
+The delimiter shall be reset to the first element of list each time
+a line is processed from each file.
+.LP
+.RE
+.LP
+If a backslash character appears in \fIlist\fP, it and the character
+following it shall be used to represent the following
+delimiter characters:
+.TP 7
+\fB\\n\fP
+.RS
+<newline>.
+.RE
+.TP 7
+\fB\\t\fP
+.RS
+<tab>.
+.RE
+.TP 7
+\fB\\\\\fP
+.RS
+Backslash character.
+.RE
+.TP 7
+\fB\\0\fP
+.RS
+Empty string (not a null character). If \fB'\\0'\fP is immediately
+followed by the character \fB'x'\fP, the character
+\fB'X'\fP, or any character defined by the \fILC_CTYPE\fP \fBdigit\fP
+keyword (see the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 7, Locale), the results are unspecified.
+.RE
+.sp
+.LP
+If any other characters follow the backslash, the results are unspecified.
+.TP 7
+\fB-s\fP
+Concatenate all of the lines of each separate input file in command
+line order. The <newline> of every line except the
+last line in each input file shall be replaced with the <tab>, unless
+otherwise specified by the \fB-d\fP option.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of an input file. If \fB'-'\fP is specified for one or
+more of the \fIfile\fPs, the standard input shall be
+used; the standard input shall be read one line at a time, circularly,
+for each instance of \fB'-'\fP . Implementations shall
+support pasting of at least 12 \fIfile\fP operands.
+.sp
+.SH STDIN
+.LP
+The standard input shall be used only if one or more \fIfile\fP operands
+is \fB'-'\fP . See the INPUT FILES section.
+.SH INPUT FILES
+.LP
+The input files shall be text files, except that line lengths shall
+be unlimited.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIpaste\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Concatenated lines of input files shall be separated by the <tab>
+(or other characters under the control of the \fB-d\fP
+option) and terminated by a <newline>.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+If one or more input files cannot be opened when the \fB-s\fP option
+is not specified, a diagnostic message shall be written to
+standard error, but no output is written to standard output. If the
+\fB-s\fP option is specified, the \fIpaste\fP utility shall
+provide the default behavior described in \fIUtility Description Defaults\fP
+\&.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+When the escape sequences of the \fIlist\fP option-argument are used
+in a shell script, they must be quoted; otherwise, the
+shell treats the \fB'\\'\fP as a special character.
+.LP
+Conforming applications should only use the specific backslash escaped
+delimiters presented in this volume of
+IEEE\ Std\ 1003.1-2001. Historical implementations treat \fB'\\x'\fP,
+where \fB'x'\fP is not in this list, as
+\fB'x'\fP, but future implementations are free to expand this list
+to recognize other common escapes similar to those accepted
+by \fIprintf\fP and other standard utilities.
+.LP
+Most of the standard utilities work on text files. The \fIcut\fP utility
+can be used to
+turn files with arbitrary line lengths into a set of text files containing
+the same data. The \fIpaste\fP utility can be used to
+create (or recreate) files with arbitrary line lengths. For example,
+if \fIfile\fP contains long lines:
+.sp
+.RS
+.nf
+
+\fBcut -b 1-500 -n file > file1
+cut -b 501- -n file > file2
+\fP
+.fi
+.RE
+.LP
+creates \fBfile1\fP (a text file) with lines no longer than 500 bytes
+(plus the <newline>) and \fBfile2\fP that contains
+the remainder of the data from \fIfile\fP. Note that \fBfile2\fP is
+not a text file if there are lines in \fIfile\fP that are
+longer than 500 + {LINE_MAX} bytes. The original file can be recreated
+from \fBfile1\fP and \fBfile2\fP using the command:
+.sp
+.RS
+.nf
+
+\fBpaste -d "\\0" file1 file2 > file
+\fP
+.fi
+.RE
+.LP
+The commands:
+.sp
+.RS
+.nf
+
+\fBpaste -d "\\0" ...
+paste -d "" ...
+\fP
+.fi
+.RE
+.LP
+are not necessarily equivalent; the latter is not specified by this
+volume of IEEE\ Std\ 1003.1-2001 and may result in
+an error. The construct \fB'\\0'\fP is used to mean "no separator"
+because historical versions of \fIpaste\fP did not follow
+the syntax guidelines, and the command:
+.sp
+.RS
+.nf
+
+\fBpaste -d"" ...
+\fP
+.fi
+.RE
+.LP
+could not be handled properly by \fIgetopt\fP().
+.SH EXAMPLES
+.IP " 1." 4
+Write out a directory in four columns:
+.sp
+.RS
+.nf
+
+\fBls | paste - - - -
+\fP
+.fi
+.RE
+.LP
+.IP " 2." 4
+Combine pairs of lines from a file into single lines:
+.sp
+.RS
+.nf
+
+\fBpaste -s -d "\\t\\n" file
+\fP
+.fi
+.RE
+.LP
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIUtility Description Defaults\fP, \fIcut\fP, \fIgrep\fP, \fIpr\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/patch.1p b/man-pages-posix-2003/man1p/patch.1p
new file mode 100644
index 0000000..89069b1
--- /dev/null
+++ b/man-pages-posix-2003/man1p/patch.1p
@@ -0,0 +1,514 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PATCH" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" patch
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+patch \- apply changes to files
+.SH SYNOPSIS
+.LP
+\fBpatch\fP \fB[\fP\fB-blNR\fP\fB][\fP \fB-c| -e| -n\fP\fB][\fP\fB-d\fP
+\fIdir\fP\fB][\fP\fB-D\fP \fIdefine\fP\fB][\fP\fB-i\fP \fIpatchfile\fP\fB]
+.br
+\fP \fB\ \ \ \ \ \ \fP \fB[\fP\fB-o\fP \fIoutfile\fP\fB][\fP\fB-p\fP
+\fInum\fP\fB][\fP\fB-r\fP \fIrejectfile\fP\fB][\fP\fIfile\fP\fB]\fP\fB\fP
+.SH DESCRIPTION
+.LP
+The \fIpatch\fP utility shall read a source (patch) file containing
+any of the three forms of difference (diff) listings
+produced by the \fIdiff\fP utility (normal, context, or in the style
+of \fIed\fP) and apply those differences to a file. By default, \fIpatch\fP
+shall read from the standard
+input.
+.LP
+The \fIpatch\fP utility shall attempt to determine the type of the
+\fIdiff\fP listing,
+unless overruled by a \fB-c\fP, \fB-e\fP, or \fB-n\fP option.
+.LP
+If the patch file contains more than one patch, \fIpatch\fP shall
+attempt to apply each of them as if they came from separate
+patch files. (In this case, the application shall ensure that the
+name of the patch file is determinable for each \fIdiff\fP listing.)
+.SH OPTIONS
+.LP
+The \fIpatch\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-b\fP
+Save a copy of the original contents of each modified file, before
+the differences are applied, in a file of the same name with
+the suffix \fB.orig\fP appended to it. If the file already exists,
+it shall be overwritten; if multiple patches are applied to the
+same file, the \fB.orig\fP file shall be written only for the first
+patch. When the \fB-o\fP \fIoutfile\fP option is also
+specified, \fIfile\fP \fB.orig\fP shall not be created but, if \fIoutfile\fP
+already exists, \fIoutfile\fP \fB.orig\fP shall
+be created.
+.TP 7
+\fB-c\fP
+Interpret the patch file as a context difference (the output of the
+utility \fIdiff\fP
+when the \fB-c\fP or \fB-C\fP options are specified).
+.TP 7
+\fB-d\ \fP \fIdir\fP
+Change the current directory to \fIdir\fP before processing as described
+in the EXTENDED DESCRIPTION section.
+.TP 7
+\fB-D\ \fP \fIdefine\fP
+Mark changes with one of the following C preprocessor constructs:
+.sp
+.RS
+.nf
+
+\fB#ifdef define
+\&...
+#endif
+.sp
+
+#ifndef define
+\&...
+#endif
+\fP
+.fi
+.RE
+.LP
+optionally combined with the C preprocessor construct \fB#else\fP.
+If the patched file is processed with the C preprocessor,
+where the macro \fIdefine\fP is defined, the output shall contain
+the changes from the patch file; otherwise, the output shall not
+contain the patches specified in the patch file.
+.TP 7
+\fB-e\fP
+Interpret the patch file as an \fIed\fP script, rather than a \fIdiff\fP
+script.
+.TP 7
+\fB-i\ \fP \fIpatchfile\fP
+Read the patch information from the file named by the pathname \fIpatchfile\fP,
+rather than the standard input.
+.TP 7
+\fB-l\fP
+(The letter ell.) Cause any sequence of <blank>s in the difference
+script to match any sequence of <blank>s in the
+input file. Other characters shall be matched exactly.
+.TP 7
+\fB-n\fP
+Interpret the script as a normal difference.
+.TP 7
+\fB-N\fP
+Ignore patches where the differences have already been applied to
+the file; by default, already-applied patches shall be
+rejected.
+.TP 7
+\fB-o\ \fP \fIoutfile\fP
+Instead of modifying the files (specified by the \fIfile\fP operand
+or the difference listings) directly, write a copy of the
+file referenced by each patch, with the appropriate differences applied,
+to \fIoutfile\fP. Multiple patches for a single file
+shall be applied to the intermediate versions of the file created
+by any previous patches, and shall result in multiple,
+concatenated versions of the file being written to \fIoutfile\fP.
+.TP 7
+\fB-p\ \fP \fInum\fP
+For all pathnames in the patch file that indicate the names of files
+to be patched, delete \fInum\fP pathname components from
+the beginning of each pathname. If the pathname in the patch file
+is absolute, any leading slashes shall be considered the first
+component (that is, \fB-p\ 1\fP shall remove the leading slashes).
+Specifying \fB-p\ 0\fP shall cause the full pathname
+to be used. If \fB-p\fP is not specified, only the basename (the final
+pathname component) shall be used.
+.TP 7
+\fB-R\fP
+Reverse the sense of the patch script; that is, assume that the difference
+script was created from the new version to the old
+version. The \fB-R\fP option cannot be used with \fIed\fP scripts.
+The \fIpatch\fP utility
+shall attempt to reverse each portion of the script before applying
+it. Rejected differences shall be saved in swapped format. If
+this option is not specified, and until a portion of the patch file
+is successfully applied, \fIpatch\fP attempts to apply each
+portion in its reversed sense as well as in its normal sense. If the
+attempt is successful, the user shall be prompted to determine
+whether the \fB-R\fP option should be set.
+.TP 7
+\fB-r\ \fP \fIrejectfile\fP
+Override the default reject filename. In the default case, the reject
+file shall have the same name as the output file, with
+the suffix \fB.rej\fP appended to it; see Patch Application .
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of a file to patch.
+.sp
+.SH STDIN
+.LP
+See the INPUT FILES section.
+.SH INPUT FILES
+.LP
+Input files shall be text files.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIpatch\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard error and
+informative messages written to standard output.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fILC_TIME\fP
+Determine the locale for recognizing the format of file timestamps
+written by the \fIdiff\fP utility in a context-difference input file.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used for diagnostic and informational
+messages.
+.SH OUTPUT FILES
+.LP
+The output of the \fIpatch\fP utility, the save files ( \fB.orig\fP
+suffixes), and the reject files ( \fB.rej\fP suffixes)
+shall be text files.
+.SH EXTENDED DESCRIPTION
+.LP
+A patch file may contain patching instructions for more than one file;
+filenames shall be determined as specified in Filename Determination
+\&. When the \fB-b\fP option is specified, for each patched file, the
+original shall
+be saved in a file of the same name with the suffix \fB.orig\fP appended
+to it.
+.LP
+For each patched file, a reject file may also be created as noted
+in Patch Application . In the
+absence of a \fB-r\fP option, the name of this file shall be formed
+by appending the suffix \fB.rej\fP to the original
+filename.
+.SS Patch File Format
+.LP
+The patch file shall contain zero or more lines of header information
+followed by one or more patches. Each patch shall contain
+zero or more lines of filename identification in the format produced
+by \fIdiff\fP \fB-c\fP,
+and one or more sets of \fIdiff\fP output, which are customarily called
+\fIhunks\fP.
+.LP
+The \fIpatch\fP utility shall recognize the following expression in
+the header information:
+.TP 7
+\fBIndex:\ \fP \fIpathname\fP
+.sp
+The file to be patched is named \fIpathname\fP.
+.sp
+.LP
+If all lines (including headers) within a patch begin with the same
+leading sequence of <blank>s, the \fIpatch\fP utility
+shall remove this sequence before proceeding. Within each patch, if
+the type of difference is context, the \fIpatch\fP utility
+shall recognize the following expressions:
+.TP 7
+***\ \fIfilename\ timestamp\fP
+.sp
+The patches arose from \fIfilename\fP.
+.TP 7
+---\ \fIfilename\ timestamp\fP
+.sp
+The patches should be applied to \fIfilename\fP.
+.sp
+.LP
+Each hunk within a patch shall be the \fIdiff\fP output to change
+a line range within the
+original file. The line numbers for successive hunks within a patch
+shall occur in ascending order.
+.SS Filename Determination
+.LP
+If no \fIfile\fP operand is specified, \fIpatch\fP shall perform the
+following steps to determine the filename to use:
+.IP " 1." 4
+If the type of \fIdiff\fP is context, the \fIpatch\fP utility shall
+delete pathname
+components (as specified by the \fB-p\fP option) from the filename
+on the line beginning with \fB"***"\fP, then test for the
+existence of this file relative to the current directory (or the directory
+specified with the \fB-d\fP option). If the file
+exists, the \fIpatch\fP utility shall use this filename.
+.LP
+.IP " 2." 4
+If the type of \fIdiff\fP is context, the \fIpatch\fP utility shall
+delete the pathname
+components (as specified by the \fB-p\fP option) from the filename
+on the line beginning with \fB"---"\fP, then test for the
+existence of this file relative to the current directory (or the directory
+specified with the \fB-d\fP option). If the file
+exists, the \fIpatch\fP utility shall use this filename.
+.LP
+.IP " 3." 4
+If the header information contains a line beginning with the string
+\fBIndex:\fP, the \fIpatch\fP utility shall delete
+pathname components (as specified by the \fB-p\fP option) from this
+line, then test for the existence of this file relative to the
+current directory (or the directory specified with the \fB-d\fP option).
+If the file exists, the \fIpatch\fP utility shall use
+this filename.
+.LP
+.IP " 4." 4
+If an \fBSCCS\fP directory exists in the current directory, \fIpatch\fP
+shall attempt to perform a \fIget\fP \fB-e\fP \fBSCCS/s.\fP \fIfilename\fP
+command to retrieve an editable version of the
+file. If the file exists, the \fIpatch\fP utility shall use this filename.
+.LP
+.IP " 5." 4
+The \fIpatch\fP utility shall write a prompt to standard output and
+request a filename interactively from the controlling
+terminal (for example, \fB/dev/tty\fP).
+.LP
+.SS Patch Application
+.LP
+If the \fB-c\fP, \fB-e\fP, or \fB-n\fP option is present, the \fIpatch\fP
+utility shall interpret information within each
+hunk as a context difference, an \fIed\fP difference, or a normal
+difference, respectively. In
+the absence of any of these options, the \fIpatch\fP utility shall
+determine the type of difference based on the format of
+information within the hunk.
+.LP
+For each hunk, the \fIpatch\fP utility shall begin to search for the
+place to apply the patch at the line number at the
+beginning of the hunk, plus or minus any offset used in applying the
+previous hunk. If lines matching the hunk context are not
+found, \fIpatch\fP shall scan both forwards and backwards at least
+1000 bytes for a set of lines that match the hunk context.
+.LP
+If no such place is found and it is a context difference, then another
+scan shall take place, ignoring the first and last line
+of context. If that fails, the first two and last two lines of context
+shall be ignored and another scan shall be made.
+Implementations may search more extensively for installation locations.
+.LP
+If no location can be found, the \fIpatch\fP utility shall append
+the hunk to the reject file. The rejected hunk shall be
+written in context-difference format regardless of the format of the
+patch file. If the input was a normal or \fIed\fP-style difference,
+the reject file may contain differences with zero lines of context.
+The line
+numbers on the hunks in the reject file may be different from the
+line numbers in the patch file since they shall reflect the
+approximate locations for the failed hunks in the new file rather
+than the old one.
+.LP
+If the type of patch is an \fIed\fP diff, the implementation may accomplish
+the patching by
+invoking the \fIed\fP utility.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+\ 1
+One or more lines were written to a reject file.
+.TP 7
+>1
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Patches that cannot be correctly placed in the file shall be written
+to a reject file.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The \fB-R\fP option does not work with \fIed\fP scripts because there
+is too little
+information to reconstruct the reverse operation.
+.LP
+The \fB-p\fP option makes it possible to customize a patch file to
+local user directory structures without manually editing the
+patch file. For example, if the filename in the patch file was:
+.sp
+.RS
+.nf
+
+\fB/curds/whey/src/blurfl/blurfl.c
+\fP
+.fi
+.RE
+.LP
+Setting \fB-p\ 0\fP gives the entire pathname unmodified; \fB-p\ 1\fP
+gives:
+.sp
+.RS
+.nf
+
+\fBcurds/whey/src/blurfl/blurfl.c
+\fP
+.fi
+.RE
+.LP
+without the leading slash, \fB-p\ 4\fP gives:
+.sp
+.RS
+.nf
+
+\fBblurfl/blurfl.c
+\fP
+.fi
+.RE
+.LP
+and not specifying \fB-p\fP at all gives:
+.sp
+.RS
+.nf
+
+\fBblurfl.c .
+\fP
+.fi
+.RE
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+Some of the functionality in historical \fIpatch\fP implementations
+was not specified. The following documents those features
+present in historical implementations that have not been specified.
+.LP
+A deleted piece of functionality was the \fB'+'\fP pseudo-option allowing
+an additional set of options and a patch file
+operand to be given. This was seen as being insufficiently useful
+to standardize.
+.LP
+In historical implementations, if the string \fB"Prereq:"\fP appeared
+in the header, the \fIpatch\fP utility would search
+for the corresponding version information (the string specified in
+the header, delimited by <blank>s or the beginning or end
+of a line or the file) anywhere in the original file. This was deleted
+as too simplistic and insufficiently trustworthy a mechanism
+to standardize. For example, if:
+.sp
+.RS
+.nf
+
+\fBPrereq: 1.2
+\fP
+.fi
+.RE
+.LP
+were in the header, the presence of a delimited 1.2 anywhere in the
+file would satisfy the prerequisite.
+.LP
+The following options were dropped from historical implementations
+of \fIpatch\fP as insufficiently useful to standardize:
+.TP 7
+\fB-b\fP
+The \fB-b\fP option historically provided a method for changing the
+name extension of the backup file from the default
+\fB\&.orig\fP. This option has been modified and retained in this volume
+of IEEE\ Std\ 1003.1-2001.
+.TP 7
+\fB-F\fP
+The \fB-F\fP option specified the number of lines of a context diff
+to ignore when searching for a place to install a
+patch.
+.TP 7
+\fB-f\fP
+The \fB-f\fP option historically caused \fIpatch\fP not to request
+additional information from the user.
+.TP 7
+\fB-r\fP
+The \fB-r\fP option historically provided a method of overriding the
+extension of the reject file from the default
+\fB\&.rej\fP.
+.TP 7
+\fB-s\fP
+The \fB-s\fP option historically caused \fIpatch\fP to work silently
+unless an error occurred.
+.TP 7
+\fB-x\fP
+The \fB-x\fP option historically set internal debugging flags.
+.sp
+.LP
+In some file system implementations, the saving of a \fB.orig\fP file
+may produce unwanted results. In the case of 12, 13, or
+14-character filenames (on file systems supporting 14-character maximum
+filenames), the \fB.orig\fP file overwrites the new file.
+The reject file may also exceed this filename limit. It was suggested,
+due to some historical practice, that a tilde (
+\fB'~'\fP ) suffix be used instead of \fB.orig\fP and some other character
+instead of the \fB.rej\fP suffix. This was
+rejected because it is not obvious to the user which file is which.
+The suffixes \fB.orig\fP and \fB.rej\fP are clearer and more
+understandable.
+.LP
+The \fB-b\fP option has the opposite sense in some historical implementations-do
+not save the \fB.orig\fP file. The default
+case here is not to save the files, making \fIpatch\fP behave more
+consistently with the other standard utilities.
+.LP
+The \fB-w\fP option in early proposals was changed to \fB-l\fP to
+match historical practice.
+.LP
+The \fB-N\fP option was included because without it, a non-interactive
+application cannot reject previously applied patches.
+For example, if a user is piping the output of \fIdiff\fP into the
+\fIpatch\fP utility, and
+the user only wants to patch a file to a newer version non-interactively,
+the \fB-N\fP option is required.
+.LP
+Changes to the \fB-l\fP option description were proposed to allow
+matching across <newline>s in addition to just
+<blank>s. Since this is not historical practice, and since some ambiguities
+could result, it is suggested that future
+developments in this area utilize another option letter, such as \fB-L\fP.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIed\fP, \fIdiff\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/pathchk.1p b/man-pages-posix-2003/man1p/pathchk.1p
new file mode 100644
index 0000000..887cc49
--- /dev/null
+++ b/man-pages-posix-2003/man1p/pathchk.1p
@@ -0,0 +1,363 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PATHCHK" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pathchk
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pathchk \- check pathnames
+.SH SYNOPSIS
+.LP
+\fBpathchk\fP \fB[\fP\fB-p\fP\fB]\fP \fIpathname\fP\fB...\fP
+.SH DESCRIPTION
+.LP
+The \fIpathchk\fP utility shall check that one or more pathnames are
+valid (that is, they could be used to access or create a
+file without causing syntax errors) and portable (that is, no filename
+truncation results). More extensive portability checks are
+provided by the \fB-p\fP option.
+.LP
+By default, the \fIpathchk\fP utility shall check each component of
+each \fIpathname\fP operand based on the underlying file
+system. A diagnostic shall be written for each \fIpathname\fP operand
+that:
+.IP " *" 3
+Is longer than {PATH_MAX} bytes (see \fBPathname Variable Values\fP
+in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 13, Headers, \fI<limits.h>\fP)
+.LP
+.IP " *" 3
+Contains any component longer than {NAME_MAX} bytes in its containing
+directory
+.LP
+.IP " *" 3
+Contains any component in a directory that is not searchable
+.LP
+.IP " *" 3
+Contains any character in any component that is not valid in its containing
+directory
+.LP
+.LP
+The format of the diagnostic message is not specified, but shall indicate
+the error detected and the corresponding
+\fIpathname\fP operand.
+.LP
+It shall not be considered an error if one or more components of a
+\fIpathname\fP operand do not exist as long as a file
+matching the pathname specified by the missing components could be
+created that does not violate any of the checks specified
+above.
+.SH OPTIONS
+.LP
+The \fIpathchk\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following option shall be supported:
+.TP 7
+\fB-p\fP
+Instead of performing checks based on the underlying file system,
+write a diagnostic for each \fIpathname\fP operand that:
+.RS
+.IP " *" 3
+Is longer than {_POSIX_PATH_MAX} bytes (see \fBMinimum Values\fP in
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 13, Headers, \fI<limits.h>\fP)
+.LP
+.IP " *" 3
+Contains any component longer than {_POSIX_NAME_MAX} bytes
+.LP
+.IP " *" 3
+Contains any character in any component that is not in the portable
+filename character set
+.LP
+.RE
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIpathname\fP
+A pathname to be checked.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIpathchk\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+All \fIpathname\fP operands passed all of the checks.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The \fItest\fP utility can be used to determine whether a given pathname
+names an existing
+file; it does not, however, give any indication of whether or not
+any component of the pathname was truncated in a directory where
+the _POSIX_NO_TRUNC feature is not in effect. The \fIpathchk\fP utility
+does not check for file existence; it performs checks to
+determine whether a pathname does exist or could be created with no
+pathname component truncation.
+.LP
+The \fInoclobber\fP option in the shell (see the \fIset\fP special
+built-in) can be used to
+atomically create a file. As with all file creation semantics in the
+System Interfaces volume of IEEE\ Std\ 1003.1-2001, it
+guarantees atomic creation, but still depends on applications to agree
+on conventions and cooperate on the use of files after they
+have been created.
+.SH EXAMPLES
+.LP
+To verify that all pathnames in an imported data interchange archive
+are legitimate and unambiguous on the current system:
+.sp
+.RS
+.nf
+
+\fBpax -f archive | sed -e '/ == .*/s///' | xargs pathchk
+if [ $? -eq 0 ]
+then
+ pax -r -f archive
+else
+ echo Investigate problems before importing files.
+ exit 1
+fi
+\fP
+.fi
+.RE
+.LP
+To verify that all files in the current directory hierarchy could
+be moved to any system conforming to the System Interfaces
+volume of IEEE\ Std\ 1003.1-2001 that also supports the \fIpax\fP
+utility:
+.sp
+.RS
+.nf
+
+\fBfind . -print | xargs pathchk -p
+if [ $? -eq 0 ]
+then
+ pax -w -f archive .
+else
+ echo Portable archive cannot be created.
+ exit 1
+fi
+\fP
+.fi
+.RE
+.LP
+To verify that a user-supplied pathname names a readable file and
+that the application can create a file extending the given
+path without truncation and without overwriting any existing file:
+.sp
+.RS
+.nf
+
+\fBcase $- in
+ *C*) reset="";;
+ *) reset="set +C"
+ set -C;;
+esac
+test -r "$path" && pathchk "$path.out" &&
+ rm "$path.out" > "$path.out"
+if [ $? -ne 0 ]; then
+ printf "%s: %s not found or %s.out fails \\
+creation checks.\\n" $0 "$path" "$path"
+ $reset # Reset the noclobber option in case a trap
+ # on EXIT depends on it.
+ exit 1
+fi
+$reset
+PROCESSING < "$path" > "$path.out"
+\fP
+.fi
+.RE
+.LP
+The following assumptions are made in this example:
+.IP " 1." 4
+\fBPROCESSING\fP represents the code that is used by the application
+to use \fB$path\fP once it is verified that
+\fB$path.out\fP works as intended.
+.LP
+.IP " 2." 4
+The state of the \fInoclobber\fP option is unknown when this code
+is invoked and should be set on exit to the state it was in
+when this code was invoked. (The \fBreset\fP variable is used in this
+example to restore the initial state.)
+.LP
+.IP " 3." 4
+Note the usage of:
+.sp
+.RS
+.nf
+
+\fBrm "$path.out" > "$path.out"
+\fP
+.fi
+.RE
+.RS
+.IP " a." 4
+The \fIpathchk\fP command has already verified, at this point, that
+\fB$path.out\fP is not truncated.
+.LP
+.IP " b." 4
+With the \fInoclobber\fP option set, the shell verifies that \fB$path.out\fP
+does not already exist before invoking \fIrm\fP.
+.LP
+.IP " c." 4
+If the shell succeeded in creating \fB$path.out\fP, \fIrm\fP removes
+it so that the
+application can create the file again in the \fBPROCESSING\fP step.
+.LP
+.IP " d." 4
+If the \fBPROCESSING\fP step wants the file to exist already when
+it is invoked, the:
+.sp
+.RS
+.nf
+
+\fBrm "$path.out" > "$path.out"
+\fP
+.fi
+.RE
+.LP
+should be replaced with:
+.sp
+.RS
+.nf
+
+\fB> "$path.out"
+\fP
+.fi
+.RE
+.LP
+which verifies that the file did not already exist, but leaves \fB$path.out\fP
+in place for use by \fBPROCESSING\fP.
+.LP
+.RE
+.LP
+.SH RATIONALE
+.LP
+The \fIpathchk\fP utility was new for the ISO\ POSIX-2:1993 standard.
+It, along with the \fIset\fP \fB-C\fP( \fInoclobber\fP) option added
+to the shell, replaces the
+\fImktemp\fP, \fIvalidfnam\fP, and \fIcreate\fP utilities that appeared
+in early proposals. All of these utilities were attempts
+to solve several common problems:
+.IP " *" 3
+Verify the validity (for several different definitions of "valid")
+of a pathname supplied by a user, generated by an
+application, or imported from an external source.
+.LP
+.IP " *" 3
+Atomically create a file.
+.LP
+.IP " *" 3
+Perform various string handling functions to generate a temporary
+filename.
+.LP
+.LP
+The \fIcreate\fP utility, included in an early proposal, provided
+checking and atomic creation in a single invocation of the
+utility; these are orthogonal issues and need not be grouped into
+a single utility. Note that the \fInoclobber\fP option also
+provides a way of creating a lock for process synchronization; since
+it provides an atomic \fIcreate\fP, there is no race between
+a test for existence and the following creation if it did not exist.
+.LP
+Having a function like \fItmpnam\fP() in the ISO\ C standard is important
+in many
+high-level languages. The shell programming language, however, has
+built-in string manipulation facilities, making it very easy to
+construct temporary filenames. The names needed obviously depend on
+the application, but are frequently of a form similar to:
+.sp
+.RS
+.nf
+
+\fB$TMPDIR/\fP\fIapplication_abbreviation\fP\fB$$.\fP\fIsuffix\fP
+.fi
+.RE
+.LP
+In cases where there is likely to be contention for a given suffix,
+a simple shell \fBfor\fP or \fBwhile\fP loop can be used
+with the shell \fInoclobber\fP option to create a file without risk
+of collisions, as long as applications trying to use the same
+filename name space are cooperating on the use of files after they
+have been created.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIRedirection\fP, \fIset\fP, \fItest\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/pax.1p b/man-pages-posix-2003/man1p/pax.1p
new file mode 100644
index 0000000..24e1bbf
--- /dev/null
+++ b/man-pages-posix-2003/man1p/pax.1p
@@ -0,0 +1,2957 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PAX" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pax
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pax \- portable archive interchange
+.SH SYNOPSIS
+.LP
+\fBpax\fP \fB[\fP\fB-cdnv\fP\fB][\fP\fB-H|-L\fP\fB][\fP\fB-f\fP \fIarchive\fP\fB][\fP\fB-s\fP
+\fIreplstr\fP\fB]\fP\fB...\fP\fB[\fP\fIpattern\fP\fB...\fP\fB]\fP\fB
+.br
+.sp
+pax -r\fP\fB[\fP\fB-cdiknuv\fP\fB][\fP\fB-H|-L\fP\fB][\fP\fB-f\fP
+\fIarchive\fP\fB][\fP\fB-o\fP
+\fIoptions\fP\fB]\fP\fB...\fP\fB[\fP\fB-p\fP \fIstring\fP\fB]\fP\fB...
+.br
+\ \ \ \ \ \ \fP \fB[\fP\fB-s\fP
+\fIreplstr\fP\fB]\fP\fB...\fP\fB[\fP\fIpattern\fP\fB...\fP\fB]\fP\fB
+.br
+.sp
+pax -w\fP\fB[\fP\fB-dituvX\fP\fB][\fP\fB-H|-L\fP\fB][\fP\fB-b\fP
+\fIblocksize\fP\fB][[\fP\fB-a\fP\fB][\fP\fB-f\fP \fIarchive\fP\fB][\fP\fB-o\fP
+\fIoptions\fP\fB]\fP\fB...
+.br
+\ \ \ \ \ \ \fP \fB[\fP\fB-s\fP \fIreplstr\fP\fB]\fP\fB...\fP\fB[\fP\fB-x\fP
+\fIformat\fP\fB][\fP\fIfile\fP\fB...\fP\fB]\fP\fB
+.br
+.sp
+pax -r -w\fP\fB[\fP\fB-diklntuvX\fP\fB][\fP\fB-H|-L\fP\fB][\fP\fB-p\fP
+\fIstring\fP\fB]\fP\fB...\fP\fB[\fP\fB-s\fP \fIreplstr\fP\fB]\fP\fB...
+.br
+\ \ \ \ \ \ \fP \fB[\fP\fIfile\fP\fB...\fP\fB]\fP \fIdirectory\fP\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpax\fP utility shall read, write, and write lists of the members
+of archive files and copy directory hierarchies. A
+variety of archive formats shall be supported; see the \fB-x\fP \fIformat\fP
+option.
+.LP
+The action to be taken depends on the presence of the \fB-r\fP and
+\fB-w\fP options. The four combinations of \fB-r\fP and
+\fB-w\fP are referred to as the four modes of operation: \fBlist\fP,
+\fBread\fP, \fBwrite\fP, and \fBcopy\fP modes,
+corresponding respectively to the four forms shown in the SYNOPSIS
+section.
+.TP 7
+\fBlist\fP
+In \fBlist\fP mode (when neither \fB-r\fP nor \fB-w\fP are specified),
+\fIpax\fP shall write the names of the members of
+the archive file read from the standard input, with pathnames matching
+the specified patterns, to standard output. If a named file
+is of type directory, the file hierarchy rooted at that file shall
+be listed as well.
+.TP 7
+\fBread\fP
+In \fBread\fP mode (when \fB-r\fP is specified, but \fB-w\fP is not),
+\fIpax\fP shall extract the members of the archive
+file read from the standard input, with pathnames matching the specified
+patterns. If an extracted file is of type directory, the
+file hierarchy rooted at that file shall be extracted as well. The
+extracted files shall be created performing pathname resolution
+with the directory in which \fIpax\fP was invoked as the current working
+directory.
+.LP
+If an attempt is made to extract a directory when the directory already
+exists, this shall not be considered an error. If an
+attempt is made to extract a FIFO when the FIFO already exists, this
+shall not be considered an error.
+.LP
+The ownership, access, and modification times, and file mode of the
+restored files are discussed under the \fB-p\fP option.
+.TP 7
+\fBwrite\fP
+In \fBwrite\fP mode (when \fB-w\fP is specified, but \fB-r\fP is not),
+\fIpax\fP shall write the contents of the
+\fIfile\fP operands to the standard output in an archive format. If
+no \fIfile\fP operands are specified, a list of files to
+copy, one per line, shall be read from the standard input. A file
+of type directory shall include all of the files in the file
+hierarchy rooted at the file.
+.TP 7
+\fBcopy\fP
+In \fBcopy\fP mode (when both \fB-r\fP and \fB-w\fP are specified),
+\fIpax\fP shall copy the \fIfile\fP operands to the
+destination directory.
+.LP
+If no \fIfile\fP operands are specified, a list of files to copy,
+one per line, shall be read from the standard input. A file
+of type directory shall include all of the files in the file hierarchy
+rooted at the file.
+.LP
+The effect of the \fBcopy\fP shall be as if the copied files were
+written to an archive file and then subsequently extracted,
+except that there may be hard links between the original and the copied
+files. If the destination directory is a subdirectory of
+one of the files to be copied, the results are unspecified. If the
+destination directory is a file of a type not defined by the
+System Interfaces volume of IEEE\ Std\ 1003.1-2001, the results are
+implementation-defined; otherwise, it shall be an error
+for the file named by the \fIdirectory\fP operand not to exist, not
+be writable by the user, or not be a file of type
+directory.
+.sp
+.LP
+In \fBread\fP or \fBcopy\fP modes, if intermediate directories are
+necessary to extract an archive member, \fIpax\fP shall
+perform actions equivalent to the \fImkdir\fP() function defined in
+the System Interfaces
+volume of IEEE\ Std\ 1003.1-2001, called with the following arguments:
+.IP " *" 3
+The intermediate directory used as the \fIpath\fP argument
+.LP
+.IP " *" 3
+The value of the bitwise-inclusive OR of S_IRWXU, S_IRWXG, and S_IRWXO
+as the \fImode\fP argument
+.LP
+.LP
+If any specified \fIpattern\fP or \fIfile\fP operands are not matched
+by at least one file or archive member, \fIpax\fP shall
+write a diagnostic message to standard error for each one that did
+not match and exit with a non-zero exit status.
+.LP
+The archive formats described in the EXTENDED DESCRIPTION section
+shall be automatically detected on input. The default output
+archive format shall be implementation-defined.
+.LP
+A single archive can span multiple files. The \fIpax\fP utility shall
+determine, in an implementation-defined manner, what file
+to read or write as the next file.
+.LP
+If the selected archive format supports the specification of linked
+files, it shall be an error if these files cannot be linked
+when the archive is extracted. For archive formats that do not store
+file contents with each name that causes a hard link, if the
+file that contains the data is not extracted during this \fIpax\fP
+session, either the data shall be restored from the original
+file, or a diagnostic message shall be displayed with the name of
+a file that can be used to extract the data. In traversing
+directories, \fIpax\fP shall detect infinite loops; that is, entering
+a previously visited directory that is an ancestor of the
+last file visited. When it detects an infinite loop, \fIpax\fP shall
+write a diagnostic message to standard error and shall
+terminate.
+.SH OPTIONS
+.LP
+The \fIpax\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines,
+except that the order of presentation of the
+\fB-o\fP, \fB-p\fP, and \fB-s\fP options is significant.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-r\fP
+Read an archive file from standard input.
+.TP 7
+\fB-w\fP
+Write files to the standard output in the specified archive format.
+.TP 7
+\fB-a\fP
+Append files to the end of the archive. It is implementation-defined
+which devices on the system support appending. Additional
+file formats unspecified by this volume of IEEE\ Std\ 1003.1-2001
+may impose restrictions on appending.
+.TP 7
+\fB-b\ \fP \fIblocksize\fP
+Block the output at a positive decimal integer number of bytes per
+write to the archive file. Devices and archive formats may
+impose restrictions on blocking. Blocking shall be automatically determined
+on input. Conforming applications shall not specify a
+\fIblocksize\fP value larger than 32256. Default blocking when creating
+archives depends on the archive format. (See the \fB-x\fP
+option below.)
+.TP 7
+\fB-c\fP
+Match all file or archive members except those specified by the \fIpattern\fP
+or \fIfile\fP operands.
+.TP 7
+\fB-d\fP
+Cause files of type directory being copied or archived or archive
+members of type directory being extracted or listed to match
+only the file or archive member itself and not the file hierarchy
+rooted at the file.
+.TP 7
+\fB-f\ \fP \fIarchive\fP
+Specify the pathname of the input or output archive, overriding the
+default standard input (in \fBlist\fP or \fBread\fP
+modes) or standard output ( \fBwrite\fP mode).
+.TP 7
+\fB-H\fP
+If a symbolic link referencing a file of type directory is specified
+on the command line, \fIpax\fP shall archive the file
+hierarchy rooted in the file referenced by the link, using the name
+of the link as the root of the file hierarchy. Otherwise, if a
+symbolic link referencing a file of any other file type which \fIpax\fP
+can normally archive is specified on the command line,
+then \fIpax\fP shall archive the file referenced by the link, using
+the name of the link. The default behavior shall be to archive
+the symbolic link itself.
+.TP 7
+\fB-i\fP
+Interactively rename files or archive members. For each archive member
+matching a \fIpattern\fP operand or file matching a
+\fIfile\fP operand, a prompt shall be written to the file \fB/dev/tty\fP.
+The prompt shall contain the name of the file or
+archive member, but the format is otherwise unspecified. A line shall
+then be read from \fB/dev/tty\fP. If this line is blank, the
+file or archive member shall be skipped. If this line consists of
+a single period, the file or archive member shall be processed
+with no modification to its name. Otherwise, its name shall be replaced
+with the contents of the line. The \fIpax\fP utility shall
+immediately exit with a non-zero exit status if end-of-file is encountered
+when reading a response or if \fB/dev/tty\fP cannot be
+opened for reading and writing.
+.LP
+The results of extracting a hard link to a file that has been renamed
+during extraction are unspecified.
+.TP 7
+\fB-k\fP
+Prevent the overwriting of existing files.
+.TP 7
+\fB-l\fP
+(The letter ell.) In \fBcopy\fP mode, hard links shall be made between
+the source and destination file hierarchies whenever
+possible. If specified in conjunction with \fB-H\fP or \fB-L\fP, when
+a symbolic link is encountered, the hard link created in
+the destination file hierarchy shall be to the file referenced by
+the symbolic link. If specified when neither \fB-H\fP nor
+\fB-L\fP is specified, when a symbolic link is encountered, the implementation
+shall create a hard link to the symbolic link in
+the source file hierarchy or copy the symbolic link to the destination.
+.TP 7
+\fB-L\fP
+If a symbolic link referencing a file of type directory is specified
+on the command line or encountered during the traversal of
+a file hierarchy, \fIpax\fP shall archive the file hierarchy rooted
+in the file referenced by the link, using the name of the link
+as the root of the file hierarchy. Otherwise, if a symbolic link referencing
+a file of any other file type which \fIpax\fP can
+normally archive is specified on the command line or encountered during
+the traversal of a file hierarchy, \fIpax\fP shall archive
+the file referenced by the link, using the name of the link. The default
+behavior shall be to archive the symbolic link
+itself.
+.TP 7
+\fB-n\fP
+Select the first archive member that matches each \fIpattern\fP operand.
+No more than one archive member shall be matched for
+each pattern (although members of type directory shall still match
+the file hierarchy rooted at that file).
+.TP 7
+\fB-o\ \fP \fIoptions\fP
+Provide information to the implementation to modify the algorithm
+for extracting or writing files. The value of \fIoptions\fP
+shall consist of one or more comma-separated keywords of the form:
+.sp
+.RS
+.nf
+
+\fIkeyword\fP\fB[[\fP\fB:\fP\fB]\fP\fB=\fP\fIvalue\fP\fB][\fP\fB,\fP\fIkeyword\fP\fB[[\fP\fB:\fP\fB]\fP\fB=\fP\fIvalue\fP\fB]\fP\fB, ...\fP\fB]\fP
+.fi
+.RE
+.LP
+Some keywords apply only to certain file formats, as indicated with
+each description. Use of keywords that are inapplicable to
+the file format being processed produces undefined results.
+.LP
+Keywords in the \fIoptions\fP argument shall be a string that would
+be a valid portable filename as described in the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Section 3.276, Portable
+Filename Character Set.
+.TP 7
+\fBNote:\fP
+.RS
+Keywords are not expected to be filenames, merely to follow the same
+character composition rules as portable filenames.
+.RE
+.sp
+.LP
+Keywords can be preceded with white space. The \fIvalue\fP field shall
+consist of zero or more characters; within \fIvalue\fP,
+the application shall precede any literal comma with a backslash,
+which shall be ignored, but preserves the comma as part of
+\fIvalue\fP. A comma as the final character, or a comma followed solely
+by white space as the final characters, in \fIoptions\fP
+shall be ignored. Multiple \fB-o\fP options can be specified; if keywords
+given to these multiple \fB-o\fP options conflict, the
+keywords and values appearing later in command line sequence shall
+take precedence and the earlier shall be silently ignored. The
+following keyword values of \fIoptions\fP shall be supported for the
+file formats as indicated:
+.TP 7
+\fBdelete\fP=\fIpattern\fP
+.RS
+.sp
+(Applicable only to the \fB-x\fP \fBpax\fP format.) When used in \fBwrite\fP
+or \fBcopy\fP mode, \fIpax\fP shall omit from
+extended header records that it produces any keywords matching the
+string pattern. When used in \fBread\fP or \fBlist\fP mode,
+\fIpax\fP shall ignore any keywords matching the string pattern in
+the extended header records. In both cases, matching shall be
+performed using the pattern matching notation described in \fIPatterns
+Matching a Single
+Character\fP and \fIPatterns Matching Multiple Characters\fP . For
+example:
+.sp
+.RS
+.nf
+
+\fB-o\fP \fBdelete\fP\fB=\fP\fIsecurity\fP\fB.*
+\fP
+.fi
+.RE
+.LP
+would suppress security-related information. See pax Extended Header
+for extended header record
+keyword usage.
+.RE
+.TP 7
+\fBexthdr.name\fP=\fIstring\fP
+.RS
+.sp
+(Applicable only to the \fB-x\fP \fBpax\fP format.) This keyword allows
+user control over the name that is written into the
+\fBustar\fP header blocks for the extended header produced under the
+circumstances described in pax
+Header Block . The name shall be the contents of \fIstring\fP, after
+the following character substitutions have been made:
+.TS C
+center; l lw(40).
+\fB\fIstring\fP\fP T{
+.na
+\fB\ \fP
+.ad
+T}
+\fBIncludes:\fP T{
+.na
+\fBReplaced By:\fP
+.ad
+T}
+%d T{
+.na
+The directory name of the file, equivalent to the result of the \fIdirname\fP utility on the translated pathname.
+.ad
+T}
+%f T{
+.na
+The filename of the file, equivalent to the result of the \fIbasename\fP utility on the translated pathname.
+.ad
+T}
+%p T{
+.na
+The process ID of the \fIpax\fP process.
+.ad
+T}
+%% T{
+.na
+A \fB'%'\fP character.
+.ad
+T}
+.TE
+.LP
+Any other \fB'%'\fP characters in \fIstring\fP produce undefined results.
+.LP
+If no \fB-o\fP \fBexthdr.name=\fP \fIstring\fP is specified, \fIpax\fP
+shall use the following default value:
+.sp
+.RS
+.nf
+
+\fB%d/PaxHeaders.%p/%f
+\fP
+.fi
+.RE
+.RE
+.TP 7
+\fBglobexthdr.name\fP=\fIstring\fP
+.RS
+.sp
+(Applicable only to the \fB-x\fP \fBpax\fP format.) When used in \fBwrite\fP
+or \fBcopy\fP mode with the appropriate options,
+\fIpax\fP shall create global extended header records with \fBustar\fP
+header blocks that will be treated as regular files by
+previous versions of \fIpax\fP. This keyword allows user control over
+the name that is written into the \fBustar\fP header blocks
+for global extended header records. The name shall be the contents
+of string, after the following character substitutions have been
+made:
+.TS C
+center; l lw(40).
+\fB\fIstring\fP\fP T{
+.na
+\fB\ \fP
+.ad
+T}
+\fBIncludes:\fP T{
+.na
+\fBReplaced By:\fP
+.ad
+T}
+%n T{
+.na
+An integer that represents the sequence number of the global extended header record in the archive, starting at 1.
+.ad
+T}
+%p T{
+.na
+The process ID of the \fIpax\fP process.
+.ad
+T}
+%% T{
+.na
+A \fB'%'\fP character.
+.ad
+T}
+.TE
+.LP
+Any other \fB'%'\fP characters in \fIstring\fP produce undefined results.
+.LP
+If no \fB-o\fP \fBglobexthdr.name=\fP \fIstring\fP is specified, \fIpax\fP
+shall use the following default value:
+.sp
+.RS
+.nf
+
+\fB$TMPDIR/GlobalHead.%p.%n
+\fP
+.fi
+.RE
+.LP
+where $ \fITMPDIR\fP represents the value of the \fITMPDIR\fP environment
+variable. If \fITMPDIR\fP is not set, \fIpax\fP
+shall use \fB/tmp\fP.
+.RE
+.TP 7
+\fBinvalid\fP=\fIaction\fP
+.RS
+.sp
+(Applicable only to the \fB-x\fP \fBpax\fP format.) This keyword allows
+user control over the action \fIpax\fP takes upon
+encountering values in an extended header record that, in \fBread\fP
+or \fBcopy\fP mode, are invalid in the destination hierarchy
+or, in \fBlist\fP mode, cannot be written in the codeset and current
+locale of the implementation. The following are invalid
+values that shall be recognized by \fIpax\fP:
+.RS
+.IP " *" 3
+In \fBread\fP or \fBcopy\fP mode, a filename or link name that contains
+character encodings invalid in the destination
+hierarchy. (For example, the name may contain embedded NULs.)
+.LP
+.IP " *" 3
+In \fBread\fP or \fBcopy\fP mode, a filename or link name that is
+longer than the maximum allowed in the destination hierarchy
+(for either a pathname component or the entire pathname).
+.LP
+.IP " *" 3
+In \fBlist\fP mode, any character string value (filename, link name,
+user name, and so on) that cannot be written in the
+codeset and current locale of the implementation.
+.LP
+.RE
+.LP
+The following mutually-exclusive values of the \fIaction\fP argument
+are supported:
+.TP 7
+\fBbypass\fP
+.RS
+In \fBread\fP or \fBcopy\fP mode, \fIpax\fP shall bypass the file,
+causing no change to the destination hierarchy. In
+\fBlist\fP mode, \fIpax\fP shall write all requested valid values
+for the file, but its method for writing invalid values is
+unspecified.
+.RE
+.TP 7
+\fBrename\fP
+.RS
+In \fBread\fP or \fBcopy\fP mode, \fIpax\fP shall act as if the \fB-i\fP
+option were in effect for each file with invalid
+filename or link name values, allowing the user to provide a replacement
+name interactively. In \fBlist\fP mode, \fIpax\fP shall
+behave identically to the \fBbypass\fP action.
+.RE
+.TP 7
+\fBUTF-8\fP
+.RS
+When used in \fBread\fP, \fBcopy\fP, or \fBlist\fP mode and a filename,
+link name, owner name, or any other field in an
+extended header record cannot be translated from the \fBpax\fP UTF-8
+codeset format to the codeset and current locale of the
+implementation, \fIpax\fP shall use the actual UTF-8 encoding for
+the name.
+.RE
+.TP 7
+\fBwrite\fP
+.RS
+In \fBread\fP or \fBcopy\fP mode, \fIpax\fP shall write the file,
+translating or truncating the name, regardless of whether
+this may overwrite an existing file with a valid name. In \fBlist\fP
+mode, \fIpax\fP shall behave identically to the
+\fBbypass\fP action.
+.RE
+.sp
+.LP
+If no \fB-o\fP \fBinvalid=\fP option is specified, \fIpax\fP shall
+act as if \fB-o\fP \fBinvalid=\fP \fBbypass\fP were
+specified. Any overwriting of existing files that may be allowed by
+the \fB-o\fP \fBinvalid=\fP actions shall be subject to
+permission ( \fB-p\fP) and modification time ( \fB-u\fP) restrictions,
+and shall be suppressed if the \fB-k\fP option is also
+specified.
+.RE
+.TP 7
+\fBlinkdata\fP
+.RS
+.sp
+(Applicable only to the \fB-x\fP \fBpax\fP format.) In \fBwrite\fP
+mode, \fIpax\fP shall write the contents of a file to the
+archive even when that file is merely a hard link to a file whose
+contents have already been written to the archive.
+.RE
+.TP 7
+\fBlistopt\fP=\fIformat\fP
+.RS
+.sp
+This keyword specifies the output format of the table of contents
+produced when the \fB-v\fP option is specified in \fBlist\fP
+mode. See List Mode Format Specifications . To avoid ambiguity, the
+\fBlistopt=\fP \fIformat\fP
+shall be the only or final \fBkeyword=\fP \fIvalue\fP pair in a \fB-o\fP
+option-argument; all characters in the remainder of the
+option-argument shall be considered part of the format string. When
+multiple \fB-o\fP \fBlistopt=\fP \fIformat\fP options are
+specified, the format strings shall be considered a single, concatenated
+string, evaluated in command line order.
+.RE
+.TP 7
+\fBtimes\fP
+.RS
+.sp
+(Applicable only to the \fB-x\fP \fIpax\fP format.) When used in \fBwrite\fP
+or \fBcopy\fP mode, \fIpax\fP shall include
+\fBatime\fP, \fBctime\fP, and \fBmtime\fP extended header records
+for each file. See pax Extended
+Header File Times .
+.RE
+.sp
+.LP
+In addition to these keywords, if the \fB-x\fP \fIpax\fP format is
+specified, any of the keywords and values defined in pax Extended
+Header, including implementation extensions, can be used in \fB-o\fP
+option-arguments,
+in either of two modes:
+.TP 7
+\fBkeyword\fP=\fIvalue\fP
+.RS
+.sp
+When used in \fBwrite\fP or \fBcopy\fP mode, these keyword/value pairs
+shall be included at the beginning of the archive as
+\fBtypeflag\fP \fBg\fP global extended header records. When used in
+\fBread\fP or \fBlist\fP mode, these keyword/value pairs
+shall act as if they had been at the beginning of the archive as \fBtypeflag\fP
+\fBg\fP global extended header records.
+.RE
+.TP 7
+\fBkeyword\fP:=\fIvalue\fP
+.RS
+.sp
+When used in \fBwrite\fP or \fBcopy\fP mode, these keyword/value pairs
+shall be included as records at the beginning of a
+\fBtypeflag\fP \fBx\fP extended header for each file. (This shall
+be equivalent to the equal-sign form except that it creates no
+\fBtypeflag\fP \fBg\fP global extended header records.) When used
+in \fBread\fP or \fBlist\fP mode, these keyword/value pairs
+shall act as if they were included as records at the end of each extended
+header; thus, they shall override any global or
+file-specific extended header record keywords of the same names. For
+example, in the command:
+.sp
+.RS
+.nf
+
+\fBpax -r -o "
+gname:=mygroup,
+" <archive
+\fP
+.fi
+.RE
+.LP
+the group name will be forced to a new value for all files read from
+the archive.
+.RE
+.sp
+.LP
+The precedence of \fB-o\fP keywords over various fields in the archive
+is described in pax Extended
+Header Keyword Precedence .
+.TP 7
+\fB-p\ \fP \fIstring\fP
+Specify one or more file characteristic options (privileges). The
+\fIstring\fP option-argument shall be a string specifying
+file characteristics to be retained or discarded on extraction. The
+string shall consist of the specification characters \fBa\fP,
+\fBe\fP, \fBm\fP, \fBo\fP, and \fBp\fP . Other implementation-defined
+characters can be included. Multiple
+characteristics can be concatenated within the same string and multiple
+\fB-p\fP options can be specified. The meaning of the
+specification characters are as follows:
+.TP 7
+\fBa\fP
+.RS
+Do not preserve file access times.
+.RE
+.TP 7
+\fBe\fP
+.RS
+Preserve the user ID, group ID, file mode bits (see the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Section 3.168, File Mode Bits),
+access time, modification time, and any other
+implementation-defined file characteristics.
+.RE
+.TP 7
+\fBm\fP
+.RS
+Do not preserve file modification times.
+.RE
+.TP 7
+\fBo\fP
+.RS
+Preserve the user ID and group ID.
+.RE
+.TP 7
+\fBp\fP
+.RS
+Preserve the file mode bits. Other implementation-defined file mode
+attributes may be preserved.
+.RE
+.sp
+.LP
+In the preceding list, "preserve" indicates that an attribute stored
+in the archive shall be given to the extracted file,
+subject to the permissions of the invoking process. The access and
+modification times of the file shall be preserved unless
+otherwise specified with the \fB-p\fP option or not stored in the
+archive. All attributes that are not preserved shall be
+determined as part of the normal file creation action (see \fIFile
+Read, Write, and
+Creation\fP ).
+.LP
+If neither the \fBe\fP nor the \fBo\fP specification character is
+specified, or the user ID and group ID are not preserved
+for any reason, \fIpax\fP shall not set the S_ISUID and S_ISGID bits
+of the file mode.
+.LP
+If the preservation of any of these items fails for any reason, \fIpax\fP
+shall write a diagnostic message to standard error.
+Failure to preserve these items shall affect the final exit status,
+but shall not cause the extracted file to be deleted.
+.LP
+If file characteristic letters in any of the \fIstring\fP option-arguments
+are duplicated or conflict with each other, the ones
+given last shall take precedence. For example, if \fB-p\fP \fBeme\fP
+is specified, file modification times are preserved.
+.TP 7
+\fB-s\ \fP \fIreplstr\fP
+Modify file or archive member names named by \fIpattern\fP or \fIfile\fP
+operands according to the substitution expression
+\fIreplstr\fP, using the syntax of the \fIed\fP utility. The concepts
+of "address" and
+"line" are meaningless in the context of the \fIpax\fP utility, and
+shall not be supplied. The format shall be:
+.sp
+.RS
+.nf
+
+\fB-s /\fP\fIold\fP\fB/\fP\fInew\fP\fB/\fP\fB[\fP\fBgp\fP\fB]\fP
+.fi
+.RE
+.LP
+where as in \fIed\fP, \fIold\fP is a basic regular expression and
+\fInew\fP can contain an
+ampersand, \fB'\\n'\fP (where \fIn\fP is a digit) backreferences,
+or subexpression matching. The \fIold\fP string shall also be
+permitted to contain <newline>s.
+.LP
+Any non-null character can be used as a delimiter ( \fB'/'\fP shown
+here). Multiple \fB-s\fP expressions can be specified;
+the expressions shall be applied in the order specified, terminating
+with the first successful substitution. The optional trailing
+\fB'g'\fP is as defined in the \fIed\fP utility. The optional trailing
+\fB'p'\fP shall
+cause successful substitutions to be written to standard error. File
+or archive member names that substitute to the empty string
+shall be ignored when reading and writing archives.
+.TP 7
+\fB-t\fP
+When reading files from the file system, and if the user has the permissions
+required by \fIutime\fP() to do so, set the access time of each file
+read to the access time that it had before
+being read by \fIpax\fP.
+.TP 7
+\fB-u\fP
+Ignore files that are older (having a less recent file modification
+time) than a pre-existing file or archive member with the
+same name. In \fBread\fP mode, an archive member with the same name
+as a file in the file system shall be extracted if the archive
+member is newer than the file. In \fBwrite\fP mode, an archive file
+member with the same name as a file in the file system shall
+be superseded if the file is newer than the archive member. If \fB-a\fP
+is also specified, this is accomplished by appending to
+the archive; otherwise, it is unspecified whether this is accomplished
+by actual replacement in the archive or by appending to the
+archive. In \fBcopy\fP mode, the file in the destination hierarchy
+shall be replaced by the file in the source hierarchy or by a
+link to the file in the source hierarchy if the file in the source
+hierarchy is newer.
+.TP 7
+\fB-v\fP
+In \fBlist\fP mode, produce a verbose table of contents (see the STDOUT
+section). Otherwise, write archive member pathnames to
+standard error (see the STDERR section).
+.TP 7
+\fB-x\ \fP \fIformat\fP
+Specify the output archive format. The \fIpax\fP utility shall support
+the following formats:
+.TP 7
+\fBcpio\fP
+.RS
+The \fBcpio\fP interchange format; see the EXTENDED DESCRIPTION section.
+The default \fIblocksize\fP for this format for
+character special archive files shall be 5120. Implementations shall
+support all \fIblocksize\fP values less than or equal to
+32256 that are multiples of 512.
+.RE
+.TP 7
+\fBpax\fP
+.RS
+The \fBpax\fP interchange format; see the EXTENDED DESCRIPTION section.
+The default \fIblocksize\fP for this format for
+character special archive files shall be 5120. Implementations shall
+support all \fIblocksize\fP values less than or equal to
+32256 that are multiples of 512.
+.RE
+.TP 7
+\fBustar\fP
+.RS
+The \fBtar\fP interchange format; see the EXTENDED DESCRIPTION section.
+The default \fIblocksize\fP for this format for
+character special archive files shall be 10240. Implementations shall
+support all \fIblocksize\fP values less than or equal to
+32256 that are multiples of 512.
+.RE
+.sp
+.LP
+Implementation-defined formats shall specify a default block size
+as well as any other block sizes supported for character
+special archive files.
+.LP
+Any attempt to append to an archive file in a format different from
+the existing archive format shall cause \fIpax\fP to exit
+immediately with a non-zero exit status.
+.LP
+In \fBcopy\fP mode, if no \fB-x\fP format is specified, \fIpax\fP
+shall behave as if \fB-x\fP \fIpax\fP were specified.
+.TP 7
+\fB-X\fP
+When traversing the file hierarchy specified by a pathname, \fIpax\fP
+shall not descend into directories that have a different
+device ID ( \fIst_dev\fP; see the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+\fIstat\fP()).
+.sp
+.LP
+The options that operate on the names of files or archive members
+( \fB-c\fP, \fB-i\fP, \fB-n\fP, \fB-s\fP, \fB-u\fP, and
+\fB-v\fP) shall interact as follows. In \fBread\fP mode, the archive
+members shall be selected based on the user-specified
+\fIpattern\fP operands as modified by the \fB-c\fP, \fB-n\fP, and
+\fB-u\fP options. Then, any \fB-s\fP and \fB-i\fP options
+shall modify, in that order, the names of the selected files. The
+\fB-v\fP option shall write names resulting from these
+modifications.
+.LP
+In \fBwrite\fP mode, the files shall be selected based on the user-specified
+pathnames as modified by the \fB-n\fP and
+\fB-u\fP options. Then, any \fB-s\fP and \fB-i\fP options shall modify,
+in that order, the names of these selected files. The
+\fB-v\fP option shall write names resulting from these modifications.
+.LP
+If both the \fB-u\fP and \fB-n\fP options are specified, \fIpax\fP
+shall not consider a file selected unless it is newer than
+the file to which it is compared.
+.SS List Mode Format Specifications
+.LP
+In \fBlist\fP mode with the \fB-o\fP \fBlistopt=\fP \fIformat\fP option,
+the \fIformat\fP argument shall be applied for
+each selected file. The \fIpax\fP utility shall append a <newline>
+to the \fBlistopt\fP output for each selected file. The
+\fIformat\fP argument shall be used as the \fIformat\fP string described
+in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 5, File Format Notation, with the
+exceptions 1.
+through 5. defined in the EXTENDED DESCRIPTION section of \fIprintf\fP,
+plus the following
+exceptions:
+.TP 7
+6.
+The sequence ( \fIkeyword\fP) can occur before a format conversion
+specifier. The conversion argument is defined by the value
+of \fIkeyword\fP. The implementation shall support the following keywords:
+.RS
+.IP " *" 3
+Any of the Field Name entries in ustar Header Block and Octet-Oriented
+cpio
+Archive Entry . The implementation may support the \fIcpio\fP keywords
+without the leading \fBc_\fP in addition to the form
+required by Values for cpio c_mode Field .
+.LP
+.IP " *" 3
+Any keyword defined for the extended header in pax Extended Header
+\&.
+.LP
+.IP " *" 3
+Any keyword provided as an implementation-defined extension within
+the extended header defined in pax Extended Header .
+.LP
+.RE
+.LP
+For example, the sequence \fB"%(charset)s"\fP is the string value
+of the name of the character set in the extended
+header.
+.LP
+The result of the keyword conversion argument shall be the value from
+the applicable header field or extended header, without
+any trailing NULs.
+.LP
+All keyword values used as conversion arguments shall be translated
+from the UTF-8 encoding to the character set appropriate for
+the local file system, user database, and so on, as applicable.
+.TP 7
+7.
+An additional conversion specifier character, \fBT\fP, shall be used
+to specify time formats. The \fBT\fP conversion
+specifier character can be preceded by the sequence ( \fIkeyword=\fP
+\fIsubformat\fP), where \fIsubformat\fP is a date format as
+defined by \fIdate\fP operands. The default \fIkeyword\fP shall be
+\fBmtime\fP and the
+default subformat shall be:
+.sp
+.RS
+.nf
+
+\fB%b %e %H:%M %Y
+\fP
+.fi
+.RE
+.TP 7
+8.
+An additional conversion specifier character, \fBM\fP, shall be used
+to specify the file mode string as defined in \fIls\fP Standard Output.
+If ( \fIkeyword\fP) is omitted, the \fBmode\fP keyword shall be used.
+For
+example, \fB%.1M\fP writes the single character corresponding to the
+<\fIentry\ type\fP> field of the \fIls\fP \fB-l\fP command.
+.TP 7
+9.
+An additional conversion specifier character, \fBD\fP, shall be used
+to specify the device for block or special files, if
+applicable, in an implementation-defined format. If not applicable,
+and ( \fIkeyword\fP) is specified, then this conversion shall
+be equivalent to \fB%(\fP\fIkeyword\fP\fB)u\fP. If not applicable,
+and ( \fIkeyword\fP) is omitted, then this conversion
+shall be equivalent to <space>.
+.TP 7
+10.
+An additional conversion specifier character, \fBF\fP, shall be used
+to specify a pathname. The \fBF\fP conversion
+character can be preceded by a sequence of comma-separated keywords:
+.sp
+.RS
+.nf
+
+\fB(\fP\fIkeyword\fP\fB[\fP\fB,\fP\fIkeyword\fP\fB]\fP \fB... )
+\fP
+.fi
+.RE
+.LP
+The values for all the keywords that are non-null shall be concatenated
+together, each separated by a \fB'/'\fP . The default
+shall be ( \fBpath\fP) if the keyword \fBpath\fP is defined; otherwise,
+the default shall be ( \fBprefix\fP, \fBname\fP).
+.TP 7
+11.
+An additional conversion specifier character, \fBL\fP, shall be used
+to specify a symbolic line expansion. If the current
+file is a symbolic link, then \fB%L\fP shall expand to:
+.sp
+.RS
+.nf
+
+\fB"%s -> %s", <\fP\fIvalue of keyword\fP\fB>, <\fP\fIcontents of link\fP\fB>
+\fP
+.fi
+.RE
+.LP
+Otherwise, the \fB%L\fP conversion specification shall be the equivalent
+of \fB%F\fP .
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIdirectory\fP
+The destination directory pathname for \fBcopy\fP mode.
+.TP 7
+\fIfile\fP
+A pathname of a file to be copied or archived.
+.TP 7
+\fIpattern\fP
+A pattern matching one or more pathnames of archive members. A pattern
+must be given in the name-generating notation of the
+pattern matching notation in \fIPattern Matching Notation\fP, including
+the filename
+expansion rules in \fIPatterns Used for Filename Expansion\fP . The
+default, if no
+\fIpattern\fP is specified, is to select all members in the archive.
+.sp
+.SH STDIN
+.LP
+In \fBwrite\fP mode, the standard input shall be used only if no \fIfile\fP
+operands are specified. It shall be a text file
+containing a list of pathnames, one per line, without leading or trailing
+<blank>s.
+.LP
+In \fBlist\fP and \fBread\fP modes, if \fB-f\fP is not specified,
+the standard input shall be an archive file.
+.LP
+Otherwise, the standard input shall not be used.
+.SH INPUT FILES
+.LP
+The input file named by the \fIarchive\fP option-argument, or standard
+input when the archive is read from there, shall be a
+file formatted according to one of the specifications in the EXTENDED
+DESCRIPTION section or some other implementation-defined
+format.
+.LP
+The file \fB/dev/tty\fP shall be used to write prompts and read responses.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIpax\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_COLLATE\fP
+.sp
+Determine the locale for the behavior of ranges, equivalence classes,
+and multi-character collating elements used in the pattern
+matching expressions for the \fIpattern\fP operand, the basic regular
+expression for the \fB-s\fP option, and the extended
+regular expression defined for the \fByesexpr\fP locale keyword in
+the \fILC_MESSAGES\fP category.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files), the
+behavior of character classes used in the extended regular
+expression defined for the \fByesexpr\fP locale keyword in the \fILC_MESSAGES\fP
+category, and pattern matching.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale for the processing of affirmative responses that
+should be used to affect the format and contents of
+diagnostic messages written to standard error.
+.TP 7
+\fILC_TIME\fP
+Determine the format and contents of date and time strings when the
+\fB-v\fP option is specified.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fITMPDIR\fP
+Determine the pathname that provides part of the default global extended
+header record file, as described for the \fB-o\fP
+\fBglobexthdr=\fP keyword in the OPTIONS section.
+.TP 7
+\fITZ\fP
+Determine the timezone used to calculate date and time strings when
+the \fB-v\fP option is specified. If \fITZ\fP is unset or
+null, an unspecified default timezone shall be used.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+In \fBwrite\fP mode, if \fB-f\fP is not specified, the standard output
+shall be the archive formatted according to one of the
+specifications in the EXTENDED DESCRIPTION section, or some other
+implementation-defined format (see \fB-x\fP \fIformat\fP).
+.LP
+In \fBlist\fP mode, when the \fB-o\fP \fBlistopt\fP= \fIformat\fP
+has been specified, the selected archive members shall be
+written to standard output using the format described under List Mode
+Format Specifications . In
+\fBlist\fP mode without the \fB-o\fP \fBlistopt\fP= \fIformat\fP option,
+the table of contents of the selected archive members
+shall be written to standard output using the following format:
+.sp
+.RS
+.nf
+
+\fB"%s\\n", <\fP\fIpathname\fP\fB>
+\fP
+.fi
+.RE
+.LP
+If the \fB-v\fP option is specified in \fBlist\fP mode, the table
+of contents of the selected archive members shall be written
+to standard output using the following formats.
+.LP
+For pathnames representing hard links to previous members of the archive:
+.sp
+.RS
+.nf
+
+\fB"%s == %s\\n", <\fP\fIls\fP \fB-l\fP \fIlisting\fP\fB>, <\fP\fIlinkname\fP\fB>
+\fP
+.fi
+.RE
+.LP
+For all other pathnames:
+.sp
+.RS
+.nf
+
+\fB"%s\\n", <\fP\fIls\fP \fB-l\fP \fIlisting\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where <\fIls\ \fP -l\ \fIlisting\fP> shall be the format specified
+by the \fIls\fP utility with the \fB-l\fP option. When writing pathnames
+in this format, it is unspecified
+what is written for fields for which the underlying archive format
+does not have the correct information, although the correct
+number of <blank>-separated fields shall be written.
+.LP
+In \fBlist\fP mode, standard output shall not be buffered more than
+a line at a time.
+.SH STDERR
+.LP
+If \fB-v\fP is specified in \fBread\fP, \fBwrite\fP, or \fBcopy\fP
+modes, \fIpax\fP shall write the pathnames it processes
+to the standard error output using the following format:
+.sp
+.RS
+.nf
+
+\fB"%s\\n", <\fP\fIpathname\fP\fB>
+\fP
+.fi
+.RE
+.LP
+These pathnames shall be written as soon as processing is begun on
+the file or archive member, and shall be flushed to standard
+error. The trailing <newline>, which shall not be buffered, is written
+when the file has been read or written.
+.LP
+If the \fB-s\fP option is specified, and the replacement string has
+a trailing \fB'p'\fP, substitutions shall be written to
+standard error in the following format:
+.sp
+.RS
+.nf
+
+\fB"%s >> %s\\n", <\fP\fIoriginal pathname\fP\fB>, <\fP\fInew pathname\fP\fB>
+\fP
+.fi
+.RE
+.LP
+In all operating modes of \fIpax\fP, optional messages of unspecified
+format concerning the input archive format and volume
+number, the number of files, blocks, volumes, and media parts as well
+as other diagnostic messages may be written to standard
+error.
+.LP
+In all formats, for both standard output and standard error, it is
+unspecified how non-printable characters in pathnames or link
+names are written.
+.LP
+When \fIpax\fP is in \fBread\fP mode or \fBlist\fP mode, using the
+\fB-x\fP \fBpax\fP archive format, and a filename, link
+name, owner name, or any other field in an extended header record
+cannot be translated from the \fBpax\fP UTF-8 codeset format to
+the codeset and current locale of the implementation, \fIpax\fP shall
+write a diagnostic message to standard error, shall process
+the file as described for the \fB-o\fP \fBinvalid=\fP option, and
+then shall process the next file in the archive.
+.SH OUTPUT FILES
+.LP
+In \fBread\fP mode, the extracted output files shall be of the archived
+file type. In \fBcopy\fP mode, the copied output files
+shall be the type of the file being copied. In either mode, existing
+files in the destination hierarchy shall be overwritten only
+when all permission ( \fB-p\fP), modification time ( \fB-u\fP), and
+invalid-value ( \fB-o\fP \fBinvalid\fP=) tests allow
+it.
+.LP
+In \fBwrite\fP mode, the output file named by the \fB-f\fP option-argument
+shall be a file formatted according to one of the
+specifications in the EXTENDED DESCRIPTION section, or some other
+implementation-defined format.
+.SH EXTENDED DESCRIPTION
+.SS pax Interchange Format
+.LP
+A \fIpax\fP archive tape or file produced in the \fB-x\fP \fBpax\fP
+format shall contain a series of blocks. The physical
+layout of the archive shall be identical to the \fBustar\fP format
+described in ustar Interchange
+Format . Each file archived shall be represented by the following
+sequence:
+.IP " *" 3
+An optional header block with extended header records. This header
+block is of the form described in pax Header Block, with a \fItypeflag\fP
+value of \fBx\fP or \fBg\fP. The extended header records,
+described in pax Extended Header, shall be included as the data for
+this header block.
+.LP
+.IP " *" 3
+A header block that describes the file. Any fields in the preceding
+optional extended header shall override the associated
+fields in this header block for this file.
+.LP
+.IP " *" 3
+Zero or more blocks that contain the contents of the file.
+.LP
+.LP
+At the end of the archive file there shall be two 512-byte blocks
+filled with binary zeros, interpreted as an end-of-archive
+indicator.
+.LP
+A schematic of an example archive with global extended header records
+and two actual files is shown in pax
+Format Archive Example . In the example, the second file in the archive
+has no extended header preceding it, presumably because
+it has no need for extended attributes.
+.TP 7
+.sp
+.sp
+.ce 1
+\fBFigure: pax Format Archive Example\fP
+.SS pax Header Block
+.LP
+The \fBpax\fP header block shall be identical to the \fBustar\fP header
+block described in ustar
+Interchange Format, except that two additional \fItypeflag\fP values
+are defined:
+.TP 7
+\fBx\fP
+Represents extended header records for the following file in the archive
+(which shall have its own \fBustar\fP header block).
+The format of these extended header records shall be as described
+in pax Extended Header .
+.TP 7
+\fBg\fP
+Represents global extended header records for the following files
+in the archive. The format of these extended header records
+shall be as described in pax Extended Header . Each value shall affect
+all subsequent files that do
+not override that value in their own extended header record and until
+another global extended header record is reached that
+provides another value for the same field. The \fItypeflag\fP \fBg\fP
+global headers should not be used with interchange media
+that could suffer partial data loss in transporting the archive.
+.sp
+.LP
+For both of these types, the \fIsize\fP field shall be the size of
+the extended header records in octets. The other fields in
+the header block are not meaningful to this version of the \fIpax\fP
+utility. However, if this archive is read by a \fIpax\fP
+utility conforming to the ISO\ POSIX-2:1993 standard, the header block
+fields are used to create a regular file that contains
+the extended header records as data. Therefore, header block field
+values should be selected to provide reasonable file access to
+this regular file.
+.LP
+A further difference from the \fBustar\fP header block is that data
+blocks for files of \fItypeflag\fP 1 (the digit one) (hard
+link) may be included, which means that the size field may be greater
+than zero. Archives created by \fIpax\fP \fB-o\fP
+\fBlinkdata\fP shall include these data blocks with the hard links.
+.SS pax Extended Header
+.LP
+A \fBpax\fP extended header contains values that are inappropriate
+for the \fBustar\fP header block because of limitations in
+that format: fields requiring a character encoding other than that
+described in the ISO/IEC\ 646:1991 standard, fields
+representing file attributes not described in the \fBustar\fP header,
+and fields whose format or length do not fit the
+requirements of the \fBustar\fP header. The values in an extended
+header add attributes to the following file (or files; see the
+description of the \fItypeflag\fP \fBg\fP header block) or override
+values in the following header block(s), as indicated in the
+following list of keywords.
+.LP
+An extended header shall consist of one or more records, each constructed
+as follows:
+.sp
+.RS
+.nf
+
+\fB"%d %s=%s\\n", <\fP\fIlength\fP\fB>, <\fP\fIkeyword\fP\fB>, <\fP\fIvalue\fP\fB>
+\fP
+.fi
+.RE
+.LP
+The extended header records shall be encoded according to the ISO/IEC\ 10646-1:2000
+standard (UTF-8). The
+<\fIlength\fP> field, <blank>, equals sign, and <newline> shown shall
+be limited to the portable character set,
+as encoded in UTF-8. The <\fIkeyword\fP> and <\fIvalue\fP> fields
+can be any UTF-8 characters. The
+<\fIlength\fP> field shall be the decimal length of the extended header
+record in octets, including the trailing
+<newline>.
+.LP
+The <\fIkeyword\fP> field shall be one of the entries from the following
+list or a keyword provided as an implementation
+extension. Keywords consisting entirely of lowercase letters, digits,
+and periods are reserved for future standardization. A
+keyword shall not include an equals sign. (In the following list,
+the notations "file(s)" or "block(s)" is used to acknowledge
+that a keyword affects the following single file after a \fItypeflag\fP
+\fBx\fP extended header, but possibly multiple files
+after \fItypeflag\fP \fBg\fP. Any requirements in the list for \fIpax\fP
+to include a record when in \fBwrite\fP or \fBcopy\fP
+mode shall apply only when such a record has not already been provided
+through the use of the \fB-o\fP option. When used in
+\fBcopy\fP mode, \fIpax\fP shall behave as if an archive had been
+created with applicable extended header records and then
+extracted.)
+.TP 7
+\fBatime\fP
+The file access time for the following file(s), equivalent to the
+value of the \fIst_atime\fP member of the \fBstat\fP
+structure for a file, as described by the \fIstat\fP() function. The
+access time shall be
+restored if the process has the appropriate privilege required to
+do so. The format of the <\fIvalue\fP> shall be as
+described in pax Extended Header File Times .
+.TP 7
+\fBcharset\fP
+The name of the character set used to encode the data in the following
+file(s). The entries in the following table are defined
+to refer to known standards; additional names may be agreed on between
+the originator and recipient.
+.TS C
+center; l2 l.
+\fB<value>\fP \fBFormal Standard\fP
+ISO-IR 646 1990 ISO/IEC 646:1990
+ISO-IR 8859 1 1998 ISO/IEC 8859-1:1998
+ISO-IR 8859 2 1999 ISO/IEC 8859-2:1999
+ISO-IR 8859 3 1999 ISO/IEC 8859-3:1999
+ISO-IR 8859 4 1998 ISO/IEC 8859-4:1998
+ISO-IR 8859 5 1999 ISO/IEC 8859-5:1999
+ISO-IR 8859 6 1999 ISO/IEC 8859-6:1999
+ISO-IR 8859 7 1987 ISO/IEC 8859-7:1987
+ISO-IR 8859 8 1999 ISO/IEC 8859-8:1999
+ISO-IR 8859 9 1999 ISO/IEC 8859-9:1999
+ISO-IR 8859 10 1998 ISO/IEC 8859-10:1998
+ISO-IR 8859 13 1998 ISO/IEC 8859-13:1998
+ISO-IR 8859 14 1998 ISO/IEC 8859-14:1998
+ISO-IR 8859 15 1999 ISO/IEC 8859-15:1999
+ISO-IR 10646 2000 ISO/IEC 10646:2000
+ISO-IR 10646 2000 UTF-8 ISO/IEC 10646, UTF-8 encoding
+BINARY None.
+.TE
+.LP
+The encoding is included in an extended header for information only;
+when \fIpax\fP is used as described in
+IEEE\ Std\ 1003.1-2001, it shall not translate the file data into
+any other encoding. The \fBBINARY\fP entry indicates
+unencoded binary data.
+.LP
+When used in \fBwrite\fP or \fBcopy\fP mode, it is implementation-defined
+whether \fIpax\fP includes a \fBcharset\fP
+extended header record for a file.
+.TP 7
+\fBcomment\fP
+A series of characters used as a comment. All characters in the <\fIvalue\fP>
+field shall be ignored by \fIpax\fP.
+.TP 7
+\fBctime\fP
+The file creation time for the following file(s), equivalent to the
+value of the \fIst_ctime\fP member of the \fBstat\fP
+structure for a file, as described by the \fIstat\fP() function. The
+creation time shall be
+restored if the process has the appropriate privilege required to
+do so. The format of the <\fIvalue\fP> shall be as
+described in pax Extended Header File Times .
+.TP 7
+\fBgid\fP
+The group ID of the group that owns the file, expressed as a decimal
+number using digits from the ISO/IEC\ 646:1991
+standard. This record shall override the \fIgid\fP field in the following
+header block(s). When used in \fBwrite\fP or
+\fBcopy\fP mode, \fIpax\fP shall include a \fIgid\fP extended header
+record for each file whose group ID is greater than 2097151
+(octal 7777777).
+.TP 7
+\fBgname\fP
+The group of the file(s), formatted as a group name in the group database.
+This record shall override the \fIgid\fP and
+\fIgname\fP fields in the following header block(s), and any \fIgid\fP
+extended header record. When used in \fBread\fP,
+\fBcopy\fP, or \fBlist\fP mode, \fIpax\fP shall translate the name
+from the UTF-8 encoding in the header record to the character
+set appropriate for the group database on the receiving system. If
+any of the UTF-8 characters cannot be translated, and if the
+\fB-o\fP \fBinvalid=\fP UTF-8 option is not specified, the results
+are implementation-defined. When used in \fBwrite\fP or
+\fBcopy\fP mode, \fIpax\fP shall include a \fBgname\fP extended header
+record for each file whose group name cannot be
+represented entirely with the letters and digits of the portable character
+set.
+.TP 7
+\fBlinkpath\fP
+The pathname of a link being created to another file, of any type,
+previously archived. This record shall override the
+\fIlinkname\fP field in the following \fBustar\fP header block(s).
+The following \fBustar\fP header block shall determine the
+type of link created. If \fItypeflag\fP of the following header block
+is 1, it shall be a hard link. If \fItypeflag\fP is 2, it
+shall be a symbolic link and the \fBlinkpath\fP value shall be the
+contents of the symbolic link. The \fIpax\fP utility shall
+translate the name of the link (contents of the symbolic link) from
+the UTF-8 encoding to the character set appropriate for the
+local file system. When used in \fBwrite\fP or \fBcopy\fP mode, \fIpax\fP
+shall include a \fBlinkpath\fP extended header record
+for each link whose pathname cannot be represented entirely with the
+members of the portable character set other than NUL.
+.TP 7
+\fBmtime\fP
+The file modification time of the following file(s), equivalent to
+the value of the \fIst_mtime\fP member of the \fBstat\fP
+structure for a file, as described in the \fIstat\fP() function. This
+record shall override
+the \fImtime\fP field in the following header block(s). The modification
+time shall be restored if the process has the appropriate
+privilege required to do so. The format of the <\fIvalue\fP> shall
+be as described in pax
+Extended Header File Times .
+.TP 7
+\fBpath\fP
+The pathname of the following file(s). This record shall override
+the \fIname\fP and \fIprefix\fP fields in the following
+header block(s). The \fIpax\fP utility shall translate the pathname
+of the file from the UTF-8 encoding to the character set
+appropriate for the local file system.
+.LP
+When used in \fBwrite\fP or \fBcopy\fP mode, \fIpax\fP shall include
+a \fIpath\fP extended header record for each file whose
+pathname cannot be represented entirely with the members of the portable
+character set other than NUL.
+.TP 7
+\fBrealtime.\fP\fIany\fP
+The keywords prefixed by "realtime." are reserved for future standardization.
+.TP 7
+\fBsecurity.\fP\fIany\fP
+The keywords prefixed by "security." are reserved for future standardization.
+.TP 7
+\fBsize\fP
+The size of the file in octets, expressed as a decimal number using
+digits from the ISO/IEC\ 646:1991 standard. This record
+shall override the \fIsize\fP field in the following header block(s).
+When used in \fBwrite\fP or \fBcopy\fP mode, \fIpax\fP
+shall include a \fIsize\fP extended header record for each file with
+a size value greater than 8589934591 (octal
+77777777777).
+.TP 7
+\fBuid\fP
+The user ID of the file owner, expressed as a decimal number using
+digits from the ISO/IEC\ 646:1991 standard. This record
+shall override the \fIuid\fP field in the following header block(s).
+When used in \fBwrite\fP or \fBcopy\fP mode, \fIpax\fP
+shall include a \fIuid\fP extended header record for each file whose
+owner ID is greater than 2097151 (octal 7777777).
+.TP 7
+\fBuname\fP
+The owner of the following file(s), formatted as a user name in the
+user database. This record shall override the \fIuid\fP
+and \fIuname\fP fields in the following header block(s), and any \fIuid\fP
+extended header record. When used in \fBread\fP,
+\fBcopy\fP, or \fBlist\fP mode, \fIpax\fP shall translate the name
+from the UTF-8 encoding in the header record to the character
+set appropriate for the user database on the receiving system. If
+any of the UTF-8 characters cannot be translated, and if the
+\fB-o\fP \fBinvalid=\fP UTF-8 option is not specified, the results
+are implementation-defined. When used in \fBwrite\fP or
+\fBcopy\fP mode, \fIpax\fP shall include a \fBuname\fP extended header
+record for each file whose user name cannot be
+represented entirely with the letters and digits of the portable character
+set.
+.sp
+.LP
+If the <\fIvalue\fP> field is zero length, it shall delete any header
+block field, previously entered extended header
+value, or global extended header value of the same name.
+.LP
+If a keyword in an extended header record (or in a \fB-o\fP option-argument)
+overrides or deletes a corresponding field in the
+\fBustar\fP header block, \fIpax\fP shall ignore the contents of that
+header block field.
+.LP
+Unlike the \fBustar\fP header block fields, NULs shall not delimit
+<\fIvalue\fP>s; all characters within the
+<\fIvalue\fP> field shall be considered data for the field. None of
+the length limitations of the \fBustar\fP header block
+fields in ustar Header Block shall apply to the extended header records.
+.SS pax Extended Header Keyword Precedence
+.LP
+This section describes the precedence in which the various header
+records and fields and command line options are selected to
+apply to a file in the archive. When \fIpax\fP is used in \fBread\fP
+or \fBlist\fP modes, it shall determine a file attribute in
+the following sequence:
+.IP " 1." 4
+If \fB-o\fP \fBdelete=\fP \fIkeyword-prefix\fP is used, the affected
+attributes shall be determined from step 7., if
+applicable, or ignored otherwise.
+.LP
+.IP " 2." 4
+If \fB-o\fP \fIkeyword\fP:= is used, the affected attributes shall
+be ignored.
+.LP
+.IP " 3." 4
+If \fB-o\fP \fIkeyword\fP \fB:=\fP \fIvalue\fP is used, the affected
+attribute shall be assigned the value.
+.LP
+.IP " 4." 4
+If there is a \fItypeflag\fP \fBx\fP extended header record, the affected
+attribute shall be assigned the
+<\fIvalue\fP>. When extended header records conflict, the last one
+given in the header shall take precedence.
+.LP
+.IP " 5." 4
+If \fB-o\fP \fIkeyword\fP \fB=\fP \fIvalue\fP is used, the affected
+attribute shall be assigned the value.
+.LP
+.IP " 6." 4
+If there is a \fItypeflag\fP \fBg\fP global extended header record,
+the affected attribute shall be assigned the
+<\fIvalue\fP>. When global extended header records conflict, the last
+one given in the global header shall take
+precedence.
+.LP
+.IP " 7." 4
+Otherwise, the attribute shall be determined from the \fBustar\fP
+header block.
+.LP
+.SS pax Extended Header File Times
+.LP
+The \fIpax\fP utility shall write an \fBmtime\fP record for each file
+in \fBwrite\fP or \fBcopy\fP modes if the file's
+modification time cannot be represented exactly in the \fBustar\fP
+header logical record described in ustar Interchange Format . This
+can occur if the time is out of \fBustar\fP range, or if the file
+system
+of the underlying implementation supports non-integer time granularities
+and the time is not an integer. All of these time records
+shall be formatted as a decimal representation of the time in seconds
+since the Epoch. If a period ( \fB'.'\fP ) decimal point
+character is present, the digits to the right of the point shall represent
+the units of a subsecond timing granularity, where the
+first digit is tenths of a second and each subsequent digit is a tenth
+of the previous digit. In \fBread\fP or \fBcopy\fP mode,
+the \fIpax\fP utility shall truncate the time of a file to the greatest
+value that is not greater than the input header file time.
+In \fBwrite\fP or \fBcopy\fP mode, the \fIpax\fP utility shall output
+a time exactly if it can be represented exactly as a
+decimal number, and otherwise shall generate only enough digits so
+that the same time shall be recovered if the file is extracted
+on a system whose underlying implementation supports the same time
+granularity.
+.SS ustar Interchange Format
+.LP
+A \fBustar\fP archive tape or file shall contain a series of logical
+records. Each logical record shall be a fixed-size logical
+record of 512 octets (see below). Although this format may be thought
+of as being stored on 9-track industry-standard 12.7 mm (0.5
+in) magnetic tape, other types of transportable media are not excluded.
+Each file archived shall be represented by a header logical
+record that describes the file, followed by zero or more logical records
+that give the contents of the file. At the end of the
+archive file there shall be two 512-octet logical records filled with
+binary zeros, interpreted as an end-of-archive indicator.
+.LP
+The logical records may be grouped for physical I/O operations, as
+described under the \fB-b\fP \fIblocksize\fP and \fB-x\fP
+\fBustar\fP options. Each group of logical records may be written
+with a single operation equivalent to the \fIwrite\fP() function.
+On magnetic tape, the result of this write shall be a single tape
+physical
+block. The last physical block shall always be the full size, so logical
+records after the two zero logical records may contain
+undefined data.
+.LP
+The header logical record shall be structured as shown in the following
+table. All lengths and offsets are in decimal.
+.br
+.sp
+.ce 1
+\fBTable: ustar Header Block\fP
+.TS C
+center; l l l.
+\fBField Name\fP \fBOctet Offset\fP \fBLength (in Octets)\fP
+\fIname\fP 0 100
+\fImode\fP 100 8
+\fIuid\fP 108 8
+\fIgid\fP 116 8
+\fIsize\fP 124 12
+\fImtime\fP 136 12
+\fIchksum\fP 148 8
+\fItypeflag\fP 156 1
+\fIlinkname\fP 157 100
+\fImagic\fP 257 6
+\fIversion\fP 263 2
+\fIuname\fP 265 32
+\fIgname\fP 297 32
+\fIdevmajor\fP 329 8
+\fIdevminor\fP 337 8
+\fIprefix\fP 345 155
+.TE
+.LP
+All characters in the header logical record shall be represented in
+the coded character set of the ISO/IEC\ 646:1991
+standard. For maximum portability between implementations, names should
+be selected from characters represented by the portable
+filename character set as octets with the most significant bit zero.
+If an implementation supports the use of characters outside of
+slash and the portable filename character set in names for files,
+users, and groups, one or more implementation-defined encodings
+of these characters shall be provided for interchange purposes.
+.LP
+However, the \fIpax\fP utility shall never create filenames on the
+local system that cannot be accessed via the procedures
+described in IEEE\ Std\ 1003.1-2001. If a filename is found on the
+medium that would create an invalid filename, it is
+implementation-defined whether the data from the file is stored on
+the file hierarchy and under what name it is stored. The
+\fIpax\fP utility may choose to ignore these files as long as it produces
+an error indicating that the file is being ignored.
+.LP
+Each field within the header logical record is contiguous; that is,
+there is no padding used. Each character on the archive
+medium shall be stored contiguously.
+.LP
+The fields \fImagic\fP, \fIuname\fP, and \fIgname\fP are character
+strings each terminated by a NUL character. The fields
+\fIname\fP, \fIlinkname\fP, and \fIprefix\fP are NUL-terminated character
+strings except when all characters in the array
+contain non-NUL characters including the last character. The \fIversion\fP
+field is two octets containing the characters
+\fB"00"\fP (zero-zero). The \fItypeflag\fP contains a single character.
+All other fields are leading zero-filled octal numbers
+using digits from the ISO/IEC\ 646:1991 standard IRV. Each numeric
+field is terminated by one or more <space> or NUL
+characters.
+.LP
+The \fIname\fP and the \fIprefix\fP fields shall produce the pathname
+of the file. A new pathname shall be formed, if
+\fIprefix\fP is not an empty string (its first character is not NUL),
+by concatenating \fIprefix\fP (up to the first NUL
+character), a slash character, and \fIname\fP; otherwise, \fIname\fP
+is used alone. In either case, \fIname\fP is terminated at
+the first NUL character. If \fIprefix\fP begins with a NUL character,
+it shall be ignored. In this manner, pathnames of at most
+256 characters can be supported. If a pathname does not fit in the
+space provided, \fIpax\fP shall notify the user of the error,
+and shall not store any part of the file-header or data-on the medium.
+.LP
+The \fIlinkname\fP field, described below, shall not use the \fIprefix\fP
+to produce a pathname. As such, a \fIlinkname\fP is
+limited to 100 characters. If the name does not fit in the space provided,
+\fIpax\fP shall notify the user of the error, and shall
+not attempt to store the link on the medium.
+.LP
+The \fImode\fP field provides 12 bits encoded in the ISO/IEC\ 646:1991
+standard octal digit representation. The encoded
+bits shall represent the following values:
+.br
+.sp
+.ce 1
+\fBTable: ustar \fImode\fP Field\fP
+.TS C
+center; l1 l1 lw(37).
+\fBBit Value\fP \fBIEEE\ Std\ 1003.1-2001 Bit\fP T{
+.na
+\fBDescription\fP
+.ad
+T}
+04000 S_ISUID T{
+.na
+Set UID on execution.
+.ad
+T}
+02000 S_ISGID T{
+.na
+Set GID on execution.
+.ad
+T}
+01000 <reserved> T{
+.na
+Reserved for future standardization.
+.ad
+T}
+00400 S_IRUSR T{
+.na
+Read permission for file owner class.
+.ad
+T}
+00200 S_IWUSR T{
+.na
+Write permission for file owner class.
+.ad
+T}
+00100 S_IXUSR T{
+.na
+Execute/search permission for file owner class.
+.ad
+T}
+00040 S_IRGRP T{
+.na
+Read permission for file group class.
+.ad
+T}
+00020 S_IWGRP T{
+.na
+Write permission for file group class.
+.ad
+T}
+00010 S_IXGRP T{
+.na
+Execute/search permission for file group class.
+.ad
+T}
+00004 S_IROTH T{
+.na
+Read permission for file other class.
+.ad
+T}
+00002 S_IWOTH T{
+.na
+Write permission for file other class.
+.ad
+T}
+00001 S_IXOTH T{
+.na
+Execute/search permission for file other class.
+.ad
+T}
+.TE
+.LP
+When appropriate privilege is required to set one of these mode bits,
+and the user restoring the files from the archive does not
+have the appropriate privilege, the mode bits for which the user does
+not have appropriate privilege shall be ignored. Some of the
+mode bits in the archive format are not mentioned elsewhere in this
+volume of IEEE\ Std\ 1003.1-2001. If the implementation
+does not support those bits, they may be ignored.
+.LP
+The \fIuid\fP and \fIgid\fP fields are the user and group ID of the
+owner and group of the file, respectively.
+.LP
+The \fIsize\fP field is the size of the file in octets. If the \fItypeflag\fP
+field is set to specify a file to be of type 1
+(a link) or 2 (a symbolic link), the \fIsize\fP field shall be specified
+as zero. If the \fItypeflag\fP field is set to specify a
+file of type 5 (directory), the \fIsize\fP field shall be interpreted
+as described under the definition of that record type. No
+data logical records are stored for types 1, 2, or 5. If the \fItypeflag\fP
+field is set to 3 (character special file), 4 (block
+special file), or 6 (FIFO), the meaning of the \fIsize\fP field is
+unspecified by this volume of IEEE\ Std\ 1003.1-2001,
+and no data logical records shall be stored on the medium. Additionally,
+for type 6, the \fIsize\fP field shall be ignored when
+reading. If the \fItypeflag\fP field is set to any other value, the
+number of logical records written following the header shall
+be ( \fIsize\fP+511)/512, ignoring any fraction in the result of the
+division.
+.LP
+The \fImtime\fP field shall be the modification time of the file at
+the time it was archived. It is the ISO/IEC\ 646:1991
+standard representation of the octal value of the modification time
+obtained from the \fIstat\fP() function.
+.LP
+The \fIchksum\fP field shall be the ISO/IEC\ 646:1991 standard IRV
+representation of the octal value of the simple sum of
+all octets in the header logical record. Each octet in the header
+shall be treated as an unsigned value. These values shall be
+added to an unsigned integer, initialized to zero, the precision of
+which is not less than 17 bits. When calculating the checksum,
+the \fIchksum\fP field is treated as if it were all spaces.
+.LP
+The \fItypeflag\fP field specifies the type of file archived. If a
+particular implementation does not recognize the type, or
+the user does not have appropriate privilege to create that type,
+the file shall be extracted as if it were a regular file if the
+file type is defined to have a meaning for the \fIsize\fP field that
+could cause data logical records to be written on the medium
+(see the previous description for \fIsize\fP). If conversion to a
+regular file occurs, the \fIpax\fP utility shall produce an
+error indicating that the conversion took place. All of the \fItypeflag\fP
+fields shall be coded in the ISO/IEC\ 646:1991
+standard IRV:
+.TP 7
+\fB0\fP
+Represents a regular file. For backwards-compatibility, a \fItypeflag\fP
+value of binary zero ( \fB'\\0'\fP ) should be
+recognized as meaning a regular file when extracting files from the
+archive. Archives written with this version of the archive file
+format create regular files with a \fItypeflag\fP value of the ISO/IEC\ 646:1991
+standard IRV \fB'0'\fP .
+.TP 7
+\fB1\fP
+Represents a file linked to another file, of any type, previously
+archived. Such files are identified by each file having the
+same device and file serial number. The linked-to name is specified
+in the \fIlinkname\fP field with a NUL-character terminator if
+it is less than 100 octets in length.
+.TP 7
+\fB2\fP
+Represents a symbolic link. The contents of the symbolic link shall
+be stored in the \fIlinkname\fP field.
+.TP 7
+\fB3,4\fP
+Represent character special files and block special files respectively.
+In this case the \fIdevmajor\fP and \fIdevminor\fP
+fields shall contain information defining the device, the format of
+which is unspecified by this volume of
+IEEE\ Std\ 1003.1-2001. Implementations may map the device specifications
+to their own local specification or may ignore
+the entry.
+.TP 7
+\fB5\fP
+Specifies a directory or subdirectory. On systems where disk allocation
+is performed on a directory basis, the \fIsize\fP
+field shall contain the maximum number of octets (which may be rounded
+to the nearest disk block allocation unit) that the
+directory may hold. A \fIsize\fP field of zero indicates no such limiting.
+Systems that do not support limiting in this manner
+should ignore the \fIsize\fP field.
+.TP 7
+\fB6\fP
+Specifies a FIFO special file. Note that the archiving of a FIFO file
+archives the existence of this file and not its
+contents.
+.TP 7
+\fB7\fP
+Reserved to represent a file to which an implementation has associated
+some high-performance attribute. Implementations without
+such extensions should treat this file as a regular file (type 0).
+.TP 7
+\fBA-Z\fP
+The letters \fB'A'\fP to \fB'Z'\fP, inclusive, are reserved for custom
+implementations. All other values are reserved
+for future versions of IEEE\ Std\ 1003.1-2001.
+.sp
+.LP
+Attempts to archive a socket using \fBustar\fP interchange format
+shall produce a diagnostic message. Handling of other file
+types is implementation-defined.
+.LP
+The \fImagic\fP field is the specification that this archive was output
+in this archive format. If this field contains
+\fBustar\fP (the five characters from the ISO/IEC\ 646:1991 standard
+IRV shown followed by NUL), the \fIuname\fP and
+\fIgname\fP fields shall contain the ISO/IEC\ 646:1991 standard IRV
+representation of the owner and group of the file,
+respectively (truncated to fit, if necessary). When the file is restored
+by a privileged, protection-preserving version of the
+utility, the user and group databases shall be scanned for these names.
+If found, the user and group IDs contained within these
+files shall be used rather than the values contained within the \fIuid\fP
+and \fIgid\fP fields.
+.SS cpio Interchange Format
+.LP
+The octet-oriented \fBcpio\fP archive format shall be a series of
+entries, each comprising a header that describes the file,
+the name of the file, and then the contents of the file.
+.LP
+An archive may be recorded as a series of fixed-size blocks of octets.
+This blocking shall be used only to make physical I/O
+more efficient. The last group of blocks shall always be at the full
+size.
+.LP
+For the octet-oriented \fBcpio\fP archive format, the individual entry
+information shall be in the order indicated and
+described by the following table; see also the \fI<cpio.h>\fP header.
+.br
+.sp
+.ce 1
+\fBTable: Octet-Oriented cpio Archive Entry\fP
+.TS C
+center; l2 l2 l.
+\fBHeader Field Name\fP \fBLength (in Octets)\fP \fBInterpreted as\fP
+\fIc_magic\fP 6 Octal number
+\fIc_dev\fP 6 Octal number
+\fIc_ino\fP 6 Octal number
+\fIc_mode\fP 6 Octal number
+\fIc_uid\fP 6 Octal number
+\fIc_gid\fP 6 Octal number
+\fIc_nlink\fP 6 Octal number
+\fIc_rdev\fP 6 Octal number
+\fIc_mtime\fP 11 Octal number
+\fIc_namesize\fP 6 Octal number
+\fIc_filesize\fP 11 Octal number
+\fBFilename Field Name\fP \fBLength\fP \fBInterpreted as\fP
+\fIc_name\fP \fIc_namesize\fP Pathname string
+\fBFile Data Field Name\fP \fBLength\fP \fBInterpreted as\fP
+\fIc_filedata\fP \fIc_filesize\fP Data
+.TE
+.SS cpio Header
+.LP
+For each file in the archive, a header as defined previously shall
+be written. The information in the header fields is written
+as streams of the ISO/IEC\ 646:1991 standard characters interpreted
+as octal numbers. The octal numbers shall be extended to
+the necessary length by appending the ISO/IEC\ 646:1991 standard IRV
+zeros at the most-significant-digit end of the number; the
+result is written to the most-significant digit of the stream of octets
+first. The fields shall be interpreted as follows:
+.TP 7
+\fIc_magic\fP
+Identify the archive as being a transportable archive by containing
+the identifying value \fB"070707"\fP .
+.TP 7
+\fIc_dev\fP,\ \fIc_ino\fP
+Contains values that uniquely identify the file within the archive
+(that is, no files contain the same pair of \fIc_dev\fP and
+\fIc_ino\fP values unless they are links to the same file). The values
+shall be determined in an unspecified manner.
+.TP 7
+\fIc_mode\fP
+Contains the file type and access permissions as defined in the following
+table.
+.br
+.sp
+.ce 1
+\fBTable: Values for cpio c_mode Field\fP
+.TS C
+center; l2 l2 l.
+\fBFile Permissions Name\fP \fBValue\fP \fBIndicates\fP
+C_IRUSR 000400 Read by owner
+C_IWUSR 000200 Write by owner
+C_IXUSR 000100 Execute by owner
+C_IRGRP 000040 Read by group
+C_IWGRP 000020 Write by group
+C_IXGRP 000010 Execute by group
+C_IROTH 000004 Read by others
+C_IWOTH 000002 Write by others
+C_IXOTH 000001 Execute by others
+C_ISUID 004000 Set \fIuid\fP
+C_ISGID 002000 Set \fIgid\fP
+C_ISVTX 001000 Reserved
+\fBFile Type Name\fP \fBValue\fP \fBIndicates\fP
+C_ISDIR 040000 Directory
+C_ISFIFO 010000 FIFO
+C_ISREG 0100000 Regular file
+C_ISLNK 0120000 Symbolic link
+C_ISBLK 060000 Block special file
+C_ISCHR 020000 Character special file
+C_ISSOCK 0140000 Socket
+C_ISCTG 0110000 Reserved
+.TE
+.LP
+Directories, FIFOs, symbolic links, and regular files shall be supported
+on a system conforming to this volume of
+IEEE\ Std\ 1003.1-2001; additional values defined previously are reserved
+for compatibility with existing systems.
+Additional file types may be supported; however, such files should
+not be written to archives intended to be transported to other
+systems.
+.TP 7
+\fIc_uid\fP
+Contains the user ID of the owner.
+.TP 7
+\fIc_gid\fP
+Contains the group ID of the group.
+.TP 7
+\fIc_nlink\fP
+Contains the number of links referencing the file at the time the
+archive was created.
+.TP 7
+\fIc_rdev\fP
+Contains implementation-defined information for character or block
+special files.
+.TP 7
+\fIc_mtime\fP
+Contains the latest time of modification of the file at the time the
+archive was created.
+.TP 7
+\fIc_namesize\fP
+Contains the length of the pathname, including the terminating NUL
+character.
+.TP 7
+\fIc_filesize\fP
+Contains the length of the file in octets. This shall be the length
+of the data section following the header structure.
+.sp
+.SS cpio Filename
+.LP
+The \fIc_name\fP field shall contain the pathname of the file. The
+length of this field in octets is the value of
+\fIc_namesize\fP.
+.LP
+If a filename is found on the medium that would create an invalid
+pathname, it is implementation-defined whether the data from
+the file is stored on the file hierarchy and under what name it is
+stored.
+.LP
+All characters shall be represented in the ISO/IEC\ 646:1991 standard
+IRV. For maximum portability between implementations,
+names should be selected from characters represented by the portable
+filename character set as octets with the most significant bit
+zero. If an implementation supports the use of characters outside
+the portable filename character set in names for files, users,
+and groups, one or more implementation-defined encodings of these
+characters shall be provided for interchange purposes. However,
+the \fIpax\fP utility shall never create filenames on the local system
+that cannot be accessed via the procedures described
+previously in this volume of IEEE\ Std\ 1003.1-2001. If a filename
+is found on the medium that would create an invalid
+filename, it is implementation-defined whether the data from the file
+is stored on the local file system and under what name it is
+stored. The \fIpax\fP utility may choose to ignore these files as
+long as it produces an error indicating that the file is being
+ignored.
+.SS cpio File Data
+.LP
+Following \fIc_name\fP, there shall be \fIc_filesize\fP octets of
+data. Interpretation of such data occurs in a manner
+dependent on the file. If \fIc_filesize\fP is zero, no data shall
+be contained in \fIc_filedata\fP.
+.LP
+When restoring from an archive:
+.IP " *" 3
+If the user does not have the appropriate privilege to create a file
+of the specified type, \fIpax\fP shall ignore the entry
+and write an error message to standard error.
+.LP
+.IP " *" 3
+Only regular files have data to be restored. Presuming a regular file
+meets any selection criteria that might be imposed on the
+format-reading utility by the user, such data shall be restored.
+.LP
+.IP " *" 3
+If a user does not have appropriate privilege to set a particular
+mode flag, the flag shall be ignored. Some of the mode flags
+in the archive format are not mentioned elsewhere in this volume of
+IEEE\ Std\ 1003.1-2001. If the implementation does not
+support those flags, they may be ignored.
+.LP
+.SS cpio Special Entries
+.LP
+FIFO special files, directories, and the trailer shall be recorded
+with \fIc_filesize\fP equal to zero. For other special
+files, \fIc_filesize\fP is unspecified by this volume of IEEE\ Std\ 1003.1-2001.
+The header for the next file entry in the
+archive shall be written directly after the last octet of the file
+entry preceding it. A header denoting the filename
+\fBTRAILER!!!\fP shall indicate the end of the archive; the contents
+of octets in the last block of the archive following such a
+header are undefined.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+All files were processed successfully.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+If \fIpax\fP cannot create a file or a link when reading an archive
+or cannot find a file when writing an archive, or cannot
+preserve the user ID, group ID, or file mode when the \fB-p\fP option
+is specified, a diagnostic message shall be written to
+standard error and a non-zero exit status shall be returned, but processing
+shall continue. In the case where \fIpax\fP cannot
+create a link to a file, \fIpax\fP shall not, by default, create a
+second copy of the file.
+.LP
+If the extraction of a file from an archive is prematurely terminated
+by a signal or error, \fIpax\fP may have only partially
+extracted the file or (if the \fB-n\fP option was not specified) may
+have extracted a file of the same name as that specified by
+the user, but which is not the file the user wanted. Additionally,
+the file modes of extracted directories may have additional bits
+from the S_IRWXU mask set as well as incorrect modification and access
+times.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The \fB-p\fP (privileges) option was invented to reconcile differences
+between historical \fItar\fP and \fIcpio\fP
+implementations. In particular, the two utilities use \fB-m\fP in
+diametrically opposed ways. The \fB-p\fP option also provides a
+consistent means of extending the ways in which future file attributes
+can be addressed, such as for enhanced security systems or
+high-performance files. Although it may seem complex, there are really
+two modes that are most commonly used:
+.TP 7
+\fB-p\ e\fP
+``Preserve everything". This would be used by the historical superuser,
+someone with all the appropriate privileges, to
+preserve all aspects of the files as they are recorded in the archive.
+The \fBe\fP flag is the sum of \fBo\fP and \fBp\fP, and
+other implementation-defined attributes.
+.TP 7
+\fB-p\ p\fP
+``Preserve" the file mode bits. This would be used by the user with
+regular privileges who wished to preserve aspects of the
+file other than the ownership. The file times are preserved by default,
+but two other flags are offered to disable these and use
+the time of extraction.
+.sp
+.LP
+The one pathname per line format of standard input precludes pathnames
+containing <newline>s. Although such pathnames
+violate the portable filename guidelines, they may exist and their
+presence may inhibit usage of \fIpax\fP within shell scripts.
+This problem is inherited from historical archive programs. The problem
+can be avoided by listing filename arguments on the command
+line instead of on standard input.
+.LP
+It is almost certain that appropriate privileges are required for
+\fIpax\fP to accomplish parts of this volume of
+IEEE\ Std\ 1003.1-2001. Specifically, creating files of type block
+special or character special, restoring file access
+times unless the files are owned by the user (the \fB-t\fP option),
+or preserving file owner, group, and mode (the \fB-p\fP
+option) all probably require appropriate privileges.
+.LP
+In \fBread\fP mode, implementations are permitted to overwrite files
+when the archive has multiple members with the same name.
+This may fail if permissions on the first version of the file do not
+permit it to be overwritten.
+.LP
+The \fBcpio\fP and \fBustar\fP formats can only support files up to
+8589934592 bytes (8 * 2^30) in size.
+.SH EXAMPLES
+.LP
+The following command:
+.sp
+.RS
+.nf
+
+\fBpax -w -f /dev/rmt/1m .
+\fP
+.fi
+.RE
+.LP
+copies the contents of the current directory to tape drive 1, medium
+density (assuming historical System V device naming
+procedures-the historical BSD device name would be \fB/dev/rmt9\fP).
+.LP
+The following commands:
+.sp
+.RS
+.nf
+
+\fBmkdir\fP \fInewdir\fP\fBpax -rw\fP \fIolddir newdir\fP
+.fi
+.RE
+.LP
+copy the \fIolddir\fP directory hierarchy to \fInewdir\fP.
+.sp
+.RS
+.nf
+
+\fBpax -r -s ',^//*usr//*,,' -f a.pax
+\fP
+.fi
+.RE
+.LP
+reads the archive \fBa.pax\fP, with all files rooted in \fB/usr\fP
+in the archive extracted relative to the current
+directory.
+.LP
+Using the option:
+.sp
+.RS
+.nf
+
+\fB-o listopt="%M %(atime)T %(size)D %(name)s"
+\fP
+.fi
+.RE
+.LP
+overrides the default output description in Standard Output and instead
+writes:
+.sp
+.RS
+.nf
+
+\fB-rw-rw--- Jan 12 15:53 1492 /usr/foo/bar
+\fP
+.fi
+.RE
+.LP
+Using the options:
+.sp
+.RS
+.nf
+
+\fB-o listopt='%L\\t%(size)D\\n%.7' \\
+-o listopt='(name)s\\n%(ctime)T\\n%T'
+\fP
+.fi
+.RE
+.LP
+overrides the default output description in Standard Output and instead
+writes:
+.sp
+.RS
+.nf
+
+\fB/usr/foo/bar -> /tmp 1492
+/usr/fo
+Jan 12 1991
+Jan 31 15:53
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+The \fIpax\fP utility was new for the ISO\ POSIX-2:1993 standard.
+It represents a peaceful compromise between advocates of
+the historical \fItar\fP and \fIcpio\fP utilities.
+.LP
+A fundamental difference between \fIcpio\fP and \fItar\fP was in the
+way directories were treated. The \fIcpio\fP utility did
+not treat directories differently from other files, and to select
+a directory and its contents required that each file in the
+hierarchy be explicitly specified. For \fItar\fP, a directory matched
+every file in the file hierarchy it rooted.
+.LP
+The \fIpax\fP utility offers both interfaces; by default, directories
+map into the file hierarchy they root. The \fB-d\fP
+option causes \fIpax\fP to skip any file not explicitly referenced,
+as \fIcpio\fP historically did. The \fItar\fP \fB-\fP
+\fIstyle\fP behavior was chosen as the default because it was believed
+that this was the more common usage and because \fItar\fP
+is the more commonly available interface, as it was historically provided
+on both System V and BSD implementations.
+.LP
+The data interchange format specification in this volume of IEEE\ Std\ 1003.1-2001
+requires that processes with
+"appropriate privileges" shall always restore the ownership and permissions
+of extracted files exactly as archived. If viewed
+from the historic equivalence between superuser and "appropriate privileges",
+there are two problems with this requirement.
+First, users running as superusers may unknowingly set dangerous permissions
+on extracted files. Second, it is needlessly limiting,
+in that superusers cannot extract files and own them as superuser
+unless the archive was created by the superuser. (It should be
+noted that restoration of ownerships and permissions for the superuser,
+by default, is historical practice in \fIcpio\fP, but not
+in \fItar\fP.) In order to avoid these two problems, the \fIpax\fP
+specification has an additional "privilege" mechanism, the
+\fB-p\fP option. Only a \fIpax\fP invocation with the privileges needed,
+and which has the \fB-p\fP option set using the
+\fBe\fP specification character, has the "appropriate privilege" to
+restore full ownership and permission information.
+.LP
+Note also that this volume of IEEE\ Std\ 1003.1-2001 requires that
+the file ownership and access permissions shall be
+set, on extraction, in the same fashion as the \fIcreat\fP() function
+when provided with the
+mode stored in the archive. This means that the file creation mask
+of the user is applied to the file permissions.
+.LP
+Users should note that directories may be created by \fIpax\fP while
+extracting files with permissions that are different from
+those that existed at the time the archive was created. When extracting
+sensitive information into a directory hierarchy that no
+longer exists, users are encouraged to set their file creation mask
+appropriately to protect these files during extraction.
+.LP
+The table of contents output is written to standard output to facilitate
+pipeline processing.
+.LP
+An early proposal had hard links displaying for all pathnames. This
+was removed because it complicates the output of the case
+where \fB-v\fP is not specified and does not match historical \fIcpio\fP
+usage. The hard-link information is available in the
+\fB-v\fP display.
+.LP
+The description of the \fB-l\fP option allows implementations to make
+hard links to symbolic links.
+IEEE\ Std\ 1003.1-2001 does not specify any way to create a hard link
+to a symbolic link, but many implementations provide
+this capability as an extension. If there are hard links to symbolic
+links when an archive is created, the implementation is
+required to archive the hard link in the archive (unless \fB-H\fP
+or \fB-L\fP is specified). When in \fBread\fP mode and in
+\fBcopy\fP mode, implementations supporting hard links to symbolic
+links should use them when appropriate.
+.LP
+The archive formats inherited from the POSIX.1-1990 standard have
+certain restrictions that have been brought along from
+historical usage. For example, there are restrictions on the length
+of pathnames stored in the archive. When \fIpax\fP is used in
+\fBcopy\fP( \fB-rw\fP) mode (copying directory hierarchies), the ability
+to use extensions from the \fB-x\fP \fBpax\fP format
+overcomes these restrictions.
+.LP
+The default \fIblocksize\fP value of 5120 bytes for \fIcpio\fP was
+selected because it is one of the standard block-size
+values for \fIcpio\fP, set when the \fB-B\fP option is specified.
+(The other default block-size value for \fIcpio\fP is 512
+bytes, and this was considered to be too small.) The default block
+value of 10240 bytes for \fItar\fP was selected because that is
+the standard block-size value for BSD \fItar\fP. The maximum block
+size of 32256 bytes (2**15-512 bytes)
+is the largest multiple of 512 bytes that fits into a signed 16-bit
+tape controller transfer register. There are known limitations
+in some historical systems that would prevent larger blocks from being
+accepted. Historical values were chosen to improve
+compatibility with historical scripts using \fIdd\fP or similar utilities
+to manipulate
+archives. Also, default block sizes for any file type other than character
+special file has been deleted from this volume of
+IEEE\ Std\ 1003.1-2001 as unimportant and not likely to affect the
+structure of the resulting archive.
+.LP
+Implementations are permitted to modify the block-size value based
+on the archive format or the device to which the archive is
+being written. This is to provide implementations with the opportunity
+to take advantage of special types of devices, and it should
+not be used without a great deal of consideration as it almost certainly
+decreases archive portability.
+.LP
+The intended use of the \fB-n\fP option was to permit extraction of
+one or more files from the archive without processing the
+entire archive. This was viewed by the standard developers as offering
+significant performance advantages over historical
+implementations. The \fB-n\fP option in early proposals had three
+effects; the first was to cause special characters in patterns
+to not be treated specially. The second was to cause only the first
+file that matched a pattern to be extracted. The third was to
+cause \fIpax\fP to write a diagnostic message to standard error when
+no file was found matching a specified pattern. Only the
+second behavior is retained by this volume of IEEE\ Std\ 1003.1-2001,
+for many reasons. First, it is in general not
+acceptable for a single option to have multiple effects. Second, the
+ability to make pattern matching characters act as normal
+characters is useful for parts of \fIpax\fP other than file extraction.
+Third, a finer degree of control over the special
+characters is useful because users may wish to normalize only a single
+special character in a single filename. Fourth, given a more
+general escape mechanism, the previous behavior of the \fB-n\fP option
+can be easily obtained using the \fB-s\fP option or a \fIsed\fP script.
+Finally, writing a diagnostic message when a pattern specified by
+the user is
+unmatched by any file is useful behavior in all cases.
+.LP
+In this version, the \fB-n\fP was removed from the \fBcopy\fP mode
+synopsis of \fIpax\fP; it is inapplicable because there
+are no pattern operands specified in this mode.
+.LP
+There is another method than \fIpax\fP for copying subtrees in IEEE\ Std\ 1003.1-2001
+described as part of the \fIcp\fP utility. Both methods are historical
+practice: \fIcp\fP
+provides a simpler, more intuitive interface, while \fIpax\fP offers
+a finer granularity of control. Each provides additional
+functionality to the other; in particular, \fIpax\fP maintains the
+hard-link structure of the hierarchy while \fIcp\fP does not. It is
+the intention of the standard developers that the results be similar
+(using
+appropriate option combinations in both utilities). The results are
+not required to be identical; there seemed insufficient gain to
+applications to balance the difficulty of implementations having to
+guarantee that the results would be exactly identical.
+.LP
+A single archive may span more than one file. It is suggested that
+implementations provide informative messages to the user on
+standard error whenever the archive file is changed.
+.LP
+The \fB-d\fP option (do not create intermediate directories not listed
+in the archive) found in early proposals was originally
+provided as a complement to the historic \fB-d\fP option of \fIcpio\fP.
+It has been deleted.
+.LP
+The \fB-s\fP option in early proposals specified a subset of the substitution
+command from the \fIed\fP utility. As there was no reason for only
+a subset to be supported, the \fB-s\fP option is now
+compatible with the current \fIed\fP specification. Since the delimiter
+can be any non-null
+character, the following usage with single spaces is valid:
+.sp
+.RS
+.nf
+
+\fBpax -s " foo bar " ...
+\fP
+.fi
+.RE
+.LP
+The \fB-t\fP description is worded so as to note that this may cause
+the access time update caused by some other activity
+(which occurs while the file is being read) to be overwritten.
+.LP
+The default behavior of \fIpax\fP with regard to file modification
+times is the same as historical implementations of
+\fItar\fP. It is not the historical behavior of \fIcpio\fP.
+.LP
+Because the \fB-i\fP option uses \fB/dev/tty\fP, utilities without
+a controlling terminal are not able to use this option.
+.LP
+The \fB-y\fP option, found in early proposals, has been deleted because
+a line containing a single period for the \fB-i\fP
+option has equivalent functionality. The special lines for the \fB-i\fP
+option (a single period and the empty line) are historical
+practice in \fIcpio\fP.
+.LP
+In early drafts, a \fB-e\fP \fIcharmap\fP option was included to increase
+portability of files between systems using different
+coded character sets. This option was omitted because it was apparent
+that consensus could not be formed for it. In this version,
+the use of UTF-8 should be an adequate substitute.
+.LP
+The \fB-k\fP option was added to address international concerns about
+the dangers involved in the character set transformations
+of \fB-e\fP (if the target character set were different from the source,
+the filenames might be transformed into names matching
+existing files) and also was made more general to protect files transferred
+between file systems with different {NAME_MAX} values
+(truncating a filename on a smaller system might also inadvertently
+overwrite existing files). As stated, it prevents any
+overwriting, even if the target file is older than the source. This
+version adds more granularity of options to solve this problem
+by introducing the \fB-o\fP \fBinvalid=\fP option-specifically the
+UTF-8 action. (Note that an existing file that is named with a
+UTF-8 encoding is still subject to overwriting in this case. The \fB-k\fP
+option closes that loophole.)
+.LP
+Some of the file characteristics referenced in this volume of IEEE\ Std\ 1003.1-2001
+might not be supported by some
+archive formats. For example, neither the \fBtar\fP nor \fBcpio\fP
+formats contain the file access time. For this reason, the
+\fBe\fP specification character has been provided, intended to cause
+all file characteristics specified in the archive to be
+retained.
+.LP
+It is required that extracted directories, by default, have their
+access and modification times and permissions set to the
+values specified in the archive. This has obvious problems in that
+the directories are almost certainly modified after being
+extracted and that directory permissions may not permit file creation.
+One possible solution is to create directories with the mode
+specified in the archive, as modified by the \fIumask\fP of the user,
+with sufficient
+permissions to allow file creation. After all files have been extracted,
+\fIpax\fP would then reset the access and modification
+times and permissions as necessary.
+.LP
+The list-mode formatting description borrows heavily from the one
+defined by the \fIprintf\fP utility. However, since there is no separate
+operand list to get conversion arguments,
+the format was extended to allow specifying the name of the conversion
+argument as part of the conversion specification.
+.LP
+The \fBT\fP conversion specifier allows time fields to be displayed
+in any of the date formats. Unlike the \fIls\fP utility, \fIpax\fP
+does not adjust the format when the date is less than six months in
+the
+past. This makes parsing the output more predictable.
+.LP
+The \fBD\fP conversion specifier handles the ability to display the
+major/minor or file size, as with \fIls\fP, by using \fB%-8(\fP\fIsize\fP\fB)D\fP.
+.LP
+The \fBL\fP conversion specifier handles the \fIls\fP display for
+symbolic links.
+.LP
+Conversion specifiers were added to generate existing known types
+used for \fIls\fP.
+.SS pax Interchange Format
+.LP
+The new POSIX data interchange format was developed primarily to satisfy
+international concerns that the \fBustar\fP and
+\fBcpio\fP formats did not provide for file, user, and group names
+encoded in characters outside a subset of the
+ISO/IEC\ 646:1991 standard. The standard developers realized that
+this new POSIX data interchange format should be very
+extensible because there were other requirements they foresaw in the
+near future:
+.IP " *" 3
+Support international character encodings and locale information
+.LP
+.IP " *" 3
+Support security information (ACLs, and so on)
+.LP
+.IP " *" 3
+Support future file types, such as realtime or contiguous files
+.LP
+.IP " *" 3
+Include data areas for implementation use
+.LP
+.IP " *" 3
+Support systems with words larger than 32 bits and timers with subsecond
+granularity
+.LP
+.LP
+The following were not goals for this format because these are better
+handled by separate utilities or are inappropriate for a
+portable format:
+.IP " *" 3
+Encryption
+.LP
+.IP " *" 3
+Compression
+.LP
+.IP " *" 3
+Data translation between locales and codesets
+.LP
+.IP " *" 3
+\fIinode\fP storage
+.LP
+.LP
+The format chosen to support the goals is an extension of the \fBustar\fP
+format. Of the two formats previously available, only
+the \fBustar\fP format was selected for extensions because:
+.IP " *" 3
+It was easier to extend in an upwards-compatible way. It offered version
+flags and header block type fields with room for future
+standardization. The \fBcpio\fP format, while possessing a more flexible
+file naming methodology, could not be extended without
+breaking some theoretical implementation or using a dummy filename
+that could be a legitimate filename.
+.LP
+.IP " *" 3
+Industry experience since the original " \fItar\fP wars" fought in
+developing the ISO\ POSIX-1 standard has clearly been
+in favor of the \fBustar\fP format, which is generally the default
+output format selected for \fIpax\fP implementations on new
+systems.
+.LP
+.LP
+The new format was designed with one additional goal in mind: reasonable
+behavior when an older \fItar\fP or \fIpax\fP utility
+happened to read an archive. Since the POSIX.1-1990 standard mandated
+that a "format-reading utility" had to treat unrecognized
+\fItypeflag\fP values as regular files, this allowed the format to
+include all the extended information in a pseudo-regular file
+that preceded each real file. An option is given that allows the archive
+creator to set up reasonable names for these files on the
+older systems. Also, the normative text suggests that reasonable file
+access values be used for this \fBustar\fP header block.
+Making these header files inaccessible for convenient reading and
+deleting would not be reasonable. File permissions of 600 or 700
+are suggested.
+.LP
+The \fBustar\fP \fItypeflag\fP field was used to accommodate the additional
+functionality of the new format rather than magic
+or version because the POSIX.1-1990 standard (and, by reference, the
+previous version of \fIpax\fP), mandated the behavior of the
+format-reading utility when it encountered an unknown \fItypeflag\fP,
+but was silent about the other two fields.
+.LP
+Early proposals of the first revision to IEEE\ Std\ 1003.1-2001 contained
+a proposed archive format that was based on
+compatibility with the standard for tape files (ISO\ 1001, similar
+to the format used historically on many mainframes and
+minicomputers). This format was overly complex and required considerable
+overhead in volume and header records. Furthermore, the
+standard developers felt that it would not be acceptable to the community
+of POSIX developers, so it was later changed to be a
+format more closely related to historical practice on POSIX systems.
+.LP
+The prefix and name split of pathnames in \fBustar\fP was replaced
+by the single path extended header record for
+simplicity.
+.LP
+The concept of a global extended header ( \fItypeflag\fP \fBg\fP)
+was controversial. If this were applied to an archive being
+recorded on magnetic tape, a few unreadable blocks at the beginning
+of the tape could be a serious problem; a utility attempting to
+extract as many files as possible from a damaged archive could lose
+a large percentage of file header information in this case.
+However, if the archive were on a reliable medium, such as a CD-ROM,
+the global extended header offers considerable potential size
+reductions by eliminating redundant information. Thus, the text warns
+against using the global method for unreliable media and
+provides a method for implanting global information in the extended
+header for each file, rather than in the \fItypeflag\fP
+\fBg\fP records.
+.LP
+No facility for data translation or filtering on a per-file basis
+is included because the standard developers could not invent
+an interface that would allow this in an efficient manner. If a filter,
+such as encryption or compression, is to be applied to all
+the files, it is more efficient to apply the filter to the entire
+archive as a single file. The standard developers considered
+interfaces that would invoke a shell script for each file going into
+or out of the archive, but the system overhead in this
+approach was considered to be too high.
+.LP
+One such approach would be to have \fBfilter=\fP records that give
+a pathname for an executable. When the program is invoked,
+the file and archive would be open for standard input/output and all
+the header fields would be available as environment variables
+or command-line arguments. The standard developers did discuss such
+schemes, but they were omitted from
+IEEE\ Std\ 1003.1-2001 due to concerns about excessive overhead. Also,
+the program itself would need to be in the archive
+if it were to be used portably.
+.LP
+There is currently no portable means of identifying the character
+set(s) used for a file in the file system. Therefore,
+\fIpax\fP has not been given a mechanism to generate charset records
+automatically. The only portable means of doing this is for
+the user to write the archive using the \fB-o\fP \fBcharset=\fP \fIstring\fP
+command line option. This assumes that all of the
+files in the archive use the same encoding. The "implementation-defined"
+text is included to allow for a system that can identify
+the encodings used for each of its files.
+.LP
+The table of standards that accompanies the charset record description
+is acknowledged to be very limited. Only a limited number
+of character set standards is reasonable for maximal interchange.
+Any character set is, of course, possible by prior agreement. It
+was suggested that EBCDIC be listed, but it was omitted because it
+is not defined by a formal standard. Formal standards, and then
+only those with reasonably large followings, can be included here,
+simply as a matter of practicality. The <\fIvalue\fP>s
+represent names of officially registered character sets in the format
+required by the ISO\ 2375:1985 standard.
+.LP
+The normal comma or <blank>-separated list rules are not followed
+in the case of keyword options to allow ease of argument
+parsing for \fIgetopts\fP.
+.LP
+Further information on character encodings is in pax Archive Character
+Set Encoding/Decoding
+\&.
+.LP
+The standard developers have reserved keyword name space for vendor
+extensions. It is suggested that the format to be used
+is:
+.sp
+.RS
+.nf
+
+\fIVENDOR.keyword\fP
+.fi
+.RE
+.LP
+where \fIVENDOR\fP is the name of the vendor or organization in all
+uppercase letters. It is further suggested that the keyword
+following the period be named differently than any of the standard
+keywords so that it could be used for future standardization, if
+appropriate, by omitting the \fIVENDOR\fP prefix.
+.LP
+The <\fIlength\fP> field in the extended header record was included
+to make it simpler to step through the records, even
+if a record contains an unknown format (to a particular \fIpax\fP)
+with complex interactions of special characters. It also
+provides a minor integrity checkpoint within the records to aid a
+program attempting to recover files from a damaged archive.
+.LP
+There are no extended header versions of the \fIdevmajor\fP and \fIdevminor\fP
+fields because the unspecified format
+\fBustar\fP header field should be sufficient. If they are not, vendor-specific
+extended keywords (such as \fIVENDOR.devmajor\fP)
+should be used.
+.LP
+Device and \fIi\fP-number labeling of files was not adopted from \fIcpio\fP;
+files are interchanged strictly on a symbolic
+name basis, as in \fBustar\fP.
+.LP
+Just as with the \fBustar\fP format descriptions, the new format makes
+no special arrangements for multi-volume archives. Each
+of the \fIpax\fP archive types is assumed to be inside a single POSIX
+file and splitting that file over multiple volumes
+(diskettes, tape cartridges, and so on), processing their labels,
+and mounting each in the proper sequence are considered to be
+implementation details that cannot be described portably.
+.LP
+The \fBpax\fP format is intended for interchange, not only for backup
+on a single (family of) systems. It is not as densely
+packed as might be possible for backup:
+.IP " *" 3
+It contains information as coded characters that could be coded in
+binary.
+.LP
+.IP " *" 3
+It identifies extended records with name fields that could be omitted
+in favor of a fixed-field layout.
+.LP
+.IP " *" 3
+It translates names into a portable character set and identifies locale-related
+information, both of which are probably
+unnecessary for backup.
+.LP
+.LP
+The requirements on restoring from an archive are slightly different
+from the historical wording, allowing for non-monolithic
+privilege to bring forward as much as possible. In particular, attributes
+such as "high performance file" might be broadly but
+not universally granted while set-user-ID or \fIchown\fP() might be
+much more restricted.
+There is no implication in IEEE\ Std\ 1003.1-2001 that the security
+information be honored after it is restored to the file
+hierarchy, in spite of what might be improperly inferred by the silence
+on that topic. That is a topic for another standard.
+.LP
+Links are recorded in the fashion described here because a link can
+be to any file type. It is desirable in general to be able
+to restore part of an archive selectively and restore all of those
+files completely. If the data is not associated with each link,
+it is not possible to do this. However, the data associated with a
+file can be large, and when selective restoration is not needed,
+this can be a significant burden. The archive is structured so that
+files that have no associated data can always be restored by
+the name of any link name of any link, and the user may choose whether
+data is recorded with each instance of a file that contains
+data. The format permits mixing of both types of links in a single
+archive; this can be done for special needs, and \fIpax\fP is
+expected to interpret such archives on input properly, despite the
+fact that there is no \fIpax\fP option that would force this
+mixed case on output. (When \fB-o\fP \fBlinkdata\fP is used, the output
+must contain the duplicate data, but the implementation
+is free to include it or omit it when \fB-o\fP \fBlinkdata\fP is not
+used.)
+.LP
+The time values are included as extended header records for those
+implementations needing more than the eleven octal digits
+allowed by the \fBustar\fP format. Portable file timestamps cannot
+be negative. If \fIpax\fP encounters a file with a negative
+timestamp in \fBcopy\fP or \fBwrite\fP mode, it can reject the file,
+substitute a non-negative timestamp, or generate a
+non-portable timestamp with a leading \fB'-'\fP . Even though some
+implementations can support finer file-time granularities
+than seconds, the normative text requires support only for seconds
+since the Epoch because the ISO\ POSIX-1 standard states
+them that way. The \fBustar\fP format includes only \fImtime\fP; the
+new format adds \fIatime\fP and \fIctime\fP for symmetry.
+The \fIatime\fP access time restored to the file system will be affected
+by the \fB-p\fP \fBa\fP and \fB-p\fP \fBe\fP options.
+The \fIctime\fP creation time (actually \fIinode\fP modification time)
+is described with "appropriate privilege" so that it can
+be ignored when writing to the file system. POSIX does not provide
+a portable means to change file creation time. Nothing is
+intended to prevent a non-portable implementation of \fIpax\fP from
+restoring the value.
+.LP
+The \fIgid\fP, \fIsize\fP, and \fIuid\fP extended header records were
+included to allow expansion beyond the sizes specified
+in the regular \fItar\fP header. New file system architectures are
+emerging that will exhaust the 12-digit size field. There are
+probably not many systems requiring more than 8 digits for user and
+group IDs, but the extended header values were included for
+completeness, allowing overrides for all of the decimal values in
+the \fItar\fP header.
+.LP
+The standard developers intended to describe the effective results
+of \fIpax\fP with regard to file ownerships and permissions;
+implementations are not restricted in timing or sequencing the restoration
+of such, provided the results are as specified.
+.LP
+Much of the text describing the extended headers refers to use in
+" \fBwrite\fP or \fBcopy\fP modes". The \fBcopy\fP mode
+references are due to the normative text: "The effect of the copy
+shall be as if the copied files were written to an archive file
+and then subsequently extracted ...". There is certainly no way to
+test whether \fIpax\fP is actually generating the extended
+headers in \fBcopy\fP mode, but the effects must be as if it had.
+.SS pax Archive Character Set Encoding/Decoding
+.LP
+There is a need to exchange archives of files between systems of different
+native codesets. Filenames, group names, and user
+names must be preserved to the fullest extent possible when an archive
+is read on the receiving platform. Translation of the
+contents of files is not within the scope of the \fIpax\fP utility.
+.LP
+There will also be the need to represent characters that are not available
+on the receiving platform. These unsupported
+characters cannot be automatically folded to the local set of characters
+due to the chance of collisions. This could result in
+overwriting previous extracted files from the archive or pre-existing
+files on the system.
+.LP
+For these reasons, the codeset used to represent characters within
+the extended header records of the \fIpax\fP archive must be
+sufficiently rich to handle all commonly used character sets. The
+fields requiring translation include, at a minimum, filenames,
+user names, group names, and link pathnames. Implementations may wish
+to have localized extended keywords that use non-portable
+characters.
+.LP
+The standard developers considered the following options:
+.IP " *" 3
+The archive creator specifies the well-defined name of the source
+codeset. The receiver must then recognize the codeset name and
+perform the appropriate translations to the destination codeset.
+.LP
+.IP " *" 3
+The archive creator includes within the archive the character mapping
+table for the source codeset used to encode extended
+header records. The receiver must then read the character mapping
+table and perform the appropriate translations to the destination
+codeset.
+.LP
+.IP " *" 3
+The archive creator translates the extended header records in the
+source codeset into a canonical form. The receiver must then
+perform the appropriate translations to the destination codeset.
+.LP
+.LP
+The approach that incorporates the name of the source codeset poses
+the problem of codeset name registration, and makes the
+archive useless to \fIpax\fP archive decoders that do not recognize
+that codeset.
+.LP
+Because parts of an archive may be corrupted, the standard developers
+felt that including the character map of the source
+codeset was too fragile. The loss of this one key component could
+result in making the entire archive useless. (The difference
+between this and the global extended header decision was that the
+latter has a workaround-duplicating extended header records on
+unreliable media-but this would be too burdensome for large character
+set maps.)
+.LP
+Both of the above approaches also put an undue burden on the \fIpax\fP
+archive receiver to handle the cross-product of all
+source and destination codesets.
+.LP
+To simplify the translation from the source codeset to the canonical
+form and from the canonical form to the destination
+codeset, the standard developers decided that the internal representation
+should be a stateless encoding. A stateless encoding is
+one where each codepoint has the same meaning, without regard to the
+decoder being in a specific state. An example of a stateful
+encoding would be the Japanese Shift-JIS; an example of a stateless
+encoding would be the ISO/IEC\ 646:1991 standard
+(equivalent to 7-bit ASCII).
+.LP
+For these reasons, the standard developers decided to adopt a canonical
+format for the representation of file information
+strings. The obvious, well-endorsed candidate is the ISO/IEC\ 10646-1:2000
+standard (based in part on Unicode), which can be
+used to represent the characters of virtually all standardized character
+sets. The standard developers initially agreed upon using
+UCS2 (16-bit Unicode) as the internal representation. This repertoire
+of characters provides a sufficiently rich set to represent
+all commonly-used codesets.
+.LP
+However, the standard developers found that the 16-bit Unicode representation
+had some problems. It forced the issue of
+standardizing byte ordering. The 2-byte length of each character made
+the extended header records twice as long for the case of
+strings coded entirely from historical 7-bit ASCII. For these reasons,
+the standard developers chose the UTF-8 defined in the
+ISO/IEC\ 10646-1:2000 standard. This multi-byte representation encodes
+UCS2 or UCS4 characters reliably and deterministically,
+eliminating the need for a canonical byte ordering. In addition, NUL
+octets and other characters possibly confusing to POSIX file
+systems do not appear, except to represent themselves. It was realized
+that certain national codesets take up more space after the
+encoding, due to their placement within the UCS range; it was felt
+that the usefulness of the encoding of the names outweighs the
+disadvantage of size increase for file, user, and group names.
+.LP
+The encoding of UTF-8 is as follows:
+.sp
+.RS
+.nf
+
+\fBUCS4 Hex Encoding UTF-8 Binary Encoding
+.sp
+
+00000000-0000007F 0xxxxxxx
+00000080-000007FF 110xxxxx 10xxxxxx
+00000800-0000FFFF 1110xxxx 10xxxxxx 10xxxxxx
+00010000-001FFFFF 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
+00200000-03FFFFFF 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
+04000000-7FFFFFFF 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
+\fP
+.fi
+.RE
+.LP
+where each \fB'x'\fP represents a bit value from the character being
+translated.
+.SS ustar Interchange Format
+.LP
+The description of the \fBustar\fP format reflects numerous enhancements
+over pre-1988 versions of the historical \fItar\fP
+utility. The goal of these changes was not only to provide the functional
+enhancements desired, but also to retain compatibility
+between new and old versions. This compatibility has been retained.
+Archives written using the old archive format are compatible
+with the new format.
+.LP
+Implementors should be aware that the previous file format did not
+include a mechanism to archive directory type files. For this
+reason, the convention of using a filename ending with slash was adopted
+to specify a directory on the archive.
+.LP
+The total size of the \fIname\fP and \fIprefix\fP fields have been
+set to meet the minimum requirements for {PATH_MAX}. If a
+pathname will fit within the \fIname\fP field, it is recommended that
+the pathname be stored there without the use of the
+\fIprefix\fP field. Although the name field is known to be too small
+to contain {PATH_MAX} characters, the value was not changed
+in this version of the archive file format to retain backwards-compatibility,
+and instead the prefix was introduced. Also, because
+of the earlier version of the format, there is no way to remove the
+restriction on the \fIlinkname\fP field being limited in size
+to just that of the \fIname\fP field.
+.LP
+The \fIsize\fP field is required to be meaningful in all implementation
+extensions, although it could be zero. This is required
+so that the data blocks can always be properly counted.
+.LP
+It is suggested that if device special files need to be represented
+that cannot be represented in the standard format, that one
+of the extension types ( \fBA\fP- \fBZ\fP) be used, and that the additional
+information for the special file be represented as
+data and be reflected in the \fIsize\fP field.
+.LP
+Attempting to restore a special file type, where it is converted to
+ordinary data and conflicts with an existing filename, need
+not be specially detected by the utility. If run as an ordinary user,
+\fIpax\fP should not be able to overwrite the entries in,
+for example, \fB/dev\fP in any case (whether the file is converted
+to another type or not). If run as a privileged user, it should
+be able to do so, and it would be considered a bug if it did not.
+The same is true of ordinary data files and similarly named
+special files; it is impossible to anticipate the needs of the user
+(who could really intend to overwrite the file), so the
+behavior should be predictable (and thus regular) and rely on the
+protection system as required.
+.LP
+The value 7 in the \fItypeflag\fP field is intended to define how
+contiguous files can be stored in a \fBustar\fP archive.
+IEEE\ Std\ 1003.1-2001 does not require the contiguous file extension,
+but does define a standard way of archiving such
+files so that all conforming systems can interpret these file types
+in a meaningful and consistent manner. On a system that does
+not support extended file types, the \fIpax\fP utility should do the
+best it can with the file and go on to the next.
+.LP
+The file protection modes are those conventionally used by the \fIls\fP
+utility. This is
+extended beyond the usage in the ISO\ POSIX-2 standard to support
+the "shared text" or "sticky" bit. It is intended that
+the conformance document should not document anything beyond the existence
+of and support of such a mode. Further extensions are
+expected to these bits, particularly with overloading the set-user-ID
+and set-group-ID flags.
+.SS cpio Interchange Format
+.LP
+The reference to appropriate privilege in the \fBcpio\fP format refers
+to an error on standard output; the \fBustar\fP format
+does not make comparable statements.
+.LP
+The model for this format was the historical System V \fIcpio\fP \fB-c\fP
+data interchange format. This model documents the
+portable version of the \fBcpio\fP format and not the binary version.
+It has the flexibility to transfer data of any type
+described within IEEE\ Std\ 1003.1-2001, yet is extensible to transfer
+data types specific to extensions beyond
+IEEE\ Std\ 1003.1-2001 (for example, contiguous files). Because it
+describes existing practice, there is no question of
+maintaining upwards-compatibility.
+.SS cpio Header
+.LP
+There has been some concern that the size of the \fIc_ino\fP field
+of the header is too small to handle those systems that have
+very large \fIinode\fP numbers. However, the \fIc_ino\fP field in
+the header is used strictly as a hard-link resolution mechanism
+for archives. It is not necessarily the same value as the \fIinode\fP
+number of the file in the location from which that file is
+extracted.
+.LP
+The name \fIc_magic\fP is based on historical usage.
+.SS cpio Filename
+.LP
+For most historical implementations of the \fIcpio\fP utility, {PATH_MAX}
+octets can be used to describe the pathname without
+the addition of any other header fields (the NUL character would be
+included in this count). {PATH_MAX} is the minimum value for
+pathname size, documented as 256 bytes. However, an implementation
+may use \fIc_namesize\fP to determine the exact length of the
+pathname. With the current description of the \fI<cpio.h>\fP header,
+this pathname
+size can be as large as a number that is described in six octal digits.
+.LP
+Two values are documented under the \fIc_mode\fP field values to provide
+for extensibility for known file types:
+.TP 7
+\fB0110\ 000\fP
+Reserved for contiguous files. The implementation may treat the rest
+of the information for this archive like a regular file.
+If this file type is undefined, the implementation may create the
+file as a regular file.
+.sp
+.LP
+This provides for extensibility of the \fBcpio\fP format while allowing
+for the ability to read old archives. Files of an
+unknown type may be read as "regular files" on some implementations.
+On a system that does not support extended file types, the
+\fIpax\fP utility should do the best it can with the file and go on
+to the next.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIShell Command Language\fP, \fIcp\fP, \fIed\fP, \fIgetopts\fP,
+\fIls\fP, \fIprintf\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<cpio.h>\fP, the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+\fIchown\fP(), \fIcreat\fP(), \fImkdir\fP(), \fImkfifo\fP(), \fIstat\fP(),
+\fIutime\fP(), \fIwrite\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/pr.1p b/man-pages-posix-2003/man1p/pr.1p
new file mode 100644
index 0000000..4cb2385
--- /dev/null
+++ b/man-pages-posix-2003/man1p/pr.1p
@@ -0,0 +1,419 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PR" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pr
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pr \- print files
+.SH SYNOPSIS
+.LP
+\fBpr\fP
+\fB[\fP\fB+\fP\fIpage\fP\fB][\fP\fB-\fP\fIcolumn\fP\fB][\fP\fB-adFmrt\fP\fB][\fP\fB-e\fP\fB[\fP\fIchar\fP\fB][\fP\fI
+gap\fP\fB]][\fP\fB-h\fP \fIheader\fP\fB][\fP\fB-i\fP\fB[\fP\fIchar\fP\fB][\fP\fIgap\fP\fB]]
+.sp
+\fP \fB\ \ \ \ \ \ \fP \fB[\fP\fB-l\fP
+\fIlines\fP\fB][\fP\fB-n\fP\fB[\fP\fIchar\fP\fB][\fP\fIwidth\fP\fB]][\fP\fB-o\fP
+\fIoffset\fP\fB][\fP\fB-s\fP\fB[\fP\fIchar\fP\fB]][\fP\fB-w\fP \fIwidth\fP\fB][\fP\fB-fp\fP\fB]
+.br
+\fP \fB\ \ \ \ \ \ \fP \fB[\fP\fIfile\fP\fB...\fP\fB]\fP
+.SH DESCRIPTION
+.LP
+The \fIpr\fP utility is a printing and pagination filter. If multiple
+input files are specified, each shall be read, formatted,
+and written to standard output. By default, the input shall be separated
+into 66-line pages, each with:
+.IP " *" 3
+A 5-line header that includes the page number, date, time, and the
+pathname of the file
+.LP
+.IP " *" 3
+A 5-line trailer consisting of blank lines
+.LP
+.LP
+If standard output is associated with a terminal, diagnostic messages
+shall be deferred until the \fIpr\fP utility has
+completed processing.
+.LP
+When options specifying multi-column output are specified, output
+text columns shall be of equal width; input lines that do not
+fit into a text column shall be truncated. By default, text columns
+shall be separated with at least one <blank>.
+.SH OPTIONS
+.LP
+The \fIpr\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines,
+except that: the \fIpage\fP option has a
+\fB'+'\fP delimiter; \fIpage\fP and \fIcolumn\fP can be multi-digit
+numbers; some of the option-arguments are optional; and
+some of the option-arguments cannot be specified as separate arguments
+from the preceding option letter. In particular, the
+\fB-s\fP option does not allow the option letter to be separated from
+its argument, and the options \fB-e\fP, \fB-i\fP, and
+\fB-n\fP require that both arguments, if present, not be separated
+from the option letter.
+.LP
+The following options shall be supported. In the following option
+descriptions, \fIcolumn\fP, \fIlines\fP, \fIoffset\fP,
+\fIpage\fP, and \fIwidth\fP are positive decimal integers; \fIgap\fP
+is a non-negative decimal integer.
+.TP 7
+\fB+\fP\fIpage\fP
+Begin output at page number \fIpage\fP of the formatted input.
+.TP 7
+\fB-\fP\fIcolumn\fP
+Produce multi-column output that is arranged in \fIcolumn\fP columns
+(the default shall be 1) and is written down each column
+in the order in which the text is received from the input file. This
+option should not be used with \fB-m\fP. The options
+\fB-e\fP and \fB-i\fP shall be assumed for multiple text-column output.
+Whether or not text columns are produced with identical
+vertical lengths is unspecified, but a text column shall never exceed
+the length of the page (see the \fB-l\fP option). When used
+with \fB-t\fP, use the minimum number of lines to write the output.
+.TP 7
+\fB-a\fP
+Modify the effect of the \fB-\fP \fIcolumn\fP option so that the columns
+are filled across the page in a round-robin order
+(for example, when \fIcolumn\fP is 2, the first input line heads column
+1, the second heads column 2, the third is the second line
+in column 1, and so on).
+.TP 7
+\fB-d\fP
+Produce output that is double-spaced; append an extra <newline> following
+every <newline> found in the input.
+.TP 7
+\fB-e[\fP\fIchar\fP\fB][\fP\fIgap\fP\fB]\fP
+.sp
+Expand each input <tab> to the next greater column position specified
+by the formula \fIn\fP* \fIgap\fP+1, where \fIn\fP
+is an integer > 0. If \fIgap\fP is zero or is omitted, it shall default
+to 8. All <tab>s in the input shall be expanded
+into the appropriate number of <space>s. If any non-digit character,
+\fIchar\fP, is specified, it shall be used as the input
+<tab>.
+.TP 7
+\fB-f\fP
+Use a <form-feed> for new pages, instead of the default behavior that
+uses a sequence of <newline>s. Pause before
+beginning the first page if the standard output is associated with
+a terminal.
+.TP 7
+\fB-F\fP
+Use a <form-feed> for new pages, instead of the default behavior that
+uses a sequence of <newline>s.
+.TP 7
+\fB-h\ \fP \fIheader\fP
+Use the string \fIheader\fP to replace the contents of the \fIfile\fP
+operand in the page header.
+.TP 7
+\fB-i[\fP\fIchar\fP\fB][\fP\fIgap\fP\fB]\fP
+In output, replace multiple <space>s with <tab>s wherever two or more
+adjacent <space>s reach column
+positions \fIgap\fP+1, 2* \fIgap\fP+1, 3* \fIgap\fP+1, and so on.
+If \fIgap\fP is zero or is omitted, default tab settings at
+every eighth column position shall be assumed. If any non-digit character,
+\fIchar\fP, is specified, it shall be used as the
+output <tab>.
+.TP 7
+\fB-l\ \fP \fIlines\fP
+Override the 66-line default and reset the page length to \fIlines\fP.
+If \fIlines\fP is not greater than the sum of both the
+header and trailer depths (in lines), the \fIpr\fP utility shall suppress
+both the header and trailer, as if the \fB-t\fP option
+were in effect.
+.TP 7
+\fB-m\fP
+Merge files. Standard output shall be formatted so the \fIpr\fP utility
+writes one line from each file specified by a
+\fIfile\fP operand, side by side into text columns of equal fixed
+widths, in terms of the number of column positions.
+Implementations shall support merging of at least nine \fIfile\fP
+operands.
+.TP 7
+\fB-n[\fP\fIchar\fP\fB][\fP\fIwidth\fP\fB]\fP
+.sp
+Provide \fIwidth\fP-digit line numbering (default for \fIwidth\fP
+shall be 5). The number shall occupy the first \fIwidth\fP
+column positions of each text column of default output or each line
+of \fB-m\fP output. If \fIchar\fP (any non-digit character)
+is given, it shall be appended to the line number to separate it from
+whatever follows (default for \fIchar\fP is a
+<tab>).
+.TP 7
+\fB-o\ \fP \fIoffset\fP
+Each line of output shall be preceded by offset <space>s. If the \fB-o\fP
+option is not specified, the default offset
+shall be zero. The space taken is in addition to the output line width
+(see the \fB-w\fP option below).
+.TP 7
+\fB-p\fP
+Pause before beginning each page if the standard output is directed
+to a terminal ( \fIpr\fP shall write an <alert> to
+standard error and wait for a <carriage-return> to be read on \fB/dev/tty\fP).
+.TP 7
+\fB-r\fP
+Write no diagnostic reports on failure to open files.
+.TP 7
+\fB-s[\fP\fIchar\fP\fB]\fP
+Separate text columns by the single character \fIchar\fP instead of
+by the appropriate number of <space>s (default for
+\fIchar\fP shall be <tab>).
+.TP 7
+\fB-t\fP
+Write neither the five-line identifying header nor the five-line trailer
+usually supplied for each page. Quit writing after the
+last line of each file without spacing to the end of the page.
+.TP 7
+\fB-w\ \fP \fIwidth\fP
+Set the width of the line to \fIwidth\fP column positions for multiple
+text-column output only. If the \fB-w\fP option is not
+specified and the \fB-s\fP option is not specified, the default width
+shall be 72. If the \fB-w\fP option is not specified and
+the \fB-s\fP option is specified, the default width shall be 512.
+.LP
+For single column output, input lines shall not be truncated.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of a file to be written. If no \fIfile\fP operands are
+specified, or if a \fIfile\fP operand is \fB'-'\fP, the
+standard input shall be used.
+.sp
+.SH STDIN
+.LP
+The standard input shall be used only if no \fIfile\fP operands are
+specified, or if a \fIfile\fP operand is \fB'-'\fP .
+See the INPUT FILES section.
+.SH INPUT FILES
+.LP
+The input files shall be text files.
+.LP
+The file \fB/dev/tty\fP shall be used to read responses required by
+the \fB-p\fP option.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIpr\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files) and
+which characters are defined as printable (character class
+\fBprint\fP). Non-printable characters are still written to standard
+output, but are not counted for the purpose for column-width
+and line-length calculations.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fILC_TIME\fP
+Determine the format of the date and time for use in writing header
+lines.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fITZ\fP
+Determine the timezone used to calculate date and time strings written
+in header lines. If \fITZ\fP is unset or null, an
+unspecified default timezone shall be used.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+If \fIpr\fP receives an interrupt while writing to a terminal, it
+shall flush all accumulated error messages to the screen
+before terminating.
+.SH STDOUT
+.LP
+The \fIpr\fP utility output shall be a paginated version of the original
+file (or files). This pagination shall be accomplished
+using either <form-feed>s or a sequence of <newline>s, as controlled
+by the \fB-F\fP or \fB-f\fP
+option. Page headers shall be generated unless the \fB-t\fP option
+is specified. The page headers shall be of the form:
+.sp
+.RS
+.nf
+
+\fB"\\n\\n%s %s Page %d\\n\\n\\n", <\fP\fIoutput of date\fP\fB>, <\fP\fIfile\fP\fB>, <\fP\fIpage number\fP\fB>
+\fP
+.fi
+.RE
+.LP
+In the POSIX locale, the <\fIoutput\ of\ date\fP> field, representing
+the date and time of last modification of
+the input file (or the current date and time if the input file is
+standard input), shall be equivalent to the output of the
+following command as it would appear if executed at the given time:
+.sp
+.RS
+.nf
+
+\fBdate "+%b %e %H:%M %Y"
+\fP
+.fi
+.RE
+.LP
+without the trailing <newline>, if the page being written is from
+standard input. If the page being written is not from
+standard input, in the POSIX locale, the same format shall be used,
+but the time used shall be the modification time of the file
+corresponding to \fIfile\fP instead of the current time. When the
+\fILC_TIME\fP locale category is not set to the POSIX locale, a
+different format and order of presentation of this field may be used.
+.LP
+If the standard input is used instead of a \fIfile\fP operand, the
+<\fIfile\fP> field shall be replaced by a null
+string.
+.LP
+If the \fB-h\fP option is specified, the <\fIfile\fP> field shall
+be replaced by the \fIheader\fP argument.
+.SH STDERR
+.LP
+The standard error shall be used for diagnostic messages and for alerting
+the terminal when \fB-p\fP is specified.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.IP " 1." 4
+Print a numbered list of all files in the current directory:
+.sp
+.RS
+.nf
+
+\fBls -a | pr -n -h "Files in $(pwd)."
+\fP
+.fi
+.RE
+.LP
+.IP " 2." 4
+Print \fBfile1\fP and \fBfile2\fP as a double-spaced, three-column
+listing headed by "file list'':
+.sp
+.RS
+.nf
+
+\fBpr -3d -h "file list" file1 file2
+\fP
+.fi
+.RE
+.LP
+.IP " 3." 4
+Write \fBfile1\fP on \fBfile2\fP, expanding tabs to columns 10, 19,
+28, ...:
+.sp
+.RS
+.nf
+
+\fBpr -e9 -t <file1 >file2
+\fP
+.fi
+.RE
+.LP
+.SH RATIONALE
+.LP
+This utility is one of those that does not follow the Utility Syntax
+Guidelines because of its historical origins. The standard
+developers could have added new options that obeyed the guidelines
+(and marked the old options obsolescent) or devised an entirely
+new utility; there are examples of both actions in this volume of
+IEEE\ Std\ 1003.1-2001. Because of its widespread use by
+historical applications, the standard developers decided to exempt
+this version of \fIpr\fP from many of the guidelines.
+.LP
+Implementations are required to accept option-arguments to the \fB-h\fP,
+\fB-l\fP, \fB-o\fP, and \fB-w\fP options whether
+presented as part of the same argument or as a separate argument to
+\fIpr\fP, as suggested by the Utility Syntax Guidelines. The
+\fB-n\fP and \fB-s\fP options, however, are specified as in historical
+practice because they are frequently specified without
+their optional arguments. If a <blank> were allowed before the option-argument
+in these cases, a \fIfile\fP operand could
+mistakenly be interpreted as an option-argument in historical applications.
+.LP
+The text about the minimum number of lines in multi-column output
+was included to ensure that a best effort is made in balancing
+the length of the columns. There are known historical implementations
+in which, for example, 60-line files are listed by \fIpr\fP
+-2 as one column of 56 lines and a second of 4. Although this is not
+a problem when a full page with headers and trailers is
+produced, it would be relatively useless when used with \fB-t\fP.
+.LP
+Historical implementations of the \fIpr\fP utility have differed in
+the action taken for the \fB-f\fP option. BSD uses it as
+described here for the \fB-F\fP option; System V uses it to change
+trailing <newline>s on each page to a <form-feed>
+and, if standard output is a TTY device, sends an <alert> to standard
+error and reads a line from \fB/dev/tty\fP before the
+first page. There were strong arguments from both sides of this issue
+concerning historical practice and as a result the \fB-F\fP
+option was added. XSI-conformant systems support the System V historical
+actions for the \fB-f\fP option.
+.LP
+The <\fIoutput\ of\ date\fP> field in the \fB-l\fP format is specified
+only for the POSIX locale. As noted, the
+format can be different in other locales. No mechanism for defining
+this is present in this volume of
+IEEE\ Std\ 1003.1-2001, as the appropriate vehicle is a message catalog;
+that is, the format should be specified as a
+"message".
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexpand\fP, \fIlp\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/printf.1p b/man-pages-posix-2003/man1p/printf.1p
new file mode 100644
index 0000000..c50038c
--- /dev/null
+++ b/man-pages-posix-2003/man1p/printf.1p
@@ -0,0 +1,431 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PRINTF" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" printf
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+printf \- write formatted output
+.SH SYNOPSIS
+.LP
+\fBprintf\fP \fIformat\fP\fB[\fP\fIargument\fP\fB...\fP\fB]\fP
+.SH DESCRIPTION
+.LP
+The \fIprintf\fP utility shall write formatted operands to the standard
+output. The \fIargument\fP operands shall be formatted
+under control of the \fIformat\fP operand.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIformat\fP
+A string describing the format to use to write the remaining operands.
+See the EXTENDED DESCRIPTION section.
+.TP 7
+\fIargument\fP
+The strings to be written to standard output, under the control of
+\fIformat\fP. See the EXTENDED DESCRIPTION section.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIprintf\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fILC_NUMERIC\fP
+.sp
+Determine the locale for numeric formatting. It shall affect the format
+of numbers written using the \fBe\fP, \fBE\fP,
+\fBf\fP, \fBg\fP, and \fBG\fP conversion specifier characters (if
+supported).
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+See the EXTENDED DESCRIPTION section.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+The \fIformat\fP operand shall be used as the \fIformat\fP string
+described in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 5, File Format Notation with the following
+exceptions:
+.IP " 1." 4
+A <space> in the format string, in any context other than a flag of
+a conversion specification, shall be treated as an
+ordinary character that is copied to the output.
+.LP
+.IP " 2." 4
+A \fB' '\fP character in the format string shall be treated as a \fB' '\fP
+character, not as a <space>.
+.LP
+.IP " 3." 4
+In addition to the escape sequences shown in the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 5, File Format Notation
+( \fB'\\\\'\fP, \fB'\\a'\fP, \fB'\\b'\fP, \fB'\\f'\fP,
+\fB'\\n'\fP, \fB'\\r'\fP, \fB'\\t'\fP, \fB'\\v'\fP ), \fB"\\ddd"\fP,
+where \fIddd\fP is a one, two, or three-digit
+octal number, shall be written as a byte with the numeric value specified
+by the octal number.
+.LP
+.IP " 4." 4
+The implementation shall not precede or follow output from the \fBd\fP
+or \fBu\fP conversion specifiers with
+<blank>s not specified by the \fIformat\fP operand.
+.LP
+.IP " 5." 4
+The implementation shall not precede output from the \fBo\fP conversion
+specifier with zeros not specified by the
+\fIformat\fP operand.
+.LP
+.IP " 6." 4
+The \fBe\fP, \fBE\fP, \fBf\fP, \fBg\fP, and \fBG\fP conversion
+specifiers need not be supported.
+.LP
+.IP " 7." 4
+An additional conversion specifier character, \fBb\fP, shall be supported
+as follows. The argument shall be taken to be a
+string that may contain backslash-escape sequences. The following
+backslash-escape sequences shall be supported:
+.RS
+.IP " *" 3
+The escape sequences listed in the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 5, File Format Notation ( \fB'\\\\'\fP, \fB'\\a'\fP, \fB'\\b'\fP,
+\fB'\\f'\fP,
+\fB'\\n'\fP, \fB'\\r'\fP, \fB'\\t'\fP, \fB'\\v'\fP ), which shall
+be converted to the characters they represent
+.LP
+.IP " *" 3
+\fB"\\0ddd"\fP, where \fIddd\fP is a zero, one, two, or three-digit
+octal number that shall be converted to a byte with the
+numeric value specified by the octal number
+.LP
+.IP " *" 3
+\fB'\\c'\fP, which shall not be written and shall cause \fIprintf\fP
+to ignore any remaining characters in the string
+operand containing it, any remaining string operands, and any additional
+characters in the \fIformat\fP operand
+.LP
+.RE
+.LP
+The interpretation of a backslash followed by any other sequence of
+characters is unspecified.
+.LP
+Bytes from the converted string shall be written until the end of
+the string or the number of bytes indicated by the precision
+specification is reached. If the precision is omitted, it shall be
+taken to be infinite, so all bytes up to the end of the
+converted string shall be written.
+.LP
+.IP " 8." 4
+For each conversion specification that consumes an argument, the next
+argument operand shall be evaluated and converted to the
+appropriate type for the conversion as specified below.
+.LP
+.IP " 9." 4
+The \fIformat\fP operand shall be reused as often as necessary to
+satisfy the argument operands. Any extra \fBc\fP or
+\fBs\fP conversion specifiers shall be evaluated as if a null string
+argument were supplied; other extra conversion
+specifications shall be evaluated as if a zero argument were supplied.
+If the \fIformat\fP operand contains no conversion
+specifications and \fIargument\fP operands are present, the results
+are unspecified.
+.LP
+.IP "10." 4
+If a character sequence in the \fIformat\fP operand begins with a
+\fB'%'\fP character, but does not form a valid conversion
+specification, the behavior is unspecified.
+.LP
+.LP
+The \fIargument\fP operands shall be treated as strings if the corresponding
+conversion specifier is \fBb\fP, \fBc\fP,
+or \fBs\fP ; otherwise, it shall be evaluated as a C constant, as
+described by the ISO\ C standard, with the following
+extensions:
+.IP " *" 3
+A leading plus or minus sign shall be allowed.
+.LP
+.IP " *" 3
+If the leading character is a single-quote or double-quote, the value
+shall be the numeric value in the underlying codeset of
+the character following the single-quote or double-quote.
+.LP
+.LP
+If an argument operand cannot be completely converted into an internal
+value appropriate to the corresponding conversion
+specification, a diagnostic message shall be written to standard error
+and the utility shall not exit with a zero exit status, but
+shall continue processing any remaining operands and shall write the
+value accumulated at the time the error was detected to
+standard output.
+.LP
+It is not considered an error if an argument operand is not completely
+used for a \fBc\fP or \fBs\fP conversion or if a
+string operand's first or second character is used to get the numeric
+value of a character.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The floating-point formatting conversion specifications of \fIprintf\fP()
+are not
+required because all arithmetic in the shell is integer arithmetic.
+The \fIawk\fP utility
+performs floating-point calculations and provides its own \fBprintf\fP
+function. The \fIbc\fP
+utility can perform arbitrary-precision floating-point arithmetic,
+but does not provide extensive formatting capabilities. (This
+\fIprintf\fP utility cannot really be used to format \fIbc\fP output;
+it does not support
+arbitrary precision.) Implementations are encouraged to support the
+floating-point conversions as an extension.
+.LP
+Note that this \fIprintf\fP utility, like the \fIprintf\fP() function
+defined in the
+System Interfaces volume of IEEE\ Std\ 1003.1-2001 on which it is
+based, makes no special provision for dealing with
+multi-byte characters when using the \fB%c\fP conversion specification
+or when a precision is specified in a \fB%b\fP or
+\fB%s\fP conversion specification. Applications should be extremely
+cautious using either of these features when there are
+multi-byte characters in the character set.
+.LP
+No provision is made in this volume of IEEE\ Std\ 1003.1-2001 which
+allows field widths and precisions to be specified
+as \fB'*'\fP since the \fB'*'\fP can be replaced directly in the \fIformat\fP
+operand using shell variable substitution.
+Implementations can also provide this feature as an extension if they
+so choose.
+.LP
+Hexadecimal character constants as defined in the ISO\ C standard
+are not recognized in the \fIformat\fP operand because
+there is no consistent way to detect the end of the constant. Octal
+character constants are limited to, at most, three octal
+digits, but hexadecimal character constants are only terminated by
+a non-hex-digit character. In the ISO\ C standard, the
+\fB"##"\fP concatenation operator can be used to terminate a constant
+and follow it with a hexadecimal character to be written.
+In the shell, concatenation occurs before the \fIprintf\fP utility
+has a chance to parse the end of the hexadecimal constant.
+.LP
+The \fB%b\fP conversion specification is not part of the ISO\ C standard;
+it has been added here as a portable way to
+process backslash escapes expanded in string operands as provided
+by the \fIecho\fP utility.
+See also the APPLICATION USAGE section of \fIecho\fP for ways to use
+\fIprintf\fP as a replacement for
+all of the traditional versions of the \fIecho\fP utility.
+.LP
+If an argument cannot be parsed correctly for the corresponding conversion
+specification, the \fIprintf\fP utility is required
+to report an error. Thus, overflow and extraneous characters at the
+end of an argument being used for a numeric conversion shall be
+reported as errors.
+.SH EXAMPLES
+.LP
+To alert the user and then print and read a series of prompts:
+.sp
+.RS
+.nf
+
+\fBprintf "\\aPlease fill in the following: \\nName: "
+read name
+printf "Phone number: "
+read phone
+\fP
+.fi
+.RE
+.LP
+To read out a list of right and wrong answers from a file, calculate
+the percentage correctly, and print them out. The numbers
+are right-justified and separated by a single <tab>. The percentage
+is written to one decimal place of accuracy:
+.sp
+.RS
+.nf
+
+\fBwhile read right wrong ; do
+ percent=$(echo "scale=1;($right*100)/($right+$wrong)" | bc)
+ printf "%2d right\\t%2d wrong\\t(%s%%)\\n" \\
+ $right $wrong $percent
+done < database_file
+\fP
+.fi
+.RE
+The command:
+.sp
+.RS
+.nf
+
+\fBprintf "%5d%4d\\n" 1 21 321 4321 54321
+\fP
+.fi
+.RE
+.LP
+produces:
+.sp
+.RS
+.nf
+
+\fB 1 21
+ 3214321
+54321 0
+\fP
+.fi
+.RE
+.LP
+Note that the \fIformat\fP operand is used three times to print all
+of the given strings and that a \fB'0'\fP was supplied
+by \fIprintf\fP to satisfy the last \fB%4d\fP conversion specification.
+.LP
+The \fIprintf\fP utility is required to notify the user when conversion
+errors are detected while producing numeric output;
+thus, the following results would be expected on an implementation
+with 32-bit twos-complement integers when \fB%d\fP is
+specified as the \fIformat\fP operand:
+.TS C
+center; l1 l1 l.
+\fB\ \fP \fBStandard\fP \fB\ \fP
+\fBArgument\fP \fBOutput\fP \fBDiagnostic Output\fP
+5a 5 printf: "5a" not completely converted
+9999999999 2147483647 printf: "9999999999" arithmetic overflow
+-9999999999 -2147483648 printf: "-9999999999" arithmetic overflow
+ABC 0 printf: "ABC" expected numeric value
+.TE
+.LP
+The diagnostic message format is not specified, but these examples
+convey the type of information that should be reported. Note
+that the value shown on standard output is what would be expected
+as the return value from the \fIstrtol\fP() function as defined in
+the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001. A similar correspondence exists between \fB%u\fP
+and \fIstrtoul\fP() and \fB%e\fP, \fB%f\fP, and \fB%g\fP (if the
+implementation supports
+floating-point conversions) and \fIstrtod\fP().
+.LP
+In a locale using the ISO/IEC\ 646:1991 standard as the underlying
+codeset, the command:
+.sp
+.RS
+.nf
+
+\fBprintf "%d\\n" 3 +3 -3 \\'3 \\"+3 "'-3"
+\fP
+.fi
+.RE
+.LP
+produces:
+.TP 7
+3
+Numeric value of constant 3
+.TP 7
+3
+Numeric value of constant 3
+.TP 7
+-3
+Numeric value of constant -3
+.TP 7
+51
+Numeric value of the character \fB'3'\fP in the ISO/IEC\ 646:1991
+standard codeset
+.TP 7
+43
+Numeric value of the character \fB'+'\fP in the ISO/IEC\ 646:1991
+standard codeset
+.TP 7
+45
+Numeric value of the character \fB'-'\fP in the ISO/IEC\ 646:1991
+standard codeset
+.sp
+.LP
+Note that in a locale with multi-byte characters, the value of a character
+is intended to be the value of the equivalent of the
+\fBwchar_t\fP representation of the character as described in the
+System Interfaces volume of IEEE\ Std\ 1003.1-2001.
+.SH RATIONALE
+.LP
+The \fIprintf\fP utility was added to provide functionality that has
+historically been provided by \fIecho\fP. However, due to irreconcilable
+differences in the various versions of \fIecho\fP extant, the version
+has few special features, leaving those to this new \fIprintf\fP
+utility, which is based on one in the Ninth Edition system.
+.LP
+The EXTENDED DESCRIPTION section almost exactly matches the \fIprintf\fP()
+function in
+the ISO\ C standard, although it is described in terms of the file
+format notation in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 5, File Format Notation.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIawk\fP, \fIbc\fP, \fIecho\fP, the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIprintf\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/prs.1p b/man-pages-posix-2003/man1p/prs.1p
new file mode 100644
index 0000000..b02da32
--- /dev/null
+++ b/man-pages-posix-2003/man1p/prs.1p
@@ -0,0 +1,406 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PRS" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" prs
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+prs \- print an SCCS file (\fBDEVELOPMENT\fP)
+.SH SYNOPSIS
+.LP
+\fBprs\fP \fB[\fP\fB-a\fP\fB][\fP\fB-d\fP
+\fIdataspec\fP\fB][\fP\fB-r\fP\fB[\fP\fISID\fP\fB]]\fP \fIfile\fP\fB...
+.br
+.sp
+\fP
+.LP
+\fBprs\fP \fB[\fP \fB-e| -l\fP\fB]\fP \fB-c\fP \fIcutoff\fP \fB[\fP\fB-d\fP
+\fIdataspec\fP\fB]\fP \fIfile\fP\fB...
+.br
+.sp
+\fP
+.LP
+\fBprs\fP \fB[\fP \fB-e| -l\fP\fB]\fP \fB-r\fP\fB[\fP\fISID\fP\fB][\fP\fB-d\fP
+\fIdataspec\fP\fB]\fP\fIfile\fP\fB...
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIprs\fP utility shall write to standard output parts or all
+of an SCCS file in a user-supplied format.
+.SH OPTIONS
+.LP
+The \fIprs\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines,
+except that the \fB-r\fP option has an
+optional option-argument. This optional option-argument cannot be
+presented as a separate argument. The following options shall be
+supported:
+.TP 7
+\fB-d\ \fP \fIdataspec\fP
+Specify the output data specification. The \fIdataspec\fP shall be
+a string consisting of SCCS file \fIdata\fP
+\fIkeywords\fP (see Data Keywords ) interspersed with optional user-supplied
+text.
+.TP 7
+\fB-r[\fP\fISID\fP\fB]\fP
+Specify the SCCS identification string (SID) of a delta for which
+information is desired. If no \fISID\fP option-argument is
+specified, the SID of the most recently created delta shall be assumed.
+.TP 7
+\fB-e\fP
+Request information for all deltas created earlier than and including
+the delta designated via the \fB-r\fP option or the
+date-time given by the \fB-c\fP option.
+.TP 7
+\fB-l\fP
+Request information for all deltas created later than and including
+the delta designated via the \fB-r\fP option or the
+date-time given by the \fB-c\fP option.
+.TP 7
+\fB-c\ \fP \fIcutoff\fP
+Indicate the \fIcutoff\fP date-time, in the form:
+.sp
+.RS
+.nf
+
+\fIYY\fP\fB[\fP\fIMM\fP\fB[\fP\fIDD\fP\fB[\fP\fIHH\fP\fB[\fP\fIMM\fP\fB[\fP\fISS\fP\fB]]]]]\fP
+.fi
+.RE
+.LP
+For the \fIYY\fP component, values in the range [69,99] shall refer
+to years 1969 to 1999 inclusive, and values in the range
+[00,68] shall refer to years 2000 to 2068 inclusive.
+.TP 7
+\fBNote:\fP
+.RS
+It is expected that in a future version of IEEE\ Std\ 1003.1-2001
+the default century inferred from a 2-digit year will
+change. (This would apply to all commands accepting a 2-digit year
+as input.)
+.RE
+.sp
+.LP
+No changes (deltas) to the SCCS file that were created after the specified
+\fIcutoff\fP date-time shall be included in the
+output. Units omitted from the date-time default to their maximum
+possible values; for example, \fB-c\ 7502\fP is equivalent
+to \fB-c\ 750228235959\fP.
+.TP 7
+\fB-a\fP
+Request writing of information for both removed-that is, \fIdelta\fP
+\fItype\fP=
+\fIR\fP (see \fIrmdel\fP )- and existing-that is, \fIdelta\fP
+\fItype\fP= \fID\fP,- deltas. If the \fB-a\fP option is not specified,
+information for existing deltas only shall be
+provided.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of an existing SCCS file or a directory. If \fIfile\fP
+is a directory, the \fIprs\fP utility shall behave as
+though each file in the directory were specified as a named file,
+except that non-SCCS files (last component of the pathname does
+not begin with \fBs.\fP) and unreadable files shall be silently ignored.
+.LP
+If exactly one \fIfile\fP operand appears, and it is \fB'-'\fP, the
+standard input shall be read; each line of the standard
+input shall be taken to be the name of an SCCS file to be processed.
+Non-SCCS files and unreadable files shall be silently
+ignored.
+.sp
+.SH STDIN
+.LP
+The standard input shall be a text file used only when the \fIfile\fP
+operand is specified as \fB'-'\fP . Each line of the
+text file shall be interpreted as an SCCS pathname.
+.SH INPUT FILES
+.LP
+Any SCCS files displayed are files of an unspecified format.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIprs\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The standard output shall be a text file whose format is dependent
+on the data keywords specified with the \fB-d\fP option.
+.SS Data Keywords
+.LP
+Data keywords specify which parts of an SCCS file shall be retrieved
+and output. All parts of an SCCS file have an associated
+data keyword. A data keyword may appear in a \fIdataspec\fP multiple
+times.
+.LP
+The information written by \fIprs\fP shall consist of:
+.IP " 1." 4
+The user-supplied text
+.LP
+.IP " 2." 4
+Appropriate values (extracted from the SCCS file) substituted for
+the recognized data keywords in the order of appearance in the
+\fIdataspec\fP
+.LP
+.LP
+The format of a data keyword value shall either be simple ( \fB'S'\fP
+), in which keyword substitution is direct, or
+multi-line ( \fB'M'\fP ).
+.LP
+User-supplied text shall be any text other than recognized data keywords.
+A <tab> shall be specified by \fB'\\t'\fP and
+<newline> by \fB'\\n'\fP . When the \fB-r\fP option is not specified,
+the default \fIdataspec\fP shall be:
+.sp
+.RS
+.nf
+
+\fB:PN::\\n\\n
+\fP
+.fi
+.RE
+.LP
+and the following \fIdataspec\fP shall be used for each selected delta:
+.sp
+.RS
+.nf
+
+\fB:Dt:\\t:DL:\\nMRs:\\n:MR:COMMENTS:\\n:C:
+\fP
+.fi
+.RE
+.TS C
+center;c1 s1 s1 s1 s.
+\fBSCCS File Data Keywords\fP
+.T&
+l l l l l.
+\fBKeyword\fP \fBData Item\fP \fBFile Section\fP \fBValue\fP \fBFormat\fP
+\fB:Dt:\fP Delta information Delta Table \fBSee below*\fP S
+\fB:DL:\fP Delta line statistics " \fB:Li:/:Ld:/:Lu:\fP S
+\fB:Li:\fP Lines inserted by Delta " \fB\fInnnnn\fP***\fP S
+\fB:Ld:\fP Lines deleted by Delta " \fB\fInnnnn\fP***\fP S
+\fB:Lu:\fP Lines unchanged by Delta " \fB\fInnnnn\fP***\fP S
+\fB:DT:\fP Delta type " \fBD or R\fP S
+\fB:I:\fP SCCS ID string (SID) " \fBSee below**\fP S
+\fB:R:\fP Release number " \fB\fInnnn\fP\fP S
+\fB:L:\fP Level number " \fB\fInnnn\fP\fP S
+\fB:B:\fP Branch number " \fB\fInnnn\fP\fP S
+\fB:S:\fP Sequence number " \fB\fInnnn\fP\fP S
+\fB:D:\fP Date delta created " \fB:Dy:/:Dm:/:Dd:\fP S
+\fB:Dy:\fP Year delta created " \fB\fInn\fP\fP S
+\fB:Dm:\fP Month delta created " \fB\fInn\fP\fP S
+\fB:Dd:\fP Day delta created " \fB\fInn\fP\fP S
+\fB:T:\fP Time delta created " \fB:Th:::Tm:::Ts:\fP S
+\fB:Th:\fP Hour delta created " \fB\fInn\fP\fP S
+\fB:Tm:\fP Minutes delta created " \fB\fInn\fP\fP S
+\fB:Ts:\fP Seconds delta created " \fB\fInn\fP\fP S
+\fB:P:\fP Programmer who created Delta " \fB\fIlogname\fP\fP S
+\fB:DS:\fP Delta sequence number " \fB\fInnnn\fP\fP S
+\fB:DP:\fP Predecessor Delta sequence " \fB\fInnnn\fP\fP S
+\fB\ \fP number \ \fB\ \fP \
+\fB:DI:\fP Sequence number of deltas " \fB:Dn:/:Dx:/:Dg:\fP S
+\fB\ \fP included, excluded, or ignored \ \fB\ \fP \
+\fB:Dn:\fP Deltas included (sequence #) " \fB:DS: :DS: ...\fP S
+\fB:Dx:\fP Deltas excluded (sequence #) " \fB:DS: :DS: ...\fP S
+\fB:Dg:\fP Deltas ignored (sequence #) " \fB:DS: :DS: ...\fP S
+\fB:MR:\fP MR numbers for delta " \fB\fItext\fP\fP M
+\fB:C:\fP Comments for delta " \fB\fItext\fP\fP M
+\fB:UN:\fP User names User Names \fB\fItext\fP\fP M
+\fB:FL:\fP Flag list Flags \fB\fItext\fP\fP M
+\fB:Y:\fP Module type flag " \fB\fItext\fP\fP S
+\fB:MF:\fP MR validation flag " \fByes or no\fP S
+\fB:MP:\fP MR validation program name " \fB\fItext\fP\fP S
+\fB:KF:\fP Keyword error, warning flag " \fByes or no\fP S
+\fB:KV:\fP Keyword validation string " \fB\fItext\fP\fP S
+\fB:BF:\fP Branch flag " \fByes or no\fP S
+\fB:J:\fP Joint edit flag " \fByes or no\fP S
+\fB:LK:\fP Locked releases " \fB:R: ...\fP S
+\fB:Q:\fP User-defined keyword " \fB\fItext\fP\fP S
+\fB:M:\fP Module name " \fB\fItext\fP\fP S
+\fB:FB:\fP Floor boundary " \fB:R:\fP S
+\fB:CB:\fP Ceiling boundary " \fB:R:\fP S
+\fB:Ds:\fP Default SID " \fB:I:\fP S
+\fB:ND:\fP Null delta flag " \fByes or no\fP S
+\fB:FD:\fP File descriptive text Comments \fB\fItext\fP\fP M
+\fB:BD:\fP Body Body \fB\fItext\fP\fP M
+\fB:GB:\fP Gotten body " \fB\fItext\fP\fP M
+\fB:W:\fP A form of \fIwhat\fP string N/A \fB:Z::M:\\t:I:\fP S
+\fB:A:\fP A form of \fIwhat\fP string N/A \fB:Z::Y: :M: :I::Z:\fP S
+\fB:Z:\fP \fIwhat\fP string delimiter N/A \fB\fB@(#)\fP\fP S
+\fB:F:\fP SCCS filename N/A \fB\fItext\fP\fP S
+\fB:PN:\fP SCCS file pathname N/A \fB\fItext\fP\fP S
+.TE
+.TP 7
+*
+\fB:Dt:\fP= \fB:DT: :I: :D: :T: :P: :DS: :DP:\fP
+.TP 7
+**
+\fB:R:.:L:.:B:.:S:\fP if the delta is a branch delta ( \fB:BF:\fP==
+\fByes\fP)
+.br
+\fB:R:.:L:\fP if the delta is not a branch delta ( \fB:BF:\fP== \fBno\fP)
+.TP 7
+***
+The line statistics are capped at 99999. For example, if 100000 lines
+were unchanged in a certain revision, \fB:Lu:\fP shall
+produce the value 99999.
+.sp
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.IP " 1." 4
+The following example:
+.sp
+.RS
+.nf
+
+\fBprs -d "User Names for :F: are:\\n:UN:" s.file
+\fP
+.fi
+.RE
+.LP
+might write to standard output:
+.sp
+.RS
+.nf
+
+\fBUser Names for s.file are:
+xyz
+131
+abc
+\fP
+.fi
+.RE
+.LP
+.IP " 2." 4
+The following example:
+.sp
+.RS
+.nf
+
+\fBprs -d "Delta for pgm :M:: :I: - :D: By :P:" -r s.file
+\fP
+.fi
+.RE
+.LP
+might write to standard output:
+.sp
+.RS
+.nf
+
+\fBDelta for pgm main.c: 3.7 - 77/12/01 By cas
+\fP
+.fi
+.RE
+.LP
+.IP " 3." 4
+As a special case:
+.sp
+.RS
+.nf
+
+\fBprs s.file
+\fP
+.fi
+.RE
+.LP
+might write to standard output:
+.sp
+.RS
+.nf
+
+\fBs.file:
+<\fP\fIblank line\fP\fB>
+D 1.1 77/12/01 00:00:00 cas 1 000000/00000/00000
+MRs:
+bl78-12345
+bl79-54321
+COMMENTS:
+this is the comment line for s.file initial delta
+<\fP\fIblank line\fP\fB>
+\fP
+.fi
+.RE
+.LP
+for each delta table entry of the \fBD\fP type. The only option allowed
+to be used with this special case is the \fB-a\fP
+option.
+.LP
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIadmin\fP, \fIdelta\fP, \fIget\fP, \fIwhat\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/ps.1p b/man-pages-posix-2003/man1p/ps.1p
new file mode 100644
index 0000000..7525292
--- /dev/null
+++ b/man-pages-posix-2003/man1p/ps.1p
@@ -0,0 +1,603 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PS" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ps
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ps \- report process status
+.SH SYNOPSIS
+.LP
+\fBps\fP \fB[\fP\fB-aA\fP\fB][\fP\fB-defl\fP\fB][\fP\fB-G\fP
+\fIgrouplist\fP\fB][\fP\fB-o\fP \fIformat\fP\fB]\fP\fB...\fP\fB[\fP\fB-p\fP
+\fIproclist\fP\fB][\fP\fB-t\fP
+\fItermlist\fP\fB]
+.br
+.sp
+[\fP\fB-U\fP \fIuserlist\fP\fB][\fP\fB-g\fP \fIgrouplist\fP\fB][\fP\fB-n\fP
+\fInamelist\fP\fB][\fP\fB-u\fP
+\fIuserlist\fP\fB]\fP\fB\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIps\fP utility shall write information about processes, subject
+to having the appropriate privileges to obtain
+information about those processes.
+.LP
+By default, \fIps\fP shall select all processes with the same effective
+user ID as the current user and the same controlling
+terminal as the invoker.
+.SH OPTIONS
+.LP
+The \fIps\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-a\fP
+Write information for all processes associated with terminals. Implementations
+may omit session leaders from this list.
+.TP 7
+\fB-A\fP
+Write information for all processes.
+.TP 7
+\fB-d\fP
+Write information for all processes, except session leaders.
+.TP 7
+\fB-e\fP
+Write information for all processes. (Equivalent to
+\fB-A\fP.)
+.TP 7
+\fB-f\fP
+Generate a \fBfull\fP listing. (See the STDOUT section for the contents
+of a \fBfull\fP listing.)
+.TP 7
+\fB-g\ \fP \fIgrouplist\fP
+Write information for processes whose session leaders are given in
+\fIgrouplist\fP. The application shall ensure that the
+\fIgrouplist\fP is a single argument in the form of a <blank> or comma-separated
+list.
+.TP 7
+\fB-G\ \fP \fIgrouplist\fP
+Write information for processes whose real group ID numbers are given
+in \fIgrouplist\fP. The application shall ensure that
+the \fIgrouplist\fP is a single argument in the form of a <blank>
+or comma-separated list.
+.TP 7
+\fB-l\fP
+Generate a \fBlong\fP listing. (See STDOUT for the contents of a \fBlong\fP
+listing.)
+.TP 7
+\fB-n\ \fP \fInamelist\fP
+Specify the name of an alternative system \fInamelist\fP file in place
+of the default. The name of the default file and the format
+of a \fInamelist\fP file are unspecified.
+.TP 7
+\fB-o\ \fP \fIformat\fP
+Write information according to the format specification given in \fIformat\fP.
+This is fully described in the STDOUT section.
+Multiple \fB-o\fP options can be specified; the format specification
+shall be interpreted as the <space>-separated
+concatenation of all the \fIformat\fP option-arguments.
+.TP 7
+\fB-p\ \fP \fIproclist\fP
+Write information for processes whose process ID numbers are given
+in \fIproclist\fP. The application shall ensure that the
+\fIproclist\fP is a single argument in the form of a <blank> or comma-separated
+list.
+.TP 7
+\fB-t\ \fP \fItermlist\fP
+Write information for processes associated with terminals given in
+\fItermlist\fP. The application shall ensure that the
+\fItermlist\fP is a single argument in the form of a <blank> or comma-separated
+list. Terminal identifiers shall be given in
+an implementation-defined format. On XSI-conformant systems, they
+shall be given in one of two forms: the device's filename
+(for example, \fBtty04\fP) or, if the device's filename starts with
+\fBtty\fP, just the identifier following the characters
+\fBtty\fP (for example, \fB"04"\fP ).
+.TP 7
+\fB-u\ \fP \fIuserlist\fP
+Write information for processes whose user ID numbers or login names
+are given in \fIuserlist\fP. The application shall ensure
+that the \fIuserlist\fP is a single argument in the form of a <blank>
+or comma-separated list. In the listing, the numerical
+user ID shall be written unless the \fB-f\fP option is used, in which
+case the login name shall be written.
+.TP 7
+\fB-U\ \fP \fIuserlist\fP
+Write information for processes whose real user ID numbers or login
+names are given in \fIuserlist\fP. The application shall
+ensure that the \fIuserlist\fP is a single argument in the form of
+a <blank> or comma-separated list.
+.sp
+.LP
+With the exception of \fB-o\fP \fIformat\fP, all of the options shown
+are used to select processes. If any are specified, the
+default list shall be ignored and \fIps\fP shall select the processes
+represented by the inclusive OR of all the
+selection-criteria options.
+.SH OPERANDS
+.LP
+None.
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIps\fP:
+.TP 7
+\fICOLUMNS\fP
+Override the system-selected horizontal display line size, used to
+determine the number of text columns to display. See the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 8, Environment
+Variables for valid values and results when it is unset or null.
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard error and
+informative messages written to standard output.
+.TP 7
+\fILC_TIME\fP
+Determine the format and contents of the date and time strings displayed.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fITZ\fP
+Determine the timezone used to calculate date and time strings displayed.
+If \fITZ\fP is unset or null, an unspecified default
+timezone shall be used.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+When the \fB-o\fP option is not specified, the standard output format
+is unspecified.
+.LP
+On XSI-conformant systems, the output format shall be as follows.
+The column headings and descriptions of the columns in a
+\fIps\fP listing are given below. The precise meanings of these fields
+are implementation-defined. The letters \fB'f'\fP and
+\fB'l'\fP (below) indicate the option ( \fBfull\fP or \fBlong\fP)
+that shall cause the corresponding heading to appear;
+\fBall\fP means that the heading always appears. Note that these two
+options determine only what information is provided for a
+process; they do not determine which processes are listed.
+.TS C
+center; l l lw(40).
+\fBF\fP (l) T{
+.na
+Flags (octal and additive) associated with the process.
+.ad
+T}
+\fBS\fP (l) T{
+.na
+The state of the process.
+.ad
+T}
+\fBUID\fP (f,l) T{
+.na
+The user ID number of the process owner; the login name is printed under the \fB-f\fP option.
+.ad
+T}
+\fBPID\fP (all) T{
+.na
+The process ID of the process; it is possible to kill a process if this datum is known.
+.ad
+T}
+\fBPPID\fP (f,l) T{
+.na
+The process ID of the parent process.
+.ad
+T}
+\fBC\fP (f,l) T{
+.na
+Processor utilization for scheduling.
+.ad
+T}
+\fBPRI\fP (l) T{
+.na
+The priority of the process; higher numbers mean lower priority.
+.ad
+T}
+\fBNI\fP (l) T{
+.na
+Nice value; used in priority computation.
+.ad
+T}
+\fBADDR\fP (l) T{
+.na
+The address of the process.
+.ad
+T}
+\fBSZ\fP (l) T{
+.na
+The size in blocks of the core image of the process.
+.ad
+T}
+\fBWCHAN\fP (l) T{
+.na
+The event for which the process is waiting or sleeping; if blank, the process is running.
+.ad
+T}
+\fBSTIME\fP (f) T{
+.na
+Starting time of the process.
+.ad
+T}
+\fBTTY\fP (all) T{
+.na
+The controlling terminal for the process.
+.ad
+T}
+\fBTIME\fP (all) T{
+.na
+The cumulative execution time for the process.
+.ad
+T}
+\fBCMD\fP (all) T{
+.na
+The command name; the full command name and its arguments are written under the \fB-f\fP option.
+.ad
+T}
+.TE
+.LP
+A process that has exited and has a parent, but has not yet been waited
+for by the parent, shall be marked \fBdefunct\fP.
+.LP
+Under the option \fB-f\fP, \fIps\fP tries to determine the command
+name and arguments given when the process was created by
+examining memory or the swap area. Failing this, the command name,
+as it would appear without the option \fB-f\fP, is written in
+square brackets.
+.LP
+The \fB-o\fP option allows the output format to be specified under
+user control.
+.LP
+The application shall ensure that the format specification is a list
+of names presented as a single argument, <blank> or
+comma-separated. Each variable has a default header. The default header
+can be overridden by appending an equals sign and the new
+text of the header. The rest of the characters in the argument shall
+be used as the header text. The fields specified shall be
+written in the order specified on the command line, and should be
+arranged in columns in the output. The field widths shall be
+selected by the system to be at least as wide as the header text (default
+or overridden value). If the header text is null, such as
+\fB-o\fP \fIuser\fP=, the field width shall be at least as wide as
+the default header text. If all header text fields are null,
+no header line shall be written.
+.LP
+The following names are recognized in the POSIX locale:
+.TP 7
+\fBruser\fP
+The real user ID of the process. This shall be the textual user ID,
+if it can be obtained and the field width permits, or a
+decimal representation otherwise.
+.TP 7
+\fBuser\fP
+The effective user ID of the process. This shall be the textual user
+ID, if it can be obtained and the field width permits, or
+a decimal representation otherwise.
+.TP 7
+\fBrgroup\fP
+The real group ID of the process. This shall be the textual group
+ID, if it can be obtained and the field width permits, or a
+decimal representation otherwise.
+.TP 7
+\fBgroup\fP
+The effective group ID of the process. This shall be the textual group
+ID, if it can be obtained and the field width permits,
+or a decimal representation otherwise.
+.TP 7
+\fBpid\fP
+The decimal value of the process ID.
+.TP 7
+\fBppid\fP
+The decimal value of the parent process ID.
+.TP 7
+\fBpgid\fP
+The decimal value of the process group ID.
+.TP 7
+\fBpcpu\fP
+The ratio of CPU time used recently to CPU time available in the same
+period, expressed as a percentage. The meaning of
+"recently" in this context is unspecified. The CPU time available
+is determined in an unspecified manner.
+.TP 7
+\fBvsz\fP
+The size of the process in (virtual) memory in 1024 byte units as
+a decimal integer.
+.TP 7
+\fBnice\fP
+The decimal value of the nice value of the process; see \fInice\fP()
+\&.
+.TP 7
+\fBetime\fP
+In the POSIX locale, the elapsed time since the process was started,
+in the form:
+.sp
+.RS
+.nf
+
+\fB[[\fP\fIdd\fP\fB-\fP\fB]\fP\fIhh\fP\fB:\fP\fB]\fP\fImm\fP\fB:\fP\fIss\fP
+.fi
+.RE
+.LP
+where \fIdd\fP shall represent the number of days, \fIhh\fP the number
+of hours, \fImm\fP the number of minutes, and
+\fIss\fP the number of seconds. The \fIdd\fP field shall be a decimal
+integer. The \fIhh\fP, \fImm\fP, and \fIss\fP fields
+shall be two-digit decimal integers padded on the left with zeros.
+.TP 7
+\fBtime\fP
+In the POSIX locale, the cumulative CPU time of the process in the
+form:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIdd\fP\fB-\fP\fB]\fP\fIhh\fP\fB:\fP\fImm\fP\fB:\fP\fIss\fP
+.fi
+.RE
+.LP
+The \fIdd\fP, \fIhh\fP, \fImm\fP, and \fIss\fP fields shall be as
+described in the \fBetime\fP specifier.
+.TP 7
+\fBtty\fP
+The name of the controlling terminal of the process (if any) in the
+same format used by the \fIwho\fP utility.
+.TP 7
+\fBcomm\fP
+The name of the command being executed ( \fIargv\fP[0] value) as a
+string.
+.TP 7
+\fBargs\fP
+The command with all its arguments as a string. The implementation
+may truncate this value to the field width; it is
+implementation-defined whether any further truncation occurs. It is
+unspecified whether the string represented is a version of the
+argument list as it was passed to the command when it started, or
+is a version of the arguments as they may have been modified by
+the application. Applications cannot depend on being able to modify
+their argument list and having that modification be reflected
+in the output of \fIps\fP.
+.sp
+.LP
+Any field need not be meaningful in all implementations. In such a
+case a hyphen ( \fB'-'\fP ) should be output in place of
+the field value.
+.LP
+Only \fBcomm\fP and \fBargs\fP shall be allowed to contain <blank>s;
+all others shall not. Any implementation-defined
+variables shall be specified in the system documentation along with
+the default header and indicating whether the field may contain
+<blank>s.
+.LP
+The following table specifies the default header to be used in the
+POSIX locale corresponding to each format specifier.
+.br
+.sp
+.ce 1
+\fBTable: Variable Names and Default Headers in \fIps\fP\fP
+.TS C
+center; l1 l1 l1 l.
+\fBFormat Specifier\fP \fBDefault Header\fP \fBFormat Specifier\fP \fBDefault Header\fP
+\fBargs\fP \fBCOMMAND\fP \fBppid\fP \fBPPID\fP
+\fBcomm\fP \fBCOMMAND\fP \fBrgroup\fP \fBRGROUP\fP
+\fBetime\fP \fBELAPSED\fP \fBruser\fP \fBRUSER\fP
+\fBgroup\fP \fBGROUP\fP \fBtime\fP \fBTIME\fP
+\fBnice\fP \fBNI\fP \fBtty\fP \fBTT\fP
+\fBpcpu\fP \fB%CPU\fP \fBuser\fP \fBUSER\fP
+\fBpgid\fP \fBPGID\fP \fBvsz\fP \fBVSZ\fP
+\fBpid\fP \fBPID\fP \fB\ \fP \fB\ \fP
+.TE
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Things can change while \fIps\fP is running; the snapshot it gives
+is only true for an instant, and might not be accurate by
+the time it is displayed.
+.LP
+The \fBargs\fP format specifier is allowed to produce a truncated
+version of the command arguments. In some implementations,
+this information is no longer available when the \fIps\fP utility
+is executed.
+.LP
+If the field width is too narrow to display a textual ID, the system
+may use a numeric version. Normally, the system would be
+expected to choose large enough field widths, but if a large number
+of fields were selected to write, it might squeeze fields to
+their minimum sizes to fit on one line. One way to ensure adequate
+width for the textual IDs is to override the default header for
+a field to make it larger than most or all user or group names.
+.LP
+There is no special quoting mechanism for header text. The header
+text is the rest of the argument. If multiple header changes
+are needed, multiple \fB-o\fP options can be used, such as:
+.sp
+.RS
+.nf
+
+\fBps -o "user=User Name" -o pid=Process\\ ID
+\fP
+.fi
+.RE
+.LP
+On some implementations, especially multi-level secure systems, \fIps\fP
+may be severely restricted and produce information
+only about child processes owned by the user.
+.SH EXAMPLES
+.LP
+The command:
+.sp
+.RS
+.nf
+
+\fBps -o user,pid,ppid=MOM -o args
+\fP
+.fi
+.RE
+.LP
+writes at least the following in the POSIX locale:
+.sp
+.RS
+.nf
+
+\fB USER PID MOM COMMAND
+helene 34 12 ps -o uid,pid,ppid=MOM -o args
+\fP
+.fi
+.RE
+.LP
+The contents of the \fBCOMMAND\fP field need not be the same in all
+implementations, due to possible truncation.
+.SH RATIONALE
+.LP
+There is very little commonality between BSD and System V implementations
+of \fIps\fP. Many options conflict or have subtly
+different usages. The standard developers attempted to select a set
+of options for the base standard that were useful on a wide
+range of systems and selected options that either can be implemented
+on both BSD and System V-based systems without breaking the
+current implementations or where the options are sufficiently similar
+that any changes would not be unduly problematic for users or
+implementors.
+.LP
+It is recognized that on some implementations, especially multi-level
+secure systems, \fIps\fP may be nearly useless. The
+default output has therefore been chosen such that it does not break
+historical implementations and also is likely to provide at
+least some useful information on most systems.
+.LP
+The major change is the addition of the format specification capability.
+The motivation for this invention is to provide a
+mechanism for users to access a wider range of system information,
+if the system permits it, in a portable manner. The fields
+chosen to appear in this volume of IEEE\ Std\ 1003.1-2001 were arrived
+at after considering what concepts were likely to be
+both reasonably useful to the "average" user and had a reasonable
+chance of being implemented on a wide range of systems. Again
+it is recognized that not all systems are able to provide all the
+information and, conversely, some may wish to provide more. It is
+hoped that the approach adopted will be sufficiently flexible and
+extensible to accommodate most systems. Implementations may be
+expected to introduce new format specifiers.
+.LP
+The default output should consist of a short listing containing the
+process ID, terminal name, cumulative execution time, and
+command name of each process.
+.LP
+The preference of the standard developers would have been to make
+the format specification an operand of the \fIps\fP command.
+Unfortunately, BSD usage precluded this.
+.LP
+At one time a format was included to display the environment array
+of the process. This was deleted because there is no portable
+way to display it.
+.LP
+The \fB-A\fP option is equivalent to the BSD \fB-g\fP and the SVID
+\fB-e\fP. Because the two systems differed, a mnemonic
+compromise was selected.
+.LP
+The \fB-a\fP option is described with some optional behavior because
+the SVID omits session leaders, but BSD does not.
+.LP
+In an early proposal, format specifiers appeared for priority and
+start time. The former was not defined adequately in this
+volume of IEEE\ Std\ 1003.1-2001 and was removed in deference to the
+defined nice value; the latter because elapsed time
+was considered to be more useful.
+.LP
+In a new BSD version of \fIps\fP, a \fB-O\fP option can be used to
+write all of the default information, followed by
+additional format specifiers. This was not adopted because the default
+output is implementation-defined. Nevertheless, this is a
+useful option that should be reserved for that purpose. In the \fB-o\fP
+option for the POSIX Shell and Utilities \fIps\fP, the
+format is the concatenation of each \fB-o\fP. Therefore, the user
+can have an alias or function that defines the beginning of
+their desired format and add more fields to the end of the output
+in certain cases where that would be useful.
+.LP
+The format of the terminal name is unspecified, but the descriptions
+of \fIps\fP, \fItalk\fP, \fIwho\fP, and \fIwrite\fP require that they
+all use the same format.
+.LP
+The \fBpcpu\fP field indicates that the CPU time available is determined
+in an unspecified manner. This is because it is
+difficult to express an algorithm that is useful across all possible
+machine architectures. Historical counterparts to this value
+have attempted to show percentage of use in the recent past, such
+as the preceding minute. Frequently, these values for all
+processes did not add up to 100%. Implementations are encouraged to
+provide data in this field to users that will help them
+identify processes currently affecting the performance of the system.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIkill\fP(), \fInice\fP(), \fIrenice\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/pwd.1p b/man-pages-posix-2003/man1p/pwd.1p
new file mode 100644
index 0000000..807cac1
--- /dev/null
+++ b/man-pages-posix-2003/man1p/pwd.1p
@@ -0,0 +1,161 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PWD" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pwd
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pwd \- return working directory name
+.SH SYNOPSIS
+.LP
+\fBpwd\fP \fB[\fP\fB-L | -P\fP \fB]\fP
+.SH DESCRIPTION
+.LP
+The \fIpwd\fP utility shall write to standard output an absolute pathname
+of the current working directory, which does not
+contain the filenames dot or dot-dot.
+.SH OPTIONS
+.LP
+The \fIpwd\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported by the implementation:
+.TP 7
+\fB-L\fP
+If the \fIPWD\fP environment variable contains an absolute pathname
+of the current directory that does not contain the
+filenames dot or dot-dot, \fIpwd\fP shall write this pathname to standard
+output. Otherwise, the \fB-L\fP option shall behave as
+the \fB-P\fP option.
+.TP 7
+\fB-P\fP
+The absolute pathname written shall not contain filenames that, in
+the context of the pathname, refer to files of type symbolic
+link.
+.sp
+.LP
+If both \fB-L\fP and \fB-P\fP are specified, the last one shall apply.
+If neither \fB-L\fP nor \fB-P\fP is specified, the
+\fIpwd\fP utility shall behave as if \fB-L\fP had been specified.
+.SH OPERANDS
+.LP
+None.
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIpwd\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fIPWD\fP
+If the \fB-P\fP option is in effect, this variable shall be set to
+an absolute pathname of the current working directory that
+does not contain any components that specify symbolic links, does
+not contain any components that are dot, and does not contain any
+components that are dot-dot. If an application sets or unsets the
+value of \fIPWD\fP, the behavior of \fIpwd\fP is
+unspecified.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The \fIpwd\fP utility output is an absolute pathname of the current
+working directory:
+.sp
+.RS
+.nf
+
+\fB"%s\\n", <\fP\fIdirectory pathname\fP\fB>
+\fP
+.fi
+.RE
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+If an error is detected, output shall not be written to standard output,
+a diagnostic message shall be written to standard
+error, and the exit status is not zero.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+Some implementations have historically provided \fIpwd\fP as a shell
+special built-in command.
+.LP
+In most utilities, if an error occurs, partial output may be written
+to standard output. This does not happen in historical
+implementations of \fIpwd\fP. Because \fIpwd\fP is frequently used
+in historical shell scripts without checking the exit status,
+it is important that the historical behavior is required here; therefore,
+the CONSEQUENCES OF ERRORS section specifically disallows
+any partial output being written to standard output.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcd\fP, the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+\fIgetcwd\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/qalter.1p b/man-pages-posix-2003/man1p/qalter.1p
new file mode 100644
index 0000000..2f9f017
--- /dev/null
+++ b/man-pages-posix-2003/man1p/qalter.1p
@@ -0,0 +1,795 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "QALTER" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" qalter
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+qalter \- alter batch job
+.SH SYNOPSIS
+.LP
+\fBqalter\fP \fB[\fP\fB-a\fP \fIdate_time\fP\fB][\fP\fB-A\fP
+\fIaccount_string\fP\fB][\fP\fB-c\fP \fIinterval\fP\fB][\fP\fB-e\fP
+\fIpath_name\fP\fB]
+.br
+\fP \fB\ \ \ \ \ \ \fP \fB[\fP\fB-h\fP \fIhold_list\fP\fB][\fP\fB-j\fP
+\fIjoin_list\fP\fB][\fP\fB-k\fP \fIkeep_list\fP\fB][\fP\fB-l\fP \fIresource_list\fP\fB]
+.br
+\fP \fB\ \ \ \ \ \ \fP \fB[\fP\fB-m\fP \fImail_options\fP\fB][\fP\fB-M\fP
+\fImail_list\fP\fB][\fP\fB-N\fP \fIname\fP\fB][\fP\fB-o\fP \fIpath_name\fP\fB]
+.br
+\fP \fB\ \ \ \ \ \ \fP \fB[\fP\fB-p\fP \fIpriority\fP\fB][\fP\fB-r\fP
+\fIy\fP\fB|\fP\fIn\fP\fB][\fP\fB-S\fP \fIpath_name_list\fP\fB][\fP\fB-u\fP
+\fIuser_list\fP\fB]
+.br
+\fP \fB\ \ \ \ \ \ \fP \fB\fP\fIjob_identifier\fP \fB... \fP
+.SH DESCRIPTION
+.LP
+The attributes of a batch job are altered by a request to the batch
+server that manages the batch job. The \fIqalter\fP utility
+is a user-accessible batch client that requests the alteration of
+the attributes of one or more batch jobs.
+.LP
+The \fIqalter\fP utility shall alter the attributes of those batch
+jobs, and only those batch jobs, for which a batch
+\fIjob_identifier\fP is presented to the utility.
+.LP
+The \fIqalter\fP utility shall alter the attributes of batch jobs
+in the order in which the batch \fIjob_identifier\fPs are
+presented to the utility.
+.LP
+If the \fIqalter\fP utility fails to process a batch \fIjob_identifier\fP
+successfully, the utility shall proceed to process
+the remaining batch \fIjob_identifier\fPs, if any.
+.LP
+For each batch \fIjob_identifier\fP for which the \fIqalter\fP utility
+succeeds, each attribute of the identified batch job
+shall be altered as indicated by all the options presented to the
+utility.
+.LP
+For each identified batch job for which the \fIqalter\fP utility fails,
+the utility shall not alter any attribute of the batch
+job.
+.LP
+For each batch job that the \fIqalter\fP utility processes, the utility
+shall not modify any attribute other than those
+required by the options and option-arguments presented to the utility.
+.LP
+The \fIqalter\fP utility shall alter batch jobs by sending a \fIModify
+Job Request\fP to the batch server that manages each
+batch job. At the time the \fIqalter\fP utility exits, it shall have
+modified the batch job corresponding to each successfully
+processed batch \fIjob_identifier\fP. An attempt to alter the attributes
+of a batch job in the RUNNING state is
+implementation-defined.
+.SH OPTIONS
+.LP
+The \fIqalter\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported by the implementation:
+.TP 7
+\fB-a\ \fP \fIdate_time\fP
+Redefine the time at which the batch job becomes eligible for execution.
+.LP
+The \fIdate_time\fP argument shall be in the same form and represent
+the same time as for the \fItouch\fP utility. The time so represented
+shall be set into the \fIExecution_Time\fP attribute
+of the batch job. If the time specified is earlier than the current
+time, the \fB-a\fP option shall have no effect.
+.TP 7
+\fB-A\ \fP \fIaccount_string\fP
+.sp
+Redefine the account to which the resource consumption of the batch
+job should be charged.
+.LP
+The syntax of the \fIaccount_string\fP option-argument is unspecified.
+.LP
+The \fIqalter\fP utility shall set the \fIAccount_Name\fP attribute
+of the batch job to the value of the \fIaccount_string\fP
+option-argument.
+.TP 7
+\fB-c\ \fP \fIinterval\fP
+Redefine whether the batch job should be checkpointed, and if so,
+how often.
+.LP
+The \fIqalter\fP utility shall accept a value for the interval option-argument
+that is one of the following:
+.TP 7
+\fBn\fP
+.RS
+No checkpointing is to be performed on the batch job (NO_CHECKPOINT).
+.RE
+.TP 7
+\fBs\fP
+.RS
+Checkpointing is to be performed only when the batch server is shut
+down (CHECKPOINT_AT_SHUTDOWN).
+.RE
+.TP 7
+\fBc\fP
+.RS
+Automatic periodic checkpointing is to be performed at the \fIMinimum_Cpu_Interval\fP
+attribute of the batch queue, in units
+of CPU minutes (CHECKPOINT_AT_MIN_CPU_INTERVAL).
+.RE
+.TP 7
+\fBc\fP=\fIminutes\fP
+.RS
+Automatic periodic checkpointing is to be performed every \fIminutes\fP
+of CPU time, or every \fIMinimum_Cpu_Interval\fP
+minutes, whichever is greater. The \fIminutes\fP argument shall conform
+to the syntax for unsigned integers and shall be greater
+than zero.
+.RE
+.sp
+.LP
+An implementation may define other checkpoint intervals. The conformance
+document for an implementation shall describe any
+alternative checkpoint intervals, how they are specified, their internal
+behavior, and how they affect the behavior of the
+utility.
+.LP
+The \fIqalter\fP utility shall set the \fICheckpoint\fP attribute
+of the batch job to the value of the \fIinterval\fP
+option-argument.
+.TP 7
+\fB-e\ \fP \fIpath_name\fP
+Redefine the path to be used for the standard error stream of the
+batch job.
+.LP
+The \fIqalter\fP utility shall accept a \fIpath_name\fP option-argument
+that conforms to the syntax of the \fIpath_name\fP
+element defined in the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+which can be preceded by a host name element of
+the form \fIhostname\fP:.
+.LP
+If the \fIpath_name\fP option-argument constitutes an absolute pathname,
+the \fIqalter\fP utility shall set the
+\fIError_Path\fP attribute of the batch job to the value of the \fIpath_name\fP
+option-argument, including the host name element,
+if present.
+.LP
+If the \fIpath_name\fP option-argument constitutes a relative pathname
+and no host name element is specified, the \fIqalter\fP
+utility shall set the \fIError_Path\fP attribute of the batch job
+to the value of the absolute pathname derived by expanding the
+\fIpath_name\fP option-argument relative to the current directory
+of the process that executes the \fIqalter\fP utility.
+.LP
+If the \fIpath_name\fP option-argument constitutes a relative pathname
+and a host name element is specified, the \fIqalter\fP
+utility shall set the \fIError_Path\fP attribute of the batch job
+to the value of the option-argument without expansion.
+.LP
+If the \fIpath_name\fP option-argument does not include a host name
+element, the \fIqalter\fP utility shall prefix the
+pathname in the \fIError_Path\fP attribute with \fIhostname\fP:, where
+\fIhostname\fP is the name of the host upon which the
+\fIqalter\fP utility is being executed.
+.TP 7
+\fB-h\ \fP \fIhold_list\fP
+Redefine the types of holds, if any, on the batch job. The \fIqalter\fP
+\fB-h\fP option shall accept a value for the
+\fIhold_list\fP option-argument that is a string of alphanumeric characters
+in the portable character set.
+.LP
+The \fIqalter\fP utility shall accept a value for the \fIhold_list\fP
+option-argument that is a string of one or more of the
+characters \fB'u'\fP, \fB's'\fP, or \fB'o'\fP, or the single character
+\fB'n'\fP . For each unique character in the
+\fIhold_list\fP option-argument, the \fIqalter\fP utility shall add
+a value to the \fIHold_Types\fP attribute of the batch job
+as follows, each representing a different hold type:
+.TP 7
+\fBu\fP
+.RS
+USER
+.RE
+.TP 7
+\fBs\fP
+.RS
+SYSTEM
+.RE
+.TP 7
+\fBo\fP
+.RS
+OPERATOR
+.RE
+.sp
+.LP
+If any of these characters are duplicated in the \fIhold_list\fP option-argument,
+the duplicates shall be ignored. An existing
+\fIHold_Types\fP attribute can be cleared by the hold type:
+.TP 7
+\fBn\fP
+.RS
+NO_HOLD
+.RE
+.sp
+.LP
+The \fIqalter\fP utility shall consider it an error if any hold type
+other than \fB'n'\fP is combined with hold type
+\fB'n'\fP . Strictly conforming applications shall not repeat any
+of the characters \fB'u'\fP, \fB's'\fP, \fB'o'\fP,
+or \fB'n'\fP within the \fIhold_list\fP option-argument. The \fIqalter\fP
+utility shall permit the repetition of characters,
+but shall not assign additional meaning to the repeated characters.
+An implementation may define other hold types. The conformance
+document for an implementation shall describe any additional hold
+types, how they are specified, their internal behavior, and how
+they affect the behavior of the utility.
+.TP 7
+\fB-j\ \fP \fIjoin_list\fP
+Redefine which streams of the batch job are to be merged. The \fIqalter\fP
+\fB-j\fP option shall accept a value for the
+\fIjoin_list\fP option-argument that is a string of alphanumeric characters
+in the portable character set.
+.LP
+The \fIqalter\fP utility shall accept a \fIjoin_list\fP option-argument
+that consists of one or more of the characters
+\fB'e'\fP and \fB'o'\fP, or the single character \fB'n'\fP .
+.LP
+All of the other batch job output streams specified shall be merged
+into the output stream represented by the character listed
+first in the \fIjoin_list\fP option-argument.
+.LP
+For each unique character in the \fIjoin_list\fP option-argument,
+the \fIqalter\fP utility shall add a value to the
+\fIJoin_Path\fP attribute of the batch job as follows, each representing
+a different batch job stream to join:
+.TP 7
+\fBe\fP
+.RS
+The standard error of the batch job (JOIN_STD_ERROR).
+.RE
+.TP 7
+\fBo\fP
+.RS
+The standard output of the batch job (JOIN_STD_OUTPUT).
+.RE
+.sp
+.LP
+An existing \fIJoin_Path\fP attribute can be cleared by the join type:
+.TP 7
+\fBn\fP
+.RS
+NO_JOIN
+.RE
+.sp
+.LP
+If \fB'n'\fP is specified, then no files are joined. The \fIqalter\fP
+utility shall consider it an error if any join type
+other than \fB'n'\fP is combined with join type \fB'n'\fP .
+.LP
+Strictly conforming applications shall not repeat any of the characters
+\fB'e'\fP, \fB'o'\fP, or \fB'n'\fP within the
+\fIjoin_list\fP option-argument. The \fIqalter\fP utility shall permit
+the repetition of characters, but shall not assign
+additional meaning to the repeated characters.
+.LP
+An implementation may define other join types. The conformance document
+for an implementation shall describe any additional
+batch job streams, how they are specified, their internal behavior,
+and how they affect the behavior of the utility.
+.TP 7
+\fB-k\ \fP \fIkeep_list\fP
+Redefine which output of the batch job to retain on the execution
+host.
+.LP
+The \fIqalter\fP \fB-k\fP option shall accept a value for the \fIkeep_list\fP
+option-argument that is a string of
+alphanumeric characters in the portable character set.
+.LP
+The \fIqalter\fP utility shall accept a \fIkeep_list\fP option-argument
+that consists of one or more of the characters
+\fB'e'\fP and \fB'o'\fP, or the single character \fB'n'\fP .
+.LP
+For each unique character in the \fIkeep_list\fP option-argument,
+the \fIqalter\fP utility shall add a value to the
+\fIKeep_Files\fP attribute of the batch job as follows, each representing
+a different batch job stream to keep:
+.TP 7
+\fBe\fP
+.RS
+The standard error of the batch job (KEEP_STD_ERROR).
+.RE
+.TP 7
+\fBo\fP
+.RS
+The standard output of the batch job (KEEP_STD_OUTPUT).
+.RE
+.sp
+.LP
+If both \fB'e'\fP and \fB'o'\fP are specified, then both files are
+retained. An existing \fIKeep_Files\fP attribute can
+be cleared by the keep type:
+.TP 7
+\fBn\fP
+.RS
+NO_KEEP
+.RE
+.sp
+.LP
+If \fB'n'\fP is specified, then no files are retained. The \fIqalter\fP
+utility shall consider it an error if any keep type
+other than \fB'n'\fP is combined with keep type \fB'n'\fP .
+.LP
+Strictly conforming applications shall not repeat any of the characters
+\fB'e'\fP, \fB'o'\fP, or \fB'n'\fP within the
+\fIkeep_list\fP option-argument. The \fIqalter\fP utility shall permit
+the repetition of characters, but shall not assign
+additional meaning to the repeated characters. An implementation may
+define other keep types. The conformance document for an
+implementation shall describe any additional keep types, how they
+are specified, their internal behavior, and how they affect the
+behavior of the utility.
+.TP 7
+\fB-l\ \fP \fIresource_list\fP
+.sp
+Redefine the resources that are allowed or required by the batch job.
+.LP
+The \fIqalter\fP utility shall accept a \fIresource_list\fP option-argument
+that conforms to the following syntax:
+.sp
+.RS
+.nf
+
+\fBresource=value[,,resource=value,,...]
+\fP
+.fi
+.RE
+.LP
+The \fIqalter\fP utility shall set one entry in the value of the \fIResource_List\fP
+attribute of the batch job for each
+resource listed in the \fIresource_list\fP option-argument.
+.LP
+Because the list of supported resource names might vary by batch server,
+the \fIqalter\fP utility shall rely on the batch
+server to validate the resource names and associated values. See \fIMultiple
+Keyword-Value
+Pairs\fP for a means of removing \fIkeyword\fP= \fIvalue\fP (and \fIvalue\fP@
+\fIkeyword\fP) pairs and other general rules
+for list-oriented batch job attributes.
+.TP 7
+\fB-m\ \fP \fImail_options\fP
+.sp
+Redefine the points in the execution of the batch job at which the
+batch server is to send mail about a change in the state of the
+batch job.
+.LP
+The \fIqalter\fP \fB-m\fP option shall accept a value for the \fImail_options\fP
+option-argument that is a string of
+alphanumeric characters in the portable character set.
+.LP
+The \fIqalter\fP utility shall accept a value for the \fImail_options\fP
+option-argument that is a string of one or more of
+the characters \fB'e'\fP, \fB'b'\fP, and \fB'a'\fP, or the single
+character \fB'n'\fP . For each unique character in
+the \fImail_options\fP option-argument, the \fIqalter\fP utility shall
+add a value to the \fIMail_Users\fP attribute of the
+batch job as follows, each representing a different time during the
+life of a batch job at which to send mail:
+.TP 7
+\fBe\fP
+.RS
+MAIL_AT_EXIT
+.RE
+.TP 7
+\fBb\fP
+.RS
+MAIL_AT_BEGINNING
+.RE
+.TP 7
+\fBa\fP
+.RS
+MAIL_AT_ABORT
+.RE
+.sp
+.LP
+If any of these characters are duplicated in the \fImail_options\fP
+option-argument, the duplicates shall be ignored.
+.LP
+An existing \fIMail_Points\fP attribute can be cleared by the mail
+type:
+.TP 7
+\fBn\fP
+.RS
+NO_MAIL
+.RE
+.sp
+.LP
+If \fB'n'\fP is specified, then mail is not sent. The \fIqalter\fP
+utility shall consider it an error if any mail type other
+than \fB'n'\fP is combined with mail type \fB'n'\fP . Strictly conforming
+applications shall not repeat any of the characters
+\fB'e'\fP, \fB'b'\fP, \fB'a'\fP, or \fB'n'\fP within the \fImail_options\fP
+option-argument. The \fIqalter\fP
+utility shall permit the repetition of characters but shall not assign
+additional meaning to the repeated characters.
+.LP
+An implementation may define other mail types. The conformance document
+for an implementation shall describe any additional mail
+types, how they are specified, their internal behavior, and how they
+affect the behavior of the utility.
+.TP 7
+\fB-M\ \fP \fImail_list\fP
+Redefine the list of users to which the batch server that executes
+the batch job is to send mail, if the batch server sends
+mail about the batch job.
+.LP
+The syntax of the \fImail_list\fP option-argument is unspecified.
+If the implementation of the \fIqalter\fP utility uses a
+name service to locate users, the utility shall accept the syntax
+used by the name service.
+.LP
+If the implementation of the \fIqalter\fP utility does not use a name
+service to locate users, the implementation shall accept
+the following syntax for user names:
+.sp
+.RS
+.nf
+
+\fBmail_address[,,mail_address,,...]
+\fP
+.fi
+.RE
+.LP
+The interpretation of \fImail_address\fP is implementation-defined.
+.LP
+The \fIqalter\fP utility shall set the \fIMail_Users\fP attribute
+of the batch job to the value of the \fImail_list\fP
+option-argument.
+.TP 7
+\fB-N\ \fP \fIname\fP
+Redefine the name of the batch job.
+.LP
+The \fIqalter\fP \fB-N\fP option shall accept a value for the \fIname\fP
+option-argument that is a string of up to 15
+alphanumeric characters in the portable character set where the first
+character is alphabetic.
+.LP
+The syntax of the \fIname\fP option-argument is unspecified.
+.LP
+The \fIqalter\fP utility shall set the \fIJob_Name\fP attribute of
+the batch job to the value of the \fIname\fP
+option-argument.
+.TP 7
+\fB-o\ \fP \fIpath_name\fP
+Redefine the path for the standard output of the batch job.
+.LP
+The \fIqalter\fP utility shall accept a \fIpath_name\fP option-argument
+that conforms to the syntax of the \fIpath_name\fP
+element defined in the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+which can be preceded by a host name element of
+the form \fIhostname\fP:.
+.LP
+If the \fIpath_name\fP option-argument constitutes an absolute pathname,
+the \fIqalter\fP utility shall set the
+\fIOutput_Path\fP attribute of the batch job to the value of the \fIpath_name\fP
+option-argument.
+.LP
+If the \fIpath_name\fP option-argument constitutes a relative pathname
+and no host name element is specified, the \fIqalter\fP
+utility shall set the \fIOutput_Path\fP attribute of the batch job
+to the absolute pathname derived by expanding the
+\fIpath_name\fP option-argument relative to the current directory
+of the process that executes the \fIqalter\fP utility.
+.LP
+If the \fIpath_name\fP option-argument constitutes a relative pathname
+and a host name element is specified, the \fIqalter\fP
+utility shall set the \fIOutput_Path\fP attribute of the batch job
+to the value of the \fIpath_name\fP option-argument without
+any expansion of the pathname.
+.LP
+If the \fIpath_name\fP option-argument does not include a host name
+element, the \fIqalter\fP utility shall prefix the
+pathname in the \fIOutput_Path\fP attribute with \fIhostname\fP:,
+where \fIhostname\fP is the name of the host upon which the
+\fIqalter\fP utility is being executed.
+.TP 7
+\fB-p\ \fP \fIpriority\fP
+Redefine the priority of the batch job.
+.LP
+The \fIqalter\fP utility shall accept a value for the priority option-argument
+that conforms to the syntax for signed decimal
+integers, and which is not less than -1024 and not greater than 1023.
+.LP
+The \fIqalter\fP utility shall set the \fIPriority\fP attribute of
+the batch job to the value of the \fIpriority\fP
+option-argument.
+.TP 7
+\fB-r\ \fP \fBy\fP|\fBn\fP
+Redefine whether the batch job is rerunnable.
+.LP
+If the value of the option-argument is \fB'y'\fP, the \fIqalter\fP
+utility shall set the \fIRerunable\fP attribute of the
+batch job to TRUE.
+.LP
+If the value of the option-argument is \fB'n'\fP, the \fIqalter\fP
+utility shall set the \fIRerunable\fP attribute of the
+batch job to FALSE.
+.LP
+The \fIqalter\fP utility shall consider it an error if any character
+other than \fB'y'\fP or \fB'n'\fP is specified in
+the option-argument.
+.TP 7
+\fB-S\ \fP \fIpath_name_list\fP
+.sp
+Redefine the shell that interprets the script at the destination system.
+.LP
+The \fIqalter\fP utility shall accept a \fIpath_name_list\fP option-argument
+that conforms to the following syntax:
+.sp
+.RS
+.nf
+
+\fBpathname[@host][,pathname[@host],...]
+\fP
+.fi
+.RE
+.LP
+The \fIqalter\fP utility shall accept only one pathname that is missing
+a corresponding host name. The \fIqalter\fP utility
+shall allow only one pathname per named host.
+.LP
+The \fIqalter\fP utility shall add a value to the \fIShell_Path_List\fP
+attribute of the batch job for each entry in the
+\fIpath_name_list\fP option-argument. See \fIMultiple Keyword-Value
+Pairs\fP for a
+means of removing \fIkeyword\fP= \fIvalue\fP (and \fIvalue\fP@ \fIkeyword\fP)
+pairs and other general rules for list-oriented
+batch job attributes.
+.TP 7
+\fB-u\ \fP \fIuser_list\fP
+Redefine the user name under which the batch job is to run at the
+destination system.
+.LP
+The \fIqalter\fP utility shall accept a \fIuser_list\fP option-argument
+that conforms to the following syntax:
+.sp
+.RS
+.nf
+
+\fBusername[@host][,,username[@host],,...]
+\fP
+.fi
+.RE
+.LP
+The \fIqalter\fP utility shall accept only one user name that is missing
+a corresponding host name. The \fIqalter\fP utility
+shall accept only one user name per named host.
+.LP
+The \fIqalter\fP utility shall add a value to the \fIUser_List\fP
+attribute of the batch job for each entry in the
+\fIuser_list\fP option-argument. See \fIMultiple Keyword-Value Pairs\fP
+for a means of
+removing \fIkeyword\fP= \fIvalue\fP (and \fIvalue\fP@ \fIkeyword\fP)
+pairs and other general rules for list-oriented batch job
+attributes.
+.sp
+.SH OPERANDS
+.LP
+The \fIqalter\fP utility shall accept one or more operands that conform
+to the syntax for a batch \fIjob_identifier\fP (see \fIBatch Job Identifier\fP
+).
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIqalter\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fILOGNAME\fP
+Determine the login name of the user.
+.TP 7
+\fITZ\fP
+Determine the timezone used to interpret the \fIdate-time\fP option-argument.
+If \fITZ\fP is unset or null, an unspecified
+default timezone shall be used.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+None.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+In addition to the default behavior, the \fIqalter\fP utility shall
+not be required to write a diagnostic message to standard
+error when the error reply received from a batch server indicates
+that the batch \fIjob_identifier\fP does not exist on the
+server. Whether or not the \fIqalter\fP utility attempts to locate
+the batch job on other batch servers is
+implementation-defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIqalter\fP utility allows users to change the attributes of
+a batch job.
+.LP
+As a means of altering a queued job, the \fIqalter\fP utility is superior
+to deleting and requeuing the batch job insofar as an
+altered job retains its place in the queue with some traditional selection
+algorithms. In addition, the \fIqalter\fP utility is
+both shorter and simpler than a sequence of \fIqdel\fP and \fIqsub\fP
+utilities.
+.LP
+The result of an attempt on the part of a user to alter a batch job
+in a RUNNING state is implementation-defined because a batch
+job in the RUNNING state will already have opened its output files
+and otherwise performed any actions indicated by the options in
+effect at the time the batch job began execution.
+.LP
+The options processed by the \fIqalter\fP utility are identical to
+those of the \fIqsub\fP utility, with a few exceptions: \fB-V\fP,
+\fB-v\fP, and \fB-q\fP. The \fB-V\fP and
+\fB-v\fP are inappropriate for the \fIqalter\fP utility, since they
+capture potentially transient environment information from
+the submitting process. The \fB-q\fP option would specify a new queue,
+which would largely negate the previously stated advantage
+of using \fIqalter\fP; furthermore, the \fIqmove\fP utility provides
+a superior means of
+moving jobs.
+.LP
+Each of the following paragraphs provides the rationale for a \fIqalter\fP
+option.
+.LP
+Additional rationale concerning these options can be found in the
+rationale for the \fIqsub\fP utility.
+.LP
+The \fB-a\fP option allows users to alter the date and time at which
+a batch job becomes eligible to run.
+.LP
+The \fB-A\fP option allows users to change the account that will be
+charged for the resources consumed by the batch job.
+Support for the \fB-A\fP option is mandatory for conforming implementations
+of \fIqalter\fP, even though support of accounting is
+optional for servers. Whether or not to support accounting is left
+to the implementor of the server, but mandatory support of the
+\fB-A\fP option assures users of a consistent interface and allows
+them to control accounting on servers that support
+accounting.
+.LP
+The \fB-c\fP option allows users to alter the checkpointing interval
+of a batch job. A checkpointing system, which is not
+defined by IEEE\ Std\ 1003.1-2001, allows recovery of a batch job
+at the most recent checkpoint in the event of a crash.
+Checkpointing is typically used for jobs that consume expensive computing
+time or must meet a critical schedule. Users should be
+allowed to make the tradeoff between the overhead of checkpointing
+and the risk to the timely completion of the batch job;
+therefore, this volume of IEEE\ Std\ 1003.1-2001 provides the checkpointing
+interval option. Support for checkpointing is
+optional for servers.
+.LP
+The \fB-e\fP option allows users to alter the name and location of
+the standard error stream written by a batch job. However,
+the path of the standard error stream is meaningless if the value
+of the \fIJoin_Path\fP attribute of the batch job is TRUE.
+.LP
+The \fB-h\fP option allows users to set the hold type in the \fIHold_Types\fP
+attribute of a batch job. The \fIqhold\fP and \fIqrls\fP utilities
+add or remove hold types
+to the \fIHold_Types\fP attribute, respectively. The \fB-h\fP option
+has been modified to allow for implementation-defined hold
+types.
+.LP
+The \fB-j\fP option allows users to alter the decision to join (merge)
+the standard error stream of the batch job with the
+standard output stream of the batch job.
+.LP
+The \fB-l\fP option allows users to change the resource limits imposed
+on a batch job.
+.LP
+The \fB-m\fP option allows users to modify the list of points in the
+life of a batch job at which the designated users will
+receive mail notification.
+.LP
+The \fB-M\fP option allows users to alter the list of users who will
+receive notification about events in the life of a batch
+job.
+.LP
+The \fB-N\fP option allows users to change the name of a batch job.
+.LP
+The \fB-o\fP option allows users to alter the name and path to which
+the standard output stream of the batch job will be
+written.
+.LP
+The \fB-P\fP option allows users to modify the priority of a batch
+job. Support for priority is optional for batch servers.
+.LP
+The \fB-r\fP option allows users to alter the rerunability status
+of a batch job.
+.LP
+The \fB-S\fP option allows users to change the name and location of
+the shell image that will be invoked to interpret the
+script of the batch job. This option has been modified to allow a
+list of shell name and locations associated with different
+hosts.
+.LP
+The \fB-u\fP option allows users to change the user identifier under
+which the batch job will execute.
+.LP
+The \fIjob_identifier\fP operand syntax is provided so that the user
+can differentiate between the originating and destination
+(or executing) batch server. These may or may not be the same. The
+\&. \fIserver_name\fP portion identifies the originating batch
+server, while the @ \fIserver\fP portion identifies the destination
+batch server.
+.LP
+Historically, the \fIqalter\fP utility has been a component of the
+Network Queuing System (NQS), the existing practice from
+which this utility has been derived.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIBatch Environment Services\fP, \fIqdel\fP, \fIqhold\fP, \fIqmove\fP,
+\fIqrls\fP, \fIqsub\fP, \fItouch\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/qdel.1p b/man-pages-posix-2003/man1p/qdel.1p
new file mode 100644
index 0000000..d3df85e
--- /dev/null
+++ b/man-pages-posix-2003/man1p/qdel.1p
@@ -0,0 +1,180 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "QDEL" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" qdel
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+qdel \- delete batch jobs
+.SH SYNOPSIS
+.LP
+\fBqdel\fP \fIjob_identifier\fP \fB... \fP
+.SH DESCRIPTION
+.LP
+A batch job is deleted by sending a request to the batch server that
+manages the batch job. A batch job that has been deleted is
+no longer subject to management by batch services.
+.LP
+The \fIqdel\fP utility is a user-accessible client of batch services
+that requests the deletion of one or more batch jobs.
+.LP
+The \fIqdel\fP utility shall request a batch server to delete those
+batch jobs for which a batch \fIjob_identifier\fP is
+presented to the utility.
+.LP
+The \fIqdel\fP utility shall delete batch jobs in the order in which
+their batch \fIjob_identifier\fPs are presented to the
+utility.
+.LP
+If the \fIqdel\fP utility fails to process any batch \fIjob_identifier\fP
+successfully, the utility shall proceed to process
+the remaining batch \fIjob_identifier\fPs, if any.
+.LP
+The \fIqdel\fP utility shall delete each batch job by sending a \fIDelete
+Job Request\fP to the batch server that manages the
+batch job.
+.LP
+The \fIqdel\fP utility shall not exit until the batch job corresponding
+to each successfully processed batch
+\fIjob_identifier\fP has been deleted.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+The \fIqdel\fP utility shall accept one or more operands that conform
+to the syntax for a batch \fIjob_identifier\fP (see \fIBatch Job Identifier\fP
+).
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIqdel\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fILOGNAME\fP
+Determine the login name of the user.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+An implementation of the \fIqdel\fP utility may write informative
+messages to standard output.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+In addition to the default behavior, the \fIqdel\fP utility shall
+not be required to write a diagnostic message to standard
+error when the error reply received from a batch server indicates
+that the batch \fIjob_identifier\fP does not exist on the
+server. Whether or not the \fIqdel\fP utility waits to output the
+diagnostic message while attempting to locate the job on other
+servers is implementation-defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIqdel\fP utility allows users and administrators to delete jobs.
+.LP
+The \fIqdel\fP utility provides functionality that is not otherwise
+available. For example, the \fIkill\fP utility of the operating system
+does not suffice. First, to use the \fIkill\fP utility, the user might
+have to log in on a remote node, because the \fIkill\fP utility does
+not operate across the network. Second, unlike \fIqdel\fP, \fIkill\fP
+cannot remove jobs from queues. Lastly, the arguments of the \fIqdel\fP
+utility are job
+identifiers rather than process identifiers, and so this utility can
+be passed the output of the \fIqselect\fP utility, thus providing
+users with a means of deleting a list of jobs.
+.LP
+Because a set of jobs can be selected using the \fIqselect\fP utility,
+the \fIqdel\fP
+utility has not been complicated with options that provide for selection
+of jobs. Instead, the batch jobs to be deleted are
+identified individually by their job identifiers.
+.LP
+Historically, the \fIqdel\fP utility has been a component of NQS,
+the existing practice on which it is based. However, the
+\fIqdel\fP utility defined in this volume of IEEE\ Std\ 1003.1-2001
+does not provide an option for specifying a signal
+number to send to the batch job prior to the killing of the process;
+that capability has been subsumed by the \fIqsig\fP utility.
+.LP
+A discussion was held about the delays of networking and the possibility
+that the batch server may never respond, due to a down
+router, down batch server, or other network mishap. The DESCRIPTION
+records this under the words "fails to process any job
+identifier". In the broad sense, the network problem is also an error,
+which causes the failure to process the batch job
+identifier.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIBatch Environment Services\fP, \fIkill\fP(), \fIqselect\fP,
+\fIqsig\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/qhold.1p b/man-pages-posix-2003/man1p/qhold.1p
new file mode 100644
index 0000000..0e3ff90
--- /dev/null
+++ b/man-pages-posix-2003/man1p/qhold.1p
@@ -0,0 +1,235 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "QHOLD" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" qhold
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+qhold \- hold batch jobs
+.SH SYNOPSIS
+.LP
+\fBqhold\fP \fB[\fP\fB-h\fP \fIhold_list\fP\fB]\fP \fIjob_identifier\fP
+\fB\&... \fP
+.SH DESCRIPTION
+.LP
+A hold is placed on a batch job by a request to the batch server that
+manages the batch job. A batch job that has one or more
+holds is not eligible for execution. The \fIqhold\fP utility is a
+user-accessible client of batch services that requests one or
+more types of hold to be placed on one or more batch jobs.
+.LP
+The \fIqhold\fP utility shall place holds on those batch jobs for
+which a batch \fIjob_identifier\fP is presented to the
+utility.
+.LP
+The \fIqhold\fP utility shall place holds on batch jobs in the order
+in which their batch \fIjob_identifier\fPs are presented
+to the utility. If the \fIqhold\fP utility fails to process any batch
+\fIjob_identifier\fP successfully, the utility shall
+proceed to process the remaining batch \fIjob_identifier\fPs, if any.
+.LP
+The \fIqhold\fP utility shall place holds on each batch job by sending
+a \fIHold Job Request\fP to the batch server that
+manages the batch job.
+.LP
+The \fIqhold\fP utility shall not exit until holds have been placed
+on the batch job corresponding to each successfully
+processed batch \fIjob_identifier\fP.
+.SH OPTIONS
+.LP
+The \fIqhold\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following option shall be supported by the implementation:
+.TP 7
+\fB-h\ \fP \fIhold_list\fP
+Define the types of holds to be placed on the batch job.
+.LP
+The \fIqhold\fP \fB-h\fP option shall accept a value for the \fIhold_list\fP
+option-argument that is a string of alphanumeric
+characters in the portable character set (see the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Section 6.1, Portable Character
+Set).
+.LP
+The \fIqhold\fP utility shall accept a value for the \fIhold_list\fP
+option-argument that is a string of one or more of the
+characters \fB'u'\fP, \fB's'\fP, or \fB'o'\fP, or the single character
+\fB'n'\fP .
+.LP
+For each unique character in the \fIhold_list\fP option-argument,
+the \fIqhold\fP utility shall add a value to the
+\fIHold_Types\fP attribute of the batch job as follows, each representing
+a different hold type:
+.TP 7
+\fBu\fP
+.RS
+USER
+.RE
+.TP 7
+\fBs\fP
+.RS
+SYSTEM
+.RE
+.TP 7
+\fBo\fP
+.RS
+OPERATOR
+.RE
+.sp
+.LP
+If any of these characters are duplicated in the \fIhold_list\fP option-argument,
+the duplicates shall be ignored.
+.LP
+An existing \fIHold_Types\fP attribute can be cleared by the following
+hold type:
+.TP 7
+\fBn\fP
+.RS
+NO_HOLD
+.RE
+.sp
+.LP
+The \fIqhold\fP utility shall consider it an error if any hold type
+other than \fB'n'\fP is combined with hold type
+\fB'n'\fP .
+.LP
+Strictly conforming applications shall not repeat any of the characters
+\fB'u'\fP, \fB's'\fP, \fB'o'\fP, or
+\fB'n'\fP within the \fIhold_list\fP option-argument. The \fIqhold\fP
+utility shall permit the repetition of characters, but
+shall not assign additional meaning to the repeated characters.
+.LP
+An implementation may define other hold types. The conformance document
+for an implementation shall describe any additional hold
+types, how they are specified, their internal behavior, and how they
+affect the behavior of the utility.
+.LP
+If the \fB-h\fP option is not presented to the \fIqhold\fP utility,
+the implementation shall set the \fIHold_Types\fP
+attribute to USER.
+.sp
+.SH OPERANDS
+.LP
+The \fIqhold\fP utility shall accept one or more operands that conform
+to the syntax for a batch \fIjob_identifier\fP (see \fIBatch Job Identifier\fP
+).
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIqhold\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fILOGNAME\fP
+Determine the login name of the user.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+None.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+In addition to the default behavior, the \fIqhold\fP utility shall
+not be required to write a diagnostic message to standard
+error when the error reply received from a batch server indicates
+that the batch \fIjob_identifier\fP does not exist on the
+server. Whether or not the \fIqhold\fP utility waits to output the
+diagnostic message while attempting to locate the job on other
+servers is implementation-defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIqhold\fP utility allows users to place a hold on one or more
+jobs. A hold makes a batch job ineligible for
+execution.
+.LP
+The \fIqhold\fP utility has options that allow the user to specify
+the type of hold. Should the user wish to place a hold on a
+set of jobs that meet a selection criteria, such a list of jobs can
+be acquired using the \fIqselect\fP utility.
+.LP
+The \fB-h\fP option allows the user to specify the type of hold that
+is to be placed on the job. This option allows for USER,
+SYSTEM, OPERATOR, and implementation-defined hold types. The USER
+and OPERATOR holds are distinct. The batch server that manages
+the batch job will verify that the user is authorized to set the specified
+hold for the batch job.
+.LP
+Mail is not required on hold because the administrator has the tools
+and libraries to build this option if he or she wishes.
+.LP
+Historically, the \fIqhold\fP utility has been a part of some existing
+batch systems, although it has not traditionally been a
+part of the NQS.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIBatch Environment Services\fP, \fIqselect\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/qmove.1p b/man-pages-posix-2003/man1p/qmove.1p
new file mode 100644
index 0000000..e296b20
--- /dev/null
+++ b/man-pages-posix-2003/man1p/qmove.1p
@@ -0,0 +1,159 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "QMOVE" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" qmove
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+qmove \- move batch jobs
+.SH SYNOPSIS
+.LP
+\fBqmove\fP \fIdestination job_identifier\fP \fB... \fP
+.SH DESCRIPTION
+.LP
+To move a batch job is to remove the batch job from the batch queue
+in which it resides and instantiate the batch job in another
+batch queue. A batch job is moved by a request to the batch server
+that manages the batch job. The \fIqmove\fP utility is a
+user-accessible batch client that requests the movement of one or
+more batch jobs.
+.LP
+The \fIqmove\fP utility shall move those batch jobs, and only those
+batch jobs, for which a batch \fIjob_identifier\fP is
+presented to the utility.
+.LP
+The \fIqmove\fP utility shall move batch jobs in the order in which
+the corresponding batch \fIjob_identifier\fPs are
+presented to the utility.
+.LP
+If the \fIqmove\fP utility fails to process a batch \fIjob_identifier\fP
+successfully, the utility shall proceed to process
+the remaining batch \fIjob_identifier\fPs, if any.
+.LP
+The \fIqmove\fP utility shall move batch jobs by sending a \fIMove
+Job Request\fP to the batch server that manages each batch
+job. The \fIqmove\fP utility shall not exit before the batch jobs
+corresponding to all successfully processed batch
+\fIjob_identifier\fPs have been moved.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+The \fIqmove\fP utility shall accept one operand that conforms to
+the syntax for a destination (see \fIDestination\fP ).
+.LP
+The \fIqmove\fP utility shall accept one or more operands that conform
+to the syntax for a batch \fIjob_identifier\fP (see \fIBatch Job Identifier\fP
+).
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIqmove\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fILOGNAME\fP
+Determine the login name of the user.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+None.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+In addition to the default behavior, the \fIqmove\fP utility shall
+not be required to write a diagnostic message to standard
+error when the error reply received from a batch server indicates
+that the batch \fIjob_identifier\fP does not exist on the
+server. Whether or not the \fIqmove\fP utility waits to output the
+diagnostic message while attempting to locate the job on other
+servers is implementation-defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIqmove\fP utility allows users to move jobs between queues.
+.LP
+The alternative to using the \fIqmove\fP utility-deleting the batch
+job and requeuing it-entails considerably more typing.
+.LP
+Since the means of selecting jobs based on attributes has been encapsulated
+in the \fIqselect\fP utility, the only option of the \fIqmove\fP utility
+concerns authorization. The
+\fB-u\fP option provides the user with the convenience of changing
+the user identifier under which the batch job will execute.
+Minimalism and consistency have taken precedence over convenience;
+the \fB-u\fP option has been deleted because the equivalent
+capability exists with the \fB-u\fP option of the \fIqalter\fP utility.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIBatch Environment Services\fP, \fIqalter\fP, \fIqselect\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/qmsg.1p b/man-pages-posix-2003/man1p/qmsg.1p
new file mode 100644
index 0000000..5e38fd5
--- /dev/null
+++ b/man-pages-posix-2003/man1p/qmsg.1p
@@ -0,0 +1,219 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "QMSG" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" qmsg
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+qmsg \- send message to batch jobs
+.SH SYNOPSIS
+.LP
+\fBqmsg\fP \fB[\fP\fB-E\fP\fB][\fP\fB-O\fP\fB]\fP \fImessage_string
+job_identifier\fP \fB...
+\fP
+.SH DESCRIPTION
+.LP
+To send a message to a batch job is to request that a server write
+a message string into one or more output files of the batch
+job. A message is sent to a batch job by a request to the batch server
+that manages the batch job. The \fIqmsg\fP utility is a
+user-accessible batch client that requests the sending of messages
+to one or more batch jobs.
+.LP
+The \fIqmsg\fP utility shall write messages into the files of batch
+jobs by sending a \fIJob Message Request\fP to the batch
+server that manages the batch job. The \fIqmsg\fP utility shall not
+directly write the message into the files of the batch
+job.
+.LP
+The \fIqmsg\fP utility shall send a \fIJob Message Request\fP for
+those batch jobs, and only those batch jobs, for which a
+batch \fIjob_identifier\fP is presented to the utility.
+.LP
+The \fIqmsg\fP utility shall send \fIJob Message Request\fPs for batch
+jobs in the order in which their batch
+\fIjob_identifier\fPs are presented to the utility.
+.LP
+If the \fIqmsg\fP utility fails to process any batch \fIjob_identifier\fP
+successfully, the utility shall proceed to process
+the remaining batch \fIjob_identifier\fPs, if any.
+.LP
+The \fIqmsg\fP utility shall not exit before a \fIJob Message Request\fP
+has been sent to the server that manages the batch
+job that corresponds to each successfully processed batch \fIjob_identifier\fP.
+.SH OPTIONS
+.LP
+The \fIqmsg\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported by the implementation:
+.TP 7
+\fB-E\fP
+Specify that the message is written to the standard error of each
+batch job.
+.LP
+The \fIqmsg\fP utility shall write the message into the standard error
+of the batch job.
+.TP 7
+\fB-O\fP
+Specify that the message is written to the standard output of each
+batch job.
+.LP
+The \fIqmsg\fP utility shall write the message into the standard output
+of the batch job.
+.sp
+.LP
+If neither the \fB-O\fP nor the \fB-E\fP option is presented to the
+\fIqmsg\fP utility, the utility shall write the message
+into an implementation-defined file. The conformance document for
+the implementation shall describe the name and location of the
+implementation-defined file. If both the \fB-O\fP and the \fB-E\fP
+options are presented to the \fIqmsg\fP utility, then the
+utility shall write the messages to both standard output and standard
+error.
+.SH OPERANDS
+.LP
+The \fIqmsg\fP utility shall accept a minimum of two operands, \fImessage_string\fP
+and one or more batch
+\fIjob_identifier\fPs.
+.LP
+The \fImessage_string\fP operand shall be the string to be written
+to one or more output files of the batch job followed by a
+<newline>. If the string contains <blank>s, then the application shall
+ensure that the string is quoted. The
+\fImessage_string\fP shall be encoded in the portable character set
+(see the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 6.1, Portable Character Set).
+.LP
+All remaining operands are batch \fIjob_identifier\fPs that conform
+to the syntax for a batch \fIjob_identifier\fP (see \fIBatch Job Identifier\fP
+).
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIqmsg\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fILOGNAME\fP
+Determine the login name of the user.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+None.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+In addition to the default behavior, the \fIqmsg\fP utility shall
+not be required to write a diagnostic message to standard
+error when the error reply received from a batch server indicates
+that the batch \fIjob_identifier\fP does not exist on the
+server. Whether or not the \fIqmsg\fP utility waits to output the
+diagnostic message while attempting to locate the job on other
+servers is implementation-defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIqmsg\fP utility allows users to write messages into the output
+files of running jobs. Users, including operators and
+administrators, have a number of occasions when they want to place
+messages in the output files of a batch job. For example, if a
+disk that is being used by a batch job is showing errors, the operator
+might note this in the standard error stream of the batch
+job.
+.LP
+The options of the \fIqmsg\fP utility provide users with the means
+of placing the message in the output stream of their choice.
+The default output stream for the message-if the user does not designate
+an output stream-is implementation-defined, since many
+implementations will provide, as an extension to this volume of IEEE\ Std\ 1003.1-2001,
+a log file that shows the history
+of utility execution.
+.LP
+If users wish to send a message to a set of jobs that meet a selection
+criteria, the \fIqselect\fP utility can be used to acquire the appropriate
+list of job identifiers.
+.LP
+The \fB-E\fP option allows users to place the message in the standard
+error stream of the batch job.
+.LP
+The \fB-O\fP option allows users to place the message in the standard
+output stream of the batch job.
+.LP
+Historically, the \fIqmsg\fP utility is an existing practice in the
+offerings of one or more implementors of an NQS-derived
+batch system. The utility has been found to be useful enough that
+it deserves to be included in this volume of
+IEEE\ Std\ 1003.1-2001.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIBatch Environment Services\fP, \fIqselect\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/qrerun.1p b/man-pages-posix-2003/man1p/qrerun.1p
new file mode 100644
index 0000000..4fd3c28
--- /dev/null
+++ b/man-pages-posix-2003/man1p/qrerun.1p
@@ -0,0 +1,151 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "QRERUN" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" qrerun
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+qrerun \- rerun batch jobs
+.SH SYNOPSIS
+.LP
+\fBqrerun\fP \fIjob_identifier\fP \fB... \fP
+.SH DESCRIPTION
+.LP
+To rerun a batch job is to terminate the session leader of the batch
+job, delete any associated checkpoint files, and return the
+batch job to the batch queued state. A batch job is rerun by a request
+to the batch server that manages the batch job. The
+\fIqrerun\fP utility is a user-accessible batch client that requests
+the rerunning of one or more batch jobs.
+.LP
+The \fIqrerun\fP utility shall rerun those batch jobs for which a
+batch \fIjob_identifier\fP is presented to the utility.
+.LP
+The \fIqrerun\fP utility shall rerun batch jobs in the order in which
+their batch \fIjob_identifier\fPs are presented to the
+utility.
+.LP
+If the \fIqrerun\fP utility fails to process any batch \fIjob_identifier\fP
+successfully, the utility shall proceed to process
+the remaining batch \fIjob_identifier\fPs, if any.
+.LP
+The \fIqrerun\fP utility shall rerun batch jobs by sending a \fIRerun
+Job Request\fP to the batch server that manages each
+batch job.
+.LP
+For each successfully processed batch \fIjob_identifier\fP, the \fIqrerun\fP
+utility shall have rerun the corresponding batch
+job at the time the utility exits.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+The \fIqrerun\fP utility shall accept one or more operands that conform
+to the syntax for a batch \fIjob_identifier\fP (see \fIBatch Job Identifier\fP
+).
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIqrerun\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fILOGNAME\fP
+Determine the login name of the user.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+None.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+In addition to the default behavior, the \fIqrerun\fP utility shall
+not be required to write a diagnostic message to standard
+error when the error reply received from a batch server indicates
+that the batch \fIjob_identifier\fP does not exist on the
+server. Whether or not the \fIqrerun\fP utility waits to output the
+diagnostic message while attempting to locate the job on other
+servers is implementation-defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIqrerun\fP utility allows users to cause jobs in the running
+state to exit and rerun.
+.LP
+The \fIqrerun\fP utility is a new utility, \fIvis-a-vis\fP existing
+practice, that has been defined in this volume of
+IEEE\ Std\ 1003.1-2001 to correct user-perceived deficiencies in the
+existing practice.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIBatch Environment Services\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/qrls.1p b/man-pages-posix-2003/man1p/qrls.1p
new file mode 100644
index 0000000..16f82ec
--- /dev/null
+++ b/man-pages-posix-2003/man1p/qrls.1p
@@ -0,0 +1,241 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "QRLS" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" qrls
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+qrls \- release batch jobs
+.SH SYNOPSIS
+.LP
+\fBqrls\fP \fB[\fP\fB-h\fP \fIhold_list\fP\fB]\fP \fIjob_identifier\fP
+\fB\&... \fP
+.SH DESCRIPTION
+.LP
+A batch job might have one or more holds, which prevent the batch
+job from executing. A batch job from which all the holds have
+been removed becomes eligible for execution and is said to have been
+released. A batch job hold is removed by sending a request to
+the batch server that manages the batch job. The \fIqrls\fP utility
+is a user-accessible client of batch services that requests
+holds be removed from one or more batch jobs.
+.LP
+The \fIqrls\fP utility shall remove one or more holds from those batch
+jobs for which a batch \fIjob_identifier\fP is
+presented to the utility.
+.LP
+The \fIqrls\fP utility shall remove holds from batch jobs in the order
+in which their batch \fIjob_identifier\fPs are
+presented to the utility.
+.LP
+If the \fIqrls\fP utility fails to process a batch \fIjob_identifier\fP
+successfully, the utility shall proceed to process the
+remaining batch \fIjob_identifier\fPs, if any.
+.LP
+The \fIqrls\fP utility shall remove holds on each batch job by sending
+a \fIRelease Job Request\fP to the batch server that
+manages the batch job.
+.LP
+The \fIqrls\fP utility shall not exit until the holds have been removed
+from the batch job corresponding to each successfully
+processed batch \fIjob_identifier\fP.
+.SH OPTIONS
+.LP
+The \fIqrls\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following option shall be supported by the implementation:
+.TP 7
+\fB-h\ \fP \fIhold_list\fP
+Define the types of holds to be removed from the batch job.
+.LP
+The \fIqrls\fP \fB-h\fP option shall accept a value for the \fIhold_list\fP
+option-argument that is a string of alphanumeric
+characters in the portable character set (see the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Section 6.1, Portable Character
+Set).
+.LP
+The \fIqrls\fP utility shall accept a value for the \fIhold_list\fP
+option-argument that is a string of one or more of the
+characters \fB'u'\fP, \fB's'\fP, or \fB'o'\fP, or the single character
+\fB'n'\fP .
+.LP
+For each unique character in the \fIhold_list\fP option-argument,
+the \fIqrls\fP utility shall add a value to the
+\fIHold_Types\fP attribute of the batch job as follows, each representing
+a different hold type:
+.TP 7
+\fBu\fP
+.RS
+USER
+.RE
+.TP 7
+\fBs\fP
+.RS
+SYSTEM
+.RE
+.TP 7
+\fBo\fP
+.RS
+OPERATOR
+.RE
+.sp
+.LP
+If any of these characters are duplicated in the \fIhold_list\fP option-argument,
+the duplicates shall be ignored.
+.LP
+An existing \fIHold_Types\fP attribute can be cleared by the following
+hold type:
+.TP 7
+\fBn\fP
+.RS
+NO_HOLD
+.RE
+.sp
+.LP
+The \fIqrls\fP utility shall consider it an error if any hold type
+other than \fB'n'\fP is combined with hold type
+\fB'n'\fP .
+.LP
+Strictly conforming applications shall not repeat any of the characters
+\fB'u'\fP, \fB's'\fP, \fB'o'\fP, or
+\fB'n'\fP within the \fIhold_list\fP option-argument. The \fIqrls\fP
+utility shall permit the repetition of characters, but
+shall not assign additional meaning to the repeated characters.
+.LP
+An implementation may define other hold types. The conformance document
+for an implementation shall describe any additional hold
+types, how they are specified, their internal behavior, and how they
+affect the behavior of the utility.
+.LP
+If the \fB-h\fP option is not presented to the \fIqrls\fP utility,
+the implementation shall remove the USER hold in the
+\fIHold_Types\fP attribute.
+.sp
+.SH OPERANDS
+.LP
+The \fIqrls\fP utility shall accept one or more operands that conform
+to the syntax for a batch \fIjob_identifier\fP (see \fIBatch Job Identifier\fP
+).
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIqrls\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fILOGNAME\fP
+Determine the login name of the user.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+None.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+In addition to the default behavior, the \fIqrls\fP utility shall
+not be required to write a diagnostic message to standard
+error when the error reply received from a batch server indicates
+that the batch \fIjob_identifier\fP does not exist on the
+server. Whether or not the \fIqrls\fP utility waits to output the
+diagnostic message while attempting to locate the job on other
+servers is implementation-defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIqrls\fP utility allows users, operators, and administrators
+to remove holds from jobs.
+.LP
+The \fIqrls\fP utility does not support any job selection options
+or wildcard arguments. Users may acquire a list of jobs
+selected by attributes using the \fIqselect\fP utility. For example,
+a user could select
+all of their held jobs.
+.LP
+The \fB-h\fP option allows the user to specify the type of hold that
+is to be removed. This option allows for USER, SYSTEM,
+OPERATOR, and implementation-defined hold types. The batch server
+that manages the batch job will verify whether the user is
+authorized to remove the specified hold for the batch job. If more
+than one type of hold has been placed on the batch job, a user
+may wish to remove only some of them.
+.LP
+Mail is not required on release because the administrator has the
+tools and libraries to build this option if required.
+.LP
+The \fIqrls\fP utility is a new utility \fIvis-a-vis\fP existing practice;
+it has been defined in this volume of
+IEEE\ Std\ 1003.1-2001 as the natural complement to the \fIqhold\fP
+utility.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIBatch Environment Services\fP, \fIqhold\fP, \fIqselect\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/qselect.1p b/man-pages-posix-2003/man1p/qselect.1p
new file mode 100644
index 0000000..47ab6b7
--- /dev/null
+++ b/man-pages-posix-2003/man1p/qselect.1p
@@ -0,0 +1,768 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "QSELECT" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" qselect
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+qselect \- select batch jobs
+.SH SYNOPSIS
+.LP
+\fBqselect\fP \fB[\fP\fB-a\fP \fB[\fP\fIop\fP\fB]\fP\fIdate_time\fP\fB][\fP\fB-A\fP
+\fIaccount_string\fP\fB][\fP\fB-c\fP \fB[\fP\fIop\fP\fB]\fP\fIinterval\fP\fB]
+.br
+\fP \fB\ \ \ \ \ \ \fP \fB[\fP\fB-h\fP \fIhold_list\fP\fB][\fP\fB-l\fP
+\fIresource_list\fP\fB][\fP\fB-N\fP \fIname\fP\fB][\fP\fB-p\fP \fB[\fP\fIop\fP\fB]\fP\fIpriority\fP\fB]
+.br
+\fP \fB\ \ \ \ \ \ \fP \fB[\fP\fB-q\fP \fIdestination\fP\fB][\fP\fB-r\fP
+\fIy\fP\fB|\fP\fIn\fP\fB][\fP\fB-s\fP \fIstates\fP\fB][\fP\fB-u\fP
+\fIuser_list\fP\fB]\fP\fB\fP
+.SH DESCRIPTION
+.LP
+To select a set of batch jobs is to return the batch \fIjob_identifier\fPs
+for each batch job that meets a list of selection
+criteria. A set of batch jobs is selected by a request to a batch
+server. The \fIqselect\fP utility is a user-accessible batch
+client that requests the selection of batch jobs.
+.LP
+Upon successful completion, the \fIqselect\fP utility shall have returned
+a list of zero or more batch \fIjob_identifier\fPs
+that meet the criteria specified by the options and option-arguments
+presented to the utility.
+.LP
+The \fIqselect\fP utility shall select batch jobs by sending a \fISelect
+Jobs Request\fP to a batch server. The \fIqselect\fP
+utility shall not exit until the server replies to each request generated.
+.LP
+For each option presented to the \fIqselect\fP utility, the utility
+shall restrict the set of selected batch jobs as described
+in the OPTIONS section.
+.LP
+The \fIqselect\fP utility shall not restrict selection of batch jobs
+except by authorization and as required by the options
+presented to the utility.
+.LP
+When an option is specified with a mandatory or optional \fIop\fP
+component to the option-argument, then \fIop\fP shall
+specify a relation between the value of a certain batch job attribute
+and the \fIvalue\fP component of the option-argument. If an
+\fIop\fP is allowable on an option, then the description of the option
+letter indicates the \fIop\fP as either mandatory or
+optional. Acceptable strings for the \fIop\fP component, and the relation
+the string indicates, are shown in the following
+list:
+.TP 7
+\fB\&.eq.\fP
+The value represented by the attribute of the batch job is equal to
+the value represented by the option-argument.
+.TP 7
+\fB\&.ge.\fP
+The value represented by the attribute of the batch job is greater
+than or equal to the value represented by the
+option-argument.
+.TP 7
+\fB\&.gt.\fP
+The value represented by the attribute of the batch job is greater
+than the value represented by the option-argument.
+.TP 7
+\fB\&.lt.\fP
+The value represented by the attribute of the batch job is less than
+the value represented by the option-argument.
+.TP 7
+\fB\&.le.\fP
+The value represented by the attribute of the batch job is less than
+or equal to the value represented by the
+option-argument.
+.TP 7
+\fB\&.ne.\fP
+The value represented by the attribute of the batch job is not equal
+to the value represented by the option-argument.
+.sp
+.SH OPTIONS
+.LP
+The \fIqselect\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported by the implementation:
+.TP 7
+\fB-a\ [\fP\fIop\fP\fB]\fP\fIdate_time\fP
+.sp
+Restrict selection to a specific time, or a range of times.
+.LP
+The \fIqselect\fP utility shall select only batch jobs for which the
+value of the \fIExecution_Time\fP attribute is related to
+the Epoch equivalent of the local time expressed by the value of the
+\fIdate_time\fP component of the option-argument in the
+manner indicated by the value of the \fIop\fP component of the option-argument.
+.LP
+The \fIqselect\fP utility shall accept a \fIdate_time\fP component
+of the option-argument that conforms to the syntax of the
+\fItime\fP operand of the \fItouch\fP utility.
+.LP
+If the \fIop\fP component of the option-argument is not presented
+to the \fIqselect\fP utility, the utility shall select batch
+jobs for which the \fIExecution_Time\fP attribute is equal to the
+\fIdate_time\fP component of the option-argument.
+.LP
+When comparing times, the \fIqselect\fP utility shall use the following
+definitions for the \fIop\fP component of the
+option-argument:
+.TP 7
+\fB\&.eq.\fP
+.RS
+The time represented by value of the \fIExecution_Time\fP attribute
+of the batch job is equal to the time represented by the
+\fIdate_time\fP component of the option-argument.
+.RE
+.TP 7
+\fB\&.ge.\fP
+.RS
+The time represented by value of the \fIExecution_Time\fP attribute
+of the batch job is after or equal to the time represented
+by the \fIdate_time\fP component of the option-argument.
+.RE
+.TP 7
+\fB\&.gt.\fP
+.RS
+The time represented by value of the \fIExecution_Time\fP attribute
+of the batch job is after the time represented by the
+\fIdate_time\fP component of the option-argument.
+.RE
+.TP 7
+\fB\&.lt.\fP
+.RS
+The time represented by value of the \fIExecution_Time\fP attribute
+of the batch job is before the time represented by the
+\fIdate_time\fP component of the option-argument.
+.RE
+.TP 7
+\fB\&.le.\fP
+.RS
+The time represented by value of the \fIExecution_Time\fP attribute
+of the batch job is before or equal to the time
+represented by the \fIdate_time\fP component of the option-argument.
+.RE
+.TP 7
+\fB\&.ne.\fP
+.RS
+The time represented by value of the \fIExecution_Time\fP attribute
+of the batch job is not equal to the time represented by
+the \fIdate_time\fP component of the option-argument.
+.RE
+.sp
+.LP
+The \fIqselect\fP utility shall accept the defined character strings
+for the \fIop\fP component of the option-argument.
+.TP 7
+\fB-A\ \fP \fIaccount_string\fP
+.sp
+Restrict selection to the batch jobs charging a specified account.
+.LP
+The \fIqselect\fP utility shall select only batch jobs for which the
+value of the \fIAccount_Name\fP attribute of the batch
+job matchs the value of the \fIaccount_string\fP option-argument.
+.LP
+The syntax of the \fIaccount_string\fP option-argument is unspecified.
+.TP 7
+\fB-c\ [\fP\fIop\fP\fB]\fP\fIinterval\fP
+.sp
+Restrict selection to batch jobs within a range of checkpoint intervals.
+.LP
+The \fIqselect\fP utility shall select only batch jobs for which the
+value of the \fICheckpoint\fP attribute relates to the
+value of the \fIinterval\fP component of the option-argument in the
+manner indicated by the value of the \fIop\fP component of
+the option-argument.
+.LP
+If the \fIop\fP component of the option-argument is omitted, the \fIqselect\fP
+utility shall select batch jobs for which the
+value of the \fICheckpoint\fP attribute is equal to the value of the
+\fIinterval\fP component of the option-argument.
+.LP
+When comparing checkpoint intervals, the \fIqselect\fP utility shall
+use the following definitions for the \fIop\fP component
+of the option-argument:
+.TP 7
+\fB\&.eq.\fP
+.RS
+The value of the \fICheckpoint\fP attribute of the batch job equals
+the value of the \fIinterval\fP component of the
+option-argument.
+.RE
+.TP 7
+\fB\&.ge.\fP
+.RS
+The value of the \fICheckpoint\fP attribute of the batch job is greater
+than or equal to the value of the \fIinterval\fP
+component option-argument.
+.RE
+.TP 7
+\fB\&.gt.\fP
+.RS
+The value of the \fICheckpoint\fP attribute of the batch job is greater
+than the value of the \fIinterval\fP component
+option-argument.
+.RE
+.TP 7
+\fB\&.lt.\fP
+.RS
+The value of the \fICheckpoint\fP attribute of the batch job is less
+than the value of the \fIinterval\fP component
+option-argument.
+.RE
+.TP 7
+\fB\&.le.\fP
+.RS
+The value of the \fICheckpoint\fP attribute of the batch job is less
+than or equal to the value of the \fIinterval\fP
+component option-argument.
+.RE
+.TP 7
+\fB\&.ne.\fP
+.RS
+The value of the \fICheckpoint\fP attribute of the batch job does
+not equal the value of the \fIinterval\fP component
+option-argument.
+.RE
+.sp
+.LP
+The \fIqselect\fP utility shall accept the defined character strings
+for the \fIop\fP component of the option-argument.
+.LP
+The ordering relationship for the values of the interval option-argument
+is defined to be:
+.sp
+.RS
+.nf
+
+\fB`n' .gt. `s' .gt. `c=\fP\fIminutes\fP\fB' .ge. `c'
+\fP
+.fi
+.RE
+When comparing \fICheckpoint\fP attributes with an interval having
+the value of the single character \fB'u'\fP, only equality
+or inequality are valid comparisons.
+.TP 7
+\fB-h\ \fP \fIhold_list\fP
+Restrict selection to batch jobs that have a specific type of hold.
+.LP
+The \fIqselect\fP utility shall select only batch jobs for which the
+value of the \fIHold_Types\fP attribute matches the value
+of the \fIhold_list\fP option-argument.
+.LP
+The \fIqselect\fP \fB-h\fP option shall accept a value for the \fIhold_list\fP
+option-argument that is a string of
+alphanumeric characters in the portable character set (see the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Section 6.1, Portable
+Character Set).
+.LP
+The \fIqselect\fP utility shall accept a value for the \fIhold_list\fP
+option-argument that is a string of one or more of the
+characters \fB'u'\fP, \fB's'\fP, or \fB'o'\fP, or the single character
+\fB'n'\fP .
+.LP
+Each unique character in the \fIhold_list\fP option-argument of the
+\fIqselect\fP utility is defined as follows, each
+representing a different hold type:
+.TP 7
+\fBu\fP
+.RS
+USER
+.RE
+.TP 7
+\fBs\fP
+.RS
+SYSTEM
+.RE
+.TP 7
+\fBo\fP
+.RS
+OPERATOR
+.RE
+.sp
+.LP
+If any of these characters are duplicated in the \fIhold_list\fP option-argument,
+the duplicates shall be ignored.
+.LP
+The \fIqselect\fP utility shall consider it an error if any hold type
+other than \fB'n'\fP is combined with hold type
+\fB'n'\fP .
+.LP
+Strictly conforming applications shall not repeat any of the characters
+\fB'u'\fP, \fB's'\fP, \fB'o'\fP, or
+\fB'n'\fP within the \fIhold_list\fP option-argument. The \fIqselect\fP
+utility shall permit the repetition of characters, but
+shall not assign additional meaning to the repeated characters.
+.LP
+An implementation may define other hold types. The conformance document
+for an implementation shall describe any additional hold
+types, how they are specified, their internal behavior, and how they
+affect the behavior of the utility.
+.TP 7
+\fB-l\ \fP \fIresource_list\fP
+.sp
+Restrict selection to batch jobs with specified resource limits and
+attributes.
+.LP
+The \fIqselect\fP utility shall accept a \fIresource_list\fP option-argument
+with the following syntax:
+.sp
+.RS
+.nf
+
+\fIresource_name op value\fP \fB[\fP\fB,,\fP\fIresource_name op value\fP\fB,, ...\fP\fB]\fP
+.fi
+.RE
+.LP
+When comparing resource values, the \fIqselect\fP utility shall use
+the following definitions for the \fIop\fP component of
+the option-argument:
+.TP 7
+\fB\&.eq.\fP
+.RS
+The value of the resource of the same name in the \fIResource_List\fP
+attribute of the batch job equals the value of the value
+component of the option-argument.
+.RE
+.TP 7
+\fB\&.ge.\fP
+.RS
+The value of the resource of the same name in the \fIResource_List\fP
+attribute of the batch job is greater than or equal to
+the value of the \fIvalue\fP component of the option-argument.
+.RE
+.TP 7
+\fB\&.gt.\fP
+.RS
+The value of the resource of the same name in the \fIResource_List\fP
+attribute of the batch job is greater than the value of
+the value component of the option-argument.
+.RE
+.TP 7
+\fB\&.lt.\fP
+.RS
+The value of the resource of the same name in the \fIResource_List\fP
+attribute of the batch job is less than the value of the
+value component of the option-argument.
+.RE
+.TP 7
+\fB\&.ne.\fP
+.RS
+The value of the resource of the same name in the \fIResource_List\fP
+attribute of the batch job does not equal the value of
+the value component of the option-argument.
+.RE
+.TP 7
+\fB\&.le.\fP
+.RS
+The value of the resource of the same name in the \fIResource_List\fP
+attribute of the batch job is less than or equal to the
+value of the \fIvalue\fP component of the option-argument.
+.RE
+.sp
+.LP
+When comparing the limit of a \fIResource_List\fP attribute with the
+\fIvalue\fP component of the option-argument, if the
+limit, the value, or both are non-numeric, only equality or inequality
+are valid comparisons.
+.LP
+The \fIqselect\fP utility shall select only batch jobs for which the
+values of the \fIresource_name\fPs listed in the
+\fIresource_list\fP option-argument match the corresponding limits
+of the \fIResource_List\fP attribute of the batch job.
+.LP
+Limits of \fIresource_name\fPs present in the \fIResource_List\fP
+attribute of the batch job that have no corresponding values
+in the \fIresource_list\fP option-argument shall not be considered
+when selecting batch jobs.
+.TP 7
+\fB-N\ \fP \fIname\fP
+Restrict selection to batch jobs with a specified name.
+.LP
+The \fIqselect\fP utility shall select only batch jobs for which the
+value of the \fIJob_Name\fP attribute matches the value
+of the \fIname\fP option-argument. The string specified in the \fIname\fP
+option-argument shall be passed, uninterpreted, to the
+server. This allows an implementation to match "wildcard" patterns
+against batch job names.
+.LP
+An implementation shall describe in the conformance document the format
+it supports for matching against the \fIJob_Name\fP
+attribute.
+.TP 7
+\fB-p\ [\fP\fIop\fP\fB]\fP\fIpriority\fP
+.sp
+Restrict selection to batch jobs of the specified priority or range
+of priorities.
+.LP
+The \fIqselect\fP utility shall select only batch jobs for which the
+value of the \fIPriority\fP attribute of the batch job
+relates to the value of the \fIpriority\fP component of the option-argument
+in the manner indicated by the value of the \fIop\fP
+component of the option-argument.
+.LP
+If the \fIop\fP component of the option-argument is omitted, the \fIqselect\fP
+utility shall select batch jobs for which the
+value of the \fIPriority\fP attribute of the batch job is equal to
+the value of the \fIpriority\fP component of the
+option-argument.
+.LP
+When comparing priority values, the \fIqselect\fP utility shall use
+the following definitions for the \fIop\fP component of
+the option-argument:
+.TP 7
+\fB\&.eq.\fP
+.RS
+The value of the \fIPriority\fP attribute of the batch job equals
+the value of the \fIpriority\fP component of the
+option-argument.
+.RE
+.TP 7
+\fB\&.ge.\fP
+.RS
+The value of the \fIPriority\fP attribute of the batch job is greater
+than or equal to the value of the \fIpriority\fP
+component option-argument.
+.RE
+.TP 7
+\fB\&.gt.\fP
+.RS
+The value of the \fIPriority\fP attribute of the batch job is greater
+than the value of the \fIpriority\fP component
+option-argument.
+.RE
+.TP 7
+\fB\&.lt.\fP
+.RS
+The value of the \fIPriority\fP attribute of the batch job is less
+than the value of the \fIpriority\fP component
+option-argument.
+.RE
+.TP 7
+\fB\&.lt.\fP
+.RS
+The value of the \fIPriority\fP attribute of the batch job is less
+than or equal to the value of the \fIpriority\fP component
+option-argument.
+.RE
+.TP 7
+\fB\&.ne.\fP
+.RS
+The value of the \fIPriority\fP attribute of the batch job does not
+equal the value of the \fIpriority\fP component
+option-argument.
+.RE
+.sp
+.TP 7
+\fB-q\ \fP \fIdestination\fP
+.sp
+Restrict selection to the specified batch queue or server, or both.
+.LP
+The \fIqselect\fP utility shall select only batch jobs that are located
+at the destination indicated by the value of the
+\fIdestination\fP option-argument.
+.LP
+The destination defines a batch queue, a server, or a batch queue
+at a server.
+.LP
+The \fIqselect\fP utility shall accept an option-argument for the
+\fB-q\fP option that conforms to the syntax for a
+destination. If the \fB-q\fP option is not presented to the \fIqselect\fP
+utility, the utility shall select batch jobs from all
+batch queues at the default batch server.
+.LP
+If the option-argument describes only a batch queue, the \fIqselect\fP
+utility shall select only batch jobs from the batch
+queue of the specified name at the default batch server. The means
+by which \fIqselect\fP determines the default server is
+implementation-defined.
+.LP
+If the option-argument describes only a batch server, the \fIqselect\fP
+utility shall select batch jobs from all the batch
+queues at that batch server.
+.LP
+If the option-argument describes both a batch queue and a batch server,
+the \fIqselect\fP utility shall select only batch jobs
+from the specified batch queue at the specified server.
+.TP 7
+\fB-r\ \fP \fBy\fP|\fBn\fP
+Restrict selection to batch jobs with the specified rerunability status.
+.LP
+The \fIqselect\fP utility shall select only batch jobs for which the
+value of the \fIRerunable\fP attribute of the batch job
+matches the value of the option-argument.
+.LP
+The \fIqselect\fP utility shall accept a value for the option-argument
+that consists of either the single character
+\fB'y'\fP or the single character \fB'n'\fP . The character \fB'y'\fP
+represents the value TRUE, and the character
+\fB'n'\fP represents the value FALSE.
+.TP 7
+\fB-s\ \fP \fIstates\fP
+Restrict selection to batch jobs in the specified states.
+.LP
+The \fIqselect\fP utility shall accept an option-argument that consists
+of any combination of the characters \fB'e'\fP,
+\fB'q'\fP, \fB'r'\fP, \fB'w'\fP, \fB'h'\fP, and \fB't'\fP .
+.LP
+Conforming applications shall not repeat any character in the option-argument.
+The \fIqselect\fP utility shall permit the
+repetition of characters in the option-argument, but shall not assign
+additional meaning to repeated characters.
+.LP
+The \fIqselect\fP utility shall interpret the characters in the \fIstates\fP
+option-argument as follows:
+.TP 7
+\fBe\fP
+.RS
+Represents the EXITING state.
+.RE
+.TP 7
+\fBq\fP
+.RS
+Represents the QUEUED state.
+.RE
+.TP 7
+\fBr\fP
+.RS
+Represents the RUNNING state.
+.RE
+.TP 7
+\fBt\fP
+.RS
+Represents the TRANSITING state.
+.RE
+.TP 7
+\fBh\fP
+.RS
+Represents the HELD state.
+.RE
+.TP 7
+\fBw\fP
+.RS
+Represents the WAITING state.
+.RE
+.sp
+.LP
+For each character in the \fIstates\fP option-argument, the \fIqselect\fP
+utility shall select batch jobs in the corresponding
+state.
+.TP 7
+\fB-u\ \fP \fIuser_list\fP
+Restrict selection to batch jobs owned by the specified user names.
+.LP
+The \fIqselect\fP utility shall select only the batch jobs of those
+users specified in the \fIuser_list\fP
+option-argument.
+.LP
+The \fIqselect\fP utility shall accept a \fIuser_list\fP option-argument
+that conforms to the following syntax:
+.sp
+.RS
+.nf
+
+\fIusername\fP\fB[\fP\fB@\fP\fIhost\fP\fB][\fP\fB,,\fP\fIusername\fP\fB[\fP\fB@\fP\fIhost\fP\fB]\fP\fB,, ...\fP\fB]\fP
+.fi
+.RE
+.LP
+The \fIqselect\fP utility shall accept only one user name that is
+missing a corresponding host name. The \fIqselect\fP utility
+shall accept only one user name per named host.
+.sp
+.SH OPERANDS
+.LP
+None.
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIqselect\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fILOGNAME\fP
+Determine the login name of the user.
+.TP 7
+\fITZ\fP
+Determine the timezone used to interpret the \fIdate-time\fP option-argument.
+If \fITZ\fP is unset or null, an unspecified
+default timezone shall be used.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The \fIqselect\fP utility shall write zero or more batch \fIjob_identifier\fPs
+to standard output.
+.LP
+The \fIqselect\fP utility shall separate the batch \fIjob_identifier\fPs
+written to standard output by white space.
+.LP
+The \fIqselect\fP utility shall write batch \fIjob_identifier\fPs
+in the following format:
+.sp
+.RS
+.nf
+
+\fIsequence_number.server_name\fP\fB@\fP\fIserver\fP
+.fi
+.RE
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+The following example shows how a user might use the \fIqselect\fP
+utility in conjunction with the \fIqdel\fP utility to delete all of
+his or her jobs in the queued state without affecting any jobs
+that are already running:
+.sp
+.RS
+.nf
+
+\fBqdel $(qselect -s q)
+\fP
+.fi
+.RE
+.LP
+or:
+.sp
+.RS
+.nf
+
+\fBqselect -s q || xargs qdel
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+The \fIqselect\fP utility allows users to acquire a list of job identifiers
+that match user-specified selection criteria. The
+list of identifiers returned by the \fIqselect\fP utility conforms
+to the syntax of the batch job identifier list processed by a
+utility such as \fIqmove\fP, \fIqdel\fP, and \fIqrls\fP. The \fIqselect\fP
+utility is thus a powerful tool for causing another batch system
+utility to act upon a set of jobs that match a list of selection criteria.
+.LP
+The options of the \fIqselect\fP utility let the user apply a number
+of useful filters for selecting jobs. Each option further
+restricts the selection of jobs. Many of the selection options allow
+the specification of a relational operator. The FORTRAN-like
+syntax of the operator-that is, \fB".lt."\fP - was chosen rather than
+the C-like \fB"<="\fP meta-characters.
+.LP
+The \fB-a\fP option allows users to restrict the selected jobs to
+those that have been submitted (or altered) to wait until a
+particular time. The time period is determined by the argument of
+this option, which includes both a time and an operator-it is
+thus possible to select jobs waiting until a specific time, jobs waiting
+until after a certain time, or those waiting for a time
+before the specified time.
+.LP
+The \fB-A\fP option allows users to restrict the selected jobs to
+those that have been submitted (or altered) to charge a
+particular account.
+.LP
+The \fB-c\fP option allows users to restrict the selected jobs to
+those whose checkpointing interval falls within the specified
+range.
+.LP
+The \fB-l\fP option allows users to select those jobs whose resource
+limits fall within the range indicated by the value of the
+option. For example, a user could select those jobs for which the
+CPU time limit is greater than two hours.
+.LP
+The \fB-N\fP option allows users to select jobs by job name. For instance,
+all the parts of a task that have been divided in
+parallel jobs might be given the same name, and thus manipulated as
+a group by means of this option.
+.LP
+The \fB-q\fP option allows users to select jobs in a specified queue.
+.LP
+The \fB-r\fP option allows users to select only those jobs with a
+specified rerun criteria. For instance, a user might select
+only those jobs that can be rerun for use with the \fIqrerun\fP utility.
+.LP
+The \fB-s\fP option allows users to select only those jobs that are
+in a certain state.
+.LP
+The \fB-u\fP option allows users to select jobs that have been submitted
+to execute under a particular account.
+.LP
+The selection criteria provided by the options of the \fIqselect\fP
+utility allow users to select jobs based on all the
+appropriate attributes that can be assigned to jobs by the \fIqsub\fP
+utility.
+.LP
+Historically, the \fIqselect\fP utility has not been a part of existing
+practice; it is an improvement that has been introduced
+in this volume of IEEE\ Std\ 1003.1-2001.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIqdel\fP, \fIqrerun\fP, \fIqrls\fP, qselect, \fIqsub\fP, \fItouch\fP,
+\fIBatch Environment Services\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/qsig.1p b/man-pages-posix-2003/man1p/qsig.1p
new file mode 100644
index 0000000..bcf3fcb
--- /dev/null
+++ b/man-pages-posix-2003/man1p/qsig.1p
@@ -0,0 +1,195 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "QSIG" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" qsig
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+qsig \- signal batch jobs
+.SH SYNOPSIS
+.LP
+\fBqsig\fP \fB[\fP\fB-s\fP \fIsignal\fP\fB]\fP \fIjob_identifier\fP
+\fB\&... \fP
+.SH DESCRIPTION
+.LP
+To signal a batch job is to send a signal to the session leader of
+the batch job. A batch job is signaled by sending a request
+to the batch server that manages the batch job. The \fIqsig\fP utility
+is a user-accessible batch client that requests the
+signaling of a batch job.
+.LP
+The \fIqsig\fP utility shall signal those batch jobs for which a batch
+\fIjob_identifier\fP is presented to the utility. The
+\fIqsig\fP utility shall not signal any batch jobs whose batch \fIjob_identifier\fPs
+are not presented to the utility.
+.LP
+The \fIqsig\fP utility shall signal batch jobs in the order in which
+the corresponding batch \fIjob_identifier\fPs are
+presented to the utility. If the \fIqsig\fP utility fails to process
+a batch \fIjob_identifier\fP successfully, the utility shall
+proceed to process the remaining batch \fIjob_identifier\fPs, if any.
+.LP
+The \fIqsig\fP utility shall signal batch jobs by sending a \fISignal
+Job Request\fP to the batch server that manages the
+batch job.
+.LP
+For each successfully processed batch \fIjob_identifier\fP, the \fIqsig\fP
+utility shall have received a completion reply to
+each \fISignal Job Request\fP sent to a batch server at the time the
+utility exits.
+.SH OPTIONS
+.LP
+The \fIqsig\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following option shall be supported by the implementation:
+.TP 7
+\fB-s\ \fP \fIsignal\fP
+Define the signal to be sent to the batch job.
+.LP
+The \fIqsig\fP utility shall accept a \fIsignal\fP option-argument
+that is either a symbolic signal name or an unsigned
+integer signal number (see the POSIX.1-1990 standard, Section 3.3.1.1).
+The \fIqsig\fP utility shall accept signal names for which
+the SIG prefix has been omitted.
+.LP
+If the \fIsignal\fP option-argument is a signal name, the \fIqsig\fP
+utility shall send that name.
+.LP
+If the \fIsignal\fP option-argument is a number, the \fIqsig\fP utility
+shall send the signal value represented by the
+number.
+.LP
+If the \fB-s\fP option is not presented to the \fIqsig\fP utility,
+the utility shall send the signal SIGTERM to each signaled
+batch job.
+.sp
+.SH OPERANDS
+.LP
+The \fIqsig\fP utility shall accept one or more operands that conform
+to the syntax for a batch \fIjob_identifier\fP (see \fIBatch Job Identifier\fP
+).
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIqsig\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fILOGNAME\fP
+Determine the login name of the user.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+An implementation of the \fIqsig\fP utility may write informative
+messages to standard output.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+In addition to the default behavior, the \fIqsig\fP utility shall
+not be required to write a diagnostic message to standard
+error when the error reply received from a batch server indicates
+that the batch \fIjob_identifier\fP does not exist on the
+server. Whether or not the \fIqsig\fP utility waits to output the
+diagnostic message while attempting to locate the batch job on
+other servers is implementation-defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIqsig\fP utility allows users to signal batch jobs.
+.LP
+A user may be unable to signal a batch job with the \fIkill\fP utility
+of the operating
+system for a number of reasons. First, the process ID of the batch
+job may be unknown to the user. Second, the processes of the
+batch job may be on a remote node. However, by virtue of communication
+between batch nodes, the \fIqsig\fP utility can arrange for
+the signaling of a process.
+.LP
+Because a batch job that is not running cannot be signaled, and because
+the signal may not terminate the batch job, the
+\fIqsig\fP utility is not a substitute for the \fIqdel\fP utility.
+.LP
+The options of the \fIqsig\fP utility allow the user to specify the
+signal that is to be sent to the batch job.
+.LP
+The \fB-s\fP option allows users to specify a signal by name or by
+number, and thus override the default signal. The
+POSIX.1-1990 standard defines signals by both name and number.
+.LP
+The \fIqsig\fP utility is a new utility, \fIvis-a-vis\fP existing
+practice; it has been defined in this volume of
+IEEE\ Std\ 1003.1-2001 in response to user-perceived shortcomings
+in existing practice.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIBatch Environment Services\fP, \fIkill\fP(), \fIqdel\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/qstat.1p b/man-pages-posix-2003/man1p/qstat.1p
new file mode 100644
index 0000000..ba7abf9
--- /dev/null
+++ b/man-pages-posix-2003/man1p/qstat.1p
@@ -0,0 +1,373 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "QSTAT" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" qstat
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+qstat \- show status of batch jobs
+.SH SYNOPSIS
+.LP
+\fBqstat\fP \fB[\fP\fB-f\fP\fB]\fP \fIjob_identifier\fP \fB...
+.br
+.sp
+qstat -Q\fP \fB[\fP\fB-f\fP\fB]\fP \fIdestination\fP \fB...
+.br
+.sp
+qstat -B\fP \fB[\fP\fB-f\fP\fB]\fP \fIserver_name\fP \fB... \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The status of a batch job, batch queue, or batch server is obtained
+by a request to the server. The \fIqstat\fP utility is a
+user-accessible batch client that requests the status of one or more
+batch jobs, batch queues, or servers, and writes the status
+information to standard output.
+.LP
+For each successfully processed batch \fIjob_identifier\fP, the \fIqstat\fP
+utility shall display information about the
+corresponding batch job.
+.LP
+For each successfully processed destination, the \fIqstat\fP utility
+shall display information about the corresponding batch
+queue.
+.LP
+For each successfully processed server name, the \fIqstat\fP utility
+shall display information about the corresponding
+server.
+.LP
+The \fIqstat\fP utility shall acquire batch job status information
+by sending a \fIJob Status Request\fP to a batch server.
+The \fIqstat\fP utility shall acquire batch queue status information
+by sending a \fIQueue Status Request\fP to a batch server.
+The \fIqstat\fP utility shall acquire server status information by
+sending a \fIServer Status Request\fP to a batch server.
+.SH OPTIONS
+.LP
+The \fIqstat\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported by the implementation:
+.TP 7
+\fB-f\fP
+Specify that a full display is produced.
+.LP
+The minimum contents of a full display are specified in the STDOUT
+section.
+.LP
+Additional contents and format of a full display are implementation-defined.
+.TP 7
+\fB-Q\fP
+Specify that the operand is a destination.
+.LP
+The \fIqstat\fP utility shall display information about each batch
+queue at each destination identified as an operand.
+.TP 7
+\fB-B\fP
+Specify that the operand is a server name.
+.LP
+The \fIqstat\fP utility shall display information about each server
+identified as an operand.
+.sp
+.SH OPERANDS
+.LP
+If the \fB-Q\fP option is presented to the \fIqstat\fP utility, the
+utility shall accept one or more operands that conform to
+the syntax for a destination (see \fIDestination\fP ).
+.LP
+If the \fB-B\fP option is presented to the \fIqstat\fP utility, the
+utility shall accept one or more \fIserver_name\fP
+operands.
+.LP
+If neither the \fB-B\fP nor the \fB-Q\fP option is presented to the
+\fIqstat\fP utility, the utility shall accept one or more
+operands that conform to the syntax for a batch \fIjob_identifier\fP
+(see \fIBatch Job
+Identifier\fP ).
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIqstat\fP:
+.TP 7
+\fIHOME\fP
+Determine the pathname of the user's home directory.
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_COLLATE\fP
+.sp
+Determine the locale for the behavior of ranges, equivalence classes,
+and multi-character collating elements within regular
+expressions.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fILC_NUMERIC\fP
+.sp
+Determine the locale for selecting the radix character used when writing
+floating-point formatted output.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+If an operand presented to the \fIqstat\fP utility is a batch \fIjob_identifier\fP
+and the \fB-f\fP option is not specified,
+the \fIqstat\fP utility shall display the following items on a single
+line, in the stated order, with white space between each
+item, for each successfully processed operand:
+.IP " *" 3
+The batch \fIjob_identifier\fP
+.LP
+.IP " *" 3
+The batch job name
+.LP
+.IP " *" 3
+The \fIJob_Owner\fP attribute
+.LP
+.IP " *" 3
+The CPU time used by the batch job
+.LP
+.IP " *" 3
+The batch job state
+.LP
+.IP " *" 3
+The batch job location
+.LP
+.LP
+If an operand presented to the \fIqstat\fP utility is a batch \fIjob_identifier\fP
+and the \fB-f\fP option is specified, the
+\fIqstat\fP utility shall display the following items for each success
+fully processed operand:
+.IP " *" 3
+The batch \fIjob_identifier\fP
+.LP
+.IP " *" 3
+The batch job name
+.LP
+.IP " *" 3
+The \fIJob_Owner\fP attribute
+.LP
+.IP " *" 3
+The execution user ID
+.LP
+.IP " *" 3
+The CPU time used by the batch job
+.LP
+.IP " *" 3
+The batch job state
+.LP
+.IP " *" 3
+The batch job location
+.LP
+.IP " *" 3
+Additional implementation-defined information, if any, about the batch
+job or batch queue
+.LP
+.LP
+If an operand presented to the \fIqstat\fP utility is a destination,
+the \fB-Q\fP option is specified, and the \fB-f\fP
+option is not specified, the \fIqstat\fP utility shall display the
+following items on a single line, in the stated order, with
+white space between each item, for each successfully processed operand:
+.IP " *" 3
+The batch queue name
+.LP
+.IP " *" 3
+The maximum number of batch jobs that shall be run in the batch queue
+concurrently
+.LP
+.IP " *" 3
+The total number of batch jobs in the batch queue
+.LP
+.IP " *" 3
+The status of the batch queue
+.LP
+.IP " *" 3
+For each state, the number of batch jobs in that state in the batch
+queue and the name of the state
+.LP
+.IP " *" 3
+The type of batch queue (execution or routing)
+.LP
+.LP
+If the operands presented to the \fIqstat\fP utility are destinations,
+the \fB-Q\fP option is specified, and the \fB-f\fP
+option is specified, the \fIqstat\fP utility shall display the following
+items for each successfully processed operand:
+.IP " *" 3
+The batch queue name
+.LP
+.IP " *" 3
+The maximum number of batch jobs that shall be run in the batch queue
+concurrently
+.LP
+.IP " *" 3
+The total number of batch jobs in the batch queue
+.LP
+.IP " *" 3
+The status of the batch queue
+.LP
+.IP " *" 3
+For each state, the number of batch jobs in that state in the batch
+queue and the name of the state
+.LP
+.IP " *" 3
+The type of batch queue (execution or routing)
+.LP
+.IP " *" 3
+Additional implementation-defined information, if any, about the batch
+queue
+.LP
+.LP
+If the operands presented to the \fIqstat\fP utility are batch server
+names, the \fB-B\fP option is specified, and the
+\fB-f\fP option is not specified, the \fIqstat\fP utility shall display
+the following items on a single line, in the stated
+order, with white space between each item, for each successfully processed
+operand:
+.IP " *" 3
+The batch server name
+.LP
+.IP " *" 3
+The maximum number of batch jobs that shall be run in the batch queue
+concurrently
+.LP
+.IP " *" 3
+The total number of batch jobs managed by the batch server
+.LP
+.IP " *" 3
+The status of the batch server
+.LP
+.IP " *" 3
+For each state, the number of batch jobs in that state and the name
+of the state
+.LP
+.LP
+If the operands presented to the \fIqstat\fP utility are server names,
+the \fB-B\fP option is specified, and the \fB-f\fP
+option is specified, the \fIqstat\fP utility shall display the following
+items for each successfully processed operand:
+.IP " *" 3
+The server name
+.LP
+.IP " *" 3
+The maximum number of batch jobs that shall be run in the batch queue
+concurrently
+.LP
+.IP " *" 3
+The total number of batch jobs managed by the server
+.LP
+.IP " *" 3
+The status of the server
+.LP
+.IP " *" 3
+For each state, the number of batch jobs in that state and the name
+of the state
+.LP
+.IP " *" 3
+Additional implementation-defined information, if any, about the server
+.LP
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+In addition to the default behavior, the \fIqstat\fP utility shall
+not be required to write a diagnostic message to standard
+error when the error reply received from a batch server indicates
+that the batch \fIjob_identifier\fP does not exist on the
+server. Whether or not the \fIqstat\fP utility waits to output the
+diagnostic message while attempting to locate the batch job on
+other servers is implementation-defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIqstat\fP utility allows users to display the status of jobs
+and list the batch jobs in queues.
+.LP
+The operands of the \fIqstat\fP utility may be either job identifiers,
+queues (specified as destination identifiers), or batch
+server names. The \fB-Q\fP and \fB-B\fP options, or absence thereof,
+indicate the nature of the operands.
+.LP
+The other options of the \fIqstat\fP utility allow the user to control
+the amount of information displayed and the format in
+which it is displayed. Should a user wish to display the status of
+a set of jobs that match a selection criteria, the \fIqselect\fP utility
+may be used to acquire such a list.
+.LP
+The \fB-f\fP option allows users to request a "full" display in an
+implementation-defined format.
+.LP
+Historically, the \fIqstat\fP utility has been a part of the NQS and
+its derivatives, the existing practice on which it is
+based.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIBatch Environment Services\fP, \fIqselect\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/qsub.1p b/man-pages-posix-2003/man1p/qsub.1p
new file mode 100644
index 0000000..e99da80
--- /dev/null
+++ b/man-pages-posix-2003/man1p/qsub.1p
@@ -0,0 +1,1029 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "QSUB" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" qsub
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+qsub \- submit a script
+.SH SYNOPSIS
+.LP
+\fBqsub\fP \fB[\fP\fB-a\fP \fIdate_time\fP\fB][\fP\fB-A\fP
+\fIaccount_string\fP\fB][\fP\fB-c\fP \fIinterval\fP\fB]
+.br
+\fP \fB\ \ \ \ \ \ \fP \fB[\fP\fB-C\fP \fIdirective_prefix\fP\fB][\fP\fB-e\fP
+\fIpath_name\fP\fB][\fP\fB-h\fP\fB][\fP\fB-j\fP \fIjoin_list\fP\fB][\fP\fB-k\fP
+\fIkeep_list\fP\fB]
+.br
+\fP \fB\ \ \ \ \ \ \fP \fB[\fP\fB-m\fP \fImail_options\fP\fB][\fP\fB-M\fP
+\fImail_list\fP\fB][\fP\fB-N\fP \fIname\fP\fB]
+.br
+\fP \fB\ \ \ \ \ \ \fP \fB[\fP\fB-o\fP \fIpath_name\fP\fB][\fP\fB-p\fP
+\fIpriority\fP\fB][\fP\fB-q\fP \fIdestination\fP\fB][\fP\fB-r\fP \fIy\fP\fB|\fP\fIn\fP\fB]
+.br
+\fP \fB\ \ \ \ \ \ \fP \fB[\fP\fB-S\fP \fIpath_name_list\fP\fB][\fP\fB-u\fP
+\fIuser_list\fP\fB][\fP\fB-v\fP \fIvariable_list\fP\fB][\fP\fB-V\fP\fB]
+.br
+\fP \fB\ \ \ \ \ \ \fP \fB[\fP\fB-z\fP\fB][\fP\fIscript\fP\fB]\fP\fB\fP
+.SH DESCRIPTION
+.LP
+To submit a script is to create a batch job that executes the script.
+A script is submitted by a request to a batch server. The
+\fIqsub\fP utility is a user-accessible batch client that submits
+a script.
+.LP
+Upon successful completion, the \fIqsub\fP utility shall have created
+a batch job that will execute the submitted script.
+.LP
+The \fIqsub\fP utility shall submit a script by sending a \fIQueue
+Job Request\fP to a batch server.
+.LP
+The \fIqsub\fP utility shall place the value of the following environment
+variables in the \fIVariable_List\fP attribute of
+the batch job: \fIHOME\fP, \fILANG\fP, \fILOGNAME\fP, \fIPATH\fP,
+\fIMAIL\fP, \fISHELL\fP, and \fITZ\fP. The name of
+the environment variable shall be the current name prefixed with the
+string PBS_O_.
+.TP 7
+\fBNote:\fP
+If the current value of the \fIHOME\fP variable in the environment
+space of the \fIqsub\fP utility is \fB/aa/bb/cc\fP, then
+\fIqsub\fP shall place \fIPBS_O_HOME =\fP \fB/aa/bb/cc\fP in the \fIVariable_List\fP
+attribute of the batch job.
+.sp
+.LP
+In addition to the variables described above, the \fIqsub\fP utility
+shall add the following variables with the indicated
+values to the variable list:
+.TP 7
+\fIPBS_O_WORKDIR\fP
+The absolute path of the current working directory of the \fIqsub\fP
+utility process.
+.TP 7
+\fIPBS_O_HOST\fP
+The name of the host on which the \fIqsub\fP utility is running.
+.sp
+.SH OPTIONS
+.LP
+The \fIqsub\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported by the implementation:
+.TP 7
+\fB-a\ \fP \fIdate_time\fP
+Define the time at which a batch job becomes eligible for execution.
+.LP
+The \fIqsub\fP utility shall accept an option-argument that conforms
+to the syntax of the \fItime\fP operand of the \fItouch\fP utility.
+.br
+.sp
+.ce 1
+\fBTable: Environment Variable Values (Utilities)\fP
+.TS C
+center; l l.
+\fBVariable Name\fP \fBValue at qsub Time\fP
+\fIPBS_O_HOME\fP \fIHOME\fP
+\fIPBS_O_HOST\fP \fIClient host name\fP
+\fIPBS_O_LANG\fP \fILANG\fP
+\fIPBS_O_LOGNAME\fP \fILOGNAME\fP
+\fIPBS_O_PATH\fP \fIPATH\fP
+\fIPBS_O_MAIL\fP \fIMAIL\fP
+\fIPBS_O_SHELL\fP \fISHELL\fP
+\fIPBS_O_TZ\fP \fITZ\fP
+\fIPBS_O_WORKDIR\fP \fICurrent working directory\fP
+.TE
+.TP 7
+\fBNote:\fP
+.RS
+The server that initiates execution of the batch job will add other
+variables to the batch job's environment; see \fIBatch Job Execution\fP
+\&.
+.RE
+.sp
+.LP
+The \fIqsub\fP utility shall set the \fIExecution_Time\fP attribute
+of the batch job to the number of seconds since the Epoch
+that is equivalent to the local time expressed by the value of the
+\fIdate_time\fP option-argument. The Epoch is defined in the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, Section 3.149,
+Epoch.
+.LP
+If the \fB-a\fP option is not presented to the \fIqsub\fP utility,
+the utility shall set the \fIExecution_Time\fP attribute
+of the batch job to a time (number of seconds since the Epoch) that
+is earlier than the time at which the utility exits.
+.TP 7
+\fB-A\ \fP \fIaccount_string\fP
+.sp
+Define the account to which the resource consumption of the batch
+job should be charged.
+.LP
+The syntax of the \fIaccount_string\fP option-argument is unspecified.
+.LP
+The \fIqsub\fP utility shall set the \fIAccount_Name\fP attribute
+of the batch job to the value of the \fIaccount_string\fP
+option-argument.
+.LP
+If the \fB-A\fP option is not presented to the \fIqsub\fP utility,
+the utility shall omit the \fIAccount_Name\fP attribute
+from the attributes of the batch job.
+.TP 7
+\fB-c\ \fP \fIinterval\fP
+Define whether the batch job should be checkpointed, and if so, how
+often.
+.LP
+The \fIqsub\fP utility shall accept a value for the interval option-argument
+that is one of the following:
+.TP 7
+\fBn\fP
+.RS
+No checkpointing shall be performed on the batch job (NO_CHECKPOINT).
+.RE
+.TP 7
+\fBs\fP
+.RS
+Checkpointing shall be performed only when the batch server is shut
+down (CHECKPOINT_AT_SHUTDOWN).
+.RE
+.TP 7
+\fBc\fP
+.RS
+Automatic periodic checkpointing shall be performed at the \fIMinimum_Cpu_Interval\fP
+attribute of the batch queue, in units
+of CPU minutes (CHECKPOINT_AT_MIN_CPU_INTERVAL).
+.RE
+.TP 7
+\fBc\fP=\fIminutes\fP
+.RS
+Automatic periodic checkpointing shall be performed every \fIminutes\fP
+of CPU time, or every \fIMinimum_Cpu_Interval\fP
+minutes, whichever is greater. The \fIminutes\fP argument shall conform
+to the syntax for unsigned integers and shall be greater
+than zero.
+.RE
+.sp
+.LP
+The \fIqsub\fP utility shall set the \fICheckpoint\fP attribute of
+the batch job to the value of the \fIinterval\fP
+option-argument.
+.LP
+If the \fB-c\fP option is not presented to the \fIqsub\fP utility,
+the utility shall set the \fICheckpoint\fP attribute of
+the batch job to the single character \fB'u'\fP (CHECKPOINT_UNSPECIFIED).
+.TP 7
+\fB-C\ \fP \fIdirective_prefix\fP
+.sp
+Define the prefix that declares a directive to the \fIqsub\fP utility
+within the script.
+.LP
+The \fIdirective_prefix\fP is not a batch job attribute; it affects
+the behavior of the \fIqsub\fP utility.
+.LP
+If the \fB-C\fP option is presented to the \fIqsub\fP utility, and
+the value of the \fIdirective_prefix\fP option-argument is
+the null string, the utility shall not scan the script file for directives.
+If the \fB-C\fP option is not presented to the
+\fIqsub\fP utility, then the value of the \fIPBS_DPREFIX\fP environment
+variable is used. If the environment variable is not
+defined, then #PBS encoded in the portable character set is the default.
+.TP 7
+\fB-e\ \fP \fIpath_name\fP
+Define the path to be used for the standard error stream of the batch
+job.
+.LP
+The \fIqsub\fP utility shall accept a \fIpath_name\fP option-argument
+which can be preceded by a host name element of the form
+\fIhostname\fP:.
+.LP
+If the \fIpath_name\fP option-argument constitutes an absolute pathname,
+the \fIqsub\fP utility shall set the
+\fIError_Path\fP attribute of the batch job to the value of the \fIpath_name\fP
+option-argument.
+.LP
+If the \fIpath_name\fP option-argument constitutes a relative pathname
+and no host name element is specified, the \fIqsub\fP
+utility shall set the \fIError_Path\fP attribute of the batch job
+to the value of the absolute pathname derived by expanding the
+\fIpath_name\fP option-argument relative to the current directory
+of the process executing \fIqsub\fP.
+.LP
+If the \fIpath_name\fP option-argument constitutes a relative pathname
+and a host name element is specified, the \fIqsub\fP
+utility shall set the \fIError_Path\fP attribute of the batch job
+to the value of the \fIpath_name\fP option-argument without
+expansion. The host name element shall be included.
+.LP
+If the \fIpath_name\fP option-argument does not include a host name
+element, the \fIqsub\fP utility shall prefix the pathname
+with \fIhostname\fP:, where \fIhostname\fP is the name of the host
+upon which the \fIqsub\fP utility is being executed.
+.LP
+If the \fB-e\fP option is not presented to the \fIqsub\fP utility,
+the utility shall set the \fIError_Path\fP attribute of
+the batch job to the host name and path of the current directory of
+the submitting process and the default filename.
+.LP
+The default filename for standard error has the following format:
+.sp
+.RS
+.nf
+
+\fIjob_name\fP\fB.e\fP\fIsequence_number\fP
+.fi
+.RE
+.TP 7
+\fB-h\fP
+Specify that a USER hold is applied to the batch job.
+.LP
+The \fIqsub\fP utility shall set the value of the \fIHold_Types\fP
+attribute of the batch job to the value USER.
+.LP
+If the \fB-h\fP option is not presented to the \fIqsub\fP utility,
+the utility shall set the \fIHold_Types\fP attribute of
+the batch job to the value NO_HOLD.
+.TP 7
+\fB-j\ \fP \fIjoin_list\fP
+Define which streams of the batch job are to be merged. The \fIqsub\fP
+\fB-j\fP option shall accept a value for the
+\fIjoin_list\fP option-argument that is a string of alphanumeric characters
+in the portable character set (see the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Section 6.1, Portable
+Character Set).
+.LP
+The \fIqsub\fP utility shall accept a \fIjoin_list\fP option-argument
+that consists of one or more of the characters
+\fB'e'\fP and \fB'o'\fP, or the single character \fB'n'\fP .
+.LP
+All of the other batch job output streams specified will be merged
+into the output stream represented by the character listed
+first in the \fIjoin_list\fP option-argument.
+.LP
+For each unique character in the \fIjoin_list\fP option-argument,
+the \fIqsub\fP utility shall add a value to the
+\fIJoin_Path\fP attribute of the batch job as follows, each representing
+a different batch job stream to join:
+.TP 7
+\fBe\fP
+.RS
+The standard error of the batch job (JOIN_STD_ERROR).
+.RE
+.TP 7
+\fBo\fP
+.RS
+The standard output of the batch job (JOIN_STD_OUTPUT).
+.RE
+.sp
+.LP
+An existing \fIJoin_Path\fP attribute can be cleared by the following
+join type:
+.TP 7
+\fBn\fP
+.RS
+NO_JOIN
+.RE
+.sp
+.LP
+If \fB'n'\fP is specified, then no files are joined. The \fIqsub\fP
+utility shall consider it an error if any join type
+other than \fB'n'\fP is combined with join type \fB'n'\fP .
+.LP
+Strictly conforming applications shall not repeat any of the characters
+\fB'e'\fP, \fB'o'\fP, or \fB'n'\fP within the
+\fIjoin_list\fP option-argument. The \fIqsub\fP utility shall permit
+the repetition of characters, but shall not assign
+additional meaning to the repeated characters.
+.LP
+An implementation may define other join types. The conformance document
+for an implementation shall describe any additional
+batch job streams, how they are specified, their internal behavior,
+and how they affect the behavior of the utility.
+.LP
+If the \fB-j\fP option is not presented to the \fIqsub\fP utility,
+the utility shall set the value of the \fIJoin_Path\fP
+attribute of the batch job to NO_JOIN.
+.TP 7
+\fB-k\ \fP \fIkeep_list\fP
+Define which output of the batch job to retain on the execution host.
+.LP
+The \fIqsub\fP \fB-k\fP option shall accept a value for the \fIkeep_list\fP
+option-argument that is a string of alphanumeric
+characters in the portable character set (see the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Section 6.1, Portable Character
+Set).
+.LP
+The \fIqsub\fP utility shall accept a \fIkeep_list\fP option-argument
+that consists of one or more of the characters
+\fB'e'\fP and \fB'o'\fP, or the single character \fB'n'\fP .
+.LP
+For each unique character in the \fIkeep_list\fP option-argument,
+the \fIqsub\fP utility shall add a value to the
+\fIKeep_Files\fP attribute of the batch job as follows, each representing
+a different batch job stream to keep:
+.TP 7
+\fBe\fP
+.RS
+The standard error of the batch job (KEEP_STD_ERROR).
+.RE
+.TP 7
+\fBo\fP
+.RS
+The standard output of the batch job (KEEP_STD_OUTPUT).
+.RE
+.sp
+.LP
+If both \fB'e'\fP and \fB'o'\fP are specified, then both files are
+retained. An existing \fIKeep_Files\fP attribute can
+be cleared by the following keep type:
+.TP 7
+\fBn\fP
+.RS
+NO_KEEP
+.RE
+.sp
+.LP
+If \fB'n'\fP is specified, then no files are retained. The \fIqsub\fP
+utility shall consider it an error if any keep type
+other than \fB'n'\fP is combined with keep type \fB'n'\fP .
+.LP
+Strictly conforming applications shall not repeat any of the characters
+\fB'e'\fP, \fB'o'\fP, or \fB'n'\fP within the
+\fIkeep_list\fP option-argument. The \fIqsub\fP utility shall permit
+the repetition of characters, but shall not assign
+additional meaning to the repeated characters.
+.LP
+An implementation may define other keep types. The conformance document
+for an implementation shall describe any additional keep
+types, how they are specified, their internal behavior, and how they
+affect the behavior of the utility. If the \fB-k\fP option is
+not presented to the \fIqsub\fP utility, the utility shall set the
+\fIKeep_Files\fP attribute of the batch job to the value
+NO_KEEP.
+.TP 7
+\fB-m\ \fP \fImail_options\fP
+.sp
+Define the points in the execution of the batch job at which the batch
+server that manages the batch job shall send mail about a
+change in the state of the batch job.
+.LP
+The \fIqsub\fP \fB-m\fP option shall accept a value for the \fImail_options\fP
+option-argument that is a string of
+alphanumeric characters in the portable character set (see the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Section 6.1, Portable
+Character Set).
+.LP
+The \fIqsub\fP utility shall accept a value for the \fImail_options\fP
+option-argument that is a string of one or more of the
+characters \fB'e'\fP, \fB'b'\fP, and \fB'a'\fP, or the single character
+\fB'n'\fP .
+.LP
+For each unique character in the \fImail_options\fP option-argument,
+the \fIqsub\fP utility shall add a value to the
+\fIMail_Users\fP attribute of the batch job as follows, each representing
+a different time during the life of a batch job at which
+to send mail:
+.TP 7
+\fBe\fP
+.RS
+MAIL_AT_EXIT
+.RE
+.TP 7
+\fBb\fP
+.RS
+MAIL_AT_BEGINNING
+.RE
+.TP 7
+\fBa\fP
+.RS
+MAIL_AT_ABORT
+.RE
+.sp
+.LP
+If any of these characters are duplicated in the \fImail_options\fP
+option-argument, the duplicates shall be ignored.
+.LP
+An existing \fIMail_Points\fP attribute can be cleared by the following
+mail type:
+.TP 7
+\fBn\fP
+.RS
+NO_MAIL
+.RE
+.sp
+.LP
+If \fB'n'\fP is specified, then mail is not sent. The \fIqsub\fP utility
+shall consider it an error if any mail type other
+than \fB'n'\fP is combined with mail type \fB'n'\fP .
+.LP
+Strictly conforming applications shall not repeat any of the characters
+\fB'e'\fP, \fB'b'\fP, \fB'a'\fP, or
+\fB'n'\fP within the \fImail_options\fP option-argument.
+.LP
+The \fIqsub\fP utility shall permit the repetition of characters,
+but shall not assign additional meaning to the repeated
+characters. An implementation may define other mail types. The conformance
+document for an implementation shall describe any
+additional mail types, how they are specified, their internal behavior,
+and how they affect the behavior of the utility.
+.LP
+If the \fB-m\fP option is not presented to the \fIqsub\fP utility,
+the utility shall set the \fIMail_Points\fP attribute to
+the value MAIL_AT_ABORT.
+.TP 7
+\fB-M\ \fP \fImail_list\fP
+Define the list of users to which a batch server that executes the
+batch job shall send mail, if the server sends mail about
+the batch job.
+.LP
+The syntax of the \fImail_list\fP option-argument is unspecified.
+.LP
+If the implementation of the \fIqsub\fP utility uses a name service
+to locate users, the utility should accept the syntax used
+by the name service.
+.LP
+If the implementation of the \fIqsub\fP utility does not use a name
+service to locate users, the implementation should accept
+the following syntax for user names:
+.sp
+.RS
+.nf
+
+\fImail_address\fP\fB[\fP\fB,,\fP\fImail_address\fP\fB,, ...\fP\fB]\fP
+.fi
+.RE
+.LP
+The interpretation of \fImail_address\fP is implementation-defined.
+.LP
+The \fIqsub\fP utility shall set the \fIMail_Users\fP attribute of
+the batch job to the value of the \fImail_list\fP
+option-argument.
+.LP
+If the \fB-M\fP option is not presented to the \fIqsub\fP utility,
+the utility shall place only the user name and host name
+for the current process in the \fIMail_Users\fP attribute of the batch
+job.
+.TP 7
+\fB-N\ \fP \fIname\fP
+Define the name of the batch job.
+.LP
+The \fIqsub\fP \fB-N\fP option shall accept a value for the \fIname\fP
+option-argument that is a string of up to 15
+alphanumeric characters in the portable character set (see the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Section 6.1, Portable
+Character Set) where the first character is alphabetic.
+.LP
+The \fIqsub\fP utility shall set the value of the \fIJob_Name\fP attribute
+of the batch job to the value of the \fIname\fP
+option-argument.
+.LP
+If the \fB-N\fP option is not presented to the \fIqsub\fP utility,
+the utility shall set the \fIJob_Name\fP attribute of the
+batch job to the name of the \fIscript\fP argument from which the
+directory specification if any, has been removed.
+.LP
+If the \fB-N\fP option is not presented to the \fIqsub\fP utility,
+and the script is read from standard input, the utility
+shall set the \fIJob_Name\fP attribute of the batch job to the value
+STDIN.
+.TP 7
+\fB-o\ \fP \fIpath_name\fP
+Define the path for the standard output of the batch job.
+.LP
+The \fIqsub\fP utility shall accept a \fIpath_name\fP option-argument
+that conforms to the syntax of the \fIpath_name\fP
+element defined in the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+which can be preceded by a host name element of
+the form \fIhostname\fP:.
+.LP
+If the \fIpath_name\fP option-argument constitutes an absolute pathname,
+the \fIqsub\fP utility shall set the
+\fIOutput_Path\fP attribute of the batch job to the value of the \fIpath_name\fP
+option-argument without expansion.
+.LP
+If the \fIpath_name\fP option-argument constitutes a relative pathname
+and no host name element is specified, the \fIqsub\fP
+utility shall set the \fIOutput_Path\fP attribute of the batch job
+to the pathname derived by expanding the value of the
+\fIpath_name\fP option-argument relative to the current directory
+of the process executing the \fIqsub\fP.
+.LP
+If the \fIpath_name\fP option-argument constitutes a relative pathname
+and a host name element is specified, the \fIqsub\fP
+utility shall set the \fIOutput_Path\fP attribute of the batch job
+to the value of the \fIpath_name\fP option-argument without
+expansion.
+.LP
+If the \fIpath_name\fP option-argument does not specify a host name
+element, the \fIqsub\fP utility shall prefix the pathname
+with \fIhostname\fP:, where \fIhostname\fP is the name of the host
+upon which the \fIqsub\fP utility is executing.
+.LP
+If the \fB-o\fP option is not presented to the \fIqsub\fP utility,
+the utility shall set the \fIOutput_Path\fP attribute of
+the batch job to the host name and path of the current directory of
+the submitting process and the default filename.
+.LP
+The default filename for standard output has the following format:
+.sp
+.RS
+.nf
+
+\fIjob_name\fP\fB.o\fP\fIsequence_number\fP
+.fi
+.RE
+.TP 7
+\fB-p\ \fP \fIpriority\fP
+Define the priority the batch job should have relative to other batch
+jobs owned by the batch server.
+.LP
+The \fIqsub\fP utility shall set the \fIPriority\fP attribute of the
+batch job to the value of the \fIpriority\fP
+option-argument.
+.LP
+If the \fB-p\fP option is not presented to the \fIqsub\fP utility,
+the value of the \fIPriority\fP attribute is
+implementation-defined.
+.LP
+The \fIqsub\fP utility shall accept a value for the \fIpriority\fP
+option-argument that conforms to the syntax for signed
+decimal integers, and which is not less than -1024 and not greater
+than 1023.
+.TP 7
+\fB-q\ \fP \fIdestination\fP
+.sp
+Define the destination of the batch job.
+.LP
+The destination is not a batch job attribute; it determines the batch
+server, and possibly the batch queue, to which the
+\fIqsub\fP utility batch queues the batch job.
+.LP
+The \fIqsub\fP utility shall submit the script to the batch server
+named by the \fIdestination\fP option-argument or the
+server that owns the batch queue named in the \fIdestination\fP option-argument.
+.LP
+The \fIqsub\fP utility shall accept an option-argument for the \fB-q\fP
+option that conforms to the syntax for a destination
+(see \fIDestination\fP ).
+.LP
+If the \fB-q\fP option is not presented to the \fIqsub\fP utility,
+the \fIqsub\fP utility shall submit the batch job to the
+default destination. The mechanism for determining the default destination
+is implementation-defined.
+.TP 7
+\fB-r\ \fP \fIy\fP|\fIn\fP
+Define whether the batch job is rerunnable.
+.LP
+If the value of the option-argument is \fIy\fP, the \fIqsub\fP utility
+shall set the \fIRerunable\fP attribute of the batch
+job to TRUE.
+.LP
+If the value of the option-argument is \fIn\fP, the \fIqsub\fP utility
+shall set the \fIRerunable\fP attribute of the batch
+job to FALSE.
+.LP
+If the \fB-r\fP option is not presented to the \fIqsub\fP utility,
+the utility shall set the \fIRerunable\fP attribute of the
+batch job to TRUE.
+.TP 7
+\fB-S\ \fP \fIpath_name_list\fP
+.sp
+Define the pathname to the shell under which the batch job is to execute.
+.LP
+The \fIqsub\fP utility shall accept a \fIpath_name_list\fP option-argument
+that conforms to the following syntax:
+.sp
+.RS
+.nf
+
+\fIpathname\fP\fB[\fP\fB@\fP\fIhost\fP\fB][\fP\fB,,\fP\fIpathname\fP\fB[\fP\fB@\fP\fIhost\fP\fB]\fP\fB,, ...\fP\fB]\fP
+.fi
+.RE
+.LP
+The \fIqsub\fP utility shall allow only one pathname for a given host
+name. The \fIqsub\fP utility shall allow only one
+pathname that is missing a corresponding host name.
+.LP
+The \fIqsub\fP utility shall add a value to the \fIShell_Path_List\fP
+attribute of the batch job for each entry in the
+\fIpath_name_list\fP option-argument.
+.LP
+If the \fB-S\fP option is not presented to the \fIqsub\fP utility,
+the utility shall set the \fIShell_Path_List\fP attribute
+of the batch job to the null string.
+.LP
+The conformance document for an implementation shall describe the
+mechanism used to set the default shell and determine the
+current value of the default shell. An implementation shall provide
+a means for the installation to set the default shell to the
+login shell of the user under which the batch job is to execute. See
+\fIMultiple
+Keyword-Value Pairs\fP for a means of removing \fIkeyword\fP= \fIvalue\fP
+(and \fIvalue\fP@ \fIkeyword\fP) pairs and other
+general rules for list-oriented batch job attributes.
+.TP 7
+\fB-u\ \fP \fIuser_list\fP
+Define the user name under which the batch job is to execute.
+.LP
+The \fIqsub\fP utility shall accept a \fIuser_list\fP option-argument
+that conforms to the following syntax:
+.sp
+.RS
+.nf
+
+\fIusername\fP\fB[\fP\fB@\fP\fIhost\fP\fB][\fP\fB,,\fP\fIusername\fP\fB[\fP\fB@\fP\fIhost\fP\fB]\fP\fB,, ...\fP\fB]\fP
+.fi
+.RE
+.LP
+The \fIqsub\fP utility shall accept only one user name that is missing
+a corresponding host name. The \fIqsub\fP utility shall
+accept only one user name per named host.
+.LP
+The \fIqsub\fP utility shall add a value to the \fIUser_List\fP attribute
+of the batch job for each entry in the
+\fIuser_list\fP option-argument.
+.LP
+If the \fB-u\fP option is not presented to the \fIqsub\fP utility,
+the utility shall set the \fIUser_List\fP attribute of the
+batch job to the user name from which the utility is executing. See
+\fIMultiple
+Keyword-Value Pairs\fP for a means of removing \fIkeyword\fP= \fIvalue\fP
+(and \fIvalue\fP@ \fIkeyword\fP) pairs and other
+general rules for list-oriented batch job attributes.
+.TP 7
+\fB-v\ \fP \fIvariable_list\fP
+.sp
+Add to the list of variables that are exported to the session leader
+of the batch job.
+.LP
+A \fIvariable_list\fP is a set of strings of either the form < \fIvariable\fP>
+or < \fIvariable\fP=
+\fIvalue\fP>, delimited by commas.
+.LP
+If the \fB-v\fP option is presented to the \fIqsub\fP utility, the
+utility shall also add, to the environment
+\fIVariable_List\fP attribute of the batch job, every variable named
+in the environment \fIvariable_list\fP option-argument and,
+optionally, values of specified variables.
+.LP
+If a value is not provided on the command line, the \fIqsub\fP utility
+shall set the value of each variable in the environment
+\fIVariable_List\fP attribute of the batch job to the value of the
+corresponding environment variable for the process in which the
+utility is executing; see Environment Variable Values (Utilities)
+\&.
+.LP
+A conforming application shall not repeat a variable in the environment
+\fIvariable_list\fP option-argument.
+.LP
+The \fIqsub\fP utility shall not repeat a variable in the environment
+\fIVariable_List\fP attribute of the batch job. See \fIMultiple Keyword-Value
+Pairs\fP for a means of removing \fIkeyword\fP= \fIvalue\fP
+(and \fIvalue\fP@ \fIkeyword\fP) pairs and other general rules for
+list-oriented batch job attributes.
+.TP 7
+\fB-V\fP
+Specify that all of the environment variables of the process are exported
+to the context of the batch job.
+.LP
+The \fIqsub\fP utility shall place every environment variable in the
+process in which the utility is executing in the list and
+shall set the value of each variable in the attribute to the value
+of that variable in the process.
+.TP 7
+\fB-z\fP
+Specify that the utility does not write the batch \fIjob_identifier\fP
+of the created batch job to standard output.
+.LP
+If the \fB-z\fP option is presented to the \fIqsub\fP utility, the
+utility shall not write the batch \fIjob_identifier\fP of
+the created batch job to standard output.
+.LP
+If the \fB-z\fP option is not presented to the \fIqsub\fP utility,
+the utility shall write the identifier of the created batch
+job to standard output.
+.sp
+.SH OPERANDS
+.LP
+The \fIqsub\fP utility shall accept a \fIscript\fP operand that indicates
+the path to the script of the batch job.
+.LP
+If the \fIscript\fP operand is not presented to the \fIqsub\fP utility,
+or if the operand is the single-character string
+\fB'-'\fP, the utility shall read the script from standard input.
+.LP
+If the script represents a partial path, the \fIqsub\fP utility shall
+expand the path relative to the current directory of the
+process executing the utility.
+.SH STDIN
+.LP
+The \fIqsub\fP utility reads the script of the batch job from standard
+input if the script operand is omitted or is the single
+character \fB'-'\fP .
+.SH INPUT FILES
+.LP
+In addition to binding the file indicated by the \fIscript\fP operand
+to the batch job, the \fIqsub\fP utility reads the
+script file and acts on directives in the script.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIqsub\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fILOGNAME\fP
+Determine the login name of the user.
+.TP 7
+\fIPBS_DPREFIX\fP
+.sp
+Determine the default prefix for directives within the script.
+.TP 7
+\fISHELL\fP
+Determine the pathname of the preferred command language interpreter
+of the user.
+.TP 7
+\fITZ\fP
+Determine the timezone used to interpret the \fIdate-time\fP option-argument.
+If \fITZ\fP is unset or null, an unspecified
+default timezone shall be used.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Once created, a batch job exists until it exits, aborts, or is deleted.
+.LP
+After a batch job is created by the \fIqsub\fP utility, batch servers
+might route, execute, modify, or delete the batch
+job.
+.SH STDOUT
+.LP
+The \fIqsub\fP utility writes the batch \fIjob_identifier\fP assigned
+to the batch job to standard output, unless the
+\fB-z\fP option is specified.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.SS Script Preservation
+.LP
+The \fIqsub\fP utility shall make the script available to the server
+executing the batch job in such a way that the server
+executes the script as it exists at the time of submission.
+.LP
+The \fIqsub\fP utility can send a copy of the script to the server
+with the \fIQueue Job Request\fP or store a temporary copy
+of the script in a location specified to the server.
+.SS Option Specification
+.LP
+A script can contain directives to the \fIqsub\fP utility.
+.LP
+The \fIqsub\fP utility shall scan the lines of the script for directives,
+skipping blank lines, until the first line that
+begins with a string other than the directive string; if directives
+occur on subsequent lines, the utility shall ignore those
+directives.
+.LP
+Lines are separated by a <newline>. If the first line of the script
+begins with \fB"#!"\fP or a colon ( \fB':'\fP ),
+then it is skipped. The \fIqsub\fP utility shall process a line in
+the script as a directive if and only if the string of
+characters from the first non-white-space character on the line until
+the first <space> or <tab> on the line match the
+directive prefix. If a line in the script contains a directive and
+the final characters of the line are backslash ( \fB'\\'\fP )
+and <newline>, then the next line shall be interpreted as a continuation
+of that directive.
+.LP
+The \fIqsub\fP utility shall process the options and option-arguments
+contained on the directive prefix line using the same
+syntax as if the options were input on the \fIqsub\fP utility.
+.LP
+The \fIqsub\fP utility shall continue to process a directive prefix
+line until after a <newline> is encountered. An
+implementation may ignore lines which, according to the syntax of
+the shell that will interpret the script, are comments. An
+implementation shall describe in the conformance document the format
+of any shell comments that it will recognize.
+.LP
+If an option is present in both a directive and the arguments to the
+\fIqsub\fP utility, the utility shall ignore the option
+and the corresponding option-argument, if any, in the directive.
+.LP
+If an option that is present in the directive is not present in the
+arguments to the \fIqsub\fP utility, the utility shall
+process the option and the option-argument, if any.
+.LP
+In order of preference, the \fIqsub\fP utility shall select the directive
+prefix from one of the following sources:
+.IP " *" 3
+If the \fB-C\fP option is presented to the utility, the value of the
+\fIdirective_prefix\fP option-argument
+.LP
+.IP " *" 3
+If the environment variable \fIPBS_DPREFIX\fP is defined, the value
+of that variable
+.LP
+.IP " *" 3
+The four-character string \fB"#PBS"\fP encoded in the portable character
+set
+.LP
+.LP
+If the \fB-C\fP option is present in the script file it shall be ignored.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIqsub\fP utility allows users to create a batch job that will
+process the script specified as the operand of the
+utility.
+.LP
+The options of the \fIqsub\fP utility allow users to control many
+aspects of the queuing and execution of a batch job.
+.LP
+The \fB-a\fP option allows users to designate the time after which
+the batch job will become eligible to run. By specifying an
+execution time, users can take advantage of resources at off-peak
+hours, synchronize jobs with chronologically predictable events,
+and perhaps take advantage of off-peak pricing of computing time.
+For these reasons and others, a timing option is existing
+practice on the part of almost every batch system, including NQS.
+.LP
+The \fB-A\fP option allows users to specify the account that will
+be charged for the batch job. Support for account is not
+mandatory for conforming batch servers.
+.LP
+The \fB-C\fP option allows users to prescribe the prefix for directives
+within the script file. The default prefix
+\fB"#PBS"\fP may be inappropriate if the script will be interpreted
+with an alternate shell, as specified by the \fB-S\fP
+option.
+.LP
+The \fB-c\fP option allows users to establish the checkpointing interval
+for their jobs. A checkpointing system, which is not
+defined by this volume of IEEE\ Std\ 1003.1-2001, allows recovery
+of a batch job at the most recent checkpoint in the event
+of a crash. Checkpointing is typically used for jobs that consume
+expensive computing time or must meet a critical schedule. Users
+should be allowed to make the tradeoff between the overhead of checkpointing
+and the risk to the timely completion of the batch
+job; therefore, this volume of IEEE\ Std\ 1003.1-2001 provides the
+checkpointing interval option. Support for checkpointing
+is optional for batch servers.
+.LP
+The \fB-e\fP option allows users to redirect the standard error streams
+of their jobs to a non-default path. For example, if
+the submitted script generally produces a great deal of useless error
+output, a user might redirect the standard error output to
+the null device. Or, if the file system holding the default location
+(the home directory of the user) has too little free space,
+the user might redirect the standard error stream to a file in another
+file system.
+.LP
+The \fB-h\fP option allows users to create a batch job that is held
+until explicitly released. The ability to create a held job
+is useful when some external event must complete before the batch
+job can execute. For example, the user might submit a held job
+and release it when the system load has dropped.
+.LP
+The \fB-j\fP option allows users to merge the standard error of a
+batch job into its standard output stream, which has the
+advantage of showing the sequential relationship between output and
+error messages.
+.LP
+The \fB-m\fP option allows users to designate those points in the
+execution of a batch job at which mail will be sent to the
+submitting user, or to the account(s) indicated by the \fB-M\fP option.
+By requesting mail notification at points of interest in
+the life of a job, the submitting user, or other designated users,
+can track the progress of a batch job.
+.LP
+The \fB-N\fP option allows users to associate a name with the batch
+job. The job name in no way affects the processing of the
+batch job, but rather serves as a mnemonic handle for users. For example,
+the batch job name can help the user distinguish between
+multiple jobs listed by the \fIqstat\fP utility.
+.LP
+The \fB-o\fP option allows users to redirect the standard output stream.
+A user might, for example, wish to redirect to the
+null device the standard output stream of a job that produces copious
+yet superfluous output.
+.LP
+The \fB-P\fP option allows users to designate the relative priority
+of a batch job for selection from a queue.
+.LP
+The \fB-q\fP option allows users to specify an initial queue for the
+batch job. If the user specifies a routing queue, the
+batch server routes the batch job to another queue for execution or
+further routing. If the user specifies a non-routing queue, the
+batch server of the queue eventually executes the batch job.
+.LP
+The \fB-r\fP option allows users to control whether the submitted
+job will be rerun if the controlling batch node fails during
+execution of the batch job. The \fB-r\fP option likewise allows users
+to indicate whether or not the batch job is eligible to be
+rerun by the \fIqrerun\fP utility. Some jobs cannot be correctly rerun
+because of changes
+they make in the state of databases or other aspects of their environment.
+This volume of IEEE\ Std\ 1003.1-2001 specifies
+that the default, if the \fB-r\fP option is not presented to the utility,
+will be that the batch job cannot be rerun, since the
+result of rerunning a non-rerunnable job might be catastrophic.
+.LP
+The \fB-S\fP option allows users to specify the program (usually a
+shell) that will be invoked to process the script of the
+batch job. This option has been modified to allow a list of shell
+names and locations associated with different hosts.
+.LP
+The \fB-u\fP option is useful when the submitting user is authorized
+to use more than one account on a given host, in which
+case the \fB-u\fP option allows the user to select from among those
+accounts. The option-argument is a list of user-host pairs, so
+that the submitting user can provide different user identifiers for
+different nodes in the event the batch job is routed. The
+\fB-u\fP option provides a lot of flexibility to accommodate sites
+with complex account structures. Users that have the same user
+identifier on all the hosts they are authorized to use will not need
+to use the \fB-u\fP option.
+.LP
+The \fB-V\fP option allows users to export all their current environment
+variables, as of the time the batch job is submitted,
+to the context of the processes of the batch job.
+.LP
+The \fB-v\fP option allows users to export specific environment variables
+from their current process to the processes of the
+batch job.
+.LP
+The \fB-z\fP option allows users to suppress the writing of the batch
+job identifier to standard output. The \fB-z\fP option
+is an existing NQS practice that has been standardized.
+.LP
+Historically, the \fIqsub\fP utility has served the batch job-submission
+function in the NQS system, the existing practice on
+which it is based. Some changes and additions have been made to the
+\fIqsub\fP utility in this volume of
+IEEE\ Std\ 1003.1-2001, \fIvis-a-vis\fP NQS, as a result of the growing
+pool of experience with distributed batch
+systems.
+.LP
+The set of features of the \fIqsub\fP utility as defined in this volume
+of IEEE\ Std\ 1003.1-2001 appears to
+incorporate all the common existing practice on potentially conforming
+platforms.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIBatch Environment Services\fP, \fIqrerun\fP, \fIqstat\fP, \fItouch\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/read.1p b/man-pages-posix-2003/man1p/read.1p
new file mode 100644
index 0000000..a0aabc9
--- /dev/null
+++ b/man-pages-posix-2003/man1p/read.1p
@@ -0,0 +1,219 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "READ" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" read
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+read \- read a line from standard input
+.SH SYNOPSIS
+.LP
+\fBread\fP \fB[\fP\fB-r\fP\fB]\fP \fIvar\fP\fB...\fP
+.SH DESCRIPTION
+.LP
+The \fIread\fP utility shall read a single line from standard input.
+.LP
+By default, unless the \fB-r\fP option is specified, backslash ( \fB'\\'\fP
+) shall act as an escape character, as described
+in \fIEscape Character (Backslash)\fP . If standard input is a terminal
+device and the
+invoking shell is interactive, \fIread\fP shall prompt for a continuation
+line when:
+.IP " *" 3
+The shell reads an input line ending with a backslash, unless the
+\fB-r\fP option is specified.
+.LP
+.IP " *" 3
+A here-document is not terminated after a <newline> is entered.
+.LP
+.LP
+The line shall be split into fields as in the shell (see \fIField
+Splitting\fP );
+the first field shall be assigned to the first variable \fIvar\fP,
+the second field to the second variable \fIvar\fP, and so on.
+If there are fewer \fIvar\fP operands specified than there are fields,
+the leftover fields and their intervening separators shall
+be assigned to the last \fIvar\fP. If there are fewer fields than
+\fIvar\fPs, the remaining \fIvar\fPs shall be set to empty
+strings.
+.LP
+The setting of variables specified by the \fIvar\fP operands shall
+affect the current shell execution environment; see \fIShell Execution
+Environment\fP . If it is called in a subshell or separate utility
+execution
+environment, such as one of the following:
+.sp
+.RS
+.nf
+
+\fB(read foo)
+nohup read ...
+find . -exec read ... \\;
+\fP
+.fi
+.RE
+.LP
+it shall not affect the shell variables in the caller's environment.
+.SH OPTIONS
+.LP
+The \fIread\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following option is supported:
+.TP 7
+\fB-r\fP
+Do not treat a backslash character in any special way. Consider each
+backslash to be part of the input line.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIvar\fP
+The name of an existing or nonexisting shell variable.
+.sp
+.SH STDIN
+.LP
+The standard input shall be a text file.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIread\fP:
+.TP 7
+\fIIFS\fP
+Determine the internal field separators used to delimit fields; see
+\fIShell
+Variables\fP .
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fIPS2\fP
+Provide the prompt string that an interactive shell shall write to
+standard error when a line ending with a backslash is read
+and the \fB-r\fP option was not specified, or if a here-document is
+not terminated after a <newline> is entered.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used for diagnostic messages and prompts
+for continued input.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+End-of-file was detected or an error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The \fB-r\fP option is included to enable \fIread\fP to subsume the
+purpose of the \fIline\fP utility, which is not included
+in IEEE\ Std\ 1003.1-2001.
+.LP
+The results are undefined if an end-of-file is detected following
+a backslash at the end of a line when \fB-r\fP is not
+specified.
+.SH EXAMPLES
+.LP
+The following command:
+.sp
+.RS
+.nf
+
+\fBwhile read -r xx yy
+do
+ printf "%s %s\\n" "$yy" "$xx"
+done <\fP \fIinput_file\fP
+.fi
+.RE
+.LP
+prints a file with the first field of each line moved to the end of
+the line.
+.SH RATIONALE
+.LP
+The \fIread\fP utility historically has been a shell built-in. It
+was separated off into its own utility to take advantage of
+the richer description of functionality introduced by this volume
+of IEEE\ Std\ 1003.1-2001.
+.LP
+Since \fIread\fP affects the current shell execution environment,
+it is generally provided as a shell regular built-in. If it
+is called in a subshell or separate utility execution environment,
+such as one of the following:
+.sp
+.RS
+.nf
+
+\fB(read foo)
+nohup read ...
+find . -exec read ... \\;
+\fP
+.fi
+.RE
+.LP
+it does not affect the shell variables in the environment of the caller.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIShell Command Language\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/readonly.1p b/man-pages-posix-2003/man1p/readonly.1p
new file mode 100644
index 0000000..0b3f006
--- /dev/null
+++ b/man-pages-posix-2003/man1p/readonly.1p
@@ -0,0 +1,156 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "READONLY" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" readonly
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+readonly \- set the readonly attribute for variables
+.SH SYNOPSIS
+.LP
+\fBreadonly name\fP\fB[\fP\fB=\fP\fIword\fP\fB]\fP\fB...
+.br
+.sp
+readonly -p
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The variables whose \fIname\fPs are specified shall be given the \fIreadonly\fP
+attribute. The values of variables with the
+\fIreadonly\fP attribute cannot be changed by subsequent assignment,
+nor can those variables be unset by the \fIunset\fP utility. If the
+name of a variable is followed by = \fIword\fP, then the value of
+that
+variable shall be set to \fIword\fP.
+.LP
+The \fIreadonly\fP special built-in shall support the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+When \fB-p\fP is specified, \fIreadonly\fP writes to the standard
+output the names and values of all read-only variables, in
+the following format:
+.sp
+.RS
+.nf
+
+\fB"readonly %s=%s\\n", <\fP\fIname\fP\fB>, <\fP\fIvalue\fP\fB>
+\fP
+.fi
+.RE
+.LP
+if \fIname\fP is set, and
+.sp
+.RS
+.nf
+
+\fB"readonly %s\\n", <\fP\fIname\fP\fB>
+\fP
+.fi
+.RE
+.LP
+if \fIname\fP is unset.
+.LP
+The shell shall format the output, including the proper use of quoting,
+so that it is suitable for reinput to the shell as
+commands that achieve the same value and \fIreadonly\fP attribute-setting
+results in a shell execution environment in which:
+.IP " 1." 4
+Variables with values at the time they were output do not have the
+\fIreadonly\fP attribute set.
+.LP
+.IP " 2." 4
+Variables that were unset at the time they were output do not have
+a value at the time at which the saved output is reinput to
+the shell.
+.LP
+.LP
+When no arguments are given, the results are unspecified.
+.SH OPTIONS
+.LP
+See the DESCRIPTION.
+.SH OPERANDS
+.LP
+See the DESCRIPTION.
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+None.
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+See the DESCRIPTION.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+Zero.
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.sp
+.RS
+.nf
+
+\fBreadonly HOME PWD
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+Some historical shells preserve the \fIreadonly\fP attribute across
+separate invocations. This volume of
+IEEE\ Std\ 1003.1-2001 allows this behavior, but does not require
+it.
+.LP
+The \fB-p\fP option allows portable access to the values that can
+be saved and then later restored using, for example, a \fIdot\fP script.
+Also see the RATIONALE for \fIexport\fP
+for a description of the no-argument and \fB-p\fP output cases and
+a related example.
+.LP
+Read-only functions were considered, but they were omitted as not
+being historical practice or particularly useful. Furthermore,
+functions must not be read-only across invocations to preclude ``spoofing''
+(spoofing is the term for the practice of creating a
+program that acts like a well-known utility with the intent of subverting
+the real intent of the user) of administrative or
+security-relevant (or security-conscious) shell scripts.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fISpecial Built-In Utilities\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/renice.1p b/man-pages-posix-2003/man1p/renice.1p
new file mode 100644
index 0000000..30ae0a0
--- /dev/null
+++ b/man-pages-posix-2003/man1p/renice.1p
@@ -0,0 +1,256 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "RENICE" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" renice
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+renice \- set nice values of running processes
+.SH SYNOPSIS
+.LP
+\fBrenice -n\fP \fIincrement\fP \fB[\fP\fB-g | -p | -u\fP\fB]\fP \fIID\fP
+\fB\&... \fP
+.SH DESCRIPTION
+.LP
+The \fIrenice\fP utility shall request that the nice values (see the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Section 3.239, Nice Value) of one or more running processes be changed.
+By
+default, the applicable processes are specified by their process IDs.
+When a process group is specified (see \fB-g\fP), the
+request shall apply to all processes in the process group.
+.LP
+The nice value shall be bounded in an implementation-defined manner.
+If the requested \fIincrement\fP would raise or lower the
+nice value of the executed utility beyond implementation-defined limits,
+then the limit whose value was exceeded shall be used.
+.LP
+When a user is \fIrenice\fPd, the request applies to all processes
+whose saved set-user-ID matches the user ID corresponding to
+the user.
+.LP
+Regardless of which options are supplied or any other factor, \fIrenice\fP
+shall not alter the nice values of any process
+unless the user requesting such a change has appropriate privileges
+to do so for the specified process. If the user lacks
+appropriate privileges to perform the requested action, the utility
+shall return an error status.
+.LP
+The saved set-user-ID of the user's process shall be checked instead
+of its effective user ID when \fIrenice\fP attempts to
+determine the user ID of the process in order to determine whether
+the user has appropriate privileges.
+.SH OPTIONS
+.LP
+The \fIrenice\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-g\fP
+Interpret all operands as unsigned decimal integer process group IDs.
+.TP 7
+\fB-n\ \fP \fIincrement\fP
+Specify how the nice value of the specified process or processes is
+to be adjusted. The \fIincrement\fP option-argument is a
+positive or negative decimal integer that shall be used to modify
+the nice value of the specified process or processes.
+.LP
+Positive \fIincrement\fP values shall cause a lower nice value. Negative
+\fIincrement\fP values may require appropriate
+privileges and shall cause a higher nice value.
+.TP 7
+\fB-p\fP
+Interpret all operands as unsigned decimal integer process IDs. The
+\fB-p\fP option is the default if no options are
+specified.
+.TP 7
+\fB-u\fP
+Interpret all operands as users. If a user exists with a user name
+equal to the operand, then the user ID of that user is used
+in further processing. Otherwise, if the operand represents an unsigned
+decimal integer, it shall be used as the numeric user ID of
+the user.
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIID\fP
+A process ID, process group ID, or user name/user ID, depending on
+the option selected.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIrenice\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.IP " 1." 4
+Adjust the nice value so that process IDs 987 and 32 would have a
+lower nice value:
+.sp
+.RS
+.nf
+
+\fBrenice -n 5 -p 987 32
+\fP
+.fi
+.RE
+.LP
+.IP " 2." 4
+Adjust the nice value so that group IDs 324 and 76 would have a higher
+nice value, if the user has the appropriate privileges to
+do so:
+.sp
+.RS
+.nf
+
+\fBrenice -n -4 -g 324 76
+\fP
+.fi
+.RE
+.LP
+.IP " 3." 4
+Adjust the nice value so that numeric user ID 8 and user \fBsas\fP
+would have a lower nice value:
+.sp
+.RS
+.nf
+
+\fBrenice -n 4 -u 8 sas
+\fP
+.fi
+.RE
+.LP
+.LP
+Useful nice value increments on historical systems include 19 or 20
+(the affected processes run only when nothing else in the
+system attempts to run) and any negative number (to make processes
+run faster).
+.SH RATIONALE
+.LP
+The \fIgid\fP, \fIpid\fP, and \fIuser\fP specifications do not fit
+either the definition of operand or option-argument.
+However, for clarity, they have been included in the OPTIONS section,
+rather than the OPERANDS section.
+.LP
+The definition of nice value is not intended to suggest that all processes
+in a system have priorities that are comparable.
+Scheduling policy extensions such as the realtime priorities in the
+System Interfaces volume of IEEE\ Std\ 1003.1-2001 make
+the notion of a single underlying priority for all scheduling policies
+problematic. Some implementations may implement the \fInice\fP-related
+features to affect all processes on the system, others to affect just
+the general
+time-sharing activities implied by this volume of IEEE\ Std\ 1003.1-2001,
+and others may have no effect at all. Because of
+the use of "implementation-defined" in \fInice\fP and \fIrenice\fP,
+a wide range of
+implementation strategies are possible.
+.LP
+Originally, this utility was written in the historical manner, using
+the term "nice value". This was always a point of concern
+with users because it was never intuitively obvious what this meant.
+With a newer version of \fIrenice\fP, which used the term
+"system scheduling priority", it was hoped that novice users could
+better understand what this utility was meant to do. Also, it
+would be easier to document what the utility was meant to do. Unfortunately,
+the addition of the POSIX realtime scheduling
+capabilities introduced the concepts of process and thread scheduling
+priorities that were totally unaffected by the \fInice\fP/ \fIrenice\fP
+utilities or the \fInice\fP()/ \fIsetpriority\fP() functions. Continuing
+to use the term "system scheduling priority''
+would have incorrectly suggested that these utilities and functions
+were indeed affecting these realtime priorities. It was decided
+to revert to the historical term "nice value" to reference this unrelated
+process attribute.
+.LP
+Although this utility has use by system administrators (and in fact
+appears in the system administration portion of the BSD
+documentation), the standard developers considered that it was very
+useful for individual end users to control their own
+processes.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fInice\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/return.1p b/man-pages-posix-2003/man1p/return.1p
new file mode 100644
index 0000000..a98ebbb
--- /dev/null
+++ b/man-pages-posix-2003/man1p/return.1p
@@ -0,0 +1,99 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "RETURN" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" return
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+return \- return from a function
+.SH SYNOPSIS
+.LP
+\fBreturn\fP \fB[\fP\fIn\fP\fB]\fP
+.SH DESCRIPTION
+.LP
+The \fIreturn\fP utility shall cause the shell to stop executing the
+current function or \fIdot\fP script. If the shell is not currently
+executing a function or \fIdot\fP script, the results are unspecified.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+See the DESCRIPTION.
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+None.
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The value of the special parameter \fB'?'\fP shall be set to \fIn\fP,
+an unsigned decimal integer, or to the exit status of
+the last command executed if \fIn\fP is not specified. If the value
+of \fIn\fP is greater than 255, the results are undefined.
+When \fIreturn\fP is executed in a \fItrap\fP action, the last command
+is considered to be
+the command that executed immediately preceding the \fItrap\fP action.
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The behavior of \fIreturn\fP when not in a function or \fIdot\fP script
+differs between
+the System V shell and the KornShell. In the System V shell this is
+an error, whereas in the KornShell, the effect is the same as
+\fIexit\fP.
+.LP
+The results of returning a number greater than 255 are undefined because
+of differing practices in the various historical
+implementations. Some shells AND out all but the low-order 8 bits;
+others allow larger values, but not of unlimited size.
+.LP
+See the discussion of appropriate exit status values under \fIexit\fP
+\&.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fISpecial Built-In Utilities\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/rm.1p b/man-pages-posix-2003/man1p/rm.1p
new file mode 100644
index 0000000..b269c52
--- /dev/null
+++ b/man-pages-posix-2003/man1p/rm.1p
@@ -0,0 +1,359 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "RM" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" rm
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+rm \- remove directory entries
+.SH SYNOPSIS
+.LP
+\fBrm\fP \fB[\fP\fB-fiRr\fP\fB]\fP \fIfile\fP\fB...\fP
+.SH DESCRIPTION
+.LP
+The \fIrm\fP utility shall remove the directory entry specified by
+each \fIfile\fP argument.
+.LP
+If either of the files dot or dot-dot are specified as the basename
+portion of an operand (that is, the final pathname
+component), \fIrm\fP shall write a diagnostic message to standard
+error and do nothing more with such operands.
+.LP
+For each \fIfile\fP the following steps shall be taken:
+.IP " 1." 4
+If the \fIfile\fP does not exist:
+.RS
+.IP " a." 4
+If the \fB-f\fP option is not specified, \fIrm\fP shall write a diagnostic
+message to standard error.
+.LP
+.IP " b." 4
+Go on to any remaining \fIfiles\fP.
+.LP
+.RE
+.LP
+.IP " 2." 4
+If \fIfile\fP is of type directory, the following steps shall be taken:
+.RS
+.IP " a." 4
+If neither the \fB-R\fP option nor the \fB-r\fP option is specified,
+\fIrm\fP shall write a diagnostic message to standard
+error, do nothing more with \fIfile\fP, and go on to any remaining
+files.
+.LP
+.IP " b." 4
+If the \fB-f\fP option is not specified, and either the permissions
+of \fIfile\fP do not permit writing and the standard input
+is a terminal or the \fB-i\fP option is specified, \fIrm\fP shall
+write a prompt to standard error and read a line from the
+standard input. If the response is not affirmative, \fIrm\fP shall
+do nothing more with the current file and go on to any
+remaining files.
+.LP
+.IP " c." 4
+For each entry contained in \fIfile\fP, other than dot or dot-dot,
+the four steps listed here (1 to 4) shall be taken with the
+entry as if it were a \fIfile\fP operand. The \fIrm\fP utility shall
+not traverse directories by following symbolic links into
+other parts of the hierarchy, but shall remove the links themselves.
+.LP
+.IP " d." 4
+If the \fB-i\fP option is specified, \fIrm\fP shall write a prompt
+to standard error and read a line from the standard input.
+If the response is not affirmative, \fIrm\fP shall do nothing more
+with the current file, and go on to any remaining files.
+.LP
+.RE
+.LP
+.IP " 3." 4
+If \fIfile\fP is not of type directory, the \fB-f\fP option is not
+specified, and either the permissions of \fIfile\fP do not
+permit writing and the standard input is a terminal or the \fB-i\fP
+option is specified, \fIrm\fP shall write a prompt to the
+standard error and read a line from the standard input. If the response
+is not affirmative, \fIrm\fP shall do nothing more with
+the current file and go on to any remaining files.
+.LP
+.IP " 4." 4
+If the current file is a directory, \fIrm\fP shall perform actions
+equivalent to the \fIrmdir\fP() function defined in the System Interfaces
+volume of IEEE\ Std\ 1003.1-2001
+called with a pathname of the current file used as the \fIpath\fP
+argument. If the current file is not a directory, \fIrm\fP
+shall perform actions equivalent to the \fIunlink\fP() function defined
+in the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001 called with a pathname
+of the current file used as the \fIpath\fP
+argument.
+.LP
+If this fails for any reason, \fIrm\fP shall write a diagnostic message
+to standard error, do nothing more with the current
+file, and go on to any remaining files.
+.LP
+.LP
+The \fIrm\fP utility shall be able to descend to arbitrary depths
+in a file hierarchy, and shall not fail due to path length
+limitations (unless an operand specified by the user exceeds system
+limitations).
+.SH OPTIONS
+.LP
+The \fIrm\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-f\fP
+Do not prompt for confirmation. Do not write diagnostic messages or
+modify the exit status in the case of nonexistent operands.
+Any previous occurrences of the \fB-i\fP option shall be ignored.
+.TP 7
+\fB-i\fP
+Prompt for confirmation as described previously. Any previous occurrences
+of the \fB-f\fP option shall be ignored.
+.TP 7
+\fB-R\fP
+Remove file hierarchies. See the DESCRIPTION.
+.TP 7
+\fB-r\fP
+Equivalent to \fB-R\fP.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of a directory entry to be removed.
+.sp
+.SH STDIN
+.LP
+The standard input shall be used to read an input line in response
+to each prompt specified in the STDOUT section. Otherwise,
+the standard input shall not be used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIrm\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_COLLATE\fP
+.sp
+Determine the locale for the behavior of ranges, equivalence classes,
+and multi-character collating elements used in the extended
+regular expression defined for the \fByesexpr\fP locale keyword in
+the \fILC_MESSAGES\fP category.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments) and the behavior of
+character classes within regular expressions used in the
+extended regular expression defined for the \fByesexpr\fP locale keyword
+in the \fILC_MESSAGES\fP category.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale for the processing of affirmative responses that
+should be used to affect the format and contents of
+diagnostic messages written to standard error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+Prompts shall be written to standard error under the conditions specified
+in the DESCRIPTION and OPTIONS sections. The prompts
+shall contain the \fIfile\fP pathname, but their format is otherwise
+unspecified. The standard error also shall be used for
+diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+All of the named directory entries for which \fIrm\fP performed actions
+equivalent to the \fIrmdir\fP() or \fIunlink\fP() functions were removed.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The \fIrm\fP utility is forbidden to remove the names dot and dot-dot
+in order to avoid the consequences of inadvertently doing
+something like:
+.sp
+.RS
+.nf
+
+\fBrm -r .*
+\fP
+.fi
+.RE
+.LP
+Some implementations do not permit the removal of the last link to
+an executable binary file that is being executed; see the
+[EBUSY] error in the \fIunlink\fP() function defined in the System
+Interfaces volume of
+IEEE\ Std\ 1003.1-2001. Thus, the \fIrm\fP utility can fail to remove
+such files.
+.LP
+The \fB-i\fP option causes \fIrm\fP to prompt and read the standard
+input even if the standard input is not a terminal, but in
+the absence of \fB-i\fP the mode prompting is not done when the standard
+input is not a terminal.
+.SH EXAMPLES
+.IP " 1." 4
+The following command:
+.sp
+.RS
+.nf
+
+\fBrm a.out core
+\fP
+.fi
+.RE
+.LP
+removes the directory entries: \fBa.out\fP and \fBcore\fP.
+.LP
+.IP " 2." 4
+The following command:
+.sp
+.RS
+.nf
+
+\fBrm -Rf junk
+\fP
+.fi
+.RE
+.LP
+removes the directory \fBjunk\fP and all its contents, without prompting.
+.LP
+.SH RATIONALE
+.LP
+For absolute clarity, paragraphs (2b) and (3) in the DESCRIPTION of
+\fIrm\fP describing the behavior when prompting for
+confirmation, should be interpreted in the following manner:
+.sp
+.RS
+.nf
+
+\fBif ((NOT f_option) AND
+ ((not_writable AND input_is_terminal) OR i_option))
+\fP
+.fi
+.RE
+.LP
+The exact format of the interactive prompts is unspecified. Only the
+general nature of the contents of prompts are specified
+because implementations may desire more descriptive prompts than those
+used on historical implementations. Therefore, an
+application not using the \fB-f\fP option, or using the \fB-i\fP option,
+relies on the system to provide the most suitable dialog
+directly with the user, based on the behavior specified.
+.LP
+The \fB-r\fP option is historical practice on all known systems. The
+synonym \fB-R\fP option is provided for consistency with
+the other utilities in this volume of IEEE\ Std\ 1003.1-2001 that
+provide options requesting recursive descent through the
+file hierarchy.
+.LP
+The behavior of the \fB-f\fP option in historical versions of \fIrm\fP
+is inconsistent. In general, along with "forcing" the
+unlink without prompting for permission, it always causes diagnostic
+messages to be suppressed and the exit status to be unmodified
+for nonexistent operands and files that cannot be unlinked. In some
+versions, however, the \fB-f\fP option suppresses usage
+messages and system errors as well. Suppressing such messages is not
+a service to either shell scripts or users.
+.LP
+It is less clear that error messages regarding files that cannot be
+unlinked (removed) should be suppressed. Although this is
+historical practice, this volume of IEEE\ Std\ 1003.1-2001 does not
+permit the \fB-f\fP option to suppress such
+messages.
+.LP
+When given the \fB-r\fP and \fB-i\fP options, historical versions
+of \fIrm\fP prompt the user twice for each directory, once
+before removing its contents and once before actually attempting to
+delete the directory entry that names it. This allows the user
+to "prune" the file hierarchy walk. Historical versions of \fIrm\fP
+were inconsistent in that some did not do the former prompt
+for directories named on the command line and others had obscure prompting
+behavior when the \fB-i\fP option was specified and the
+permissions of the file did not permit writing. The POSIX Shell and
+Utilities \fIrm\fP differs little from historic practice, but
+does require that prompts be consistent. Historical versions of \fIrm\fP
+were also inconsistent in that prompts were done to both
+standard output and standard error. This volume of IEEE\ Std\ 1003.1-2001
+requires that prompts be done to standard error,
+for consistency with \fIcp\fP and \fImv\fP, and to allow
+historical extensions to \fIrm\fP that provide an option to list deleted
+files on standard output.
+.LP
+The \fIrm\fP utility is required to descend to arbitrary depths so
+that any file hierarchy may be deleted. This means, for
+example, that the \fIrm\fP utility cannot run out of file descriptors
+during its descent (that is, if the number of file
+descriptors is limited, \fIrm\fP cannot be implemented in the historical
+fashion where one file descriptor is used per directory
+level). Also, \fIrm\fP is not permitted to fail because of path length
+restrictions, unless an operand specified by the user is
+longer than {PATH_MAX}.
+.LP
+The \fIrm\fP utility removes symbolic links themselves, not the files
+they refer to, as a consequence of the dependence on the
+\fIunlink\fP() functionality, per the DESCRIPTION. When removing hierarchies
+with \fB-r\fP
+or \fB-R\fP, the prohibition on following symbolic links has to be
+made explicit.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIrmdir\fP(), the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+\fIremove\fP(), \fIrmdir\fP(), \fIunlink\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/rmdel.1p b/man-pages-posix-2003/man1p/rmdel.1p
new file mode 100644
index 0000000..eb84e2b
--- /dev/null
+++ b/man-pages-posix-2003/man1p/rmdel.1p
@@ -0,0 +1,159 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "RMDEL" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" rmdel
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+rmdel \- remove a delta from an SCCS file (\fBDEVELOPMENT\fP)
+.SH SYNOPSIS
+.LP
+\fBrmdel -r\fP \fISID file\fP\fB... \fP
+.SH DESCRIPTION
+.LP
+The \fIrmdel\fP utility shall remove the delta specified by the SID
+from each named SCCS file. The delta to be removed shall be
+the most recent delta in its branch in the delta chain of each named
+SCCS file. In addition, the application shall ensure that the
+SID specified is not that of a version being edited for the purpose
+of making a delta; that is, if a \fIp-file\fP (see \fIget\fP ) exists
+for the named SCCS file, the SID specified shall not appear in any
+entry of the
+\fIp-file\fP.
+.LP
+Removal of a delta shall be restricted to:
+.IP " 1." 4
+The user who made the delta
+.LP
+.IP " 2." 4
+The owner of the SCCS file
+.LP
+.IP " 3." 4
+The owner of the directory containing the SCCS file
+.LP
+.SH OPTIONS
+.LP
+The \fIrmdel\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following option shall be supported:
+.TP 7
+\fB-r\ \fP \fISID\fP
+Specify the SCCS identification string ( \fISID\fP) of the delta to
+be deleted.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of an existing SCCS file or a directory. If \fIfile\fP
+is a directory, the \fIrmdel\fP utility shall behave as
+though each file in the directory were specified as a named file,
+except that non-SCCS files (last component of the pathname does
+not begin with \fBs.\fP) and unreadable files shall be silently ignored.
+.LP
+If exactly one \fIfile\fP operand appears, and it is \fB'-'\fP, the
+standard input shall be read; each line of the standard
+input is taken to be the name of an SCCS file to be processed. Non-SCCS
+files and unreadable files shall be silently ignored.
+.sp
+.SH STDIN
+.LP
+The standard input shall be a text file used only when the \fIfile\fP
+operand is specified as \fB'-'\fP . Each line of the
+text file shall be interpreted as an SCCS pathname.
+.SH INPUT FILES
+.LP
+The SCCS files shall be files of unspecified format.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIrmdel\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+The SCCS files shall be files of unspecified format. During processing
+of a \fIfile\fP, a temporary \fIx-file\fP, as described
+in \fIadmin\fP, may be created and deleted; a locking \fIz-file\fP,
+as described in \fIget\fP, may be created and deleted.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIadmin\fP, \fIdelta\fP, \fIget\fP, \fIprs\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/rmdir.1p b/man-pages-posix-2003/man1p/rmdir.1p
new file mode 100644
index 0000000..2ce58b6
--- /dev/null
+++ b/man-pages-posix-2003/man1p/rmdir.1p
@@ -0,0 +1,182 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "RMDIR" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" rmdir
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+rmdir \- remove directories
+.SH SYNOPSIS
+.LP
+\fBrmdir\fP \fB[\fP\fB-p\fP\fB]\fP \fIdir\fP\fB...\fP
+.SH DESCRIPTION
+.LP
+The \fIrmdir\fP utility shall remove the directory entry specified
+by each \fIdir\fP operand.
+.LP
+For each \fIdir\fP operand, the \fIrmdir\fP utility shall perform
+actions equivalent to the \fIrmdir\fP() function called with the \fIdir\fP
+operand as its only argument.
+.LP
+Directories shall be processed in the order specified. If a directory
+and a subdirectory of that directory are specified in a
+single invocation of the \fIrmdir\fP utility, the application shall
+specify the subdirectory before the parent directory so that
+the parent directory will be empty when the \fIrmdir\fP utility tries
+to remove it.
+.SH OPTIONS
+.LP
+The \fIrmdir\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following option shall be supported:
+.TP 7
+\fB-p\fP
+Remove all directories in a pathname. For each \fIdir\fP operand:
+.RS
+.IP " 1." 4
+The directory entry it names shall be removed.
+.LP
+.IP " 2." 4
+If the \fIdir\fP operand includes more than one pathname component,
+effects equivalent to the following command shall
+occur:
+.sp
+.RS
+.nf
+
+\fBrmdir -p $(dirname\fP \fIdir\fP\fB)
+\fP
+.fi
+.RE
+.LP
+.RE
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIdir\fP
+A pathname of an empty directory to be removed.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIrmdir\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Each directory entry specified by a \fIdir\fP operand was removed
+successfully.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The definition of an empty directory is one that contains, at most,
+directory entries for dot and dot-dot.
+.SH EXAMPLES
+.LP
+If a directory \fBa\fP in the current directory is empty except it
+contains a directory \fBb\fP and \fBa/b\fP is empty except
+it contains a directory \fBc\fP:
+.sp
+.RS
+.nf
+
+\fBrmdir -p a/b/c
+\fP
+.fi
+.RE
+.LP
+removes all three directories.
+.SH RATIONALE
+.LP
+On historical System V systems, the \fB-p\fP option also caused a
+message to be written to the standard output. The message
+indicated whether the whole path was removed or whether part of the
+path remained for some reason. The STDERR section requires this
+diagnostic when the entire path specified by a \fIdir\fP operand is
+not removed, but does not allow the status message reporting
+success to be written as a diagnostic.
+.LP
+The \fIrmdir\fP utility on System V also included a \fB-s\fP option
+that suppressed the informational message output by the
+\fB-p\fP option. This option has been omitted because the informational
+message is not specified by this volume of
+IEEE\ Std\ 1003.1-2001.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIrm\fP, the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+\fIremove\fP(), \fIrmdir\fP(), \fIunlink\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/sact.1p b/man-pages-posix-2003/man1p/sact.1p
new file mode 100644
index 0000000..a0493f4
--- /dev/null
+++ b/man-pages-posix-2003/man1p/sact.1p
@@ -0,0 +1,179 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SACT" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sact
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sact \- print current SCCS file-editing activity (\fBDEVELOPMENT\fP)
+.SH SYNOPSIS
+.LP
+\fBsact\fP \fIfile\fP\fB... \fP
+.SH DESCRIPTION
+.LP
+The \fIsact\fP utility shall inform the user of any impending deltas
+to a named SCCS file by writing a list to standard output.
+This situation occurs when \fIget\fP \fB-e\fP has been executed previously
+without a
+subsequent execution of \fIdelta\fP, \fIunget\fP, or
+\fIsccs\fP \fBunedit\fP.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of an existing SCCS file or a directory. If \fIfile\fP
+is a directory, the \fIsact\fP utility shall behave as
+though each file in the directory were specified as a named file,
+except that non-SCCS files (last component of the pathname does
+not begin with \fBs.\fP) and unreadable files shall be silently ignored.
+.LP
+If exactly one \fIfile\fP operand appears, and it is \fB'-'\fP, the
+standard input shall be read; each line of the standard
+input shall be taken to be the name of an SCCS file to be processed.
+Non-SCCS files and unreadable files shall be silently
+ignored.
+.sp
+.SH STDIN
+.LP
+The standard input shall be a text file used only when the \fIfile\fP
+operand is specified as \fB'-'\fP . Each line of the
+text file shall be interpreted as an SCCS pathname.
+.SH INPUT FILES
+.LP
+Any SCCS files interrogated are files of an unspecified format.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIsact\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The output for each named file shall consist of a line in the following
+format:
+.sp
+.RS
+.nf
+
+\fB"%s %s %s %s %s\\n", <\fP\fISID\fP\fB>, <\fP\fInew SID\fP\fB>, <\fP\fIlogin\fP\fB>, <\fP\fIdate\fP\fB>, <\fP\fItime\fP\fB>
+\fP
+.fi
+.RE
+.TP 7
+<\fISID\fP>
+Specifies the SID of a delta that currently exists in the SCCS file
+to which changes are made to make the new delta.
+.TP 7
+<\fInew\ SID\fP>
+Specifies the SID for the new delta to be created.
+.TP 7
+<\fIlogin\fP>
+Contains the login name of the user who makes the delta (that is,
+who executed a \fIget\fP
+for editing).
+.TP 7
+<\fIdate\fP>
+Contains the date that \fIget\fP \fB-e\fP was executed, in the format
+used by the \fIprs\fP \fB:D:\fP data keyword.
+.TP 7
+<\fItime\fP>
+Contains the time that \fIget\fP \fB-e\fP was executed, in the format
+used by the \fIprs\fP \fB:T:\fP data keyword.
+.sp
+.LP
+If there is more than one named file or if a directory or standard
+input is named, each pathname shall be written before each of
+the preceding lines:
+.sp
+.RS
+.nf
+
+\fB"\\n%s:\\n", <\fP\fIpathname\fP\fB>
+\fP
+.fi
+.RE
+.SH STDERR
+.LP
+The standard error shall be used only for optional informative messages
+concerning SCCS files with no impending deltas, and for
+diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIdelta\fP, \fIget\fP, \fIsccs\fP, \fIunget\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/sccs.1p b/man-pages-posix-2003/man1p/sccs.1p
new file mode 100644
index 0000000..2eb8baf
--- /dev/null
+++ b/man-pages-posix-2003/man1p/sccs.1p
@@ -0,0 +1,416 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SCCS" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sccs
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sccs \- front end for the SCCS subsystem (\fBDEVELOPMENT\fP)
+.SH SYNOPSIS
+.LP
+\fBsccs\fP \fB[\fP\fB-r\fP\fB][\fP\fB-d\fP \fIpath\fP\fB][\fP\fB-p\fP
+\fIpath\fP\fB]\fP
+\fIcommand\fP \fB[\fP\fIoptions\fP\fB...\fP\fB][\fP\fIoperands\fP\fB...\fP\fB]\fP\fB\fP
+.SH DESCRIPTION
+.LP
+The \fIsccs\fP utility is a front end to the SCCS programs. It also
+includes the capability to run set-user-id to another user
+to provide additional protection.
+.LP
+The \fIsccs\fP utility shall invoke the specified \fIcommand\fP with
+the specified \fIoptions\fP and \fIoperands\fP. By
+default, each of the \fIoperands\fP shall be modified by prefixing
+it with the string \fB"SCCS/s."\fP .
+.LP
+The \fIcommand\fP can be the name of one of the SCCS utilities in
+this volume of IEEE\ Std\ 1003.1-2001 ( \fIadmin\fP, \fIdelta\fP,
+\fIget\fP, \fIprs\fP, \fIrmdel\fP, \fIsact\fP, \fIunget\fP, \fIval\fP,
+or \fIwhat\fP) or one of the pseudo-utilities listed in the EXTENDED
+DESCRIPTION section.
+.SH OPTIONS
+.LP
+The \fIsccs\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines,
+except that \fIoptions\fP operands are
+actually options to be passed to the utility named by \fIcommand\fP.
+When the portion of the command:
+.sp
+.RS
+.nf
+
+\fIcommand\fP \fB[\fP\fIoptions\fP \fB...\fP \fB] [\fP\fIoperands\fP \fB...\fP \fB]\fP
+.fi
+.RE
+.LP
+is considered, all of the pseudo-utilities used as \fIcommand\fP shall
+support the Utility Syntax Guidelines. Any of the other
+SCCS utilities that can be invoked in this manner support the Guidelines
+to the extent indicated by their individual OPTIONS
+sections.
+.LP
+The following options shall be supported preceding the \fIcommand\fP
+operand:
+.TP 7
+\fB-d\ \fP \fIpath\fP
+A pathname of a directory to be used as a root directory for the SCCS
+files. The default shall be the current directory. The
+\fB-d\fP option shall take precedence over the \fIPROJECTDIR\fP variable.
+See \fB-p\fP.
+.TP 7
+\fB-p\ \fP \fIpath\fP
+A pathname of a directory in which the SCCS files are located. The
+default shall be the \fBSCCS\fP directory.
+.LP
+The \fB-p\fP option differs from the \fB-d\fP option in that the \fB-d\fP
+option-argument shall be prefixed to the entire
+pathname and the \fB-p\fP option-argument shall be inserted before
+the final component of the pathname. For example:
+.sp
+.RS
+.nf
+
+\fBsccs -d /x -p y get a/b
+\fP
+.fi
+.RE
+.LP
+converts to:
+.sp
+.RS
+.nf
+
+\fBget /x/a/y/s.b
+\fP
+.fi
+.RE
+.LP
+This allows the creation of aliases such as:
+.sp
+.RS
+.nf
+
+\fBalias syssccs="sccs -d /usr/src"
+\fP
+.fi
+.RE
+.LP
+which is used as:
+.sp
+.RS
+.nf
+
+\fBsyssccs get cmd/who.c
+\fP
+.fi
+.RE
+.TP 7
+\fB-r\fP
+Invoke \fIcommand\fP with the real user ID of the process, not any
+effective user ID that the \fIsccs\fP utility is set to.
+Certain commands ( \fIadmin\fP, \fBcheck\fP, \fBclean\fP, \fBdiffs\fP,
+\fBinfo\fP, \fIrmdel\fP, and \fBtell\fP) cannot be run set-user-ID
+by all users, since this would allow
+anyone to change the authorizations. These commands are always run
+as the real user.
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIcommand\fP
+An SCCS utility name or the name of one of the pseudo-utilities listed
+in the EXTENDED DESCRIPTION section.
+.TP 7
+\fIoptions\fP
+An option or option-argument to be passed to \fIcommand\fP.
+.TP 7
+\fIoperands\fP
+An operand to be passed to \fIcommand\fP.
+.sp
+.SH STDIN
+.LP
+See the utility description for the specified \fIcommand\fP.
+.SH INPUT FILES
+.LP
+See the utility description for the specified \fIcommand\fP.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIsccs\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fIPROJECTDIR\fP
+.sp
+Provide a default value for the \fB-d\fP \fIpath\fP option. If the
+value of \fIPROJECTDIR\fP begins with a slash, it shall be
+considered an absolute pathname; otherwise, the value of \fIPROJECTDIR\fP
+is treated as a user name and that user's initial
+working directory shall be examined for a subdirectory \fBsrc\fP or
+\fBsource\fP. If such a directory is found, it shall be used.
+Otherwise, the value shall be used as a relative pathname.
+.sp
+.LP
+Additional environment variable effects may be found in the utility
+description for the specified \fIcommand\fP.
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+See the utility description for the specified \fIcommand\fP.
+.SH STDERR
+.LP
+See the utility description for the specified \fIcommand\fP.
+.SH OUTPUT FILES
+.LP
+See the utility description for the specified \fIcommand\fP.
+.SH EXTENDED DESCRIPTION
+.LP
+The following pseudo-utilities shall be supported as \fIcommand\fP
+operands. All options referred to in the following list are
+values given in the \fIoptions\fP operands following \fIcommand\fP.
+.TP 7
+\fBcheck\fP
+Equivalent to \fBinfo\fP, except that nothing shall be printed if
+nothing is being edited, and a non-zero exit status shall be
+returned if anything is being edited. The intent is to have this included
+in an "install" entry in a makefile to ensure that
+everything is included into the SCCS file before a version is installed.
+.TP 7
+\fBclean\fP
+Remove everything from the current directory that can be recreated
+from SCCS files, but do not remove any files being edited.
+If the \fB-b\fP option is given, branches shall be ignored in the
+determination of whether they are being edited; this is
+dangerous if branches are kept in the same directory.
+.TP 7
+\fBcreate\fP
+Create an SCCS file, taking the initial contents from the file of
+the same name. Any options to \fIadmin\fP are accepted. If the creation
+is successful, the original files shall be renamed by
+prefixing the basenames with a comma. These renamed files should be
+removed after it has been verified that the SCCS files have
+been created successfully.
+.TP 7
+\fBdelget\fP
+Perform a \fIdelta\fP on the named files and then \fIget\fP new versions.
+The new versions shall have ID keywords expanded and shall not be
+editable.
+Any \fB-m\fP, \fB-p\fP, \fB-r\fP, \fB-s\fP, and \fB-y\fP options shall
+be passed to \fIdelta\fP, and any \fB-b\fP, \fB-c\fP, \fB-e\fP, \fB-i\fP,
+\fB-k\fP, \fB-l\fP, \fB-s\fP,
+and \fB-x\fP options shall be passed to \fIget\fP.
+.TP 7
+\fBdeledit\fP
+Equivalent to \fBdelget\fP, except that the \fIget\fP phase shall
+include the \fB-e\fP
+option. This option is useful for making a checkpoint of the current
+editing phase. The same options shall be passed to \fIdelta\fP as
+described above, and all the options listed for \fIget\fP above except
+\fB-e\fP shall be passed to \fBedit\fP.
+.TP 7
+\fBdiffs\fP
+Write a difference listing between the current version of the files
+checked out for editing and the versions in SCCS format.
+Any \fB-r\fP, \fB-c\fP, \fB-i\fP, \fB-x\fP, and \fB-t\fP options shall
+be passed to \fIget\fP; any \fB-l\fP, \fB-s\fP, \fB-e\fP, \fB-f\fP,
+\fB-h\fP, and \fB-b\fP options shall be
+passed to \fIdiff\fP. A \fB-C\fP option shall be passed to \fIdiff\fP
+as \fB-c\fP.
+.TP 7
+\fBedit\fP
+Equivalent to \fIget\fP \fB-e\fP.
+.TP 7
+\fBfix\fP
+Remove the named delta, but leave a copy of the delta with the changes
+that were in it. It is useful for fixing small compiler
+bugs, and so on. The application shall ensure that it is followed
+by a \fB-r\fP \fISID\fP option. Since \fBfix\fP does not leave
+audit trails, it should be used carefully.
+.TP 7
+\fBinfo\fP
+Write a listing of all files being edited. If the \fB-b\fP option
+is given, branches (that is, SIDs with two or fewer
+components) shall be ignored. If a \fB-u\fP \fIuser\fP option is given,
+then only files being edited by the named user shall be
+listed. A \fB-U\fP option shall be equivalent to \fB-u\fP< \fIcurrent\ user\fP>.
+.TP 7
+\fBprint\fP
+Write out verbose information about the named files, equivalent to
+\fIsccs\fP \fIprs\fP.
+.TP 7
+\fBtell\fP
+Write a <newline>-separated list of the files being edited to standard
+output. Takes the \fB-b\fP, \fB-u\fP, and
+\fB-U\fP options like \fBinfo\fP and \fBcheck\fP.
+.TP 7
+\fBunedit\fP
+This is the opposite of an \fBedit\fP or a \fIget\fP \fB-e\fP. It
+should be used with
+caution, since any changes made since the \fIget\fP are lost.
+.sp
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Many of the SCCS utilities take directory names as operands as well
+as specific filenames. The pseudo-utilities supported by
+\fIsccs\fP are not described as having this capability, but are not
+prohibited from doing so.
+.SH EXAMPLES
+.IP " 1." 4
+To get a file for editing, edit it and produce a new delta:
+.sp
+.RS
+.nf
+
+\fBsccs get -e file.c
+ex file.c
+sccs delta file.c
+\fP
+.fi
+.RE
+.LP
+.IP " 2." 4
+To get a file from another directory:
+.sp
+.RS
+.nf
+
+\fBsccs -p /usr/src/sccs/s. get cc.c
+\fP
+.fi
+.RE
+.LP
+or:
+.sp
+.RS
+.nf
+
+\fBsccs get /usr/src/sccs/s.cc.c
+\fP
+.fi
+.RE
+.LP
+.IP " 3." 4
+To make a delta of a large number of files in the current directory:
+.sp
+.RS
+.nf
+
+\fBsccs delta *.c
+\fP
+.fi
+.RE
+.LP
+.IP " 4." 4
+To get a list of files being edited that are not on branches:
+.sp
+.RS
+.nf
+
+\fBsccs info -b
+\fP
+.fi
+.RE
+.LP
+.IP " 5." 4
+To delta everything being edited by the current user:
+.sp
+.RS
+.nf
+
+\fBsccs delta $(sccs tell -U)
+\fP
+.fi
+.RE
+.LP
+.IP " 6." 4
+In a makefile, to get source files from an SCCS file if it does not
+already exist:
+.sp
+.RS
+.nf
+
+\fBSRCS = <\fP\fIlist of source files\fP\fB>
+$(SRCS):
+ sccs get $(REL) $@
+\fP
+.fi
+.RE
+.LP
+.SH RATIONALE
+.LP
+SCCS and its associated utilities are part of the XSI Development
+Utilities option within the XSI extension.
+.LP
+SCCS is an abbreviation for Source Code Control System. It is a maintenance
+and enhancement tracking tool. When a file is put
+under SCCS, the source code control system maintains the file and,
+when changes are made, identifies and stores them in the file
+with the original source code and/or documentation. As other changes
+are made, they too are identified and retained in the
+file.
+.LP
+Retrieval of the original and any set of changes is possible. Any
+version of the file as it develops can be reconstructed for
+inspection or additional modification. History data can be stored
+with each version, documenting why the changes were made, who
+made them, and when they were made.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIadmin\fP, \fIdelta\fP, \fIget\fP, \fImake\fP, \fIprs\fP, \fIrmdel\fP,
+\fIsact\fP, \fIunget\fP, \fIval\fP, \fIwhat\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/sed.1p b/man-pages-posix-2003/man1p/sed.1p
new file mode 100644
index 0000000..243e5e7
--- /dev/null
+++ b/man-pages-posix-2003/man1p/sed.1p
@@ -0,0 +1,738 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SED" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sed
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sed \- stream editor
+.SH SYNOPSIS
+.LP
+\fBsed\fP \fB[\fP\fB-n\fP\fB]\fP \fIscript\fP\fB[\fP\fIfile\fP\fB...\fP\fB]\fP\fB
+.br
+.sp
+sed\fP \fB[\fP\fB-n\fP\fB][\fP\fB-e\fP \fIscript\fP\fB]\fP\fB...\fP\fB[\fP\fB-f\fP
+\fIscript_file\fP\fB]\fP\fB...\fP\fB[\fP\fIfile\fP\fB...\fP\fB]\fP\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsed\fP utility is a stream editor that shall read one or more
+text files, make editing changes according to a script of
+editing commands, and write the results to standard output. The script
+shall be obtained from either the \fIscript\fP operand
+string or a combination of the option-arguments from the \fB-e\fP
+\fIscript\fP and \fB-f\fP \fIscript_file\fP options.
+.SH OPTIONS
+.LP
+The \fIsed\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines,
+except that the order of presentation of the
+\fB-e\fP and \fB-f\fP options is significant.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-e\ \fP \fIscript\fP
+Add the editing commands specified by the \fIscript\fP option-argument
+to the end of the script of editing commands. The
+\fIscript\fP option-argument shall have the same properties as the
+\fIscript\fP operand, described in the OPERANDS section.
+.TP 7
+\fB-f\ \fP \fIscript_file\fP
+Add the editing commands in the file \fIscript_file\fP to the end
+of the script.
+.TP 7
+\fB-n\fP
+Suppress the default output (in which each line, after it is examined
+for editing, is written to standard output). Only lines
+explicitly selected for output are written.
+.sp
+.LP
+Multiple \fB-e\fP and \fB-f\fP options may be specified. All commands
+shall be added to the script in the order specified,
+regardless of their origin.
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of a file whose contents are read and edited. If multiple
+\fIfile\fP operands are specified, the named files shall
+be read in the order specified and the concatenation shall be edited.
+If no \fIfile\fP operands are specified, the standard input
+shall be used.
+.TP 7
+\fIscript\fP
+A string to be used as the script of editing commands. The application
+shall not present a \fIscript\fP that violates the
+restrictions of a text file except that the final character need not
+be a <newline>.
+.sp
+.SH STDIN
+.LP
+The standard input shall be used only if no \fIfile\fP operands are
+specified. See the INPUT FILES section.
+.SH INPUT FILES
+.LP
+The input files shall be text files. The \fIscript_file\fPs named
+by the \fB-f\fP option shall consist of editing
+commands.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIsed\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_COLLATE\fP
+.sp
+Determine the locale for the behavior of ranges, equivalence classes,
+and multi-character collating elements within regular
+expressions.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files), and
+the behavior of character classes within regular
+expressions.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The input files shall be written to standard output, with the editing
+commands specified in the script applied. If the \fB-n\fP
+option is specified, only those input lines selected by the script
+shall be written to standard output.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+The output files shall be text files whose formats are dependent on
+the editing commands given.
+.SH EXTENDED DESCRIPTION
+.LP
+The \fIscript\fP shall consist of editing commands of the following
+form:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIaddress\fP\fB[\fP\fB,\fP\fIaddress\fP\fB]]\fP\fIfunction\fP
+.fi
+.RE
+.LP
+where \fIfunction\fP represents a single-character command verb from
+the list in Editing Commands
+in sed, followed by any applicable arguments.
+.LP
+The command can be preceded by <blank>s and/or semicolons. The function
+can be preceded by <blank>s. These optional
+characters shall have no effect.
+.LP
+In default operation, \fIsed\fP cyclically shall append a line of
+input, less its terminating <newline>, into the pattern
+space. Normally the pattern space will be empty, unless a \fBD\fP
+command terminated the last cycle. The \fIsed\fP utility shall
+then apply in sequence all commands whose addresses select that pattern
+space, and at the end of the script copy the pattern space
+to standard output (except when \fB-n\fP is specified) and delete
+the pattern space. Whenever the pattern space is written to
+standard output or a named file, \fIsed\fP shall immediately follow
+it with a <newline>.
+.LP
+Some of the editing commands use a hold space to save all or part
+of the pattern space for subsequent retrieval. The pattern and
+hold spaces shall each be able to hold at least 8192 bytes.
+.SS Addresses in sed
+.LP
+An address is either a decimal number that counts input lines cumulatively
+across files, a \fB'$'\fP character that addresses
+the last line of input, or a context address (which consists of a
+BRE, as described in Regular
+Expressions in sed, preceded and followed by a delimiter, usually
+a slash).
+.LP
+An editing command with no addresses shall select every pattern space.
+.LP
+An editing command with one address shall select each pattern space
+that matches the address.
+.LP
+An editing command with two addresses shall select the inclusive range
+from the first pattern space that matches the first
+address through the next pattern space that matches the second. (If
+the second address is a number less than or equal to the line
+number first selected, only one line shall be selected.) Starting
+at the first line following the selected range, \fIsed\fP shall
+look again for the first address. Thereafter, the process shall be
+repeated. Omitting either or both of the address components in
+the following form produces undefined results:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIaddress\fP\fB[\fP\fB,\fP\fIaddress\fP\fB]]\fP
+.fi
+.RE
+.SS Regular Expressions in sed
+.LP
+The \fIsed\fP utility shall support the BREs described in the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Section 9.3, Basic Regular
+Expressions, with the following additions:
+.IP " *" 3
+In a context address, the construction \fB"\\cBREc"\fP, where \fIc\fP
+is any character other than backslash or
+<newline>, shall be identical to \fB"/BRE/"\fP . If the character
+designated by \fIc\fP appears following a backslash,
+then it shall be considered to be that literal character, which shall
+not terminate the BRE. For example, in the context address
+\fB"\\xabc\\xdefx"\fP, the second \fIx\fP stands for itself, so that
+the BRE is \fB"abcxdef"\fP .
+.LP
+.IP " *" 3
+The escape sequence \fB'\\n'\fP shall match a <newline> embedded in
+the pattern space. A literal <newline> shall
+not be used in the BRE of a context address or in the substitute function.
+.LP
+.IP " *" 3
+If an RE is empty (that is, no pattern is specified) \fIsed\fP shall
+behave as if the last RE used in the last command applied
+(either as an address or as part of a substitute command) was specified.
+.LP
+.SS Editing Commands in sed
+.LP
+In the following list of editing commands, the maximum number of permissible
+addresses for each function is indicated by [
+\fI0addr\fP], [ \fI1addr\fP], or [ \fI2addr\fP], representing zero,
+one, or two addresses.
+.LP
+The argument \fItext\fP shall consist of one or more lines. Each embedded
+<newline> in the text shall be preceded by a
+backslash. Other backslashes in text shall be removed, and the following
+character shall be treated literally.
+.LP
+The \fBr\fP and \fBw\fP command verbs, and the \fIw\fP flag to the
+\fBs\fP command, take an optional \fIrfile\fP (or
+\fIwfile\fP) parameter, separated from the command verb letter or
+flag by one or more <blank>s; implementations may allow
+zero separation as an extension.
+.LP
+The argument \fIrfile\fP or the argument \fIwfile\fP shall terminate
+the editing command. Each \fIwfile\fP shall be created
+before processing begins. Implementations shall support at least ten
+\fIwfile\fP arguments in the script; the actual number
+(greater than or equal to 10) that is supported by the implementation
+is unspecified. The use of the \fIwfile\fP parameter shall
+cause that file to be initially created, if it does not exist, or
+shall replace the contents of an existing file.
+.LP
+The \fBb\fP, \fBr\fP, \fBs\fP, \fBt\fP, \fBw\fP, \fBy\fP, and \fB:\fP
+command verbs shall accept additional arguments.
+The following synopses indicate which arguments shall be separated
+from the command verbs by a single <space>.
+.LP
+The \fBa\fP and \fBr\fP commands schedule text for later output. The
+text specified for the \fBa\fP command, and the contents
+of the file specified for the \fBr\fP command, shall be written to
+standard output just before the next attempt to fetch a line of
+input when executing the \fBN\fP or \fBn\fP commands, or when reaching
+the end of the script. If written when reaching the end of
+the script, and the \fB-n\fP option was not specified, the text shall
+be written after copying the pattern space to standard
+output. The contents of the file specified for the \fBr\fP command
+shall be as of the time the output is written, not the time the
+\fBr\fP command is applied. The text shall be output in the order
+in which the \fBa\fP and \fBr\fP commands were applied to the
+input.
+.LP
+Command verbs other than \fB{\fP, \fBa\fP, \fBb\fP, \fBc\fP, \fBi\fP,
+\fBr\fP, \fBt\fP, \fBw\fP, \fB:\fP, and \fB#\fP
+can be followed by a semicolon, optional <blank>s, and another command
+verb. However, when the \fBs\fP command verb is used
+with the \fIw\fP flag, following it with another command in this manner
+produces undefined results.
+.LP
+A function can be preceded by one or more \fB'!'\fP characters, in
+which case the function shall be applied if the addresses
+do not select the pattern space. Zero or more <blank>s shall be accepted
+before the first \fB'!'\fP character. It is
+unspecified whether <blank>s can follow a \fB'!'\fP character, and
+conforming applications shall not follow a \fB'!'\fP
+character with <blank>s.
+.TP 7
+\fB[\fP\fI2addr\fP\fB]\ {\fP\fIfunction\fP
+.TP 7
+\fIfunction\fP
+.TP 7
+\&...
+.TP 7
+\fB}\fP
+Execute a list of \fIsed\fP functions only when the pattern space
+is selected. The list of \fIsed\fP functions shall be
+surrounded by braces and separated by <newline>s, and conform to the
+following rules. The braces can be preceded or followed
+by <blank>s. The functions can be preceded by <blank>s, but shall
+not be followed by <blank>s. The
+<right-brace> shall be preceded by a <newline> and can be preceded
+or followed by <blank>s.
+.TP 7
+\fB[\fP\fI1addr\fP\fB]a\\\fP
+.TP 7
+\fItext\fP
+Write text to standard output as described previously.
+.TP 7
+\fB[\fP\fI2addr\fP\fB]b\ [\fP\fIlabel\fP\fB]\fP
+.sp
+Branch to the \fB:\fP function bearing the \fIlabel\fP. If \fIlabel\fP
+is not specified, branch to the end of the script. The
+implementation shall support \fIlabel\fPs recognized as unique up
+to at least 8 characters; the actual length (greater than or
+equal to 8) that shall be supported by the implementation is unspecified.
+It is unspecified whether exceeding a label length causes
+an error or a silent truncation.
+.TP 7
+\fB[\fP\fI2addr\fP\fB]c\\\fP
+.TP 7
+\fItext\fP
+Delete the pattern space. With a 0 or 1 address or at the end of a
+2-address range, place \fItext\fP on the output and start
+the next cycle.
+.TP 7
+\fB[\fP\fI2addr\fP\fB]d\fP
+Delete the pattern space and start the next cycle.
+.TP 7
+\fB[\fP\fI2addr\fP\fB]D\fP
+Delete the initial segment of the pattern space through the first
+<newline> and start the next cycle.
+.TP 7
+\fB[\fP\fI2addr\fP\fB]g\fP
+Replace the contents of the pattern space by the contents of the hold
+space.
+.TP 7
+\fB[\fP\fI2addr\fP\fB]G\fP
+Append to the pattern space a <newline> followed by the contents of
+the hold space.
+.TP 7
+\fB[\fP\fI2addr\fP\fB]h\fP
+Replace the contents of the hold space with the contents of the pattern
+space.
+.TP 7
+\fB[\fP\fI2addr\fP\fB]H\fP
+Append to the hold space a <newline> followed by the contents of the
+pattern space.
+.TP 7
+\fB[\fP\fI1addr\fP\fB]i\\\fP
+.TP 7
+\fItext\fP
+Write \fItext\fP to standard output.
+.TP 7
+\fB[\fP\fI2addr\fP\fB]l\fP
+(The letter ell.) Write the pattern space to standard output in a
+visually unambiguous form. The characters listed in the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Table 5-1, Escape Sequences
+and Associated Actions ( \fB'\\\\'\fP,
+\fB'\\a'\fP, \fB'\\b'\fP, \fB'\\f'\fP, \fB'\\r'\fP, \fB'\\t'\fP,
+\fB'\\v'\fP ) shall be written as the
+corresponding escape sequence; the \fB'\\n'\fP in that table is not
+applicable. Non-printable characters not in that table shall
+be written as one three-digit octal number (with a preceding backslash)
+for each byte in the character (most significant byte
+first). If the size of a byte on the system is greater than 9 bits,
+the format used for non-printable characters is
+implementation-defined.
+.LP
+Long lines shall be folded, with the point of folding indicated by
+writing a backslash followed by a <newline>; the length
+at which folding occurs is unspecified, but should be appropriate
+for the output device. The end of each line shall be marked with
+a \fB'$'\fP .
+.TP 7
+\fB[\fP\fI2addr\fP\fB]n\fP
+Write the pattern space to standard output if the default output has
+not been suppressed, and replace the pattern space with
+the next line of input, less its terminating <newline>.
+.LP
+If no next line of input is available, the \fBn\fP command verb shall
+branch to the end of the script and quit without starting
+a new cycle.
+.TP 7
+\fB[\fP\fI2addr\fP\fB]N\fP
+Append the next line of input, less its terminating <newline>, to
+the pattern space, using an embedded <newline> to
+separate the appended material from the original material. Note that
+the current line number changes.
+.LP
+If no next line of input is available, the \fBN\fP command verb shall
+branch to the end of the script and quit without starting
+a new cycle or copying the pattern space to standard output.
+.TP 7
+\fB[\fP\fI2addr\fP\fB]p\fP
+Write the pattern space to standard output.
+.TP 7
+\fB[\fP\fI2addr\fP\fB]P\fP
+Write the pattern space, up to the first <newline>, to standard output.
+.TP 7
+\fB[\fP\fI1addr\fP\fB]q\fP
+Branch to the end of the script and quit without starting a new cycle.
+.TP 7
+\fB[\fP\fI1addr\fP\fB]r\ \fP \fIrfile\fP
+Copy the contents of \fIrfile\fP to standard output as described previously.
+If \fIrfile\fP does not exist or cannot be read,
+it shall be treated as if it were an empty file, causing no error
+condition.
+.TP 7
+\fB[\fP\fI2addr\fP\fB]s/\fP\fIBRE\fP\fB/\fP\fIreplacement\fP\fB/\fP\fIflags\fP
+.sp
+Substitute the replacement string for instances of the BRE in the
+pattern space. Any character other than backslash or
+<newline> can be used instead of a slash to delimit the BRE and the
+replacement. Within the BRE and the replacement, the BRE
+delimiter itself can be used as a literal character if it is preceded
+by a backslash.
+.LP
+The replacement string shall be scanned from beginning to end. An
+ampersand ( \fB'&'\fP ) appearing in the replacement
+shall be replaced by the string matching the BRE. The special meaning
+of \fB'&'\fP in this context can be suppressed by
+preceding it by a backslash. The characters \fB"\\\fP\fIn"\fP, where
+\fIn\fP is a digit, shall be replaced by the text matched
+by the corresponding backreference expression. The special meaning
+of \fB"\\\fP\fIn"\fP where \fIn\fP is a digit in this
+context, can be suppressed by preceding it by a backslash. For each
+other backslash ( \fB'\\'\fP ) encountered, the following
+character shall lose its special meaning (if any). The meaning of
+a \fB'\\'\fP immediately followed by any character other than
+\fB'&'\fP, \fB'\\'\fP, a digit, or the delimiter character used
+for this command, is unspecified.
+.LP
+A line can be split by substituting a <newline> into it. The application
+shall escape the <newline> in the
+replacement by preceding it by a backslash. A substitution shall be
+considered to have been performed even if the replacement
+string is identical to the string that it replaces. Any backslash
+used to alter the default meaning of a subsequent character shall
+be discarded from the BRE or the replacement before evaluating the
+BRE or using the replacement.
+.LP
+The value of \fIflags\fP shall be zero or more of:
+.TP 7
+\fIn\fP
+.RS
+Substitute for the \fIn\fPth occurrence only of the BRE found within
+the pattern space.
+.RE
+.TP 7
+\fBg\fP
+.RS
+Globally substitute for all non-overlapping instances of the BRE rather
+than just the first one. If both \fBg\fP and \fIn\fP
+are specified, the results are unspecified.
+.RE
+.TP 7
+\fBp\fP
+.RS
+Write the pattern space to standard output if a replacement was made.
+.RE
+.TP 7
+\fBw\ \fP \fIwfile\fP
+.RS
+Write. Append the pattern space to \fIwfile\fP if a replacement was
+made. A conforming application shall precede the
+\fIwfile\fP argument with one or more <blank>s. If the \fBw\fP flag
+is not the last flag value given in a concatenation of
+multiple flag values, the results are undefined.
+.RE
+.sp
+.TP 7
+\fB[\fP\fI2addr\fP\fB]t\ [\fP\fIlabel\fP\fB]\fP
+.sp
+Test. Branch to the \fB:\fP command verb bearing the \fIlabel\fP if
+any substitutions have been made since the most recent
+reading of an input line or execution of a \fBt\fP. If \fIlabel\fP
+is not specified, branch to the end of the script.
+.TP 7
+\fB[\fP\fI2addr\fP\fB]w\ \fP \fIwfile\fP
+.sp
+Append (write) the pattern space to \fIwfile\fP.
+.TP 7
+\fB[\fP\fI2addr\fP\fB]x\fP
+Exchange the contents of the pattern and hold spaces.
+.TP 7
+\fB[\fP\fI2addr\fP\fB]y/\fP\fIstring1\fP\fB/\fP\fIstring2\fP\fB/\fP
+.sp
+Replace all occurrences of characters in \fIstring1\fP with the corresponding
+characters in \fIstring2\fP. If a backslash
+followed by an \fB'n'\fP appear in \fIstring1\fP or \fIstring2\fP,
+the two characters shall be handled as a single
+<newline>. If the number of characters in \fIstring1\fP and \fIstring2\fP
+are not equal, or if any of the characters in
+\fIstring1\fP appear more than once, the results are undefined. Any
+character other than backslash or <newline> can be used
+instead of slash to delimit the strings. If the delimiter is not \fIn\fP,
+within \fIstring1\fP and \fIstring2\fP, the delimiter
+itself can be used as a literal character if it is preceded by a backslash.
+If a backslash character is immediately followed by a
+backslash character in \fIstring1\fP or \fIstring2\fP, the two backslash
+characters shall be counted as a single literal
+backslash character. The meaning of a backslash followed by any character
+that is not \fB'n'\fP, a backslash, or the delimiter
+character is undefined.
+.TP 7
+\fB[\fP\fI0addr\fP\fB]:\fP\fIlabel\fP
+Do nothing. This command bears a \fIlabel\fP to which the \fBb\fP
+and \fBt\fP commands branch.
+.TP 7
+\fB[\fP\fI1addr\fP\fB]=\fP
+Write the following to standard output:
+.sp
+.RS
+.nf
+
+\fB"%d\\n", <\fP\fIcurrent line number\fP\fB>
+\fP
+.fi
+.RE
+.TP 7
+\fB[\fP\fI0addr\fP\fB]\fP
+Ignore this empty command.
+.TP 7
+\fB[\fP\fI0addr\fP\fB]#\fP
+Ignore the \fB'#'\fP and the remainder of the line (treat them as
+a comment), with the single exception that if the first
+two characters in the script are \fB"#n"\fP, the default output shall
+be suppressed; this shall be the equivalent of specifying
+\fB-n\fP on the command line.
+.sp
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Regular expressions match entire strings, not just individual lines,
+but a <newline> is matched by \fB'\\n'\fP in a
+\fIsed\fP RE; a <newline> is not allowed by the general definition
+of regular expression in IEEE\ Std\ 1003.1-2001.
+Also note that \fB'\\n'\fP cannot be used to match a <newline> at
+the end of an arbitrary input line; <newline>s
+appear in the pattern space as a result of the \fBN\fP editing command.
+.SH EXAMPLES
+.LP
+This \fIsed\fP script simulates the BSD \fIcat\fP \fB-s\fP command,
+squeezing excess
+blank lines from standard input.
+.sp
+.RS
+.nf
+
+\fBsed -n '
+# Write non-empty lines.
+/./ {
+ p
+ d
+ }
+# Write a single empty line, then look for more empty lines.
+/^$/ p
+# Get next line, discard the held <newline> (empty line),
+# and look for more empty lines.
+:Empty
+/^$/ {
+ N
+ s/.//
+ b Empty
+ }
+# Write the non-empty line before going back to search
+# for the first in a set of empty lines.
+ p
+'
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+This volume of IEEE\ Std\ 1003.1-2001 requires implementations to
+support at least ten distinct \fIwfile\fPs, matching
+historical practice on many implementations. Implementations are encouraged
+to support more, but conforming applications should not
+exceed this limit.
+.LP
+The exit status codes specified here are different from those in System
+V. System V returns 2 for garbled \fIsed\fP commands,
+but returns zero with its usage message or if the input file could
+not be opened. The standard developers considered this to be a
+bug.
+.LP
+The manner in which the \fBl\fP command writes non-printable characters
+was changed to avoid the historical
+backspace-overstrike method, and other requirements to achieve unambiguous
+output were added. See the RATIONALE for \fIed\fP for details of the
+format chosen, which is the same as that chosen for \fIsed\fP.
+.LP
+This volume of IEEE\ Std\ 1003.1-2001 requires implementations to
+provide pattern and hold spaces of at least 8192
+bytes, larger than the 4000 bytes spaces used by some historical implementations,
+but less than the 20480 bytes limit used in an
+early proposal. Implementations are encouraged to allocate dynamically
+larger pattern and hold spaces as needed.
+.LP
+The requirements for acceptance of <blank>s and <space>s in command
+lines has been made more explicit than in early
+proposals to describe clearly the historical practice and to remove
+confusion about the phrase "protect initial blanks
+[\fIsic\fP] and tabs from the stripping that is done on every script
+line" that appears in much of the historical documentation
+of the \fIsed\fP utility description of text. (Not all implementations
+are known to have stripped <blank>s from text lines,
+although they all have allowed leading <blank>s preceding the address
+on a command line.)
+.LP
+The treatment of \fB'#'\fP comments differs from the SVID which only
+allows a comment as the first line of the script, but
+matches BSD-derived implementations. The comment character is treated
+as a command, and it has the same properties in terms of
+being accepted with leading <blank>s; the BSD implementation has historically
+supported this.
+.LP
+Early proposals required that a \fIscript_file\fP have at least one
+non-comment line. Some historical implementations have
+behaved in unexpected ways if this were not the case. The standard
+developers considered that this was incorrect behavior and that
+application developers should not have to avoid this feature. A correct
+implementation of this volume of
+IEEE\ Std\ 1003.1-2001 shall permit \fIscript_file\fPs that consist
+only of comment lines.
+.LP
+Early proposals indicated that if \fB-e\fP and \fB-f\fP options were
+intermixed, all \fB-e\fP options were processed before
+any \fB-f\fP options. This has been changed to process them in the
+order presented because it matches historical practice and is
+more intuitive.
+.LP
+The treatment of the \fBp\fP flag to the \fBs\fP command differs between
+System V and BSD-based systems when the default
+output is suppressed. In the two examples:
+.sp
+.RS
+.nf
+
+\fBecho a | sed 's/a/A/p'
+echo a | sed -n 's/a/A/p'
+\fP
+.fi
+.RE
+.LP
+this volume of IEEE\ Std\ 1003.1-2001, BSD, System V documentation,
+and the SVID indicate that the first example should
+write two lines with \fBA\fP, whereas the second should write one.
+Some System V systems write the \fBA\fP only once in both
+examples because the \fBp\fP flag is ignored if the \fB-n\fP option
+is not specified.
+.LP
+This is a case of a diametrical difference between systems that could
+not be reconciled through the compromise of declaring the
+behavior to be unspecified. The SVID/BSD/System V documentation behavior
+was adopted for this volume of
+IEEE\ Std\ 1003.1-2001 because:
+.IP " *" 3
+No known documentation for any historic system describes the interaction
+between the \fBp\fP flag and the \fB-n\fP option.
+.LP
+.IP " *" 3
+The selected behavior is more correct as there is no technical justification
+for any interaction between the \fBp\fP flag and
+the \fB-n\fP option. A relationship between \fB-n\fP and the \fBp\fP
+flag might imply that they are only used together, but this
+ignores valid scripts that interrupt the cyclical nature of the processing
+through the use of the \fBD\fP, \fBd\fP, \fBq\fP, or
+branching commands. Such scripts rely on the \fBp\fP suffix to write
+the pattern space because they do not make use of the default
+output at the "bottom" of the script.
+.LP
+.IP " *" 3
+Because the \fB-n\fP option makes the \fBp\fP flag unnecessary, any
+interaction would only be useful if \fIsed\fP scripts
+were written to run both with and without the \fB-n\fP option. This
+is believed to be unlikely. It is even more unlikely that
+programmers have coded the \fBp\fP flag expecting it to be unnecessary.
+Because the interaction was not documented, the likelihood
+of a programmer discovering the interaction and depending on it is
+further decreased.
+.LP
+.IP " *" 3
+Finally, scripts that break under the specified behavior produce too
+much output instead of too little, which is easier to
+diagnose and correct.
+.LP
+.LP
+The form of the substitute command that uses the \fBn\fP suffix was
+limited to the first 512 matches in an early proposal. This
+limit has been removed because there is no reason an editor processing
+lines of {LINE_MAX} length should have this restriction. The
+command \fBs/a/A/2047\fP should be able to substitute the 2047th occurrence
+of \fBa\fP on a line.
+.LP
+The \fBb\fP, \fBt\fP, and \fB:\fP commands are documented to ignore
+leading white space, but no mention is made of trailing
+white space. Historical implementations of \fIsed\fP assigned different
+locations to the labels \fB'x'\fP and
+\fB"x\ "\fP . This is not useful, and leads to subtle programming
+errors, but it is historical practice, and changing it
+could theoretically break working scripts. Implementors are encouraged
+to provide warning messages about labels that are never used
+or jumps to labels that do not exist.
+.LP
+Historically, the \fIsed\fP \fB!\fP and \fB}\fP editing commands did
+not permit multiple commands on a single line using a
+semicolon as a command delimiter. Implementations are permitted, but
+not required, to support this extension.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIawk\fP, \fIed\fP, \fIgrep\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/set.1p b/man-pages-posix-2003/man1p/set.1p
new file mode 100644
index 0000000..3d7a611
--- /dev/null
+++ b/man-pages-posix-2003/man1p/set.1p
@@ -0,0 +1,597 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SET" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" set
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+set \- set or unset options and positional parameters
+.SH SYNOPSIS
+.LP
+\fBset\fP \fB[\fP\fB-abCefmnuvx\fP\fB][\fP\fB-h\fP\fB][\fP\fB-o\fP
+\fIoption\fP\fB][\fP\fIargument\fP\fB...\fP\fB]\fP\fB
+.br
+.sp
+set\fP \fB[\fP\fB+abCefmnuvx\fP\fB][\fP\fB+h\fP\fB][\fP\fB+o\fP
+\fIoption\fP\fB][\fP\fIargument\fP\fB...]\fP\fB
+.br
+.sp
+set --\fP \fB[\fP\fIargument\fP\fB...\fP\fB]\fP\fB
+.br
+.sp
+set -o
+.br
+.sp
+set +o
+.br
+\fP
+.SH DESCRIPTION
+.LP
+If no \fIoption\fPs or \fIargument\fPs are specified, \fIset\fP shall
+write the names and values of all shell variables in
+the collation sequence of the current locale. Each \fIname\fP shall
+start on a separate line, using the format:
+.sp
+.RS
+.nf
+
+\fB"%s=%s\\n", <\fP\fIname\fP\fB>, <\fP\fIvalue\fP\fB>
+\fP
+.fi
+.RE
+.LP
+The \fIvalue\fP string shall be written with appropriate quoting;
+see the description of shell quoting in \fIQuoting\fP . The output
+shall be suitable for reinput to the shell, setting or resetting,
+as
+far as possible, the variables that are currently set; read-only variables
+cannot be reset.
+.LP
+When options are specified, they shall set or unset attributes of
+the shell, as described below. When \fIargument\fPs are
+specified, they cause positional parameters to be set or unset, as
+described below. Setting or unsetting attributes and positional
+parameters are not necessarily related actions, but they can be combined
+in a single invocation of \fIset\fP.
+.LP
+The \fIset\fP special built-in shall support the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines
+except that options can be specified with
+either a leading hyphen (meaning enable the option) or plus sign (meaning
+disable it) unless otherwise specified.
+.LP
+Implementations shall support the options in the following list in
+both their hyphen and plus-sign forms. These options can also
+be specified as options to \fIsh\fP.
+.TP 7
+\fB-a\fP
+When this option is on, the \fIexport\fP attribute shall be set for
+each variable to which an assignment is performed; see the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, Section 4.21, Variable
+Assignment. If the assignment precedes a utility name in a command,
+the \fIexport\fP attribute shall not persist in the
+current execution environment after the utility completes, with the
+exception that preceding one of the special built-in utilities
+causes the \fIexport\fP attribute to persist after the built-in has
+completed. If the assignment does not precede a utility name
+in the command, or if the assignment is a result of the operation
+of the \fIgetopts\fP or
+\fIread\fP utilities, the \fIexport\fP attribute shall persist until
+the variable is
+unset.
+.TP 7
+\fB-b\fP
+This option shall be supported if the implementation supports the
+User Portability Utilities option. It shall cause the shell
+to notify the user asynchronously of background job completions. The
+following message is written to standard error:
+.sp
+.RS
+.nf
+
+\fB"[%d]%c %s%s\\n", <\fP\fIjob-number\fP\fB>, <\fP\fIcurrent\fP\fB>, <status>, <job-name>
+\fP
+.fi
+.RE
+.LP
+where the fields shall be as follows:
+.TP 7
+<\fIcurrent\fP>
+.RS
+The character \fB'+'\fP identifies the job that would be used as a
+default for the \fIfg\fP or \fIbg\fP utilities; this job can also
+be specified
+using the \fIjob_id\fP \fB"%+"\fP or \fB"%%"\fP . The character \fB'-'\fP
+identifies the job that would become the
+default if the current default job were to exit; this job can also
+be specified using the \fIjob_id\fP \fB"%-"\fP . For other
+jobs, this field is a <space>. At most one job can be identified with
+\fB'+'\fP and at most one job can be identified with
+\fB'-'\fP . If there is any suspended job, then the current job shall
+be a suspended job. If there are at least two suspended
+jobs, then the previous job also shall be a suspended job.
+.RE
+.TP 7
+<\fIjob-number\fP>
+.RS
+A number that can be used to identify the process group to the \fIwait\fP,
+\fIfg\fP, \fIbg\fP, and \fIkill\fP utilities. Using these utilities,
+the job can be identified by prefixing the job number
+with \fB'%'\fP .
+.RE
+.TP 7
+<\fIstatus\fP>
+.RS
+Unspecified.
+.RE
+.TP 7
+<\fIjob-name\fP>
+.RS
+Unspecified.
+.RE
+.sp
+.LP
+When the shell notifies the user a job has been completed, it may
+remove the job's process ID from the list of those known in
+the current shell execution environment; see \fIAsynchronous Lists\fP
+\&. Asynchronous
+notification shall not be enabled by default.
+.TP 7
+\fB-C\fP
+(Uppercase C.) Prevent existing files from being overwritten by the
+shell's \fB'>'\fP redirection operator (see \fIRedirecting Output\fP
+); the \fB">|"\fP redirection operator shall override this
+\fInoclobber\fP option for an individual file.
+.TP 7
+\fB-e\fP
+When this option is on, if a simple command fails for any of the reasons
+listed in \fIConsequences of Shell Errors\fP or returns an exit status
+value >0, and is not part of
+the compound list following a \fBwhile\fP, \fBuntil\fP, or \fBif\fP
+keyword, and is not a part of an AND or OR list, and is not
+a pipeline preceded by the \fB!\fP reserved word, then the shell shall
+immediately exit.
+.TP 7
+\fB-f\fP
+The shell shall disable pathname expansion.
+.TP 7
+\fB-h\fP
+Locate and remember utilities invoked by functions as those functions
+are defined (the utilities are normally located when the
+function is executed).
+.TP 7
+\fB-m\fP
+This option shall be supported if the implementation supports the
+User Portability Utilities option. All jobs shall be run in
+their own process groups. Immediately before the shell issues a prompt
+after completion of the background job, a message reporting
+the exit status of the background job shall be written to standard
+error. If a foreground job stops, the shell shall write a
+message to standard error to that effect, formatted as described by
+the \fIjobs\fP utility.
+In addition, if a job changes status other than exiting (for example,
+if it stops for input or output or is stopped by a SIGSTOP
+signal), the shell shall write a similar message immediately prior
+to writing the next prompt. This option is enabled by default
+for interactive shells.
+.TP 7
+\fB-n\fP
+The shell shall read commands but does not execute them; this can
+be used to check for shell script syntax errors. An
+interactive shell may ignore this option.
+.TP 7
+\fB-o\fP
+Write the current settings of the options to standard output in an
+unspecified format.
+.TP 7
+\fB+o\fP
+Write the current option settings to standard output in a format that
+is suitable for reinput to the shell as commands that
+achieve the same options settings.
+.TP 7
+\fB-o\ \fP \fIoption\fP
+.sp
+This option is supported if the system supports the User Portability
+Utilities option. It shall set various options, many of which
+shall be equivalent to the single option letters. The following values
+of \fIoption\fP shall be supported:
+.TP 7
+\fIallexport\fP
+.RS
+Equivalent to \fB-a\fP.
+.RE
+.TP 7
+\fIerrexit\fP
+.RS
+Equivalent to \fB-e\fP.
+.RE
+.TP 7
+\fIignoreeof\fP
+.RS
+Prevent an interactive shell from exiting on end-of-file. This setting
+prevents accidental logouts when <control>-D is
+entered. A user shall explicitly \fIexit\fP to leave the interactive
+shell.
+.RE
+.TP 7
+\fImonitor\fP
+.RS
+Equivalent to \fB-m\fP. This option is supported if the system supports
+the User Portability Utilities option.
+.RE
+.TP 7
+\fInoclobber\fP
+.RS
+Equivalent to \fB-C\fP (uppercase C).
+.RE
+.TP 7
+\fInoglob\fP
+.RS
+Equivalent to \fB-f\fP.
+.RE
+.TP 7
+\fInoexec\fP
+.RS
+Equivalent to \fB-n\fP.
+.RE
+.TP 7
+\fInolog\fP
+.RS
+Prevent the entry of function definitions into the command history;
+see \fICommand History List\fP
+\&.
+.RE
+.TP 7
+\fInotify\fP
+.RS
+Equivalent to \fB-b\fP.
+.RE
+.TP 7
+\fInounset\fP
+.RS
+Equivalent to \fB-u\fP.
+.RE
+.TP 7
+\fIverbose\fP
+.RS
+Equivalent to \fB-v\fP.
+.RE
+.TP 7
+\fIvi\fP
+.RS
+Allow shell command line editing using the built-in \fIvi\fP editor.
+Enabling \fIvi\fP mode shall disable any other command line editing
+mode provided as an implementation
+extension.
+.LP
+It need not be possible to set \fIvi\fP mode on for certain block-mode
+terminals.
+.RE
+.TP 7
+\fIxtrace\fP
+.RS
+Equivalent to \fB-x\fP.
+.RE
+.sp
+.TP 7
+\fB-u\fP
+The shell shall write a message to standard error when it tries to
+expand a variable that is not set and immediately exit. An
+interactive shell shall not exit.
+.TP 7
+\fB-v\fP
+The shell shall write its input to standard error as it is read.
+.TP 7
+\fB-x\fP
+The shell shall write to standard error a trace for each command after
+it expands the command and before it executes it. It is
+unspecified whether the command that turns tracing off is traced.
+.sp
+.LP
+The default for all these options shall be off (unset) unless stated
+otherwise in the description of the option or unless the
+shell was invoked with them on; see \fIsh\fP.
+.LP
+The remaining arguments shall be assigned in order to the positional
+parameters. The special parameter \fB'#'\fP shall be set
+to reflect the number of positional parameters. All positional parameters
+shall be unset before any new values are assigned.
+.LP
+The special argument \fB"--"\fP immediately following the \fIset\fP
+command name can be used to delimit the arguments if the
+first argument begins with \fB'+'\fP or \fB'-'\fP, or to prevent
+inadvertent listing of all shell variables when there are
+no arguments. The command \fIset\fP \fB--\fP without \fIargument\fP
+shall unset all positional parameters and set the special
+parameter \fB'#'\fP to zero.
+.SH OPTIONS
+.LP
+See the DESCRIPTION.
+.SH OPERANDS
+.LP
+See the DESCRIPTION.
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+None.
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+See the DESCRIPTION.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+Zero.
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+Write out all variables and their values:
+.sp
+.RS
+.nf
+
+\fBset
+\fP
+.fi
+.RE
+.LP
+Set $1, $2, and $3 and set \fB"$#"\fP to 3:
+.sp
+.RS
+.nf
+
+\fBset c a b
+\fP
+.fi
+.RE
+.LP
+Turn on the \fB-x\fP and \fB-v\fP options:
+.sp
+.RS
+.nf
+
+\fBset -xv
+\fP
+.fi
+.RE
+.LP
+Unset all positional parameters:
+.sp
+.RS
+.nf
+
+\fBset --
+\fP
+.fi
+.RE
+.LP
+Set $1 to the value of \fIx\fP, even if it begins with \fB'-'\fP or
+\fB'+'\fP :
+.sp
+.RS
+.nf
+
+\fBset -- "$x"
+\fP
+.fi
+.RE
+.LP
+Set the positional parameters to the expansion of \fIx\fP, even if
+\fIx\fP expands with a leading \fB'-'\fP or \fB'+'\fP
+:
+.sp
+.RS
+.nf
+
+\fBset -- $x
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+The \fIset\fP -- form is listed specifically in the SYNOPSIS even
+though this usage is implied by the Utility Syntax
+Guidelines. The explanation of this feature removes any ambiguity
+about whether the \fIset\fP -- form might be misinterpreted as
+being equivalent to \fIset\fP without any options or arguments. The
+functionality of this form has been adopted from the
+KornShell. In System V, \fIset\fP -- only unsets parameters if there
+is at least one argument; the only way to unset all
+parameters is to use \fIshift\fP. Using the KornShell version should
+not affect System V
+scripts because there should be no reason to issue it without arguments
+deliberately; if it were issued as, for example:
+.sp
+.RS
+.nf
+
+\fBset -- "$@"
+\fP
+.fi
+.RE
+.LP
+and there were in fact no arguments resulting from \fB"$@"\fP, unsetting
+the parameters would have no result.
+.LP
+The \fIset\fP + form in early proposals was omitted as being an unnecessary
+duplication of \fIset\fP alone and not widespread
+historical practice.
+.LP
+The \fInoclobber\fP option was changed to allow \fIset\fP \fB-C\fP
+as well as the \fIset\fP \fB-o\fP \fInoclobber\fP
+option. The single-letter version was added so that the historical
+\fB"$-"\fP paradigm would not be broken; see \fISpecial Parameters\fP
+\&.
+.LP
+The \fB-h\fP flag is related to command name hashing and is only required
+on XSI-conformant systems.
+.LP
+The following \fIset\fP flags were omitted intentionally with the
+following rationale:
+.TP 7
+\fB-k\fP
+The \fB-k\fP flag was originally added by the author of the Bourne
+shell to make it easier for users of pre-release versions
+of the shell. In early versions of the Bourne shell the construct
+\fIset\fP \fIname\fP= \fIvalue\fP had to be used to assign
+values to shell variables. The problem with \fB-k\fP is that the behavior
+affects parsing, virtually precluding writing any
+compilers. To explain the behavior of \fB-k\fP, it is necessary to
+describe the parsing algorithm, which is
+implementation-defined. For example:
+.sp
+.RS
+.nf
+
+\fBset -k; echo\fP \fIname\fP\fB=\fP\fIvalue\fP
+.fi
+.RE
+.LP
+and:
+.sp
+.RS
+.nf
+
+\fBset -k
+echo\fP \fIname\fP\fB=\fP\fIvalue\fP
+.fi
+.RE
+.LP
+behave differently. The interaction with functions is even more complex.
+What is more, the \fB-k\fP flag is never needed, since
+the command line could have been reordered.
+.TP 7
+\fB-t\fP
+The \fB-t\fP flag is hard to specify and almost never used. The only
+known use could be done with here-documents. Moreover,
+the behavior with \fIksh\fP and \fIsh\fP differs. The
+reference page says that it exits after reading and executing one
+command. What is one command? If the input is \fIdate\fP;
+\fIdate\fP, \fIsh\fP executes both \fIdate\fP commands
+while \fIksh\fP does only the first.
+.sp
+.LP
+Consideration was given to rewriting \fIset\fP to simplify its confusing
+syntax. A specific suggestion was that the \fIunset\fP utility should
+be used to unset options instead of using the non- \fIgetopt\fP()
+-able + \fIoption\fP syntax. However, the conclusion was reached that
+the
+historical practice of using + \fIoption\fP was satisfactory and that
+there was no compelling reason to modify such widespread
+historical practice.
+.LP
+The \fB-o\fP option was adopted from the KornShell to address user
+needs. In addition to its generally friendly interface,
+\fB-o\fP is needed to provide the \fIvi\fP command line editing mode,
+for which historical
+practice yields no single-letter option name. (Although it might have
+been possible to invent such a letter, it was recognized that
+other editing modes would be developed and \fB-o\fP provides ample
+name space for describing such extensions.)
+.LP
+Historical implementations are inconsistent in the format used for
+\fB-o\fP option status reporting. The \fB+o\fP format
+without an option-argument was added to allow portable access to the
+options that can be saved and then later restored using, for
+instance, a dot script.
+.LP
+Historically, \fIsh\fP did trace the command \fIset\fP \fB+x\fP, but
+\fIksh\fP did not.
+.LP
+The \fIignoreeof\fP setting prevents accidental logouts when the end-of-file
+character (typically <control>-D) is
+entered. A user shall explicitly \fIexit\fP to leave the interactive
+shell.
+.LP
+The \fIset\fP \fB-m\fP option was added to apply only to the UPE because
+it applies primarily to interactive use, not shell
+script applications.
+.LP
+The ability to do asynchronous notification became available in the
+1988 version of the KornShell. To have it occur, the user
+had to issue the command:
+.sp
+.RS
+.nf
+
+\fBtrap "jobs -n" CLD
+\fP
+.fi
+.RE
+.LP
+The C shell provides two different levels of an asynchronous notification
+capability. The environment variable \fInotify\fP is
+analogous to what is done in \fIset\fP \fB-b\fP or \fIset\fP \fB-o\fP
+\fInotify\fP. When set, it notifies the user immediately
+of background job completions. When unset, this capability is turned
+off.
+.LP
+The other notification ability comes through the built-in utility
+\fInotify\fP. The
+syntax is:
+.sp
+.RS
+.nf
+
+\fBnotify\fP \fB[\fP\fB%job ...\fP \fB]\fP
+.fi
+.RE
+.LP
+By issuing \fInotify\fP with no operands, it causes the C shell to
+notify the user
+asynchronously when the state of the current job changes. If given
+operands, \fInotify\fP
+asynchronously informs the user of changes in the states of the specified
+jobs.
+.LP
+To add asynchronous notification to the POSIX shell, neither the KornShell
+extensions to \fItrap\fP, nor the C shell \fInotify\fP environment
+variable
+seemed appropriate ( \fInotify\fP is not a proper POSIX environment
+variable name).
+.LP
+The \fIset\fP \fB-b\fP option was selected as a compromise.
+.LP
+The \fInotify\fP built-in was considered to have more functionality
+than was required
+for simple asynchronous notification.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fISpecial Built-In Utilities\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/sh.1p b/man-pages-posix-2003/man1p/sh.1p
new file mode 100644
index 0000000..2a8566f
--- /dev/null
+++ b/man-pages-posix-2003/man1p/sh.1p
@@ -0,0 +1,1363 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SH" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sh
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sh \- shell, the standard command language interpreter
+.SH SYNOPSIS
+.LP
+\fBsh\fP \fB[\fP\fB-abCefhimnuvx\fP\fB][\fP\fB-o\fP \fIoption\fP\fB][\fP\fB+abCefhimnuvx\fP\fB][\fP\fB+o\fP
+\fIoption\fP\fB]
+.br
+\fP \fB\ \ \ \ \ \ \fP \fB[\fP\fIcommand_file\fP \fB[\fP\fIargument\fP\fB...\fP\fB]]\fP\fB
+.br
+.sp
+sh -c\fP\fB[\fP\fB-abCefhimnuvx\fP\fB][\fP\fB-o\fP \fIoption\fP\fB][\fP\fB+abCefhimnuvx\fP\fB][\fP\fB+o\fP
+\fIoption\fP\fB]\fP\fIcommand_string
+.br
+\fP \fB\ \ \ \ \ \ \fP \fI\fP\fB[\fP\fIcommand_name\fP
+\fB[\fP\fIargument\fP\fB...\fP\fB]]\fP\fB
+.br
+.sp
+sh -s\fP\fB[\fP\fB-abCefhimnuvx\fP\fB][\fP\fB-o\fP \fIoption\fP\fB][\fP\fB+abCefhimnuvx\fP\fB][\fP\fB+o\fP
+\fIoption\fP\fB][\fP\fIargument\fP\fB]\fP\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsh\fP utility is a command language interpreter that shall
+execute commands read from a command line string, the
+standard input, or a specified file. The application shall ensure
+that the commands to be executed are expressed in the language
+described in \fIShell Command Language\fP .
+.LP
+Pathname expansion shall not fail due to the size of a file.
+.LP
+Shell input and output redirections have an implementation-defined
+offset maximum that is established in the open file
+description.
+.SH OPTIONS
+.LP
+The \fIsh\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines,
+with an extension for support of a leading
+plus sign ( \fB'+'\fP ) as noted below.
+.LP
+The \fB-a\fP, \fB-b\fP, \fB-C\fP, \fB-e\fP, \fB-f\fP, \fB-m\fP, \fB-n\fP,
+\fB-o\fP \fIoption\fP, \fB-u\fP, \fB-v\fP,
+and \fB-x\fP options are described as part of the \fIset\fP utility
+in \fISpecial Built-In Utilities\fP . The option letters derived from
+the \fIset\fP special built-in shall also be accepted with a leading
+plus sign ( \fB'+'\fP )
+instead of a leading hyphen (meaning the reverse case of the option
+as described in this volume of
+IEEE\ Std\ 1003.1-2001).
+.LP
+The following additional options shall be supported:
+.TP 7
+\fB-c\fP
+Read commands from the \fIcommand_string\fP operand. Set the value
+of special parameter 0 (see \fISpecial Parameters\fP ) from the value
+of the \fIcommand_name\fP operand and the positional
+parameters ($1, $2, and so on) in sequence from the remaining \fIargument\fP
+operands. No commands shall be read from the standard
+input.
+.TP 7
+\fB-i\fP
+Specify that the shell is \fIinteractive\fP; see below. An implementation
+may treat specifying the \fB-i\fP option as an
+error if the real user ID of the calling process does not equal the
+effective user ID or if the real group ID does not equal the
+effective group ID.
+.TP 7
+\fB-s\fP
+Read commands from the standard input.
+.sp
+.LP
+If there are no operands and the \fB-c\fP option is not specified,
+the \fB-s\fP option shall be assumed.
+.LP
+If the \fB-i\fP option is present, or if there are no operands and
+the shell's standard input and standard error are attached
+to a terminal, the shell is considered to be \fIinteractive\fP.
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fB-\fP
+A single hyphen shall be treated as the first operand and then ignored.
+If both \fB'-'\fP and \fB"--"\fP are given as
+arguments, or if other operands precede the single hyphen, the results
+are undefined.
+.TP 7
+\fIargument\fP
+The positional parameters ($1, $2, and so on) shall be set to \fIarguments\fP,
+if any.
+.TP 7
+\fIcommand_file\fP
+The pathname of a file containing commands. If the pathname contains
+one or more slash characters, the implementation attempts
+to read that file; the file need not be executable. If the pathname
+does not contain a slash character:
+.RS
+.IP " *" 3
+The implementation shall attempt to read that file from the current
+working directory; the file need not be executable.
+.LP
+.IP " *" 3
+If the file is not in the current working directory, the implementation
+may perform a search for an executable file using the
+value of \fIPATH\fP, as described in \fICommand Search and Execution\fP
+\&.
+.LP
+.RE
+.LP
+Special parameter 0 (see \fISpecial Parameters\fP ) shall be set to
+the value of
+\fIcommand_file\fP. If \fIsh\fP is called using a synopsis form that
+omits \fIcommand_file\fP, special parameter 0 shall be set
+to the value of the first argument passed to \fIsh\fP from its parent
+(for example, \fIargv\fP[0] for a C program), which is
+normally a pathname used to execute the \fIsh\fP utility.
+.TP 7
+\fIcommand_name\fP
+.sp
+A string assigned to special parameter 0 when executing the commands
+in \fIcommand_string\fP. If \fIcommand_name\fP is not
+specified, special parameter 0 shall be set to the value of the first
+argument passed to \fIsh\fP from its parent (for example,
+\fIargv\fP[0] for a C program), which is normally a pathname used
+to execute the \fIsh\fP utility.
+.TP 7
+\fIcommand_string\fP
+.sp
+A string that shall be interpreted by the shell as one or more commands,
+as if the string were the argument to the \fIsystem\fP() function
+defined in the System Interfaces volume of IEEE\ Std\ 1003.1-2001.
+If the \fIcommand_string\fP operand is an empty string, \fIsh\fP shall
+exit with a zero exit status.
+.sp
+.SH STDIN
+.LP
+The standard input shall be used only if one of the following is true:
+.IP " *" 3
+The \fB-s\fP option is specified.
+.LP
+.IP " *" 3
+The \fB-c\fP option is not specified and no operands are specified.
+.LP
+.IP " *" 3
+The script executes one or more commands that require input from standard
+input (such as a \fIread\fP command that does not redirect its input).
+.LP
+.LP
+See the INPUT FILES section.
+.LP
+When the shell is using standard input and it invokes a command that
+also uses standard input, the shell shall ensure that the
+standard input file pointer points directly after the command it has
+read when the command begins execution. It shall not read
+ahead in such a manner that any characters intended to be read by
+the invoked command are consumed by the shell (whether
+interpreted by the shell or not) or that characters that are not read
+by the invoked command are not seen by the shell. When the
+command expecting to read standard input is started asynchronously
+by an interactive shell, it is unspecified whether characters
+are read by the command or interpreted by the shell.
+.LP
+If the standard input to \fIsh\fP is a FIFO or terminal device and
+is set to non-blocking reads, then \fIsh\fP shall enable
+blocking reads on standard input. This shall remain in effect when
+the command completes.
+.SH INPUT FILES
+.LP
+The input file shall be a text file, except that line lengths shall
+be unlimited. If the input file is empty or consists solely
+of blank lines or comments, or both, \fIsh\fP shall exit with a zero
+exit status.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIsh\fP:
+.TP 7
+\fIENV\fP
+This variable, when and only when an interactive shell is invoked,
+shall be subjected to parameter expansion (see \fIParameter Expansion\fP
+) by the shell, and the resulting value shall be used as a pathname
+of a file containing shell commands to execute in the current environment.
+The file need not be executable. If the expanded value
+of \fIENV\fP is not an absolute pathname, the results are unspecified.
+\fIENV\fP shall be ignored if the real and effective user
+IDs or real and effective group IDs of the process are different.
+.TP 7
+\fIFCEDIT\fP
+This variable, when expanded by the shell, shall determine the default
+value for the \fB-e\fP \fIeditor\fP option's
+\fIeditor\fP option-argument. If \fIFCEDIT\fP is null or unset, \fIed\fP
+shall be used as the
+editor. This volume of IEEE\ Std\ 1003.1-2001 specifies the effects
+of this variable only for systems supporting the User
+Portability Utilities option.
+.TP 7
+\fIHISTFILE\fP
+Determine a pathname naming a command history file. If the \fIHISTFILE\fP
+variable is not set, the shell may attempt to access
+or create a file \fB.sh_history\fP in the directory referred to by
+the \fIHOME\fP environment variable. If the shell cannot
+obtain both read and write access to, or create, the history file,
+it shall use an unspecified mechanism that allows the history to
+operate properly. (References to history "file" in this section shall
+be understood to mean this unspecified mechanism in such
+cases.) An implementation may choose to access this variable only
+when initializing the history file; this initialization shall
+occur when \fIfc\fP or \fIsh\fP first attempt to retrieve entries
+from, or add entries to, the
+file, as the result of commands issued by the user, the file named
+by the \fIENV\fP variable, or implementation-defined system
+start-up files. Implementations may choose to disable the history
+list mechanism for users with appropriate privileges who do not
+set \fIHISTFILE ;\fP the specific circumstances under which this occurs
+are implementation-defined. If more than one instance of
+the shell is using the same history file, it is unspecified how updates
+to the history file from those shells interact. As entries
+are deleted from the history file, they shall be deleted oldest first.
+It is unspecified when history file entries are physically
+removed from the history file. This volume of IEEE\ Std\ 1003.1-2001
+specifies the effects of this variable only for
+systems supporting the User Portability Utilities option.
+.TP 7
+\fIHISTSIZE\fP
+Determine a decimal number representing the limit to the number of
+previous commands that are accessible. If this variable is
+unset, an unspecified default greater than or equal to 128 shall be
+used. The maximum number of commands in the history list is
+unspecified, but shall be at least 128. An implementation may choose
+to access this variable only when initializing the history
+file, as described under \fIHISTFILE\fP. Therefore, it is unspecified
+whether changes made to \fIHISTSIZE\fP after the history
+file has been initialized are effective.
+.TP 7
+\fIHOME\fP
+Determine the pathname of the user's home directory. The contents
+of \fIHOME\fP are used in tilde expansion as described in \fITilde
+Expansion\fP . This volume of IEEE\ Std\ 1003.1-2001 specifies the
+effects of this variable only for systems supporting the User Portability
+Utilities option.
+.TP 7
+\fIIFS\fP
+(Input Field Separators.) A string treated as a list of characters
+that shall be used for field splitting and to split lines
+into words with the \fIread\fP command. See \fIField
+Splitting\fP . If \fIIFS\fP is not set, the shell shall behave as
+if the value of \fIIFS\fP were <space>, <tab>,
+and <newline>. Implementations may ignore the value of \fIIFS\fP in
+the environment at the time \fIsh\fP is invoked,
+treating \fIIFS\fP as if it were not set.
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_COLLATE\fP
+.sp
+Determine the behavior of range expressions, equivalence classes,
+and multi-character collating elements within pattern
+matching.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files), which
+characters are defined as letters (character class
+\fBalpha\fP), and the behavior of character classes within pattern
+matching.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fIMAIL\fP
+Determine a pathname of the user's mailbox file for purposes of incoming
+mail notification. If this variable is set, the shell
+shall inform the user if the file named by the variable is created
+or if its modification time has changed. Informing the user
+shall be accomplished by writing a string of unspecified format to
+standard error prior to the writing of the next primary prompt
+string. Such check shall be performed only after the completion of
+the interval defined by the \fIMAILCHECK\fP variable after the
+last such check. The user shall be informed only if \fIMAIL\fP is
+set and \fIMAILPATH\fP is not set. This volume of
+IEEE\ Std\ 1003.1-2001 specifies the effects of this variable only
+for systems supporting the User Portability Utilities
+option.
+.TP 7
+\fIMAILCHECK\fP
+.sp
+Establish a decimal integer value that specifies how often (in seconds)
+the shell shall check for the arrival of mail in the files
+specified by the \fIMAILPATH\fP or \fIMAIL\fP variables. The default
+value shall be 600 seconds. If set to zero, the shell shall
+check before issuing each primary prompt. This volume of IEEE\ Std\ 1003.1-2001
+specifies the effects of this variable only
+for systems supporting the User Portability Utilities option.
+.TP 7
+\fIMAILPATH\fP
+Provide a list of pathnames and optional messages separated by colons.
+If this variable is set, the shell shall inform the user
+if any of the files named by the variable are created or if any of
+their modification times change. (See the preceding entry for
+\fIMAIL\fP for descriptions of mail arrival and user informing.) Each
+pathname can be followed by \fB'%'\fP and a string that
+shall be subjected to parameter expansion and written to standard
+error when the modification time changes. If a \fB'%'\fP
+character in the pathname is preceded by a backslash, it shall be
+treated as a literal \fB'%'\fP in the pathname. The default
+message is unspecified.
+.LP
+The \fIMAILPATH\fP environment variable takes precedence over the
+\fIMAIL\fP variable. This volume of
+IEEE\ Std\ 1003.1-2001 specifies the effects of this variable only
+for systems supporting the User Portability Utilities
+option.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fIPATH\fP
+Establish a string formatted as described in the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 8, Environment Variables,
+used to effect command interpretation; see \fICommand Search and Execution\fP
+\&.
+.TP 7
+\fIPWD\fP
+This variable shall represent an absolute pathname of the current
+working directory. Assignments to this variable may be
+ignored unless the value is an absolute pathname of the current working
+directory and there are no filename components of dot or
+dot-dot.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+See the STDERR section.
+.SH STDERR
+.LP
+Except as otherwise stated (by the descriptions of any invoked utilities
+or in interactive mode), standard error shall be used
+only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+See \fIShell Command Language\fP . The following additional capabilities
+are supported on
+systems supporting the User Portability Utilities option.
+.SS Command History List
+.LP
+When the \fIsh\fP utility is being used interactively, it shall maintain
+a list of commands previously entered from the
+terminal in the file named by the \fIHISTFILE\fP environment variable.
+The type, size, and internal format of this file are
+unspecified. Multiple \fIsh\fP processes can share access to the file
+for a user, if file access permissions allow this; see the
+description of the \fIHISTFILE\fP environment variable.
+.SS Command Line Editing
+.LP
+When \fIsh\fP is being used interactively from a terminal, the current
+command and the command history (see \fIfc\fP ) can be edited using
+\fIvi\fP-mode command line editing. This mode
+uses commands, described below, similar to a subset of those described
+in the \fIvi\fP utility.
+Implementations may offer other command line editing modes corresponding
+to other editing utilities.
+.LP
+The command \fIset\fP \fB-o\fP \fIvi\fP
+shall enable \fIvi\fP-mode editing and place \fIsh\fP into \fIvi\fP
+insert mode (see Command Line Editing (vi-mode) ). This
+command also shall disable any other editing mode that the implementation
+may provide. The command \fIset\fP \fB+o\fP \fIvi\fP disables \fIvi\fP-mode
+editing.
+.LP
+Certain block-mode terminals may be unable to support shell command
+line editing. If a terminal is unable to provide either edit
+mode, it need not be possible to \fIset\fP \fB-o\fP \fIvi\fP when
+using the shell on this terminal.
+.LP
+In the following sections, the characters \fIerase\fP, \fIinterrupt\fP,
+\fIkill\fP, and \fIend-of-file\fP are those set by
+the \fIstty\fP utility.
+.SS Command Line Editing (vi-mode)
+.LP
+In \fIvi\fP editing mode, there shall be a distinguished line, the
+edit line. All the
+editing operations which modify a line affect the edit line. The edit
+line is always the newest line in the command history
+buffer.
+.LP
+With \fIvi\fP-mode enabled, \fIsh\fP can be switched between insert
+mode and command
+mode.
+.LP
+When in insert mode, an entered character shall be inserted into the
+command line, except as noted in vi Line Editing Insert Mode . Upon
+entering \fIsh\fP and after termination of the previous command,
+\fIsh\fP shall be in insert mode.
+.LP
+Typing an escape character shall switch \fIsh\fP into command mode
+(see vi Line Editing Command
+Mode ). In command mode, an entered character shall either invoke
+a defined operation, be used as part of a multi-character
+operation, or be treated as an error. A character that is not recognized
+as part of an editing command shall terminate any specific
+editing command and shall alert the terminal. Typing the \fIinterrupt\fP
+character in command mode shall cause \fIsh\fP to
+terminate command line editing on the current command line, reissue
+the prompt on the next line of the terminal, and reset the
+command history (see \fIfc\fP ) so that the most recently executed
+command is the previous command (that is,
+the command that was being edited when it was interrupted is not reentered
+into the history).
+.LP
+In the following sections, the phrase "move the cursor to the beginning
+of the word" shall mean "move the cursor to the first
+character of the current word" and the phrase "move the cursor to
+the end of the word" shall mean "move the cursor to the last
+character of the current word". The phrase "beginning of the command
+line" indicates the point between the end of the prompt
+string issued by the shell (or the beginning of the terminal line,
+if there is no prompt string) and the first character of the
+command text.
+.SS vi Line Editing Insert Mode
+.LP
+While in insert mode, any character typed shall be inserted in the
+current command line, unless it is from the following
+set.
+.TP 7
+<newline>
+Execute the current command line. If the current command line is not
+empty, this line shall be entered into the command history
+(see \fIfc\fP ).
+.TP 7
+\fIerase\fP
+Delete the character previous to the current cursor position and move
+the current cursor position back one character. In insert
+mode, characters shall be erased from both the screen and the buffer
+when backspacing.
+.TP 7
+\fIinterrupt\fP
+Terminate command line editing with the same effects as described
+for interrupting command mode; see Command Line Editing (vi-mode)
+\&.
+.TP 7
+\fIkill\fP
+Clear all the characters from the input line.
+.TP 7
+<control>-V
+Insert the next character input, even if the character is otherwise
+a special insert mode character.
+.TP 7
+<control>-W
+Delete the characters from the one preceding the cursor to the preceding
+word boundary. The word boundary in this case is the
+closer to the cursor of either the beginning of the line or a character
+that is in neither the \fBblank\fP nor \fBpunct\fP
+character classification of the current locale.
+.TP 7
+\fIend-of-file\fP
+Interpreted as the end of input in \fIsh\fP. This interpretation shall
+occur only at the beginning of an input line. If
+\fIend-of-file\fP is entered other than at the beginning of the line,
+the results are unspecified.
+.TP 7
+<ESC>
+Place \fIsh\fP into command mode.
+.sp
+.SS vi Line Editing Command Mode
+.LP
+In command mode for the command line editing feature, decimal digits
+not beginning with 0 that precede a command letter shall be
+remembered. Some commands use these decimal digits as a count number
+that affects the operation.
+.LP
+The term \fImotion command\fP represents one of the commands:
+.sp
+.RS
+.nf
+
+\fB<space> 0 b F l W ^ $ ; E f T w | , B e h t
+\fP
+.fi
+.RE
+.LP
+If the current line is not the edit line, any command that modifies
+the current line shall cause the content of the current line
+to replace the content of the edit line, and the current line shall
+become the edit line. This replacement cannot be undone (see
+the \fBu\fP and \fBU\fP commands below). The modification requested
+shall then be performed to the edit line. When the current
+line is the edit line, the modification shall be done directly to
+the edit line.
+.LP
+Any command that is preceded by \fIcount\fP shall take a count (the
+numeric value of any preceding decimal digits). Unless
+otherwise noted, this count shall cause the specified operation to
+repeat by the number of times specified by the count. Also
+unless otherwise noted, a \fIcount\fP that is out of range is considered
+an error condition and shall alert the terminal, but
+neither the cursor position, nor the command line, shall change.
+.LP
+The terms \fIword\fP and \fIbigword\fP are used as defined in the
+\fIvi\fP description.
+The term \fIsave buffer\fP corresponds to the term \fIunnamed buffer\fP
+in \fIvi\fP.
+.LP
+The following commands shall be recognized in command mode:
+.TP 7
+<newline>
+Execute the current command line. If the current command line is not
+empty, this line shall be entered into the command history
+(see \fIfc\fP ).
+.TP 7
+<control>-L
+Redraw the current command line. Position the cursor at the same location
+on the redrawn line.
+.TP 7
+\fB#\fP
+Insert the character \fB'#'\fP at the beginning of the current command
+line and treat the resulting edit line as a comment.
+This line shall be entered into the command history; see \fIfc\fP
+\&.
+.TP 7
+\fB=\fP
+Display the possible shell word expansions (see \fIWord Expansions\fP
+) of the bigword
+at the current command line position.
+.TP 7
+\fBNote:\fP
+.RS
+This does not modify the content of the current line, and therefore
+does not cause the current line to become the edit
+line.
+.RE
+.sp
+.LP
+These expansions shall be displayed on subsequent terminal lines.
+If the bigword contains none of the characters \fB'?'\fP,
+\fB'*'\fP, or \fB'['\fP, an asterisk ( \fB'*'\fP ) shall be implicitly
+assumed at the end. If any directories are
+matched, these expansions shall have a \fB'/'\fP character appended.
+After the expansion, the line shall be redrawn, the cursor
+repositioned at the current cursor position, and \fIsh\fP shall be
+placed in command mode.
+.TP 7
+\fB\\\fP
+Perform pathname expansion (see \fIPathname Expansion\fP ) on the
+current bigword,
+up to the largest set of characters that can be matched uniquely.
+If the bigword contains none of the characters \fB'?'\fP,
+\fB'*'\fP, or \fB'['\fP, an asterisk ( \fB'*'\fP ) shall be implicitly
+assumed at the end. This maximal expansion then
+shall replace the original bigword in the command line, and the cursor
+shall be placed after this expansion. If the resulting
+bigword completely and uniquely matches a directory, a \fB'/'\fP character
+shall be inserted directly after the bigword. If some
+other file is completely matched, a single <space> shall be inserted
+after the bigword. After this operation, \fIsh\fP shall
+be placed in insert mode.
+.TP 7
+\fB*\fP
+Perform pathname expansion on the current bigword and insert all expansions
+into the command to replace the current bigword,
+with each expansion separated by a single <space>. If at the end of
+the line, the current cursor position shall be moved to
+the first column position following the expansions and \fIsh\fP shall
+be placed in insert mode. Otherwise, the current cursor
+position shall be the last column position of the first character
+after the expansions and \fIsh\fP shall be placed in insert
+mode. If the current bigword contains none of the characters \fB'?'\fP,
+\fB'*'\fP, or \fB'['\fP, before the operation,
+an asterisk shall be implicitly assumed at the end.
+.TP 7
+\fB@\fP\fIletter\fP
+Insert the value of the alias named \fI_letter\fP. The symbol \fIletter\fP
+represents a single alphabetic character from the
+portable character set; implementations may support additional characters
+as an extension. If the alias \fI_letter\fP contains
+other editing commands, these commands shall be performed as part
+of the insertion. If no alias \fI_letter\fP is enabled, this
+command shall have no effect.
+.TP 7
+\fB[\fP\fIcount\fP\fB]~\fP
+Convert, if the current character is a lowercase letter, to the equivalent
+uppercase letter and \fIvice versa\fP, as
+prescribed by the current locale. The current cursor position then
+shall be advanced by one character. If the cursor was positioned
+on the last character of the line, the case conversion shall occur,
+but the cursor shall not advance. If the \fB'~'\fP
+command is preceded by a \fIcount\fP, that number of characters shall
+be converted, and the cursor shall be advanced to the
+character position after the last character converted. If the \fIcount\fP
+is larger than the number of characters after the
+cursor, this shall not be considered an error; the cursor shall advance
+to the last character on the line.
+.TP 7
+\fB[\fP\fIcount\fP\fB].\fP
+Repeat the most recent non-motion command, even if it was executed
+on an earlier command line. If the previous command was
+preceded by a \fIcount\fP, and no count is given on the \fB'.'\fP
+command, the count from the previous command shall be
+included as part of the repeated command. If the \fB'.'\fP command
+is preceded by a \fIcount\fP, this shall override any
+\fIcount\fP argument to the previous command. The \fIcount\fP specified
+in the \fB'.'\fP command shall become the count for
+subsequent \fB'.'\fP commands issued without a count.
+.TP 7
+\fB[\fP\fInumber\fP\fB]v\fP
+Invoke the \fIvi\fP editor to edit the current command line in a temporary
+file. When the
+editor exits, the commands in the temporary file shall be executed
+and placed in the command history. If a \fInumber\fP is
+included, it specifies the command number in the command history to
+be edited, rather than the current command line.
+.TP 7
+\fB[\fP\fIcount\fP\fB]l\fP\ \ \ (ell)
+.TP 7
+\fB[\fP\fIcount\fP\fB]\fP<space>
+.sp
+Move the current cursor position to the next character position. If
+the cursor was positioned on the last character of the line,
+the terminal shall be alerted and the cursor shall not be advanced.
+If the \fIcount\fP is larger than the number of characters
+after the cursor, this shall not be considered an error; the cursor
+shall advance to the last character on the line.
+.TP 7
+\fB[\fP\fIcount\fP\fB]h\fP
+Move the current cursor position to the \fIcount\fPth (default 1)
+previous character position. If the cursor was positioned on
+the first character of the line, the terminal shall be alerted and
+the cursor shall not be moved. If the count is larger than the
+number of characters before the cursor, this shall not be considered
+an error; the cursor shall move to the first character on the
+line.
+.TP 7
+\fB[\fP\fIcount\fP\fB]w\fP
+Move to the start of the next word. If the cursor was positioned on
+the last character of the line, the terminal shall be
+alerted and the cursor shall not be advanced. If the \fIcount\fP is
+larger than the number of words after the cursor, this shall
+not be considered an error; the cursor shall advance to the last character
+on the line.
+.TP 7
+\fB[\fP\fIcount\fP\fB]W\fP
+Move to the start of the next bigword. If the cursor was positioned
+on the last character of the line, the terminal shall be
+alerted and the cursor shall not be advanced. If the \fIcount\fP is
+larger than the number of bigwords after the cursor, this
+shall not be considered an error; the cursor shall advance to the
+last character on the line.
+.TP 7
+\fB[\fP\fIcount\fP\fB]e\fP
+Move to the end of the current word. If at the end of a word, move
+to the end of the next word. If the cursor was positioned on
+the last character of the line, the terminal shall be alerted and
+the cursor shall not be advanced. If the \fIcount\fP is larger
+than the number of words after the cursor, this shall not be considered
+an error; the cursor shall advance to the last character on
+the line.
+.TP 7
+\fB[\fP\fIcount\fP\fB]E\fP
+Move to the end of the current bigword. If at the end of a bigword,
+move to the end of the next bigword. If the cursor was
+positioned on the last character of the line, the terminal shall be
+alerted and the cursor shall not be advanced. If the
+\fIcount\fP is larger than the number of bigwords after the cursor,
+this shall not be considered an error; the cursor shall
+advance to the last character on the line.
+.TP 7
+\fB[\fP\fIcount\fP\fB]b\fP
+Move to the beginning of the current word. If at the beginning of
+a word, move to the beginning of the previous word. If the
+cursor was positioned on the first character of the line, the terminal
+shall be alerted and the cursor shall not be moved. If the
+\fIcount\fP is larger than the number of words preceding the cursor,
+this shall not be considered an error; the cursor shall
+return to the first character on the line.
+.TP 7
+\fB[\fP\fIcount\fP\fB]B\fP
+Move to the beginning of the current bigword. If at the beginning
+of a bigword, move to the beginning of the previous bigword.
+If the cursor was positioned on the first character of the line, the
+terminal shall be alerted and the cursor shall not be moved.
+If the \fIcount\fP is larger than the number of bigwords preceding
+the cursor, this shall not be considered an error; the cursor
+shall return to the first character on the line.
+.TP 7
+\fB^\fP
+Move the current cursor position to the first character on the input
+line that is not a <blank>.
+.TP 7
+\fB$\fP
+Move to the last character position on the current command line.
+.TP 7
+\fB0\fP
+(Zero.) Move to the first character position on the current command
+line.
+.TP 7
+\fB[\fP\fIcount\fP\fB]|\fP
+Move to the \fIcount\fPth character position on the current command
+line. If no number is specified, move to the first
+position. The first character position shall be numbered 1. If the
+count is larger than the number of characters on the line, this
+shall not be considered an error; the cursor shall be placed on the
+last character on the line.
+.TP 7
+\fB[\fP\fIcount\fP\fB]f\fP\fIc\fP
+Move to the first occurrence of the character \fB'c'\fP that occurs
+after the current cursor position. If the cursor was
+positioned on the last character of the line, the terminal shall be
+alerted and the cursor shall not be advanced. If the character
+\fB'c'\fP does not occur in the line after the current cursor position,
+the terminal shall be alerted and the cursor shall not
+be moved.
+.TP 7
+\fB[\fP\fIcount\fP\fB]F\fP\fIc\fP
+Move to the first occurrence of the character \fB'c'\fP that occurs
+before the current cursor position. If the cursor was
+positioned on the first character of the line, the terminal shall
+be alerted and the cursor shall not be moved. If the character
+\fB'c'\fP does not occur in the line before the current cursor position,
+the terminal shall be alerted and the cursor shall not
+be moved.
+.TP 7
+\fB[\fP\fIcount\fP\fB]t\fP\fIc\fP
+Move to the character before the first occurrence of the character
+\fB'c'\fP that occurs after the current cursor position.
+If the cursor was positioned on the last character of the line, the
+terminal shall be alerted and the cursor shall not be advanced.
+If the character \fB'c'\fP does not occur in the line after the current
+cursor position, the terminal shall be alerted and the
+cursor shall not be moved.
+.TP 7
+\fB[\fP\fIcount\fP\fB]T\fP\fIc\fP
+Move to the character after the first occurrence of the character
+\fB'c'\fP that occurs before the current cursor position.
+If the cursor was positioned on the first character of the line, the
+terminal shall be alerted and the cursor shall not be moved.
+If the character \fB'c'\fP does not occur in the line before the current
+cursor position, the terminal shall be alerted and the
+cursor shall not be moved.
+.TP 7
+\fB[\fP\fIcount\fP\fB];\fP
+Repeat the most recent \fBf\fP, \fBF\fP, \fBt\fP, or \fBT\fP command.
+Any number argument on that previous command shall be
+ignored. Errors are those described for the repeated command.
+.TP 7
+\fB[\fP\fIcount\fP\fB],\fP
+Repeat the most recent \fBf\fP, \fBF\fP, \fBt\fP, or \fBT\fP command.
+Any number argument on that previous command shall be
+ignored. However, reverse the direction of that command.
+.TP 7
+\fBa\fP
+Enter insert mode after the current cursor position. Characters that
+are entered shall be inserted before the next
+character.
+.TP 7
+\fBA\fP
+Enter insert mode after the end of the current command line.
+.TP 7
+\fBi\fP
+Enter insert mode at the current cursor position. Characters that
+are entered shall be inserted before the current
+character.
+.TP 7
+\fBI\fP
+Enter insert mode at the beginning of the current command line.
+.TP 7
+\fBR\fP
+Enter insert mode, replacing characters from the command line beginning
+at the current cursor position.
+.TP 7
+\fB[\fP\fIcount\fP\fB]c\fP\fImotion\fP
+.sp
+Delete the characters between the current cursor position and the
+cursor position that would result from the specified motion
+command. Then enter insert mode before the first character following
+any deleted characters. If \fIcount\fP is specified, it shall
+be applied to the motion command. A \fIcount\fP shall be ignored for
+the following motion commands:
+.sp
+.RS
+.nf
+
+\fB0 ^ $ c
+\fP
+.fi
+.RE
+.LP
+If the motion command is the character \fB'c'\fP, the current command
+line shall be cleared and insert mode shall be
+entered. If the motion command would move the current cursor position
+toward the beginning of the command line, the character under
+the current cursor position shall not be deleted. If the motion command
+would move the current cursor position toward the end of
+the command line, the character under the current cursor position
+shall be deleted. If the \fIcount\fP is larger than the number
+of characters between the current cursor position and the end of the
+command line toward which the motion command would move the
+cursor, this shall not be considered an error; all of the remaining
+characters in the aforementioned range shall be deleted and
+insert mode shall be entered. If the motion command is invalid, the
+terminal shall be alerted, the cursor shall not be moved, and
+no text shall be deleted.
+.TP 7
+\fBC\fP
+Delete from the current character to the end of the line and enter
+insert mode at the new end-of-line.
+.TP 7
+\fBS\fP
+Clear the entire edit line and enter insert mode.
+.TP 7
+\fB[\fP\fIcount\fP\fB]r\fP\fIc\fP
+Replace the current character with the character \fB'c'\fP . With
+a number \fIcount\fP, replace the current and the
+following \fIcount\fP-1 characters. After this command, the current
+cursor position shall be on the last character that was
+changed. If the \fIcount\fP is larger than the number of characters
+after the cursor, this shall not be considered an error; all
+of the remaining characters shall be changed.
+.TP 7
+\fB[\fP\fIcount\fP\fB]_\fP
+Append a <space> after the current character position and then append
+the last bigword in the previous input line after
+the <space>. Then enter insert mode after the last character just
+appended. With a number \fIcount\fP, append the
+\fIcount\fPth bigword in the previous line.
+.TP 7
+\fB[\fP\fIcount\fP\fB]x\fP
+Delete the character at the current cursor position and place the
+deleted characters in the save buffer. If the cursor was
+positioned on the last character of the line, the character shall
+be deleted and the cursor position shall be moved to the previous
+character (the new last character). If the \fIcount\fP is larger than
+the number of characters after the cursor, this shall not be
+considered an error; all the characters from the cursor to the end
+of the line shall be deleted.
+.TP 7
+\fB[\fP\fIcount\fP\fB]X\fP
+Delete the character before the current cursor position and place
+the deleted characters in the save buffer. The character
+under the current cursor position shall not change. If the cursor
+was positioned on the first character of the line, the terminal
+shall be alerted, and the \fBX\fP command shall have no effect. If
+the line contained a single character, the \fBX\fP command
+shall have no effect. If the line contained no characters, the terminal
+shall be alerted and the cursor shall not be moved. If the
+\fIcount\fP is larger than the number of characters before the cursor,
+this shall not be considered an error; all the characters
+from before the cursor to the beginning of the line shall be deleted.
+.TP 7
+\fB[\fP\fIcount\fP\fB]d\fP\fImotion\fP
+.sp
+Delete the characters between the current cursor position and the
+character position that would result from the motion command. A
+number \fIcount\fP repeats the motion command \fIcount\fP times. If
+the motion command would move toward the beginning of the
+command line, the character under the current cursor position shall
+not be deleted. If the motion command is \fBd\fP, the entire
+current command line shall be cleared. If the \fIcount\fP is larger
+than the number of characters between the current cursor
+position and the end of the command line toward which the motion command
+would move the cursor, this shall not be considered an
+error; all of the remaining characters in the aforementioned range
+shall be deleted. The deleted characters shall be placed in the
+save buffer.
+.TP 7
+\fBD\fP
+Delete all characters from the current cursor position to the end
+of the line. The deleted characters shall be placed in the
+save buffer.
+.TP 7
+\fB[\fP\fIcount\fP\fB]y\fP\fImotion\fP
+.sp
+Yank (that is, copy) the characters from the current cursor position
+to the position resulting from the motion command into the
+save buffer. A number \fIcount\fP shall be applied to the motion command.
+If the motion command would move toward the beginning of
+the command line, the character under the current cursor position
+shall not be included in the set of yanked characters. If the
+motion command is \fBy\fP, the entire current command line shall be
+yanked into the save buffer. The current cursor position shall
+be unchanged. If the \fIcount\fP is larger than the number of characters
+between the current cursor position and the end of the
+command line toward which the motion command would move the cursor,
+this shall not be considered an error; all of the remaining
+characters in the aforementioned range shall be yanked.
+.TP 7
+\fBY\fP
+Yank the characters from the current cursor position to the end of
+the line into the save buffer. The current character
+position shall be unchanged.
+.TP 7
+\fB[\fP\fIcount\fP\fB]p\fP
+Put a copy of the current contents of the save buffer after the current
+cursor position. The current cursor position shall be
+advanced to the last character put from the save buffer. A \fIcount\fP
+shall indicate how many copies of the save buffer shall be
+put.
+.TP 7
+\fB[\fP\fIcount\fP\fB]P\fP
+Put a copy of the current contents of the save buffer before the current
+cursor position. The current cursor position shall be
+moved to the last character put from the save buffer. A \fIcount\fP
+shall indicate how many copies of the save buffer shall be
+put.
+.TP 7
+\fBu\fP
+Undo the last command that changed the edit line. This operation shall
+not undo the copy of any command line to the edit
+line.
+.TP 7
+\fBU\fP
+Undo all changes made to the edit line. This operation shall not undo
+the copy of any command line to the edit line.
+.TP 7
+\fB[\fP\fIcount\fP\fB]k\fP
+.TP 7
+\fB[\fP\fIcount\fP\fB]-\fP
+Set the current command line to be the \fIcount\fPth previous command
+line in the shell command history. If \fIcount\fP is
+not specified, it shall default to 1. The cursor shall be positioned
+on the first character of the new command. If a \fBk\fP or
+\fB-\fP command would retreat past the maximum number of commands
+in effect for this shell (affected by the \fIHISTSIZE\fP
+environment variable), the terminal shall be alerted, and the command
+shall have no effect.
+.TP 7
+\fB[\fP\fIcount\fP\fB]j\fP
+.TP 7
+\fB[\fP\fIcount\fP\fB]+\fP
+Set the current command line to be the \fIcount\fPth next command
+line in the shell command history. If \fIcount\fP is not
+specified, it shall default to 1. The cursor shall be positioned on
+the first character of the new command. If a \fBj\fP or
+\fB+\fP command advances past the edit line, the current command line
+shall be restored to the edit line and the terminal shall be
+alerted.
+.TP 7
+\fB[\fP\fInumber\fP\fB]G\fP
+Set the current command line to be the oldest command line stored
+in the shell command history. With a number \fInumber\fP,
+set the current command line to be the command line \fInumber\fP in
+the history. If command line \fInumber\fP does not exist, the
+terminal shall be alerted and the command line shall not be changed.
+.TP 7
+\fB/\fP\fIpattern\fP<newline>
+.sp
+Move backwards through the command history, searching for the specified
+pattern, beginning with the previous command line. Patterns
+use the pattern matching notation described in \fIPattern Matching
+Notation\fP, except
+that the \fB'^'\fP character shall have special meaning when it appears
+as the first character of \fIpattern\fP. In this case,
+the \fB'^'\fP is discarded and the characters after the \fB'^'\fP
+shall be matched only at the beginning of a line. Commands
+in the command history shall be treated as strings, not as filenames.
+If the pattern is not found, the current command line shall
+be unchanged and the terminal is alerted. If it is found in a previous
+line, the current command line shall be set to that line and
+the cursor shall be set to the first character of the new command
+line.
+.LP
+If \fIpattern\fP is empty, the last non-empty pattern provided to
+\fB/\fP or \fB?\fP shall be used. If there is no previous
+non-empty pattern, the terminal shall be alerted and the current command
+line shall remain unchanged.
+.TP 7
+\fB?\fP\fIpattern\fP<newline>
+.sp
+Move forwards through the command history, searching for the specified
+pattern, beginning with the next command line. Patterns use
+the pattern matching notation described in \fIPattern Matching Notation\fP,
+except that
+the \fB'^'\fP character shall have special meaning when it appears
+as the first character of \fIpattern\fP. In this case, the
+\fB'^'\fP is discarded and the characters after the \fB'^'\fP shall
+be matched only at the beginning of a line. Commands in
+the command history shall be treated as strings, not as filenames.
+If the pattern is not found, the current command line shall be
+unchanged and the terminal alerted. If it is found in a following
+line, the current command line shall be set to that line and the
+cursor shall be set to the fist character of the new command line.
+.LP
+If \fIpattern\fP is empty, the last non-empty pattern provided to
+\fB/\fP or \fB?\fP shall be used. If there is no previous
+non-empty pattern, the terminal shall be alerted and the current command
+line shall remain unchanged.
+.TP 7
+\fBn\fP
+Repeat the most recent \fB/\fP or \fB?\fP command. If there is no
+previous \fB/\fP or \fB?\fP, the terminal shall be
+alerted and the current command line shall remain unchanged.
+.TP 7
+\fBN\fP
+Repeat the most recent \fB/\fP or \fB?\fP command, reversing the direction
+of the search. If there is no previous \fB/\fP or
+\fB?\fP, the terminal shall be alerted and the current command line
+shall remain unchanged.
+.sp
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ \ \ \ 0
+The script to be executed consisted solely of zero or more blank lines
+or comments, or both.
+.TP 7
+1-125
+A non-interactive shell detected a syntax, redirection, or variable
+assignment error.
+.TP 7
+\ \ 127
+A specified \fIcommand_file\fP could not be found by a non-interactive
+shell.
+.sp
+.LP
+Otherwise, the shell shall return the exit status of the last command
+it invoked or attempted to invoke (see also the \fIexit\fP utility
+in \fISpecial Built-In
+Utilities\fP ).
+.SH CONSEQUENCES OF ERRORS
+.LP
+See \fIConsequences of Shell Errors\fP .
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Standard input and standard error are the files that determine whether
+a shell is interactive when \fB-i\fP is not specified.
+For example:
+.sp
+.RS
+.nf
+
+\fBsh > file
+\fP
+.fi
+.RE
+.LP
+and:
+.sp
+.RS
+.nf
+
+\fBsh 2> file
+\fP
+.fi
+.RE
+.LP
+create interactive and non-interactive shells, respectively. Although
+both accept terminal input, the results of error
+conditions are different, as described in \fIConsequences of Shell
+Errors\fP ; in the
+second example a redirection error encountered by a special built-in
+utility aborts the shell.
+.LP
+A conforming application must protect its first operand, if it starts
+with a plus sign, by preceding it with the \fB"--"\fP
+argument that denotes the end of the options.
+.LP
+Applications should note that the standard \fIPATH\fP to the shell
+cannot be assumed to be either \fB/bin/sh\fP or
+\fB/usr/bin/sh\fP, and should be determined by interrogation of the
+\fIPATH\fP returned by \fIgetconf\fP \fIPATH\fP, ensuring that the
+returned pathname is an absolute pathname and not a
+shell built-in.
+.LP
+For example, to determine the location of the standard \fIsh\fP utility:
+.sp
+.RS
+.nf
+
+\fBcommand -v sh
+\fP
+.fi
+.RE
+.LP
+On some implementations this might return:
+.sp
+.RS
+.nf
+
+\fB/usr/xpg4/bin/sh
+\fP
+.fi
+.RE
+.LP
+Furthermore, on systems that support executable scripts (the \fB"#!"\fP
+construct), it is recommended that applications using
+executable scripts install them using \fIgetconf\fP \fB-v\fP to determine
+the shell
+pathname and update the \fB"#!"\fP script appropriately as it is being
+installed (for example, with \fIsed\fP). For example:
+.sp
+.RS
+.nf
+
+\fB#
+# Installation time script to install correct POSIX shell pathname
+#
+# Get list of paths to check
+#
+Sifs=$IFS
+IFS=:
+set $(getconf PATH)
+IFS=$Sifs
+#
+# Check each path for 'sh'
+#
+for i in $@
+do
+ if [ -f ${i}/sh ];
+ then
+ Pshell=${i}/sh
+ fi
+done
+#
+# This is the list of scripts to update. They should be of the
+# form '${name}.source' and will be transformed to '${name}'.
+# Each script should begin:
+#
+# !INSTALLSHELLPATH -p
+#
+scripts="a b c"
+#
+# Transform each script
+#
+for i in ${scripts}
+do
+ sed -e "s|INSTALLSHELLPATH|${Pshell}|" < ${i}.source > ${i}
+done
+\fP
+.fi
+.RE
+.SH EXAMPLES
+.IP " 1." 4
+Execute a shell command from a string:
+.sp
+.RS
+.nf
+
+\fBsh -c "cat myfile"
+\fP
+.fi
+.RE
+.LP
+.IP " 2." 4
+Execute a shell script from a file in the current directory:
+.sp
+.RS
+.nf
+
+\fBsh my_shell_cmds
+\fP
+.fi
+.RE
+.LP
+.SH RATIONALE
+.LP
+The \fIsh\fP utility and the \fIset\fP special built-in utility share
+a common
+set of options.
+.LP
+The KornShell ignores the contents of \fIIFS\fP upon entry to the
+script. A conforming application cannot rely on importing
+\fIIFS\fP. One justification for this, beyond security considerations,
+is to assist possible future shell compilers. Allowing
+\fIIFS\fP to be imported from the environment prevents many optimizations
+that might otherwise be performed via dataflow analysis
+of the script itself.
+.LP
+The text in the STDIN section about non-blocking reads concerns an
+instance of \fIsh\fP that has been invoked, probably by a
+C-language program, with standard input that has been opened using
+the O_NONBLOCK flag; see \fIopen\fP() in the System Interfaces volume
+of IEEE\ Std\ 1003.1-2001. If the shell did not
+reset this flag, it would immediately terminate because no input data
+would be available yet and that would be considered the same
+as end-of-file.
+.LP
+The options associated with a \fIrestricted shell\fP (command name
+\fIrsh\fP and the \fB-r\fP option) were excluded because
+the standard developers considered that the implied level of security
+could not be achieved and they did not want to raise false
+expectations.
+.LP
+On systems that support set-user-ID scripts, a historical trapdoor
+has been to link a script to the name \fB-i\fP. When it is
+called by a sequence such as:
+.sp
+.RS
+.nf
+
+\fBsh -
+\fP
+.fi
+.RE
+.LP
+or by:
+.sp
+.RS
+.nf
+
+\fB#! usr/bin/sh -
+\fP
+.fi
+.RE
+.LP
+the historical systems have assumed that no option letters follow.
+Thus, this volume of IEEE\ Std\ 1003.1-2001 allows
+the single hyphen to mark the end of the options, in addition to the
+use of the regular \fB"--"\fP argument, because it was
+considered that the older practice was so pervasive. An alternative
+approach is taken by the KornShell, where real and effective
+user/group IDs must match for an interactive shell; this behavior
+is specifically allowed by this volume of
+IEEE\ Std\ 1003.1-2001.
+.TP 7
+\fBNote:\fP
+There are other problems with set-user-ID scripts that the two approaches
+described here do not resolve.
+.sp
+.LP
+The initialization process for the history file can be dependent on
+the system start-up files, in that they may contain commands
+that effectively preempt the user's settings of \fIHISTFILE\fP and
+\fIHISTSIZE\fP. For example, function definition commands are
+recorded in the history file, unless the \fIset\fP \fB-o\fP \fInolog\fP
+option is
+set. If the system administrator includes function definitions in
+some system start-up file called before the \fIENV\fP file, the
+history file is initialized before the user gets a chance to influence
+its characteristics. In some historical shells, the history
+file is initialized just after the \fIENV\fP file has been processed.
+Therefore, it is implementation-defined whether changes made
+to \fIHISTFILE\fP after the history file has been initialized are
+effective.
+.LP
+The default messages for the various \fIMAIL -related\fP messages
+are unspecified because they vary across implementations.
+Typical messages are:
+.sp
+.RS
+.nf
+
+\fB"you have mail\\n"
+\fP
+.fi
+.RE
+.LP
+or:
+.sp
+.RS
+.nf
+
+\fB"you have new mail\\n"
+\fP
+.fi
+.RE
+.LP
+It is important that the descriptions of command line editing refer
+to the same shell as that in IEEE\ Std\ 1003.1-2001
+so that interactive users can also be application programmers without
+having to deal with programmatic differences in their two
+environments. It is also essential that the utility name \fIsh\fP
+be specified because this explicit utility name is too firmly
+rooted in historical practice of application programs for it to change.
+.LP
+Consideration was given to mandating a diagnostic message when attempting
+to set \fIvi\fP-mode on terminals that do not support command line
+editing. However, it is not historical
+practice for the shell to be cognizant of all terminal types and thus
+be able to detect inappropriate terminals in all cases.
+Implementations are encouraged to supply diagnostics in this case
+whenever possible, rather than leaving the user in a state where
+editing commands work incorrectly.
+.LP
+In early proposals, the KornShell-derived \fIemacs\fP mode of command
+line editing was included, even though the \fIemacs\fP
+editor itself was not. The community of \fIemacs\fP proponents was
+adamant that the full \fIemacs\fP editor not be standardized
+because they were concerned that an attempt to standardize this very
+powerful environment would encourage vendors to ship strictly
+conforming versions lacking the extensibility required by the community.
+The author of the original \fIemacs\fP program also
+expressed his desire to omit the program. Furthermore, there were
+a number of historical systems that did not include \fIemacs\fP,
+or included it without supporting it, but there were very few that
+did not include and support \fIvi\fP. The shell \fIemacs\fP command
+line editing mode was finally omitted because it became
+apparent that the KornShell version and the editor being distributed
+with the GNU system had diverged in some respects. The author
+of \fIemacs\fP requested that the POSIX \fIemacs\fP mode either be
+deleted or have a significant number of unspecified
+conditions. Although the KornShell author agreed to consider changes
+to bring the shell into alignment, the standard developers
+decided to defer specification at that time. At the time, it was assumed
+that convergence on an acceptable definition would occur
+for a subsequent draft, but that has not happened, and there appears
+to be no impetus to do so. In any case, implementations are
+free to offer additional command line editing modes based on the exact
+models of editors their users are most comfortable with.
+.LP
+Early proposals had the following list entry in vi Line Editing Insert
+Mode :
+.TP 7
+\fB\\\fP
+If followed by the \fIerase\fP or \fIkill\fP character, that character
+shall be inserted into the input line. Otherwise, the
+backslash itself shall be inserted into the input line.
+.sp
+.LP
+However, this is not actually a feature of \fIsh\fP command line editing
+insert mode, but one of some historical terminal line
+drivers. Some conforming implementations continue to do this when
+the \fIstty\fP
+\fBiexten\fP flag is set.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIShell Command Language\fP, \fIcd\fP, \fIecho\fP, \fIexit\fP(),
+\fIfc\fP, \fIpwd\fP, \fIread\fP(), \fIset\fP, \fIstty\fP, \fItest\fP,
+\fIumask\fP(), \fIvi\fP, the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+\fIdup\fP(), \fIexec\fP, \fIexit\fP(), \fIfork\fP(), \fIopen\fP(),
+\fIpipe\fP(), \fIsignal\fP(), \fIsystem\fP(), \fIulimit\fP(), \fIumask\fP(),
+\fIwait\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/shift.1p b/man-pages-posix-2003/man1p/shift.1p
new file mode 100644
index 0000000..c5088fc
--- /dev/null
+++ b/man-pages-posix-2003/man1p/shift.1p
@@ -0,0 +1,98 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SHIFT" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" shift
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+shift \- shift positional parameters
+.SH SYNOPSIS
+.LP
+\fBshift\fP \fB[\fP\fIn\fP\fB]\fP
+.SH DESCRIPTION
+.LP
+The positional parameters shall be shifted. Positional parameter 1
+shall be assigned the value of parameter (1+\fIn\fP),
+parameter 2 shall be assigned the value of parameter (2+\fIn\fP),
+and so on. The parameters represented by the numbers
+\fB"$#"\fP down to \fB"$#-n+1"\fP shall be unset, and the parameter
+\fB'#'\fP is updated to reflect the new number of
+positional parameters.
+.LP
+The value \fIn\fP shall be an unsigned decimal integer less than or
+equal to the value of the special parameter \fB'#'\fP .
+If \fIn\fP is not given, it shall be assumed to be 1. If \fIn\fP is
+0, the positional and special parameters are not changed.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+See the DESCRIPTION.
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+None.
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The exit status is >0 if \fIn\fP>$#; otherwise, it is zero.
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.sp
+.RS
+.nf
+
+\fB$\fP \fBset a b c d e
+\fP\fB$\fP \fBshift 2
+\fP\fB$\fP \fBecho $*
+\fP\fBc d e\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fISpecial Built-In Utilities\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/sleep.1p b/man-pages-posix-2003/man1p/sleep.1p
new file mode 100644
index 0000000..8596539
--- /dev/null
+++ b/man-pages-posix-2003/man1p/sleep.1p
@@ -0,0 +1,178 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SLEEP" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sleep
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sleep \- suspend execution for an interval
+.SH SYNOPSIS
+.LP
+\fBsleep\fP \fItime\fP
+.SH DESCRIPTION
+.LP
+The \fIsleep\fP utility shall suspend execution for at least the integral
+number of seconds specified by the \fItime\fP
+operand.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fItime\fP
+A non-negative decimal integer specifying the number of seconds for
+which to suspend execution.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIsleep\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+If the \fIsleep\fP utility receives a SIGALRM signal, one of the following
+actions shall be taken:
+.IP " 1." 4
+Terminate normally with a zero exit status.
+.LP
+.IP " 2." 4
+Effectively ignore the signal.
+.LP
+.IP " 3." 4
+Provide the default behavior for signals described in the ASYNCHRONOUS
+EVENTS section of \fIUtility Description Defaults\fP . This could
+include terminating with a non-zero exit
+status.
+.LP
+.LP
+The \fIsleep\fP utility shall take the standard action for all other
+signals.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+The execution was successfully suspended for at least \fItime\fP seconds,
+or a SIGALRM signal was received. See the
+ASYNCHRONOUS EVENTS section.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+The \fIsleep\fP utility can be used to execute a command after a certain
+amount of time, as in:
+.sp
+.RS
+.nf
+
+\fB(sleep 105;\fP \fIcommand\fP\fB) &
+\fP
+.fi
+.RE
+.LP
+or to execute a command every so often, as in:
+.sp
+.RS
+.nf
+
+\fBwhile true
+do
+ \fP \fIcommand\fP \fB sleep 37
+done
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+The exit status is allowed to be zero when \fIsleep\fP is interrupted
+by the SIGALRM signal because most implementations of
+this utility rely on the arrival of that signal to notify them that
+the requested finishing time has been successfully attained.
+Such implementations thus do not distinguish this situation from the
+successful completion case. Other implementations are allowed
+to catch the signal and go back to sleep until the requested time
+expires or to provide the normal signal termination
+procedures.
+.LP
+As with all other utilities that take integral operands and do not
+specify subranges of allowed values, \fIsleep\fP is required
+by this volume of IEEE\ Std\ 1003.1-2001 to deal with \fItime\fP requests
+of up to 2147483647 seconds. This may mean that
+some implementations have to make multiple calls to the delay mechanism
+of the underlying operating system if its argument range is
+less than this.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIwait\fP, the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+\fIalarm\fP(), \fIsleep\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/sort.1p b/man-pages-posix-2003/man1p/sort.1p
new file mode 100644
index 0000000..5e66fb9
--- /dev/null
+++ b/man-pages-posix-2003/man1p/sort.1p
@@ -0,0 +1,517 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SORT" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sort
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sort \- sort, merge, or sequence check text files
+.SH SYNOPSIS
+.LP
+\fBsort\fP \fB[\fP\fB-m\fP\fB][\fP\fB-o\fP \fIoutput\fP\fB][\fP\fB-bdfinru\fP\fB][\fP\fB-t\fP
+\fIchar\fP\fB][\fP\fB-k\fP \fIkeydef\fP\fB]\fP\fB...\fP \fB[\fP\fIfile\fP\fB...\fP\fB]\fP\fB
+.br
+.sp
+sort -c\fP \fB[\fP\fB-bdfinru\fP\fB][\fP\fB-t\fP \fIchar\fP\fB][\fP\fB-k\fP
+\fIkeydef\fP\fB][\fP\fIfile\fP\fB]\fP\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsort\fP utility shall perform one of the following functions:
+.IP " 1." 4
+Sort lines of all the named files together and write the result to
+the specified output.
+.LP
+.IP " 2." 4
+Merge lines of all the named (presorted) files together and write
+the result to the specified output.
+.LP
+.IP " 3." 4
+Check that a single input file is correctly presorted.
+.LP
+.LP
+Comparisons shall be based on one or more sort keys extracted from
+each line of input (or, if no sort keys are specified, the
+entire line up to, but not including, the terminating <newline>),
+and shall be performed using the collating sequence of the
+current locale.
+.SH OPTIONS
+.LP
+The \fIsort\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines,
+and the \fB-k\fP \fIkeydef\fP option should
+follow the \fB-b\fP, \fB-d\fP, \fB-f\fP, \fB-i\fP, \fB-n\fP, and \fB-r\fP
+options.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-c\fP
+Check that the single input file is ordered as specified by the arguments
+and the collating sequence of the current locale. No
+output shall be produced; only the exit code shall be affected.
+.TP 7
+\fB-m\fP
+Merge only; the input file shall be assumed to be already sorted.
+.TP 7
+\fB-o\ \fP \fIoutput\fP
+Specify the name of an output file to be used instead of the standard
+output. This file can be the same as one of the input
+\fIfile\fPs.
+.TP 7
+\fB-u\fP
+Unique: suppress all but one in each set of lines having equal keys.
+If used with the \fB-c\fP option, check that there are no
+lines with duplicate keys, in addition to checking that the input
+file is sorted.
+.sp
+.LP
+The following options shall override the default ordering rules. When
+ordering options appear independent of any key field
+specifications, the requested field ordering rules shall be applied
+globally to all sort keys. When attached to a specific key (see
+\fB-k\fP), the specified ordering options shall override all global
+ordering options for that key.
+.TP 7
+\fB-d\fP
+Specify that only <blank>s and alphanumeric characters, according
+to the current setting of \fILC_CTYPE\fP, shall be
+significant in comparisons. The behavior is undefined for a sort key
+to which \fB-i\fP or \fB-n\fP also applies.
+.TP 7
+\fB-f\fP
+Consider all lowercase characters that have uppercase equivalents,
+according to the current setting of \fILC_CTYPE\fP, to be
+the uppercase equivalent for the purposes of comparison.
+.TP 7
+\fB-i\fP
+Ignore all characters that are non-printable, according to the current
+setting of \fILC_CTYPE\fP.
+.TP 7
+\fB-n\fP
+Restrict the sort key to an initial numeric string, consisting of
+optional <blank>s, optional minus sign, and zero or
+more digits with an optional radix character and thousands separators
+(as defined in the current locale), which shall be sorted by
+arithmetic value. An empty digit string shall be treated as zero.
+Leading zeros and signs on zeros shall not affect ordering.
+.TP 7
+\fB-r\fP
+Reverse the sense of comparisons.
+.sp
+.LP
+The treatment of field separators can be altered using the options:
+.TP 7
+\fB-b\fP
+Ignore leading <blank>s when determining the starting and ending positions
+of a restricted sort key. If the \fB-b\fP
+option is specified before the first \fB-k\fP option, it shall be
+applied to all \fB-k\fP options. Otherwise, the \fB-b\fP
+option can be attached independently to each \fB-k\fP \fIfield_start\fP
+or \fIfield_end\fP option-argument (see below).
+.TP 7
+\fB-t\ \fP \fIchar\fP
+Use \fIchar\fP as the field separator character; \fIchar\fP shall
+not be considered to be part of a field (although it can be
+included in a sort key). Each occurrence of \fIchar\fP shall be significant
+(for example, <\fIchar\fP><\fIchar\fP>
+delimits an empty field). If \fB-t\fP is not specified, <blank>s shall
+be used as default field separators; each maximal
+non-empty sequence of <blank>s that follows a non- <blank> shall be
+a field separator.
+.sp
+.LP
+Sort keys can be specified using the options:
+.TP 7
+\fB-k\ \fP \fIkeydef\fP
+The \fIkeydef\fP argument is a restricted sort key field definition.
+The format of this definition is:
+.sp
+.RS
+.nf
+
+\fIfield_start\fP\fB[\fP\fItype\fP\fB][\fP\fB,\fP\fIfield_end\fP\fB[\fP\fItype\fP\fB]]\fP
+.fi
+.RE
+.LP
+where \fIfield_start\fP and \fIfield_end\fP define a key field restricted
+to a portion of the line (see the EXTENDED
+DESCRIPTION section), and \fItype\fP is a modifier from the list of
+characters \fB'b'\fP, \fB'd'\fP, \fB'f'\fP,
+\fB'i'\fP, \fB'n'\fP, \fB'r'\fP . The \fB'b'\fP modifier shall behave
+like the \fB-b\fP option, but shall apply only
+to the \fIfield_start\fP or \fIfield_end\fP to which it is attached.
+The other modifiers shall behave like the corresponding
+options, but shall apply only to the key field to which they are attached;
+they shall have this effect if specified with
+\fIfield_start\fP, \fIfield_end\fP, or both. If any modifier is attached
+to a \fIfield_start\fP or to a \fIfield_end\fP, no
+option shall apply to either. Implementations shall support at least
+nine occurrences of the \fB-k\fP option, which shall be
+significant in command line order. If no \fB-k\fP option is specified,
+a default sort key of the entire line shall be used.
+.LP
+When there are multiple key fields, later keys shall be compared only
+after all earlier keys compare equal. Except when the
+\fB-u\fP option is specified, lines that otherwise compare equal shall
+be ordered as if none of the options \fB-d\fP, \fB-f\fP,
+\fB-i\fP, \fB-n\fP, or \fB-k\fP were present (but with \fB-r\fP still
+in effect, if it was specified) and with all bytes in the
+lines significant to the comparison. The order in which lines that
+still compare equal are written is unspecified.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of a file to be sorted, merged, or checked. If no \fIfile\fP
+operands are specified, or if a \fIfile\fP operand is
+\fB'-'\fP, the standard input shall be used.
+.sp
+.SH STDIN
+.LP
+The standard input shall be used only if no \fIfile\fP operands are
+specified, or if a \fIfile\fP operand is \fB'-'\fP .
+See the INPUT FILES section.
+.SH INPUT FILES
+.LP
+The input files shall be text files, except that the \fIsort\fP utility
+shall add a <newline> to the end of a file ending
+with an incomplete last line.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIsort\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_COLLATE\fP
+.sp
+Determine the locale for ordering rules.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files) and
+the behavior of character classification for the \fB-b\fP,
+\fB-d\fP, \fB-f\fP, \fB-i\fP, and \fB-n\fP options.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fILC_NUMERIC\fP
+.sp
+Determine the locale for the definition of the radix character and
+thousands separator for the \fB-n\fP option.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Unless the \fB-o\fP or \fB-c\fP options are in effect, the standard
+output shall contain the sorted input.
+.SH STDERR
+.LP
+The standard error shall be used for diagnostic messages. A warning
+message about correcting an incomplete last line of an input
+file may be generated, but need not affect the final exit status.
+.SH OUTPUT FILES
+.LP
+If the \fB-o\fP option is in effect, the sorted input shall be written
+to the file \fIoutput\fP.
+.SH EXTENDED DESCRIPTION
+.LP
+The notation:
+.sp
+.RS
+.nf
+
+\fB-k\fP \fIfield_start\fP\fB[\fP\fItype\fP\fB][\fP\fB,\fP\fIfield_end\fP\fB[\fP\fItype\fP\fB]]\fP
+.fi
+.RE
+.LP
+shall define a key field that begins at \fIfield_start\fP and ends
+at \fIfield_end\fP inclusive, unless \fIfield_start\fP
+falls beyond the end of the line or after \fIfield_end\fP, in which
+case the key field is empty. A missing \fIfield_end\fP shall
+mean the last character of the line.
+.LP
+A field comprises a maximal sequence of non-separating characters
+and, in the absence of option \fB-t\fP, any preceding field
+separator.
+.LP
+The \fIfield_start\fP portion of the \fIkeydef\fP option-argument
+shall have the form:
+.sp
+.RS
+.nf
+
+\fIfield_number\fP\fB[\fP\fB.\fP\fIfirst_character\fP\fB]\fP
+.fi
+.RE
+.LP
+Fields and characters within fields shall be numbered starting with
+1. The \fIfield_number\fP and \fIfirst_character\fP
+pieces, interpreted as positive decimal integers, shall specify the
+first character to be used as part of a sort key. If
+\fI\&.first_character\fP is omitted, it shall refer to the first character
+of the field.
+.LP
+The \fIfield_end\fP portion of the \fIkeydef\fP option-argument shall
+have the form:
+.sp
+.RS
+.nf
+
+\fIfield_number\fP\fB[\fP\fB.\fP\fIlast_character\fP\fB]\fP
+.fi
+.RE
+.LP
+The \fIfield_number\fP shall be as described above for \fIfield_start.\fP
+The \fIlast_character\fP piece, interpreted as a
+non-negative decimal integer, shall specify the last character to
+be used as part of the sort key. If \fIlast_character\fP
+evaluates to zero or \fI.last_character\fP is omitted, it shall refer
+to the last character of the field specified by
+\fIfield_number\fP.
+.LP
+If the \fB-b\fP option or \fBb\fP type modifier is in effect, characters
+within a field shall be counted from the first non-
+<blank> in the field. (This shall apply separately to \fIfirst_character\fP
+and \fIlast_character\fP.)
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+All input files were output successfully, or \fB-c\fP was specified
+and the input file was correctly sorted.
+.TP 7
+\ 1
+Under the \fB-c\fP option, the file was not ordered as specified,
+or if the \fB-c\fP and \fB-u\fP options were both
+specified, two input lines were found with equal keys.
+.TP 7
+>1
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The default value for \fB-t\fP, <blank>, has different properties
+from, for example, \fB-t\fP "<space>". If a line
+contains:
+.sp
+.RS
+.nf
+
+\fB<space><space>foo
+\fP
+.fi
+.RE
+.LP
+the following treatment would occur with default separation as opposed
+to specifically selecting a <space>:
+.TS C
+center; l l l.
+\fBField\fP \fBDefault\fP \fB-t "<space>"\fP
+1 <space><space>foo \fIempty\fP
+2 \fIempty\fP \fIempty\fP
+3 \fIempty\fP foo
+.TE
+.LP
+The leading field separator itself is included in a field when \fB-t\fP
+is not used. For example, this command returns an exit
+status of zero, meaning the input was already sorted:
+.sp
+.RS
+.nf
+
+\fBsort -c -k 2 <<eof
+y<tab>b
+x<space>a
+eof
+\fP
+.fi
+.RE
+.LP
+(assuming that a <tab> precedes the <space> in the current collating
+sequence). The field separator is not included
+in a field when it is explicitly set via \fB-t\fP. This is historical
+practice and allows usage such as:
+.sp
+.RS
+.nf
+
+\fBsort -t "|" -k 2n <<eof
+Atlanta|425022|Georgia
+Birmingham|284413|Alabama
+Columbia|100385|South Carolina
+eof
+\fP
+.fi
+.RE
+.LP
+where the second field can be correctly sorted numerically without
+regard to the non-numeric field separator.
+.LP
+The wording in the OPTIONS section clarifies that the \fB-b\fP, \fB-d\fP,
+\fB-f\fP, \fB-i\fP, \fB-n\fP, and \fB-r\fP
+options have to come before the first sort key specified if they are
+intended to apply to all specified keys. The way it is
+described in this volume of IEEE\ Std\ 1003.1-2001 matches historical
+practice, not historical documentation. The results
+are unspecified if these options are specified after a \fB-k\fP option.
+.LP
+The \fB-f\fP option might not work as expected in locales where there
+is not a one-to-one mapping between an uppercase and a
+lowercase letter.
+.SH EXAMPLES
+.IP " 1." 4
+The following command sorts the contents of \fBinfile\fP with the
+second field as the sort key:
+.sp
+.RS
+.nf
+
+\fBsort -k 2,2 infile
+\fP
+.fi
+.RE
+.LP
+.IP " 2." 4
+The following command sorts, in reverse order, the contents of \fBinfile1\fP
+and \fBinfile2\fP, placing the output in
+\fBoutfile\fP and using the second character of the second field as
+the sort key (assuming that the first character of the second
+field is the field separator):
+.sp
+.RS
+.nf
+
+\fBsort -r -o outfile -k 2.2,2.2 infile1 infile2
+\fP
+.fi
+.RE
+.LP
+.IP " 3." 4
+The following command sorts the contents of \fBinfile1\fP and \fBinfile2\fP
+using the second non- <blank> of the second
+field as the sort key:
+.sp
+.RS
+.nf
+
+\fBsort -k 2.2b,2.2b infile1 infile2
+\fP
+.fi
+.RE
+.LP
+.IP " 4." 4
+The following command prints the System\ V password file (user database)
+sorted by the numeric user ID (the third
+colon-separated field):
+.sp
+.RS
+.nf
+
+\fBsort -t : -k 3,3n /etc/passwd
+\fP
+.fi
+.RE
+.LP
+.IP " 5." 4
+The following command prints the lines of the already sorted file
+\fBinfile\fP, suppressing all but one occurrence of lines
+having the same third field:
+.sp
+.RS
+.nf
+
+\fBsort -um -k 3.1,3.0 infile
+\fP
+.fi
+.RE
+.LP
+.SH RATIONALE
+.LP
+Examples in some historical documentation state that options \fB-um\fP
+with one input file keep the first in each set of lines
+with equal keys. This behavior was deemed to be an implementation
+artifact and was not standardized.
+.LP
+The \fB-z\fP option was omitted; it is not standard practice on most
+systems and is inconsistent with using \fIsort\fP to sort
+several files individually and then merge them together. The text
+concerning \fB-z\fP in historical documentation appeared to
+require implementations to determine the proper buffer length during
+the sort phase of operation, but not during the merge.
+.LP
+The \fB-y\fP option was omitted because of non-portability. The \fB-M\fP
+option, present in System V, was omitted because of
+non-portability in international usage.
+.LP
+An undocumented \fB-T\fP option exists in some implementations. It
+is used to specify a directory for intermediate files.
+Implementations are encouraged to support the use of the \fITMPDIR\fP
+environment variable instead of adding an option to support
+this functionality.
+.LP
+The \fB-k\fP option was added to satisfy two objections. First, the
+zero-based counting used by \fIsort\fP is not consistent
+with other utility conventions. Second, it did not meet syntax guideline
+requirements.
+.LP
+Historical documentation indicates that "setting \fB-n\fP implies
+\fB-b\fP". The description of \fB-n\fP already states
+that optional leading <blank>s are tolerated in doing the comparison.
+If \fB-b\fP is enabled, rather than implied, by
+\fB-n\fP, this has unusual side effects. When a character offset is
+used in a column of numbers (for example, to sort modulo 100),
+that offset is measured relative to the most significant digit, not
+to the column. Based upon a recommendation from the author of
+the original \fIsort\fP utility, the \fB-b\fP implication has been
+omitted from this volume of IEEE\ Std\ 1003.1-2001,
+and an application wishing to achieve the previously mentioned side
+effects has to code the \fB-b\fP flag explicitly.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcomm\fP, \fIjoin\fP, \fIuniq\fP, the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001, \fItoupper\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/split.1p b/man-pages-posix-2003/man1p/split.1p
new file mode 100644
index 0000000..e3fabac
--- /dev/null
+++ b/man-pages-posix-2003/man1p/split.1p
@@ -0,0 +1,263 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SPLIT" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" split
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+split \- split files into pieces
+.SH SYNOPSIS
+.LP
+\fBsplit\fP \fB[\fP\fB-l\fP \fIline_count\fP\fB][\fP\fB-a\fP
+\fIsuffix_length\fP\fB][\fP\fIfile\fP\fB[\fP\fIname\fP\fB]]\fP\fB
+.br
+.sp
+split -b\fP \fIn\fP\fB[\fP\fBk|m\fP\fB][\fP\fB-a\fP
+\fIsuffix_length\fP\fB][\fP\fIfile\fP\fB[\fP\fIname\fP\fB]]\fP\fB\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsplit\fP utility shall read an input file and write one or
+more output files. The default size of each output file shall
+be 1000 lines. The size of the output files can be modified by specification
+of the \fB-b\fP or \fB-l\fP options. Each output
+file shall be created with a unique suffix. The suffix shall consist
+of exactly \fIsuffix_length\fP lowercase letters from the
+POSIX locale. The letters of the suffix shall be used as if they were
+a base-26 digit system, with the first suffix to be created
+consisting of all \fB'a'\fP characters, the second with a \fB'b'\fP
+replacing the last \fB'a'\fP, and so on, until a name
+of all \fB'z'\fP characters is created. By default, the names of the
+output files shall be \fB'x'\fP, followed by a
+two-character suffix from the character set as described above, starting
+with \fB"aa"\fP, \fB"ab"\fP, \fB"ac"\fP, and
+so on, and continuing until the suffix \fB"zz"\fP, for a maximum
+of 676 files.
+.LP
+If the number of files required exceeds the maximum allowed by the
+suffix length provided, such that the last allowable file
+would be larger than the requested size, the \fIsplit\fP utility shall
+fail after creating the last file with a valid suffix;
+\fIsplit\fP shall not delete the files it created with valid suffixes.
+If the file limit is not exceeded, the last file created
+shall contain the remainder of the input file, and may be smaller
+than the requested size.
+.SH OPTIONS
+.LP
+The \fIsplit\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-a\ \fP \fIsuffix_length\fP
+.sp
+Use \fIsuffix_length\fP letters to form the suffix portion of the
+filenames of the split file. If \fB-a\fP is not specified, the
+default suffix length shall be two. If the sum of the \fIname\fP operand
+and the \fIsuffix_length\fP option-argument would create
+a filename exceeding {NAME_MAX} bytes, an error shall result; \fIsplit\fP
+shall exit with a diagnostic message and no files shall
+be created.
+.TP 7
+\fB-b\ \fP \fIn\fP
+Split a file into pieces \fIn\fP bytes in size.
+.TP 7
+\fB-b\ \fP \fIn\fP\fBk\fP
+Split a file into pieces \fIn\fP*1024 bytes in size.
+.TP 7
+\fB-b\ \fP \fIn\fP\fBm\fP
+Split a file into pieces \fIn\fP*1048576 bytes in size.
+.TP 7
+\fB-l\ \fP \fIline_count\fP
+Specify the number of lines in each resulting file piece. The \fIline_count\fP
+argument is an unsigned decimal integer. The
+default is 1000. If the input does not end with a <newline>, the partial
+line shall be included in the last output file.
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIfile\fP
+The pathname of the ordinary file to be split. If no input file is
+given or \fIfile\fP is \fB'-'\fP, the standard input
+shall be used.
+.TP 7
+\fIname\fP
+The prefix to be used for each of the files resulting from the split
+operation. If no \fIname\fP argument is given,
+\fB'x'\fP shall be used as the prefix of the output files. The combined
+length of the basename of \fIprefix\fP and
+\fIsuffix_length\fP cannot exceed {NAME_MAX} bytes. See the OPTIONS
+section.
+.sp
+.SH STDIN
+.LP
+See the INPUT FILES section.
+.SH INPUT FILES
+.LP
+Any file can be used as input.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIsplit\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+The output files contain portions of the original input file; otherwise,
+unchanged.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+In the following examples \fBfoo\fP is a text file that contains 5000
+lines.
+.IP " 1." 4
+Create five files, \fBxaa\fP, \fBxab\fP, \fBxac\fP, \fBxad\fP, and
+\fBxae\fP:
+.sp
+.RS
+.nf
+
+\fBsplit foo
+\fP
+.fi
+.RE
+.LP
+.IP " 2." 4
+Create five files, but the suffixed portion of the created files consists
+of three letters, \fBxaaa\fP, \fBxaab\fP,
+\fBxaac\fP, \fBxaad\fP, and \fBxaae\fP:
+.sp
+.RS
+.nf
+
+\fBsplit -a 3 foo
+\fP
+.fi
+.RE
+.LP
+.IP " 3." 4
+Create three files with four-letter suffixes and a supplied prefix,
+\fBbar_aaaa\fP, \fBbar_aaab\fP, and \fBbar_aaac\fP:
+.sp
+.RS
+.nf
+
+\fBsplit -a 4 -l 2000 foo bar_
+\fP
+.fi
+.RE
+.LP
+.IP " 4." 4
+Create as many files as are necessary to contain at most 20*1024 bytes,
+each with the default prefix of \fBx\fP and a
+five-letter suffix:
+.sp
+.RS
+.nf
+
+\fBsplit -a 5 -b 20k foo
+\fP
+.fi
+.RE
+.LP
+.SH RATIONALE
+.LP
+The \fB-b\fP option was added to provide a mechanism for splitting
+files other than by lines. While most uses of the \fB-b\fP
+option are for transmitting files over networks, some believed it
+would have additional uses.
+.LP
+The \fB-a\fP option was added to overcome the limitation of being
+able to create only 676 files.
+.LP
+Consideration was given to deleting this utility, using the rationale
+that the functionality provided by this utility is
+available via the \fIcsplit\fP utility (see \fIcsplit\fP ). Upon
+reconsideration of the purpose of the User Portability Extension,
+it was decided to retain both this utility and the \fIcsplit\fP utility
+because users use both utilities and have historical expectations
+of their
+behavior. Furthermore, the splitting on byte boundaries in \fIsplit\fP
+cannot be duplicated with the historical \fIcsplit\fP.
+.LP
+The text " \fIsplit\fP shall not delete the files it created with
+valid suffixes" would normally be assumed, but since the
+related utility, \fIcsplit\fP, does delete files under some circumstances,
+the historical
+behavior of \fIsplit\fP is made explicit to avoid misinterpretation.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcsplit\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/strings.1p b/man-pages-posix-2003/man1p/strings.1p
new file mode 100644
index 0000000..54f987e
--- /dev/null
+++ b/man-pages-posix-2003/man1p/strings.1p
@@ -0,0 +1,227 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "STRINGS" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" strings
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+strings \- find printable strings in files
+.SH SYNOPSIS
+.LP
+\fBstrings\fP \fB[\fP\fB-a\fP\fB][\fP\fB-t\fP \fIformat\fP\fB][\fP\fB-n\fP
+\fInumber\fP\fB][\fP\fIfile\fP\fB...\fP\fB]\fP\fB\fP
+.SH DESCRIPTION
+.LP
+The \fIstrings\fP utility shall look for printable strings in regular
+files and shall write those strings to standard output. A
+printable string is any sequence of four (by default) or more printable
+characters terminated by a <newline> or NUL
+character. Additional implementation-defined strings may be written;
+see \fIlocaledef\fP.
+.SH OPTIONS
+.LP
+The \fIstrings\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-a\fP
+Scan files in their entirety. If \fB-a\fP is not specified, it is
+implementation-defined what portion of each file is scanned
+for strings.
+.TP 7
+\fB-n\ \fP \fInumber\fP
+Specify the minimum string length, where the \fInumber\fP argument
+is a positive decimal integer. The default shall be 4.
+.TP 7
+\fB-t\ \fP \fIformat\fP
+Write each string preceded by its byte offset from the start of the
+file. The format shall be dependent on the single character
+used as the \fIformat\fP option-argument:
+.TP 7
+\fBd\fP
+.RS
+The offset shall be written in decimal.
+.RE
+.TP 7
+\fBo\fP
+.RS
+The offset shall be written in octal.
+.RE
+.TP 7
+\fBx\fP
+.RS
+The offset shall be written in hexadecimal.
+.RE
+.sp
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of a regular file to be used as input. If no \fIfile\fP
+operand is specified, the \fIstrings\fP utility shall read
+from the standard input.
+.sp
+.SH STDIN
+.LP
+See the INPUT FILES section.
+.SH INPUT FILES
+.LP
+The input files named by the utility arguments or the standard input
+shall be regular files of any format.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIstrings\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files) and
+to identify printable strings.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Strings found shall be written to the standard output, one per line.
+.LP
+When the \fB-t\fP option is not specified, the format of the output
+shall be:
+.sp
+.RS
+.nf
+
+\fB"%s", <\fP\fIstring\fP\fB>
+\fP
+.fi
+.RE
+.LP
+With the \fB-t\ o\fP option, the format of the output shall be:
+.sp
+.RS
+.nf
+
+\fB"%o %s", <\fP\fIbyte offset\fP\fB>, <\fP\fIstring\fP\fB>
+\fP
+.fi
+.RE
+.LP
+With the \fB-t\ x\fP option, the format of the output shall be:
+.sp
+.RS
+.nf
+
+\fB"%x %s", <\fP\fIbyte offset\fP\fB>, <\fP\fIstring\fP\fB>
+\fP
+.fi
+.RE
+.LP
+With the \fB-t\ d\fP option, the format of the output shall be:
+.sp
+.RS
+.nf
+
+\fB"%d %s", <\fP\fIbyte offset\fP\fB>, <\fP\fIstring\fP\fB>
+\fP
+.fi
+.RE
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+By default the data area (as opposed to the text, "bss", or header
+areas) of a binary executable file is scanned.
+Implementations document which areas are scanned.
+.LP
+Some historical implementations do not require NUL or <newline> terminators
+for strings to permit those languages that do
+not use NUL as a string terminator to have their strings written.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+Apart from rationalizing the option syntax and slight difficulties
+with object and executable binary files, \fIstrings\fP is
+specified to match historical practice closely. The \fB-a\fP and \fB-n\fP
+options were introduced to replace the non-conforming
+\fB-\fP and \fB-\fP \fInumber\fP options.
+.LP
+The \fB-o\fP option historically means different things on different
+implementations. Some use it to mean " \fIoffset\fP in
+decimal", while others use it as " \fIoffset\fP in octal". Instead
+of trying to decide which way would be least objectionable,
+the \fB-t\fP option was added. It was originally named \fB-O\fP to
+mean "offset", but was changed to \fB-t\fP to be consistent
+with \fIod\fP.
+.LP
+The ISO\ C standard function \fIisprint\fP() is restricted to a domain
+of
+\fBunsigned char\fP. This volume of IEEE\ Std\ 1003.1-2001 requires
+implementations to write strings as defined by the
+current locale.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIlocaledef\fP, \fInm\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/strip.1p b/man-pages-posix-2003/man1p/strip.1p
new file mode 100644
index 0000000..5aeadaf
--- /dev/null
+++ b/man-pages-posix-2003/man1p/strip.1p
@@ -0,0 +1,133 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "STRIP" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" strip
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+strip \- remove unnecessary information from executable files (\fBDEVELOPMENT\fP)
+.SH SYNOPSIS
+.LP
+\fBstrip\fP \fIfile\fP\fB... \fP
+.SH DESCRIPTION
+.LP
+The \fIstrip\fP utility shall remove from executable files named by
+the \fIfile\fP operands any information the implementor
+deems unnecessary for execution of those files. The nature of that
+information is unspecified. The effect of \fIstrip\fP shall be
+similar to the use of the \fB-s\fP option to \fIc99\fP or \fIfort77\fP.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname referring to an executable file.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+The input files shall be in the form of executable files successfully
+produced by any compiler defined by this volume of
+IEEE\ Std\ 1003.1-2001.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIstrip\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+The \fIstrip\fP utility shall produce executable files of unspecified
+format.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+Historically, this utility has been used to remove the symbol table
+from an executable file. It was included since it is known
+that the amount of symbolic information can amount to several megabytes;
+the ability to remove it in a portable manner was deemed
+important, especially for smaller systems.
+.LP
+The behavior of \fIstrip\fP is said to be the same as the \fB-s\fP
+option to a compiler. While the end result is essentially
+the same, it is not required to be identical.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIar\fP, \fIc99\fP, \fIfort77\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/stty.1p b/man-pages-posix-2003/man1p/stty.1p
new file mode 100644
index 0000000..64affc9
--- /dev/null
+++ b/man-pages-posix-2003/man1p/stty.1p
@@ -0,0 +1,702 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "STTY" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" stty
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+stty \- set the options for a terminal
+.SH SYNOPSIS
+.LP
+\fBstty\fP \fB[\fP \fB-a| -g\fP\fB]\fP\fB
+.br
+.sp
+stty\fP \fIoperands\fP\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIstty\fP utility shall set or report on terminal I/O characteristics
+for the device that is its standard input. Without
+options or operands specified, it shall report the settings of certain
+characteristics, usually those that differ from
+implementation-defined defaults. Otherwise, it shall modify the terminal
+state according to the specified operands. Detailed
+information about the modes listed in the first five groups below
+are described in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface. Operands
+in the Combination Modes group (see Combination Modes ) are implemented
+using operands in the
+previous groups. Some combinations of operands are mutually-exclusive
+on some terminal types; the results of using such
+combinations are unspecified.
+.LP
+Typical implementations of this utility require a communications line
+configured to use the \fBtermios\fP interface defined in
+the System Interfaces volume of IEEE\ Std\ 1003.1-2001. On systems
+where none of these lines are available, and on lines
+not currently configured to support the \fBtermios\fP interface, some
+of the operands need not affect terminal
+characteristics.
+.SH OPTIONS
+.LP
+The \fIstty\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-a\fP
+Write to standard output all the current settings for the terminal.
+.TP 7
+\fB-g\fP
+Write to standard output all the current settings in an unspecified
+form that can be used as arguments to another invocation of
+the \fIstty\fP utility on the same system. The form used shall not
+contain any characters that would require quoting to avoid word
+expansion by the shell; see \fIWord Expansions\fP .
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported to set the terminal characteristics.
+.SS Control Modes
+.TP 7
+\fBparenb\ \fP (\fB-parenb\fP)
+Enable (disable) parity generation and detection. This shall have
+the effect of setting (not setting) PARENB in the
+\fBtermios\fP \fIc_cflag\fP field, as defined in the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface.
+.TP 7
+\fBparodd\ \fP (\fB-parodd\fP)
+.sp
+Select odd (even) parity. This shall have the effect of setting (not
+setting) PARODD in the \fBtermios\fP \fIc_cflag\fP field, as
+defined in the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 11,
+General Terminal Interface.
+.TP 7
+\fBcs5\ cs6\ cs7\ cs8\fP
+Select character size, if possible. This shall have the effect of
+setting CS5, CS6, CS7, and CS8, respectively, in the
+\fBtermios\fP \fIc_cflag\fP field, as defined in the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface.
+.TP 7
+\fInumber\fP
+Set terminal baud rate to the number given, if possible. If the baud
+rate is set to zero, the modem control lines shall no
+longer be asserted. This shall have the effect of setting the input
+and output \fBtermios\fP baud rate values as defined in the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 11, General
+Terminal Interface.
+.TP 7
+\fBispeed\ \fP \fInumber\fP
+Set terminal input baud rate to the number given, if possible. If
+the input baud rate is set to zero, the input baud rate shall
+be specified by the value of the output baud rate. This shall have
+the effect of setting the input \fBtermios\fP baud rate values
+as defined in the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter
+11, General Terminal Interface.
+.TP 7
+\fBospeed\ \fP \fInumber\fP
+Set terminal output baud rate to the number given, if possible. If
+the output baud rate is set to zero, the modem control lines
+shall no longer be asserted. This shall have the effect of setting
+the output \fBtermios\fP baud rate values as defined in the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 11, General
+Terminal Interface.
+.TP 7
+\fBhupcl\ \fP (\fB-hupcl\fP)
+Stop asserting modem control lines (do not stop asserting modem control
+lines) on last close. This shall have the effect of
+setting (not setting) HUPCL in the \fBtermios\fP \fIc_cflag\fP field,
+as defined in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface.
+.TP 7
+\fBhup\ \fP (\fB-hup\fP)
+Equivalent to \fBhupcl\fP( \fB-hupcl\fP).
+.TP 7
+\fBcstopb\ \fP (\fB-cstopb\fP)
+Use two (one) stop bits per character. This shall have the effect
+of setting (not setting) CSTOPB in the \fBtermios\fP
+\fIc_cflag\fP field, as defined in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface.
+.TP 7
+\fBcread\ \fP (\fB-cread\fP)
+Enable (disable) the receiver. This shall have the effect of setting
+(not setting) CREAD in the \fBtermios\fP \fIc_cflag\fP
+field, as defined in the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 11, General Terminal Interface.
+.TP 7
+\fBclocal\ \fP (\fB-clocal\fP)
+Assume a line without (with) modem control. This shall have the effect
+of setting (not setting) CLOCAL in the \fBtermios\fP
+\fIc_cflag\fP field, as defined in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface.
+.sp
+.LP
+It is unspecified whether \fIstty\fP shall report an error if an attempt
+to set a Control Mode fails.
+.SS Input Modes
+.TP 7
+\fBignbrk\ \fP (\fB-ignbrk\fP)
+Ignore (do not ignore) break on input. This shall have the effect
+of setting (not setting) IGNBRK in the \fBtermios\fP
+\fIc_iflag\fP field, as defined in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface.
+.TP 7
+\fBbrkint\ \fP (\fB-brkint\fP)
+Signal (do not signal) INTR on break. This shall have the effect of
+setting (not setting) BRKINT in the \fBtermios\fP
+\fIc_iflag\fP field, as defined in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface.
+.TP 7
+\fBignpar\ \fP (\fB-ignpar\fP)
+Ignore (do not ignore) bytes with parity errors. This shall have the
+effect of setting (not setting) IGNPAR in the
+\fBtermios\fP \fIc_iflag\fP field, as defined in the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface.
+.TP 7
+\fBparmrk\ \fP (\fB-parmrk\fP)
+.sp
+Mark (do not mark) parity errors. This shall have the effect of setting
+(not setting) PARMRK in the \fBtermios\fP \fIc_iflag\fP
+field, as defined in the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 11, General Terminal Interface.
+.TP 7
+\fBinpck\ \fP (\fB-inpck\fP)
+Enable (disable) input parity checking. This shall have the effect
+of setting (not setting) INPCK in the \fBtermios\fP
+\fIc_iflag\fP field, as defined in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface.
+.TP 7
+\fBistrip\ \fP (\fB-istrip\fP)
+Strip (do not strip) input characters to seven bits. This shall have
+the effect of setting (not setting) ISTRIP in the
+\fBtermios\fP \fIc_iflag\fP field, as defined in the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface.
+.TP 7
+\fBinlcr\ \fP (\fB-inlcr\fP)
+Map (do not map) NL to CR on input. This shall have the effect of
+setting (not setting) INLCR in the \fBtermios\fP
+\fIc_iflag\fP field, as defined in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface.
+.TP 7
+\fBigncr\ (-igncr)\fP
+Ignore (do not ignore) CR on input. This shall have the effect of
+setting (not setting) IGNCR in the \fBtermios\fP
+\fIc_iflag\fP field, as defined in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface.
+.TP 7
+\fBicrnl\ \fP (\fB-icrnl\fP)
+Map (do not map) CR to NL on input. This shall have the effect of
+setting (not setting) ICRNL in the \fBtermios\fP
+\fIc_iflag\fP field, as defined in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface.
+.TP 7
+\fBixon\ \fP (\fB-ixon\fP)
+Enable (disable) START/STOP output control. Output from the system
+is stopped when the system receives STOP and started when
+the system receives START. This shall have the effect of setting (not
+setting) IXON in the \fBtermios\fP \fIc_iflag\fP field, as
+defined in the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 11,
+General Terminal Interface.
+.TP 7
+\fBixany\ \fP (\fB-ixany\fP)
+Allow any character to restart output. This shall have the effect
+of setting (not setting) IXANY in the \fBtermios\fP
+\fIc_iflag\fP field, as defined in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface.
+.TP 7
+\fBixoff\ \fP (\fB-ixoff\fP)
+Request that the system send (not send) STOP characters when the input
+queue is nearly full and START characters to resume data
+transmission. This shall have the effect of setting (not setting)
+IXOFF in the \fBtermios\fP \fIc_iflag\fP field, as defined in
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 11,
+General
+Terminal Interface.
+.sp
+.SS Output Modes
+.TP 7
+\fBopost\ \fP (\fB-opost\fP)
+Post-process output (do not post-process output; ignore all other
+output modes). This shall have the effect of setting (not
+setting) OPOST in the \fBtermios\fP \fIc_oflag\fP field, as defined
+in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface.
+.TP 7
+\fBocrnl\ \fP (\fB-ocrnl\fP)
+Map (do not map) CR to NL on output This shall have the effect of
+setting (not setting) OCRNL in the \fBtermios\fP \fIc_oflag\fP
+field, as defined in the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 11, General Terminal Interface.
+.TP 7
+\fBonocr\ \fP (\fB-onocr\fP)
+Do not (do) output CR at column zero. This shall have the effect of
+setting (not setting) ONOCR in the \fBtermios\fP
+\fIc_oflag\fP field, as defined in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface.
+.TP 7
+\fBonlret\ \fP (\fB-onlret\fP)
+The terminal newline key performs (does not perform) the CR function.
+This shall have the effect of setting (not setting)
+ONLRET in the \fBtermios\fP \fIc_oflag\fP field, as defined in the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 11, General
+Terminal Interface.
+.TP 7
+\fBofill\ \fP (\fB-ofill\fP)
+Use fill characters (use timing) for delays. This shall have the effect
+of setting (not setting) OFILL in the \fBtermios\fP
+\fIc_oflag\fP field, as defined in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface.
+.TP 7
+\fBofdel\ \fP (\fB-ofdel\fP)
+Fill characters are DELs (NULs). This shall have the effect of setting
+(not setting) OFDEL in the \fBtermios\fP \fIc_oflag\fP
+field, as defined in the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 11, General Terminal Interface.
+.TP 7
+\fBcr0\ cr1\ cr2\ cr3\fP
+Select the style of delay for CRs. This shall have the effect of setting
+CRDLY to CR0, CR1, CR2, or CR3, respectively, in the
+\fBtermios\fP \fIc_oflag\fP field, as defined in the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface.
+.TP 7
+\fBnl0\ nl1\fP
+Select the style of delay for NL. This shall have the effect of setting
+NLDLY to NL0 or NL1, respectively, in the
+\fBtermios\fP \fIc_oflag\fP field, as defined in the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface.
+.TP 7
+\fBtab0\ tab1\ tab2\ tab3\fP
+.sp
+Select the style of delay for horizontal tabs. This shall have the
+effect of setting TABDLY to TAB0, TAB1, TAB2, or TAB3,
+respectively, in the \fBtermios\fP \fIc_oflag\fP field, as defined
+in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface. Note
+that
+TAB3 has the effect of expanding <tab>s to <space>s.
+.TP 7
+\fBtabs\ \fP (\fB-tabs\fP)
+Synonym for \fBtab0\fP ( \fBtab3\fP).
+.TP 7
+\fBbs0\ bs1\fP
+Select the style of delay for backspaces. This shall have the effect
+of setting BSDLY to BS0 or BS1, respectively, in the
+\fBtermios\fP \fIc_oflag\fP field, as defined in the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface.
+.TP 7
+\fBff0\ ff1\fP
+Select the style of delay for form-feeds. This shall have the effect
+of setting FFDLY to FF0 or FF1, respectively, in the
+\fBtermios\fP \fIc_oflag\fP field, as defined in the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface.
+.TP 7
+\fBvt0\ vt1\fP
+Select the style of delay for vertical-tabs. This shall have the effect
+of setting VTDLY to VT0 or VT1, respectively, in the
+\fBtermios\fP \fIc_oflag\fP field, as defined in the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface.
+.sp
+.SS Local Modes
+.TP 7
+\fBisig\ \fP (\fB-isig\fP)
+Enable (disable) the checking of characters against the special control
+characters INTR, QUIT, and SUSP. This shall have the
+effect of setting (not setting) ISIG in the \fBtermios\fP \fIc_lflag\fP
+field, as defined in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface.
+.TP 7
+\fBicanon\ \fP (\fB-icanon\fP)
+Enable (disable) canonical input (ERASE and KILL processing). This
+shall have the effect of setting (not setting) ICANON in the
+\fBtermios\fP \fIc_lflag\fP field, as defined in the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface.
+.TP 7
+\fBiexten\ \fP (\fB-iexten\fP)
+Enable (disable) any implementation-defined special control characters
+not currently controlled by \fBicanon\fP, \fBisig\fP,
+\fBixon\fP, or \fBixoff\fP. This shall have the effect of setting
+(not setting) IEXTEN in the \fBtermios\fP \fIc_lflag\fP
+field, as defined in the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 11, General Terminal Interface.
+.TP 7
+\fBecho\ \fP (\fB-echo\fP)
+Echo back (do not echo back) every character typed. This shall have
+the effect of setting (not setting) ECHO in the
+\fBtermios\fP \fIc_lflag\fP field, as defined in the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface.
+.TP 7
+\fBechoe\ \fP (\fB-echoe\fP)
+The ERASE character visually erases (does not erase) the last character
+in the current line from the display, if possible. This
+shall have the effect of setting (not setting) ECHOE in the \fBtermios\fP
+\fIc_lflag\fP field, as defined in the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal
+Interface.
+.TP 7
+\fBechok\ \fP (\fB-echok\fP)
+Echo (do not echo) NL after KILL character. This shall have the effect
+of setting (not setting) ECHOK in the \fBtermios\fP
+\fIc_lflag\fP field, as defined in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface.
+.TP 7
+\fBechonl\ \fP (\fB-echonl\fP)
+Echo (do not echo) NL, even if \fBecho\fP is disabled. This shall
+have the effect of setting (not setting) ECHONL in the
+\fBtermios\fP \fIc_lflag\fP field, as defined in the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface.
+.TP 7
+\fBnoflsh\ \fP (\fB-noflsh\fP)
+Disable (enable) flush after INTR, QUIT, SUSP. This shall have the
+effect of setting (not setting) NOFLSH in the \fBtermios\fP
+\fIc_lflag\fP field, as defined in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface.
+.TP 7
+\fBtostop\ \fP (\fB-tostop\fP)
+Send SIGTTOU for background output. This shall have the effect of
+setting (not setting) TOSTOP in the \fBtermios\fP
+\fIc_lflag\fP field, as defined in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface.
+.sp
+.SS Special Control Character Assignments
+.TP 7
+<\fIcontrol\fP>-\fIcharacter\ string\fP
+.sp
+Set <\fIcontrol\fP>-\fIcharacter\fP to \fIstring\fP. If <\fIcontrol\fP>-\fIcharacter\fP
+is one of the character
+sequences in the first column of the following table, the corresponding
+Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 11, General Terminal Interface control character from the
+second column
+shall be recognized. This has the effect of setting the corresponding
+element of the \fBtermios\fP \fIc_cc\fP array (see the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 13, Headers,
+\fI<termios.h>\fP).
+.br
+.sp
+.ce 1
+\fBTable: Control Character Names in \fIstty\fP\fP
+.TS C
+center; l2 l2 l.
+\fBControl Character\fP \fBc_cc Subscript\fP \fBDescription\fP
+\fBeof\fP VEOF EOF character
+\fBeol\fP VEOL EOL character
+\fBerase\fP VERASE ERASE character
+\fBintr\fP VINTR INTR character
+\fBkill\fP VKILL KILL character
+\fBquit\fP VQUIT QUIT character
+\fBsusp\fP VSUSP SUSP character
+\fBstart\fP VSTART START character
+\fBstop\fP VSTOP STOP character
+.TE
+.LP
+If \fIstring\fP is a single character, the control character shall
+be set to that character. If \fIstring\fP is the
+two-character sequence \fB"^-"\fP or the string \fIundef\fP, the control
+character shall be set to _POSIX_VDISABLE, if it is
+in effect for the device; if _POSIX_VDISABLE is not in effect for
+the device, it shall be treated as an error. In the POSIX locale,
+if \fIstring\fP is a two-character sequence beginning with circumflex
+( \fB'^'\fP ), and the second character is one of those
+listed in the \fB"^c"\fP column of the following table, the control
+character shall be set to the corresponding character value
+in the Value column of the table.
+.sp
+.ce 1
+\fBTable: Circumflex Control Characters in \fIstty\fP\fP
+.TS C
+center; l l l l l l.
+\fB^c\fP \fBValue\fP \fB^c\fP \fBValue\fP \fB^c\fP \fBValue\fP
+a, A <SOH> l, L <FF> w, W <ETB>
+b, B <STX> m, M <CR> x, X <CAN>
+c, C <ETX> n, N <SO> y, Y <EM>
+d, D <EOT> o, O <SI> z, Z <SUB>
+e, E <ENQ> p, P <DLE> [ <ESC>
+f, F <ACK> q, Q <DC1> \\ <FS>
+g, G <BEL> r, R <DC2> ] <GS>
+h, H <BS> s, S <DC3> ^ <RS>
+i, I <HT> t, T <DC4> _ <US>
+j, J <LF> u, U <NAK> ? <DEL>
+k, K <VT> v, V <SYN>
+.TE
+.TP 7
+\fBmin\ \fP \fInumber\fP
+.sp
+Set the value of MIN to \fInumber\fP. MIN is used in non-canonical
+mode input processing ( \fBicanon\fP).
+.TP 7
+\fBtime\ \fP \fInumber\fP
+.sp
+Set the value of TIME to \fInumber\fP. TIME is used in non-canonical
+mode input processing ( \fBicanon\fP).
+.sp
+.SS Combination Modes
+.TP 7
+\fIsaved\ settings\fP
+.sp
+Set the current terminal characteristics to the saved settings produced
+by the \fB-g\fP option.
+.TP 7
+\fBevenp\fP\ or\ \fBparity\fP
+.sp
+Enable \fBparenb\fP and \fBcs7\fP; disable \fBparodd\fP.
+.TP 7
+\fBoddp\fP
+.sp
+Enable \fBparenb\fP, \fBcs7\fP, and \fBparodd\fP.
+.TP 7
+\fB-parity\fP, \fB-evenp\fP, or \fB-oddp\fP
+.sp
+Disable \fBparenb\fP, and set \fBcs8\fP.
+.TP 7
+\fBraw\ \fP (\fB-raw\fP\ or\ \fBcooked\fP)
+.sp
+Enable (disable) raw input and output. Raw mode shall be equivalent
+to setting:
+.sp
+.RS
+.nf
+
+\fBstty cs8 erase ^- kill ^- intr ^- \\
+ quit ^- eof ^- eol ^- -post -inpck
+\fP
+.fi
+.RE
+.TP 7
+\fBnl\ \fP (\fB-nl\fP)
+.sp
+Disable (enable) \fBicrnl\fP. In addition, \fB-nl\fP unsets \fBinlcr\fP
+and \fBigncr\fP.
+.TP 7
+\fBek\fP
+Reset ERASE and KILL characters back to system defaults.
+.TP 7
+\fBsane\fP
+.sp
+Reset all modes to some reasonable, unspecified, values.
+.sp
+.SH STDIN
+.LP
+Although no input is read from standard input, standard input shall
+be used to get the current terminal I/O characteristics and
+to set new terminal I/O characteristics.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIstty\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+This variable determines the locale for the interpretation of sequences
+of bytes of text data as characters (for example,
+single-byte as opposed to multi-byte characters in arguments) and
+which characters are in the class \fBprint\fP.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+If operands are specified, no output shall be produced.
+.LP
+If the \fB-g\fP option is specified, \fIstty\fP shall write to standard
+output the current settings in a form that can be used
+as arguments to another instance of \fIstty\fP on the same system.
+.LP
+If the \fB-a\fP option is specified, all of the information as described
+in the OPERANDS section shall be written to standard
+output. Unless otherwise specified, this information shall be written
+as <space>-separated tokens in an unspecified format,
+on one or more lines, with an unspecified number of tokens per line.
+Additional information may be written.
+.LP
+If no options or operands are specified, an unspecified subset of
+the information written for the \fB-a\fP option shall be
+written.
+.LP
+If speed information is written as part of the default output, or
+if the \fB-a\fP option is specified and if the terminal input
+speed and output speed are the same, the speed information shall be
+written as follows:
+.sp
+.RS
+.nf
+
+\fB"speed %d baud;", <\fP\fIspeed\fP\fB>
+\fP
+.fi
+.RE
+.LP
+Otherwise, speeds shall be written as:
+.sp
+.RS
+.nf
+
+\fB"ispeed %d baud; ospeed %d baud;", <\fP\fIispeed\fP\fB>, <\fP\fIospeed\fP\fB>
+\fP
+.fi
+.RE
+.LP
+In locales other than the POSIX locale, the word \fBbaud\fP may be
+changed to something more appropriate in those locales.
+.LP
+If control characters are written as part of the default output, or
+if the \fB-a\fP option is specified, control characters
+shall be written as:
+.sp
+.RS
+.nf
+
+\fB"%s = %s;", <\fP\fIcontrol-character name\fP\fB>, <\fP\fIvalue\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where <\fIvalue\fP> is either the character, or some visual representation
+of the character if it is non-printable, or
+the string \fIundef\fP if the character is disabled.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+The terminal options were read or set successfully.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The \fB-g\fP flag is designed to facilitate the saving and restoring
+of terminal state from the shell level. For example, a
+program may:
+.sp
+.RS
+.nf
+
+\fBsaveterm="$(stty -g)" # save terminal state
+stty\fP \fI(new settings)\fP \fB # set new state
+\&... # ...
+stty $saveterm # restore terminal state
+\fP
+.fi
+.RE
+.LP
+Since the format is unspecified, the saved value is not portable across
+systems.
+.LP
+Since the \fB-a\fP format is so loosely specified, scripts that save
+and restore terminal settings should use the \fB-g\fP
+option.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The original \fIstty\fP description was taken directly from System
+V and reflected the System V terminal driver \fBtermio\fP.
+It has been modified to correspond to the terminal driver \fBtermios\fP.
+.LP
+Output modes are specified only for XSI-conformant systems. All implementations
+are expected to provide \fIstty\fP operands
+corresponding to all of the output modes they support.
+.LP
+The \fIstty\fP utility is primarily used to tailor the user interface
+of the terminal, such as selecting the preferred ERASE
+and KILL characters. As an application programming utility, \fIstty\fP
+can be used within shell scripts to alter the terminal
+settings for the duration of the script.
+.LP
+The \fBtermios\fP section states that individual disabling of control
+characters is possible through the option
+_POSIX_VDISABLE. If enabled, two conventions currently exist for specifying
+this: System V uses \fB"^-"\fP, and BSD uses
+\fIundef\fP. Both are accepted by \fIstty\fP in this volume of IEEE\ Std\ 1003.1-2001.
+The other BSD convention of using
+the letter \fB'u'\fP was rejected because it conflicts with the actual
+letter \fB'u'\fP, which is an acceptable value for a
+control character.
+.LP
+Early proposals did not specify the mapping of \fB"^c"\fP to control
+characters because the control characters were not
+specified in the POSIX locale character set description file requirements.
+The control character set is now specified in the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 3, Definitions
+so the
+historical mapping is specified. Note that although the mapping corresponds
+to control-character key assignments on many terminals
+that use the ISO/IEC\ 646:1991 standard (or ASCII) character encodings,
+the mapping specified here is to the control
+characters, not their keyboard encodings.
+.LP
+Since \fBtermios\fP supports separate speeds for input and output,
+two new options were added to specify each distinctly.
+.LP
+Some historical implementations use standard input to get and set
+terminal characteristics; others use standard output. Since
+input from a login TTY is usually restricted to the owner while output
+to a TTY is frequently open to anyone, using standard input
+provides fewer chances of accidentally (or maliciously) altering the
+terminal settings of other users. Using standard input also
+allows \fIstty\fP \fB-a\fP and \fIstty\fP \fB-g\fP output to be redirected
+for later use. Therefore, usage of standard input is
+required by this volume of IEEE\ Std\ 1003.1-2001.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIShell Command Language\fP, the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface, \fI<termios.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/tabs.1p b/man-pages-posix-2003/man1p/tabs.1p
new file mode 100644
index 0000000..6650deb
--- /dev/null
+++ b/man-pages-posix-2003/man1p/tabs.1p
@@ -0,0 +1,268 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TABS" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" tabs
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+tabs \- set terminal tabs
+.SH SYNOPSIS
+.LP
+\fBtabs\fP \fB[\fP \fB-\fP\fIn\fP\fB| -a| -a2| -c| -c2| -c3| -f| -p|
+-s|
+-u\fP\fB][\fP\fB+m\fP\fB[\fP\fIn\fP\fB]]\fP \fB\fP\fB[\fP\fB-T\fP
+\fItype\fP\fB]\fP\fB
+.br
+.sp
+tabs\fP \fB[\fP\fB-T\fP \fItype\fP\fB][\fP \fB+\fP\fB[\fP\fIn\fP\fB]]\fP
+\fIn1\fP\fB[\fP\fB,\fP\fIn2\fP\fB,...\fP\fB]\fP\fB\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fItabs\fP utility shall display a series of characters that first
+clears the hardware terminal tab settings and then
+initializes the tab stops at the specified positions and optionally
+adjusts the margin.
+.LP
+The phrase "tab-stop position \fIN\fP" shall be taken to mean that,
+from the start of a line of output, tabbing to position
+\fIN\fP shall cause the next character output to be in the ( \fIN\fP+1)th
+column position on that line. The maximum number of tab
+stops allowed is terminal-dependent.
+.LP
+It need not be possible to implement \fItabs\fP on certain terminals.
+If the terminal type obtained from the \fITERM\fP
+environment variable or \fB-T\fP option represents such a terminal,
+an appropriate diagnostic message shall be written to standard
+error and \fItabs\fP shall exit with a status greater than zero.
+.SH OPTIONS
+.LP
+The \fItabs\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines,
+\ except for
+various extensions: the options \fB-a2\fP, \fB-c2\fP, and \fB-c3\fP
+are multi-character.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-\fP\fIn\fP
+Specify repetitive tab stops separated by a uniform number of column
+positions, \fIn\fP, where \fIn\fP is a single-digit
+decimal number. The default usage of \fItabs\fP with no arguments
+shall be equivalent to \fBtabs\fP-8. When \fB-0\fP is used,
+the tab stops shall be cleared and no new ones set.
+.TP 7
+\fB-a\fP
+1,10,16,36,72
+.br
+Assembler, applicable to some mainframes.
+.TP 7
+\fB-a2\fP
+1,10,16,40,72
+.br
+Assembler, applicable to some mainframes.
+.TP 7
+\fB-c\fP
+1,8,12,16,20,55
+.br
+COBOL, normal format.
+.TP 7
+\fB-c2\fP
+1,6,10,14,49
+.br
+COBOL, compact format (columns 1 to 6 omitted).
+.TP 7
+\fB-c3\fP
+1,6,10,14,18,22,26,30,34,38,42,46,50,54,58,62,67
+.br
+COBOL compact format (columns 1 to 6 omitted), with more tabs than
+\fB-c2\fP.
+.TP 7
+\fB-f\fP
+1,7,11,15,19,23
+.br
+FORTRAN
+.TP 7
+\fB-p\fP
+1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61
+.br
+PL/1
+.TP 7
+\fB-s\fP
+1,10,55
+.br
+SNOBOL
+.TP 7
+\fB-u\fP
+1,12,20,44
+.br
+Assembler, applicable to some mainframes.
+.TP 7
+\fB-T\ \fP \fItype\fP
+Indicate the type of terminal. If this option is not supplied and
+the \fITERM\fP variable is unset or null, an unspecified
+default terminal type shall be used. The setting of \fItype\fP shall
+take precedence over the value in \fITERM\fP.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIn1\fP\fB[\fP,\fIn2\fP,...\fB]\fP
+A single command line argument that consists of tab-stop values separated
+using either commas or <blank>s. The
+application shall ensure that the tab-stop values are positive decimal
+integers in strictly ascending order. If any number (except
+the first one) is preceded by a plus sign, it is taken as an increment
+to be added to the previous value. For example, the tab
+lists 1,10,20,30 and 1,10,+10,+10 are considered to be identical.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fItabs\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fITERM\fP
+Determine the terminal type. If this variable is unset or null, and
+if the \fB-T\fP option is not specified, an unspecified
+default terminal type shall be used.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+If standard output is a terminal, the appropriate sequence to clear
+and set the tab stops may be written to standard output in
+an unspecified format. If standard output is not a terminal, undefined
+results occur.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+This utility makes use of the terminal's hardware tabs and the \fIstty\fP
+\fItabs\fP
+option.
+.LP
+This utility is not recommended for application use.
+.LP
+Some integrated display units might not have escape sequences to set
+tab stops, but may be set by internal system calls. On
+these terminals, \fItabs\fP works if standard output is directed to
+the terminal; if output is directed to another file, however,
+\fItabs\fP fails.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+Consideration was given to having the \fItput\fP utility handle all
+of the functions
+described in \fItabs\fP. However, the separate \fItabs\fP utility
+was retained because it seems more intuitive to use a command
+named \fItabs\fP than \fItput\fP with a new option. The \fItput\fP
+utility does not support setting or clearing tabs, and no known historical
+version of
+\fItabs\fP supports the capability of setting arbitrary tab stops.
+.LP
+The System V \fItabs\fP interface is very complex; the version in
+this volume of IEEE\ Std\ 1003.1-2001 has a reduced
+feature list, but many of the features omitted were restored as XSI
+extensions even though the supported languages and coding
+styles are primarily historical.
+.LP
+There was considerable sentiment for specifying only a means of resetting
+the tabs back to a known state-presumably the
+"standard" of tabs every eight positions. The following features were
+omitted:
+.IP " *" 3
+Setting tab stops via the first line in a file, using -- \fIfile\fP.
+Since even the SVID has no complete explanation of this
+feature, it is doubtful that it is in widespread use.
+.LP
+.LP
+In an early proposal, a \fB-t\fP \fItablist\fP option was added for
+consistency with \fIexpand\fP; this was later removed when inconsistencies
+with the historical list of tabs were
+identified.
+.LP
+Consideration was given to adding a \fB-p\fP option that would output
+the current tab settings so that they could be saved and
+then later restored. This was not accepted because querying the tab
+stops of the terminal is not a capability in historical
+\fIterminfo\fP or \fItermcap\fP facilities and might not be supported
+on a wide range of terminals.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexpand\fP, \fIstty\fP, \fItput\fP, \fIunexpand\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/tail.1p b/man-pages-posix-2003/man1p/tail.1p
new file mode 100644
index 0000000..168d932
--- /dev/null
+++ b/man-pages-posix-2003/man1p/tail.1p
@@ -0,0 +1,254 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TAIL" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" tail
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+tail \- copy the last part of a file
+.SH SYNOPSIS
+.LP
+\fBtail\fP \fB[\fP\fB-f\fP\fB][\fP \fB-c\fP \fInumber\fP\fB| -n\fP
+\fInumber\fP\fB][\fP\fIfile\fP\fB]\fP
+.SH DESCRIPTION
+.LP
+The \fItail\fP utility shall copy its input file to the standard output
+beginning at a designated place.
+.LP
+Copying shall begin at the point in the file indicated by the \fB-c\fP
+\fInumber\fP or \fB-n\fP \fInumber\fP options. The
+option-argument \fInumber\fP shall be counted in units of lines or
+bytes, according to the options \fB-n\fP and \fB-c\fP. Both
+line and byte counts start from 1.
+.LP
+Tails relative to the end of the file may be saved in an internal
+buffer, and thus may be limited in length. Such a buffer, if
+any, shall be no smaller than {LINE_MAX}*10 bytes.
+.SH OPTIONS
+.LP
+The \fItail\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-c\ \fP \fInumber\fP
+The application shall ensure that the \fInumber\fP option-argument
+is a decimal integer whose sign affects the location in the
+file, measured in bytes, to begin the copying:
+.TS C
+center; l l.
+\fBSign\fP \fBCopying Starts\fP
++ Relative to the beginning of the file.
+- Relative to the end of the file.
+\fInone\fP Relative to the end of the file.
+.TE
+.LP
+The origin for counting shall be 1; that is, \fB-c\fP +1 represents
+the first byte of the file, \fB-c\fP -1 the last.
+.TP 7
+\fB-f\fP
+If the input file is a regular file or if the \fIfile\fP operand specifies
+a FIFO, do not terminate after the last line of the
+input file has been copied, but read and copy further bytes from the
+input file when they become available. If no \fIfile\fP
+operand is specified and standard input is a pipe, the \fB-f\fP option
+shall be ignored. If the input file is not a FIFO, pipe, or
+regular file, it is unspecified whether or not the \fB-f\fP option
+shall be ignored.
+.TP 7
+\fB-n\ \fP \fInumber\fP
+This option shall be equivalent to \fB-c\fP \fInumber\fP, except the
+starting location in the file shall be measured in lines
+instead of bytes. The origin for counting shall be 1; that is, \fB-n\fP
++1 represents the first line of the file, \fB-n\fP -1 the
+last.
+.sp
+.LP
+If neither \fB-c\fP nor \fB-n\fP is specified, \fB-n\fP 10 shall be
+assumed.
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of an input file. If no \fIfile\fP operands are specified,
+the standard input shall be used.
+.sp
+.SH STDIN
+.LP
+The standard input shall be used only if no \fIfile\fP operands are
+specified. See the INPUT FILES section.
+.SH INPUT FILES
+.LP
+If the \fB-c\fP option is specified, the input file can contain arbitrary
+data; otherwise, the input file shall be a text
+file.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fItail\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The designated portion of the input file shall be written to standard
+output.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The \fB-c\fP option should be used with caution when the input is
+a text file containing multi-byte characters; it may produce
+output that does not start on a character boundary.
+.LP
+Although the input file to \fItail\fP can be any type, the results
+might not be what would be expected on some character
+special device files or on file types not described by the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001. Since this
+volume of IEEE\ Std\ 1003.1-2001 does not specify the block size used
+when doing input, \fItail\fP need not read all of
+the data from devices that only perform block transfers.
+.SH EXAMPLES
+.LP
+The \fB-f\fP option can be used to monitor the growth of a file that
+is being written by some other process. For example, the
+command:
+.sp
+.RS
+.nf
+
+\fBtail -f fred
+\fP
+.fi
+.RE
+.LP
+prints the last ten lines of the file \fBfred\fP, followed by any
+lines that are appended to \fBfred\fP between the time
+\fItail\fP is initiated and killed. As another example, the command:
+.sp
+.RS
+.nf
+
+\fBtail -f -c 15 fred
+\fP
+.fi
+.RE
+.LP
+prints the last 15 bytes of the file \fBfred\fP, followed by any bytes
+that are appended to \fBfred\fP between the time
+\fItail\fP is initiated and killed.
+.SH RATIONALE
+.LP
+This version of \fItail\fP was created to allow conformance to the
+Utility Syntax Guidelines. The historical \fB-b\fP option
+was omitted because of the general non-portability of block-sized
+units of text. The \fB-c\fP option historically meant
+"characters", but this volume of IEEE\ Std\ 1003.1-2001 indicates
+that it means "bytes". This was selected to allow
+reasonable implementations when multi-byte characters are possible;
+it was not named \fB-b\fP to avoid confusion with the
+historical \fB-b\fP.
+.LP
+The origin of counting both lines and bytes is 1, matching all widespread
+historical implementations.
+.LP
+The restriction on the internal buffer is a compromise between the
+historical System V implementation of 4096 bytes and the BSD
+32768 bytes.
+.LP
+The \fB-f\fP option has been implemented as a loop that sleeps for
+1 second and copies any bytes that are available. This is
+sufficient, but if more efficient methods of determining when new
+data are available are developed, implementations are encouraged
+to use them.
+.LP
+Historical documentation indicates that \fItail\fP ignores the \fB-f\fP
+option if the input file is a pipe (pipe and FIFO on
+systems that support FIFOs). On BSD-based systems, this has been true;
+on System V-based systems, this was true when input was
+taken from standard input, but it did not ignore the \fB-f\fP flag
+if a FIFO was named as the \fIfile\fP operand. Since the
+\fB-f\fP option is not useful on pipes and all historical implementations
+ignore \fB-f\fP if no \fIfile\fP operand is specified
+and standard input is a pipe, this volume of IEEE\ Std\ 1003.1-2001
+requires this behavior. However, since the \fB-f\fP
+option is useful on a FIFO, this volume of IEEE\ Std\ 1003.1-2001
+also requires that if standard input is a FIFO or a FIFO
+is named, the \fB-f\fP option shall not be ignored. Although historical
+behavior does not ignore the \fB-f\fP option for other
+file types, this is unspecified so that implementations are allowed
+to ignore the \fB-f\fP option if it is known that the file
+cannot be extended.
+.LP
+This was changed to the current form based on comments noting that
+\fB-c\fP was almost never used without specifying a number
+and that there was no need to specify \fB-l\fP if \fB-n\fP \fInumber\fP
+was given.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIhead\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/talk.1p b/man-pages-posix-2003/man1p/talk.1p
new file mode 100644
index 0000000..51967c5
--- /dev/null
+++ b/man-pages-posix-2003/man1p/talk.1p
@@ -0,0 +1,283 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TALK" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" talk
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+talk \- talk to another user
+.SH SYNOPSIS
+.LP
+\fBtalk\fP \fIaddress\fP \fB[\fP\fIterminal\fP\fB]\fP\fB\fP
+.SH DESCRIPTION
+.LP
+The \fItalk\fP utility is a two-way, screen-oriented communication
+program.
+.LP
+When first invoked, \fItalk\fP shall send a message similar to:
+.sp
+.RS
+.nf
+
+\fBMessage from <\fP\fIunspecified string\fP\fB>
+talk: connection requested by\fP \fIyour_address\fP\fBtalk: respond with: talk\fP \fIyour_address\fP
+.fi
+.RE
+.LP
+to the specified \fIaddress\fP. At this point, the recipient of the
+message can reply by typing:
+.sp
+.RS
+.nf
+
+\fBtalk\fP \fIyour_address\fP
+.fi
+.RE
+.LP
+Once communication is established, the two parties can type simultaneously,
+with their output displayed in separate regions of
+the screen. Characters shall be processed as follows:
+.IP " *" 3
+Typing the alert character shall alert the recipient's terminal.
+.LP
+.IP " *" 3
+Typing <control>-L shall cause the sender's screen regions to be refreshed.
+.LP
+.IP " *" 3
+Typing the erase and kill characters shall affect the sender's terminal
+in the manner described by the \fBtermios\fP interface
+in the Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter
+11, General
+Terminal Interface.
+.LP
+.IP " *" 3
+Typing the interrupt or end-of-file characters shall terminate the
+local \fItalk\fP utility. Once the \fItalk\fP session has
+been terminated on one side, the other side of the \fItalk\fP session
+shall be notified that the \fItalk\fP session has been
+terminated and shall be able to do nothing except exit.
+.LP
+.IP " *" 3
+Typing characters from \fILC_CTYPE\fP classifications \fBprint\fP
+or \fBspace\fP shall cause those characters to be sent to
+the recipient's terminal.
+.LP
+.IP " *" 3
+When and only when the \fIstty\fP \fBiexten\fP local mode is enabled,
+the existence and
+processing of additional special control characters and multi-byte
+or single-byte functions shall be implementation-defined.
+.LP
+.IP " *" 3
+Typing other non-printable characters shall cause implementation-defined
+sequences of printable characters to be sent to the
+recipient's terminal.
+.LP
+.LP
+Permission to be a recipient of a \fItalk\fP message can be denied
+or granted by use of the \fImesg\fP utility. However, a user's privilege
+may further constrain the domain of accessibility of
+other users' terminals. The \fItalk\fP utility shall fail when the
+user lacks the appropriate privileges to perform the requested
+action.
+.LP
+Certain block-mode terminals do not have all the capabilities necessary
+to support the simultaneous exchange of messages
+required for \fItalk\fP. When this type of exchange cannot be supported
+on such terminals, the implementation may support an
+exchange with reduced levels of simultaneous interaction or it may
+report an error describing the terminal-related deficiency.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIaddress\fP
+The recipient of the \fItalk\fP session. One form of \fIaddress\fP
+is the <\fIuser\ name\fP>, as returned by the
+\fIwho\fP utility. Other address formats and how they are handled
+are unspecified.
+.TP 7
+\fIterminal\fP
+If the recipient is logged in more than once, the \fIterminal\fP argument
+can be used to indicate the appropriate terminal
+name. If \fIterminal\fP is not specified, the \fItalk\fP message shall
+be displayed on one or more accessible terminals in use by
+the recipient. The format of \fIterminal\fP shall be the same as that
+returned by the \fIwho\fP utility.
+.sp
+.SH STDIN
+.LP
+Characters read from standard input shall be copied to the recipient's
+terminal in an unspecified manner. If standard input is
+not a terminal, talk shall write a diagnostic message and exit with
+a non-zero status.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fItalk\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files). If
+the recipient's locale does not use an \fILC_CTYPE\fP
+equivalent to the sender's, the results are undefined.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard error and
+informative messages written to standard output.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fITERM\fP
+Determine the name of the invoker's terminal type. If this variable
+is unset or null, an unspecified default terminal type
+shall be used.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+When the \fItalk\fP utility receives a SIGINT signal, the utility
+shall terminate and exit with a zero status. It shall take
+the standard action for all other signals.
+.SH STDOUT
+.LP
+If standard output is a terminal, characters copied from the recipient's
+standard input may be written to standard output.
+Standard output also may be used for diagnostic messages. If standard
+output is not a terminal, \fItalk\fP shall exit with a
+non-zero status.
+.SH STDERR
+.LP
+None.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred or \fItalk\fP was invoked on a terminal incapable
+of supporting it.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Because the handling of non-printable, non- <space>s is tied to the
+\fIstty\fP
+description of \fBiexten\fP, implementation extensions within the
+terminal driver can be accessed. For example, some
+implementations provide line editing functions with certain control
+character sequences.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIwrite\fP utility was included in this volume of IEEE\ Std\ 1003.1-2001
+since it can be implemented on all terminal types. The \fItalk\fP
+utility, which cannot be implemented on certain terminals, was
+considered to be a "better" communications interface. Both of these
+programs are in widespread use on historical implementations.
+Therefore, both utilities have been specified.
+.LP
+All references to networking abilities (\fItalk\fPing to a user on
+another system) were removed as being outside the scope of
+this volume of IEEE\ Std\ 1003.1-2001.
+.LP
+Historical BSD and System V versions of \fItalk\fP terminate both
+of the conversations when either user breaks out of the
+session. This can lead to adverse consequences if a user unwittingly
+continues to enter text that is interpreted by the shell when
+the other terminates the session. Therefore, the version of \fItalk\fP
+specified by this volume of IEEE\ Std\ 1003.1-2001
+requires both users to terminate their end of the session explicitly.
+.LP
+Only messages sent to the terminal of the invoking user can be internationalized
+in any way:
+.IP " *" 3
+The original "Message from <\fIunspecified string\fP> ..." message
+sent to the terminal of the recipient cannot be
+internationalized because the environment of the recipient is as yet
+inaccessible to the \fItalk\fP utility. The environment of
+the invoking party is irrelevant.
+.LP
+.IP " *" 3
+Subsequent communication between the two parties cannot be internationalized
+because the two parties may specify different
+languages in their environment (and non-portable characters cannot
+be mapped from one language to another).
+.LP
+.IP " *" 3
+Neither party can be required to communicate in a language other than
+C and/or the one specified by their environment because
+unavailable terminal hardware support (for example, fonts) may be
+required.
+.LP
+.LP
+The text in the STDOUT section reflects the usage of the verb "display"
+in this section; some \fItalk\fP implementations
+actually use standard output to write to the terminal, but this volume
+of IEEE\ Std\ 1003.1-2001 does not require that to
+be the case.
+.LP
+The format of the terminal name is unspecified, but the descriptions
+of \fIps\fP,
+\fItalk\fP, \fIwho\fP, and \fIwrite\fP require that
+they all use or accept the same format.
+.LP
+The handling of non-printable characters is partially implementation-defined
+because the details of mapping them to printable
+sequences is not needed by the user. Historical implementations, for
+security reasons, disallow the transmission of non-printable
+characters that may send commands to the other terminal.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fImesg\fP, \fIstty\fP, \fIwho\fP, \fIwrite\fP, the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/tee.1p b/man-pages-posix-2003/man1p/tee.1p
new file mode 100644
index 0000000..48ae92e
--- /dev/null
+++ b/man-pages-posix-2003/man1p/tee.1p
@@ -0,0 +1,179 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TEE" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" tee
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+tee \- duplicate standard input
+.SH SYNOPSIS
+.LP
+\fBtee\fP \fB[\fP\fB-ai\fP\fB][\fP\fIfile\fP\fB...\fP\fB]\fP
+.SH DESCRIPTION
+.LP
+The \fItee\fP utility shall copy standard input to standard output,
+making a copy in zero or more files. The \fItee\fP utility
+shall not buffer output.
+.LP
+If the \fB-a\fP option is not specified, output files shall be written
+(see \fIFile
+Read, Write, and Creation\fP .
+.SH OPTIONS
+.LP
+The \fItee\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-a\fP
+Append the output to the files.
+.TP 7
+\fB-i\fP
+Ignore the SIGINT signal.
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of an output file. Processing of at least 13 \fIfile\fP
+operands shall be supported.
+.sp
+.SH STDIN
+.LP
+The standard input can be of any type.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fItee\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default, except that if the \fB-i\fP option was specified, SIGINT
+shall be ignored.
+.SH STDOUT
+.LP
+The standard output shall be a copy of the standard input.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+If any \fIfile\fP operands are specified, the standard input shall
+be copied to each named file.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+The standard input was successfully copied to all output files.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+If a write to any successfully opened \fIfile\fP operand fails, writes
+to other successfully opened \fIfile\fP operands and
+standard output shall continue, but the exit status shall be non-zero.
+Otherwise, the default actions specified in \fIUtility Description
+Defaults\fP apply.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The \fItee\fP utility is usually used in a pipeline, to make a copy
+of the output of some utility.
+.LP
+The \fIfile\fP operand is technically optional, but \fItee\fP is no
+more useful than \fIcat\fP when none is specified.
+.SH EXAMPLES
+.LP
+Save an unsorted intermediate form of the data in a pipeline:
+.sp
+.RS
+.nf
+
+\fB\&... | tee unsorted | sort > sorted
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+The buffering requirement means that \fItee\fP is not allowed to use
+ISO\ C standard fully buffered or line-buffered
+writes. It does not mean that \fItee\fP has to do 1-byte reads followed
+by 1-byte writes.
+.LP
+It should be noted that early versions of BSD ignore any invalid options
+and accept a single \fB'-'\fP as an alternative to
+\fB-i\fP. They also print a message if unable to open a file:
+.sp
+.RS
+.nf
+
+\fB"tee: cannot access %s\\n", <\fP\fIpathname\fP\fB>
+\fP
+.fi
+.RE
+.LP
+Historical implementations ignore write errors. This is explicitly
+not permitted by this volume of
+IEEE\ Std\ 1003.1-2001.
+.LP
+Some historical implementations use O_APPEND when providing append
+mode; others use the \fIlseek\fP() function to seek to the end-of-file
+after opening the file without O_APPEND. This
+volume of IEEE\ Std\ 1003.1-2001 requires functionality equivalent
+to using O_APPEND; see \fIFile Read, Write, and Creation\fP .
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIIntroduction\fP, \fIcat\fP, the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001, \fIlseek\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/test.1p b/man-pages-posix-2003/man1p/test.1p
new file mode 100644
index 0000000..b1bfab9
--- /dev/null
+++ b/man-pages-posix-2003/man1p/test.1p
@@ -0,0 +1,762 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TEST" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" test
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+test \- evaluate expression
+.SH SYNOPSIS
+.LP
+\fBtest\fP \fB[\fP\fIexpression\fP\fB]\fP\fB
+.br
+.sp
+[\fP \fB[\fP\fIexpression\fP\fB]\fP \fB]
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fItest\fP utility shall evaluate the \fIexpression\fP and indicate
+the result of the evaluation by its exit status. An
+exit status of zero indicates that the expression evaluated as true
+and an exit status of 1 indicates that the expression evaluated
+as false.
+.LP
+In the second form of the utility, which uses \fB"[]"\fP rather than
+\fItest\fP, the application shall ensure that the
+square brackets are separate arguments.
+.SH OPTIONS
+.LP
+The \fItest\fP utility shall not recognize the \fB"--"\fP argument
+in the manner specified by guideline 10 in the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility
+Syntax
+Guidelines.
+.LP
+No options shall be supported.
+.SH OPERANDS
+.LP
+The application shall ensure that all operators and elements of primaries
+are presented as separate arguments to the \fItest\fP
+utility.
+.LP
+The following primaries can be used to construct \fIexpression\fP:
+.TP 7
+\fB-b\ \fP \fIfile\fP
+True if \fIfile\fP exists and is a block special file.
+.TP 7
+\fB-c\ \fP \fIfile\fP
+True if \fIfile\fP exists and is a character special file.
+.TP 7
+\fB-d\ \fP \fIfile\fP
+True if \fIfile\fP exists and is a directory.
+.TP 7
+\fB-e\ \fP \fIfile\fP
+True if \fIfile\fP exists.
+.TP 7
+\fB-f\ \fP \fIfile\fP
+True if \fIfile\fP exists and is a regular file.
+.TP 7
+\fB-g\ \fP \fIfile\fP
+True if \fIfile\fP exists and its set-group-ID flag is set.
+.TP 7
+\fB-h\ \fP \fIfile\fP
+True if \fIfile\fP exists and is a symbolic link.
+.TP 7
+\fB-L\ \fP \fIfile\fP
+True if \fIfile\fP exists and is a symbolic link.
+.TP 7
+\fB-n\ \fP \fIstring\fP
+True if the length of \fIstring\fP is non-zero.
+.TP 7
+\fB-p\ \fP \fIfile\fP
+True if \fIfile\fP is a FIFO.
+.TP 7
+\fB-r\ \fP \fIfile\fP
+True if \fIfile\fP exists and is readable. True shall indicate that
+permission to read from \fIfile\fP will be granted, as
+defined in \fIFile Read, Write, and Creation\fP .
+.TP 7
+\fB-S\ \fP \fIfile\fP
+True if \fIfile\fP exists and is a socket.
+.TP 7
+\fB-s\ \fP \fIfile\fP
+True if \fIfile\fP exists and has a size greater than zero.
+.TP 7
+\fB-t\ \fP \fIfile_descriptor\fP
+.sp
+True if the file whose file descriptor number is \fIfile_descriptor\fP
+is open and is associated with a terminal.
+.TP 7
+\fB-u\ \fP \fIfile\fP
+True if \fIfile\fP exists and its set-user-ID flag is set.
+.TP 7
+\fB-w\ \fP \fIfile\fP
+True if \fIfile\fP exists and is writable. True shall indicate that
+permission to write from \fIfile\fP will be granted, as
+defined in \fIFile Read, Write, and Creation\fP .
+.TP 7
+\fB-x\ \fP \fIfile\fP
+True if \fIfile\fP exists and is executable. True shall indicate that
+permission to execute \fIfile\fP will be granted, as
+defined in \fIFile Read, Write, and Creation\fP . If \fIfile\fP is
+a directory,
+true shall indicate that permission to search \fIfile\fP will be granted.
+.TP 7
+\fB-z\ \fP \fIstring\fP
+True if the length of string \fIstring\fP is zero.
+.TP 7
+\fIstring\fP
+True if the string \fIstring\fP is not the null string.
+.TP 7
+\fIs1\fP\fB\ =\ \fP \fIs2\fP
+True if the strings \fIs1\fP and \fIs2\fP are identical.
+.TP 7
+\fIs1\fP\fB\ !=\ \fP \fIs2\fP
+True if the strings \fIs1\fP and \fIs2\fP are not identical.
+.TP 7
+\fIn1\fP\fB\ -eq\ \fP \fIn2\fP
+True if the integers \fIn1\fP and \fIn2\fP are algebraically equal.
+.TP 7
+\fIn1\fP\fB\ -ne\ \fP \fIn2\fP
+True if the integers \fIn1\fP and \fIn2\fP are not algebraically equal.
+.TP 7
+\fIn1\fP\fB\ -gt\ \fP \fIn2\fP
+True if the integer \fIn1\fP is algebraically greater than the integer
+\fIn2\fP.
+.TP 7
+\fIn1\fP\fB\ -ge\ \fP \fIn2\fP
+True if the integer \fIn1\fP is algebraically greater than or equal
+to the integer \fIn2\fP.
+.TP 7
+\fIn1\fP\fB\ -lt\ \fP \fIn2\fP
+True if the integer \fIn1\fP is algebraically less than the integer
+\fIn2\fP.
+.TP 7
+\fIn1\fP\fB\ -le\ \fP \fIn2\fP
+True if the integer \fIn1\fP is algebraically less than or equal to
+the integer \fIn2\fP.
+.TP 7
+\fIexpression1\fP\fB\ -a\ \fP \fIexpression2\fP
+.sp
+True if both \fIexpression1\fP and \fIexpression2\fP are true. The
+\fB-a\fP binary primary is left associative. It has a higher
+precedence than \fB-o\fP.
+.TP 7
+\fIexpression1\fP\fB\ -o\ \fP \fIexpression2\fP
+.sp
+True if either \fIexpression1\fP or \fIexpression2\fP is true. The
+\fB-o\fP binary primary is left associative.
+.sp
+.LP
+With the exception of the \fB-h\fP \fIfile\fP and \fB-L\fP \fIfile\fP
+primaries, if a \fIfile\fP argument is a symbolic
+link, \fItest\fP shall evaluate the expression by resolving the symbolic
+link and using the file referenced by the link.
+.LP
+These primaries can be combined with the following operators:
+.TP 7
+\fB!\ \fP \fIexpression\fP
+True if \fIexpression\fP is false.
+.TP 7
+\fB(\ \fP \fIexpression\ \fP \fB)\fP
+True if \fIexpression\fP is true. The parentheses can be used to alter
+the normal precedence and associativity.
+.sp
+.LP
+The primaries with two elements of the form:
+.sp
+.RS
+.nf
+
+\fB-\fP\fIprimary_operator primary_operand\fP
+.fi
+.RE
+.LP
+are known as \fIunary primaries\fP. The primaries with three elements
+in either of the two forms:
+.sp
+.RS
+.nf
+
+\fIprimary_operand\fP \fB-\fP\fIprimary_operator primary_operand
+.sp
+
+primary_operand primary_operator primary_operand\fP
+.fi
+.RE
+.LP
+are known as \fIbinary primaries\fP. Additional implementation-defined
+operators and \fIprimary_operator\fPs may be provided
+by implementations. They shall be of the form - \fIoperator\fP where
+the first character of \fIoperator\fP is not a digit.
+.LP
+The algorithm for determining the precedence of the operators and
+the return value that shall be generated is based on the
+number of arguments presented to \fItest\fP. (However, when using
+the \fB"[...]"\fP form, the right-bracket final argument
+shall not be counted in this algorithm.)
+.LP
+In the following list, $1, $2, $3, and $4 represent the arguments
+presented to \fItest\fP:
+.TP 7
+0\ arguments:
+Exit false (1).
+.TP 7
+1\ argument:
+Exit true (0) if $1 is not null; otherwise, exit false.
+.TP 7
+2\ arguments:
+.RS
+.IP " *" 3
+If $1 is \fB'!'\fP, exit true if $2 is null, false if $2 is not null.
+.LP
+.IP " *" 3
+If $1 is a unary primary, exit true if the unary test is true, false
+if the unary test is false.
+.LP
+.IP " *" 3
+Otherwise, produce unspecified results.
+.LP
+.RE
+.TP 7
+3\ arguments:
+.RS
+.IP " *" 3
+If $2 is a binary primary, perform the binary test of $1 and $3.
+.LP
+.IP " *" 3
+If $1 is \fB'!'\fP, negate the two-argument test of $2 and $3.
+.LP
+.IP " *" 3
+If $1 is \fB'('\fP and $3 is \fB')'\fP, perform the unary test of
+$2.
+.LP
+.IP " *" 3
+Otherwise, produce unspecified results.
+.LP
+.RE
+.TP 7
+4\ arguments:
+.RS
+.IP " *" 3
+If $1 is \fB'!'\fP, negate the three-argument test of $2, $3, and
+$4.
+.LP
+.IP " *" 3
+If $1 is \fB'('\fP and $4 is \fB')'\fP, perform the two-argument
+test of $2 and $3.
+.LP
+.IP " *" 3
+Otherwise, the results are unspecified.
+.LP
+.RE
+.TP 7
+>4\ arguments:
+The results are unspecified.
+.LP
+On XSI-conformant systems, combinations of primaries and operators
+shall be evaluated using the precedence and associativity rules
+described previously. In addition, the string comparison binary primaries
+\fB'='\fP and \fB"!="\fP shall have a higher
+precedence than any unary primary.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fItest\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+\fIexpression\fP evaluated to true.
+.TP 7
+\ 1
+\fIexpression\fP evaluated to false or \fIexpression\fP was missing.
+.TP 7
+>1
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Scripts should be careful when dealing with user-supplied input that
+could be confused with primaries and operators. Unless the
+application writer knows all the cases that produce input to the script,
+invocations like:
+.sp
+.RS
+.nf
+
+\fBtest "$1" -a "$2"
+\fP
+.fi
+.RE
+.LP
+should be written as:
+.sp
+.RS
+.nf
+
+\fBtest "$1" && test "$2"
+\fP
+.fi
+.RE
+.LP
+to avoid problems if a user supplied values such as $1 set to \fB'!'\fP
+and $2 set to the null string. That is, in cases
+where maximal portability is of concern, replace:
+.sp
+.RS
+.nf
+
+\fBtest expr1 -a expr2
+\fP
+.fi
+.RE
+.LP
+with:
+.sp
+.RS
+.nf
+
+\fBtest expr1 && test expr2
+\fP
+.fi
+.RE
+.LP
+and replace:
+.sp
+.RS
+.nf
+
+\fBtest expr1 -o expr2
+\fP
+.fi
+.RE
+.LP
+with:
+.sp
+.RS
+.nf
+
+\fBtest expr1 || test expr2
+\fP
+.fi
+.RE
+.LP
+but note that, in \fItest\fP, \fB-a\fP has higher precedence than
+\fB-o\fP while \fB"&&"\fP and \fB"||"\fP have
+equal precedence in the shell.
+.LP
+Parentheses or braces can be used in the shell command language to
+effect grouping.
+.LP
+Parentheses must be escaped when using \fIsh\fP; for example:
+.sp
+.RS
+.nf
+
+\fBtest \\( expr1 -a expr2 \\) -o expr3
+\fP
+.fi
+.RE
+.LP
+This command is not always portable outside XSI-conformant systems.
+The following form can be used instead:
+.sp
+.RS
+.nf
+
+\fB( test expr1 && test expr2 ) || test expr3
+\fP
+.fi
+.RE
+.LP
+The two commands:
+.sp
+.RS
+.nf
+
+\fBtest "$1"
+test ! "$1"
+\fP
+.fi
+.RE
+.LP
+could not be used reliably on some historical systems. Unexpected
+results would occur if such a \fIstring\fP expression were
+used and $1 expanded to \fB'!'\fP, \fB'('\fP, or a known unary primary.
+Better constructs are:
+.sp
+.RS
+.nf
+
+\fBtest -n "$1"
+test -z "$1"
+\fP
+.fi
+.RE
+respectively.
+.LP
+Historical systems have also been unreliable given the common construct:
+.sp
+.RS
+.nf
+
+\fBtest "$response" = "expected string"
+\fP
+.fi
+.RE
+.LP
+One of the following is a more reliable form:
+.sp
+.RS
+.nf
+
+\fBtest "X$response" = "Xexpected string"
+test "expected string" = "$response"
+\fP
+.fi
+.RE
+.LP
+Note that the second form assumes that \fIexpected string\fP could
+not be confused with any unary primary. If \fIexpected
+string\fP starts with \fB'-'\fP, \fB'('\fP, \fB'!'\fP, or even
+\fB'='\fP, the first form should be used instead.
+Using the preceding rules without the XSI marked extensions, any of
+the three comparison forms is reliable, given any input.
+(However, note that the strings are quoted in all cases.)
+.LP
+Because the string comparison binary primaries, \fB'='\fP and \fB"!="\fP,
+have a higher precedence than any unary primary
+in the greater than 4 argument case, unexpected results can occur
+if arguments are not properly prepared. For example, in:
+.sp
+.RS
+.nf
+
+\fBtest -d $1 -o -d $2
+\fP
+.fi
+.RE
+.LP
+If $1 evaluates to a possible directory name of \fB'='\fP, the first
+three arguments are considered a string comparison,
+which shall cause a syntax error when the second \fB-d\fP is encountered.
+One of the following forms prevents this; the second is
+preferred:
+.sp
+.RS
+.nf
+
+\fBtest \\( -d "$1" \\) -o \\( -d "$2" \\)
+test -d "$1" || test -d "$2"
+\fP
+.fi
+.RE
+.LP
+Also in the greater than 4 argument case:
+.sp
+.RS
+.nf
+
+\fBtest "$1" = "bat" -a "$2" = "ball"
+\fP
+.fi
+.RE
+.LP
+syntax errors occur if $1 evaluates to \fB'('\fP or \fB'!'\fP . One
+of the following forms prevents this; the third is
+preferred:
+.sp
+.RS
+.nf
+
+\fBtest "X$1" = "Xbat" -a "X$2" = "Xball"
+test "$1" = "bat" && test "$2" = "ball"
+test "X$1" = "Xbat" && test "X$2" = "Xball"
+\fP
+.fi
+.RE
+.SH EXAMPLES
+.IP " 1." 4
+Exit if there are not two or three arguments (two variations):
+.sp
+.RS
+.nf
+
+\fBif [ $# -ne 2 -a $# -ne 3 ]; then exit 1; fi
+if [ $# -lt 2 -o $# -gt 3 ]; then exit 1; fi
+\fP
+.fi
+.RE
+.LP
+.IP " 2." 4
+Perform a \fImkdir\fP if a directory does not exist:
+.sp
+.RS
+.nf
+
+\fBtest ! -d tempdir && mkdir tempdir
+\fP
+.fi
+.RE
+.LP
+.IP " 3." 4
+Wait for a file to become non-readable:
+.sp
+.RS
+.nf
+
+\fBwhile test -r thefile
+do
+ sleep 30
+done
+echo '"thefile" is no longer readable'
+\fP
+.fi
+.RE
+.LP
+.IP " 4." 4
+Perform a command if the argument is one of three strings (two variations):
+.sp
+.RS
+.nf
+
+\fBif [ "$1" = "pear" ] || [ "$1" = "grape" ] || [ "$1" = "apple" ]
+then
+ \fP \fIcommand\fP\fB
+fi
+.sp
+
+case "$1" in
+ pear|grape|apple)\fP \fIcommand\fP \fB;;
+esac
+\fP
+.fi
+.RE
+.LP
+.SH RATIONALE
+.LP
+The KornShell-derived conditional command (double bracket \fB[[]]\fP)
+was removed from the shell command language description
+in an early proposal. Objections were raised that the real problem
+is misuse of the \fItest\fP command ( \fB[\fP), and putting it
+into the shell is the wrong way to fix the problem. Instead, proper
+documentation and a new shell reserved word ( \fB!\fP) are
+sufficient.
+.LP
+Tests that require multiple \fItest\fP operations can be done at the
+shell level using individual invocations of the
+\fItest\fP command and shell logicals, rather than using the error-prone
+\fB-o\fP flag of \fItest\fP.
+.LP
+XSI-conformant systems support more than four arguments.
+.LP
+XSI-conformant systems support the combining of primaries with the
+following constructs:
+.TP 7
+\fIexpression1\fP \fB-a\fP \fIexpression2\fP
+.sp
+True if both \fIexpression1\fP and \fIexpression2\fP are true.
+.TP 7
+\fIexpression1\fP \fB-o\fP \fIexpression2\fP
+.sp
+True if at least one of \fIexpression1\fP and \fIexpression2\fP are
+true.
+.TP 7
+\fB(\fP \fIexpression\fP \fB)\fP
+.sp
+True if \fIexpression\fP is true.
+.sp
+.LP
+In evaluating these more complex combined expressions, the following
+precedence rules are used:
+.IP " *" 3
+The unary primaries have higher precedence than the algebraic binary
+primaries.
+.LP
+.IP " *" 3
+The unary primaries have lower precedence than the string binary primaries.
+.LP
+.IP " *" 3
+The unary and binary primaries have higher precedence than the unary
+\fIstring\fP primary.
+.LP
+.IP " *" 3
+The \fB!\fP operator has higher precedence than the \fB-a\fP operator,
+and the \fB-a\fP operator has higher precedence than
+the \fB-o\fP operator.
+.LP
+.IP " *" 3
+The \fB-a\fP and \fB-o\fP operators are left associative.
+.LP
+.IP " *" 3
+The parentheses can be used to alter the normal precedence and associativity.
+.LP
+.LP
+The BSD and System V versions of \fB-f\fP are not the same. The BSD
+definition was:
+.TP 7
+\fB-f\ \fP \fIfile\fP
+True if \fIfile\fP exists and is not a directory.
+.sp
+.LP
+The SVID version (true if the file exists and is a regular file) was
+chosen for this volume of IEEE\ Std\ 1003.1-2001
+because its use is consistent with the \fB-b\fP, \fB-c\fP, \fB-d\fP,
+and \fB-p\fP operands ( \fIfile\fP exists and is a
+specific file type).
+.LP
+The \fB-e\fP primary, possessing similar functionality to that provided
+by the C shell, was added because it provides the only
+way for a shell script to find out if a file exists without trying
+to open the file. Since implementations are allowed to add
+additional file types, a portable script cannot use:
+.sp
+.RS
+.nf
+
+\fBtest -b foo -o -c foo -o -d foo -o -f foo -o -p foo
+\fP
+.fi
+.RE
+.LP
+to find out if \fBfoo\fP is an existing file. On historical BSD systems,
+the existence of a file could be determined by:
+.sp
+.RS
+.nf
+
+\fBtest -f foo -o -d foo
+\fP
+.fi
+.RE
+.LP
+but there was no easy way to determine that an existing file was a
+regular file. An early proposal used the KornShell \fB-a\fP
+primary (with the same meaning), but this was changed to \fB-e\fP
+because there were concerns about the high probability of humans
+confusing the \fB-a\fP primary with the \fB-a\fP binary operator.
+.LP
+The following options were not included in this volume of IEEE\ Std\ 1003.1-2001,
+although they are provided by some
+implementations. These operands should not be used by new implementations
+for other purposes:
+.TP 7
+\fB-k\ \fP \fIfile\fP
+True if \fIfile\fP exists and its sticky bit is set.
+.TP 7
+\fB-C\ \fP \fIfile\fP
+True if \fIfile\fP is a contiguous file.
+.TP 7
+\fB-V\ \fP \fIfile\fP
+True if \fIfile\fP is a version file.
+.sp
+.LP
+The following option was not included because it was undocumented
+in most implementations, has been removed from some
+implementations (including System V), and the functionality is provided
+by the shell (see \fIParameter Expansion\fP .
+.TP 7
+\fB-l\ \fP \fIstring\fP
+The length of the string \fIstring\fP.
+.sp
+.LP
+The \fB-b\fP, \fB-c\fP, \fB-g\fP, \fB-p\fP, \fB-u\fP, and \fB-x\fP
+operands are derived from the SVID; historical BSD does
+not provide them. The \fB-k\fP operand is derived from System V; historical
+BSD does not provide it.
+.LP
+On historical BSD systems, \fItest\fP \fB-w\fP \fIdirectory\fP always
+returned false because \fItest\fP tried to open the
+directory for writing, which always fails.
+.LP
+Some additional primaries newly invented or from the KornShell appeared
+in an early proposal as part of the conditional command
+( \fB[[]]\fP): \fIs1\fP \fB>\fP \fIs2\fP, \fIs1\fP \fB<\fP \fIs2\fP,
+\fIstr\fP \fB=\fP \fIpattern\fP, \fIstr\fP
+\fB!=\fP \fIpattern\fP, \fIf1\fP \fB-nt\fP \fIf2\fP, \fIf1\fP \fB-ot\fP
+\fIf2\fP, and \fIf1\fP \fB-ef\fP \fIf2\fP. They
+were not carried forward into the \fItest\fP utility when the conditional
+command was removed from the shell because they have not
+been included in the \fItest\fP utility built into historical implementations
+of the \fIsh\fP
+utility.
+.LP
+The \fB-t\fP \fIfile_descriptor\fP primary is shown with a mandatory
+argument because the grammar is ambiguous if it can be
+omitted. Historical implementations have allowed it to be omitted,
+providing a default of 1.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIFile Read, Write, and Creation\fP, \fIfind\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/time.1p b/man-pages-posix-2003/man1p/time.1p
new file mode 100644
index 0000000..22bf445
--- /dev/null
+++ b/man-pages-posix-2003/man1p/time.1p
@@ -0,0 +1,283 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TIME" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" time
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+time \- time a simple command
+.SH SYNOPSIS
+.LP
+\fBtime\fP \fB[\fP\fB-p\fP\fB]\fP \fIutility\fP
+\fB[\fP\fIargument\fP\fB...\fP\fB]\fP\fB\fP
+.SH DESCRIPTION
+.LP
+The \fItime\fP utility shall invoke the utility named by the \fIutility\fP
+operand with arguments supplied as the
+\fIargument\fP operands and write a message to standard error that
+lists timing statistics for the utility. The message shall
+include the following information:
+.IP " *" 3
+The elapsed (real) time between invocation of \fIutility\fP and its
+termination.
+.LP
+.IP " *" 3
+The User CPU time, equivalent to the sum of the \fItms_utime\fP and
+\fItms_cutime\fP fields returned by the \fItimes\fP() function defined
+in the System Interfaces volume of IEEE\ Std\ 1003.1-2001 for
+the process in which \fIutility\fP is executed.
+.LP
+.IP " *" 3
+The System CPU time, equivalent to the sum of the \fItms_stime\fP
+and \fItms_cstime\fP fields returned by the \fItimes\fP() function
+for the process in which \fIutility\fP is executed.
+.LP
+.LP
+The precision of the timing shall be no less than the granularity
+defined for the size of the clock tick unit on the system, but
+the results shall be reported in terms of standard time units (for
+example, 0.02 seconds, 00:00:00.02, 1m33.75s, 365.21 seconds),
+not numbers of clock ticks.
+.LP
+When \fItime\fP is used as part of a pipeline, the times reported
+are unspecified, except when it is the sole command within a
+grouping command (see \fIGrouping Commands\fP ) in that pipeline.
+For example, the
+commands on the left are unspecified; those on the right report on
+utilities \fBa\fP and \fBc\fP, respectively:
+.sp
+.RS
+.nf
+
+\fBtime a | b | c { time a } | b | c
+a | b | time c a | b | (time c)
+\fP
+.fi
+.RE
+.SH OPTIONS
+.LP
+The \fItime\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following option shall be supported:
+.TP 7
+\fB-p\fP
+Write the timing output to standard error in the format shown in the
+STDERR section.
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIutility\fP
+The name of a utility that is to be invoked. If the \fIutility\fP
+operand names any of the special built-in utilities in \fISpecial
+Built-In Utilities\fP, the results are undefined.
+.TP 7
+\fIargument\fP
+Any string to be supplied as an argument when invoking the utility
+named by the \fIutility\fP operand.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fItime\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic and informative messages written to
+standard error.
+.TP 7
+\fILC_NUMERIC\fP
+.sp
+Determine the locale for numeric formatting.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fIPATH\fP
+Determine the search path that shall be used to locate the utility
+to be invoked; see the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 8, Environment Variables.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used to write the timing statistics. If
+\fB-p\fP is specified, the following format shall be used
+in the POSIX locale:
+.sp
+.RS
+.nf
+
+\fB"real %f\\nuser %f\\nsys %f\\n", <\fP\fIreal seconds\fP\fB>, <\fP\fIuser seconds\fP\fB>,
+ <\fP\fIsystem seconds\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where each floating-point number shall be expressed in seconds. The
+precision used may be less than the default six digits of
+\fB%f\fP, but shall be sufficiently precise to accommodate the size
+of the clock tick on the system (for example, if there were
+60 clock ticks per second, at least two digits shall follow the radix
+character). The number of digits following the radix
+character shall be no less than one, even if this always results in
+a trailing zero. The implementation may append white space and
+additional information following the format shown here.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+If the \fIutility\fP utility is invoked, the exit status of \fItime\fP
+shall be the exit status of \fIutility\fP; otherwise,
+the \fItime\fP utility shall exit with one of the following values:
+.TP 7
+1-125
+An error occurred in the \fItime\fP utility.
+.TP 7
+\ \ 126
+The utility specified by \fIutility\fP was found but could not be
+invoked.
+.TP 7
+\ \ 127
+The utility specified by \fIutility\fP could not be found.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The \fIcommand\fP, \fIenv\fP, \fInice\fP, \fInohup\fP, \fItime\fP,
+and \fIxargs\fP utilities have been specified to use exit code 127
+if an error occurs so that
+applications can distinguish "failure to find a utility" from "invoked
+utility exited with an error indication". The value 127
+was chosen because it is not commonly used for other meanings; most
+utilities use small values for "normal error conditions" and
+the values above 128 can be confused with termination due to receipt
+of a signal. The value 126 was chosen in a similar manner to
+indicate that the utility could be found, but not invoked. Some scripts
+produce meaningful error messages differentiating the 126
+and 127 cases. The distinction between exit codes 126 and 127 is based
+on KornShell practice that uses 127 when all attempts to
+\fIexec\fP the utility fail with [ENOENT], and uses 126 when any attempt
+to \fIexec\fP the utility fails for any other
+reason.
+.SH EXAMPLES
+.LP
+It is frequently desirable to apply \fItime\fP to pipelines or lists
+of commands. This can be done by placing pipelines and
+command lists in a single file; this file can then be invoked as a
+utility, and the \fItime\fP applies to everything in the
+file.
+.LP
+Alternatively, the following command can be used to apply \fItime\fP
+to a complex command:
+.sp
+.RS
+.nf
+
+\fBtime sh -c '\fP\fIcomplex-command-line\fP\fB'
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+When the \fItime\fP utility was originally proposed to be included
+in the ISO\ POSIX-2:1993 standard, questions were raised
+about its suitability for inclusion on the grounds that it was not
+useful for conforming applications, specifically:
+.IP " *" 3
+The underlying CPU definitions from the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001 are vague, so the numeric
+output could not be compared accurately between systems or even between
+invocations.
+.LP
+.IP " *" 3
+The creation of portable benchmark programs was outside the scope
+this volume of IEEE\ Std\ 1003.1-2001.
+.LP
+.LP
+However, \fItime\fP does fit in the scope of user portability. Human
+judgement can be applied to the analysis of the output,
+and it could be very useful in hands-on debugging of applications
+or in providing subjective measures of system performance. Hence
+it has been included in this volume of IEEE\ Std\ 1003.1-2001.
+.LP
+The default output format has been left unspecified because historical
+implementations differ greatly in their style of
+depicting this numeric output. The \fB-p\fP option was invented to
+provide scripts with a common means of obtaining this
+information.
+.LP
+In the KornShell, \fItime\fP is a shell reserved word that can be
+used to time an entire pipeline, rather than just a simple
+command. The POSIX definition has been worded to allow this implementation.
+Consideration was given to invalidating this approach
+because of the historical model from the C shell and System V shell.
+However, since the System V \fItime\fP utility historically
+has not produced accurate results in pipeline timing (because the
+constituent processes are not all owned by the same parent
+process, as allowed by POSIX), it did not seem worthwhile to break
+historical KornShell usage.
+.LP
+The term \fIutility\fP is used, rather than \fIcommand\fP, to highlight
+the fact that shell compound commands, pipelines,
+special built-ins, and so on, cannot be used directly. However, \fIutility\fP
+includes user application programs and shell
+scripts, not just the standard utilities.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIShell Command Language\fP, \fIsh\fP, the System Interfaces
+volume of IEEE\ Std\ 1003.1-2001, \fItimes\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/times.1p b/man-pages-posix-2003/man1p/times.1p
new file mode 100644
index 0000000..aa1968d
--- /dev/null
+++ b/man-pages-posix-2003/man1p/times.1p
@@ -0,0 +1,107 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TIMES" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" times
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+times \- write process times
+.SH SYNOPSIS
+.LP
+\fBtimes\fP
+.SH DESCRIPTION
+.LP
+The \fItimes\fP utility shall write the accumulated user and system
+times for the shell and for all of its child processes, in
+the following POSIX locale format:
+.sp
+.RS
+.nf
+
+\fB"%dm%fs %dm%fs\\n%dm%fs %dm%fs\\n", <\fP\fIshell user minutes\fP\fB>,
+ <\fP\fIshell user seconds\fP\fB>, <\fP\fIshell system minutes\fP\fB>,
+ <\fP\fIshell system seconds\fP\fB>, <\fP\fIchildren user minutes\fP\fB>,
+ <\fP\fIchildren user seconds\fP\fB>, <\fP\fIchildren system minutes\fP\fB>,
+ <\fP\fIchildren system seconds\fP\fB>
+\fP
+.fi
+.RE
+.LP
+The four pairs of times shall correspond to the members of the \fI<sys/times.h>\fP
+\fBtms\fP structure (defined in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 13, Headers) as returned by \fItimes\fP():
+\fItms_utime\fP, \fItms_stime\fP, \fItms_cutime\fP, and \fItms_cstime\fP,
+respectively.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+None.
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+None.
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+See the DESCRIPTION.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+Zero.
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.sp
+.RS
+.nf
+
+\fB$\fP \fBtimes
+\fP\fB0m0.43s 0m1.11s
+8m44.18s 1m43.23s\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+The \fItimes\fP special built-in from the Single UNIX Specification
+is now required for all conforming shells.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fISpecial Built-In Utilities\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/touch.1p b/man-pages-posix-2003/man1p/touch.1p
new file mode 100644
index 0000000..0003deb
--- /dev/null
+++ b/man-pages-posix-2003/man1p/touch.1p
@@ -0,0 +1,349 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TOUCH" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" touch
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+touch \- change file access and modification times
+.SH SYNOPSIS
+.LP
+\fBtouch\fP \fB[\fP\fB-acm\fP\fB][\fP \fB-r\fP \fIref_file\fP\fB|
+-t\fP \fItime\fP\fB]\fP
+\fIfile\fP\fB...\fP
+.SH DESCRIPTION
+.LP
+The \fItouch\fP utility shall change the modification times, access
+times, or both of files. The modification time shall be
+equivalent to the value of the \fIst_mtime\fP member of the \fBstat\fP
+structure for a file, as described in the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001; the access time shall
+be equivalent to the value of \fIst_atime\fP.
+.LP
+The time used can be specified by the \fB-t\fP \fItime\fP option-argument,
+the corresponding time fields of the file
+referenced by the \fB-r\fP \fIref_file\fP option-argument, or the
+\fIdate_time\fP operand, as specified in the following
+sections. If none of these are specified, \fItouch\fP shall use the
+current time (the value returned by the equivalent of the \fItime\fP()
+function defined in the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001).
+.LP
+For each \fIfile\fP operand, \fItouch\fP shall perform actions equivalent
+to the following functions defined in the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001:
+.IP " 1." 4
+If \fIfile\fP does not exist, a \fIcreat\fP() function call is made
+with the \fIfile\fP
+operand used as the \fIpath\fP argument and the value of the bitwise-inclusive
+OR of S_IRUSR, S_IWUSR, S_IRGRP, S_IWGRP, S_IROTH,
+and S_IWOTH used as the \fImode\fP argument.
+.LP
+.IP " 2." 4
+The \fIutime\fP() function is called with the following arguments:
+.RS
+.IP " a." 4
+The \fIfile\fP operand is used as the \fIpath\fP argument.
+.LP
+.IP " b." 4
+The \fButimbuf\fP structure members \fIactime\fP and \fImodtime\fP
+are determined as described in the OPTIONS section.
+.LP
+.RE
+.LP
+.SH OPTIONS
+.LP
+The \fItouch\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-a\fP
+Change the access time of \fIfile\fP. Do not change the modification
+time unless \fB-m\fP is also specified.
+.TP 7
+\fB-c\fP
+Do not create a specified \fIfile\fP if it does not exist. Do not
+write any diagnostic messages concerning this
+condition.
+.TP 7
+\fB-m\fP
+Change the modification time of \fIfile\fP. Do not change the access
+time unless \fB-a\fP is also specified.
+.TP 7
+\fB-r\ \fP \fIref_file\fP
+Use the corresponding time of the file named by the pathname \fIref_file\fP
+instead of the current time.
+.TP 7
+\fB-t\ \fP \fItime\fP
+Use the specified \fItime\fP instead of the current time. The option-argument
+shall be a decimal number of the form:
+.sp
+.RS
+.nf
+
+\fB[[\fP\fICC\fP\fB]\fP\fIYY\fP\fB]\fP\fIMMDDhhmm\fP\fB[\fP\fB.\fP\fISS\fP\fB]\fP
+.fi
+.RE
+.LP
+where each two digits represents the following:
+.TP 7
+\fIMM\fP
+.RS
+The month of the year [01,12].
+.RE
+.TP 7
+\fIDD\fP
+.RS
+The day of the month [01,31].
+.RE
+.TP 7
+\fIhh\fP
+.RS
+The hour of the day [00,23].
+.RE
+.TP 7
+\fImm\fP
+.RS
+The minute of the hour [00,59].
+.RE
+.TP 7
+\fICC\fP
+.RS
+The first two digits of the year (the century).
+.RE
+.TP 7
+\fIYY\fP
+.RS
+The second two digits of the year.
+.RE
+.TP 7
+\fISS\fP
+.RS
+The second of the minute [00,60].
+.RE
+.sp
+.LP
+Both \fICC\fP and \fIYY\fP shall be optional. If neither is given,
+the current year shall be assumed. If \fIYY\fP is
+specified, but \fICC\fP is not, \fICC\fP shall be derived as follows:
+.TS C
+center; l l.
+\fBIf \fIYY\fP is:\fP \fB\fICC\fP becomes:\fP
+[69,99] 19
+[00,68] 20
+.TE
+.TP 7
+\fBNote:\fP
+.RS
+It is expected that in a future version of IEEE\ Std\ 1003.1-2001
+the default century inferred from a 2-digit year will
+change. (This would apply to all commands accepting a 2-digit year
+as input.)
+.RE
+.sp
+.LP
+The resulting time shall be affected by the value of the \fITZ\fP
+environment variable. If the resulting time value precedes
+the Epoch, \fItouch\fP shall exit immediately with an error status.
+The range of valid times past the Epoch is
+implementation-defined, but it shall extend to at least the time 0
+hours, 0 minutes, 0 seconds, January 1, 2038, Coordinated
+Universal Time. Some implementations may not be able to represent
+dates beyond January 18, 2038, because they use \fBsigned int\fP
+as a time holder.
+.LP
+The range for \fISS\fP is [00,60] rather than [00,59] because of leap
+seconds. If \fISS\fP is 60, and the resulting time, as
+affected by the \fITZ\fP environment variable, does not refer to a
+leap second, the resulting time shall be one second after a
+time where \fISS\fP is 59. If \fISS\fP is not given a value, it is
+assumed to be zero.
+.sp
+.LP
+If neither the \fB-a\fP nor \fB-m\fP options were specified, \fItouch\fP
+shall behave as if both the \fB-a\fP and \fB-m\fP
+options were specified.
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of a file whose times shall be modified.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fItouch\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fITZ\fP
+Determine the timezone to be used for interpreting the \fItime\fP
+option-argument. If \fITZ\fP is unset or null, an
+unspecified default timezone shall be used.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+The utility executed successfully and all requested changes were made.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The interpretation of time is taken to be \fIseconds since the Epoch\fP
+(see the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 4.14, Seconds Since the Epoch). It
+should be noted that implementations conforming to the System Interfaces
+volume of IEEE\ Std\ 1003.1-2001 do not take leap
+seconds into account when computing seconds since the Epoch. When
+\fISS\fP=60 is used, the resulting time always refers to 1 plus
+\fIseconds since the Epoch\fP for a time when \fISS\fP=59.
+.LP
+Although the \fB-t\fP \fItime\fP option-argument specifies values
+in 1969, the access time and modification time fields are
+defined in terms of seconds since the Epoch (00:00:00 on 1 January
+1970 UTC). Therefore, depending on the value of \fITZ\fP when
+\fItouch\fP is run, there is never more than a few valid hours in
+1969 and there need not be any valid times in 1969.
+.LP
+One ambiguous situation occurs if \fB-t\fP \fItime\fP is not specified,
+\fB-r\fP \fIref_file\fP is not specified, and the
+first operand is an eight or ten-digit decimal number. A portable
+script can avoid this problem by using:
+.sp
+.RS
+.nf
+
+\fBtouch -- file
+\fP
+.fi
+.RE
+.LP
+or:
+.sp
+.RS
+.nf
+
+\fBtouch ./file
+\fP
+.fi
+.RE
+.LP
+in this case.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The functionality of \fItouch\fP is described almost entirely through
+references to functions in the System Interfaces volume
+of IEEE\ Std\ 1003.1-2001. In this way, there is no duplication of
+effort required for describing such side effects as the
+relationship of user IDs to the user database, permissions, and so
+on.
+.LP
+There are some significant differences between the \fItouch\fP utility
+in this volume of IEEE\ Std\ 1003.1-2001 and
+those in System V and BSD systems. They are upwards-compatible for
+historical applications from both implementations:
+.IP " 1." 4
+In System V, an ambiguity exists when a pathname that is a decimal
+number leads the operands; it is treated as a time value. In
+BSD, no \fItime\fP value is allowed; files may only be \fItouch\fPed
+to the current time. The \fB-t\fP \fItime\fP construct
+solves these problems for future conforming applications (note that
+the \fB-t\fP option is not historical practice).
+.LP
+.IP " 2." 4
+The inclusion of the century digits, \fICC\fP, is also new. Note that
+a ten-digit \fItime\fP value is treated as if \fIYY\fP,
+and not \fICC\fP, were specified. The caveat about the range of dates
+following the Epoch was included as recognition that some
+implementations are not able to represent dates beyond 18 January
+2038 because they use \fBsigned int\fP as a time holder.
+.LP
+.LP
+The \fB-r\fP option was added because several comments requested this
+capability. This option was named \fB-f\fP in an early
+proposal, but was changed because the \fB-f\fP option is used in the
+BSD version of \fItouch\fP with a different meaning.
+.LP
+At least one historical implementation of \fItouch\fP incremented
+the exit code if \fB-c\fP was specified and the file did not
+exist. This volume of IEEE\ Std\ 1003.1-2001 requires exit status
+zero if no errors occur.
+.SH FUTURE DIRECTIONS
+.LP
+Applications should use the \fB-r\fP or \fB-t\fP options.
+.SH SEE ALSO
+.LP
+\fIdate\fP, the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+\fIcreat\fP(), \fItime\fP(), \fIutime\fP(), the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, \fI<sys/stat.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/tput.1p b/man-pages-posix-2003/man1p/tput.1p
new file mode 100644
index 0000000..6f1711e
--- /dev/null
+++ b/man-pages-posix-2003/man1p/tput.1p
@@ -0,0 +1,233 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TPUT" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" tput
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+tput \- change terminal characteristics
+.SH SYNOPSIS
+.LP
+\fBtput\fP \fB[\fP\fB-T\fP \fItype\fP\fB]\fP \fIoperand\fP\fB... \fP
+.SH DESCRIPTION
+.LP
+The \fItput\fP utility shall display terminal-dependent information.
+The manner in which this information is retrieved is
+unspecified. The information displayed shall clear the terminal screen,
+initialize the user's terminal, or reset the user's
+terminal, depending on the operand given. The exact consequences of
+displaying this information are unspecified.
+.SH OPTIONS
+.LP
+The \fItput\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following option shall be supported:
+.TP 7
+\fB-T\ \fP \fItype\fP
+Indicate the type of terminal. If this option is not supplied and
+the \fITERM\fP variable is unset or null, an unspecified
+default terminal type shall be used. The setting of \fItype\fP shall
+take precedence over the value in \fITERM\fP.
+.sp
+.SH OPERANDS
+.LP
+The following strings shall be supported as operands by the implementation
+in the POSIX locale:
+.TP 7
+\fBclear\fP
+Display the clear-screen sequence.
+.TP 7
+\fBinit\fP
+Display the sequence that initializes the user's terminal in an implementation-defined
+manner.
+.TP 7
+\fBreset\fP
+Display the sequence that resets the user's terminal in an implementation-defined
+manner.
+.sp
+.LP
+If a terminal does not support any of the operations described by
+these operands, this shall not be considered an error
+condition.
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fItput\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fITERM\fP
+Determine the terminal type. If this variable is unset or null, and
+if the \fB-T\fP option is not specified, an unspecified
+default terminal type shall be used.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+If standard output is a terminal device, it may be used for writing
+the appropriate sequence to clear the screen or reset or
+initialize the terminal. If standard output is not a terminal device,
+undefined results occur.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+The requested string was written successfully.
+.TP 7
+\ 1
+Unspecified.
+.TP 7
+\ 2
+Usage error.
+.TP 7
+\ 3
+No information is available about the specified terminal type.
+.TP 7
+\ 4
+The specified operand is invalid.
+.TP 7
+>4
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+If one of the operands is not available for the terminal, \fItput\fP
+continues processing the remaining operands.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The difference between resetting and initializing a terminal is left
+unspecified, as they vary greatly based on hardware types.
+In general, resetting is a more severe action.
+.LP
+Some terminals use control characters to perform the stated functions,
+and on such terminals it might make sense to use
+\fItput\fP to store the initialization strings in a file or environment
+variable for later use. However, because other terminals
+might rely on system calls to do this work, the standard output cannot
+be used in a portable manner, such as the following
+non-portable constructs:
+.sp
+.RS
+.nf
+
+\fBClearVar=`tput clear`
+tput reset | mailx -s "Wake Up" ddg
+\fP
+.fi
+.RE
+.SH EXAMPLES
+.IP " 1." 4
+Initialize the terminal according to the type of terminal in the environmental
+variable \fITERM\fP. This command can be
+included in a \fB.profile\fP file.
+.sp
+.RS
+.nf
+
+\fBtput init
+\fP
+.fi
+.RE
+.LP
+.IP " 2." 4
+Reset a 450 terminal.
+.sp
+.RS
+.nf
+
+\fBtput -T 450 reset
+\fP
+.fi
+.RE
+.LP
+.SH RATIONALE
+.LP
+The list of operands was reduced to a minimum for the following reasons:
+.IP " *" 3
+The only features chosen were those that were likely to be used by
+human users interacting with a terminal.
+.LP
+.IP " *" 3
+Specifying the full \fIterminfo\fP set was not considered desirable,
+but the standard developers did not want to select among
+operands.
+.LP
+.IP " *" 3
+This volume of IEEE\ Std\ 1003.1-2001 does not attempt to provide
+applications with sophisticated terminal handling
+capabilities, as that falls outside of its assigned scope and intersects
+with the responsibilities of other standards bodies.
+.LP
+.LP
+The difference between resetting and initializing a terminal is left
+unspecified as this varies greatly based on hardware types.
+In general, resetting is a more severe action.
+.LP
+The exit status of 1 is historically reserved for finding out if a
+Boolean operand is not set. Although the operands were
+reduced to a minimum, the exit status of 1 should still be reserved
+for the Boolean operands, for those sites that wish to support
+them.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIstty\fP, \fItabs\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/tr.1p b/man-pages-posix-2003/man1p/tr.1p
new file mode 100644
index 0000000..47d4780
--- /dev/null
+++ b/man-pages-posix-2003/man1p/tr.1p
@@ -0,0 +1,543 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TR" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" tr
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+tr \- translate characters
+.SH SYNOPSIS
+.LP
+\fBtr\fP \fB[\fP\fB-c | -C\fP\fB][\fP\fB-s]\fP \fIstring1 string2\fP\fB
+.br
+.sp
+tr -s\fP \fB[\fP\fB-c | -C\fP\fB]\fP \fIstring1\fP\fB
+.br
+.sp
+tr -d\fP \fB[\fP\fB-c | -C\fP\fB]\fP \fIstring1\fP\fB
+.br
+.sp
+tr -ds\fP \fB[\fP\fB-c | -C\fP\fB]\fP \fIstring1 string2\fP\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fItr\fP utility shall copy the standard input to the standard
+output with substitution or deletion of selected characters.
+The options specified and the \fIstring1\fP and \fIstring2\fP operands
+shall control translations that occur while copying
+characters and single-character collating elements.
+.SH OPTIONS
+.LP
+The \fItr\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-c\fP
+Complement the set of values specified by \fIstring1\fP. See the EXTENDED
+DESCRIPTION section.
+.TP 7
+\fB-C\fP
+Complement the set of characters specified by \fIstring1\fP. See the
+EXTENDED DESCRIPTION section.
+.TP 7
+\fB-d\fP
+Delete all occurrences of input characters that are specified by \fIstring1\fP.
+.TP 7
+\fB-s\fP
+Replace instances of repeated characters with a single character,
+as described in the EXTENDED DESCRIPTION section.
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIstring1\fP,\ \fIstring2\fP
+.sp
+Translation control strings. Each string shall represent a set of
+characters to be converted into an array of characters used for
+the translation. For a detailed description of how the strings are
+interpreted, see the EXTENDED DESCRIPTION section.
+.sp
+.SH STDIN
+.LP
+The standard input can be any type of file.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fItr\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_COLLATE\fP
+.sp
+Determine the locale for the behavior of range expressions and equivalence
+classes.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments) and the behavior of
+character classes.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The \fItr\fP output shall be identical to the input, with the exception
+of the specified transformations.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+The operands \fIstring1\fP and \fIstring2\fP (if specified) define
+two arrays of characters. The constructs in the following
+list can be used to specify characters or single-character collating
+elements. If any of the constructs result in multi-character
+collating elements, \fItr\fP shall exclude, without a diagnostic,
+those multi-character elements from the resulting array.
+.TP 7
+\fIcharacter\fP
+Any character not described by one of the conventions below shall
+represent itself.
+.TP 7
+\\\fIoctal\fP
+Octal sequences can be used to represent characters with specific
+coded values. An octal sequence shall consist of a backslash
+followed by the longest sequence of one, two, or three-octal-digit
+characters (01234567). The sequence shall cause the value whose
+encoding is represented by the one, two, or three-digit octal integer
+to be placed into the array. If the size of a byte on the
+system is greater than nine bits, the valid escape sequence used to
+represent a byte is implementation-defined. Multi-byte
+characters require multiple, concatenated escape sequences of this
+type, including the leading \fB'\\'\fP for each byte.
+.TP 7
+\\\fIcharacter\fP
+The backslash-escape sequences in the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Table 5-1, Escape Sequences
+and Associated Actions ( \fB'\\\\'\fP, \fB'\\a'\fP, \fB'\\b'\fP,
+\fB'\\f'\fP, \fB'\\n'\fP, \fB'\\r'\fP,
+\fB'\\t'\fP, \fB'\\v'\fP ) shall be supported. The results of using
+any other character, other than an octal digit, following
+the backslash are unspecified.
+.TP 7
+\fIc\fP-\fIc\fP
+In the POSIX locale, this construct shall represent the range of collating
+elements between the range endpoints (as long as
+neither endpoint is an octal sequence of the form \\\fIoctal\fP),
+inclusive, as defined by the collation sequence. The characters
+or collating elements in the range shall be placed in the array in
+ascending collation sequence. If the second endpoint precedes
+the starting endpoint in the collation sequence, it is unspecified
+whether the range of collating elements is empty, or this
+construct is treated as invalid. In locales other than the POSIX locale,
+this construct has unspecified behavior.
+.LP
+If either or both of the range endpoints are octal sequences of the
+form \\\fIoctal\fP, this shall represent the range of
+specific coded values between the two range endpoints, inclusive.
+.TP 7
+.B :\fIclass\fP:
+Represents all characters belonging to the defined character class,
+as defined by the current setting of the \fILC_CTYPE\fP
+locale category. The following character class names shall be accepted
+when specified in \fIstring1\fP:
+.TS C
+center; l l l l l l.
+\fBalnum\fP \fBblank\fP \fBdigit\fP \fBlower\fP \fBpunct\fP \fBupper\fP
+\fBalpha\fP \fBcntrl\fP \fBgraph\fP \fBprint\fP \fBspace\fP \fBxdigit\fP
+.TE
+.LP
+In addition, character class expressions of the form [: \fIname\fP:]
+shall be recognized in those locales where the \fIname\fP
+keyword has been given a \fBcharclass\fP definition in the \fILC_CTYPE\fP
+category.
+.LP
+When both the \fB-d\fP and \fB-s\fP options are specified, any of
+the character class names shall be accepted in
+\fIstring2\fP. Otherwise, only character class names \fBlower\fP or
+\fBupper\fP are valid in \fIstring2\fP and then only if the
+corresponding character class ( \fBupper\fP and \fBlower\fP, respectively)
+is specified in the same relative position in
+\fIstring1\fP. Such a specification shall be interpreted as a request
+for case conversion. When [: \fIlower\fP:] appears in
+\fIstring1\fP and [: \fIupper\fP:] appears in \fIstring2\fP, the arrays
+shall contain the characters from the \fBtoupper\fP
+mapping in the \fILC_CTYPE\fP category of the current locale. When
+[: \fIupper\fP:] appears in \fIstring1\fP and [:
+\fIlower\fP:] appears in \fIstring2\fP, the arrays shall contain the
+characters from the \fBtolower\fP mapping in the
+\fILC_CTYPE\fP category of the current locale. The first character
+from each mapping pair shall be in the array for \fIstring1\fP
+and the second character from each mapping pair shall be in the array
+for \fIstring2\fP in the same relative position.
+.LP
+Except for case conversion, the characters specified by a character
+class expression shall be placed in the array in an
+unspecified order.
+.LP
+If the name specified for \fIclass\fP does not define a valid character
+class in the current locale, the behavior is
+undefined.
+.TP 7
+.B =\fIequiv\fP=
+Represents all characters or collating elements belonging to the same
+equivalence class as \fIequiv\fP, as defined by the
+current setting of the \fILC_COLLATE\fP locale category. An equivalence
+class expression shall be allowed only in \fIstring1\fP,
+or in \fIstring2\fP when it is being used by the combined \fB-d\fP
+and \fB-s\fP options. The characters belonging to the
+equivalence class shall be placed in the array in an unspecified order.
+.TP 7
+.B \fIx\fP*\fIn\fP
+Represents \fIn\fP repeated occurrences of the character \fIx\fP.
+Because this expression is used to map multiple characters
+to one, it is only valid when it occurs in \fIstring2\fP. If \fIn\fP
+is omitted or is zero, it shall be interpreted as large
+enough to extend the \fIstring2\fP-based sequence to the length of
+the \fIstring1\fP-based sequence. If \fIn\fP has a leading
+zero, it shall be interpreted as an octal value. Otherwise, it shall
+be interpreted as a decimal value.
+.sp
+.LP
+When the \fB-d\fP option is not specified:
+.IP " *" 3
+Each input character found in the array specified by \fIstring1\fP
+shall be replaced by the character in the same relative
+position in the array specified by \fIstring2\fP. When the array specified
+by \fIstring2\fP is shorter that the one specified by
+\fIstring1\fP, the results are unspecified.
+.LP
+.IP " *" 3
+If the \fB-C\fP option is specified, the complements of the characters
+specified by \fIstring1\fP (the set of all characters
+in the current character set, as defined by the current setting of
+\fILC_CTYPE\fP, except for those actually specified in the
+\fIstring1\fP operand) shall be placed in the array in ascending collation
+sequence, as defined by the current setting of
+\fILC_COLLATE\fP.
+.LP
+.IP " *" 3
+If the \fB-c\fP option is specified, the complement of the values
+specified by \fIstring1\fP shall be placed in the array in
+ascending order by binary value.
+.LP
+.IP " *" 3
+Because the order in which characters specified by character class
+expressions or equivalence class expressions is undefined,
+such expressions should only be used if the intent is to map several
+characters into one. An exception is case conversion, as
+described previously.
+.LP
+.LP
+When the \fB-d\fP option is specified:
+.IP " *" 3
+Input characters found in the array specified by \fIstring1\fP shall
+be deleted.
+.LP
+.IP " *" 3
+When the \fB-C\fP option is specified with \fB-d\fP, all characters
+except those specified by \fIstring1\fP shall be deleted.
+The contents of \fIstring2\fP are ignored, unless the \fB-s\fP option
+is also specified.
+.LP
+.IP " *" 3
+When the \fB-c\fP option is specified with \fB-d\fP, all values except
+those specified by \fIstring1\fP shall be deleted. The
+contents of \fIstring2\fP shall be ignored, unless the \fB-s\fP option
+is also specified.
+.LP
+.IP " *" 3
+The same string cannot be used for both the \fB-d\fP and the \fB-s\fP
+option; when both options are specified, both
+\fIstring1\fP (used for deletion) and \fIstring2\fP (used for squeezing)
+shall be required.
+.LP
+.LP
+When the \fB-s\fP option is specified, after any deletions or translations
+have taken place, repeated sequences of the same
+character shall be replaced by one occurrence of the same character,
+if the character is found in the array specified by the last
+operand. If the last operand contains a character class, such as the
+following example:
+.sp
+.RS
+.nf
+
+\fBtr -s '[:space:]'
+\fP
+.fi
+.RE
+.LP
+the last operand's array shall contain all of the characters in that
+character class. However, in a case conversion, as
+described previously, such as:
+.sp
+.RS
+.nf
+
+\fBtr -s '[:upper:]' '[:lower:]'
+\fP
+.fi
+.RE
+.LP
+the last operand's array shall contain only those characters defined
+as the second characters in each of the \fBtoupper\fP or
+\fBtolower\fP character pairs, as appropriate.
+.LP
+An empty string used for \fIstring1\fP or \fIstring2\fP produces undefined
+results.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+All input was processed successfully.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+If necessary, \fIstring1\fP and \fIstring2\fP can be quoted to avoid
+pattern matching by the shell.
+.LP
+If an ordinary digit (representing itself) is to follow an octal sequence,
+the octal sequence must use the full three digits to
+avoid ambiguity.
+.LP
+When \fIstring2\fP is shorter than \fIstring1\fP, a difference results
+between historical System\ V and BSD systems. A BSD
+system pads \fIstring2\fP with the last character found in \fIstring2\fP.
+Thus, it is possible to do the following:
+.sp
+.RS
+.nf
+
+\fBtr 0123456789 d
+\fP
+.fi
+.RE
+.LP
+which would translate all digits to the letter \fB'd'\fP . Since this
+area is specifically unspecified in this volume of
+IEEE\ Std\ 1003.1-2001, both the BSD and System\ V behaviors are allowed,
+but a conforming application cannot rely on
+the BSD behavior. It would have to code the example in the following
+way:
+.sp
+.RS
+.nf
+
+\fBtr 0123456789 '[d*]'
+\fP
+.fi
+.RE
+.LP
+It should be noted that, despite similarities in appearance, the string
+operands used by \fItr\fP are not regular
+expressions.
+.LP
+Unlike some historical implementations, this definition of the \fItr\fP
+utility correctly processes NUL characters in its input
+stream. NUL characters can be stripped by using:
+.sp
+.RS
+.nf
+
+\fBtr -d '\\000'
+\fP
+.fi
+.RE
+.SH EXAMPLES
+.IP " 1." 4
+The following example creates a list of all words in \fBfile1\fP one
+per line in \fBfile2\fP, where a word is taken to be a
+maximal string of letters.
+.sp
+.RS
+.nf
+
+\fBtr -cs "[:alpha:]" "[\\n*]" <file1 >file2
+\fP
+.fi
+.RE
+.LP
+.IP " 2." 4
+The next example translates all lowercase characters in \fBfile1\fP
+to uppercase and writes the results to standard output.
+.sp
+.RS
+.nf
+
+\fBtr "[:lower:]" "[:upper:]" <file1
+\fP
+.fi
+.RE
+.LP
+.IP " 3." 4
+This example uses an equivalence class to identify accented variants
+of the base character \fB'e'\fP in \fBfile1\fP, which
+are stripped of diacritical marks and written to \fBfile2\fP.
+.sp
+.RS
+.nf
+
+\fBtr "[=e=]" e <file1 >file2
+\fP
+.fi
+.RE
+.LP
+.SH RATIONALE
+.LP
+In some early proposals, an explicit option \fB-n\fP was added to
+disable the historical behavior of stripping NUL characters
+from the input. It was considered that automatically stripping NUL
+characters from the input was not correct functionality.
+However, the removal of \fB-n\fP in a later proposal does not remove
+the requirement that \fItr\fP correctly process NUL
+characters in its input stream. NUL characters can be stripped by
+using \fItr\fP \fB-d\fP '\\000'.
+.LP
+Historical implementations of \fItr\fP differ widely in syntax and
+behavior. For example, the BSD version has not needed the
+bracket characters for the repetition sequence. The \fItr\fP utility
+syntax is based more closely on the System V and XPG3 model
+while attempting to accommodate historical BSD implementations. In
+the case of the short \fIstring2\fP padding, the decision was
+to unspecify the behavior and preserve System V and XPG3 scripts,
+which might find difficulty with the BSD method. The assumption
+was made that BSD users of \fItr\fP have to make accommodations to
+meet the syntax defined here. Since it is possible to use the
+repetition sequence to duplicate the desired behavior, whereas there
+is no simple way to achieve the System V method, this was the
+correct, if not desirable, approach.
+.LP
+The use of octal values to specify control characters, while having
+historical precedents, is not portable. The introduction of
+escape sequences for control characters should provide the necessary
+portability. It is recognized that this may cause some
+historical scripts to break.
+.LP
+An early proposal included support for multi-character collating elements.
+It was pointed out that, while \fItr\fP does employ
+some syntactical elements from REs, the aim of \fItr\fP is quite different;
+ranges, for example, do not have a similar meaning
+(``any of the chars in the range matches", \fIversus\fP "translate
+each character in the range to the output counterpart"). As
+a result, the previously included support for multi-character collating
+elements has been removed. What remains are ranges in
+current collation order (to support, for example, accented characters),
+character classes, and equivalence classes.
+.LP
+In XPG3 the [: \fIclass\fP:] and [= \fIequiv\fP=] conventions are
+shown with double brackets, as in RE syntax. However,
+\fItr\fP does not implement RE principles; it just borrows part of
+the syntax. Consequently, [: \fIclass\fP:] and [=
+\fIequiv\fP=] should be regarded as syntactical elements on a par
+with [ \fIx\fP* \fIn\fP], which is not an RE bracket
+expression.
+.LP
+The standard developers will consider changes to \fItr\fP that allow
+it to translate characters between different character
+encodings, or they will consider providing a new utility to accomplish
+this.
+.LP
+On historical System V systems, a range expression requires enclosing
+square-brackets, such as:
+.sp
+.RS
+.nf
+
+\fBtr '[a-z]' '[A-Z]'
+\fP
+.fi
+.RE
+.LP
+However, BSD-based systems did not require the brackets, and this
+convention is used here to avoid breaking large numbers of BSD
+scripts:
+.sp
+.RS
+.nf
+
+\fBtr a-z A-Z
+\fP
+.fi
+.RE
+.LP
+The preceding System V script will continue to work because the brackets,
+treated as regular characters, are translated to
+themselves. However, any System V script that relied on \fB"a-z"\fP
+representing the three characters \fB'a'\fP,
+\fB'-'\fP, and \fB'z'\fP have to be rewritten as \fB"az-"\fP .
+.LP
+The ISO\ POSIX-2:1993 standard had a \fB-c\fP option that behaved
+similarly to the \fB-C\fP option, but did not supply
+functionality equivalent to the \fB-c\fP option specified in IEEE\ Std\ 1003.1-2001.
+This meant that historical practice
+of being able to specify \fItr\fP \fB-d\fP\\200-\\377 (which would
+delete all bytes with the top bit set) would have no effect
+because, in the C locale, bytes with the values octal 200 to octal
+377 are not characters.
+.LP
+The earlier version also said that octal sequences referred to collating
+elements and could be placed adjacent to each other to
+specify multi-byte characters. However, it was noted that this caused
+ambiguities because \fItr\fP would not be able to tell
+whether adjacent octal sequences were intending to specify multi-byte
+characters or multiple single byte characters.
+IEEE\ Std\ 1003.1-2001 specifies that octal sequences always refer
+to single byte binary values.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsed\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/trap.1p b/man-pages-posix-2003/man1p/trap.1p
new file mode 100644
index 0000000..028a66c
--- /dev/null
+++ b/man-pages-posix-2003/man1p/trap.1p
@@ -0,0 +1,245 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TRAP" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" trap
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+trap \- trap signals
+.SH SYNOPSIS
+.LP
+\fBtrap\fP \fB[\fP\fIaction condition\fP \fB...\fP\fB]\fP
+.SH DESCRIPTION
+.LP
+If \fIaction\fP is \fB'-'\fP, the shell shall reset each \fIcondition\fP
+to the default value. If \fIaction\fP is null (
+\fB""\fP ), the shell shall ignore each specified \fIcondition\fP
+if it arises. Otherwise, the argument \fIaction\fP shall be
+read and executed by the shell when one of the corresponding conditions
+arises. The action of \fItrap\fP shall override a previous
+action (either default action or one explicitly set). The value of
+\fB"$?"\fP after the \fItrap\fP action completes shall be
+the value it had before \fItrap\fP was invoked.
+.LP
+The condition can be EXIT, 0 (equivalent to EXIT), or a signal specified
+using a symbolic name, without the SIG prefix, as
+listed in the tables of signal names in the \fI<signal.h>\fP header
+defined in the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 13, Headers;
+for example, HUP, INT, QUIT, TERM. Implementations may permit names
+with the SIG prefix or ignore case in signal names as an
+extension. Setting a trap for SIGKILL or SIGSTOP produces undefined
+results.
+.LP
+The environment in which the shell executes a \fItrap\fP on EXIT shall
+be identical to the environment immediately after the
+last command executed before the \fItrap\fP on EXIT was taken.
+.LP
+Each time \fItrap\fP is invoked, the \fIaction\fP argument shall be
+processed in a manner equivalent to:
+.sp
+.RS
+.nf
+
+\fBeval\fP \fIaction\fP
+.fi
+.RE
+.LP
+Signals that were ignored on entry to a non-interactive shell cannot
+be trapped or reset, although no error need be reported
+when attempting to do so. An interactive shell may reset or catch
+signals ignored on entry. Traps shall remain in place for a given
+shell until explicitly changed with another \fItrap\fP command.
+.LP
+When a subshell is entered, traps that are not being ignored are set
+to the default actions. This does not imply that the
+\fItrap\fP command cannot be used within the subshell to set new traps.
+.LP
+The \fItrap\fP command with no arguments shall write to standard output
+a list of commands associated with each condition. The
+format shall be:
+.sp
+.RS
+.nf
+
+\fB"trap -- %s %s ...\\n", <\fP\fIaction\fP\fB>, <\fP\fIcondition\fP\fB> ...
+\fP
+.fi
+.RE
+.LP
+The shell shall format the output, including the proper use of quoting,
+so that it is suitable for reinput to the shell as
+commands that achieve the same trapping results. For example:
+.sp
+.RS
+.nf
+
+\fBsave_traps=$(trap)
+\&...
+eval "$save_traps"
+\fP
+.fi
+.RE
+.LP
+XSI-conformant systems also allow numeric signal numbers for the conditions
+corresponding to the following signal names:
+.TS C
+center; l l.
+\fBSignal Number\fP \fBSignal Name\fP
+1 SIGHUP
+2 SIGINT
+3 SIGQUIT
+6 SIGABRT
+9 SIGKILL
+14 SIGALRM
+15 SIGTERM
+.TE
+.LP
+The \fItrap\fP special built-in shall conform to the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+See the DESCRIPTION.
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+None.
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+See the DESCRIPTION.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+If the trap name or number is invalid, a non-zero
+exit status shall be returned; otherwise, zero shall be returned.
+For both interactive and non-interactive shells, invalid signal
+names or numbers shall not be considered a syntax error and do
+not cause the shell to abort.
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+Write out a list of all traps and actions:
+.sp
+.RS
+.nf
+
+\fBtrap
+\fP
+.fi
+.RE
+.LP
+Set a trap so the \fIlogout\fP utility in the directory referred to
+by the \fIHOME\fP
+environment variable executes when the shell terminates:
+.sp
+.RS
+.nf
+
+\fBtrap '$HOME/logout' EXIT
+\fP
+.fi
+.RE
+.LP
+or:
+.sp
+.RS
+.nf
+
+\fBtrap '$HOME/logout' 0
+\fP
+.fi
+.RE
+.LP
+Unset traps on INT, QUIT, TERM, and EXIT:
+.sp
+.RS
+.nf
+
+\fBtrap - INT QUIT TERM EXIT
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+Implementations may permit lowercase signal names as an extension.
+Implementations may also accept the names with the SIG
+prefix; no known historical shell does so. The \fItrap\fP and \fIkill\fP
+utilities in this
+volume of IEEE\ Std\ 1003.1-2001 are now consistent in their omission
+of the SIG prefix for signal names. Some \fIkill\fP implementations
+do not allow the prefix, and \fIkill\fP \fB-l\fP lists the signals
+without prefixes.
+.LP
+Trapping SIGKILL or SIGSTOP is syntactically accepted by some historical
+implementations, but it has no effect. Portable POSIX
+applications cannot attempt to trap these signals.
+.LP
+The output format is not historical practice. Since the output of
+historical \fItrap\fP commands is not portable (because
+numeric signal values are not portable) and had to change to become
+so, an opportunity was taken to format the output in a way that
+a shell script could use to save and then later reuse a trap if it
+wanted.
+.LP
+The KornShell uses an \fBERR\fP trap that is triggered whenever \fIset\fP
+\fB-e\fP would
+cause an exit. This is allowable as an extension, but was not mandated,
+as other shells have not used it.
+.LP
+The text about the environment for the EXIT trap invalidates the behavior
+of some historical versions of interactive shells
+which, for example, close the standard input before executing a trap
+on 0. For example, in some historical interactive shell
+sessions the following trap on 0 would always print \fB"--"\fP :
+.sp
+.RS
+.nf
+
+\fBtrap 'read foo; echo "-$foo-"' 0
+\fP
+.fi
+.RE
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fISpecial Built-In Utilities\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/true.1p b/man-pages-posix-2003/man1p/true.1p
new file mode 100644
index 0000000..37ca14a
--- /dev/null
+++ b/man-pages-posix-2003/man1p/true.1p
@@ -0,0 +1,96 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TRUE" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" true
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+true \- return true value
+.SH SYNOPSIS
+.LP
+\fBtrue\fP
+.SH DESCRIPTION
+.LP
+The \fItrue\fP utility shall return with exit code zero.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+None.
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+None.
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+Not used.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+Zero.
+.SH CONSEQUENCES OF ERRORS
+.LP
+None.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+This utility is typically used in shell scripts, as shown in the EXAMPLES
+section. The special built-in utility \fB:\fP is
+sometimes more efficient than \fItrue\fP.
+.SH EXAMPLES
+.LP
+This command is executed forever:
+.sp
+.RS
+.nf
+
+\fBwhile true
+do
+ command
+done
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+The \fItrue\fP utility has been retained in this volume of IEEE\ Std\ 1003.1-2001,
+even though the shell special
+built-in \fB:\fP provides similar functionality, because \fItrue\fP
+is widely used in historical scripts and is less cryptic to
+novice script readers.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfalse\fP, \fIShell Commands\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/tsort.1p b/man-pages-posix-2003/man1p/tsort.1p
new file mode 100644
index 0000000..d94d55a
--- /dev/null
+++ b/man-pages-posix-2003/man1p/tsort.1p
@@ -0,0 +1,159 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TSORT" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" tsort
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+tsort \- topological sort
+.SH SYNOPSIS
+.LP
+\fBtsort\fP \fB[\fP\fIfile\fP\fB]\fP\fB\fP
+.SH DESCRIPTION
+.LP
+The \fItsort\fP utility shall write to standard output a totally ordered
+list of items consistent with a partial ordering of
+items contained in the input.
+.LP
+The application shall ensure that the input consists of pairs of items
+(non-empty strings) separated by <blank>s. Pairs of
+different items indicate ordering. Pairs of identical items indicate
+presence, but not ordering.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of a text file to order. If no \fIfile\fP operand is given,
+the standard input shall be used.
+.sp
+.SH STDIN
+.LP
+The standard input shall be a text file that is used if no \fIfile\fP
+operand is given.
+.SH INPUT FILES
+.LP
+The input file named by the \fIfile\fP operand is a text file.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fItsort\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The standard output shall be a text file consisting of the order list
+produced from the partially ordered input.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The \fILC_COLLATE\fP variable need not affect the actions of \fItsort\fP.
+The output ordering is not lexicographic, but
+depends on the pairs of items given as input.
+.SH EXAMPLES
+.LP
+The command:
+.sp
+.RS
+.nf
+
+\fBtsort <<EOF
+a b c c d e
+g g
+f g e f
+h h
+EOF
+\fP
+.fi
+.RE
+.LP
+produces the output:
+.sp
+.RS
+.nf
+
+\fBa
+b
+c
+d
+e
+f
+g
+h\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+None.
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/tty.1p b/man-pages-posix-2003/man1p/tty.1p
new file mode 100644
index 0000000..165b325
--- /dev/null
+++ b/man-pages-posix-2003/man1p/tty.1p
@@ -0,0 +1,152 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TTY" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" tty
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+tty \- return user's terminal name
+.SH SYNOPSIS
+.LP
+\fBtty\fP
+.SH DESCRIPTION
+.LP
+The \fItty\fP utility shall write to the standard output the name
+of the terminal that is open as standard input. The name that
+is used shall be equivalent to the string that would be returned by
+the \fIttyname\fP()
+function defined in the System Interfaces volume of IEEE\ Std\ 1003.1-2001.
+.SH OPTIONS
+.LP
+The \fItty\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.SH OPERANDS
+.LP
+None.
+.SH STDIN
+.LP
+While no input is read from standard input, standard input shall be
+examined to determine whether or not it is a terminal, and,
+if so, to determine the name of the terminal.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fItty\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard error and
+informative messages written to standard output.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+If standard input is a terminal device, a pathname of the terminal
+as specified by the \fIttyname\fP() function defined in the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001
+shall be written in the following format:
+.sp
+.RS
+.nf
+
+\fB"%s\\n", <\fP\fIterminal name\fP\fB>
+\fP
+.fi
+.RE
+.LP
+Otherwise, a message shall be written indicating that standard input
+is not connected to a terminal. In the POSIX locale, the
+\fItty\fP utility shall use the format:
+.sp
+.RS
+.nf
+
+\fB"not a tty\\n"
+\fP
+.fi
+.RE
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Standard input is a terminal.
+.TP 7
+\ 1
+Standard input is not a terminal.
+.TP 7
+>1
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+This utility checks the status of the file open as standard input
+against that of an implementation-defined set of files. It is
+possible that no match can be found, or that the match found need
+not be the same file as that which was opened for standard input
+(although they are the same device).
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIisatty\fP(),
+\fIttyname\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/type.1p b/man-pages-posix-2003/man1p/type.1p
new file mode 100644
index 0000000..cff8591
--- /dev/null
+++ b/man-pages-posix-2003/man1p/type.1p
@@ -0,0 +1,142 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TYPE" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" type
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+type \- write a description of command type
+.SH SYNOPSIS
+.LP
+\fBtype\fP \fIname\fP\fB... \fP
+.SH DESCRIPTION
+.LP
+The \fItype\fP utility shall indicate how each argument would be interpreted
+if used as a command name.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIname\fP
+A name to be interpreted.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fItype\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fIPATH\fP
+Determine the location of \fIname\fP, as described in the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 8, Environment Variables.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The standard output of \fItype\fP contains information about each
+operand in an unspecified format. The information provided
+typically identifies the operand as a shell built-in, function, alias,
+or keyword, and where applicable, may display the operand's
+pathname.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Since \fItype\fP must be aware of the contents of the current shell
+execution environment (such as the lists of commands,
+functions, and built-ins processed by \fIhash\fP), it is always provided
+as a shell regular
+built-in. If it is called in a separate utility execution environment,
+such as one of the following:
+.sp
+.RS
+.nf
+
+\fBnohup type writer
+find . -type f | xargs type
+\fP
+.fi
+.RE
+it might not produce accurate results.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcommand\fP, \fIhash\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/ulimit.1p b/man-pages-posix-2003/man1p/ulimit.1p
new file mode 100644
index 0000000..a73c07b
--- /dev/null
+++ b/man-pages-posix-2003/man1p/ulimit.1p
@@ -0,0 +1,178 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ULIMIT" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ulimit
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ulimit \- set or report file size limit
+.SH SYNOPSIS
+.LP
+\fBulimit\fP \fB[\fP\fB-f\fP\fB][\fP\fIblocks\fP\fB]\fP\fB\fP
+.SH DESCRIPTION
+.LP
+The \fIulimit\fP utility shall set or report the file-size writing
+limit imposed on files written by the shell and its child
+processes (files of any size may be read). Only a process with appropriate
+privileges can increase the limit.
+.SH OPTIONS
+.LP
+The \fIulimit\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following option shall be supported:
+.TP 7
+\fB-f\fP
+Set (or report, if no \fIblocks\fP operand is present), the file size
+limit in blocks. The \fB-f\fP option shall also be the
+default case.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIblocks\fP
+The number of 512-byte blocks to use as the new file size limit.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIulimit\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The standard output shall be used when no \fIblocks\fP operand is
+present. If the current number of blocks is limited, the
+number of blocks in the current limit shall be written in the following
+format:
+.sp
+.RS
+.nf
+
+\fB"%d\\n", <\fP\fInumber of 512-byte blocks\fP\fB>
+\fP
+.fi
+.RE
+.LP
+If there is no current limit on the number of blocks, in the POSIX
+locale the following format shall be used:
+.sp
+.RS
+.nf
+
+\fB"unlimited\\n"
+\fP
+.fi
+.RE
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+A request for a higher limit was rejected or an error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Since \fIulimit\fP affects the current shell execution environment,
+it is always provided as a shell regular built-in. If it is
+called in a separate utility execution environment, such as one of
+the following:
+.sp
+.RS
+.nf
+
+\fBnohup ulimit -f 10000
+env ulimit 10000
+\fP
+.fi
+.RE
+.LP
+it does not affect the file size limit of the caller's environment.
+.LP
+Once a limit has been decreased by a process, it cannot be increased
+(unless appropriate privileges are involved), even back to
+the original system limit.
+.SH EXAMPLES
+.LP
+Set the file size limit to 51200 bytes:
+.sp
+.RS
+.nf
+
+\fBulimit -f 100
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIulimit\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/umask.1p b/man-pages-posix-2003/man1p/umask.1p
new file mode 100644
index 0000000..c8a644c
--- /dev/null
+++ b/man-pages-posix-2003/man1p/umask.1p
@@ -0,0 +1,315 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "UMASK" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" umask
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+umask \- get or set the file mode creation mask
+.SH SYNOPSIS
+.LP
+\fBumask\fP \fB[\fP\fB-S\fP\fB][\fP\fImask\fP\fB]\fP
+.SH DESCRIPTION
+.LP
+The \fIumask\fP utility shall set the file mode creation mask of the
+current shell execution environment (see \fIShell Execution Environment\fP
+) to the value specified by the \fImask\fP operand. This mask
+shall affect the initial value of the file permission bits of subsequently
+created files. If \fIumask\fP is called in a subshell
+or separate utility execution environment, such as one of the following:
+.sp
+.RS
+.nf
+
+\fB(umask 002)
+nohup umask ...
+find . -exec umask ... \\;
+\fP
+.fi
+.RE
+.LP
+it shall not affect the file mode creation mask of the caller's environment.
+.LP
+If the \fImask\fP operand is not specified, the \fIumask\fP utility
+shall write to standard output the value of the invoking
+process' file mode creation mask.
+.SH OPTIONS
+.LP
+The \fIumask\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following option shall be supported:
+.TP 7
+\fB-S\fP
+Produce symbolic output.
+.sp
+.LP
+The default output style is unspecified, but shall be recognized on
+a subsequent invocation of \fIumask\fP on the same system
+as a \fImask\fP operand to restore the previous file mode creation
+mask.
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fImask\fP
+A string specifying the new file mode creation mask. The string is
+treated in the same way as the \fImode\fP operand described
+in the EXTENDED DESCRIPTION section for \fIchmod\fP.
+.LP
+For a \fIsymbolic_mode\fP value, the new value of the file mode creation
+mask shall be the logical complement of the file
+permission bits portion of the file mode specified by the \fIsymbolic_mode\fP
+string.
+.LP
+In a \fIsymbolic_mode\fP value, the permissions \fIop\fP characters
+\fB'+'\fP and \fB'-'\fP shall be interpreted
+relative to the current file mode creation mask; \fB'+'\fP shall cause
+the bits for the indicated permissions to be cleared in
+the mask; \fB'-'\fP shall cause the bits for the indicated permissions
+to be set in the mask.
+.LP
+The interpretation of \fImode\fP values that specify file mode bits
+other than the file permission bits is unspecified.
+.LP
+In the octal integer form of \fImode\fP, the specified bits are set
+in the file mode creation mask.
+.LP
+The file mode creation mask shall be set to the resulting numeric
+value.
+.LP
+The default output of a prior invocation of \fIumask\fP on the same
+system with no operand also shall be recognized as a
+\fImask\fP operand.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIumask\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+When the \fImask\fP operand is not specified, the \fIumask\fP utility
+shall write a message to standard output that can later
+be used as a \fIumask\fP \fImask\fP operand.
+.LP
+If \fB-S\fP is specified, the message shall be in the following format:
+.sp
+.RS
+.nf
+
+\fB"u=%s,g=%s,o=%s\\n", <\fP\fIowner permissions\fP\fB>, <\fP\fIgroup permissions\fP\fB>,
+ <\fP\fIother permissions\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where the three values shall be combinations of letters from the set
+{ \fIr\fP, \fIw\fP, \fIx\fP}; the presence of a letter
+shall indicate that the corresponding bit is clear in the file mode
+creation mask.
+.LP
+If a \fImask\fP operand is specified, there shall be no output written
+to standard output.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+The file mode creation mask was successfully changed, or no \fImask\fP
+operand was supplied.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Since \fIumask\fP affects the current shell execution environment,
+it is generally provided as a shell regular built-in.
+.LP
+In contrast to the negative permission logic provided by the file
+mode creation mask and the octal number form of the
+\fImask\fP argument, the symbolic form of the \fImask\fP argument
+specifies those permissions that are left alone.
+.SH EXAMPLES
+.LP
+Either of the commands:
+.sp
+.RS
+.nf
+
+\fBumask a=rx,ug+w
+.sp
+
+umask 002
+\fP
+.fi
+.RE
+.LP
+sets the mode mask so that subsequently created files have their S_IWOTH
+bit cleared.
+.LP
+After setting the mode mask with either of the above commands, the
+\fIumask\fP command can be used to write out the current
+value of the mode mask:
+.sp
+.RS
+.nf
+
+\fB$\fP \fBumask
+\fP\fB0002\fP
+.fi
+.RE
+.LP
+(The output format is unspecified, but historical implementations
+use the octal integer mode format.)
+.sp
+.RS
+.nf
+
+\fB$\fP \fBumask -S
+\fP\fBu=rwx,g=rwx,o=rx\fP
+.fi
+.RE
+.LP
+Either of these outputs can be used as the mask operand to a subsequent
+invocation of the \fIumask\fP utility.
+.LP
+Assuming the mode mask is set as above, the command:
+.sp
+.RS
+.nf
+
+\fBumask g-w
+\fP
+.fi
+.RE
+.LP
+sets the mode mask so that subsequently created files have their S_IWGRP
+and S_IWOTH bits cleared.
+.LP
+The command:
+.sp
+.RS
+.nf
+
+\fBumask -- -w
+\fP
+.fi
+.RE
+.LP
+sets the mode mask so that subsequently created files have all their
+write bits cleared. Note that \fImask\fP operands
+\fB-r\fP, \fB-w\fP, \fB-x\fP or anything beginning with a hyphen,
+must be preceded by \fB"--"\fP to keep it from being
+interpreted as an option.
+.SH RATIONALE
+.LP
+Since \fIumask\fP affects the current shell execution environment,
+it is generally provided as a shell regular built-in. If it
+is called in a subshell or separate utility execution environment,
+such as one of the following:
+.sp
+.RS
+.nf
+
+\fB(umask 002)
+nohup umask ...
+find . -exec umask ... \\;
+\fP
+.fi
+.RE
+.LP
+it does not affect the file mode creation mask of the environment
+of the caller.
+.LP
+The description of the historical utility was modified to allow it
+to use the symbolic modes of \fIchmod\fP. The \fB-s\fP option used
+in early proposals was changed to \fB-S\fP because \fB-s\fP
+could be confused with a \fIsymbolic_mode\fP form of mask referring
+to the S_ISUID and S_ISGID bits.
+.LP
+The default output style is implementation-defined to permit implementors
+to provide migration to the new symbolic style at the
+time most appropriate to their users. A \fB-o\fP flag to force octal
+mode output was omitted because the octal mode may not be
+sufficient to specify all of the information that may be present in
+the file mode creation mask when more secure file access
+permission checks are implemented.
+.LP
+It has been suggested that trusted systems developers might appreciate
+ameliorating the requirement that the mode mask
+"affects" the file access permissions, since it seems access control
+lists might replace the mode mask to some degree. The
+wording has been changed to say that it affects the file permission
+bits, and it leaves the details of the behavior of how they
+affect the file access permissions to the description in the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIShell Command Language\fP, \fIchmod\fP, the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIumask\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/unalias.1p b/man-pages-posix-2003/man1p/unalias.1p
new file mode 100644
index 0000000..2ce902c
--- /dev/null
+++ b/man-pages-posix-2003/man1p/unalias.1p
@@ -0,0 +1,151 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "UNALIAS" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" unalias
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+unalias \- remove alias definitions
+.SH SYNOPSIS
+.LP
+\fBunalias\fP \fIalias-name\fP\fB...
+.br
+.sp
+unalias -a \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIunalias\fP utility shall remove the definition for each alias
+name specified. See \fIAlias Substitution\fP . The aliases shall be
+removed from the current shell execution
+environment; see \fIShell Execution Environment\fP .
+.SH OPTIONS
+.LP
+The \fIunalias\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following option shall be supported:
+.TP 7
+\fB-a\fP
+Remove all alias definitions from the current shell execution environment.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIalias-name\fP
+The name of an alias to be removed.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIunalias\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+One of the \fIalias-name\fP operands specified did not represent a
+valid alias definition, or an error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Since \fIunalias\fP affects the current shell execution environment,
+it is generally provided as a shell regular built-in.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIunalias\fP description is based on that from historical KornShell
+implementations. Known differences exist between that
+and the C shell. The KornShell version was adopted to be consistent
+with all the other KornShell features in this volume of
+IEEE\ Std\ 1003.1-2001, such as command line editing.
+.LP
+The \fB-a\fP option is the equivalent of the \fIunalias\fP * form
+of the C shell and is provided to address security concerns
+about unknown aliases entering the environment of a user (or application)
+through the allowable implementation-defined predefined
+alias route or as a result of an \fIENV\fP file. (Although \fIunalias\fP
+could be used to simplify the "secure" shell script
+shown in the \fIcommand\fP rationale, it does not obviate the need
+to quote all command
+names. An initial call to \fIunalias\fP \fB-a\fP would have to be
+quoted in case there was an alias for \fIunalias\fP.)
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIShell Command Language\fP, \fIalias\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/uname.1p b/man-pages-posix-2003/man1p/uname.1p
new file mode 100644
index 0000000..b99eebc
--- /dev/null
+++ b/man-pages-posix-2003/man1p/uname.1p
@@ -0,0 +1,205 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "UNAME" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" uname
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+uname \- return system name
+.SH SYNOPSIS
+.LP
+\fBuname\fP \fB[\fP\fB-snrvma\fP\fB]\fP
+.SH DESCRIPTION
+.LP
+By default, the \fIuname\fP utility shall write the operating system
+name to standard output. When options are specified,
+symbols representing one or more system characteristics shall be written
+to the standard output. The format and contents of the
+symbols are implementation-defined. On systems conforming to the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001, the
+symbols written shall be those supported by the \fIuname\fP() function
+as defined in the
+System Interfaces volume of IEEE\ Std\ 1003.1-2001.
+.SH OPTIONS
+.LP
+The \fIuname\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-a\fP
+Behave as though all of the options \fB-mnrsv\fP were specified.
+.TP 7
+\fB-m\fP
+Write the name of the hardware type on which the system is running
+to standard output.
+.TP 7
+\fB-n\fP
+Write the name of this node within an implementation-defined communications
+network.
+.TP 7
+\fB-r\fP
+Write the current release level of the operating system implementation.
+.TP 7
+\fB-s\fP
+Write the name of the implementation of the operating system.
+.TP 7
+\fB-v\fP
+Write the current version level of this release of the operating system
+implementation.
+.sp
+.LP
+If no options are specified, the \fIuname\fP utility shall write the
+operating system name, as if the \fB-s\fP option had been
+specified.
+.SH OPERANDS
+.LP
+None.
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIuname\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+By default, the output shall be a single line of the following form:
+.sp
+.RS
+.nf
+
+\fB"%s\\n", <\fP\fIsysname\fP\fB>
+\fP
+.fi
+.RE
+.LP
+If the \fB-a\fP option is specified, the output shall be a single
+line of the following form:
+.sp
+.RS
+.nf
+
+\fB"%s %s %s %s %s\\n", <\fP\fIsysname\fP\fB>, <\fP\fInodename\fP\fB>, <\fP\fIrelease\fP\fB>,
+ <\fP\fIversion\fP\fB>, <\fP\fImachine\fP\fB>
+\fP
+.fi
+.RE
+.LP
+Additional implementation-defined symbols may be written; all such
+symbols shall be written at the end of the line of output
+before the <newline>.
+.LP
+If options are specified to select different combinations of the symbols,
+only those symbols shall be written, in the order
+shown above for the \fB-a\fP option. If a symbol is not selected for
+writing, its corresponding trailing <blank>s also shall
+not be written.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+The requested information was successfully written.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Note that any of the symbols could include embedded <space>s, which
+may affect parsing algorithms if multiple options are
+selected for output.
+.LP
+The node name is typically a name that the system uses to identify
+itself for inter-system communication addressing.
+.SH EXAMPLES
+.LP
+The following command:
+.sp
+.RS
+.nf
+
+\fBuname -sr
+\fP
+.fi
+.RE
+.LP
+writes the operating system name and release level, separated by one
+or more <blank>s.
+.SH RATIONALE
+.LP
+It was suggested that this utility cannot be used portably since the
+format of the symbols is implementation-defined. The
+POSIX.1 working group could not achieve consensus on defining these
+formats in the underlying \fIuname\fP() function, and there was no
+expectation that this volume of
+IEEE\ Std\ 1003.1-2001 would be any more successful. Some applications
+may still find this historical utility of value. For
+example, the symbols could be used for system log entries or for comparison
+with operator or user input.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIuname\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/uncompress.1p b/man-pages-posix-2003/man1p/uncompress.1p
new file mode 100644
index 0000000..a96faad
--- /dev/null
+++ b/man-pages-posix-2003/man1p/uncompress.1p
@@ -0,0 +1,168 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "UNCOMPRESS" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" uncompress
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+uncompress \- expand compressed data
+.SH SYNOPSIS
+.LP
+\fBuncompress\fP \fB[\fP\fB-cfv\fP\fB][\fP\fIfile\fP\fB...\fP\fB]\fP\fB\fP
+.SH DESCRIPTION
+.LP
+The \fIuncompress\fP utility shall restore files to their original
+state after they have been compressed using the \fIcompress\fP utility.
+If no files are specified, the standard input shall be uncompressed
+to
+the standard output. If the invoking process has appropriate privileges,
+the ownership, modes, access time, and modification time
+of the original file shall be preserved.
+.LP
+This utility shall support the uncompressing of any files produced
+by the \fIcompress\fP utility on the same implementation. For files
+produced by \fIcompress\fP on other systems, \fIuncompress\fP supports
+9 to 14-bit compression (see \fIcompress\fP, \fB-b\fP); it is implementation-defined
+whether values of \fB-b\fP greater than 14 are
+supported.
+.SH OPTIONS
+.LP
+The \fIuncompress\fP utility shall conform to the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-c\fP
+Write to standard output; no files are changed.
+.TP 7
+\fB-f\fP
+Do not prompt for overwriting files. Except when run in the background,
+if \fB-f\fP is not given the user shall be prompted as
+to whether an existing file should be overwritten. If the standard
+input is not a terminal and \fB-f\fP is not given,
+\fIuncompress\fP shall write a diagnostic message to standard error
+and exit with a status greater than zero.
+.TP 7
+\fB-v\fP
+Write messages to standard error concerning the expansion of each
+file.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of a file. If \fIfile\fP already has the \fB.Z\fP suffix
+specified, it shall be used as the input file and the
+output file shall be named \fBfile\fP with the \fB.Z\fP suffix removed.
+Otherwise, \fIfile\fP shall be used as the name of the
+output file and \fBfile\fP with the \fB.Z\fP suffix appended shall
+be used as the input file.
+.sp
+.SH STDIN
+.LP
+The standard input shall be used only if no \fIfile\fP operands are
+specified, or if a \fIfile\fP operand is \fB'-'\fP
+\&.
+.SH INPUT FILES
+.LP
+Input files shall be in the format produced by the \fIcompress\fP
+utility.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIuncompress\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+When there are no \fIfile\fP operands or the \fB-c\fP option is specified,
+the uncompressed output is written to standard
+output.
+.SH STDERR
+.LP
+Prompts shall be written to the standard error output under the conditions
+specified in the DESCRIPTION and OPTIONS sections.
+The prompts shall contain the \fIfile\fP pathname, but their format
+is otherwise unspecified. Otherwise, the standard error output
+shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+Output files are the same as the respective input files to \fIcompress\fP.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+The input file remains unmodified.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The limit of 14 on the \fIcompress\fP \fB-b\fP \fIbits\fP argument
+is to achieve
+portability to all systems (within the restrictions imposed by the
+lack of an explicit published file format). Some implementations
+based on 16-bit architectures cannot support 15 or 16-bit uncompression.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcompress\fP, \fIzcat\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/unexpand.1p b/man-pages-posix-2003/man1p/unexpand.1p
new file mode 100644
index 0000000..7727966
--- /dev/null
+++ b/man-pages-posix-2003/man1p/unexpand.1p
@@ -0,0 +1,187 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "UNEXPAND" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" unexpand
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+unexpand \- convert spaces to tabs
+.SH SYNOPSIS
+.LP
+\fBunexpand\fP \fB[\fP \fB-a| -t\fP \fItablist\fP\fB][\fP\fIfile\fP\fB...\fP\fB]\fP\fB\fP
+.SH DESCRIPTION
+.LP
+The \fIunexpand\fP utility shall copy files or standard input to standard
+output, converting <blank>s at the beginning of
+each line into the maximum number of <tab>s followed by the minimum
+number of <space>s needed to fill the same column
+positions originally filled by the translated <blank>s. By default,
+tabstops shall be set at every eighth column position.
+Each <backspace> shall be copied to the output, and shall cause the
+column position count for tab calculations to be
+decremented; the count shall never be decremented to a value less
+than one.
+.SH OPTIONS
+.LP
+The \fIunexpand\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-a\fP
+In addition to translating <blank>s at the beginning of each line,
+translate all sequences of two or more <blank>s
+immediately preceding a tab stop to the maximum number of <tab>s followed
+by the minimum number of <space>s needed to
+fill the same column positions originally filled by the translated
+<blank>s.
+.TP 7
+\fB-t\ \fP \fItablist\fP
+Specify the tab stops. The application shall ensure that the \fItablist\fP
+option-argument is a single argument consisting of
+a single positive decimal integer or multiple positive decimal integers,
+separated by <blank>s or commas, in ascending order.
+If a single number is given, tabs shall be set \fItablist\fP column
+positions apart instead of the default 8. If multiple numbers
+are given, the tabs shall be set at those specific column positions.
+.LP
+The application shall ensure that each tab-stop position \fIN\fP is
+an integer value greater than zero, and the list shall be
+in strictly ascending order. This is taken to mean that, from the
+start of a line of output, tabbing to position \fIN\fP shall
+cause the next character output to be in the ( \fIN\fP+1)th column
+position on that line. When the \fB-t\fP option is not
+specified, the default shall be the equivalent of specifying \fB-t\ 8\fP
+(except for the interaction with \fB-a\fP, described
+below).
+.LP
+No <space>-to- <tab> conversions shall occur for characters at positions
+beyond the last of those specified in a
+multiple tab-stop list.
+.LP
+When \fB-t\fP is specified, the presence or absence of the \fB-a\fP
+option shall be ignored; conversion shall not be limited
+to the processing of leading <blank>s.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of a text file to be used as input.
+.sp
+.SH STDIN
+.LP
+See the INPUT FILES section.
+.SH INPUT FILES
+.LP
+The input files shall be text files.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIunexpand\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files), the
+processing of <tab>s and <space>s, and for the
+determination of the width in column positions each character would
+occupy on an output device.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The standard output shall be equivalent to the input files with the
+specified <space>-to- <tab> conversions.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+One non-intuitive aspect of \fIunexpand\fP is its restriction to leading
+spaces when neither \fB-a\fP nor \fB-t\fP is
+specified. Users who always want to convert all spaces in a file can
+easily alias \fIunexpand\fP to use the \fB-a\fP or
+\fB-t\ 8\fP option.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+On several occasions, consideration was given to adding a \fB-t\fP
+option to the \fIunexpand\fP utility to complement the
+\fB-t\fP in \fIexpand\fP (see \fIexpand\fP ). The historical
+intent of \fIunexpand\fP was to translate multiple <blank>s into tab
+stops, where tab stops were a multiple of eight column
+positions on most UNIX systems. An early proposal omitted \fB-t\fP
+because it seemed outside the scope of the User Portability
+Utilities option; it was not described in any of the base documents.
+However, hard-coding tab stops every eight columns was not
+suitable for the international community and broke historical precedents
+for some vendors in the FORTRAN community, so \fB-t\fP
+was restored in conjunction with the list of valid extension categories
+considered by the standard developers. Thus,
+\fIunexpand\fP is now the logical converse of \fIexpand\fP.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexpand\fP, \fItabs\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/unget.1p b/man-pages-posix-2003/man1p/unget.1p
new file mode 100644
index 0000000..9fc1779
--- /dev/null
+++ b/man-pages-posix-2003/man1p/unget.1p
@@ -0,0 +1,179 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "UNGET" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" unget
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+unget \- undo a previous get of an SCCS file (\fBDEVELOPMENT\fP)
+.SH SYNOPSIS
+.LP
+\fBunget\fP \fB[\fP\fB-ns\fP\fB][\fP\fB-r\fP \fISID\fP\fB]\fP \fIfile\fP\fB...
+\fP
+.SH DESCRIPTION
+.LP
+The \fIunget\fP utility shall reverse the effect of a \fIget\fP \fB-e\fP
+done prior to
+creating the intended new delta.
+.SH OPTIONS
+.LP
+The \fIunget\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-r\ \fP \fISID\fP
+Uniquely identify which delta is no longer intended. (This would have
+been specified by \fIget\fP as the new delta.) The use of this option
+is necessary only if two or more outstanding \fIget\fP commands for
+editing on the same SCCS file were done by the same person (login
+name).
+.TP 7
+\fB-s\fP
+Suppress the writing to standard output of the intended delta's SID.
+.TP 7
+\fB-n\fP
+Retain the file that was obtained by \fIget\fP, which would normally
+be removed from the
+current directory.
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of an existing SCCS file or a directory. If \fIfile\fP
+is a directory, the \fIunget\fP utility shall behave as
+though each file in the directory were specified as a named file,
+except that non-SCCS files (last component of the pathname does
+not begin with \fBs.\fP) and unreadable files shall be silently ignored.
+.LP
+If exactly one \fIfile\fP operand appears, and it is \fB'-'\fP, the
+standard input shall be read; each line of the standard
+input shall be taken to be the name of an SCCS file to be processed.
+Non-SCCS files and unreadable files shall be silently
+ignored.
+.sp
+.SH STDIN
+.LP
+The standard input shall be a text file used only when the \fIfile\fP
+operand is specified as \fB'-'\fP . Each line of the
+text file shall be interpreted as an SCCS pathname.
+.SH INPUT FILES
+.LP
+Any SCCS files processed shall be files of an unspecified format.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIunget\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The standard output shall consist of a line for each file, in the
+following format:
+.sp
+.RS
+.nf
+
+\fB"%s\\n", <\fP\fISID removed from file\fP\fB>
+\fP
+.fi
+.RE
+.LP
+If there is more than one named file or if a directory or standard
+input is named, each pathname shall be written before each of
+the preceding lines:
+.sp
+.RS
+.nf
+
+\fB"\\n%s:\\n", <\fP\fIpathname\fP\fB>
+\fP
+.fi
+.RE
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+Any SCCS files updated shall be files of an unspecified format. During
+processing of a \fIfile\fP, a locking \fIz-file\fP, as
+described in \fIget\fP, and a \fIq-file\fP (a working copy of the
+\fIp-file\fP), may be
+created and deleted. The \fIp-file\fP and \fIg-file\fP, as described
+in \fIget\fP, shall be
+deleted.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIdelta\fP, \fIget\fP, \fIsact\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/uniq.1p b/man-pages-posix-2003/man1p/uniq.1p
new file mode 100644
index 0000000..b3fe31e
--- /dev/null
+++ b/man-pages-posix-2003/man1p/uniq.1p
@@ -0,0 +1,302 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "UNIQ" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" uniq
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+uniq \- report or filter out repeated lines in a file
+.SH SYNOPSIS
+.LP
+\fBuniq\fP \fB[\fP\fB-c|-d|-u\fP\fB][\fP\fB-f\fP \fIfields\fP\fB][\fP\fB-s\fP
+\fIchar\fP\fB][\fP\fIinput_file\fP \fB[\fP\fIoutput_file\fP\fB]]\fP
+.SH DESCRIPTION
+.LP
+The \fIuniq\fP utility shall read an input file comparing adjacent
+lines, and write one copy of each input line on the output.
+The second and succeeding copies of repeated adjacent input lines
+shall not be written.
+.LP
+Repeated lines in the input shall not be detected if they are not
+adjacent.
+.SH OPTIONS
+.LP
+The \fIuniq\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-c\fP
+Precede each output line with a count of the number of times the line
+occurred in the input.
+.TP 7
+\fB-d\fP
+Suppress the writing of lines that are not repeated in the input.
+.TP 7
+\fB-f\ \fP \fIfields\fP
+Ignore the first \fIfields\fP fields on each input line when doing
+comparisons, where \fIfields\fP is a positive decimal
+integer. A field is the maximal string matched by the basic regular
+expression:
+.sp
+.RS
+.nf
+
+\fB[[:blank:]]*[^[:blank:]]*
+\fP
+.fi
+.RE
+.LP
+If the \fIfields\fP option-argument specifies more fields than appear
+on an input line, a null string shall be used for
+comparison.
+.TP 7
+\fB-s\ \fP \fIchars\fP
+Ignore the first \fIchars\fP characters when doing comparisons, where
+\fIchars\fP shall be a positive decimal integer. If
+specified in conjunction with the \fB-f\fP option, the first \fIchars\fP
+characters after the first \fIfields\fP fields shall be
+ignored. If the \fIchars\fP option-argument specifies more characters
+than remain on an input line, a null string shall be used
+for comparison.
+.TP 7
+\fB-u\fP
+Suppress the writing of lines that are repeated in the input.
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIinput_file\fP
+A pathname of the input file. If the \fIinput_file\fP operand is not
+specified, or if the \fIinput_file\fP is \fB'-'\fP,
+the standard input shall be used.
+.TP 7
+\fIoutput_file\fP
+A pathname of the output file. If the \fIoutput_file\fP operand is
+not specified, the standard output shall be used. The
+results are unspecified if the file named by \fIoutput_file\fP is
+the file named by \fIinput_file\fP.
+.sp
+.SH STDIN
+.LP
+The standard input shall be used only if no \fIinput_file\fP operand
+is specified or if \fIinput_file\fP is \fB'-'\fP . See
+the INPUT FILES section.
+.SH INPUT FILES
+.LP
+The input file shall be a text file.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIuniq\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_COLLATE\fP
+.sp
+Determine the locale for ordering rules.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files) and
+which characters constitute a <blank> in the current
+locale.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The standard output shall be used only if no \fIoutput_file\fP operand
+is specified. See the OUTPUT FILES section.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+If the \fB-c\fP option is specified, the output file shall be empty
+or each line shall be of the form:
+.sp
+.RS
+.nf
+
+\fB"%d %s", <\fP\fInumber of duplicates\fP\fB>, <\fP\fIline\fP\fB>
+\fP
+.fi
+.RE
+.LP
+otherwise, the output file shall be empty or each line shall be of
+the form:
+.sp
+.RS
+.nf
+
+\fB"%s", <\fP\fIline\fP\fB>
+\fP
+.fi
+.RE
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+The utility executed successfully.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The \fIsort\fP utility can be used to cause repeated lines to be adjacent
+in the input
+file.
+.SH EXAMPLES
+.LP
+The following input file data (but flushed left) was used for a test
+series on \fIuniq\fP:
+.sp
+.RS
+.nf
+
+\fB#01 foo0 bar0 foo1 bar1
+#02 bar0 foo1 bar1 foo1
+#03 foo0 bar0 foo1 bar1
+#04
+#05 foo0 bar0 foo1 bar1
+#06 foo0 bar0 foo1 bar1
+#07 bar0 foo1 bar1 foo0
+\fP
+.fi
+.RE
+.LP
+What follows is a series of test invocations of the \fIuniq\fP utility
+that use a mixture of \fIuniq\fP options against the
+input file data. These tests verify the meaning of \fIadjacent\fP.
+The \fIuniq\fP utility views the input data as a sequence of
+strings delimited by \fB'\\n'\fP . Accordingly, for the \fIfields\fPth
+member of the sequence, \fIuniq\fP interprets unique or
+repeated adjacent lines strictly relative to the \fIfields\fP+1th
+member.
+.IP " 1." 4
+This first example tests the line counting option, comparing each
+line of the input file data starting from the second
+field:
+.sp
+.RS
+.nf
+
+\fBuniq -c -f 1 uniq_0I.t
+ 1 #01 foo0 bar0 foo1 bar1
+ 1 #02 bar0 foo1 bar1 foo0
+ 1 #03 foo0 bar0 foo1 bar1
+ 1 #04
+ 2 #05 foo0 bar0 foo1 bar1
+ 1 #07 bar0 foo1 bar1 foo0
+\fP
+.fi
+.RE
+.LP
+The number \fB'2'\fP, prefixing the fifth line of output, signifies
+that the \fIuniq\fP utility detected a pair of repeated
+lines. Given the input data, this can only be true when \fIuniq\fP
+is run using the \fB-f\ 1\fP option (which shall cause
+\fIuniq\fP to ignore the first field on each input line).
+.LP
+.IP " 2." 4
+The second example tests the option to suppress unique lines, comparing
+each line of the input file data starting from the
+second field:
+.sp
+.RS
+.nf
+
+\fBuniq -d -f 1 uniq_0I.t
+#05 foo0 bar0 foo1 bar1
+\fP
+.fi
+.RE
+.LP
+.IP " 3." 4
+This test suppresses repeated lines, comparing each line of the input
+file data starting from the second field:
+.sp
+.RS
+.nf
+
+\fBuniq -u -f 1 uniq_0I.t
+#01 foo0 bar0 foo1 bar1
+#02 bar0 foo1 bar1 foo1
+#03 foo0 bar0 foo1 bar1
+#04
+#07 bar0 foo1 bar1 foo0
+\fP
+.fi
+.RE
+.LP
+.IP " 4." 4
+This suppresses unique lines, comparing each line of the input file
+data starting from the third character:
+.sp
+.RS
+.nf
+
+\fBuniq -d -s 2 uniq_0I.t
+\fP
+.fi
+.RE
+.LP
+In the last example, the \fIuniq\fP utility found no input matching
+the above criteria.
+.LP
+.SH RATIONALE
+.LP
+Some historical implementations have limited lines to be 1080 bytes
+in length, which does not meet the implied {LINE_MAX}
+limit.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcomm\fP, \fIsort\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/unlink.1p b/man-pages-posix-2003/man1p/unlink.1p
new file mode 100644
index 0000000..b16c886
--- /dev/null
+++ b/man-pages-posix-2003/man1p/unlink.1p
@@ -0,0 +1,129 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "UNLINK" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" unlink
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+unlink \- call the unlink function
+.SH SYNOPSIS
+.LP
+\fBunlink\fP \fIfile\fP\fB\fP
+.SH DESCRIPTION
+.LP
+The \fIunlink\fP utility shall perform the function call:
+.sp
+.RS
+.nf
+
+\fBunlink(\fP\fIfile\fP\fB);
+\fP
+.fi
+.RE
+.LP
+A user may need appropriate privilege to invoke the \fIunlink\fP utility.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIfile\fP
+The pathname of an existing file.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+Not used.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIunlink\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+.sp
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+None.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIlink\fP(), \fIrm\fP, the System Interfaces volume of
+IEEE\ Std\ 1003.1-2001, \fIunlink\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/unset.1p b/man-pages-posix-2003/man1p/unset.1p
new file mode 100644
index 0000000..3cbd6b4
--- /dev/null
+++ b/man-pages-posix-2003/man1p/unset.1p
@@ -0,0 +1,147 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "UNSET" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" unset
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+unset \- unset values and attributes of variables and functions
+.SH SYNOPSIS
+.LP
+\fBunset\fP \fB[\fP\fB-fv\fP\fB]\fP \fIname\fP \fB...\fP
+.SH DESCRIPTION
+.LP
+Each variable or function specified by \fIname\fP shall be unset.
+.LP
+If \fB-v\fP is specified, \fIname\fP refers to a variable name and
+the shell shall unset it and remove it from the
+environment. Read-only variables cannot be unset.
+.LP
+If \fB-f\fP is specified, \fIname\fP refers to a function and the
+shell shall unset the function definition.
+.LP
+If neither \fB-f\fP nor \fB-v\fP is specified, \fIname\fP refers to
+a variable; if a variable by that name does not exist, it
+is unspecified whether a function by that name, if any, shall be unset.
+.LP
+Unsetting a variable or function that was not previously set shall
+not be considered an error and does not cause the shell to
+abort.
+.LP
+The \fIunset\fP special built-in shall support the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+Note that:
+.sp
+.RS
+.nf
+
+\fBVARIABLE=
+\fP
+.fi
+.RE
+.LP
+is not equivalent to an \fIunset\fP of \fBVARIABLE\fP; in the example,
+\fBVARIABLE\fP is set to \fB""\fP . Also, the
+variables that can be \fIunset\fP should not be misinterpreted to
+include the special parameters (see \fISpecial Parameters\fP ).
+.SH OPTIONS
+.LP
+See the DESCRIPTION.
+.SH OPERANDS
+.LP
+See the DESCRIPTION.
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+None.
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.TP 7
+\ 0
+All \fIname\fP operands were successfully unset.
+.TP 7
+>0
+At least one \fIname\fP could not be unset.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+Unset \fIVISUAL\fP variable:
+.sp
+.RS
+.nf
+
+\fBunset -v VISUAL
+\fP
+.fi
+.RE
+.LP
+Unset the functions \fBfoo\fP and \fBbar\fP:
+.sp
+.RS
+.nf
+
+\fBunset -f foo bar
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+Consideration was given to omitting the \fB-f\fP option in favor of
+an
+\fIunfunction\fP utility, but the standard developers decided to retain
+historical
+practice.
+.LP
+The \fB-v\fP option was introduced because System V historically used
+one name space for both variables and functions. When
+\fIunset\fP is used without options, System V historically unset either
+a function or a variable, and there was no confusion about
+which one was intended. A portable POSIX application can use \fIunset\fP
+without an option to unset a variable, but not a
+function; the \fB-f\fP option must be used.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fISpecial Built-In Utilities\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/uucp.1p b/man-pages-posix-2003/man1p/uucp.1p
new file mode 100644
index 0000000..3126a3c
--- /dev/null
+++ b/man-pages-posix-2003/man1p/uucp.1p
@@ -0,0 +1,268 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "UUCP" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" uucp
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+uucp \- system-to-system copy
+.SH SYNOPSIS
+.LP
+\fBuucp\fP \fB[\fP\fB-cCdfjmr\fP\fB][\fP\fB-n\fP \fIuser\fP\fB]\fP
+\fIsource-file\fP\fB...\fP \fIdestination-file\fP\fB\fP
+.SH DESCRIPTION
+.LP
+The \fIuucp\fP utility shall copy files named by the \fIsource-file\fP
+argument to the \fIdestination-file\fP argument. The
+files named can be on local or remote systems.
+.LP
+The \fIuucp\fP utility cannot guarantee support for all character
+encodings in all circumstances. For example, transmission
+data may be restricted to 7 bits by the underlying network, 8-bit
+data and filenames need not be portable to non-internationalized
+systems, and so on. Under these circumstances, it is recommended that
+only characters defined in the ISO/IEC\ 646:1991 standard
+International Reference Version (equivalent to ASCII) 7-bit range
+of characters be used, and that only characters defined in the
+portable filename character set be used for naming files. The protocol
+for transfer of files is unspecified by
+IEEE\ Std\ 1003.1-2001.
+.LP
+Typical implementations of this utility require a communications line
+configured to use the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface, but
+other
+communications means may be used. On systems where there are no available
+communications means (either temporarily or permanently),
+this utility shall write an error message describing the problem and
+exit with a non-zero exit status.
+.SH OPTIONS
+.LP
+The \fIuucp\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-c\fP
+Do not copy local file to the spool directory for transfer to the
+remote machine (default).
+.TP 7
+\fB-C\fP
+Force the copy of local files to the spool directory for transfer.
+.TP 7
+\fB-d\fP
+Make all necessary directories for the file copy (default).
+.TP 7
+\fB-f\fP
+Do not make intermediate directories for the file copy.
+.TP 7
+\fB-j\fP
+Write the job identification string to standard output. This job identification
+can be used by \fIuustat\fP to obtain the status or terminate a job.
+.TP 7
+\fB-m\fP
+Send mail to the requester when the copy is completed.
+.TP 7
+\fB-n\ \fP \fIuser\fP
+Notify \fIuser\fP on the remote system that a file was sent.
+.TP 7
+\fB-r\fP
+Do not start the file transfer; just queue the job.
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIdestination-file\fP,\ \fIsource-file\fP
+.sp
+A pathname of a file to be copied to, or from, respectively. Either
+name can be a pathname on the local machine, or can have the
+form:
+.sp
+.RS
+.nf
+
+\fIsystem-name\fP\fB!\fP\fIpathname\fP
+.fi
+.RE
+.LP
+where \fIsystem-name\fP is taken from a list of system names that
+\fIuucp\fP knows about. The destination \fIsystem-name\fP
+can also be a list of names such as:
+.sp
+.RS
+.nf
+
+\fIsystem-name\fP\fB!\fP\fIsystem-name\fP\fB!...!\fP\fIsystem-name\fP\fB!\fP\fIpathname\fP
+.fi
+.RE
+.LP
+in which case, an attempt is made to send the file via the specified
+route to the destination. Care should be taken to ensure
+that intermediate nodes in the route are willing to forward information.
+.LP
+The shell pattern matching notation characters \fB'?'\fP, \fB'*'\fP,
+and \fB"[...]"\fP appearing in \fIpathname\fP
+shall be expanded on the appropriate system.
+.LP
+Pathnames can be one of:
+.RS
+.IP " 1." 4
+An absolute pathname.
+.LP
+.IP " 2." 4
+A pathname preceded by ~ \fIuser\fP where \fIuser\fP is a login name
+on the specified system and is replaced by that
+user's login directory. Note that if an invalid login is specified,
+the default is to the public directory (called \fIPUBDIR\fP;
+the actual location of \fIPUBDIR\fP is implementation-defined).
+.LP
+.IP " 3." 4
+A pathname preceded by ~/ \fIdestination\fP where \fIdestination\fP
+is appended to \fIPUBDIR\fP.
+.TP 7
+\fBNote:\fP
+.RS
+This destination is treated as a filename unless more than one file
+is being transferred by this request or the destination is
+already a directory. To ensure that it is a directory, follow the
+destination with a \fB'/'\fP . For example, \fB~/dan/\fP
+as the destination makes the directory \fBPUBDIR/dan\fP if it does
+not exist and puts the requested files in that directory.
+.RE
+.sp
+.LP
+.IP " 4." 4
+Anything else shall be prefixed by the current directory.
+.LP
+.RE
+.LP
+If the result is an erroneous pathname for the remote system, the
+copy shall fail. If the \fIdestination-file\fP is a
+directory, the last part of the \fIsource-file\fP name shall be used.
+.LP
+The read, write, and execute permissions given by \fIuucp\fP are implementation-defined.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+The files to be copied are regular files.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIuucp\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_COLLATE\fP
+.sp
+Determine the locale for the behavior of ranges, equivalence classes,
+and multi-character collating elements within bracketed
+filename patterns.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files) and
+the behavior of character classes within bracketed filename
+patterns (for example, \fB"'[[:lower:]]*'"\fP ).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard error,
+and informative messages written to standard output.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+The output files (which may be on other systems) are copies of the
+input files.
+.LP
+If \fB-m\fP is used, mail files are modified.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The domain of remotely accessible files can (and for obvious security
+reasons usually should) be severely restricted.
+.LP
+Note that the \fB'!'\fP character in addresses has to be escaped when
+using \fIcsh\fP as a command interpreter because of
+its history substitution syntax. For \fIksh\fP and \fIsh\fP the escape
+is not necessary, but
+may be used.
+.LP
+As noted above, shell metacharacters appearing in pathnames are expanded
+on the appropriate system. On an internationalized
+system, this is done under the control of local settings of \fILC_COLLATE\fP
+and \fILC_CTYPE\fP. Thus, care should be taken when
+using bracketed filename patterns, as collation and typing rules may
+vary from one system to another. Also be aware that certain
+types of expression (that is, equivalence classes, character classes,
+and collating symbols) need not be supported on
+non-internationalized systems.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fImailx\fP, \fIuuencode\fP, \fIuustat\fP,
+\fIuux\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/uudecode.1p b/man-pages-posix-2003/man1p/uudecode.1p
new file mode 100644
index 0000000..7fd8f26
--- /dev/null
+++ b/man-pages-posix-2003/man1p/uudecode.1p
@@ -0,0 +1,184 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "UUDECODE" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" uudecode
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+uudecode \- decode a binary file
+.SH SYNOPSIS
+.LP
+\fBuudecode\fP \fB[\fP\fB-o\fP \fIoutfile\fP\fB][\fP\fIfile\fP\fB]\fP\fB\fP
+.SH DESCRIPTION
+.LP
+The \fIuudecode\fP utility shall read a file, or standard input if
+no file is specified, that includes data created by the \fIuuencode\fP
+utility. The \fIuudecode\fP utility shall scan the input file, searching
+for
+data compatible with one of the formats specified in \fIuuencode\fP,
+and attempt to
+create or overwrite the file described by the data (or overridden
+by the \fB-o\fP option). The pathname shall be contained in the
+data or specified by the \fB-o\fP option. The file access permission
+bits and contents for the file to be produced shall be
+contained in that data. The mode bits of the created file (other than
+standard output) shall be set from the file access permission
+bits contained in the data; that is, other attributes of the mode,
+including the file mode creation mask (see \fIumask\fP()), shall
+not affect the file being produced.
+.LP
+If the pathname of the file to be produced exists, and the user does
+not have write permission on that file, \fIuudecode\fP
+shall terminate with an error. If the pathname of the file to be produced
+exists, and the user has write permission on that file,
+the existing file shall be overwritten.
+.LP
+If the input data was produced by \fIuuencode\fP on a system with
+a different number
+of bits per byte than on the target system, the results of \fIuudecode\fP
+are unspecified.
+.SH OPTIONS
+.LP
+The \fIuudecode\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following option shall be supported by the implementation:
+.TP 7
+\fB-o\ \fP \fIoutfile\fP
+A pathname of a file that shall be used instead of any pathname contained
+in the input data. Specifying an \fIoutfile\fP
+option-argument of \fB/dev/stdout\fP shall indicate standard output.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+The pathname of a file containing the output of \fIuuencode\fP.
+.sp
+.SH STDIN
+.LP
+See the INPUT FILES section.
+.SH INPUT FILES
+.LP
+The input files shall be files containing the output of \fIuuencode\fP.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIuudecode\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+If the file data header encoded by \fIuuencode\fP is \fB-\fP or \fB/dev/stdout\fP,
+or the \fB-o\fP \fB/dev/stdout\fP option overrides the file data,
+the standard output shall be in the same format as the file
+originally encoded by \fIuuencode\fP. Otherwise, the standard output
+shall not be
+used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+The output file shall be in the same format as the file originally
+encoded by \fIuuencode\fP.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The user who is invoking \fIuudecode\fP must have write permission
+on any file being created.
+.LP
+The output of \fIuuencode\fP is essentially an encoded bit stream
+that is not
+cognizant of byte boundaries. It is possible that a 9-bit byte target
+machine can process input from an 8-bit source, if it is
+aware of the requirement, but the reverse is unlikely to be satisfying.
+Of course, the only data that is meaningful for such a
+transfer between architectures is generally character data.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+Input files are not necessarily text files, as stated by an early
+proposal. Although the \fIuuencode\fP output is a text file, that
+output could have been wrapped within another file or
+mail message that is not a text file.
+.LP
+The \fB-o\fP option is not historical practice, but was added at the
+request of WG15 so that the user could override the target
+pathname without having to edit the input data itself.
+.LP
+In early drafts, the [ \fB-o\fP \fIoutfile\fP] option-argument allowed
+the use of \fB-\fP to mean standard output. The symbol
+\fB-\fP has only been used previously in IEEE\ Std\ 1003.1-2001 as
+a standard input indicator. The developers of the
+standard did not wish to overload the meaning of \fB-\fP in this manner.
+The \fB/dev/stdout\fP concept exists on most modern
+systems. The \fB/dev/stdout\fP syntax does not refer to a new special
+file. It is just a magic cookie to specify standard
+output.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIumask\fP(), \fIuuencode\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/uuencode.1p b/man-pages-posix-2003/man1p/uuencode.1p
new file mode 100644
index 0000000..4cb4c8b
--- /dev/null
+++ b/man-pages-posix-2003/man1p/uuencode.1p
@@ -0,0 +1,357 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "UUENCODE" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" uuencode
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+uuencode \- encode a binary file
+.SH SYNOPSIS
+.LP
+\fBuuencode\fP \fB[\fP\fB-m\fP\fB][\fP\fIfile\fP\fB]\fP \fIdecode_pathname\fP\fB\fP
+.SH DESCRIPTION
+.LP
+The \fIuuencode\fP utility shall write an encoded version of the named
+input file, or standard input if no \fIfile\fP is
+specified, to standard output. The output shall be encoded using one
+of the algorithms described in the STDOUT section and shall
+include the file access permission bits (in \fIchmod\fP octal or symbolic
+notation) of the
+input file and the \fIdecode_pathname\fP, for re-creation of the file
+on another system that conforms to this volume of
+IEEE\ Std\ 1003.1-2001.
+.SH OPTIONS
+.LP
+The \fIuuencode\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following option shall be supported by the implementation:
+.TP 7
+\fB-m\fP
+Encode the output using the MIME Base64 algorithm described in STDOUT.
+If \fB-m\fP is not specified, the historical algorithm
+described in STDOUT shall be used.
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIdecode_pathname\fP
+.sp
+The pathname of the file into which the \fIuudecode\fP utility shall
+place the decoded
+file. Specifying a \fIdecode_pathname\fP operand of \fB/dev/stdout\fP
+shall indicate that \fIuudecode\fP is to use standard output. If there
+are characters in \fIdecode_pathname\fP that
+are not in the portable filename character set the results are unspecified.
+.TP 7
+\fIfile\fP
+A pathname of the file to be encoded.
+.sp
+.SH STDIN
+.LP
+See the INPUT FILES section.
+.SH INPUT FILES
+.LP
+Input files can be files of any type.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIuuencode\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.SS uuencode Base64 Algorithm
+.LP
+The standard output shall be a text file (encoded in the character
+set of the current locale) that begins with the line:
+.sp
+.RS
+.nf
+
+\fB"begin-base64 %s %s\\n", <\fP\fImode\fP\fB>, <\fP\fIdecode_pathname\fP\fB>
+\fP
+.fi
+.RE
+.LP
+and ends with the line:
+.sp
+.RS
+.nf
+
+\fB"====\\n"
+\fP
+.fi
+.RE
+.LP
+In both cases, the lines shall have no preceding or trailing <blank>s.
+.LP
+The encoding process represents 24-bit groups of input bits as output
+strings of four encoded characters. Proceeding from left
+to right, a 24-bit input group shall be formed by concatenating three
+8-bit input groups. Each 24-bit input group then shall be
+treated as four concatenated 6-bit groups, each of which shall be
+translated into a single digit in the Base64 alphabet. When
+encoding a bit stream via the Base64 encoding, the bit stream shall
+be presumed to be ordered with the most-significant bit first.
+That is, the first bit in the stream shall be the high-order bit in
+the first byte, and the eighth bit shall be the low-order bit
+in the first byte, and so on. Each 6-bit group is used as an index
+into an array of 64 printable characters, as shown in uuencode Base64
+Values .
+.sp
+.ce 1
+\fBTable: uuencode Base64 Values\fP
+.TS C
+center; l1 l1 l1 l1 l1 l1 l1 l1 l1 l1 l.
+\fBValue\fP \fBEncoding\fP Value \fBEncoding\fP \fBValue\fP Encoding \fBValue\fP \fBEncoding\fP \ \fB\ \fP \fB\ \fP
+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 \ \ \ \ \
+.TE
+.LP
+The character referenced by the index shall be placed in the output
+string.
+.LP
+The output stream (encoded bytes) shall be represented in lines of
+no more than 76 characters each. All line breaks or other
+characters not found in the table shall be ignored by decoding software
+(see \fIuudecode\fP ).
+.LP
+Special processing shall be performed if fewer than 24 bits are available
+at the end of a message or encapsulated part of a
+message. A full encoding quantum shall always be completed at the
+end of a message. When fewer than 24 input bits are available in
+an input group, zero bits shall be added (on the right) to form an
+integral number of 6-bit groups. Output character positions that
+are not required to represent actual input data shall be set to the
+character \fB'='\fP . Since all Base64 input is an integral
+number of octets, only the following cases can arise:
+.IP " 1." 4
+The final quantum of encoding input is an integral multiple of 24
+bits; here, the final unit of encoded output shall be an
+integral multiple of 4 characters with no \fB'='\fP padding.
+.LP
+.IP " 2." 4
+The final quantum of encoding input is exactly 16 bits; here, the
+final unit of encoded output shall be three characters
+followed by one \fB'='\fP padding character.
+.LP
+.IP " 3." 4
+The final quantum of encoding input is exactly 8 bits; here, the final
+unit of encoded output shall be two characters followed
+by two \fB'='\fP padding characters.
+.LP
+.LP
+A terminating \fB"===="\fP evaluates to nothing and denotes the end
+of the encoded data.
+.SS uuencode Historical Algorithm
+.LP
+The standard output shall be a text file (encoded in the character
+set of the current locale) that begins with the line:
+.sp
+.RS
+.nf
+
+\fB"begin %s %s\\n" <\fP\fImode\fP\fB>, <\fP\fIdecode_pathname\fP\fB>
+\fP
+.fi
+.RE
+.LP
+and ends with the line:
+.sp
+.RS
+.nf
+
+\fB"end\\n"
+\fP
+.fi
+.RE
+.LP
+In both cases, the lines shall have no preceding or trailing <blank>s.
+.LP
+The algorithm that shall be used for lines in between \fBbegin\fP
+and \fBend\fP takes three octets as input and writes four
+characters of output by splitting the input at six-bit intervals into
+four octets, containing data in the lower six bits only.
+These octets shall be converted to characters by adding a value of
+0x20 to each octet, so that each octet is in the range
+[0x20,0x5f], and then it shall be assumed to represent a printable
+character in the ISO/IEC\ 646:1991 standard encoded
+character set. It then shall be translated into the corresponding
+character codes for the codeset in use in the current locale.
+(For example, the octet 0x41, representing \fB'A'\fP, would be translated
+to \fB'A'\fP in the current codeset, such as 0xc1
+if it were EBCDIC.)
+.LP
+Where the bits of two octets are combined, the least significant bits
+of the first octet shall be shifted left and combined with
+the most significant bits of the second octet shifted right. Thus
+the three octets \fIA\fP, \fIB\fP, \fIC\fP shall be converted
+into the four octets:
+.sp
+.RS
+.nf
+
+\fB0x20 + (( A >> 2 ) & 0x3F)
+0x20 + (((A << 4) | ((B >> 4) & 0xF)) & 0x3F)
+0x20 + (((B << 2) | ((C >> 6) & 0x3)) & 0x3F)
+0x20 + (( C ) & 0x3F)
+\fP
+.fi
+.RE
+.LP
+These octets then shall be translated into the local character set.
+.LP
+Each encoded line contains a length character, equal to the number
+of characters to be decoded plus 0x20 translated to the local
+character set as described above, followed by the encoded characters.
+The maximum number of octets to be encoded on each line shall
+be 45.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The file is expanded by 35 percent (each three octets become four,
+plus control information) causing it to take longer to
+transmit.
+.LP
+Since this utility is intended to create files to be used for data
+interchange between systems with possibly different codesets,
+and to represent binary data as a text file, the ISO/IEC\ 646:1991
+standard was chosen for a midpoint in the algorithm as a
+known reference point. The output from \fIuuencode\fP is a text file
+on the local system. If the output were in the
+ISO/IEC\ 646:1991 standard codeset, it might not be a text file (at
+least because the <newline>s might not match), and
+the goal of creating a text file would be defeated. If this text file
+was then carried to another machine with the same codeset, it
+would be perfectly compatible with that system's \fIuudecode\fP. If
+it was transmitted
+over a mail system or sent to a machine with a different codeset,
+it is assumed that, as for every other text file, some
+translation mechanism would convert it (by the time it reached a user
+on the other system) into an appropriate codeset. This
+translation only makes sense from the local codeset, not if the file
+has been put into a ISO/IEC\ 646:1991 standard
+representation first. Similarly, files processed by \fIuuencode\fP
+can be placed in \fIpax\fP
+archives, intermixed with other text files in the same codeset.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+A new algorithm was added at the request of the international community
+to parallel work in RFC\ 2045 (MIME). As with the
+historical \fIuuencode\fP format, the Base64 Content-Transfer-Encoding
+is designed to represent arbitrary sequences of octets in a
+form that is not humanly readable. A 65-character subset of the ISO/IEC\ 646:1991
+standard is used, enabling 6 bits to be
+represented per printable character. (The extra 65th character, \fB'='\fP,
+is used to signify a special processing
+function.)
+.LP
+This subset has the important property that it is represented identically
+in all versions of the ISO/IEC\ 646:1991 standard,
+including US ASCII, and all characters in the subset are also represented
+identically in all versions of EBCDIC. The historical
+\fIuuencode\fP algorithm does not share this property, which is the
+reason that a second algorithm was added to the
+ISO\ POSIX-2 standard.
+.LP
+The string \fB"===="\fP was used for the termination instead of the
+end used in the original format because the latter is a
+string that could be valid encoded input.
+.LP
+In an early draft, the \fB-m\fP option was named \fB-b\fP (for Base64),
+but it was renamed to reflect its relationship to the
+RFC\ 2045. A \fB-u\fP was also present to invoke the default algorithm,
+but since this was not historical practice, it was
+omitted as being unnecessary.
+.LP
+See the RATIONALE section in \fIuudecode\fP for the derivation of
+the \fB/dev/stdout\fP
+symbol.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIchmod\fP(), \fImailx\fP, \fIuudecode\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/uustat.1p b/man-pages-posix-2003/man1p/uustat.1p
new file mode 100644
index 0000000..a5522e4
--- /dev/null
+++ b/man-pages-posix-2003/man1p/uustat.1p
@@ -0,0 +1,164 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "UUSTAT" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" uustat
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+uustat \- uucp status inquiry and job control
+.SH SYNOPSIS
+.LP
+\fBuustat\fP \fB[\fP \fB-q| -k\fP \fIjobid\fP\fB| -r\fP \fIjobid\fP\fB]\fP\fB
+.br
+.sp
+uustat\fP \fB[\fP\fB-s\fP \fIsystem\fP\fB][\fP\fB-u\fP \fIuser\fP\fB]\fP\fB\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIuustat\fP utility shall display the status of, or cancel, previously
+specified \fIuucp\fP requests, or provide general status on \fIuucp\fP
+connections to other systems.
+.LP
+When no options are given, \fIuustat\fP shall write to standard output
+the status of all \fIuucp\fP requests issued by the current user.
+.LP
+Typical implementations of this utility require a communications line
+configured to use the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface, but
+other
+communications means may be used. On systems where there are no available
+communications means (either temporarily or permanently),
+this utility shall write an error message describing the problem and
+exit with a non-zero exit status.
+.SH OPTIONS
+.LP
+The \fIuustat\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-q\fP
+Write the jobs queued for each machine.
+.TP 7
+\fB-k\ \fP \fIjobid\fP
+Kill the \fIuucp\fP request whose job identification is \fIjobid\fP.
+The application
+shall ensure that the killed \fIuucp\fP request belongs to the person
+invoking \fIuustat\fP
+unless that user has appropriate privileges.
+.TP 7
+\fB-r\ \fP \fIjobid\fP
+Rejuvenate \fIjobid\fP. The files associated with \fIjobid\fP are
+touched so that their modification time is set to the
+current time. This prevents the cleanup program from deleting the
+job until the jobs modification time reaches the limit imposed by
+the program.
+.TP 7
+\fB-s\ \fP \fIsystem\fP
+Write the status of all \fIuucp\fP requests for remote system \fIsystem\fP.
+.TP 7
+\fB-u\ \fP \fIuser\fP
+Write the status of all \fIuucp\fP requests issued by \fIuser\fP.
+.sp
+.SH OPERANDS
+.LP
+None.
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIuustat\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard error,
+and informative messages written to standard output.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The standard output shall consist of information about each job selected,
+in an unspecified format. The information shall
+include at least the job ID, the user ID or name, and the remote system
+name.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIuucp\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/uux.1p b/man-pages-posix-2003/man1p/uux.1p
new file mode 100644
index 0000000..e19beba
--- /dev/null
+++ b/man-pages-posix-2003/man1p/uux.1p
@@ -0,0 +1,300 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "UUX" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" uux
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+uux \- remote command execution
+.SH SYNOPSIS
+.LP
+\fBuux\fP \fB[\fP\fB-np\fP\fB]\fP \fIcommand-string\fP\fB
+.br
+.sp
+uux\fP \fB[\fP\fB-jnp\fP\fB]\fP \fIcommand-string\fP\fB\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIuux\fP utility shall gather zero or more files from various
+systems, execute a shell pipeline (see \fIShell Commands\fP ) on a
+specified system, and then send the standard output of the command
+to
+a file on a specified system. Only the first command of a pipeline
+can have a \fIsystem-name\fP! prefix. All other commands in the
+pipeline shall be executed on the system of the first command.
+.LP
+The following restrictions are applicable to the shell pipeline processed
+by \fIuux\fP:
+.IP " *" 3
+In gathering files from different systems, pathname expansion shall
+not be performed by \fIuux\fP. Thus, a request such as:
+.sp
+.RS
+.nf
+
+\fBuux "c99 remsys!~/*.c"
+\fP
+.fi
+.RE
+.LP
+would attempt to copy the file named literally \fB*.c\fP to the local
+system.
+.LP
+.IP " *" 3
+The redirection operators \fB">>"\fP, \fB"<<"\fP, \fB">|"\fP, and
+\fB">&"\fP shall not be
+accepted. Any use of these redirection operators shall cause this
+utility to write an error message describing the problem and exit
+with a non-zero exit status.
+.LP
+.IP " *" 3
+The reserved word \fB!\fP cannot be used at the head of the pipeline
+to modify the exit status. (See the \fIcommand-string\fP
+operand description below.)
+.LP
+.IP " *" 3
+Alias substitution shall not be performed.
+.LP
+.LP
+A filename can be specified as for \fIuucp\fP; it can be an absolute
+pathname, a pathname
+preceded by ~ \fIname\fP (which is replaced by the corresponding login
+directory), a pathname specified as ~/
+\fIdest\fP ( \fIdest\fP is prefixed by the public directory called
+\fIPUBDIR\fP; the actual location of \fIPUBDIR\fP is
+implementation-defined), or a simple filename (which is prefixed by
+\fIuux\fP with the current directory). See \fIuucp\fP for the details.
+.LP
+The execution of commands on remote systems shall take place in an
+execution directory known to the \fIuucp\fP system. All files required
+for the execution shall be put into this directory unless they
+already reside on that machine. Therefore, the application shall ensure
+that non-local filenames (without path or machine
+reference) are unique within the \fIuux\fP request.
+.LP
+The \fIuux\fP utility shall attempt to get all files to the execution
+system. For files that are output files, the application
+shall ensure that the filename is escaped using parentheses.
+.LP
+The remote system shall notify the user by mail if the requested command
+on the remote system was disallowed or the files were
+not accessible. This notification can be turned off by the \fB-n\fP
+option.
+.LP
+Typical implementations of this utility require a communications line
+configured to use the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface, but
+other
+communications means may be used. On systems where there are no available
+communications means (either temporarily or permanently),
+this utility shall write an error message describing the problem and
+exit with a non-zero exit status.
+.LP
+The \fIuux\fP utility cannot guarantee support for all character encodings
+in all circumstances. For example, transmission data
+may be restricted to 7 bits by the underlying network, 8-bit data
+and filenames need not be portable to non-internationalized
+systems, and so on. Under these circumstances, it is recommended that
+only characters defined in the ISO/IEC\ 646:1991 standard
+International Reference Version (equivalent to ASCII) 7-bit range
+of characters be used and that only characters defined in the
+portable filename character set be used for naming files.
+.SH OPTIONS
+.LP
+The \fIuux\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-p\fP
+Make the standard input to \fIuux\fP the standard input to the \fIcommand-string\fP.
+.TP 7
+\fB-j\fP
+Write the job identification string to standard output. This job identification
+can be used by \fIuustat\fP to obtain the status or terminate a job.
+.TP 7
+\fB-n\fP
+Do not notify the user if the command fails.
+.sp
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIcommand-string\fP
+.sp
+A string made up of one or more arguments that are similar to normal
+command arguments, except that the command and any filenames
+can be prefixed by \fIsystem-name\fP!. A null \fIsystem-name\fP shall
+be interpreted as the local system.
+.sp
+.SH STDIN
+.LP
+The standard input shall not be used unless the \fB'-'\fP or \fB-p\fP
+option is specified; in those cases, the standard
+input shall be made the standard input of the \fIcommand-string\fP.
+.SH INPUT FILES
+.LP
+Input files shall be selected according to the contents of \fIcommand-string\fP.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIuux\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The standard output shall not be used unless the \fB-j\fP option is
+specified; in that case, the job identification string
+shall be written to standard output in the following format:
+.sp
+.RS
+.nf
+
+\fB"%s\\n", <\fP\fIjobid\fP\fB>
+\fP
+.fi
+.RE
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+Output files shall be created or written, or both, according to the
+contents of \fIcommand-string\fP.
+.LP
+If \fB-n\fP is not used, mail files shall be modified following any
+command or file-access failures on the remote system.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Note that, for security reasons, many installations limit the list
+of commands executable on behalf of an incoming request from
+\fIuux\fP. Many sites permit little more than the receipt of mail
+via \fIuux\fP.
+.LP
+Any characters special to the command interpreter should be quoted
+either by quoting the entire \fIcommand-string\fP or quoting
+the special characters as individual arguments.
+.LP
+As noted in \fIuucp\fP, shell pattern matching notation characters
+appearing in pathnames
+are expanded on the appropriate local system. This is done under the
+control of local settings of \fILC_COLLATE\fP and \fILC_CTYPE
+\&.\fP Thus, care should be taken when using bracketed filename patterns,
+as collation and typing rules may vary from one system to
+another. Also be aware that certain types of expression (that is,
+equivalence classes, character classes, and collating symbols)
+need not be supported on non-internationalized systems.
+.SH EXAMPLES
+.IP " 1." 4
+The following command gets \fBfile1\fP from system \fBa\fP and \fBfile2\fP
+from system \fBb\fP, executes \fIdiff\fP on the local system, and
+puts the results in \fBfile.diff\fP in the local \fIPUBDIR\fP
+directory. ( \fIPUBDIR\fP is the \fIuucp\fP public directory on the
+local system.)
+.sp
+.RS
+.nf
+
+\fBuux "!diff a!/usr/file1 b!/a4/file2 >!~/file.diff"
+\fP
+.fi
+.RE
+.LP
+.IP " 2." 4
+The following command fails because \fIuux\fP places all files copied
+to a system in the same working directory. Although the
+files \fBxyz\fP are from two different systems, their filenames are
+the same and conflict.
+.sp
+.RS
+.nf
+
+\fBuux "!diff a!/usr1/xyz b!/usr2/xyz >!~/xyz.diff"
+\fP
+.fi
+.RE
+.LP
+.IP " 3." 4
+The following command succeeds (assuming \fIdiff\fP is permitted on
+system \fBa\fP)
+because the file local to system \fBa\fP is not copied to the working
+directory, and hence does not conflict with the file from
+system \fBc\fP.
+.sp
+.RS
+.nf
+
+\fBuux "a!diff a!/usr/xyz c!/usr/xyz >!~/xyz.diff"
+\fP
+.fi
+.RE
+.LP
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIShell Command Language\fP, \fIuucp\fP, \fIuuencode\fP, \fIuustat\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/val.1p b/man-pages-posix-2003/man1p/val.1p
new file mode 100644
index 0000000..865afd0
--- /dev/null
+++ b/man-pages-posix-2003/man1p/val.1p
@@ -0,0 +1,234 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "VAL" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" val
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+val \- validate SCCS files (\fBDEVELOPMENT\fP)
+.SH SYNOPSIS
+.LP
+\fBval -
+.br
+.sp
+val\fP \fB[\fP\fB-s\fP\fB][\fP\fB-m\fP \fIname\fP\fB][\fP\fB-r\fP
+\fISID\fP\fB][\fP\fB-y\fP
+\fItype\fP\fB]\fP \fIfile\fP\fB... \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIval\fP utility shall determine whether the specified \fIfile\fP
+is an SCCS file meeting the characteristics specified
+by the options.
+.SH OPTIONS
+.LP
+The \fIval\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines,
+except that the usage of the \fB'-'\fP
+operand is not strictly as intended by the guidelines (that is, reading
+options and operands from standard input).
+.LP
+The following options shall be supported:
+.TP 7
+\fB-m\ \fP \fIname\fP
+Specify a \fIname\fP, which is compared with the SCCS %\fBM\fP% keyword
+in \fIfile\fP; see \fIget\fP
+\&.
+.TP 7
+\fB-r\ \fP \fISID\fP
+Specify a \fISID\fP (SCCS Identification String), an SCCS delta number.
+A check shall be made to determine whether the
+\fISID\fP is ambiguous (for example, \fB-r\ 1\fP is ambiguous because
+it physically does not exist but implies 1.1, 1.2, and
+so on, which may exist) or invalid (for example, \fB-r\ 1.0\fP or
+\fB-r\ 1.1.0\fP are invalid because neither case can
+exist as a valid delta number). If the \fISID\fP is valid and not
+ambiguous, a check shall be made to determine whether it
+actually exists.
+.TP 7
+\fB-s\fP
+Silence the diagnostic message normally written to standard output
+for any error that is detected while processing each named
+file on a given command line.
+.TP 7
+\fB-y\ \fP \fItype\fP
+Specify a \fItype\fP, which shall be compared with the SCCS %\fBY\fP%
+keyword in \fIfile\fP; see \fIget\fP .
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of an existing SCCS file. If exactly one \fIfile\fP operand
+appears, and it is \fB'-'\fP, the standard input
+shall be read: each line shall be independently processed as if it
+were a command line argument list. (However, the line is not
+subjected to any of the shell word expansions, such as parameter expansion
+or quote removal.)
+.sp
+.SH STDIN
+.LP
+The standard input shall be a text file used only when the \fIfile\fP
+operand is specified as \fB'-'\fP .
+.SH INPUT FILES
+.LP
+Any SCCS files processed shall be files of an unspecified format.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIval\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard error,
+and informative messages written to standard output.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The standard output shall consist of informative messages about either:
+.IP " 1." 4
+Each file processed
+.LP
+.IP " 2." 4
+Each command line read from standard input
+.LP
+.LP
+If the standard input is not used, for each \fIfile\fP operand yielding
+a discrepancy, the output line shall have the following
+format:
+.sp
+.RS
+.nf
+
+\fB"%s: %s\\n", <\fP\fIpathname\fP\fB>, <\fP\fIunspecified string\fP\fB>
+\fP
+.fi
+.RE
+.LP
+If standard input is used, a line of input shall be written before
+each of the preceding lines for files containing
+discrepancies:
+.sp
+.RS
+.nf
+
+\fB"%s:\\n", <\fP\fIinput line\fP\fB>
+\fP
+.fi
+.RE
+.SH STDERR
+.LP
+Not used.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The 8-bit code returned by \fIval\fP shall be a disjunction of the
+possible errors; that is, it can be interpreted as a bit
+string where set bits are interpreted as follows:
+.TS C
+center; l l l.
+0x80 = Missing file argument.
+0x40 = Unknown or duplicate option.
+0x20 = Corrupted SCCS file.
+0x10 = Cannot open file or file not SCCS.
+0x08 = \fISID\fP is invalid or ambiguous.
+0x04 = \fISID\fP does not exist.
+0x02 = %\fBY\fP%, \fB-y\fP mismatch.
+0x01 = %\fBM\fP%, \fB-m\fP mismatch.
+.TE
+.LP
+Note that \fIval\fP can process two or more files on a given command
+line and can process multiple command lines (when reading
+the standard input). In these cases an aggregate code shall be returned:
+a logical OR of the codes generated for each command line
+and file processed.
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Since the \fIval\fP exit status sets the 0x80 bit, shell applications
+checking \fB"$?"\fP cannot tell if it terminated due
+to a missing file argument or receipt of a signal.
+.SH EXAMPLES
+.LP
+In a directory with three SCCS files- \fBs.x\fP (of \fBt\fP type "text"),
+\fBs.y\fP, and \fBs.z\fP (a corrupted file)-the
+following command could produce the output shown:
+.sp
+.RS
+.nf
+
+\fBval - <<EOF
+-y source s.x
+-m y s.y
+s.z
+EOF
+.sp
+
+-y source s.x
+.sp
+
+ s.x: %Y%, -y mismatch
+s.z
+.sp
+
+ s.z: corrupted SCCS file
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIadmin\fP, \fIdelta\fP, \fIget\fP, \fIprs\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/vi.1p b/man-pages-posix-2003/man1p/vi.1p
new file mode 100644
index 0000000..361936b
--- /dev/null
+++ b/man-pages-posix-2003/man1p/vi.1p
@@ -0,0 +1,4968 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "VI" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" vi
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+vi \- screen-oriented (visual) display editor
+.SH SYNOPSIS
+.LP
+\fBvi\fP \fB[\fP\fB-rR\fP\fB][\fP\fB-c\fP \fIcommand\fP\fB][\fP\fB-t\fP
+\fItagstring\fP\fB][\fP\fB-w\fP \fIsize\fP\fB][\fP\fIfile\fP \fB...\fP\fB]\fP\fB\fP
+.SH DESCRIPTION
+.LP
+This utility shall be provided on systems that both support the User
+Portability Utilities option and define the
+POSIX2_CHAR_TERM symbol. On other systems it is optional.
+.LP
+The \fIvi\fP (visual) utility is a screen-oriented text editor. Only
+the open and visual modes of the editor are described in
+IEEE\ Std\ 1003.1-2001; see the line editor \fIex\fP for additional
+editing
+capabilities used in \fIvi\fP. The user can switch back and forth
+between \fIvi\fP and \fIex\fP and execute \fIex\fP commands from within
+\fIvi\fP.
+.LP
+This reference page uses the term \fIedit buffer\fP to describe the
+current working text. No specific implementation is implied
+by this term. All editing changes are performed on the edit buffer,
+and no changes to it shall affect any file until an editor
+command writes the file.
+.LP
+When using \fIvi\fP, the terminal screen acts as a window into the
+editing buffer. Changes made to the editing buffer shall be
+reflected in the screen display; the position of the cursor on the
+screen shall indicate the position within the editing
+buffer.
+.LP
+Certain terminals do not have all the capabilities necessary to support
+the complete \fIvi\fP definition. When these commands
+cannot be supported on such terminals, this condition shall not produce
+an error message such as "not an editor command" or
+report a syntax error. The implementation may either accept the commands
+and produce results on the screen that are the result of
+an unsuccessful attempt to meet the requirements of this volume of
+IEEE\ Std\ 1003.1-2001 or report an error describing the
+terminal-related deficiency.
+.SH OPTIONS
+.LP
+The \fIvi\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-c\ \fP \fIcommand\fP
+See the \fIex\fP command description of the \fB-c\fP option.
+.TP 7
+\fB-r\fP
+See the \fIex\fP command description of the \fB-r\fP option.
+.TP 7
+\fB-R\fP
+See the \fIex\fP command description of the \fB-R\fP option.
+.TP 7
+\fB-t\ \fP \fItagstring\fP
+See the \fIex\fP command description of the \fB-t\fP option.
+.TP 7
+\fB-w\ \fP \fIsize\fP
+See the \fIex\fP command description of the \fB-w\fP option.
+.sp
+.SH OPERANDS
+.LP
+See the OPERANDS section of the \fIex\fP command for a description
+of the operands supported
+by the \fIvi\fP command.
+.SH STDIN
+.LP
+If standard input is not a terminal device, the results are undefined.
+The standard input consists of a series of commands and
+input text, as described in the EXTENDED DESCRIPTION section.
+.LP
+If a read from the standard input returns an error, or if the editor
+detects an end-of-file condition from the standard input,
+it shall be equivalent to a SIGHUP asynchronous event.
+.SH INPUT FILES
+.LP
+See the INPUT FILES section of the \fIex\fP command for a description
+of the input files
+supported by the \fIvi\fP command.
+.SH ENVIRONMENT VARIABLES
+.LP
+See the ENVIRONMENT VARIABLES section of the \fIex\fP command for
+the environment variables
+that affect the execution of the \fIvi\fP command.
+.SH ASYNCHRONOUS EVENTS
+.LP
+See the ASYNCHRONOUS EVENTS section of the \fIex\fP for the asynchronous
+events that affect
+the execution of the \fIvi\fP command.
+.SH STDOUT
+.LP
+If standard output is not a terminal device, undefined results occur.
+.LP
+Standard output may be used for writing prompts to the user, for informational
+messages, and for writing lines from the
+file.
+.SH STDERR
+.LP
+If standard output is not a terminal device, undefined results occur.
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+See the OUTPUT FILES section of the \fIex\fP command for a description
+of the output files
+supported by the \fIvi\fP command.
+.SH EXTENDED DESCRIPTION
+.LP
+If the terminal does not have the capabilities necessary to support
+an unspecified portion of the \fIvi\fP definition,
+implementations shall start initially in \fIex\fP mode or open mode.
+Otherwise, after
+initialization, \fIvi\fP shall be in command mode; text input mode
+can be entered by one of several commands used to insert or
+change text. In text input mode, <ESC> can be used to return to command
+mode; other uses of <ESC> are described later
+in this section; see Terminate Command or Input Mode .
+.SS Initialization in ex and vi
+.LP
+See \fIInitialization in ex and vi\fP for a description of \fIex\fP
+and \fIvi\fP initialization for the \fIvi\fP utility.
+.SS Command Descriptions in vi
+.LP
+The following symbols are used in this reference page to represent
+arguments to commands.
+.TP 7
+\fIbuffer\fP
+See the description of \fIbuffer\fP in the EXTENDED DESCRIPTION section
+of the \fIex\fP
+utility; see \fICommand Descriptions in ex\fP .
+.LP
+In open and visual mode, when a command synopsis shows both [ \fIbuffer\fP]
+and [ \fIcount\fP] preceding the command name,
+they can be specified in either order.
+.TP 7
+\fIcount\fP
+A positive integer used as an optional argument to most commands,
+either to give a repeat count or as a size. This argument is
+optional and shall default to 1 unless otherwise specified.
+.LP
+The Synopsis lines for the \fIvi\fP commands <control>-G, <control>-L,
+<control>-R, <control>-],
+\fB%\fP, \fB&\fP, \fB^\fP, \fBD\fP, \fBm\fP, \fBM\fP, \fBQ\fP, \fBu\fP,
+\fBU\fP, and \fBZZ\fP do not have
+\fIcount\fP as an optional argument. Regardless, it shall not be an
+error to specify a \fIcount\fP to these commands, and any
+specified \fIcount\fP shall be ignored.
+.TP 7
+\fImotion\fP
+An optional trailing argument used by the \fB!\fP, \fB<\fP, \fB>\fP,
+\fBc\fP, \fBd\fP, and \fBy\fP commands, which
+is used to indicate the region of text that shall be affected by the
+command. The motion can be either one of the command
+characters repeated or one of several other \fIvi\fP commands (listed
+in the following table). Each of the applicable commands
+specifies the region of text matched by repeating the command; each
+command that can be used as a motion command specifies the
+region of text it affects.
+.LP
+Commands that take \fImotion\fP arguments operate on either lines
+or characters, depending on the circumstances. When operating
+on lines, all lines that fall partially or wholly within the text
+region specified for the command shall be affected. When
+operating on characters, only the exact characters in the specified
+text region shall be affected. Each motion command specifies
+this individually.
+.LP
+When commands that may be motion commands are not used as motion commands,
+they shall set the current position to the current
+line and column as specified.
+.LP
+The following commands shall be valid cursor motion commands:
+.sp
+.RS
+.nf
+
+\fB<apostrophe> ( - j H
+<carriage-return> ) $ k L
+<comma> [[ % l M
+<control>-H ]] _ n N
+<control>-N { ; t T
+<control>-P } ? w W
+<grave accent> ^ b B
+<newline> + e E
+<space> | f F
+<zero> / h G
+\fP
+.fi
+.RE
+.LP
+Any \fIcount\fP that is specified to a command that has an associated
+motion command shall be applied to the motion command. If
+a \fIcount\fP is applied to both the command and its associated motion
+command, the effect shall be multiplicative.
+.sp
+.LP
+The following symbols are used in this section to specify locations
+in the edit buffer:
+.TP 7
+\fIcurrent\ character\fP
+.sp
+The character that is currently indicated by the cursor.
+.TP 7
+\fIend\ of\ a\ line\fP
+.sp
+The point located between the last non- <newline> (if any) and the
+terminating <newline> of a line. For an empty line,
+this location coincides with the beginning of the line.
+.TP 7
+\fIend\ of\ the\ edit\ buffer\fP
+.sp
+The location corresponding to the end of the last line in the edit
+buffer.
+.sp
+.LP
+The following symbols are used in this section to specify command
+actions:
+.TP 7
+\fIbigword\fP
+In the POSIX locale, \fIvi\fP shall recognize four kinds of \fIbigwords\fP:
+.RS
+.IP " 1." 4
+A maximal sequence of non- <blank>s preceded and followed by <blank>s
+or the beginning or end of a line or the edit
+buffer
+.LP
+.IP " 2." 4
+One or more sequential blank lines
+.LP
+.IP " 3." 4
+The first character in the edit buffer
+.LP
+.IP " 4." 4
+The last non- <newline> in the edit buffer
+.LP
+.RE
+.TP 7
+\fIword\fP
+In the POSIX locale, \fIvi\fP shall recognize five kinds of words:
+.RS
+.IP " 1." 4
+A maximal sequence of letters, digits, and underscores, delimited
+at both ends by:
+.RS
+.IP " *" 3
+Characters other than letters, digits, or underscores
+.LP
+.IP " *" 3
+The beginning or end of a line
+.LP
+.IP " *" 3
+The beginning or end of the edit buffer
+.LP
+.RE
+.LP
+.IP " 2." 4
+A maximal sequence of characters other than letters, digits, underscores,
+or <blank>s, delimited at both ends by:
+.RS
+.IP " *" 3
+A letter, digit, underscore
+.LP
+.IP " *" 3
+<blank>s
+.LP
+.IP " *" 3
+The beginning or end of a line
+.LP
+.IP " *" 3
+The beginning or end of the edit buffer
+.LP
+.RE
+.LP
+.IP " 3." 4
+One or more sequential blank lines
+.LP
+.IP " 4." 4
+The first character in the edit buffer
+.LP
+.IP " 5." 4
+The last non- <newline> in the edit buffer
+.LP
+.RE
+.TP 7
+\fIsection\ boundary\fP
+.sp
+A \fIsection boundary\fP is one of the following:
+.RS
+.IP " 1." 4
+A line whose first character is a <form-feed>
+.LP
+.IP " 2." 4
+A line whose first character is an open curly brace ( \fB'{'\fP )
+.LP
+.IP " 3." 4
+A line whose first character is a period and whose second and third
+characters match a two-character pair in the \fBsections\fP
+edit option (see \fIed\fP)
+.LP
+.IP " 4." 4
+A line whose first character is a period and whose only other character
+matches the first character of a two-character pair in
+the \fBsections\fP edit option, where the second character of the
+two-character pair is a <space>
+.LP
+.IP " 5." 4
+The first line of the edit buffer
+.LP
+.IP " 6." 4
+The last line of the edit buffer if the last line of the edit buffer
+is empty or if it is a \fB]]\fP or \fB}\fP command;
+otherwise, the last non- <newline> of the last line of the edit buffer
+.LP
+.RE
+.TP 7
+\fIparagraph\ boundary\fP
+.sp
+A \fIparagraph boundary\fP is one of the following:
+.RS
+.IP " 1." 4
+A section boundary
+.LP
+.IP " 2." 4
+A line whose first character is a period and whose second and third
+characters match a two-character pair in the
+\fBparagraphs\fP edit option (see \fIed\fP)
+.LP
+.IP " 3." 4
+A line whose first character is a period and whose only other character
+matches the first character of a two-character pair in
+the \fIparagraphs\fP edit option, where the second character of the
+two-character pair is a <space>
+.LP
+.IP " 4." 4
+One or more sequential blank lines
+.LP
+.RE
+.TP 7
+\fIremembered\ search\ direction\fP
+.sp
+See the description of \fIremembered search direction\fP in \fIed\fP.
+.TP 7
+\fIsentence\ boundary\fP
+.sp
+A \fIsentence boundary\fP is one of the following:
+.RS
+.IP " 1." 4
+A paragraph boundary
+.LP
+.IP " 2." 4
+The first non- <blank> that occurs after a paragraph boundary
+.LP
+.IP " 3." 4
+The first non- <blank> that occurs after a period ( \fB'.'\fP ), exclamation
+mark ( \fB'!'\fP ), or question mark (
+\fB'?'\fP ), followed by two <space>s or the end of a line; any number
+of closing parenthesis ( \fB')'\fP ), closing
+brackets ( \fB']'\fP ), double quote ( \fB' ),'\fP or single quote
+( \fB'"\fP ) characters can appear between the
+punctuation mark and the two <space>s or end-of-line
+.LP
+.RE
+.sp
+.LP
+In the remainder of the description of the \fIvi\fP utility, the term
+"buffer line" refers to a line in the edit buffer and
+the term "display line" refers to the line or lines on the display
+screen used to display one buffer line. The term "current
+line" refers to a specific "buffer line".
+.LP
+If there are display lines on the screen for which there are no corresponding
+buffer lines because they correspond to lines that
+would be after the end of the file, they shall be displayed as a single
+tilde ( \fB'~'\fP ) character, plus the terminating
+<newline>.
+.LP
+The last line of the screen shall be used to report errors or display
+informational messages. It shall also be used to display
+the input for "line-oriented commands" ( \fB/\fP, \fB?\fP, \fB:\fP,
+and \fB!\fP). When a line-oriented command is executed,
+the editor shall enter text input mode on the last line on the screen,
+using the respective command characters as prompt
+characters. (In the case of the \fB!\fP command, the associated motion
+shall be entered by the user before the editor enters text
+input mode.) The line entered by the user shall be terminated by a
+<newline>, a non- <control>-V-escaped
+<carriage-return>, or unescaped <ESC>. It is unspecified if more characters
+than require a display width minus one
+column number of screen columns can be entered.
+.LP
+If any command is executed that overwrites a portion of the screen
+other than the last line of the screen (for example, the \fIex\fP
+\fBsuspend\fP or \fB!\fP commands), other than the \fIex\fP \fBshell\fP
+command, the user shall be prompted for a character before the screen
+is
+refreshed and the edit session continued.
+.LP
+<tab>s shall take up the number of columns on the screen set by the
+\fBtabstop\fP edit option (see \fIed\fP), unless there are less than
+that number of columns before the display margin that will cause
+the displayed line to be folded; in this case, they shall only take
+up the number of columns up to that boundary.
+.LP
+The cursor shall be placed on the current line and relative to the
+current column as specified by each command described in the
+following sections.
+.LP
+In open mode, if the current line is not already displayed, then it
+shall be displayed.
+.LP
+In visual mode, if the current line is not displayed, then the lines
+that are displayed shall be expanded, scrolled, or redrawn
+to cause an unspecified portion of the current line to be displayed.
+If the screen is redrawn, no more than the number of display
+lines specified by the value of the \fBwindow\fP edit option shall
+be displayed (unless the current line cannot be completely
+displayed in the number of display lines specified by the \fBwindow\fP
+edit option) and the current line shall be positioned as
+close to the center of the displayed lines as possible (within the
+constraints imposed by the distance of the line from the
+beginning or end of the edit buffer). If the current line is before
+the first line in the display and the screen is scrolled, an
+unspecified portion of the current line shall be placed on the first
+line of the display. If the current line is after the last
+line in the display and the screen is scrolled, an unspecified portion
+of the current line shall be placed on the last line of the
+display.
+.LP
+In visual mode, if a line from the edit buffer (other than the current
+line) does not entirely fit into the lines at the bottom
+of the display that are available for its presentation, the editor
+may choose not to display any portion of the line. The lines of
+the display that do not contain text from the edit buffer for this
+reason shall each consist of a single \fB'@'\fP
+character.
+.LP
+In visual mode, the editor may choose for unspecified reasons to not
+update lines in the display to correspond to the underlying
+edit buffer text. The lines of the display that do not correctly correspond
+to text from the edit buffer for this reason shall
+consist of a single \fB'@'\fP character (plus the terminating <newline>),
+and the <control>-R command shall cause
+the editor to update the screen to correctly represent the edit buffer.
+.LP
+Open and visual mode commands that set the current column set it to
+a column position in the display, and not a character
+position in the line. In this case, however, the column position in
+the display shall be calculated for an infinite width display;
+for example, the column related to a character that is part of a line
+that has been folded onto additional screen lines will be
+offset from the display line column where the buffer line begins,
+not from the beginning of a particular display line.
+.LP
+The display cursor column in the display is based on the value of
+the current column, as follows, with each rule applied in
+turn:
+.IP " 1." 4
+If the current column is after the last display line column used by
+the displayed line, the display cursor column shall be set
+to the last display line column occupied by the last non- <newline>
+in the current line; otherwise, the display cursor column
+shall be set to the current column.
+.LP
+.IP " 2." 4
+If the character of which some portion is displayed in the display
+line column specified by the display cursor column requires
+more than a single display line column:
+.RS
+.IP " a." 4
+If in text input mode, the display cursor column shall be adjusted
+to the first display line column in which any portion of that
+character is displayed.
+.LP
+.IP " b." 4
+Otherwise, the display cursor column shall be adjusted to the last
+display line column in which any portion of that character is
+displayed.
+.LP
+.RE
+.LP
+.LP
+The current column shall not be changed by these adjustments to the
+display cursor column.
+.LP
+If an error occurs during the parsing or execution of a \fIvi\fP command:
+.IP " *" 3
+The terminal shall be alerted. Execution of the \fIvi\fP command shall
+stop, and the cursor (for example, the current line and
+column) shall not be further modified.
+.LP
+.IP " *" 3
+Unless otherwise specified by the following command sections, it is
+unspecified whether an informational message shall be
+displayed.
+.LP
+.IP " *" 3
+Any partially entered \fIvi\fP command shall be discarded.
+.LP
+.IP " *" 3
+If the \fIvi\fP command resulted from a \fBmap\fP expansion, all characters
+from that \fBmap\fP expansion shall be discarded,
+except as otherwise specified by the \fBmap\fP command (see \fIed\fP).
+.LP
+.IP " *" 3
+If the \fIvi\fP command resulted from the execution of a buffer, no
+further commands caused by the execution of the buffer
+shall be executed.
+.LP
+.SS Page Backwards
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fB<control>-B
+\fP
+.fi
+.RE
+.sp
+.LP
+If in open mode, the <control>-B command shall behave identically
+to the \fBz\fP command. Otherwise, if the current line
+is the first line of the edit buffer, it shall be an error.
+.LP
+If the \fBwindow\fP edit option is less than 3, display a screen where
+the last line of the display shall be some portion
+of:
+.sp
+.RS
+.nf
+
+\fB(\fP\fIcurrent first line\fP\fB) -1
+\fP
+.fi
+.RE
+.LP
+otherwise, display a screen where the first line of the display shall
+be some portion of:
+.sp
+.RS
+.nf
+
+\fB(\fP\fIcurrent first line\fP\fB) -\fP \fIcount\fP \fBx ((window edit option) -2)
+\fP
+.fi
+.RE
+.LP
+If this calculation would result in a line that is before the first
+line of the edit buffer, the first line of the display shall
+display some portion of the first line of the edit buffer.
+.LP
+\fICurrent line\fP: If no lines from the previous display remain on
+the screen, set to the last line of the display; otherwise,
+set to ( \fIline\fP - the number of new lines displayed on this screen).
+.LP
+\fICurrent column\fP: Set to non- <blank>.
+.SS Scroll Forward
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fB<control>-D
+\fP
+.fi
+.RE
+.sp
+.LP
+If the current line is the last line of the edit buffer, it shall
+be an error.
+.LP
+If no \fIcount\fP is specified, \fIcount\fP shall default to the \fIcount\fP
+associated with the previous <control>-D
+or <control>-U command. If there was no previous <control>-D or <control>-U
+command, \fIcount\fP shall default
+to the value of the \fBscroll\fP edit option.
+.LP
+If in open mode, write lines starting with the line after the current
+line, until \fIcount\fP lines or the last line of the
+file have been written.
+.LP
+\fICurrent line\fP: If the current line + \fIcount\fP is past the
+last line of the edit buffer, set to the last line of the
+edit buffer; otherwise, set to the current line + \fIcount\fP.
+.LP
+\fICurrent column\fP: Set to non- <blank>.
+.SS Scroll Forward by Line
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fB<control>-E
+\fP
+.fi
+.RE
+.sp
+.LP
+Display the line count lines after the last line currently displayed.
+.LP
+If the last line of the edit buffer is displayed, it shall be an error.
+If there is no line \fIcount\fP lines after the last
+line currently displayed, the last line of the display shall display
+some portion of the last line of the edit buffer.
+.LP
+\fICurrent line\fP: Unchanged if the previous current character is
+displayed; otherwise, set to the first line displayed.
+.LP
+\fICurrent column\fP: Unchanged.
+.SS Page Forward
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fB<control>-F
+\fP
+.fi
+.RE
+.sp
+.LP
+If in open mode, the <control>-F command shall behave identically
+to the \fBz\fP command. Otherwise, if the current line
+is the last line of the edit buffer, it shall be an error.
+.LP
+If the \fBwindow\fP edit option is less than 3, display a screen where
+the first line of the display shall be some portion
+of:
+.sp
+.RS
+.nf
+
+\fB(\fP\fIcurrent last line\fP\fB) +1
+\fP
+.fi
+.RE
+.LP
+otherwise, display a screen where the first line of the display shall
+be some portion of:
+.sp
+.RS
+.nf
+
+\fB(\fP\fIcurrent first line\fP\fB) +\fP \fIcount\fP \fBx ((window edit option) -2)
+\fP
+.fi
+.RE
+.LP
+If this calculation would result in a line that is after the last
+line of the edit buffer, the last line of the display shall
+display some portion of the last line of the edit buffer.
+.LP
+\fICurrent line\fP: If no lines from the previous display remain on
+the screen, set to the first line of the display;
+otherwise, set to ( \fIline\fP + the number of new lines displayed
+on this screen).
+.LP
+\fICurrent column\fP: Set to non- <blank>.
+.SS Display Information
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB<control>-G
+\fP
+.fi
+.RE
+.sp
+.LP
+This command shall be equivalent to the \fIex\fP \fBfile\fP command.
+.SS Move Cursor Backwards
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fB<control>-H
+.sp
+
+\fP\fB[\fP\fIcount\fP\fB]\fP \fBh
+.sp
+
+the current\fP \fIerase\fP \fBcharacter (see stty)
+\fP
+.fi
+.RE
+.sp
+.LP
+If there are no characters before the current character on the current
+line, it shall be an error. If there are less than
+\fIcount\fP previous characters on the current line, \fIcount\fP shall
+be adjusted to the number of previous characters on the
+line.
+.LP
+If used as a motion command:
+.IP " 1." 4
+The text region shall be from the character before the starting cursor
+up to and including the \fIcount\fPth character before
+the starting cursor.
+.LP
+.IP " 2." 4
+Any text copied to a buffer shall be in character mode.
+.LP
+.LP
+If not used as a motion command:
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: Set to ( \fIcolumn\fP - the number of columns
+occupied by \fIcount\fP characters ending with the
+previous current column).
+.SS Move Down
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fB<newline>
+.sp
+
+\fP\fB[\fP\fIcount\fP\fB]\fP \fB<control>-J
+.sp
+
+\fP\fB[\fP\fIcount\fP\fB]\fP \fB<control>-M
+.sp
+
+\fP\fB[\fP\fIcount\fP\fB]\fP \fB<control>-N
+.sp
+
+\fP\fB[\fP\fIcount\fP\fB]\fP \fBj
+.sp
+
+\fP\fB[\fP\fIcount\fP\fB]\fP \fB<carriage-return>
+.sp
+
+\fP\fB[\fP\fIcount\fP\fB]\fP \fB+
+\fP
+.fi
+.RE
+.sp
+.LP
+If there are less than \fIcount\fP lines after the current line in
+the edit buffer, it shall be an error.
+.LP
+If used as a motion command:
+.IP " 1." 4
+The text region shall include the starting line and the next \fIcount\fP
+- 1 lines.
+.LP
+.IP " 2." 4
+Any text copied to a buffer shall be in line mode.
+.LP
+.LP
+If not used as a motion command:
+.LP
+\fICurrent line\fP: Set to \fIcurrent line\fP+ \fIcount\fP.
+.LP
+\fICurrent column\fP: Set to non- <blank> for the <carriage-return>,
+<control>-M, and \fB+\fP commands;
+otherwise, unchanged.
+.SS Clear and Redisplay
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB<control>-L
+\fP
+.fi
+.RE
+.sp
+.LP
+If in open mode, clear the screen and redisplay the current line.
+Otherwise, clear and redisplay the screen.
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: Unchanged.
+.SS Move Up
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fB<control>-P
+.sp
+
+\fP\fB[\fP\fIcount\fP\fB]\fP \fBk
+.sp
+
+\fP\fB[\fP\fIcount\fP\fB]\fP \fB-
+\fP
+.fi
+.RE
+.sp
+.LP
+If there are less than \fIcount\fP lines before the current line in
+the edit buffer, it shall be an error.
+.LP
+If used as a motion command:
+.IP " 1." 4
+The text region shall include the starting line and the previous \fIcount\fP
+lines.
+.LP
+.IP " 2." 4
+Any text copied to a buffer shall be in line mode.
+.LP
+.LP
+If not used as a motion command:
+.LP
+\fICurrent line\fP: Set to \fIcurrent line\fP - \fIcount\fP.
+.LP
+\fICurrent column\fP: Set to non- <blank> for the \fB-\fP command;
+otherwise, unchanged.
+.SS Redraw Screen
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB<control>-R
+\fP
+.fi
+.RE
+.sp
+.LP
+If any lines have been deleted from the display screen and flagged
+as deleted on the terminal using the \fB@\fP convention (see
+the beginning of the EXTENDED DESCRIPTION section), they shall be
+redisplayed to match the contents of the edit buffer.
+.LP
+It is unspecified whether lines flagged with \fB@\fP because they
+do not fit on the terminal display shall be affected.
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: Unchanged.
+.SS Scroll Backward
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fB<control>-U
+\fP
+.fi
+.RE
+.sp
+.LP
+If the current line is the first line of the edit buffer, it shall
+be an error.
+.LP
+If no \fIcount\fP is specified, \fIcount\fP shall default to the \fIcount\fP
+associated with the previous <control>-D
+or <control>-U command. If there was no previous <control>-D or <control>-U
+command, \fIcount\fP shall default
+to the value of the \fBscroll\fP edit option.
+.LP
+\fICurrent line\fP: If \fIcount\fP is greater than the current line,
+set to 1; otherwise, set to the current line -
+\fIcount\fP.
+.LP
+\fICurrent column\fP: Set to non- <blank>.
+.SS Scroll Backward by Line
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fB<control>-Y
+\fP
+.fi
+.RE
+.sp
+.LP
+Display the line \fIcount\fP lines before the first line currently
+displayed.
+.LP
+If the current line is the first line of the edit buffer, it shall
+be an error. If this calculation would result in a line that
+is before the first line of the edit buffer, the first line of the
+display shall display some portion of the first line of the edit
+buffer.
+.LP
+\fICurrent line\fP: Unchanged if the previous current character is
+displayed; otherwise, set to the first line displayed.
+.LP
+\fICurrent column\fP: Unchanged.
+.SS Edit the Alternate File
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB<control>-^
+\fP
+.fi
+.RE
+.sp
+This command shall be equivalent to the \fIex\fP \fBedit\fP command,
+with the alternate
+pathname as its argument.
+.SS Terminate Command or Input Mode
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB<ESC>
+\fP
+.fi
+.RE
+.sp
+.LP
+If a partial \fIvi\fP command (as defined by at least one, non- \fIcount\fP
+character) has been entered, discard the
+\fIcount\fP and the command character(s).
+.LP
+Otherwise, if no command characters have been entered, and the <ESC>
+was the result of a map expansion, the terminal shall
+be alerted and the <ESC> character shall be discarded, but it shall
+not be an error.
+.LP
+Otherwise, it shall be an error.
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: Unchanged.
+.SS Search for tagstring
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB<control>-]
+\fP
+.fi
+.RE
+.sp
+.LP
+If the current character is not a word or <blank>, it shall be an
+error.
+.LP
+This command shall be equivalent to the \fIex\fP \fBtag\fP command,
+with the argument to
+that command defined as follows.
+.LP
+If the current character is a <blank>:
+.IP " 1." 4
+Skip all <blank>s after the cursor up to the end of the line.
+.LP
+.IP " 2." 4
+If the end of the line is reached, it shall be an error.
+.LP
+.LP
+Then, the argument to the \fIex\fP \fBtag\fP command shall be the
+current character and all
+subsequent characters, up to the first non-word character or the end
+of the line.
+.SS Move Cursor Forward
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fB<space>
+.sp
+
+\fP\fB[\fP\fIcount\fP\fB]\fP \fBl\fP (ell)
+.fi
+.RE
+.sp
+.LP
+If there are less than \fIcount\fP non- <newline>s after the cursor
+on the current line, \fIcount\fP shall be adjusted
+to the number of non- <newline>s after the cursor on the line.
+.LP
+If used as a motion command:
+.IP " 1." 4
+If the current or \fIcount\fPth character after the cursor is the
+last non- <newline> in the line, the text region shall
+be comprised of the current character up to and including the last
+non- <newline> in the line. Otherwise, the text region
+shall be from the current character up to, but not including, the
+\fIcount\fPth character after the cursor.
+.LP
+.IP " 2." 4
+Any text copied to a buffer shall be in character mode.
+.LP
+.LP
+If not used as a motion command:
+.LP
+If there are no non- <newline>s after the current character on the
+current line, it shall be an error.
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: Set to the last column that displays any portion
+of the \fIcount\fPth character after the current
+character.
+.SS Replace Text with Results from Shell Command
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fB!\fP \fImotion shell-commands\fP \fB<newline>
+\fP
+.fi
+.RE
+.sp
+.LP
+If the motion command is the \fB!\fP command repeated:
+.IP " 1." 4
+If the edit buffer is empty and no \fIcount\fP was supplied, the command
+shall be the equivalent of the \fIex\fP \fB:read\fP \fB!\fP command,
+with the text input, and no text shall be copied to any
+buffer.
+.LP
+.IP " 2." 4
+Otherwise:
+.RS
+.IP " a." 4
+If there are less than \fIcount\fP -1 lines after the current line
+in the edit buffer, it shall be an error.
+.LP
+.IP " b." 4
+The text region shall be from the current line up to and including
+the next \fIcount\fP -1 lines.
+.LP
+.RE
+.LP
+.LP
+Otherwise, the text region shall be the lines in which any character
+of the text region specified by the motion command
+appear.
+.LP
+Any text copied to a buffer shall be in line mode.
+.LP
+This command shall be equivalent to the \fIex\fP \fB!\fP command for
+the specified
+lines.
+.SS Move Cursor to End-of-Line
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fB$
+\fP
+.fi
+.RE
+.sp
+.LP
+It shall be an error if there are less than ( \fIcount\fP -1) lines
+after the current line in the edit buffer.
+.LP
+If used as a motion command:
+.IP " 1." 4
+If \fIcount\fP is 1:
+.RS
+.IP " a." 4
+It shall be an error if the line is empty.
+.LP
+.IP " b." 4
+Otherwise, the text region shall consist of all characters from the
+starting cursor to the last non- <newline> in the
+line, inclusive, and any text copied to a buffer shall be in character
+mode.
+.LP
+.RE
+.LP
+.IP " 2." 4
+Otherwise, if the starting cursor position is at or before the first
+non- <blank> in the line, the text region shall
+consist of the current and the next \fIcount\fP -1 lines, and any
+text saved to a buffer shall be in line mode.
+.LP
+.IP " 3." 4
+Otherwise, the text region shall consist of all characters from the
+starting cursor to the last non- <newline> in the line
+that is \fIcount\fP -1 lines forward from the current line, and any
+text copied to a buffer shall be in character mode.
+.LP
+.LP
+If not used as a motion command:
+.LP
+\fICurrent line\fP: Set to the \fIcurrent line\fP + \fIcount\fP-1.
+.LP
+\fICurrent column\fP: The current column is set to the last display
+line column of the last non- <newline> in the line,
+or column position 1 if the line is empty.
+.LP
+The current column shall be adjusted to be on the last display line
+column of the last non- <newline> of the current line
+as subsequent commands change the current line, until a command changes
+the current column.
+.SS Move to Matching Character
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB%
+\fP
+.fi
+.RE
+.sp
+.LP
+If the character at the current position is not a parenthesis, bracket,
+or curly brace, search forward in the line to the first
+one of those characters. If no such character is found, it shall be
+an error.
+.LP
+The matching character shall be the parenthesis, bracket, or curly
+brace matching the parenthesis, bracket, or curly brace,
+respectively, that was at the current position or that was found on
+the current line.
+.LP
+Matching shall be determined as follows, for an open parenthesis:
+.IP " 1." 4
+Set a counter to 1.
+.LP
+.IP " 2." 4
+Search forwards until a parenthesis is found or the end of the edit
+buffer is reached.
+.LP
+.IP " 3." 4
+If the end of the edit buffer is reached, it shall be an error.
+.LP
+.IP " 4." 4
+If an open parenthesis is found, increment the counter by 1.
+.LP
+.IP " 5." 4
+If a close parenthesis is found, decrement the counter by 1.
+.LP
+.IP " 6." 4
+If the counter is zero, the current character is the matching character.
+.LP
+.LP
+Matching for a close parenthesis shall be equivalent, except that
+the search shall be backwards, from the starting character to
+the beginning of the buffer, a close parenthesis shall increment the
+counter by 1, and an open parenthesis shall decrement the
+counter by 1.
+.LP
+Matching for brackets and curly braces shall be equivalent, except
+that searching shall be done for open and close brackets or
+open and close curly braces. It is implementation-defined whether
+other characters are searched for and matched as well.
+.LP
+If used as a motion command:
+.IP " 1." 4
+If the matching cursor was after the starting cursor in the edit buffer,
+and the starting cursor position was at or before the
+first non- <blank> non- <newline> in the starting line, and the matching
+cursor position was at or after the last non-
+<blank> non- <newline> in the matching line, the text region shall
+consist of the current line to the matching line,
+inclusive, and any text copied to a buffer shall be in line mode.
+.LP
+.IP " 2." 4
+If the matching cursor was before the starting cursor in the edit
+buffer, and the starting cursor position was at or after the
+last non- <blank> non- <newline> in the starting line, and the matching
+cursor position was at or before the first non-
+<blank> non- <newline> in the matching line, the text region shall
+consist of the current line to the matching line,
+inclusive, and any text copied to a buffer shall be in line mode.
+.LP
+.IP " 3." 4
+Otherwise, the text region shall consist of the starting character
+to the matching character, inclusive, and any text copied to
+a buffer shall be in character mode.
+.LP
+.LP
+If not used as a motion command:
+.LP
+\fICurrent line\fP: Set to the line where the matching character is
+located.
+.LP
+\fICurrent column\fP: Set to the last column where any portion of
+the matching character is displayed.
+.SS Repeat Substitution
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB&
+\fP
+.fi
+.RE
+.sp
+.LP
+Repeat the previous substitution command. This command shall be equivalent
+to the \fIex\fP
+\fB&\fP command with the current line as its addresses, and without
+\fIoptions\fP, \fIcount\fP, or \fIflags\fP.
+.SS Return to Previous Context at Beginning of Line
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB'\fP \fIcharacter\fP
+.fi
+.RE
+.sp
+.LP
+It shall be an error if there is no line in the edit buffer marked
+by \fIcharacter\fP.
+.LP
+If used as a motion command:
+.IP " 1." 4
+If the starting cursor is after the marked cursor, then the locations
+of the starting cursor and the marked cursor in the edit
+buffer shall be logically swapped.
+.LP
+.IP " 2." 4
+The text region shall consist of the starting line up to and including
+the marked line, and any text copied to a buffer shall be
+in line mode.
+.LP
+.LP
+If not used as a motion command:
+.LP
+\fICurrent line\fP: Set to the line referenced by the mark.
+.LP
+\fICurrent column\fP: Set to non- <blank>.
+.SS Return to Previous Context
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB`\fP \fIcharacter\fP
+.fi
+.RE
+.sp
+.LP
+It shall be an error if the marked line is no longer in the edit buffer.
+If the marked line no longer contains a character in
+the saved numbered character position, it shall be as if the marked
+position is the first non- <blank>.
+.LP
+If used as a motion command:
+.IP " 1." 4
+It shall be an error if the marked cursor references the same character
+in the edit buffer as the starting cursor.
+.LP
+.IP " 2." 4
+If the starting cursor is after the marked cursor, then the locations
+of the starting cursor and the marked cursor in the edit
+buffer shall be logically swapped.
+.LP
+.IP " 3." 4
+If the starting line is empty or the starting cursor is at or before
+the first non- <blank> non- <newline> of the
+starting line, and the marked cursor line is empty or the marked cursor
+references the first character of the marked cursor line,
+the text region shall consist of all lines containing characters from
+the starting cursor to the line before the marked cursor
+line, inclusive, and any text copied to a buffer shall be in line
+mode.
+.LP
+.IP " 4." 4
+Otherwise, if the marked cursor line is empty or the marked cursor
+references a character at or before the first non-
+<blank> non- <newline> of the marked cursor line, the region of text
+shall be from the starting cursor to the last non-
+<newline> of the line before the marked cursor line, inclusive, and
+any text copied to a buffer shall be in character
+mode.
+.LP
+.IP " 5." 4
+Otherwise, the region of text shall be from the starting cursor (inclusive),
+to the marked cursor (exclusive), and any text
+copied to a buffer shall be in character mode.
+.LP
+.LP
+If not used as a motion command:
+.LP
+\fICurrent line\fP: Set to the line referenced by the mark.
+.LP
+\fICurrent column\fP: Set to the last column in which any portion
+of the character referenced by the mark is displayed.
+.SS Return to Previous Section
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fB[[
+\fP
+.fi
+.RE
+.sp
+.LP
+Move the cursor backward through the edit buffer to the first character
+of the previous section boundary, \fIcount\fP
+times.
+.LP
+If used as a motion command:
+.IP " 1." 4
+If the starting cursor was at the first character of the starting
+line or the starting line was empty, and the first character
+of the boundary was the first character of the boundary line, the
+text region shall consist of the current line up to and including
+the line where the \fIcount\fPth next boundary starts, and any text
+copied to a buffer shall be in line mode.
+.LP
+.IP " 2." 4
+If the boundary was the last line of the edit buffer or the last non-
+<newline> of the last line of the edit buffer, the
+text region shall consist of the last character in the edit buffer
+up to and including the starting character, and any text saved
+to a buffer shall be in character mode.
+.LP
+.IP " 3." 4
+Otherwise, the text region shall consist of the starting character
+up to but not including the first character in the
+\fIcount\fPth next boundary, and any text copied to a buffer shall
+be in character mode.
+.LP
+.LP
+If not used as a motion command:
+.LP
+\fICurrent line\fP: Set to the line where the \fIcount\fPth next boundary
+in the edit buffer starts.
+.LP
+\fICurrent column\fP: Set to the last column in which any portion
+of the first character of the \fIcount\fPth next boundary is
+displayed, or column position 1 if the line is empty.
+.SS Move to Next Section
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fB]]
+\fP
+.fi
+.RE
+.sp
+.LP
+Move the cursor forward through the edit buffer to the first character
+of the next section boundary, \fIcount\fP times.
+.LP
+If used as a motion command:
+.IP " 1." 4
+If the starting cursor was at the first character of the starting
+line or the starting line was empty, and the first character
+of the boundary was the first character of the boundary line, the
+text region shall consist of the current line up to and including
+the line where the \fIcount\fPth previous boundary starts, and any
+text copied to a buffer shall be in line mode.
+.LP
+.IP " 2." 4
+If the boundary was the first line of the edit buffer, the text region
+shall consist of the first character in the edit buffer
+up to but not including the starting character, and any text copied
+to a buffer shall be in character mode.
+.LP
+.IP " 3." 4
+Otherwise, the text region shall consist of the first character in
+the \fIcount\fPth previous section boundary up to but not
+including the starting character, and any text copied to a buffer
+shall be in character mode.
+.LP
+.LP
+If not used as a motion command:
+.LP
+\fICurrent line\fP: Set to the line where the \fIcount\fPth previous
+boundary in the edit buffer starts.
+.LP
+\fICurrent column\fP: Set to the last column in which any portion
+of the first character of the \fIcount\fPth previous
+boundary is displayed, or column position 1 if the line is empty.
+.SS Move to First Non-<blank> Position on Current Line
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB^
+\fP
+.fi
+.RE
+.sp
+If used as a motion command:
+.IP " 1." 4
+If the line has no non- <blank> non- <newline>s, or if the cursor
+is at the first non- <blank> non-
+<newline> of the line, it shall be an error.
+.LP
+.IP " 2." 4
+If the cursor is before the first non- <blank> non- <newline> of the
+line, the text region shall be comprised of the
+current character, up to, but not including, the first non- <blank>
+non- <newline> of the line.
+.LP
+.IP " 3." 4
+If the cursor is after the first non- <blank> non- <newline> of the
+line, the text region shall be from the
+character before the starting cursor up to and including the first
+non- <blank> non- <newline> of the line.
+.LP
+.IP " 4." 4
+Any text copied to a buffer shall be in character mode.
+.LP
+.LP
+If not used as a motion command:
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: Set to non- <blank>.
+.SS Current and Line Above
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fB_
+\fP
+.fi
+.RE
+.sp
+.LP
+If there are less than \fIcount\fP -1 lines after the current line
+in the edit buffer, it shall be an error.
+.LP
+If used as a motion command:
+.IP " 1." 4
+If \fIcount\fP is less than 2, the text region shall be the current
+line.
+.LP
+.IP " 2." 4
+Otherwise, the text region shall include the starting line and the
+next \fIcount\fP -1 lines.
+.LP
+.IP " 3." 4
+Any text copied to a buffer shall be in line mode.
+.LP
+.LP
+If not used as a motion command:
+.LP
+\fICurrent line\fP: Set to current line + \fIcount\fP -1.
+.LP
+\fICurrent column\fP: Set to non- <blank>.
+.SS Move Back to Beginning of Sentence
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fB(
+\fP
+.fi
+.RE
+.sp
+.LP
+Move backward to the beginning of a sentence. This command shall be
+equivalent to the \fB[[\fP command, with the exception that
+sentence boundaries shall be used instead of section boundaries.
+.SS Move Forward to Beginning of Sentence
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fB)
+\fP
+.fi
+.RE
+.sp
+.LP
+Move forward to the beginning of a sentence. This command shall be
+equivalent to the \fB]]\fP command, with the exception that
+sentence boundaries shall be used instead of section boundaries.
+.SS Move Back to Preceding Paragraph
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fB{
+\fP
+.fi
+.RE
+.sp
+.LP
+Move back to the beginning of the preceding paragraph. This command
+shall be equivalent to the \fB[[\fP command, with the
+exception that paragraph boundaries shall be used instead of section
+boundaries.
+.SS Move Forward to Next Paragraph
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fB}
+\fP
+.fi
+.RE
+.sp
+.LP
+Move forward to the beginning of the next paragraph. This command
+shall be equivalent to the \fB]]\fP command, with the
+exception that paragraph boundaries shall be used instead of section
+boundaries.
+.SS Move to Specific Column Position
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fB|
+\fP
+.fi
+.RE
+.sp
+.LP
+For the purposes of this command, lines that are too long for the
+current display and that have been folded shall be treated as
+having a single, 1-based, number of columns.
+.LP
+If there are less than \fIcount\fP columns in which characters from
+the current line are displayed on the screen, \fIcount\fP
+shall be adjusted to be the last column in which any portion of the
+line is displayed on the screen.
+.LP
+If used as a motion command:
+.IP " 1." 4
+If the line is empty, or the cursor character is the same as the character
+on the \fIcount\fPth column of the line, it shall be
+an error.
+.LP
+.IP " 2." 4
+If the cursor is before the \fIcount\fPth column of the line, the
+text region shall be comprised of the current character, up
+to but not including the character on the \fIcount\fPth column of
+the line.
+.LP
+.IP " 3." 4
+If the cursor is after the \fIcount\fPth column of the line, the text
+region shall be from the character before the starting
+cursor up to and including the character on the \fIcount\fPth column
+of the line.
+.LP
+.IP " 4." 4
+Any text copied to a buffer shall be in character mode.
+.LP
+.LP
+If not used as a motion command:
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: Set to the last column in which any portion
+of the character that is displayed in the \fIcount\fP column
+of the line is displayed.
+.SS Reverse Find Character
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fB,
+\fP
+.fi
+.RE
+.sp
+.LP
+If the last \fBF\fP, \fBf\fP, \fBT\fP, or \fBt\fP command was \fBF\fP,
+\fBf\fP, \fBT\fP, or \fBt\fP, this command shall
+be equivalent to an \fBf\fP, \fBF\fP, \fBt\fP, or \fBT\fP command,
+respectively, with the specified \fIcount\fP and the same
+search character.
+.LP
+If there was no previous \fBF\fP, \fBf\fP, \fBT\fP, or \fBt\fP command,
+it shall be an error.
+.SS Repeat
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fB.
+\fP
+.fi
+.RE
+.sp
+.LP
+Repeat the last \fB!\fP, \fB<\fP, \fB>\fP, \fBA\fP, \fBC\fP, \fBD\fP,
+\fBI\fP, \fBJ\fP, \fBO\fP, \fBP\fP,
+\fBR\fP, \fBS\fP, \fBX\fP, \fBY\fP, \fBa\fP, \fBc\fP, \fBd\fP, \fBi\fP,
+\fBo\fP, \fBp\fP, \fBr\fP, \fBs\fP, \fBx\fP,
+\fBy\fP, or \fB~\fP command. It shall be an error if none of these
+commands have been executed. Commands (other than
+commands that enter text input mode) executed as a result of map expansions,
+shall not change the value of the last repeatable
+command.
+.LP
+Repeated commands with associated motion commands shall repeat the
+motion command as well; however, any specified \fIcount\fP
+shall replace the \fIcount\fP(s) that were originally specified to
+the repeated command or its associated motion command.
+.LP
+If the motion component of the repeated command is \fBf\fP, \fBF\fP,
+\fBt\fP, or \fBT\fP, the repeated command shall not set
+the remembered search character for the \fB;\fP and \fB,\fP commands.
+.LP
+If the repeated command is \fBp\fP or \fBP\fP, and the buffer associated
+with that command was a numeric buffer named with a
+number less than 9, the buffer associated with the repeated command
+shall be set to be the buffer named by the name of the previous
+buffer logically incremented by 1.
+.LP
+If the repeated character is a text input command, the input text
+associated with that command is repeated literally:
+.IP " *" 3
+Input characters are neither macro or abbreviation-expanded.
+.LP
+.IP " *" 3
+Input characters are not interpreted in any special way with the exception
+that <newline>, <carriage-return>, and
+<control>-T behave as described in Input Mode Commands in vi .
+.LP
+.LP
+\fICurrent line\fP: Set as described for the repeated command.
+.LP
+\fICurrent column\fP: Set as described for the repeated command.
+.SS Find Regular Expression
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB/
+\fP
+.fi
+.RE
+.sp
+.LP
+If the input line contains no non- <newline>s, it shall be equivalent
+to a line containing only the last regular
+expression encountered. The enhanced regular expressions supported
+by \fIvi\fP are described in \fIRegular Expressions in ex\fP .
+.LP
+Otherwise, the line shall be interpreted as one or more regular expressions,
+optionally followed by an address offset or a
+\fIvi\fP \fBz\fP command.
+.LP
+If the regular expression is not the last regular expression on the
+line, or if a line offset or \fBz\fP command is specified,
+the regular expression shall be terminated by an unescaped \fB'/'\fP
+character, which shall not be used as part of the regular
+expression. If the regular expression is not the first regular expression
+on the line, it shall be preceded by zero or more
+<blank>s, a semicolon, zero or more <blank>s, and a leading \fB'/'\fP
+character, which shall not be interpreted as
+part of the regular expression. It shall be an error to precede any
+regular expression with any characters other than these.
+.LP
+Each search shall begin from the character after the first character
+of the last match (or, if it is the first search, after the
+cursor). If the \fBwrapscan\fP edit option is set, the search shall
+continue to the character before the starting cursor
+character; otherwise, to the end of the edit buffer. It shall be an
+error if any search fails to find a match, and an informational
+message to this effect shall be displayed.
+.LP
+An optional address offset (see \fIAddressing in ex\fP ) can be specified
+after the last
+regular expression by including a trailing \fB'/'\fP character after
+the regular expression and specifying the address offset.
+This offset will be from the line containing the match for the last
+regular expression specified. It shall be an error if the line
+offset would indicate a line address less than 1 or greater than the
+last line in the edit buffer. An address offset of zero shall
+be supported. It shall be an error to follow the address offset with
+any other characters than <blank>s.
+.LP
+If not used as a motion command, an optional \fBz\fP command (see
+Redraw Window ) can be
+specified after the last regular expression by including a trailing
+\fB'/'\fP character after the regular expression, zero or
+more <blank>s, a \fB'z'\fP, zero or more <blank>s, an optional new
+\fBwindow\fP edit option value, zero or more
+<blank>s, and a location character. The effect shall be as if the
+\fBz\fP command was executed after the \fB/\fP command.
+It shall be an error to follow the \fBz\fP command with any other
+characters than <blank>s.
+.LP
+The remembered search direction shall be set to forward.
+.LP
+If used as a motion command:
+.IP " 1." 4
+It shall be an error if the last match references the same character
+in the edit buffer as the starting cursor.
+.LP
+.IP " 2." 4
+If any address offset is specified, the last match shall be adjusted
+by the specified offset as described previously.
+.LP
+.IP " 3." 4
+If the starting cursor is after the last match, then the locations
+of the starting cursor and the last match in the edit buffer
+shall be logically swapped.
+.LP
+.IP " 4." 4
+If any address offset is specified, the text region shall consist
+of all lines containing characters from the starting cursor to
+the last match line, inclusive, and any text copied to a buffer shall
+be in line mode.
+.LP
+.IP " 5." 4
+Otherwise, if the starting line is empty or the starting cursor is
+at or before the first non- <blank> non-
+<newline> of the starting line, and the last match line is empty or
+the last match starts at the first character of the last
+match line, the text region shall consist of all lines containing
+characters from the starting cursor to the line before the last
+match line, inclusive, and any text copied to a buffer shall be in
+line mode.
+.LP
+.IP " 6." 4
+Otherwise, if the last match line is empty or the last match begins
+at a character at or before the first non- <blank>
+non- <newline> of the last match line, the region of text shall be
+from the current cursor to the last non- <newline>
+of the line before the last match line, inclusive, and any text copied
+to a buffer shall be in character mode.
+.LP
+.IP " 7." 4
+Otherwise, the region of text shall be from the current cursor (inclusive),
+to the first character of the last match
+(exclusive), and any text copied to a buffer shall be in character
+mode.
+.LP
+.LP
+If not used as a motion command:
+.LP
+\fICurrent line\fP: If a match is found, set to the last matched line
+plus the address offset, if any; otherwise,
+unchanged.
+.LP
+\fICurrent column\fP: Set to the last column on which any portion
+of the first character in the last matched string is
+displayed, if a match is found; otherwise, unchanged.
+.SS Move to First Character in Line
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB0 \fP (zero)
+.fi
+.RE
+.sp
+.LP
+Move to the first character on the current line. The character \fB'0'\fP
+shall not be interpreted as a command if it is
+immediately preceded by a digit.
+.LP
+If used as a motion command:
+.IP " 1." 4
+If the cursor character is the first character in the line, it shall
+be an error.
+.LP
+.IP " 2." 4
+The text region shall be from the character before the cursor character
+up to and including the first character in the line.
+.LP
+.IP " 3." 4
+Any text copied to a buffer shall be in character mode.
+.LP
+.LP
+If not used as a motion command:
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: The last column in which any portion of the
+first character in the line is displayed, or if the line is
+empty, unchanged.
+.SS Execute an ex Command
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB:
+\fP
+.fi
+.RE
+.sp
+.LP
+Execute one or more \fIex\fP commands.
+.LP
+If any portion of the screen other than the last line of the screen
+was overwritten by any \fIex\fP command (except \fBshell\fP), \fIvi\fP
+shall display a message indicating that it is waiting
+for an input from the user, and shall then read a character. This
+action may also be taken for other, unspecified reasons.
+.LP
+If the next character entered is a \fB':'\fP, another \fIex\fP command
+shall be accepted
+and executed. Any other character shall cause the screen to be refreshed
+and \fIvi\fP shall return to command mode.
+.LP
+\fICurrent line\fP: As specified for the \fIex\fP command.
+.LP
+\fICurrent column\fP: As specified for the \fIex\fP command.
+.SS Repeat Find
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fB;
+\fP
+.fi
+.RE
+.sp
+.LP
+This command shall be equivalent to the last \fBF\fP, \fBf\fP, \fBT\fP,
+or \fBt\fP command, with the specified \fIcount\fP,
+and with the same search character used for the last \fBF\fP, \fBf\fP,
+\fBT\fP, or \fBt\fP command. If there was no previous
+\fBF\fP, \fBf\fP, \fBT\fP, or \fBt\fP command, it shall be an error.
+.SS Shift Left
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fB<\fP \fImotion\fP
+.fi
+.RE
+.sp
+.LP
+If the motion command is the \fB<\fP command repeated:
+.IP " 1." 4
+If there are less than \fIcount\fP -1 lines after the current line
+in the edit buffer, it shall be an error.
+.LP
+.IP " 2." 4
+The text region shall be from the current line, up to and including
+the next \fIcount\fP -1 lines.
+.LP
+.LP
+Shift any line in the text region specified by the \fIcount\fP and
+motion command one shiftwidth (see the \fIex\fP \fBshiftwidth\fP option)
+toward the start of the line, as described by the \fIex\fP \fB<\fP
+command. The unshifted lines shall be copied to the unnamed buffer
+in line
+mode.
+.LP
+\fICurrent line\fP: If the motion was from the current cursor position
+toward the end of the edit buffer, unchanged. Otherwise,
+set to the first line in the edit buffer that is part of the text
+region specified by the motion command.
+.LP
+\fICurrent column\fP: Set to non- <blank>.
+.SS Shift Right
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fB>\fP \fImotion\fP
+.fi
+.RE
+.sp
+.LP
+If the motion command is the \fB>\fP command repeated:
+.IP " 1." 4
+If there are less than \fIcount\fP -1 lines after the current line
+in the edit buffer, it shall be an error.
+.LP
+.IP " 2." 4
+The text region shall be from the current line, up to and including
+the next \fIcount\fP -1 lines.
+.LP
+.LP
+Shift any line with characters in the text region specified by the
+\fIcount\fP and motion command one shiftwidth (see the \fIex\fP \fBshiftwidth\fP
+option) away from the start of the line, as described by the \fIex\fP
+\fB>\fP command. The unshifted lines shall be copied into the unnamed
+buffer in line
+mode.
+.LP
+\fICurrent line\fP: If the motion was from the current cursor position
+toward the end of the edit buffer, unchanged. Otherwise,
+set to the first line in the edit buffer that is part of the text
+region specified by the motion command.
+.LP
+\fICurrent column\fP: Set to non- <blank>.
+.SS Scan Backwards for Regular Expression
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB?
+\fP
+.fi
+.RE
+.sp
+.LP
+Scan backwards; the \fB?\fP command shall be equivalent to the \fB/\fP
+command (see Find Regular
+Expression ) with the following exceptions:
+.IP " 1." 4
+The input prompt shall be a \fB'?'\fP .
+.LP
+.IP " 2." 4
+Each search shall begin from the character before the first character
+of the last match (or, if it is the first search, the
+character before the cursor character).
+.LP
+.IP " 3." 4
+The search direction shall be from the cursor toward the beginning
+of the edit buffer, and the \fBwrapscan\fP edit option shall
+affect whether the search wraps to the end of the edit buffer and
+continues.
+.LP
+.IP " 4." 4
+The remembered search direction shall be set to backward.
+.LP
+.SS Execute
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB@\fP\fIbuffer\fP
+.fi
+.RE
+.sp
+.LP
+If the \fIbuffer\fP is specified as \fB@\fP, the last buffer executed
+shall be used. If no previous buffer has been executed,
+it shall be an error.
+.LP
+Behave as if the contents of the named buffer were entered as standard
+input. After each line of a line-mode buffer, and all but
+the last line of a character mode buffer, behave as if a <newline>
+were entered as standard input.
+.LP
+If an error occurs during this process, an error message shall be
+written, and no more characters resulting from the execution
+of this command shall be processed.
+.LP
+If a \fIcount\fP is specified, behave as if that count were entered
+as user input before the characters from the \fB@\fP
+buffer were entered.
+.LP
+\fICurrent line\fP: As specified for the individual commands.
+.LP
+\fICurrent column\fP: As specified for the individual commands.
+.SS Reverse Case
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fB~
+\fP
+.fi
+.RE
+.sp
+.LP
+Reverse the case of the current character and the next \fIcount\fP
+-1 characters, such that lowercase characters that have
+uppercase counterparts shall be changed to uppercase characters, and
+uppercase characters that have lowercase counterparts shall be
+changed to lowercase characters, as prescribed by the current locale.
+No other characters shall be affected by this command.
+.LP
+If there are less than \fIcount\fP -1 characters after the cursor
+in the edit buffer, \fIcount\fP shall be adjusted to the
+number of characters after the cursor in the edit buffer minus 1.
+.LP
+For the purposes of this command, the next character after the last
+non- <newline> on the line shall be the next character
+in the edit buffer.
+.LP
+\fICurrent line\fP: Set to the line including the ( \fIcount\fP-1)th
+character after the cursor.
+.LP
+\fICurrent column\fP: Set to the last column in which any portion
+of the ( \fIcount\fP-1)th character after the cursor is
+displayed.
+.SS Append
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fBa
+\fP
+.fi
+.RE
+.sp
+.LP
+Enter text input mode after the current cursor position. No characters
+already in the edit buffer shall be affected by this
+command. A \fIcount\fP shall cause the input text to be appended \fIcount\fP
+-1 more times to the end of the input.
+.LP
+\fICurrent line/column\fP: As specified for the text input commands
+(see Input Mode Commands in
+vi ).
+.SS Append at End-of-Line
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fBA
+\fP
+.fi
+.RE
+.sp
+.LP
+This command shall be equivalent to the \fIvi\fP command:
+.sp
+.RS
+.nf
+
+\fB$\fP \fB[\fP \fIcount\fP \fB]\fP \fBa
+\fP
+.fi
+.RE
+.LP
+(see Append ).
+.SS Move Backward to Preceding Word
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fBb
+\fP
+.fi
+.RE
+.sp
+.LP
+With the exception that words are used as the delimiter instead of
+bigwords, this command shall be equivalent to the \fBB\fP
+command.
+.SS Move Backward to Preceding Bigword
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fBB
+\fP
+.fi
+.RE
+.sp
+.LP
+If the edit buffer is empty or the cursor is on the first character
+of the edit buffer, it shall be an error. If less than
+\fIcount\fP bigwords begin between the cursor and the start of the
+edit buffer, \fIcount\fP shall be adjusted to the number of
+bigword beginnings between the cursor and the start of the edit buffer.
+.LP
+If used as a motion command:
+.IP " 1." 4
+The text region shall be from the first character of the \fIcount\fPth
+previous bigword beginning up to but not including the
+cursor character.
+.LP
+.IP " 2." 4
+Any text copied to a buffer shall be in character mode.
+.LP
+.LP
+If not used as a motion command:
+.LP
+\fICurrent line\fP: Set to the line containing the \fIcurrent column\fP.
+.LP
+\fICurrent column\fP: Set to the last column upon which any part of
+the first character of the \fIcount\fPth previous bigword
+is displayed.
+.SS Change
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIbuffer\fP\fB][\fP\fIcount\fP\fB]\fP \fBc\fP \fImotion\fP
+.fi
+.RE
+.sp
+.LP
+If the motion command is the \fBc\fP command repeated:
+.IP " 1." 4
+The buffer text shall be in line mode.
+.LP
+.IP " 2." 4
+If there are less than \fIcount\fP -1 lines after the current line
+in the edit buffer, it shall be an error.
+.LP
+.IP " 3." 4
+The text region shall be from the current line up to and including
+the next \fIcount\fP -1 lines.
+.LP
+.LP
+Otherwise, the buffer text mode and text region shall be as specified
+by the motion command.
+.LP
+The replaced text shall be copied into \fIbuffer\fP, if specified,
+and into the unnamed buffer. If the text to be replaced
+contains characters from more than a single line, or the buffer text
+is in line mode, the replaced text shall be copied into the
+numeric buffers as well.
+.LP
+If the buffer text is in line mode:
+.IP " 1." 4
+Any lines that contain characters in the region shall be deleted,
+and the editor shall enter text input mode at the beginning of
+a new line which shall replace the first line deleted.
+.LP
+.IP " 2." 4
+If the \fBautoindent\fP edit option is set, \fBautoindent\fP characters
+equal to the \fBautoindent\fP characters on the first
+line deleted shall be inserted as if entered by the user.
+.LP
+.LP
+Otherwise, if characters from more than one line are in the region
+of text:
+.IP " 1." 4
+The text shall be deleted.
+.LP
+.IP " 2." 4
+Any text remaining in the last line in the text region shall be appended
+to the first line in the region, and the last line in
+the region shall be deleted.
+.LP
+.IP " 3." 4
+The editor shall enter text input mode after the last character not
+deleted from the first line in the text region, if any;
+otherwise, on the first column of the first line in the region.
+.LP
+.LP
+Otherwise:
+.IP " 1." 4
+If the glyph for \fB'$'\fP is smaller than the region, the end of
+the region shall be marked with a \fB'$'\fP .
+.LP
+.IP " 2." 4
+The editor shall enter text input mode, overwriting the region of
+text.
+.LP
+.LP
+\fICurrent line/column\fP: As specified for the text input commands
+(see Input Mode Commands in
+vi ).
+.SS Change to End-of-Line
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIbuffer\fP\fB][\fP\fIcount\fP\fB]\fP \fBC
+\fP
+.fi
+.RE
+.sp
+.LP
+This command shall be equivalent to the \fIvi\fP command:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIbuffer\fP\fB][\fP\fIcount\fP\fB]\fP \fBc$
+\fP
+.fi
+.RE
+.LP
+See the \fBc\fP command.
+.SS Delete
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIbuffer\fP\fB][\fP\fIcount\fP\fB]\fP \fBd\fP \fImotion\fP
+.fi
+.RE
+.sp
+.LP
+If the motion command is the \fBd\fP command repeated:
+.IP " 1." 4
+The buffer text shall be in line mode.
+.LP
+.IP " 2." 4
+If there are less than \fIcount\fP -1 lines after the current line
+in the edit buffer, it shall be an error.
+.LP
+.IP " 3." 4
+The text region shall be from the current line up to and including
+the next \fIcount\fP -1 lines.
+.LP
+.LP
+Otherwise, the buffer text mode and text region shall be as specified
+by the motion command.
+.LP
+If in open mode, and the current line is deleted, and the line remains
+on the display, an \fB'@'\fP character shall be
+displayed as the first glyph of that line.
+.LP
+Delete the region of text into \fIbuffer\fP, if specified, and into
+the unnamed buffer. If the text to be deleted contains
+characters from more than a single line, or the buffer text is in
+line mode, the deleted text shall be copied into the numeric
+buffers, as well.
+.LP
+\fICurrent line\fP: Set to the first text region line that appears
+in the edit buffer, unless that line has been deleted, in
+which case it shall be set to the last line in the edit buffer, or
+line 1 if the edit buffer is empty.
+.LP
+\fICurrent column\fP:
+.IP " 1." 4
+If the line is empty, set to column position 1.
+.LP
+.IP " 2." 4
+Otherwise, if the buffer text is in line mode or the motion was from
+the cursor toward the end of the edit buffer:
+.RS
+.IP " a." 4
+If a character from the current line is displayed in the current column,
+set to the last column that displays any portion of
+that character.
+.LP
+.IP " b." 4
+Otherwise, set to the last column in which any portion of any character
+in the line is displayed.
+.LP
+.RE
+.LP
+.IP " 3." 4
+Otherwise, if a character is displayed in the column that began the
+text region, set to the last column that displays any
+portion of that character.
+.LP
+.IP " 4." 4
+Otherwise, set to the last column in which any portion of any character
+in the line is displayed.
+.LP
+.SS Delete to End-of-Line
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIbuffer\fP\fB]\fP \fBD
+\fP
+.fi
+.RE
+.sp
+.LP
+Delete the text from the current position to the end of the current
+line; equivalent to the \fIvi\fP command:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIbuffer\fP\fB]\fP \fBd$
+\fP
+.fi
+.RE
+.SS Move to End-of-Word
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fBe
+\fP
+.fi
+.RE
+.sp
+.LP
+With the exception that words are used instead of bigwords as the
+delimiter, this command shall be equivalent to the \fBE\fP
+command.
+.SS Move to End-of-Bigword
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fBE
+\fP
+.fi
+.RE
+.sp
+.LP
+If the edit buffer is empty it shall be an error. If less than \fIcount\fP
+bigwords end between the cursor and the end of the
+edit buffer, \fIcount\fP shall be adjusted to the number of bigword
+endings between the cursor and the end of the edit buffer.
+.LP
+If used as a motion command:
+.IP " 1." 4
+The text region shall be from the last character of the \fIcount\fPth
+next bigword up to and including the cursor
+character.
+.LP
+.IP " 2." 4
+Any text copied to a buffer shall be in character mode.
+.LP
+.LP
+If not used as a motion command:
+.LP
+\fICurrent line\fP: Set to the line containing the current column.
+.LP
+\fICurrent column\fP: Set to the last column upon which any part of
+the last character of the \fIcount\fPth next bigword is
+displayed.
+.SS Find Character in Current Line (Forward)
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fBf\fP \fIcharacter\fP
+.fi
+.RE
+.sp
+.LP
+It shall be an error if \fIcount\fP occurrences of the character do
+not occur after the cursor in the line.
+.LP
+If used as a motion command:
+.IP " 1." 4
+The text range shall be from the cursor character up to and including
+the \fIcount\fPth occurrence of the specified character
+after the cursor.
+.LP
+.IP " 2." 4
+Any text copied to a buffer shall be in character mode.
+.LP
+.LP
+If not used as a motion command:
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: Set to the last column in which any portion
+of the \fIcount\fPth occurrence of the specified character
+after the cursor appears in the line.
+.SS Find Character in Current Line (Reverse)
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fBF\fP \fIcharacter\fP
+.fi
+.RE
+.sp
+.LP
+It shall be an error if \fIcount\fP occurrences of the character do
+not occur before the cursor in the line.
+.LP
+If used as a motion command:
+.IP " 1." 4
+The text region shall be from the \fIcount\fPth occurrence of the
+specified character before the cursor, up to, but not
+including the cursor character.
+.LP
+.IP " 2." 4
+Any text copied to a buffer shall be in character mode.
+.LP
+.LP
+If not used as a motion command:
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: Set to the last column in which any portion
+of the \fIcount\fPth occurrence of the specified character
+before the cursor appears in the line.
+.SS Move to Line
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fBG
+\fP
+.fi
+.RE
+.sp
+.LP
+If \fIcount\fP is not specified, it shall default to the last line
+of the edit buffer. If \fIcount\fP is greater than the last
+line of the edit buffer, it shall be an error.
+.LP
+If used as a motion command:
+.IP " 1." 4
+The text region shall be from the cursor line up to and including
+the specified line.
+.LP
+.IP " 2." 4
+Any text copied to a buffer shall be in line mode.
+.LP
+.LP
+If not used as a motion command:
+.LP
+\fICurrent line\fP: Set to \fIcount\fP if \fIcount\fP is specified;
+otherwise, the last line.
+.LP
+\fICurrent column\fP: Set to non- <blank>.
+.SS Move to Top of Screen
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fBH
+\fP
+.fi
+.RE
+.sp
+.LP
+If the beginning of the line \fIcount\fP greater than the first line
+of which any portion appears on the display does not
+exist, it shall be an error.
+.LP
+If used as a motion command:
+.IP " 1." 4
+If in open mode, the text region shall be the current line.
+.LP
+.IP " 2." 4
+Otherwise, the text region shall be from the starting line up to and
+including (the first line of the display + \fIcount\fP
+-1).
+.LP
+.IP " 3." 4
+Any text copied to a buffer shall be in line mode.
+.LP
+.LP
+If not used as a motion command:
+.LP
+If in open mode, this command shall set the current column to non-
+<blank> and do nothing else.
+.LP
+Otherwise, it shall set the current line and current column as follows.
+.LP
+\fICurrent line\fP: Set to (the first line of the display + \fIcount\fP
+-1).
+.LP
+\fICurrent column\fP: Set to non- <blank>.
+.SS Insert Before Cursor
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fBi
+\fP
+.fi
+.RE
+.sp
+.LP
+Enter text input mode before the current cursor position. No characters
+already in the edit buffer shall be affected by this
+command. A \fIcount\fP shall cause the input text to be appended \fIcount\fP
+-1 more times to the end of the input.
+.LP
+\fICurrent line/column\fP: As specified for the text input commands
+(see Input Mode Commands in
+vi ).
+.SS Insert at Beginning of Line
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fBI
+\fP
+.fi
+.RE
+.sp
+.LP
+This command shall be equivalent to the \fIvi\fP command ^[ \fIcount\fP]
+\fBi\fP.
+.SS Join
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fBJ
+\fP
+.fi
+.RE
+.sp
+.LP
+If the current line is the last line in the edit buffer, it shall
+be an error.
+.LP
+This command shall be equivalent to the \fIex\fP \fBjoin\fP command
+with no addresses, and
+an \fIex\fP command \fIcount\fP value of 1 if \fIcount\fP was not
+specified or if a
+\fIcount\fP of 1 was specified, and an \fIex\fP command \fIcount\fP
+value of \fIcount\fP -1
+for any other value of \fIcount\fP, except that the current line and
+column shall be set as follows.
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: The last column in which any portion of the
+character following the last character in the initial line is
+displayed, or the last non- <newline> in the line if no characters
+were appended.
+.SS Move to Bottom of Screen
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fBL
+\fP
+.fi
+.RE
+.sp
+.LP
+If the beginning of the line \fIcount\fP less than the last line of
+which any portion appears on the display does not exist, it
+shall be an error.
+.LP
+If used as a motion command:
+.IP " 1." 4
+If in open mode, the text region shall be the current line.
+.LP
+.IP " 2." 4
+Otherwise, the text region shall include all lines from the starting
+cursor line to (the last line of the display -(
+\fIcount\fP -1)).
+.LP
+.IP " 3." 4
+Any text copied to a buffer shall be in line mode.
+.LP
+.LP
+If not used as a motion command:
+.IP " 1." 4
+If in open mode, this command shall set the current column to non-
+<blank> and do nothing else.
+.LP
+.IP " 2." 4
+Otherwise, it shall set the current line and current column as follows.
+.LP
+.LP
+\fICurrent line\fP: Set to (the last line of the display -( \fIcount\fP
+-1)).
+.LP
+\fICurrent column\fP: Set to non- <blank>.
+.SS Mark Position
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBm\fP \fIletter\fP
+.fi
+.RE
+.sp
+.LP
+This command shall be equivalent to the \fIex\fP \fBmark\fP command
+with the specified
+character as an argument.
+.SS Move to Middle of Screen
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBM
+\fP
+.fi
+.RE
+.sp
+.LP
+The middle line of the display shall be calculated as follows:
+.sp
+.RS
+.nf
+
+\fB(the top line of the display) + (((number of lines displayed) +1) /2) -1
+\fP
+.fi
+.RE
+.LP
+If used as a motion command:
+.IP " 1." 4
+If in open mode, the text region shall be the current line.
+.LP
+.IP " 2." 4
+Otherwise, the text region shall include all lines from the starting
+cursor line up to and including the middle line of the
+display.
+.LP
+.IP " 3." 4
+Any text copied to a buffer shall be in line mode.
+.LP
+.LP
+If not used as a motion command:
+.LP
+If in open mode, this command shall set the current column to non-
+<blank> and do nothing else.
+.LP
+Otherwise, it shall set the current line and current column as follows.
+.LP
+\fICurrent line\fP: Set to the middle line of the display.
+.LP
+\fICurrent column\fP: Set to non- <blank>.
+.SS Repeat Regular Expression Find (Forward)
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBn
+\fP
+.fi
+.RE
+.sp
+.LP
+If the remembered search direction was forward, the \fBn\fP command
+shall be equivalent to the \fIvi\fP \fB/\fP command with
+no characters entered by the user. Otherwise, it shall be equivalent
+to the \fIvi\fP \fB?\fP command with no characters entered
+by the user.
+.LP
+If the \fBn\fP command is used as a motion command for the \fB!\fP
+command, the editor shall not enter text input mode on the
+last line on the screen, and shall behave as if the user entered a
+single \fB'!'\fP character as the text input.
+.SS Repeat Regular Expression Find (Reverse)
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBN
+\fP
+.fi
+.RE
+.sp
+.LP
+Scan for the next match of the last pattern given to \fB/\fP or \fB?\fP,
+but in the reverse direction; this is the reverse of
+\fBn\fP.
+.LP
+If the remembered search direction was forward, the \fBN\fP command
+shall be equivalent to the \fIvi\fP \fB?\fP command with
+no characters entered by the user. Otherwise, it shall be equivalent
+to the \fIvi\fP \fB/\fP command with no characters entered
+by the user. If the \fBN\fP command is used as a motion command for
+the \fB!\fP command, the editor shall not enter text input
+mode on the last line on the screen, and shall behave as if the user
+entered a single \fB!\fP character as the text input.
+.SS Insert Empty Line Below
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBo
+\fP
+.fi
+.RE
+.sp
+.LP
+Enter text input mode in a new line appended after the current line.
+A \fIcount\fP shall cause the input text to be appended
+\fIcount\fP -1 more times to the end of the already added text, each
+time starting on a new, appended line.
+.LP
+\fICurrent line/column\fP: As specified for the text input commands
+(see Input Mode Commands in
+vi ).
+.SS Insert Empty Line Above
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBO
+\fP
+.fi
+.RE
+.sp
+.LP
+Enter text input mode in a new line inserted before the current line.
+A \fIcount\fP shall cause the input text to be appended
+\fIcount\fP -1 more times to the end of the already added text, each
+time starting on a new, appended line.
+.LP
+\fICurrent line/column\fP: As specified for the text input commands
+(see Input Mode Commands in
+vi ).
+.SS Put from Buffer Following
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIbuffer\fP\fB]\fP \fBp
+\fP
+.fi
+.RE
+.sp
+.LP
+If no \fIbuffer\fP is specified, the unnamed buffer shall be used.
+.LP
+If the buffer text is in line mode, the text shall be appended below
+the current line, and each line of the buffer shall become
+a new line in the edit buffer. A \fIcount\fP shall cause the buffer
+text to be appended \fIcount\fP -1 more times to the end of
+the already added text, each time starting on a new, appended line.
+.LP
+If the buffer text is in character mode, the text shall be appended
+into the current line after the cursor, and each line of the
+buffer other than the first and last shall become a new line in the
+edit buffer. A \fIcount\fP shall cause the buffer text to be
+appended \fIcount\fP -1 more times to the end of the already added
+text, each time starting after the last added character.
+.LP
+\fICurrent line\fP: If the buffer text is in line mode, set the line
+to line +1; otherwise, unchanged.
+.LP
+\fICurrent column\fP: If the buffer text is in line mode:
+.IP " 1." 4
+If there is a non- <blank> in the first line of the buffer, set to
+the last column on which any portion of the first non-
+<blank> in the line is displayed.
+.LP
+.IP " 2." 4
+If there is no non- <blank> in the first line of the buffer, set to
+the last column on which any portion of the last non-
+<newline> in the first line of the buffer is displayed.
+.LP
+.LP
+If the buffer text is in character mode:
+.IP " 1." 4
+If the text in the buffer is from more than a single line, then set
+to the last column on which any portion of the first
+character from the buffer is displayed.
+.LP
+.IP " 2." 4
+Otherwise, if the buffer is the unnamed buffer, set to the last column
+on which any portion of the last character from the
+buffer is displayed.
+.LP
+.IP " 3." 4
+Otherwise, set to the first column on which any portion of the first
+character from the buffer is displayed.
+.LP
+.SS Put from Buffer Before
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIbuffer\fP\fB]\fP \fBP
+\fP
+.fi
+.RE
+.sp
+.LP
+If no \fIbuffer\fP is specified, the unnamed buffer shall be used.
+.LP
+If the buffer text is in line mode, the text shall be inserted above
+the current line, and each line of the buffer shall become
+a new line in the edit buffer. A \fIcount\fP shall cause the buffer
+text to be appended \fIcount\fP -1 more times to the end of
+the already added text, each time starting on a new, appended line.
+.LP
+If the buffer text is in character mode, the text shall be inserted
+into the current line before the cursor, and each line of
+the buffer other than the first and last shall become a new line in
+the edit buffer. A \fIcount\fP shall cause the buffer text to
+be appended \fIcount\fP -1 more times to the end of the already added
+text, each time starting after the last added character.
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: If the buffer text is in line mode:
+.IP " 1." 4
+If there is a non- <blank> in the first line of the buffer, set to
+the last column on which any portion of that character
+is displayed.
+.LP
+.IP " 2." 4
+If there is no non- <blank> in the first line of the buffer, set to
+the last column on which any portion of the last non-
+<newline> in the first line of the buffer is displayed.
+.LP
+.LP
+If the buffer text is in character mode:
+.IP " 1." 4
+If the buffer is the unnamed buffer, set to the last column on which
+any portion of the last character from the buffer is
+displayed.
+.LP
+.IP " 2." 4
+Otherwise, set to the first column on which any portion of the first
+character from the buffer is displayed.
+.LP
+.SS Enter ex Mode
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBQ
+\fP
+.fi
+.RE
+.sp
+.LP
+Leave visual or open mode and enter \fIex\fP command mode.
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: Unchanged.
+.SS Replace Character
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fBr\fP \fIcharacter\fP
+.fi
+.RE
+.sp
+.LP
+Replace the \fIcount\fP characters at and after the cursor with the
+specified character. If there are less than \fIcount\fP
+non- <newline>s at and after the cursor on the line, it shall be an
+error.
+.LP
+If character is <control>-V, any next character other than the <newline>
+shall be stripped of any special meaning
+and used as a literal character.
+.LP
+If character is <ESC>, no replacement shall be made and the current
+line and current column shall be unchanged.
+.LP
+If character is <carriage-return> or <newline>, \fIcount\fP new lines
+shall be appended to the current line. All
+but the last of these lines shall be empty. \fIcount\fP characters
+at and after the cursor shall be discarded, and any remaining
+characters after the cursor in the current line shall be moved to
+the last of the new lines. If the \fBautoindent\fP edit option
+is set, they shall be preceded by the same number of \fBautoindent\fP
+characters found on the line from which the command was
+executed.
+.LP
+\fICurrent line\fP: Unchanged unless the replacement character is
+a <carriage-return> or <newline>, in which case
+it shall be set to line + \fIcount\fP.
+.LP
+\fICurrent column\fP: Set to the last column position on which a portion
+of the last replaced character is displayed, or if the
+replacement character caused new lines to be created, set to non-
+<blank>.
+.SS Replace Characters
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBR
+\fP
+.fi
+.RE
+.sp
+.LP
+Enter text input mode at the current cursor position possibly replacing
+text on the current line. A \fIcount\fP shall cause the
+input text to be appended \fIcount\fP -1 more times to the end of
+the input.
+.LP
+\fICurrent line/column\fP: As specified for the text input commands
+(see Input Mode Commands in
+vi ).
+.SS Substitute Character
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIbuffer\fP\fB][\fP\fIcount\fP\fB]\fP \fBs
+\fP
+.fi
+.RE
+.sp
+.LP
+This command shall be equivalent to the \fIvi\fP command:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIbuffer\fP\fB][\fP\fIcount\fP\fB]\fP \fBc<space>
+\fP
+.fi
+.RE
+.SS Substitute Lines
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIbuffer\fP\fB][\fP\fIcount\fP\fB]\fP \fBS
+\fP
+.fi
+.RE
+.sp
+.LP
+This command shall be equivalent to the \fIvi\fP command:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIbuffer\fP\fB][\fP\fIcount\fP\fB]\fP \fBc_
+\fP
+.fi
+.RE
+.SS Move Cursor to Before Character (Forward)
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fBt\fP \fIcharacter\fP
+.fi
+.RE
+.sp
+.LP
+It shall be an error if \fIcount\fP occurrences of the character do
+not occur after the cursor in the line.
+.LP
+If used as a motion command:
+.IP " 1." 4
+The text region shall be from the cursor up to but not including the
+\fIcount\fPth occurrence of the specified character after
+the cursor.
+.LP
+.IP " 2." 4
+Any text copied to a buffer shall be in character mode.
+.LP
+.LP
+If not used as a motion command:
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: Set to the last column in which any portion
+of the character before the \fIcount\fPth occurrence of the
+specified character after the cursor appears in the line.
+.SS Move Cursor to After Character (Reverse)
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fBT\fP \fIcharacter\fP
+.fi
+.RE
+.sp
+.LP
+It shall be an error if \fIcount\fP occurrences of the character do
+not occur before the cursor in the line.
+.LP
+If used as a motion command:
+.IP " 1." 4
+If the character before the cursor is the specified character, it
+shall be an error.
+.LP
+.IP " 2." 4
+The text region shall be from the character before the cursor up to
+but not including the \fIcount\fPth occurrence of the
+specified character before the cursor.
+.LP
+.IP " 3." 4
+Any text copied to a buffer shall be in character mode.
+.LP
+.LP
+If not used as a motion command:
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: Set to the last column in which any portion
+of the character after the \fIcount\fPth occurrence of the
+specified character before the cursor appears in the line.
+.SS Undo
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBu
+\fP
+.fi
+.RE
+.sp
+.LP
+This command shall be equivalent to the \fIex\fP \fBundo\fP command
+except that the current
+line and current column shall be set as follows:
+.LP
+\fICurrent line\fP: Set to the first line added or changed if any;
+otherwise, move to the line preceding any deleted text if
+one exists; otherwise, move to line 1.
+.LP
+\fICurrent column\fP: If undoing an \fIex\fP command, set to the first
+non-
+<blank>.
+.LP
+Otherwise, if undoing a text input command:
+.IP " 1." 4
+If the command was a \fBC\fP, \fBc\fP, \fBO\fP, \fBo\fP, \fBR\fP,
+\fBS\fP, or \fBs\fP command, the current column shall
+be set to the value it held when the text input command was entered.
+.LP
+.IP " 2." 4
+Otherwise, set to the last column in which any portion of the first
+character after the deleted text is displayed, or, if no
+non- <newline>s follow the text deleted from this line, set to the
+last column in which any portion of the last non-
+<newline> in the line is displayed, or 1 if the line is empty.
+.LP
+.LP
+Otherwise, if a single line was modified (that is, not added or deleted)
+by the \fBu\fP command:
+.IP " 1." 4
+If text was added or changed, set to the last column in which any
+portion of the first character added or changed is
+displayed.
+.LP
+.IP " 2." 4
+If text was deleted, set to the last column in which any portion of
+the first character after the deleted text is displayed, or,
+if no non- <newline>s follow the deleted text, set to the last column
+in which any portion of the last non- <newline>
+in the line is displayed, or 1 if the line is empty.
+.LP
+.LP
+Otherwise, set to non- <blank>.
+.SS Undo Current Line
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBU
+\fP
+.fi
+.RE
+.sp
+.LP
+Restore the current line to its state immediately before the most
+recent time that it became the current line.
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: Set to the first column in the line in which
+any portion of the first character in the line is
+displayed.
+.SS Move to Beginning of Word
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fBw
+\fP
+.fi
+.RE
+.sp
+.LP
+With the exception that words are used as the delimiter instead of
+bigwords, this command shall be equivalent to the \fBW\fP
+command.
+.SS Move to Beginning of Bigword
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fBW
+\fP
+.fi
+.RE
+.sp
+.LP
+If the edit buffer is empty, it shall be an error. If there are less
+than \fIcount\fP bigwords between the cursor and the end
+of the edit buffer, \fIcount\fP shall be adjusted to move the cursor
+to the last bigword in the edit buffer.
+.LP
+If used as a motion command:
+.IP " 1." 4
+If the associated command is \fBc\fP, \fIcount\fP is 1, and the cursor
+is on a <blank>, the region of text shall be the
+current character and no further action shall be taken.
+.LP
+.IP " 2." 4
+If there are less than \fIcount\fP bigwords between the cursor and
+the end of the edit buffer, then the command shall succeed,
+and the region of text shall include the last character of the edit
+buffer.
+.LP
+.IP " 3." 4
+If there are <blank>s or an end-of-line that precede the \fIcount\fPth
+bigword, and the associated command is \fBc\fP,
+the region of text shall be up to and including the last character
+before the preceding <blank>s or end-of-line.
+.LP
+.IP " 4." 4
+If there are <blank>s or an end-of-line that precede the bigword,
+and the associated command is \fBd\fP or \fBy\fP, the
+region of text shall be up to and including the last <blank> before
+the start of the bigword or end-of-line.
+.LP
+.IP " 5." 4
+Any text copied to a buffer shall be in character mode.
+.LP
+.LP
+If not used as a motion command:
+.IP " 1." 4
+If the cursor is on the last character of the edit buffer, it shall
+be an error.
+.LP
+.LP
+\fICurrent line\fP: Set to the line containing the current column.
+.LP
+\fICurrent column\fP: Set to the last column in which any part of
+the first character of the \fIcount\fPth next bigword is
+displayed.
+.SS Delete Character at Cursor
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIbuffer\fP\fB][\fP\fIcount\fP\fB]\fP \fBx
+\fP
+.fi
+.RE
+.sp
+.LP
+Delete the \fIcount\fP characters at and after the current character
+into \fIbuffer\fP, if specified, and into the unnamed
+buffer.
+.LP
+If the line is empty, it shall be an error. If there are less than
+\fIcount\fP non- <newline>s at and after the cursor on
+the current line, \fIcount\fP shall be adjusted to the number of non-
+<newline>s at and after the cursor.
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: If the line is empty, set to column position
+1. Otherwise, if there were \fIcount\fP or less non-
+<newline>s at and after the cursor on the current line, set to the
+last column that displays any part of the last non-
+<newline> of the line. Otherwise, unchanged.
+.SS Delete Character Before Cursor
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIbuffer\fP\fB][\fP\fIcount\fP\fB]\fP \fBX
+\fP
+.fi
+.RE
+.sp
+.LP
+Delete the \fIcount\fP characters before the current character into
+\fIbuffer\fP, if specified, and into the unnamed
+buffer.
+.LP
+If there are no characters before the current character on the current
+line, it shall be an error. If there are less than
+\fIcount\fP previous characters on the current line, \fIcount\fP shall
+be adjusted to the number of previous characters on the
+line.
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: Set to (current column - the width of the deleted
+characters).
+.SS Yank
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIbuffer\fP\fB][\fP\fIcount\fP\fB]\fP \fBy\fP \fImotion\fP
+.fi
+.RE
+.sp
+.LP
+Copy (yank) the region of text into \fIbuffer\fP, if specified, and
+into the unnamed buffer.
+.LP
+If the motion command is the \fBy\fP command repeated:
+.IP " 1." 4
+The buffer shall be in line mode.
+.LP
+.IP " 2." 4
+If there are less than \fIcount\fP -1 lines after the current line
+in the edit buffer, it shall be an error.
+.LP
+.IP " 3." 4
+The text region shall be from the current line up to and including
+the next \fIcount\fP -1 lines.
+.LP
+.LP
+Otherwise, the buffer text mode and text region shall be as specified
+by the motion command.
+.LP
+\fICurrent line\fP: If the motion was from the current cursor position
+toward the end of the edit buffer, unchanged. Otherwise,
+set to the first line in the edit buffer that is part of the text
+region specified by the motion command.
+.LP
+\fICurrent column\fP:
+.IP " 1." 4
+If the motion was from the current cursor position toward the end
+of the edit buffer, unchanged.
+.LP
+.IP " 2." 4
+Otherwise, if the current line is empty, set to column position 1.
+.LP
+.IP " 3." 4
+Otherwise, set to the last column that displays any part of the first
+character in the file that is part of the text region
+specified by the motion command.
+.LP
+.SS Yank Current Line
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIbuffer\fP\fB][\fP\fIcount\fP\fB]\fP \fBY
+\fP
+.fi
+.RE
+.sp
+.LP
+This command shall be equivalent to the \fIvi\fP command:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIbuffer\fP\fB][\fP\fIcount\fP\fB]\fP \fBy_
+\fP
+.fi
+.RE
+.SS Redraw Window
+.LP
+If in open mode, the \fBz\fP command shall have the Synopsis:
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIcount\fP\fB]\fP \fBz
+\fP
+.fi
+.RE
+.sp
+.LP
+If \fIcount\fP is not specified, it shall default to the \fBwindow\fP
+edit option -1. The \fBz\fP command shall be equivalent
+to the \fIex\fP \fBz\fP command, with a type character of \fB=\fP
+and a \fIcount\fP of
+\fIcount\fP -2, except that the current line and current column shall
+be set as follows, and the \fBwindow\fP edit option shall
+not be affected. If the calculation for the \fIcount\fP argument would
+result in a negative number, the \fIcount\fP argument to
+the \fIex\fP \fBz\fP command shall be zero. A blank line shall be
+written after the last line
+is written.
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: Unchanged.
+.LP
+If not in open mode, the \fBz\fP command shall have the following
+Synopsis:
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB[\fP\fIline\fP\fB]\fP \fBz\fP \fB[\fP\fIcount\fP\fB]\fP \fIcharacter\fP
+.fi
+.RE
+.sp
+.LP
+If \fIline\fP is not specified, it shall default to the current line.
+If \fIline\fP is specified, but is greater than the
+number of lines in the edit buffer, it shall default to the number
+of lines in the edit buffer.
+.LP
+If \fIcount\fP is specified, the value of the \fBwindow\fP edit option
+shall be set to \fIcount\fP (as described in the \fIex\fP \fBwindow\fP
+command), and the screen shall be redrawn.
+.LP
+\fIline\fP shall be placed as specified by the following characters:
+.TP 7
+<newline>,\ <carriage-return>
+.sp
+Place the beginning of the line on the first line of the display.
+.TP 7
+\fB\&.\fP
+Place the beginning of the line in the center of the display. The
+middle line of the display shall be calculated as described
+for the \fBM\fP command.
+.TP 7
+\fB-\fP
+Place an unspecified portion of the line on the last line of the display.
+.TP 7
+\fB+\fP
+If \fIline\fP was specified, equivalent to the <newline> case. If
+\fIline\fP was not specified, display a screen where
+the first line of the display shall be (current last line) +1. If
+there are no lines after the last line in the display, it shall
+be an error.
+.TP 7
+\fB^\fP
+If \fIline\fP was specified, display a screen where the last line
+of the display shall contain an unspecified portion of the
+first line of a display that had an unspecified portion of the specified
+line on the last line of the display. If this calculation
+results in a line before the beginning of the edit buffer, display
+the first screen of the edit buffer.
+.LP
+Otherwise, display a screen where the last line of the display shall
+contain an unspecified portion of (current first line -1).
+If this calculation results in a line before the beginning of the
+edit buffer, it shall be an error.
+.sp
+.LP
+\fICurrent line\fP: If \fIline\fP and the \fB'^'\fP character were
+specified:
+.IP " 1." 4
+If the first screen was displayed as a result of the command attempting
+to display lines before the beginning of the edit
+buffer: if the first screen was already displayed, unchanged; otherwise,
+set to (current first line -1).
+.LP
+.IP " 2." 4
+Otherwise, set to the last line of the display.
+.LP
+.LP
+If \fIline\fP and the \fB'+'\fP character were specified, set to the
+first line of the display.
+.LP
+Otherwise, if \fIline\fP was specified, set to \fIline\fP.
+.LP
+Otherwise, unchanged.
+.LP
+\fICurrent column\fP: Set to non- <blank>.
+.SS Exit
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBZZ
+\fP
+.fi
+.RE
+.sp
+.LP
+This command shall be equivalent to the \fIex\fP \fBxit\fP command
+with no addresses,
+trailing \fB!\fP, or filename (see the \fIex\fP \fBxit\fP command).
+.SS Input Mode Commands in vi
+.LP
+In text input mode, the current line shall consist of zero or more
+of the following categories, plus the terminating
+<newline>:
+.IP " 1." 4
+Characters preceding the text input entry point
+.LP
+Characters in this category shall not be modified during text input
+mode.
+.LP
+.IP " 2." 4
+\fBautoindent\fP characters
+.LP
+\fBautoindent\fP characters shall be automatically inserted into each
+line that is created in text input mode, either as a
+result of entering a <newline> or <carriage-return> while in text
+input mode, or as an effect of the command itself;
+for example, \fBO\fP or \fBo\fP (see the \fIex\fP \fBautoindent\fP
+command), as if entered
+by the user.
+.LP
+It shall be possible to erase \fBautoindent\fP characters with the
+<control>-D command; it is unspecified whether they
+can be erased by <control>-H, <control>-U, and <control>-W characters.
+Erasing any \fBautoindent\fP character
+turns the glyph into erase-columns and deletes the character from
+the edit buffer, but does not change its representation on the
+screen.
+.LP
+.IP " 3." 4
+Text input characters
+.LP
+Text input characters are the characters entered by the user. Erasing
+any text input character turns the glyph into
+erase-columns and deletes the character from the edit buffer, but
+does not change its representation on the screen.
+.LP
+Each text input character entered by the user (that does not have
+a special meaning) shall be treated as follows:
+.RS
+.IP " a." 4
+The text input character shall be appended to the last character in
+the edit buffer from the first, second, or third
+categories.
+.LP
+.IP " b." 4
+If there are no erase-columns on the screen, the text input command
+was the \fBR\fP command, and characters in the fifth
+category from the original line follow the cursor, the next such character
+shall be deleted from the edit buffer. If the
+\fBslowopen\fP edit option is not set, the corresponding glyph on
+the screen shall become erase-columns.
+.LP
+.IP " c." 4
+If there are erase-columns on the screen, as many columns as they
+occupy, or as are necessary, shall be overwritten to display
+the text input character. (If only part of a multi-column glyph is
+overwritten, the remainder shall be left on the screen, and
+continue to be treated as erase-columns; it is unspecified whether
+the remainder of the glyph is modified in any way.)
+.LP
+.IP " d." 4
+If additional display line columns are needed to display the text
+input character:
+.RS
+.IP " 1." 4
+If the \fBslowopen\fP edit option is set, the text input characters
+shall be displayed on subsequent display line columns,
+overwriting any characters displayed in those columns.
+.LP
+.IP " 2." 4
+Otherwise, any characters currently displayed on or after the column
+on the display line where the text input character is to be
+displayed shall be pushed ahead the number of display line columns
+necessary to display the rest of the text input character.
+.LP
+.RE
+.LP
+.RE
+.LP
+.IP " 4." 4
+Erase-columns
+.LP
+Erase-columns are not logically part of the edit buffer, appearing
+only on the screen, and may be overwritten on the screen by
+subsequent text input characters. When text input mode ends, all erase-columns
+shall no longer appear on the screen.
+.LP
+Erase-columns are initially the region of text specified by the \fBc\fP
+command (see Change );
+however, erasing \fBautoindent\fP or text input characters causes
+the glyphs of the erased characters to be treated as
+erase-columns.
+.LP
+.IP " 5." 4
+Characters following the text region for the \fBc\fP command, or the
+text input entry point for all other commands
+.LP
+Characters in this category shall not be modified during text input
+mode, except as specified in category 3.b. for the \fBR\fP
+text input command, or as <blank>s deleted when a <newline> or <carriage-return>
+is entered.
+.LP
+.LP
+It is unspecified whether it is an error to attempt to erase past
+the beginning of a line that was created by the entry of a
+<newline> or <carriage-return> during text input mode. If it is not
+an error, the editor shall behave as if the erasing
+character was entered immediately after the last text input character
+entered on the previous line, and all of the non-
+<newline>s on the current line shall be treated as erase-columns.
+.LP
+When text input mode is entered, or after a text input mode character
+is entered (except as specified for the special characters
+below), the cursor shall be positioned as follows:
+.IP " 1." 4
+On the first column that displays any part of the first erase-column,
+if one exists
+.LP
+.IP " 2." 4
+Otherwise, if the \fBslowopen\fP edit option is set, on the first
+display line column after the last character in the first,
+second, or third categories, if one exists
+.LP
+.IP " 3." 4
+Otherwise, the first column that displays any part of the first character
+in the fifth category, if one exists
+.LP
+.IP " 4." 4
+Otherwise, the display line column after the last character in the
+first, second, or third categories, if one exists
+.LP
+.IP " 5." 4
+Otherwise, on column position 1
+.LP
+.LP
+The characters that are updated on the screen during text input mode
+are unspecified, other than that the last text input
+character shall always be updated, and, if the \fBslowopen\fP edit
+option is not set, the current cursor character shall always be
+updated.
+.LP
+The following specifications are for command characters entered during
+text input mode.
+.SS NUL
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fBNUL
+\fP
+.fi
+.RE
+.sp
+.LP
+If the first character of the text input is a NUL, the most recently
+input text shall be input as if entered by the user, and
+then text input mode shall be exited. The text shall be input literally;
+that is, characters are neither macro or abbreviation
+expanded, nor are any characters interpreted in any special manner.
+It is unspecified whether implementations shall support more
+than 256 bytes of remembered input text.
+.SS <control>-D
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB<control>-D
+\fP
+.fi
+.RE
+.sp
+.LP
+The <control>-D character shall have no special meaning when in text
+input mode for a line-oriented command (see Command Descriptions in
+vi ).
+.LP
+This command need not be supported on block-mode terminals.
+.LP
+If the cursor does not follow an \fBautoindent\fP character, or an
+\fBautoindent\fP character and a \fB'0'\fP or
+\fB'^'\fP character:
+.IP " 1." 4
+If the cursor is in column position 1, the <control>-D character shall
+be discarded and no further action taken.
+.LP
+.IP " 2." 4
+Otherwise, the <control>-D character shall have no special meaning.
+.LP
+.LP
+If the last input character was a \fB'0'\fP, the cursor shall be
+moved to column position 1.
+.LP
+Otherwise, if the last input character was a \fB'^'\fP, the cursor
+shall be moved to column position 1. In addition, the
+\fBautoindent\fP level for the next input line shall be derived from
+the same line from which the \fBautoindent\fP level for the
+current input line was derived.
+.LP
+Otherwise, the cursor shall be moved back to the column after the
+previous shiftwidth (see the \fIex\fP \fBshiftwidth\fP command) boundary.
+.LP
+All of the glyphs on columns between the starting cursor position
+and (inclusively) the ending cursor position shall become
+erase-columns as described in Input Mode Commands in vi .
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: Set to 1 if the <control>-D was preceded by
+a \fB'^'\fP or \fB'0'\fP ; otherwise, set to
+(column -1) -((column -2) % \fBshiftwidth\fP).
+.SS <control>-H
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB<control>-H
+\fP
+.fi
+.RE
+.sp
+.LP
+If in text input mode for a line-oriented command, and there are no
+characters to erase, text input mode shall be terminated, no
+further action shall be done for this command, and the current line
+and column shall be unchanged.
+.LP
+If there are characters other than \fBautoindent\fP characters that
+have been input on the current line before the cursor, the
+cursor shall move back one character.
+.LP
+Otherwise, if there are \fBautoindent\fP characters on the current
+line before the cursor, it is implementation-defined whether
+the <control>-H command is an error or if the cursor moves back one
+\fBautoindent\fP character.
+.LP
+Otherwise, if the cursor is in column position 1 and there are previous
+lines that have been input, it is implementation-defined
+whether the <control>-H command is an error or if it is equivalent
+to entering <control>-H after the last input
+character on the previous input line.
+.LP
+Otherwise, it shall be an error.
+.LP
+All of the glyphs on columns between the starting cursor position
+and (inclusively) the ending cursor position shall become
+erase-columns as described in Input Mode Commands in vi .
+.LP
+The current erase character (see \fIstty\fP) shall cause an equivalent
+action to the
+<control>-H command, unless the previously inserted character was
+a backslash, in which case it shall be as if the literal
+current erase character had been inserted instead of the backslash.
+.LP
+\fICurrent line\fP: Unchanged, unless previously input lines are erased,
+in which case it shall be set to line -1.
+.LP
+\fICurrent column\fP: Set to the first column that displays any portion
+of the character backed up over.
+.SS <newline>
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB<newline>
+.sp
+
+<carriage-return>
+.sp
+
+<control>-J
+.sp
+
+<control>-M
+\fP
+.fi
+.RE
+.sp
+.LP
+If input was part of a line-oriented command, text input mode shall
+be terminated and the command shall continue execution with
+the input provided.
+.LP
+Otherwise, terminate the current line. If there are no characters
+other than \fBautoindent\fP characters on the line, all
+characters on the line shall be discarded. Otherwise, it is unspecified
+whether the \fBautoindent\fP characters in the line are
+modified by entering these characters.
+.LP
+Continue text input mode on a new line appended after the current
+line. If the \fBslowopen\fP edit option is set, the lines on
+the screen below the current line shall not be pushed down, but the
+first of them shall be cleared and shall appear to be
+overwritten. Otherwise, the lines of the screen below the current
+line shall be pushed down.
+.LP
+If the \fBautoindent\fP edit option is set, an appropriate number
+of \fBautoindent\fP characters shall be added as a prefix to
+the line as described by the \fIex\fP \fBautoindent\fP edit option.
+.LP
+All columns after the cursor that are erase-columns (as described
+in Input Mode Commands in vi )
+shall be discarded.
+.LP
+If the \fBautoindent\fP edit option is set, all <blank>s immediately
+following the cursor shall be discarded.
+.LP
+All remaining characters after the cursor shall be transferred to
+the new line, positioned after any \fBautoindent\fP
+characters.
+.LP
+\fICurrent line\fP: Set to current line +1.
+.LP
+\fICurrent column\fP: Set to the first column that displays any portion
+of the first character after the \fBautoindent\fP
+characters on the new line, if any, or the first column position after
+the last \fBautoindent\fP character, if any, or column
+position 1.
+.SS <control>-T
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB<control>-T
+\fP
+.fi
+.RE
+.sp
+.LP
+The <control>-T character shall have no special meaning when in text
+input mode for a line-oriented command (see Command Descriptions in
+vi ).
+.LP
+This command need not be supported on block-mode terminals.
+.LP
+Behave as if the user entered the minimum number of <blank>s necessary
+to move the cursor forward to the column position
+after the next \fBshiftwidth\fP (see the \fIex\fP \fBshiftwidth\fP
+command) boundary.
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: Set to \fIcolumn\fP + \fBshiftwidth\fP - ((column
+-1) % \fBshiftwidth\fP).
+.SS <control>-U
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB<control>-U
+\fP
+.fi
+.RE
+.sp
+.LP
+If there are characters other than \fBautoindent\fP characters that
+have been input on the current line before the cursor, the
+cursor shall move to the first character input after the \fBautoindent\fP
+characters.
+.LP
+Otherwise, if there are \fBautoindent\fP characters on the current
+line before the cursor, it is implementation-defined whether
+the <control>-U command is an error or if the cursor moves to the
+first column position on the line.
+.LP
+Otherwise, if the cursor is in column position 1 and there are previous
+lines that have been input, it is implementation-defined
+whether the <control>-U command is an error or if it is equivalent
+to entering <control>-U after the last input
+character on the previous input line.
+.LP
+Otherwise, it shall be an error.
+.LP
+All of the glyphs on columns between the starting cursor position
+and (inclusively) the ending cursor position shall become
+erase-columns as described in Input Mode Commands in vi .
+.LP
+The current \fIkill\fP character (see \fIstty\fP) shall cause an equivalent
+action to the
+<control>-U command, unless the previously inserted character was
+a backslash, in which case it shall be as if the literal
+current \fIkill\fP character had been inserted instead of the backslash.
+.LP
+\fICurrent line\fP: Unchanged, unless previously input lines are erased,
+in which case it shall be set to line -1.
+.LP
+\fICurrent column\fP: Set to the first column that displays any portion
+of the last character backed up over.
+.SS <control>-V
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB<control>-V
+.sp
+
+<control>-Q
+\fP
+.fi
+.RE
+.sp
+.LP
+Allow the entry of any subsequent character, other than <control>-J
+or the <newline>, as a literal character,
+removing any special meaning that it may have to the editor in text
+input mode. If a <control>-V or <control>-Q is
+entered before a <control>-J or <newline>, the <control>-V or <control>-Q
+character shall be discarded, and
+the <control>-J or <newline> shall behave as described in the <newline>
+command character during input mode.
+.LP
+For purposes of the display only, the editor shall behave as if a
+\fB'^'\fP character was entered, and the cursor shall be
+positioned as if overwriting the \fB'^'\fP character. When a subsequent
+character is entered, the editor shall behave as if that
+character was entered instead of the original <control>-V or <control>-Q
+character.
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP: Unchanged.
+.SS <control>-W
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB<control>-W
+\fP
+.fi
+.RE
+.sp
+.LP
+If there are characters other than \fBautoindent\fP characters that
+have been input on the current line before the cursor, the
+cursor shall move back over the last word preceding the cursor (including
+any <blank>s between the end of the last word and
+the current cursor); the cursor shall not move to before the first
+character after the end of any \fBautoindent\fP characters.
+.LP
+Otherwise, if there are \fBautoindent\fP characters on the current
+line before the cursor, it is implementation-defined whether
+the <control>-W command is an error or if the cursor moves to the
+first column position on the line.
+.LP
+Otherwise, if the cursor is in column position 1 and there are previous
+lines that have been input, it is implementation-defined
+whether the <control>-W command is an error or if it is equivalent
+to entering <control>-W after the last input
+character on the previous input line.
+.LP
+Otherwise, it shall be an error.
+.LP
+All of the glyphs on columns between the starting cursor position
+and (inclusively) the ending cursor position shall become
+erase-columns as described in Input Mode Commands in vi .
+.LP
+\fICurrent line\fP: Unchanged, unless previously input lines are erased,
+in which case it shall be set to line -1.
+.LP
+\fICurrent column\fP: Set to the first column that displays any portion
+of the last character backed up over.
+.SS <ESC>
+.TP 7
+\fISynopsis\fP:
+.sp
+.RS
+.nf
+
+\fB<ESC>
+\fP
+.fi
+.RE
+.sp
+.LP
+If input was part of a line-oriented command:
+.IP " 1." 4
+If \fIinterrupt\fP was entered, text input mode shall be terminated
+and the editor shall return to command mode. The terminal
+shall be alerted.
+.LP
+.IP " 2." 4
+If <ESC> was entered, text input mode shall be terminated and the
+command shall continue execution with the input
+provided.
+.LP
+.LP
+Otherwise, terminate text input mode and return to command mode.
+.LP
+Any \fBautoindent\fP characters entered on newly created lines that
+have no other non- <newline>s shall be deleted.
+.LP
+Any leading \fBautoindent\fP and <blank>s on newly created lines shall
+be rewritten to be the minimum number of
+<blank>s possible.
+.LP
+The screen shall be redisplayed as necessary to match the contents
+of the edit buffer.
+.LP
+\fICurrent line\fP: Unchanged.
+.LP
+\fICurrent column\fP:
+.IP " 1." 4
+If there are text input characters on the current line, the column
+shall be set to the last column where any portion of the last
+text input character is displayed.
+.LP
+.IP " 2." 4
+Otherwise, if a character is displayed in the current column, unchanged.
+.LP
+.IP " 3." 4
+Otherwise, set to column position 1.
+.LP
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+When any error is encountered and the standard input is not a terminal
+device file, \fIvi\fP shall not write the file or return
+to command or text input mode, and shall terminate with a non-zero
+exit status.
+.LP
+Otherwise, when an unrecoverable error is encountered it shall be
+equivalent to a SIGHUP asynchronous event.
+.LP
+Otherwise, when an error is encountered, the editor shall behave as
+specified in Command
+Descriptions in vi .
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+See the RATIONALE for \fIex\fP for more information on \fIvi\fP. Major
+portions of the \fIvi\fP utility
+specification point to \fIex\fP to avoid inadvertent divergence. While
+\fIex\fP and \fIvi\fP have historically been implemented as a single
+utility, this is not required by
+IEEE\ Std\ 1003.1-2001.
+.LP
+It is recognized that portions of \fIvi\fP would be difficult, if
+not impossible, to implement satisfactorily on a block-mode
+terminal, or a terminal without any form of cursor addressing, thus
+it is not a mandatory requirement that such features should
+work on all terminals. It is the intention, however, that a \fIvi\fP
+implementation should provide the full set of capabilities on
+all terminals capable of supporting them.
+.LP
+Historically, \fIvi\fP exited immediately if the standard input was
+not a terminal. IEEE\ Std\ 1003.1-2001 permits, but
+does not require, this behavior. An end-of-file condition is not equivalent
+to an end-of-file character. A common end-of-file
+character, <control>-D, is historically a \fIvi\fP command.
+.LP
+The text in the STDOUT section reflects the usage of the verb \fIdisplay\fP
+in this section; some implementations of \fIvi\fP
+use standard output to write to the terminal, but IEEE\ Std\ 1003.1-2001
+does not require that to be the case.
+.LP
+Historically, implementations reverted to open mode if the terminal
+was incapable of supporting full visual mode.
+IEEE\ Std\ 1003.1-2001 requires this behavior. Historically, the open
+mode of \fIvi\fP behaved roughly equivalently to the
+visual mode, with the exception that only a single line from the edit
+buffer (one "buffer line") was kept current at any time.
+This line was normally displayed on the next-to-last line of a terminal
+with cursor addressing (and the last line performed its
+normal visual functions for line-oriented commands and messages).
+In addition, some few commands behaved differently in open mode
+than in visual mode. IEEE\ Std\ 1003.1-2001 requires conformance to
+historical practice.
+.LP
+Historically, \fIex\fP and \fIvi\fP implementations have expected
+text to proceed in the
+usual European/Latin order of left to right, top to bottom. There
+is no requirement in IEEE\ Std\ 1003.1-2001 that this be
+the case. The specification was deliberately written using words like
+"before", "after", "first", and "last" in order to
+permit implementations to support the natural text order of the language.
+.LP
+Historically, lines past the end of the edit buffer were marked with
+single tilde ( \fB'~'\fP ) characters; that is, if
+the one-based display was 20 lines in length, and the last line of
+the file was on line one, then lines 2-20 would contain only a
+single \fB'~'\fP character.
+.LP
+Historically, the \fIvi\fP editor attempted to display only complete
+lines at the bottom of the screen (it did display partial
+lines at the top of the screen). If a line was too long to fit in
+its entirety at the bottom of the screen, the screen lines where
+the line would have been displayed were displayed as single \fB'@'\fP
+characters, instead of displaying part of the line.
+IEEE\ Std\ 1003.1-2001 permits, but does not require, this behavior.
+Implementations are encouraged to attempt always to
+display a complete line at the bottom of the screen when doing scrolling
+or screen positioning by buffer lines.
+.LP
+Historically, lines marked with \fB'@'\fP were also used to minimize
+output to dumb terminals over slow lines; that is,
+changes local to the cursor were updated, but changes to lines on
+the screen that were not close to the cursor were simply marked
+with an \fB'@'\fP sign instead of being updated to match the current
+text. IEEE\ Std\ 1003.1-2001 permits, but does not
+require this feature because it is used ever less frequently as terminals
+become smarter and connections are faster.
+.SS Initialization in ex and vi
+.LP
+Historically, \fIvi\fP always had a line in the edit buffer, even
+if the edit buffer was "empty". For example:
+.IP " 1." 4
+The \fIex\fP command \fB=\fP executed from visual mode wrote "1" when
+the buffer was
+empty.
+.LP
+.IP " 2." 4
+Writes from visual mode of an empty edit buffer wrote files of a single
+character (a <newline>), while writes from \fIex\fP mode of an empty
+edit buffer wrote empty files.
+.LP
+.IP " 3." 4
+Put and read commands into an empty edit buffer left an empty line
+at the top of the edit buffer.
+.LP
+.LP
+For consistency, IEEE\ Std\ 1003.1-2001 does not permit any of these
+behaviors.
+.LP
+Historically, \fIvi\fP did not always return the terminal to its original
+modes; for example, ICRNL was modified if it was not
+originally set. IEEE\ Std\ 1003.1-2001 does not permit this behavior.
+.SS Command Descriptions in vi
+.LP
+Motion commands are among the most complicated aspects of \fIvi\fP
+to describe. With some exceptions, the text region and
+buffer type effect of a motion command on a \fIvi\fP command are described
+on a case-by-case basis. The descriptions of text
+regions in IEEE\ Std\ 1003.1-2001 are not intended to imply direction;
+that is, an inclusive region from line \fIn\fP to
+line \fIn\fP+5 is identical to a region from line \fIn\fP+5 to line
+\fIn\fP. This is of more than academic interest-movements to
+marks can be in either direction, and, if the \fBwrapscan\fP option
+is set, so can movements to search points. Historically, lines
+are always stored into buffers in text order; that is, from the start
+of the edit buffer to the end. IEEE\ Std\ 1003.1-2001
+requires conformance to historical practice.
+.LP
+Historically, command counts were applied to any associated motion,
+and were multiplicative to any supplied motion count. For
+example, \fB2cw\fP is the same as \fBc2w\fP, and \fB2c3w\fP is the
+same as \fBc6w\fP. IEEE\ Std\ 1003.1-2001 requires
+this behavior. Historically, \fIvi\fP commands that used bigwords,
+words, paragraphs, and sentences as objects treated groups of
+empty lines, or lines that contained only <blank>s, inconsistently.
+Some commands treated them as a single entity, while
+others treated each line separately. For example, the \fBw\fP, \fBW\fP,
+and \fBB\fP commands treated groups of empty lines as
+individual words; that is, the command would move the cursor to each
+new empty line. The \fBe\fP and \fBE\fP commands treated
+groups of empty lines as a single word; that is, the first use would
+move past the group of lines. The \fBb\fP command would just
+beep at the user, or if done from the start of the line as a motion
+command, fail in unexpected ways. If the lines contained only
+(or ended with) <blank>s, the \fBw\fP and \fBW\fP commands would just
+beep at the user, the \fBE\fP and \fBe\fP commands
+would treat the group as a single word, and the \fBB\fP and \fBb\fP
+commands would treat the lines as individual words. For
+consistency and simplicity of specification, IEEE\ Std\ 1003.1-2001
+requires that all \fIvi\fP commands treat groups of
+empty or blank lines as a single entity, and that movement through
+lines ending with <blank>s be consistent with other
+movements.
+.LP
+Historically, \fIvi\fP documentation indicated that any number of
+double quotes were skipped after punctuation marks at
+sentence boundaries; however, implementations only skipped single
+quotes. IEEE\ Std\ 1003.1-2001 requires both to be
+skipped.
+.LP
+Historically, the first and last characters in the edit buffer were
+word boundaries. This historical practice is required by
+IEEE\ Std\ 1003.1-2001.
+.LP
+Historically, \fIvi\fP attempted to update the minimum number of columns
+on the screen possible, which could lead to misleading
+information being displayed. IEEE\ Std\ 1003.1-2001 makes no requirements
+other than that the current character being
+entered is displayed correctly, leaving all other decisions in this
+area up to the implementation.
+.LP
+Historically, lines were arbitrarily folded between columns of any
+characters that required multiple column positions on the
+screen, with the exception of tabs, which terminated at the right-hand
+margin. IEEE\ Std\ 1003.1-2001 permits the former
+and requires the latter. Implementations that do not arbitrarily break
+lines between columns of characters that occupy multiple
+column positions should not permit the cursor to rest on a column
+that does not contain any part of a character.
+.LP
+The historical \fIvi\fP had a problem in that all movements were by
+buffer lines, not by display or screen lines. This is often
+the right thing to do; for example, single line movements, such as
+\fBj\fP or \fBk\fP, should work on buffer lines. Commands like
+\fBdj\fP, or \fBj.\fP, where \fB.\fP is a change command, only make
+sense for buffer lines. It is not, however, the right thing
+to do for screen motion or scrolling commands like <control>-D, <control>-F,
+and \fBH\fP. If the window is fairly
+small, using buffer lines in these cases can result in completely
+random motion; for example, \fB1\fP <control>-D can result
+in a completely changed screen, without any overlap. This is clearly
+not what the user wanted. The problem is even worse in the
+case of the \fBH\fP, \fBL\fP, and \fBM\fP commands-as they position
+the cursor at the first non- <blank> of the line, they
+may all refer to the same location in large lines, and will result
+in no movement at all.
+.LP
+In addition, if the line is larger than the screen, using buffer lines
+can make it impossible to display parts of the line-there
+are not any commands that do not display the beginning of the line
+in historical \fIvi\fP, and if both the beginning and end of
+the line cannot be on the screen at the same time, the user suffers.
+Finally, the page and half-page scrolling commands
+historically moved to the first non- <blank> in the new line. If the
+line is approximately the same size as the screen, this
+is inadequate because the cursor before and after a <control>-D command
+will refer to the same location on the screen.
+.LP
+Implementations of \fIex\fP and \fIvi\fP exist that do not have these
+problems because the
+relevant commands ( <control>-B, <control>-D, <control>-F, <control>-U,
+<control>-Y,
+<control>-E, \fBH\fP, \fBL\fP, and \fBM)\fP operate on display (screen)
+lines, not (edit) buffer lines.
+.LP
+IEEE\ Std\ 1003.1-2001 does not permit this behavior by default because
+the standard developers believed that users
+would find it too confusing. However, historical practice has been
+relaxed. For example, \fIex\fP and \fIvi\fP historically attempted,
+albeit sometimes unsuccessfully, to never put part of a
+line on the last lines of a screen; for example, if a line would not
+fit in its entirety, no part of the line was displayed, and
+the screen lines corresponding to the line contained single \fB'@'\fP
+characters. This behavior is permitted, but not required
+by IEEE\ Std\ 1003.1-2001, so that it is possible for implementations
+to support long lines in small screens more
+reasonably without changing the commands to be oriented to the display
+(instead of oriented to the buffer).
+IEEE\ Std\ 1003.1-2001 also permits implementations to refuse to edit
+any edit buffer containing a line that will not fit
+on the screen in its entirety.
+.LP
+The display area (for example, the value of the \fBwindow\fP edit
+option) has historically been "grown", or expanded, to
+display new text when local movements are done in displays where the
+number of lines displayed is less than the maximum possible.
+Expansion has historically been the first choice, when the target
+line is less than the maximum possible expansion value away.
+Scrolling has historically been the next choice, done when the target
+line is less than half a display away, and otherwise, the
+screen was redrawn. There were exceptions, however, in that \fIex\fP
+commands generally always
+caused the screen to be redrawn. IEEE\ Std\ 1003.1-2001 does not specify
+a standard behavior because there may be external
+issues, such as connection speed, the number of characters necessary
+to redraw as opposed to scroll, or terminal capabilities that
+implementations will have to accommodate.
+.LP
+The current line in IEEE\ Std\ 1003.1-2001 maps one-to-one to a buffer
+line in the file. The current column does not.
+There are two different column values that are described by IEEE\ Std\ 1003.1-2001.
+The first is the current column value
+as set by many of the \fIvi\fP commands. This value is remembered
+for the lifetime of the editor. The second column value is the
+actual position on the screen where the cursor rests. The two are
+not always the same. For example, when the cursor is backed by a
+multi-column character, the actual cursor position on the screen has
+historically been the last column of the character in command
+mode, and the first column of the character in input mode.
+.LP
+Commands that set the current line, but that do not set the current
+cursor value (for example, \fBj\fP and \fBk\fP) attempt to
+get as close as possible to the remembered column position, so that
+the cursor tends to restrict itself to a vertical column as the
+user moves around in the edit buffer. IEEE\ Std\ 1003.1-2001 requires
+conformance to historical practice, requiring that
+the display location of the cursor on the display line be adjusted
+from the current column value as necessary to support this
+historical behavior.
+.LP
+Historically, only a single line (and for some terminals, a single
+line minus 1 column) of characters could be entered by the
+user for the line-oriented commands; that is, \fB:\fP, \fB!\fP, \fB/\fP,
+or \fB?\fP. IEEE\ Std\ 1003.1-2001 permits,
+but does not require, this limitation.
+.LP
+Historically, "soft" errors in \fIvi\fP caused the terminal to be
+alerted, but no error message was displayed. As a general
+rule, no error message was displayed for errors in command execution
+in \fIvi\fP, when the error resulted from the user attempting
+an invalid or impossible action, or when a searched-for object was
+not found. Examples of soft errors included \fBh\fP at the left
+margin, <control>-B or \fB[[\fP at the beginning of the file, \fB2G\fP
+at the end of the file, and so on. In addition,
+errors such as \fB%\fP, \fB]]\fP, \fB}\fP, \fB)\fP, \fBN\fP, \fBn\fP,
+\fBf\fP, \fBF\fP, \fBt\fP, and \fBT\fP failing to
+find the searched-for object were soft as well. Less consistently,
+\fB/\fP and \fB?\fP displayed an error message if the pattern
+was not found, \fB/\fP, \fB?\fP, \fBN\fP, and \fBn\fP displayed an
+error message if no previous regular expression had been
+specified, and \fB;\fP did not display an error message if no previous
+\fBf\fP, \fBF\fP, \fBt\fP, or \fBT\fP command had
+occurred. Also, behavior in this area might reasonably be based on
+a runtime evaluation of the speed of a network connection.
+Finally, some implementations have provided error messages for soft
+errors in order to assist naive users, based on the value of a
+verbose edit option. IEEE\ Std\ 1003.1-2001 does not list specific
+errors for which an error message shall be displayed.
+Implementations should conform to historical practice in the absence
+of any strong reason to diverge.
+.SS Page Backwards
+.LP
+The <control>-B and <control>-F commands historically considered it
+an error to attempt to page past the beginning
+or end of the file, whereas the <control>-D and <control>-U commands
+simply moved to the beginning or end of the file.
+For consistency, IEEE\ Std\ 1003.1-2001 requires the latter behavior
+for all four commands. All four commands still
+consider it an error if the current line is at the beginning ( <control>-B,
+<control>-U) or end ( <control>-F,
+<control>-D) of the file. Historically, the <control>-B and <control>-F
+commands skip two lines in order to
+include overlapping lines when a single command is entered. This makes
+less sense in the presence of a \fIcount\fP, as there will
+be, by definition, no overlapping lines. The actual calculation used
+by historical implementations of the \fIvi\fP editor for
+<control>-B was:
+.sp
+.RS
+.nf
+
+\fB((current first line) - count x (window edit option)) +2
+\fP
+.fi
+.RE
+.LP
+and for <control>-F was:
+.sp
+.RS
+.nf
+
+\fB((current first line) + count x (window edit option)) -2
+\fP
+.fi
+.RE
+.LP
+This calculation does not work well when intermixing commands with
+and without counts; for example, \fB3\fP <control>-F
+is not equivalent to entering the <control>-F command three times,
+and is not reversible by entering the <control>-B
+command three times. For consistency with other \fIvi\fP commands
+that take counts, IEEE\ Std\ 1003.1-2001 requires a
+different calculation.
+.SS Scroll Forward
+.LP
+The 4BSD and System V implementations of \fIvi\fP differed on the
+initial value used by the \fBscroll\fP command. 4BSD
+used:
+.sp
+.RS
+.nf
+
+\fB((window edit option) +1) /2
+\fP
+.fi
+.RE
+.LP
+while System V used the value of the \fBscroll\fP edit option. The
+System V version is specified by
+IEEE\ Std\ 1003.1-2001 because the standard developers believed that
+it was more intuitive and permitted the user a method
+of setting the scroll value initially without also setting the number
+of lines that are displayed.
+.SS Scroll Forward by Line
+.LP
+Historically, the <control>-E and <control>-Y commands considered
+it an error if the last and first lines,
+respectively, were already on the screen. IEEE\ Std\ 1003.1-2001 requires
+conformance to historical practice. Historically,
+the <control>-E and <control>-Y commands had no effect in open mode.
+For simplicity and consistency of specification,
+IEEE\ Std\ 1003.1-2001 requires that they behave as usual, albeit
+with a single line screen.
+.SS Clear and Redisplay
+.LP
+The historical <control>-L command refreshed the screen exactly as
+it was supposed to be currently displayed, replacing
+any \fB'@'\fP characters for lines that had been deleted but not updated
+on the screen with refreshed \fB'@'\fP characters.
+The intent of the <control>-L command is to refresh when the screen
+has been accidentally overwritten; for example, by a
+\fBwrite\fP command from another user, or modem noise.
+.SS Redraw Screen
+.LP
+The historical <control>-R command redisplayed only when necessary
+to update lines that had been deleted but not updated
+on the screen and that were flagged with \fB'@'\fP characters. There
+is no requirement that the screen be in any way refreshed
+if no lines of this form are currently displayed. IEEE\ Std\ 1003.1-2001
+permits implementations to extend this command to
+refresh lines on the screen flagged with \fB'@'\fP characters because
+they are too long to be displayed in the current
+framework; however, the current line and column need not be modified.
+.SS Search for tagstring
+.LP
+Historically, the first non- <blank> at or after the cursor was the
+first character, and all subsequent characters that
+were word characters, up to the end of the line, were included. For
+example, with the cursor on the leading space or on the
+\fB'#'\fP character in the text \fB"#bar@"\fP, the tag was \fB"#bar"\fP
+\&. On the character \fB'b'\fP it was
+\fB"bar"\fP, and on the \fB'a'\fP it was \fB"ar"\fP . IEEE\ Std\ 1003.1-2001
+requires this behavior.
+.SS Replace Text with Results from Shell Command
+.LP
+Historically, the \fB<\fP, \fB>\fP, and \fB!\fP commands considered
+most cursor motions other than line-oriented
+motions an error; for example, the command \fB>/foo<CR>\fP succeeded,
+while the command \fB>l\fP failed, even though
+the text region described by the two commands might be identical.
+For consistency, all three commands only consider entire lines
+and not partial lines, and the region is defined as any line that
+contains a character that was specified by the motion.
+.SS Move to Matching Character
+.LP
+Other matching characters have been left implementation-defined in
+order to allow extensions such as matching \fB'<'\fP
+and \fB'>'\fP for searching HTML, or \fB#ifdef\fP, \fB#else\fP, and
+\fB#endif\fP for searching C source.
+.SS Repeat Substitution
+.LP
+IEEE\ Std\ 1003.1-2001 requires that any \fBc\fP and \fBg\fP flags
+specified to the previous substitute command be
+ignored; however, the \fBr\fP flag may still apply, if supported by
+the implementation.
+.SS Return to Previous (Context or Section)
+.LP
+The \fB[[\fP, \fB]]\fP, \fB(\fP, \fB)\fP, \fB{\fP, and \fB}\fP commands
+are all affected by "section boundaries", but in
+some historical implementations not all of the commands recognize
+the same section boundaries. This is a bug, not a feature, and a
+unique section-boundary algorithm was not described for each command.
+One special case that is preserved is that the sentence
+command moves to the end of the last line of the edit buffer while
+the other commands go to the beginning, in order to preserve the
+traditional character cut semantics of the sentence command. Historically,
+\fIvi\fP section boundaries at the beginning and end of
+the edit buffer were the first non- <blank> on the first and last
+lines of the edit buffer if one exists; otherwise, the last
+character of the first and last lines of the edit buffer if one exists.
+To increase consistency with other section locations, this
+has been simplified by IEEE\ Std\ 1003.1-2001 to the first character
+of the first and last lines of the edit buffer, or the
+first and the last lines of the edit buffer if they are empty.
+.LP
+Sentence boundaries were problematic in the historical \fIvi\fP. They
+were not only the boundaries as defined for the section
+and paragraph commands, but they were the first non- <blank> that
+occurred after those boundaries, as well. Historically, the
+\fIvi\fP section commands were documented as taking an optional window
+size as a \fIcount\fP preceding the command. This was not
+implemented in historical versions, so IEEE\ Std\ 1003.1-2001 requires
+that the \fIcount\fP repeat the command, for
+consistency with other \fIvi\fP commands.
+.SS Repeat
+.LP
+Historically, mapped commands other than text input commands could
+not be repeated using the \fBperiod\fP command.
+IEEE\ Std\ 1003.1-2001 requires conformance to historical practice.
+.LP
+The restrictions on the interpretation of special characters (for
+example, <control>-H) in the repetition of text input
+mode commands is intended to match historical practice. For example,
+given the input sequence:
+.sp
+.RS
+.nf
+
+\fBiab<control>-H<control>-H<control>-Hdef<escape>
+\fP
+.fi
+.RE
+.LP
+the user should be informed of an error when the sequence is first
+entered, but not during a command repetition. The character
+<control>-T is specifically exempted from this restriction. Historical
+implementations of \fIvi\fP ignored <control>-T
+characters that were input in the original command during command
+repetition. IEEE\ Std\ 1003.1-2001 prohibits this
+behavior.
+.SS Find Regular Expression
+.LP
+Historically, commands did not affect the line searched to or from
+if the motion command was a search ( \fB/\fP, \fB?\fP,
+\fBN\fP, \fBn\fP) and the final position was the start/end of the
+line. There were some special cases and \fIvi\fP was not
+consistent. IEEE\ Std\ 1003.1-2001 does not permit this behavior,
+for consistency. Historical implementations permitted but
+were unable to handle searches as motion commands that wrapped (that
+is, due to the edit option \fBwrapscan\fP) to the original
+location. IEEE\ Std\ 1003.1-2001 requires that this behavior be treated
+as an error.
+.LP
+Historically, the syntax \fB"/RE/0"\fP was used to force the command
+to cut text in line mode. IEEE\ Std\ 1003.1-2001
+requires conformance to historical practice.
+.LP
+Historically, in open mode, a \fBz\fP specified to a search command
+redisplayed the current line instead of displaying the
+current screen with the current line highlighted. For consistency
+and simplicity of specification, IEEE\ Std\ 1003.1-2001
+does not permit this behavior.
+.LP
+Historically, trailing \fBz\fP commands were permitted and ignored
+if entered as part of a search used as a motion command. For
+consistency and simplicity of specification, IEEE\ Std\ 1003.1-2001
+does not permit this behavior.
+.SS Execute an ex Command
+.LP
+Historically, \fIvi\fP implementations restricted the commands that
+could be entered on the colon command line (for example,
+\fBappend\fP and \fBchange\fP), and some other commands were known
+to cause them to fail catastrophically. For consistency,
+IEEE\ Std\ 1003.1-2001 does not permit these restrictions. When executing
+an \fIex\fP
+command by entering \fB:\fP, it is not possible to enter a <newline>
+as part of the command because it is considered the end
+of the command. A different approach is to enter \fIex\fP command
+mode by using the \fIvi\fP
+\fBQ\fP command (and later resuming visual mode with the \fIex\fP
+\fBvi\fP command). In \fIex\fP command mode, the single-line limitation
+does not exist. So, for example, the following
+is valid:
+.sp
+.RS
+.nf
+
+\fBQ
+s/break here/break\\
+here/
+vi
+\fP
+.fi
+.RE
+.LP
+IEEE\ Std\ 1003.1-2001 requires that, if the \fIex\fP command overwrites
+any part of
+the screen that would be erased by a refresh, \fIvi\fP pauses for
+a character from the user. Historically, this character could be
+any character; for example, a character input by the user before the
+message appeared, or even a mapped character. This is probably
+a bug, but implementations that have tried to be more rigorous by
+requiring that the user enter a specific character, or that the
+user enter a character after the message was displayed, have been
+forced by user indignation back into historical behavior.
+IEEE\ Std\ 1003.1-2001 requires conformance to historical practice.
+.SS Shift Left (Right)
+.LP
+Refer to the Rationale for the \fB!\fP and \fB/\fP commands. Historically,
+the \fB<\fP and \fB>\fP commands sometimes
+moved the cursor to the first non- <blank> (for example if the command
+was repeated or with \fB_\fP as the motion command),
+and sometimes left it unchanged. IEEE\ Std\ 1003.1-2001 does not permit
+this inconsistency, requiring instead that the
+cursor always move to the first non- <blank>. Historically, the \fB<\fP
+and \fB>\fP commands did not support buffer
+arguments, although some implementations allow the specification of
+an optional buffer. This behavior is neither required nor
+disallowed by IEEE\ Std\ 1003.1-2001.
+.SS Execute
+.LP
+Historically, buffers could execute other buffers, and loops, infinite
+and otherwise, were possible.
+IEEE\ Std\ 1003.1-2001 requires conformance to historical practice.
+The * \fIbuffer\fP syntax of \fIex\fP is not required in \fIvi\fP,
+because it is not historical practice and has been used in some
+\fIvi\fP implementations to support additional scripting languages.
+.SS Reverse Case
+.LP
+Historically, the \fB~\fP command ignored any associated \fIcount\fP,
+and acted only on the characters in the current
+line. For consistency with other \fIvi\fP commands, IEEE\ Std\ 1003.1-2001
+requires that an associated \fIcount\fP act on
+the next \fIcount\fP characters, and that the command move to subsequent
+lines if warranted by \fIcount\fP, to make it possible
+to modify large pieces of text in a reasonably efficient manner. There
+exist \fIvi\fP implementations that optionally require an
+associated motion command for the \fB~\fP command. Implementations
+supporting this functionality are encouraged to base it on
+the \fBtildedop\fP edit option and handle the text regions and cursor
+positioning identically to the \fByank\fP command.
+.SS Append
+.LP
+Historically, \fIcount\fPs specified to the \fBA\fP, \fBa\fP, \fBI\fP,
+and \fBi\fP commands repeated the input of the first
+line \fIcount\fP times, and did not repeat the subsequent lines of
+the input text. IEEE\ Std\ 1003.1-2001 requires that
+the entire text input be repeated \fIcount\fP times.
+.SS Move Backward to Preceding Word
+.LP
+Historically, \fIvi\fP became confused if word commands were used
+as motion commands in empty files.
+IEEE\ Std\ 1003.1-2001 requires that this be an error. Historical
+implementations of \fIvi\fP had a large number of bugs
+in the word movement commands, and they varied greatly in behavior
+in the presence of empty lines, "words" made up of a single
+character, and lines containing only <blank>s. For consistency and
+simplicity of specification,
+IEEE\ Std\ 1003.1-2001 does not permit this behavior.
+.SS Change to End-of-Line
+.LP
+Some historical implementations of the \fBC\fP command did not behave
+as described by IEEE\ Std\ 1003.1-2001 when the
+\fB$\fP key was remapped because they were implemented by pushing
+the \fB$\fP key onto the input queue and reprocessing it.
+IEEE\ Std\ 1003.1-2001 does not permit this behavior. Historically,
+the \fBC\fP, \fBS\fP, and \fBs\fP commands did not
+copy replaced text into the numeric buffers. For consistency and simplicity
+of specification, IEEE\ Std\ 1003.1-2001
+requires that they behave like their respective \fBc\fP commands in
+all respects.
+.SS Delete
+.LP
+Historically, lines in open mode that were deleted were scrolled up,
+and an \fB@\fP glyph written over the beginning of the
+line. In the case of terminals that are incapable of the necessary
+cursor motions, the editor erased the deleted line from the
+screen. IEEE\ Std\ 1003.1-2001 requires conformance to historical
+practice; that is, if the terminal cannot display the
+\fB'@'\fP character, the line cannot remain on the screen.
+.SS Delete to End-of-Line
+.LP
+Some historical implementations of the \fBD\fP command did not behave
+as described by IEEE\ Std\ 1003.1-2001 when the
+\fB$\fP key was remapped because they were implemented by pushing
+the \fB$\fP key onto the input queue and reprocessing it.
+IEEE\ Std\ 1003.1-2001 does not permit this behavior.
+.SS Join
+.LP
+An historical oddity of \fIvi\fP is that the commands \fBJ\fP, \fB1J\fP,
+and \fB2J\fP are all equivalent.
+IEEE\ Std\ 1003.1-2001 requires conformance to historical practice.
+The \fIvi\fP \fBJ\fP command is specified in terms of
+the \fIex\fP \fBjoin\fP command with an \fIex\fP command
+\fIcount\fP value. The address correction for a \fIcount\fP that is
+past the end of the edit buffer is necessary for historical
+compatibility for both \fIex\fP and \fIvi\fP.
+.SS Mark Position
+.LP
+Historical practice is that only lowercase letters, plus \fB'`'\fP
+and \fB'"\fP, could be used to mark a cursor
+position. IEEE\ Std\ 1003.1-2001 requires conformance to historical
+practice, but encourages implementations to support
+other characters as marks as well.
+.SS Repeat Regular Expression Find (Forward and Reverse)
+.LP
+Historically, the \fBN\fP and \fBn\fP commands could not be used as
+motion components for the \fBc\fP command. With the
+exception of the \fBcN\fP command, which worked if the search crossed
+a line boundary, the text region would be discarded, and the
+user would not be in text input mode. For consistency and simplicity
+of specification, IEEE\ Std\ 1003.1-2001 does not
+permit this behavior.
+.SS Insert Empty Line (Below and Above)
+.LP
+Historically, counts to the \fBO\fP and \fBo\fP commands were used
+as the number of physical lines to open, if the terminal
+was dumb and the \fBslowopen\fP option was not set. This was intended
+to minimize traffic over slow connections and repainting for
+dumb terminals. IEEE\ Std\ 1003.1-2001 does not permit this behavior,
+requiring that a \fIcount\fP to the open command
+behave as for other text input commands. This change to historical
+practice was made for consistency, and because a superset of the
+functionality is provided by the \fBslowopen\fP edit option.
+.SS Put from Buffer (Following and Before)
+.LP
+Historically, \fIcount\fPs to the \fBp\fP and \fBP\fP commands were
+ignored if the buffer was a line mode buffer, but were
+(mostly) implemented as described in IEEE\ Std\ 1003.1-2001 if the
+buffer was a character mode buffer. Because
+implementations exist that do not have this limitation, and because
+pasting lines multiple times is generally useful,
+IEEE\ Std\ 1003.1-2001 requires that \fIcount\fP be supported for
+all \fBp\fP and \fBP\fP commands.
+.LP
+Historical implementations of \fIvi\fP were widely known to have major
+problems in the \fBp\fP and \fBP\fP commands,
+particularly when unusual regions of text were copied into the edit
+buffer. The standard developers viewed these as bugs, and they
+are not permitted for consistency and simplicity of specification.
+.LP
+Historically, a \fBP\fP or \fBp\fP command (or an \fIex\fP \fBput\fP
+command executed
+from open or visual mode) executed in an empty file, left an empty
+line as the first line of the file. For consistency and
+simplicity of specification, IEEE\ Std\ 1003.1-2001 does not permit
+this behavior.
+.SS Replace Character
+.LP
+Historically, the \fBr\fP command did not correctly handle the \fIerase\fP
+and \fIword erase\fP characters as arguments, nor
+did it handle an associated \fIcount\fP greater than 1 with a <carriage-return>
+argument, for which it replaced \fIcount\fP
+characters with a single <newline>. IEEE\ Std\ 1003.1-2001 does not
+permit these inconsistencies.
+.LP
+Historically, the \fBr\fP command permitted the <control>-V escaping
+of entered characters, such as <ESC> and the
+<carriage-return>; however, it required two leading <control>-V characters
+instead of one.
+IEEE\ Std\ 1003.1-2001 requires that this be changed for consistency
+with the other text input commands of \fIvi\fP.
+.LP
+Historically, it is an error to enter the \fBr\fP command if there
+are less than \fIcount\fP characters at or after the cursor
+in the line. While a reasonable and unambiguous extension would be
+to permit the \fBr\fP command on empty lines, it would require
+that too large a \fIcount\fP be adjusted to match the number of characters
+at or after the cursor for consistency, which is
+sufficiently different from historical practice to be avoided. IEEE\ Std\ 1003.1-2001
+requires conformance to historical
+practice.
+.SS Replace Characters
+.LP
+Historically, if there were \fBautoindent\fP characters in the line
+on which the \fBR\fP command was run, and
+\fBautoindent\fP was set, the first <newline> would be properly indented
+and no characters would be replaced by the
+<newline>. Each additional <newline> would replace \fIn\fP characters,
+where \fIn\fP was the number of characters
+that were needed to indent the rest of the line to the proper indentation
+level. This behavior is a bug and is not permitted by
+IEEE\ Std\ 1003.1-2001.
+.SS Undo
+.LP
+Historical practice for cursor positioning after undoing commands
+was mixed. In most cases, when undoing commands that affected
+a single line, the cursor was moved to the start of added or changed
+text, or immediately after deleted text. However, if the user
+had moved from the line being changed, the column was either set to
+the first non- <blank>, returned to the origin of the
+command, or remained unchanged. When undoing commands that affected
+multiple lines or entire lines, the cursor was moved to the
+first character in the first line restored. As an example of how inconsistent
+this was, a search, followed by an \fBo\fP text
+input command, followed by an \fBundo\fP would return the cursor to
+the location where the \fBo\fP command was entered, but a
+\fBcw\fP command followed by an \fBo\fP command followed by an \fBundo\fP
+would return the cursor to the first non-
+<blank> of the line. IEEE\ Std\ 1003.1-2001 requires the most useful
+of these behaviors, and discards the least
+useful, in the interest of consistency and simplicity of specification.
+.SS Yank
+.LP
+Historically, the \fByank\fP command did not move to the end of the
+motion if the motion was in the forward direction. It moved
+to the end of the motion if the motion was in the backward direction,
+except for the \fB_\fP command, or for the \fBG\fP and
+\fB'\fP commands when the end of the motion was on the current line.
+This was further complicated by the fact that for a number of
+motion commands, the \fByank\fP command moved the cursor but did not
+update the screen; for example, a subsequent command would
+move the cursor from the end of the motion, even though the cursor
+on the screen had not reflected the cursor movement for the
+\fByank\fP command. IEEE\ Std\ 1003.1-2001 requires that all \fByank\fP
+commands associated with backward motions move
+the cursor to the end of the motion for consistency, and specifically,
+to make \fB'\fP commands as motions consistent with search
+patterns as motions.
+.SS Yank Current Line
+.LP
+Some historical implementations of the \fBY\fP command did not behave
+as described by IEEE\ Std\ 1003.1-2001 when the
+\fB'_'\fP key was remapped because they were implemented by pushing
+the \fB'_'\fP key onto the input queue and reprocessing
+it. IEEE\ Std\ 1003.1-2001 does not permit this behavior.
+.SS Redraw Window
+.LP
+Historically, the \fBz\fP command always redrew the screen. This is
+permitted but not required by
+IEEE\ Std\ 1003.1-2001, because of the frequent use of the \fBz\fP
+command in macros such as \fBmap n nz.\fP for screen
+positioning, instead of its use to change the screen size. The standard
+developers believed that expanding or scrolling the screen
+offered a better interface for users. The ability to redraw the screen
+is preserved if the optional new window size is specified,
+and in the <control>-L and <control>-R commands.
+.LP
+The semantics of \fBz^\fP are confusing at best. Historical practice
+is that the screen before the screen that ended with the
+specified line is displayed. IEEE\ Std\ 1003.1-2001 requires conformance
+to historical practice.
+.LP
+Historically, the \fBz\fP command would not display a partial line
+at the top or bottom of the screen. If the partial line
+would normally have been displayed at the bottom of the screen, the
+command worked, but the partial line was replaced with
+\fB'@'\fP characters. If the partial line would normally have been
+displayed at the top of the screen, the command would fail.
+For consistency and simplicity of specification, IEEE\ Std\ 1003.1-2001
+does not permit this behavior.
+.LP
+Historically, the \fBz\fP command with a line specification of 1 ignored
+the command. For consistency and simplicity of
+specification, IEEE\ Std\ 1003.1-2001 does not permit this behavior.
+.LP
+Historically, the \fBz\fP command did not set the cursor column to
+the first non- <blank> for the character if the first
+screen was to be displayed, and was already displayed. For consistency
+and simplicity of specification,
+IEEE\ Std\ 1003.1-2001 does not permit this behavior.
+.SS Input Mode Commands in vi
+.LP
+Historical implementations of \fIvi\fP did not permit the user to
+erase more than a single line of input, or to use normal
+erase characters such as \fIline erase\fP, \fIworderase\fP, and \fIerase\fP
+to erase \fBautoindent\fP characters. As there
+exist implementations of \fIvi\fP that do not have these limitations,
+both behaviors are permitted, but only historical practice
+is required. In the case of these extensions, \fIvi\fP is required
+to pause at the \fBautoindent\fP and previous line
+boundaries.
+.LP
+Historical implementations of \fIvi\fP updated only the portion of
+the screen where the current cursor character was displayed.
+For example, consider the \fIvi\fP input keystrokes:
+.sp
+.RS
+.nf
+
+\fBiabcd<escape>0C<tab>
+\fP
+.fi
+.RE
+.LP
+Historically, the <tab> would overwrite the characters \fB"abcd"\fP
+when it was displayed. Other implementations
+replace only the \fB'a'\fP character with the <tab>, and then push
+the rest of the characters ahead of the cursor. Both
+implementations have problems. The historical implementation is probably
+visually nicer for the above example; however, for the
+keystrokes:
+.sp
+.RS
+.nf
+
+\fBiabcd<ESC>0R<tab><ESC>
+\fP
+.fi
+.RE
+.LP
+the historical implementation results in the string \fB"bcd"\fP disappearing
+and then magically reappearing when the
+<ESC> character is entered. IEEE\ Std\ 1003.1-2001 requires the former
+behavior when overwriting erase-columns-that
+is, overwriting characters that are no longer logically part of the
+edit buffer-and the latter behavior otherwise.
+.LP
+Historical implementations of \fIvi\fP discarded the <control>-D and
+<control>-T characters when they were entered
+at places where their command functionality was not appropriate. IEEE\ Std\ 1003.1-2001
+requires that the <control>-T
+functionality always be available, and that <control>-D be treated
+as any other key when not operating on \fBautoindent\fP
+characters.
+.SS NUL
+.LP
+Some historical implementations of \fIvi\fP limited the number of
+characters entered using the NUL input character to 256
+bytes. IEEE\ Std\ 1003.1-2001 permits this limitation; however, implementations
+are encouraged to remove this limit.
+.SS <control>-D
+.LP
+See also Rationale for the input mode command <newline>. The hidden
+assumptions in the <control>-D command (and in
+the \fIvi\fP \fBautoindent\fP specification in general) is that <space>s
+take up a single column on the screen and that
+<tab>s are comprised of an integral number of <space>s.
+.SS <newline>
+.LP
+Implementations are permitted to rewrite \fBautoindent\fP characters
+in the line when <newline>, <carriage-return>,
+<control>-D, and <control>-T are entered, or when the \fBshift\fP
+commands are used, because historical
+implementations have both done so and found it necessary to do so.
+For example, a <control>-D when the cursor is preceded by
+a single <tab>, with \fBtabstop\fP set to 8, and \fBshiftwidth\fP
+set to 3, will result in the <tab> being replaced
+by several <space>s.
+.SS <control>-T
+.LP
+See also the Rationale for the input mode command <newline>. Historically,
+<control>-T only worked if no non-
+<blank>s had yet been input in the current input line. In addition,
+the characters inserted by <control>-T were treated
+as \fBautoindent\fP characters, and could not be erased using normal
+user erase characters. Because implementations exist that do
+not have these limitations, and as moving to a column boundary is
+generally useful, IEEE\ Std\ 1003.1-2001 requires that
+both limitations be removed.
+.SS <control>-V
+.LP
+Historically, \fIvi\fP used \fB^V\fP, regardless of the value of the
+literal-next character of the terminal.
+IEEE\ Std\ 1003.1-2001 requires conformance to historical practice.
+.LP
+The uses described for <control>-V can also be accomplished with <control>-Q,
+which is useful on terminals that use
+<control>-V for the down-arrow function. However, most historical
+implementations use <control>-Q for the
+\fItermios\fP START character, so the editor will generally not receive
+the <control>-Q unless \fBstty ixon\fP mode is set
+to off. (In addition, some historical implementations of \fIvi\fP
+explicitly set \fBixon\fP mode to on, so it was difficult for
+the user to set it to off.) Any of the command characters described
+in IEEE\ Std\ 1003.1-2001 can be made ineffective by
+their selection as \fItermios\fP control characters, using the \fIstty\fP
+utility or other
+methods described in the System Interfaces volume of IEEE\ Std\ 1003.1-2001.
+.SS <ESC>
+.LP
+Historically, SIGINT alerted the terminal when used to end input mode.
+This behavior is permitted, but not required, by
+IEEE\ Std\ 1003.1-2001.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIed\fP, \fIex\fP, \fIstty\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/wait.1p b/man-pages-posix-2003/man1p/wait.1p
new file mode 100644
index 0000000..9af89d1
--- /dev/null
+++ b/man-pages-posix-2003/man1p/wait.1p
@@ -0,0 +1,319 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WAIT" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wait
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wait \- await process completion
+.SH SYNOPSIS
+.LP
+\fBwait\fP \fB[\fP\fIpid\fP\fB...\fP\fB]\fP
+.SH DESCRIPTION
+.LP
+When an asynchronous list (see \fIAsynchronous Lists\fP ) is started
+by the
+shell, the process ID of the last command in each element of the asynchronous
+list shall become known in the current shell
+execution environment; see \fIShell Execution Environment\fP .
+.LP
+If the \fIwait\fP utility is invoked with no operands, it shall wait
+until all process IDs known to the invoking shell have
+terminated and exit with a zero exit status.
+.LP
+If one or more \fIpid\fP operands are specified that represent known
+process IDs, the \fIwait\fP utility shall wait until all
+of them have terminated. If one or more \fIpid\fP operands are specified
+that represent unknown process IDs, \fIwait\fP shall
+treat them as if they were known process IDs that exited with exit
+status 127. The exit status returned by the \fIwait\fP utility
+shall be the exit status of the process requested by the last \fIpid\fP
+operand.
+.LP
+The known process IDs are applicable only for invocations of \fIwait\fP
+in the current shell execution environment.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIpid\fP
+One of the following:
+.RS
+.IP " 1." 4
+The unsigned decimal integer process ID of a command, for which the
+utility is to wait for the termination.
+.LP
+.IP " 2." 4
+A job control job ID (see the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Section 3.203, Job Control Job ID) that identifies a background process
+group to be
+waited for. The job control job ID notation is applicable only for
+invocations of \fIwait\fP in the current shell execution
+environment; see \fIShell Execution Environment\fP . The exit status
+of \fIwait\fP shall
+be determined by the last command in the pipeline.
+.TP 7
+\fBNote:\fP
+.RS
+The job control job ID type of \fIpid\fP is only available on systems
+supporting the User Portability Utilities option.
+.RE
+.sp
+.LP
+.RE
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIwait\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+If one or more operands were specified, all of them have terminated
+or were not known by the invoking shell, and the status of
+the last operand specified is known, then the exit status of \fIwait\fP
+shall be the exit status information of the command
+indicated by the last operand specified. If the process terminated
+abnormally due to the receipt of a signal, the exit status shall
+be greater than 128 and shall be distinct from the exit status generated
+by other signals, but the exact value is unspecified. (See
+the \fIkill\fP \fB-l\fP option.) Otherwise, the \fIwait\fP utility
+shall exit with one of
+the following values:
+.TP 7
+\ \ \ \ 0
+The \fIwait\fP utility was invoked with no operands and all process
+IDs known by the invoking shell have terminated.
+.TP 7
+1-126
+The \fIwait\fP utility detected an error.
+.TP 7
+\ \ 127
+The command identified by the last \fIpid\fP operand specified is
+unknown.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+On most implementations, \fIwait\fP is a shell built-in. If it is
+called in a subshell or separate utility execution
+environment, such as one of the following:
+.sp
+.RS
+.nf
+
+\fB(wait)
+nohup wait ...
+find . -exec wait ... \\;
+\fP
+.fi
+.RE
+.LP
+it returns immediately because there are no known process IDs to wait
+for in those environments.
+.LP
+Historical implementations of interactive shells have discarded the
+exit status of terminated background processes before each
+shell prompt. Therefore, the status of background processes was usually
+lost unless it terminated while \fIwait\fP was waiting for
+it. This could be a serious problem when a job that was expected to
+run for a long time actually terminated quickly with a syntax
+or initialization error because the exit status returned was usually
+zero if the requested process ID was not found. This volume of
+IEEE\ Std\ 1003.1-2001 requires the implementation to keep the status
+of terminated jobs available until the status is
+requested, so that scripts like:
+.sp
+.RS
+.nf
+
+\fBj1&
+p1=$!
+j2&
+wait $p1
+echo Job 1 exited with status $?
+wait $!
+echo Job 2 exited with status $?
+\fP
+.fi
+.RE
+.LP
+work without losing status on any of the jobs. The shell is allowed
+to discard the status of any process if it determines that
+the application cannot get the process ID for that process from the
+shell. It is also required to remember only {CHILD_MAX} number
+of processes in this way. Since the only way to get the process ID
+from the shell is by using the \fB'!'\fP shell parameter, the
+shell is allowed to discard the status of an asynchronous list if
+\fB"$!"\fP was not referenced before another asynchronous list
+was started. (This means that the shell only has to keep the status
+of the last asynchronous list started if the application did
+not reference \fB"$!"\fP . If the implementation of the shell is smart
+enough to determine that a reference to \fB"$!"\fP was
+not saved anywhere that the application can retrieve it later, it
+can use this information to trim the list of saved information.
+Note also that a successful call to \fIwait\fP with no operands discards
+the exit status of all asynchronous lists.)
+.LP
+If the exit status of \fIwait\fP is greater than 128, there is no
+way for the application to know if the waited-for process
+exited with that value or was killed by a signal. Since most utilities
+exit with small values, there is seldom any ambiguity. Even
+in the ambiguous cases, most applications just need to know that the
+asynchronous job failed; it does not matter whether it
+detected an error and failed or was killed and did not complete its
+job normally.
+.SH EXAMPLES
+.LP
+Although the exact value used when a process is terminated by a signal
+is unspecified, if it is known that a signal terminated a
+process, a script can still reliably determine which signal by using
+\fIkill\fP as shown by
+the following script:
+.sp
+.RS
+.nf
+
+\fBsleep 1000&
+pid=$!
+kill -kill $pid
+wait $pid
+echo $pid was terminated by a SIG$(kill -l $?) signal.
+\fP
+.fi
+.RE
+.LP
+If the following sequence of commands is run in less than 31 seconds:
+.sp
+.RS
+.nf
+
+\fBsleep 257 | sleep 31 &
+jobs -l %%
+\fP
+.fi
+.RE
+.LP
+either of the following commands returns the exit status of the second
+\fIsleep\fP in the
+pipeline:
+.sp
+.RS
+.nf
+
+\fBwait\fP \fI<pid of sleep 31>\fP\fBwait %%
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+The description of \fIwait\fP does not refer to the \fIwaitpid\fP()
+function from the
+System Interfaces volume of IEEE\ Std\ 1003.1-2001 because that would
+needlessly overspecify this interface. However, the
+wording means that \fIwait\fP is required to wait for an explicit
+process when it is given an argument so that the status
+information of other processes is not consumed. Historical implementations
+use the \fIwait\fP() function defined in the System Interfaces volume
+of IEEE\ Std\ 1003.1-2001 until
+\fIwait\fP() returns the requested process ID or finds that the requested
+process does not
+exist. Because this means that a shell script could not reliably get
+the status of all background children if a second background
+job was ever started before the first job finished, it is recommended
+that the \fIwait\fP utility use a method such as the
+functionality provided by the \fIwaitpid\fP() function.
+.LP
+The ability to wait for multiple \fIpid\fP operands was adopted from
+the KornShell.
+.LP
+This new functionality was added because it is needed to determine
+the exit status of any asynchronous list accurately. The only
+compatibility problem that this change creates is for a script like
+.sp
+.RS
+.nf
+
+\fBwhile sleep 60 do
+ job& echo Job started $(date) as $! done
+\fP
+.fi
+.RE
+.LP
+which causes the shell to monitor all of the jobs started until the
+script terminates or runs out of memory. This would not be a
+problem if the loop did not reference \fB"$!"\fP or if the script
+would occasionally \fIwait\fP for jobs it started.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIShell Command Language\fP, \fIkill\fP(), \fIsh\fP, the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIwait\fP(), \fIwaitpid\fP()
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/wc.1p b/man-pages-posix-2003/man1p/wc.1p
new file mode 100644
index 0000000..5c134b7
--- /dev/null
+++ b/man-pages-posix-2003/man1p/wc.1p
@@ -0,0 +1,235 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WC" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wc
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wc \- word, line, and byte or character count
+.SH SYNOPSIS
+.LP
+\fBwc\fP \fB[\fP\fB-c|-m\fP\fB][\fP\fB-lw\fP\fB][\fP\fIfile\fP\fB...\fP\fB]\fP
+.SH DESCRIPTION
+.LP
+The \fIwc\fP utility shall read one or more input files and, by default,
+write the number of <newline>s, words, and bytes
+contained in each input file to the standard output.
+.LP
+The utility also shall write a total count for all named files, if
+more than one input file is specified.
+.LP
+The \fIwc\fP utility shall consider a \fIword\fP to be a non-zero-length
+string of characters delimited by white space.
+.SH OPTIONS
+.LP
+The \fIwc\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-c\fP
+Write to the standard output the number of bytes in each input file.
+.TP 7
+\fB-l\fP
+Write to the standard output the number of <newline>s in each input
+file.
+.TP 7
+\fB-m\fP
+Write to the standard output the number of characters in each input
+file.
+.TP 7
+\fB-w\fP
+Write to the standard output the number of words in each input file.
+.sp
+.LP
+When any option is specified, \fIwc\fP shall report only the information
+requested by the specified options.
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of an input file. If no \fIfile\fP operands are specified,
+the standard input shall be used.
+.sp
+.SH STDIN
+.LP
+The standard input shall be used only if no \fIfile\fP operands are
+specified. See the INPUT FILES section.
+.SH INPUT FILES
+.LP
+The input files may be of any type.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIwc\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files) and
+which characters are defined as white space characters.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard error and
+informative messages written to standard output.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+By default, the standard output shall contain an entry for each input
+file of the form:
+.sp
+.RS
+.nf
+
+\fB"%d %d %d %s\\n", <\fP\fInewlines\fP\fB>, <\fP\fIwords\fP\fB>, <\fP\fIbytes\fP\fB>, <\fP\fIfile\fP\fB>
+\fP
+.fi
+.RE
+.LP
+If the \fB-m\fP option is specified, the number of characters shall
+replace the <\fIbytes\fP> field in this format.
+.LP
+If any options are specified and the \fB-l\fP option is not specified,
+the number of <newline>s shall not be written.
+.LP
+If any options are specified and the \fB-w\fP option is not specified,
+the number of words shall not be written.
+.LP
+If any options are specified and neither \fB-c\fP nor \fB-m\fP is
+specified, the number of bytes or characters shall not be
+written.
+.LP
+If no input \fIfile\fP operands are specified, no name shall be written
+and no <blank>s preceding the pathname shall be
+written.
+.LP
+If more than one input \fIfile\fP operand is specified, an additional
+line shall be written, of the same format as the other
+lines, except that the word \fBtotal\fP (in the POSIX locale) shall
+be written instead of a pathname and the total of each column
+shall be written as appropriate. Such an additional line, if any,
+is written at the end of the output.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The \fB-m\fP option is not a switch, but an option at the same level
+as \fB-c\fP. Thus, to produce the full default output
+with character counts instead of bytes, the command required is:
+.sp
+.RS
+.nf
+
+\fBwc -mlw
+\fP
+.fi
+.RE
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The output file format pseudo- \fIprintf\fP() string differs from
+the System V version
+of \fIwc\fP:
+.sp
+.RS
+.nf
+
+\fB"%7d%7d%7d %s\\n"
+\fP
+.fi
+.RE
+.LP
+which produces possibly ambiguous and unparsable results for very
+large files, as it assumes no number shall exceed six
+digits.
+.LP
+Some historical implementations use only <space>, <tab>, and <newline>
+as word separators. The equivalent of
+the ISO\ C standard \fIisspace\fP() function is more appropriate.
+.LP
+The \fB-c\fP option stands for "character" count, even though it counts
+bytes. This stems from the sometimes erroneous
+historical view that bytes and characters are the same size. Due to
+international requirements, the \fB-m\fP option (reminiscent
+of "multi-byte") was added to obtain actual character counts.
+.LP
+Early proposals only specified the results when input files were text
+files. The current specification more closely matches
+historical practice. (Bytes, words, and <newline>s are counted separately
+and the results are written when an end-of-file is
+detected.)
+.LP
+Historical implementations of the \fIwc\fP utility only accepted one
+argument to specify the options \fB-c\fP, \fB-l\fP, and
+\fB-w\fP. Some of them also had multiple occurrences of an option
+cause the corresponding count to be written multiple times and
+had the order of specification of the options affect the order of
+the fields on output, but did not document either of these.
+Because common usage either specifies no options or only one option,
+and because none of this was documented, the changes required
+by this volume of IEEE\ Std\ 1003.1-2001 should not break many historical
+applications (and do not break any historical
+conforming applications).
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcksum\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/what.1p b/man-pages-posix-2003/man1p/what.1p
new file mode 100644
index 0000000..601f996
--- /dev/null
+++ b/man-pages-posix-2003/man1p/what.1p
@@ -0,0 +1,190 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WHAT" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" what
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+what \- identify SCCS files (\fBDEVELOPMENT\fP)
+.SH SYNOPSIS
+.LP
+\fBwhat\fP \fB[\fP\fB-s\fP\fB]\fP \fIfile\fP\fB... \fP
+.SH DESCRIPTION
+.LP
+The \fIwhat\fP utility shall search the given files for all occurrences
+of the pattern that \fIget\fP (see \fIget\fP ) substitutes for the
+%\fBZ\fP% keyword (
+\fB"@(#)"\fP ) and shall write to standard output what follows until
+the first occurrence of one of the following:
+.sp
+.RS
+.nf
+
+\fB" > newline \\ NUL
+\fP
+.fi
+.RE
+.SH OPTIONS
+.LP
+The \fIwhat\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following option shall be supported:
+.TP 7
+\fB-s\fP
+Quit after finding the first occurrence of the pattern in each file.
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIfile\fP
+A pathname of a file to search.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+The input files shall be of any file type.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIwhat\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The standard output shall consist of the following for each \fIfile\fP
+operand:
+.sp
+.RS
+.nf
+
+\fB"%s:\\n\\t%s\\n", <\fP\fIpathname\fP\fB>, <\fP\fIidentification string\fP\fB>
+\fP
+.fi
+.RE
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+0
+Any matches were found.
+.TP 7
+1
+Otherwise.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The \fIwhat\fP utility is intended to be used in conjunction with
+the SCCS command \fIget\fP, which automatically inserts identifying
+information, but it can also be used where the
+information is inserted by any other means.
+.LP
+When the string \fB"@(#)"\fP is included in a library routine in a
+shared library, it might not be found in an \fBa.out\fP
+file using that library routine.
+.SH EXAMPLES
+.LP
+If the C-language program in file \fBf.c\fP contains:
+.sp
+.RS
+.nf
+
+\fBchar ident[] = "@(#)identification information";
+\fP
+.fi
+.RE
+.LP
+and \fBf.c\fP is compiled to yield \fBf.o\fP and \fBa.out\fP, then
+the command:
+.sp
+.RS
+.nf
+
+\fBwhat f.c f.o a.out
+\fP
+.fi
+.RE
+.LP
+writes:
+.sp
+.RS
+.nf
+
+\fBf.c:
+ identification information
+ ...
+f.o:
+ identification information
+ ...
+a.out:
+ identification information
+ ...
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIget\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/who.1p b/man-pages-posix-2003/man1p/who.1p
new file mode 100644
index 0000000..4da3cd0
--- /dev/null
+++ b/man-pages-posix-2003/man1p/who.1p
@@ -0,0 +1,316 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WHO" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" who
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+who \- display who is on the system
+.SH SYNOPSIS
+.LP
+\fBwho\fP \fB[\fP\fB-mTu\fP\fB]\fP\fB
+.br
+.sp
+\fP
+.LP
+\fBwho\fP
+\fB[\fP\fB-mu\fP\fB]\fP\fB-s\fP\fB[\fP\fB-bHlprt\fP\fB][\fP\fIfile\fP\fB]\fP\fB
+.br
+.sp
+who\fP \fB[\fP\fB-mTu\fP\fB][\fP\fB-abdHlprt\fP\fB][\fP\fIfile\fP\fB]\fP\fB
+.br
+.sp
+who -q\fP \fB[\fP\fIfile\fP\fB]\fP\fB
+.br
+.sp
+who am i
+.br
+.sp
+who am I \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwho\fP utility shall list various pieces of information about
+accessible users. The domain of accessibility is
+implementation-defined.
+.LP
+Based on the options given, \fIwho\fP can also list the user's name,
+terminal line, login time, elapsed time since activity
+occurred on the line, and the process ID of the command interpreter
+for each current system user.
+.SH OPTIONS
+.LP
+The \fIwho\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported. The metavariables, such
+as <\fIline\fP>, refer to fields described in the
+STDOUT section.
+.TP 7
+\fB-a\fP
+Process the implementation-defined database or named file with the
+\fB-b\fP, \fB-d\fP, \fB-l\fP, \fB-p\fP, \fB-r\fP,
+\fB-t\fP, \fB-T\fP and \fB-u\fP options turned on.
+.TP 7
+\fB-b\fP
+Write the time and date of the last reboot.
+.TP 7
+\fB-d\fP
+Write a list of all processes that have expired and not been respawned
+by the \fIinit\fP system process. The <\fIexit\fP>
+field shall appear for dead processes and contain the termination
+and exit values of the dead process. This can be useful in
+determining why a process terminated.
+.TP 7
+\fB-H\fP
+Write column headings above the regular output.
+.TP 7
+\fB-l\fP
+(The letter ell.) List only those lines on which the system is waiting
+for someone to login. The <\fIname\fP> field shall be
+\fBLOGIN\fP in such cases. Other fields shall be the same as for user
+entries except that the <\fIstate\fP> field does not
+exist.
+.TP 7
+\fB-m\fP
+Output only information about the current terminal.
+.TP 7
+\fB-p\fP
+List any other process that is currently active and has been previously
+spawned by \fIinit\fP.
+.TP 7
+\fB-q\fP
+(Quick.) List only the names and the number of users currently logged
+on. When this option is used, all other options shall be
+ignored.
+.TP 7
+\fB-r\fP
+Write the current \fIrun-level\fP of the \fIinit\fP process.
+.TP 7
+\fB-s\fP
+List only the <\fIname\fP>, <\fIline\fP>, and <\fItime\fP> fields.
+This is the default case.
+.TP 7
+\fB-t\fP
+Indicate the last change to the system clock.
+.TP 7
+\fB-T\fP
+Show the state of each terminal, as described in the STDOUT section.
+.TP 7
+\fB-u\fP
+Write "idle time" for each displayed user in addition to any other
+information. The idle time is the time since any activity
+occurred on the user's terminal. The method of determining this is
+unspecified. This option
+shall list only those users who are currently logged in. The <\fIname\fP>
+is the user's login name. The <\fIline\fP>
+is the name of the line as found in the directory \fB/dev\fP. The
+<\fItime\fP> is the time that the user logged in. The
+<\fIactivity\fP> is the number of hours and minutes since activity
+last occurred on that particular line. A dot indicates
+that the terminal has seen activity in the last minute and is therefore
+"current". If more than twenty-four hours have elapsed or
+the line has not been used since boot time, the entry shall be marked
+<\fIold\fP>. This field is useful when trying to
+determine whether a person is working at the terminal or not. The
+<\fIpid\fP> is the process ID of the user's login process.
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fBam\ i\fP,\ \fBam\ I\fP
+In the POSIX locale, limit the output to describing the invoking user,
+equivalent to the \fB-m\fP option. The \fBam\fP and
+\fBi\fP or \fBI\fP must be separate arguments.
+.TP 7
+\fIfile\fP
+Specify a pathname of a file to substitute for the implementation-defined
+database of logged-on users that \fIwho\fP uses by
+default.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIwho\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fILC_TIME\fP
+Determine the locale used for the format and contents of the date
+and time strings.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fITZ\fP
+Determine the timezone used when writing date and time information.
+If \fITZ\fP is unset or null, an unspecified default
+timezone shall be used.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The \fIwho\fP utility shall write its default format to the standard
+output in an implementation-defined format, subject only
+to the requirement of containing the information described above.
+.LP
+XSI-conformant systems shall write the default information to the
+standard output in the following general format:
+.sp
+.RS
+.nf
+
+\fB<\fP\fIname\fP\fB>\fP\fB[\fP\fB<\fP\fIstate\fP\fB>\fP\fB]\fP\fB<\fP\fIline\fP\fB><\fP\fItime\fP\fB>\fP\fB[\fP\fB<\fP\fIactivity\fP\fB>\fP\fB][\fP\fB<\fP\fIpid\fP\fB>\fP\fB][\fP\fB<\fP\fIcomment\fP\fB>\fP\fB][\fP\fB<\fP\fIexit\fP\fB>\fP\fB]\fP \fB
+\fP
+.fi
+.RE
+.LP
+The following format shall be used for the \fB-T\fP option:
+.sp
+.RS
+.nf
+
+\fB"%s %c %s %s\\n" <\fP\fIname\fP\fB>, <\fP\fIterminal state\fP\fB>, <\fP\fIterminal name\fP\fB>,
+ <\fP\fItime of login\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where <\fIterminal\ state\fP> is one of the following characters:
+.TP 7
+\fB+\fP
+The terminal allows write access to other users.
+.TP 7
+\fB-\fP
+The terminal denies write access to other users.
+.TP 7
+\fB?\fP
+The terminal write-access state cannot be determined.
+.sp
+.LP
+In the POSIX locale, the <\fItime\ of\ login\fP> shall be equivalent
+in format to the output of:
+.sp
+.RS
+.nf
+
+\fBdate +"%b %e %H:%M"
+\fP
+.fi
+.RE
+.LP
+If the \fB-u\fP option is used with \fB-T\fP, the idle time shall
+be added to the end of the previous format in an unspecified
+format.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The name \fIinit\fP used for the system process is the most commonly
+used on historical systems, but it may vary.
+.LP
+The "domain of accessibility" referred to is a broad concept that
+permits interpretation either on a very secure basis or even
+to allow a network-wide implementation like the historical \fIrwho\fP.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+Due to differences between historical implementations, the base options
+provided were a compromise to allow users to work with
+those functions. The standard developers also considered removing
+all the options, but felt that these options offered users
+valuable functionality. Additional options to match historical systems
+are available on XSI-conformant systems.
+.LP
+It is recognized that the \fIwho\fP command may be of limited usefulness,
+especially in a multi-level secure environment. The
+standard developers considered, however, that having some standard
+method of determining the "accessibility" of other users would
+aid user portability.
+.LP
+No format was specified for the default \fIwho\fP output for systems
+not supporting the XSI Extension. In such a user-oriented
+command, designed only for human use, this was not considered to be
+a deficiency.
+.LP
+The format of the terminal name is unspecified, but the descriptions
+of \fIps\fP, \fItalk\fP, and \fIwrite\fP require that they use the
+same
+format.
+.LP
+It is acceptable for an implementation to produce no output for an
+invocation of \fIwho\fP \fBmil\fP.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fImesg\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/write.1p b/man-pages-posix-2003/man1p/write.1p
new file mode 100644
index 0000000..e9c410a
--- /dev/null
+++ b/man-pages-posix-2003/man1p/write.1p
@@ -0,0 +1,224 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WRITE" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" write
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+write \- write to another user
+.SH SYNOPSIS
+.LP
+\fBwrite\fP \fIuser_name\fP \fB[\fP\fIterminal\fP\fB]\fP\fB\fP
+.SH DESCRIPTION
+.LP
+The \fIwrite\fP utility shall read lines from the user's standard
+input and write them to the terminal of another user. When
+first invoked, it shall write the message:
+.sp
+.RS
+.nf
+
+\fBMessage from\fP \fIsender-login-id\fP \fB(\fP\fIsending-terminal\fP\fB)\fP \fB[\fP\fIdate\fP\fB]\fP\fB...
+\fP
+.fi
+.RE
+.LP
+to \fIuser_name\fP. When it has successfully completed the connection,
+the sender's terminal shall be alerted twice to indicate
+that what the sender is typing is being written to the recipient's
+terminal.
+.LP
+If the recipient wants to reply, this can be accomplished by typing:
+.sp
+.RS
+.nf
+
+\fBwrite\fP \fIsender-login-id\fP \fB[\fP\fIsending-terminal\fP\fB]\fP
+.fi
+.RE
+.LP
+upon receipt of the initial message. Whenever a line of input as delimited
+by an NL, EOF, or EOL special character (see the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 11, General
+Terminal
+Interface) is accumulated while in canonical input mode, the accumulated
+data shall be written on the other user's terminal.
+Characters shall be processed as follows:
+.IP " *" 3
+Typing <alert> shall write the alert character to the recipient's
+terminal.
+.LP
+.IP " *" 3
+Typing the erase and kill characters shall affect the sender's terminal
+in the manner described by the \fBtermios\fP interface
+in the Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter
+11, General
+Terminal Interface.
+.LP
+.IP " *" 3
+Typing the interrupt or end-of-file characters shall cause \fIwrite\fP
+to write an appropriate message ( \fB"EOT\\n"\fP in
+the POSIX locale) to the recipient's terminal and exit.
+.LP
+.IP " *" 3
+Typing characters from \fILC_CTYPE\fP classifications \fBprint\fP
+or \fBspace\fP shall cause those characters to be sent to
+the recipient's terminal.
+.LP
+.IP " *" 3
+When and only when the \fIstty\fP \fBiexten\fP local mode is enabled,
+the existence and
+processing of additional special control characters and multi-byte
+or single-byte functions is implementation-defined.
+.LP
+.IP " *" 3
+Typing other non-printable characters shall cause implementation-defined
+sequences of printable characters to be written to the
+recipient's terminal.
+.LP
+.LP
+To write to a user who is logged in more than once, the \fIterminal\fP
+argument can be used to indicate which terminal to write
+to; otherwise, the recipient's terminal is selected in an implementation-defined
+manner and an informational message is written to
+the sender's standard output, indicating which terminal was chosen.
+.LP
+Permission to be a recipient of a \fIwrite\fP message can be denied
+or granted by use of the \fImesg\fP utility. However, a user's privilege
+may further constrain the domain of accessibility of
+other users' terminals. The \fIwrite\fP utility shall fail when the
+user lacks the appropriate privileges to perform the requested
+action.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIuser_name\fP
+Login name of the person to whom the message shall be written. The
+application shall ensure that this operand is of the form
+returned by the \fIwho\fP utility.
+.TP 7
+\fIterminal\fP
+Terminal identification in the same format provided by the \fIwho\fP
+utility.
+.sp
+.SH STDIN
+.LP
+Lines to be copied to the recipient's terminal are read from standard
+input.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIwrite\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files). If
+the recipient's locale does not use an \fILC_CTYPE\fP
+equivalent to the sender's, the results are undefined.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard error and
+informative messages written to standard output.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+If an interrupt signal is received, \fIwrite\fP shall write an appropriate
+message on the recipient's terminal and exit with a
+status of zero. It shall take the standard action for all other signals.
+.SH STDOUT
+.LP
+An informational message shall be written to standard output if a
+recipient is logged in more than once.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+The recipient's terminal is used for output.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+The addressed user is not logged on or the addressed user denies permission.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The \fItalk\fP utility is considered by some users to be a more usable
+utility on
+full-screen terminals.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIwrite\fP utility was included in this volume of IEEE\ Std\ 1003.1-2001
+since it can be implemented on all
+terminal types. The standard developers considered the \fItalk\fP
+utility, which cannot be
+implemented on certain terminals, to be a "better" communications
+interface. Both of these programs are in widespread use on
+historical implementations. Therefore, the standard developers decided
+that both utilities should be specified.
+.LP
+The format of the terminal name is unspecified, but the descriptions
+of \fIps\fP, \fItalk\fP, \fIwho\fP, and \fIwrite\fP require that they
+all
+use or accept the same format.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fImesg\fP, \fItalk\fP, \fIwho\fP, the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 11, General
+Terminal
+Interface
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/xargs.1p b/man-pages-posix-2003/man1p/xargs.1p
new file mode 100644
index 0000000..8cd1b62
--- /dev/null
+++ b/man-pages-posix-2003/man1p/xargs.1p
@@ -0,0 +1,520 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "XARGS" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" xargs
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+xargs \- construct argument lists and invoke utility
+.SH SYNOPSIS
+.LP
+\fBxargs\fP
+\fB[\fP\fB-t\fP\fB][\fP\fB-p\fP\fB]][\fP\fB-E\fP \fIeofstr\fP\fB][\fP\fB-I\fP
+\fIreplstr\fP\fB][\fP\fB-L\fP \fInumber\fP\fB][\fP\fB-n\fP \fInumber\fP
+\fB[\fP\fB-x\fP\fB]]
+.br
+\fP \fB\ \ \ \ \ \ \fP \fB[\fP\fB-s\fP \fIsize\fP\fB][\fP\fIutility\fP
+\fB[\fP\fIargument\fP\fB...\fP\fB]]\fP
+.SH DESCRIPTION
+.LP
+The \fIxargs\fP utility shall construct a command line consisting
+of the \fIutility\fP and \fIargument\fP operands specified
+followed by as many arguments read in sequence from standard input
+as fit in length and number constraints specified by the
+options. The \fIxargs\fP utility shall then invoke the constructed
+command line and wait for its completion. This sequence shall
+be repeated until one of the following occurs:
+.IP " *" 3
+An end-of-file condition is detected on standard input.
+.LP
+.IP " *" 3
+The logical end-of-file string (see the \fB-E\fP \fIeofstr\fP option)
+is found on standard input after double-quote
+processing, apostrophe processing, and backslash escape processing
+(see next paragraph).
+.LP
+.IP " *" 3
+An invocation of a constructed command line returns an exit status
+of 255.
+.LP
+.LP
+The application shall ensure that arguments in the standard input
+are separated by unquoted <blank>s, unescaped
+<blank>s, or <newline>s. A string of zero or more non-double-quote
+( \fB' )'\fP characters and non- <newline>s
+can be quoted by enclosing them in double-quotes. A string of zero
+or more non-apostrophe ( \fB'"\fP ) characters and non-
+<newline>s can be quoted by enclosing them in apostrophes. Any unquoted
+character can be escaped by preceding it with a
+backslash. The utility named by \fIutility\fP shall be executed one
+or more times until the end-of-file is reached or the logical
+end-of file string is found. The results are unspecified if the utility
+named by \fIutility\fP attempts to read from its standard
+input.
+.LP
+The generated command line length shall be the sum of the size in
+bytes of the utility name and each argument treated as
+strings, including a null byte terminator for each of these strings.
+The \fIxargs\fP utility shall limit the command line length
+such that when the command line is invoked, the combined argument
+and environment lists (see the \fIexec\fP family of functions in
+the System Interfaces volume of IEEE\ Std\ 1003.1-2001) shall not
+exceed {ARG_MAX}-2048 bytes. Within this constraint, if
+neither the \fB-n\fP nor the \fB-s\fP option is specified, the default
+command line length shall be at least {LINE_MAX}.
+.SH OPTIONS
+.LP
+The \fIxargs\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-E\ \fP \fIeofstr\fP
+Use \fIeofstr\fP as the logical end-of-file string. If \fB-E\fP is
+not specified, it is unspecified whether the logical
+end-of-file string is the underscore character ( \fB'_'\fP ) or the
+end-of-file string capability is disabled. When
+\fIeofstr\fP is the null string, the logical end-of-file string capability
+shall be disabled and underscore characters shall be
+taken literally.
+.TP 7
+\fB-I\ \fP \fIreplstr\fP
+Insert mode: \fIutility\fP is executed for each line from standard
+input, taking the entire line as a single argument, inserting
+it in \fIargument\fPs for each occurrence of \fIreplstr\fP. A maximum
+of five arguments in \fIargument\fPs can each contain one
+or more instances of \fIreplstr\fP. Any <blank>s at the beginning
+of each line shall be ignored. Constructed arguments
+cannot grow larger than 255 bytes. Option \fB-x\fP shall be forced
+on.
+.TP 7
+\fB-L\ \fP \fInumber\fP
+The \fIutility\fP shall be executed for each non-empty \fInumber\fP
+lines of arguments from standard input. The last invocation
+of \fIutility\fP shall be with fewer lines of arguments if fewer than
+\fInumber\fP remain. A line is considered to end with the
+first <newline> unless the last character of the line is a <blank>;
+a trailing <blank> signals continuation to
+the next non-empty line, inclusive. The \fB-L\fP and \fB-n\fP options
+are mutually-exclusive; the last one specified shall take
+effect.
+.TP 7
+\fB-n\ \fP \fInumber\fP
+Invoke \fIutility\fP using as many standard input arguments as possible,
+up to \fInumber\fP (a positive decimal integer)
+arguments maximum. Fewer arguments shall be used if:
+.RS
+.IP " *" 3
+The command line length accumulated exceeds the size specified by
+the \fB-s\fP option (or {LINE_MAX} if there is no \fB-s\fP
+option).
+.LP
+.IP " *" 3
+The last iteration has fewer than \fInumber\fP, but not zero, operands
+remaining.
+.LP
+.RE
+.TP 7
+\fB-p\fP
+Prompt mode: the user is asked whether to execute \fIutility\fP at
+each invocation. Trace mode ( \fB-t\fP) is turned on to
+write the command instance to be executed, followed by a prompt to
+standard error. An affirmative response read from
+\fB/dev/tty\fP shall execute the command; otherwise, that particular
+invocation of \fIutility\fP shall be skipped.
+.TP 7
+\fB-s\ \fP \fIsize\fP
+Invoke \fIutility\fP using as many standard input arguments as possible
+yielding a command line length less than \fIsize\fP
+(a positive decimal integer) bytes. Fewer arguments shall be used
+if:
+.RS
+.IP " *" 3
+The total number of arguments exceeds that specified by the \fB-n\fP
+option.
+.LP
+.IP " *" 3
+The total number of lines exceeds that specified by the \fB-L\fP option.
+.LP
+.IP " *" 3
+End-of-file is encountered on standard input before \fIsize\fP bytes
+are accumulated.
+.LP
+.RE
+.LP
+Values of \fIsize\fP up to at least {LINE_MAX} bytes shall be supported,
+provided that the constraints specified in the
+DESCRIPTION are met. It shall not be considered an error if a value
+larger than that supported by the implementation or exceeding
+the constraints specified in the DESCRIPTION is given; \fIxargs\fP
+shall use the largest value it supports within the
+constraints.
+.TP 7
+\fB-t\fP
+Enable trace mode. Each generated command line shall be written to
+standard error just prior to invocation.
+.TP 7
+\fB-x\fP
+Terminate if a command line containing \fInumber\fP arguments (see
+the \fB-n\fP option above) or
+\fInumber\fP lines (see the \fB-L\fP option above) will not fit
+in the implied or specified size (see the \fB-s\fP option above).
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fIutility\fP
+The name of the utility to be invoked, found by search path using
+the \fIPATH\fP environment variable, described in the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 8, Environment
+Variables.
+If \fIutility\fP is omitted, the default shall be the \fIecho\fP utility.
+If the
+\fIutility\fP operand names any of the special built-in utilities
+in \fISpecial Built-In
+Utilities\fP, the results are undefined.
+.TP 7
+\fIargument\fP
+An initial option or operand for the invocation of \fIutility\fP.
+.sp
+.SH STDIN
+.LP
+The standard input shall be a text file. The results are unspecified
+if an end-of-file condition is detected immediately
+following an escaped <newline>.
+.SH INPUT FILES
+.LP
+The file \fB/dev/tty\fP shall be used to read responses required by
+the \fB-p\fP option.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIxargs\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_COLLATE\fP
+.sp
+Determine the locale for the behavior of ranges, equivalence classes,
+and multi-character collating elements used in the extended
+regular expression defined for the \fByesexpr\fP locale keyword in
+the \fILC_MESSAGES\fP category.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files) and
+the behavior of character classes used in the extended regular
+expression defined for the \fByesexpr\fP locale keyword in the \fILC_MESSAGES\fP
+category.
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale for the processing of affirmative responses and
+that should be used to affect the format and contents of
+diagnostic messages written to standard error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fIPATH\fP
+Determine the location of \fIutility\fP, as described in the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 8, Environment
+Variables.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+The standard error shall be used for diagnostic messages and the \fB-t\fP
+and \fB-p\fP options. If the \fB-t\fP option is
+specified, the \fIutility\fP and its constructed argument list shall
+be written to standard error, as it will be invoked, prior to
+invocation. If \fB-p\fP is specified, a prompt of the following format
+shall be written (in the POSIX locale):
+.sp
+.RS
+.nf
+
+\fB"?..."
+\fP
+.fi
+.RE
+.LP
+at the end of the line of the output from \fB-t\fP.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ \ \ \ 0
+All invocations of \fIutility\fP returned exit status zero.
+.TP 7
+1-125
+A command line meeting the specified requirements could not be assembled,
+one or more of the invocations of \fIutility\fP
+returned a non-zero exit status, or some other error occurred.
+.TP 7
+\ \ 126
+The utility specified by \fIutility\fP was found but could not be
+invoked.
+.TP 7
+\ \ 127
+The utility specified by \fIutility\fP could not be found.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+If a command line meeting the specified requirements cannot be assembled,
+the utility cannot be invoked, an invocation of the
+utility is terminated by a signal, or an invocation of the utility
+exits with exit status 255, the \fIxargs\fP utility shall write
+a diagnostic message and exit without processing any remaining input.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The 255 exit status allows a utility being used by \fIxargs\fP to
+tell \fIxargs\fP to terminate if it knows no further
+invocations using the current data stream will succeed. Thus, \fIutility\fP
+should explicitly \fIexit\fP with an appropriate value to avoid accidentally
+returning with 255.
+.LP
+Note that input is parsed as lines; <blank>s separate arguments. If
+\fIxargs\fP is used to bundle output of commands like
+\fIfind\fP \fIdir\fP \fB-print\fP or \fIls\fP into
+commands to be executed, unexpected results are likely if any filenames
+contain any <blank>s or <newline>s. This can be
+fixed by using \fIfind\fP to call a script that converts each file
+found into a quoted string
+that is then piped to \fIxargs\fP. Note that the quoting rules used
+by \fIxargs\fP are not the same as in the shell. They were
+not made consistent here because existing applications depend on the
+current rules and the shell syntax is not fully compatible
+with it. An easy rule that can be used to transform any string into
+a quoted form that \fIxargs\fP interprets correctly is to
+precede each character in the string with a backslash.
+.LP
+On implementations with a large value for {ARG_MAX}, \fIxargs\fP may
+produce command lines longer than {LINE_MAX}. For
+invocation of utilities, this is not a problem. If \fIxargs\fP is
+being used to create a text file, users should explicitly set
+the maximum command line length with the \fB-s\fP option.
+.LP
+The \fIcommand\fP, \fIenv\fP, \fInice\fP, \fInohup\fP, \fItime\fP,
+and \fIxargs\fP utilities have been specified to use exit code 127
+if an error occurs so
+that applications can distinguish "failure to find a utility" from
+"invoked utility exited with an error indication". The value
+127 was chosen because it is not commonly used for other meanings;
+most utilities use small values for "normal error conditions''
+and the values above 128 can be confused with termination due to receipt
+of a signal. The value 126 was chosen in a similar manner
+to indicate that the utility could be found, but not invoked. Some
+scripts produce meaningful error messages differentiating the
+126 and 127 cases. The distinction between exit codes 126 and 127
+is based on KornShell practice that uses 127 when all attempts to
+\fIexec\fP the utility fail with [ENOENT], and uses 126 when any attempt
+to \fIexec\fP the utility fails for any other
+reason.
+.SH EXAMPLES
+.IP " 1." 4
+The following command combines the output of the parenthesised commands
+onto one line, which is then written to the end-of-file
+\fBlog\fP:
+.sp
+.RS
+.nf
+
+\fB(logname; date; printf "%s\\n" "$0 $*") | xargs >>log
+\fP
+.fi
+.RE
+.LP
+.IP " 2." 4
+The following command invokes \fIdiff\fP with successive pairs of
+arguments originally
+typed as command line arguments (assuming there are no embedded <blank>s
+in the elements of the original argument list):
+.sp
+.RS
+.nf
+
+\fBprintf "%s\\n" "$*" | xargs -n 2 -x diff
+\fP
+.fi
+.RE
+.LP
+.IP " 3." 4
+In the following commands, the user is asked which files in the current
+directory are to be archived. The files are archived
+into \fBarch\fP; \fIa\fP, one at a time, or \fIb\fP, many at a time.
+.sp
+.RS
+.nf
+
+\fBa. ls | xargs -p -L 1 ar -r arch
+.sp
+
+b. ls | xargs -p -L 1 | xargs ar -r arch
+\fP
+.fi
+.RE
+.LP
+.IP " 4." 4
+The following executes with successive pairs of arguments originally
+typed as command line arguments:
+.sp
+.RS
+.nf
+
+\fBecho $* | xargs -n 2 diff
+\fP
+.fi
+.RE
+.LP
+.IP " 5." 4
+On XSI-conformant systems, the following moves all files from directory
+\fB$1\fP to directory \fB$2\fP, and echoes each move
+command just before doing it:
+.sp
+.RS
+.nf
+
+\fBls $1 | xargs -I {} -t mv $1/{} $2/{}
+\fP
+.fi
+.RE
+.LP
+.SH RATIONALE
+.LP
+The \fIxargs\fP utility was usually found only in System V-based systems;
+BSD systems included an \fIapply\fP utility that
+provided functionality similar to \fIxargs\fP \fB-n\fP \fInumber\fP.
+The SVID lists \fIxargs\fP as a software development
+extension. This volume of IEEE\ Std\ 1003.1-2001 does not share the
+view that it is used only for development, and
+therefore it is not optional.
+.LP
+The classic application of the \fIxargs\fP utility is in conjunction
+with the \fIfind\fP
+utility to reduce the number of processes launched by a simplistic
+use of the \fIfind\fP
+\fB-exec\fP combination. The \fIxargs\fP utility is also used to enforce
+an upper limit on memory required to launch a process.
+With this basis in mind, this volume of IEEE\ Std\ 1003.1-2001 selected
+only the minimal features required.
+.LP
+Although the 255 exit status is mostly an accident of historical implementations,
+it allows a utility being used by \fIxargs\fP
+to tell \fIxargs\fP to terminate if it knows no further invocations
+using the current data stream shall succeed. Any non-zero exit
+status from a utility falls into the 1-125 range when \fIxargs\fP
+exits. There is no statement of how the various non-zero utility
+exit status codes are accumulated by \fIxargs\fP. The value could
+be the addition of all codes, their highest value, the last one
+received, or a single value such as 1. Since no algorithm is arguably
+better than the others, and since many of the standard
+utilities say little more (portably) than "pass/fail", no new algorithm
+was invented.
+.LP
+Several other \fIxargs\fP options were withdrawn because simple alternatives
+already exist within this volume of
+IEEE\ Std\ 1003.1-2001. For example, the \fB-i\fP \fIreplstr\fP option
+can be just as efficiently performed using a shell
+\fBfor\fP loop. Since \fIxargs\fP calls an \fIexec\fP function with
+each input line, the \fB-i\fP option does not usually
+exploit the grouping capabilities of \fIxargs\fP.
+.LP
+The requirement that \fIxargs\fP never produces command lines such
+that invocation of \fIutility\fP is within 2048 bytes of
+hitting the POSIX \fIexec\fP {ARG_MAX} limitations is intended to
+guarantee that the invoked utility has room to modify its
+environment variables and command line arguments and still be able
+to invoke another utility. Note that the minimum {ARG_MAX}
+allowed by the System Interfaces volume of IEEE\ Std\ 1003.1-2001
+is 4096 bytes and the minimum value allowed by this
+volume of IEEE\ Std\ 1003.1-2001 is 2048 bytes; therefore, the 2048
+bytes difference seems reasonable. Note, however, that
+\fIxargs\fP may never be able to invoke a utility if the environment
+passed in to \fIxargs\fP comes close to using {ARG_MAX}
+bytes.
+.LP
+The version of \fIxargs\fP required by this volume of IEEE\ Std\ 1003.1-2001
+is required to wait for the completion of
+the invoked command before invoking another command. This was done
+because historical scripts using \fIxargs\fP assumed sequential
+execution. Implementations wanting to provide parallel operation of
+the invoked utilities are encouraged to add an option enabling
+parallel invocation, but should still wait for termination of all
+of the children before \fIxargs\fP terminates normally.
+.LP
+The \fB-e\fP option was omitted from the ISO\ POSIX-2:1993 standard
+in the belief that the \fIeofstr\fP option-argument
+was recognized only when it was on a line by itself and before quote
+and escape processing were performed, and that the logical
+end-of-file processing was only enabled if a \fB-e\fP option was specified.
+In that case, a simple \fIsed\fP script could be used to duplicate
+the \fB-e\fP functionality. Further investigation
+revealed that:
+.IP " *" 3
+The logical end-of-file string was checked for after quote and escape
+processing, making a \fIsed\fP script that provided equivalent functionality
+much more difficult to write.
+.LP
+.IP " *" 3
+The default was to perform logical end-of-file processing with an
+underscore as the logical end-of-file string.
+.LP
+.LP
+To correct this misunderstanding, the \fB-E\fP \fIeofstr\fP option
+was adopted from the X/Open Portability Guide. Users should
+note that the description of the \fB-E\fP option matches historical
+documentation of the \fB-e\fP option (which was not adopted
+because it did not support the Utility Syntax Guidelines), by saying
+that if \fIeofstr\fP is the null string, logical end-of-file
+processing is disabled. Historical implementations of \fIxargs\fP
+actually did not disable logical end-of-file processing; they
+treated a null argument found in the input as a logical end-of-file
+string. (A null \fIstring\fP argument could be generated using
+single or double quotes ( \fB''\fP or \fB""\fP ). Since this behavior
+was not documented historically, it is considered to be
+a bug.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIShell Command Language\fP, \fIecho\fP, \fIfind\fP, the System
+Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIexec\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/yacc.1p b/man-pages-posix-2003/man1p/yacc.1p
new file mode 100644
index 0000000..bfda7ac
--- /dev/null
+++ b/man-pages-posix-2003/man1p/yacc.1p
@@ -0,0 +1,1290 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "YACC" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" yacc
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+yacc \- yet another compiler compiler (\fBDEVELOPMENT\fP)
+.SH SYNOPSIS
+.LP
+\fByacc\fP \fB[\fP\fB-dltv\fP\fB][\fP\fB-b\fP \fIfile_prefix\fP\fB][\fP\fB-p\fP
+\fIsym_prefix\fP\fB]\fP \fIgrammar\fP\fB\fP
+.SH DESCRIPTION
+.LP
+The \fIyacc\fP utility shall read a description of a context-free
+grammar in \fIgrammar\fP and write C source code, conforming
+to the ISO\ C standard, to a code file, and optionally header information
+into a header file, in the current directory. The C
+code shall define a function and related routines and macros for an
+automaton that executes a parsing algorithm meeting the
+requirements in Algorithms .
+.LP
+The form and meaning of the grammar are described in the EXTENDED
+DESCRIPTION section.
+.LP
+The C source code and header file shall be produced in a form suitable
+as input for the C compiler (see \fIc99\fP ).
+.SH OPTIONS
+.LP
+The \fIyacc\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported:
+.TP 7
+\fB-b\ \fP \fIfile_prefix\fP
+Use \fIfile_prefix\fP instead of \fBy\fP as the prefix for all output
+filenames. The code file \fBy.tab.c\fP, the header
+file \fBy.tab.h\fP (created when \fB-d\fP is specified), and the description
+file \fBy.output\fP (created when \fB-v\fP is
+specified), shall be changed to \fIfile_prefix\fP \fB.tab.c\fP, \fIfile_prefix\fP
+\fB\&.tab.h\fP, and \fIfile_prefix\fP
+\fB\&.output\fP, respectively.
+.TP 7
+\fB-d\fP
+Write the header file; by default only the code file is written. The
+\fB#define\fP statements associate the token codes
+assigned by \fIyacc\fP with the user-declared token names. This allows
+source files other than \fBy.tab.c\fP to access the token
+codes.
+.TP 7
+\fB-l\fP
+Produce a code file that does not contain any \fB#line\fP constructs.
+If this option is not present, it is unspecified whether
+the code file or header file contains \fB#line\fP directives. This
+should only be used after the grammar and the associated
+actions are fully debugged.
+.TP 7
+\fB-p\ \fP \fIsym_prefix\fP
+.sp
+Use \fIsym_prefix\fP instead of \fByy\fP as the prefix for all external
+names produced by \fIyacc\fP. The names affected shall
+include the functions \fIyyparse\fP(), \fIyylex\fP(), and \fIyyerror\fP(),
+and the variables \fIyylval\fP, \fIyychar\fP, and
+\fIyydebug\fP. (In the remainder of this section, the six symbols
+cited are referenced using their default names only as a
+notational convenience.) Local names may also be affected by the \fB-p\fP
+option; however, the \fB-p\fP option shall not affect
+\fB#define\fP symbols generated by \fIyacc\fP.
+.TP 7
+\fB-t\fP
+Modify conditional compilation directives to permit compilation of
+debugging code in the code file. Runtime debugging
+statements shall always be contained in the code file, but by default
+conditional compilation directives prevent their
+compilation.
+.TP 7
+\fB-v\fP
+Write a file containing a description of the parser and a report of
+conflicts generated by ambiguities in the grammar.
+.sp
+.SH OPERANDS
+.LP
+The following operand is required:
+.TP 7
+\fIgrammar\fP
+A pathname of a file containing instructions, hereafter called \fIgrammar\fP,
+for which a parser is to be created. The format
+for the grammar is described in the EXTENDED DESCRIPTION section.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+The file \fIgrammar\fP shall be a text file formatted as specified
+in the EXTENDED DESCRIPTION section.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIyacc\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments and input files).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.LP
+The \fILANG\fP and \fILC_*\fP variables affect the execution of the
+\fIyacc\fP utility as stated. The \fImain\fP() function
+defined in Yacc Library shall call:
+.sp
+.RS
+.nf
+
+\fBsetlocale(LC_ALL, "")
+\fP
+.fi
+.RE
+.LP
+and thus the program generated by \fIyacc\fP shall also be affected
+by the contents of these variables at runtime.
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+Not used.
+.SH STDERR
+.LP
+If shift/reduce or reduce/reduce conflicts are detected in \fIgrammar\fP,
+\fIyacc\fP shall write a report of those conflicts
+to the standard error in an unspecified format.
+.LP
+Standard error shall also be used for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+The code file, the header file, and the description file shall be
+text files. All are described in the following sections.
+.SS Code File
+.LP
+This file shall contain the C source code for the \fIyyparse\fP()
+function. It shall contain code for the various semantic
+actions with macro substitution performed on them as described in
+the EXTENDED DESCRIPTION section. It also shall contain a copy of
+the \fB#define\fP statements in the header file. If a \fB%union\fP
+declaration is used, the declaration for YYSTYPE shall also be
+included in this file.
+.SS Header File
+.LP
+The header file shall contain \fB#define\fP statements that associate
+the token numbers with the token names. This allows
+source files other than the code file to access the token codes. If
+a \fB%union\fP declaration is used, the declaration for
+YYSTYPE and an \fIextern YYSTYPE yylval\fP declaration shall also
+be included in this file.
+.SS Description File
+.LP
+The description file shall be a text file containing a description
+of the state machine corresponding to the parser, using an
+unspecified format. Limits for internal tables (see Limits ) shall
+also be reported, in an
+implementation-defined manner. (Some implementations may use dynamic
+allocation techniques and have no specific limit values to
+report.)
+.SH EXTENDED DESCRIPTION
+.LP
+The \fIyacc\fP command accepts a language that is used to define a
+grammar for a target language to be parsed by the tables and
+code generated by \fIyacc\fP. The language accepted by \fIyacc\fP
+as a grammar for the target language is described below using
+the \fIyacc\fP input language itself.
+.LP
+The input \fIgrammar\fP includes rules describing the input structure
+of the target language and code to be invoked when these
+rules are recognized to provide the associated semantic action. The
+code to be executed shall appear as bodies of text that are
+intended to be C-language code. The C-language inclusions are presumed
+to form a correct function when processed by \fIyacc\fP
+into its output files. The code included in this way shall be executed
+during the recognition of the target language.
+.LP
+Given a grammar, the \fIyacc\fP utility generates the files described
+in the OUTPUT FILES section. The code file can be
+compiled and linked using \fIc99\fP. If the declaration and programs
+sections of the grammar
+file did not include definitions of \fImain\fP(), \fIyylex\fP(), and
+\fIyyerror\fP(), the compiled output requires linking with
+externally supplied versions of those functions. Default versions
+of \fImain\fP() and \fIyyerror\fP() are supplied in the
+\fIyacc\fP library and can be linked in by using the \fB-l\ y\fP operand
+to \fIc99\fP.
+The \fIyacc\fP library interfaces need not support interfaces with
+other than the default \fByy\fP symbol prefix. The application
+provides the lexical analyzer function, \fIyylex\fP(); the \fIlex\fP
+utility is specifically
+designed to generate such a routine.
+.SS Input Language
+.LP
+The application shall ensure that every specification file consists
+of three sections in order: \fIdeclarations\fP, \fIgrammar
+rules\fP, and \fIprograms\fP, separated by double percent signs (
+\fB"%%"\fP ). The declarations and programs sections can be
+empty. If the latter is empty, the preceding \fB"%%"\fP mark separating
+it from the rules section can be omitted.
+.LP
+The input is free form text following the structure of the grammar
+defined below.
+.SS Lexical Structure of the Grammar
+.LP
+The <blank>s, <newline>s, and <form-feed>s shall be ignored, except
+that the application shall ensure that
+they do not appear in names or multi-character reserved symbols. Comments
+shall be enclosed in \fB"/*\ ...\ */"\fP, and
+can appear wherever a name is valid.
+.LP
+Names are of arbitrary length, made up of letters, periods ( \fB'.'\fP
+), underscores ( \fB'_'\fP ), and non-initial
+digits. Uppercase and lowercase letters are distinct. Conforming applications
+shall not use names beginning in \fByy\fP or
+\fBYY\fP since the \fIyacc\fP parser uses such names. Many of the
+names appear in the final output of \fIyacc\fP, and thus they
+should be chosen to conform with any additional rules created by the
+C compiler to be used. In particular they appear in
+\fB#define\fP statements.
+.LP
+A literal shall consist of a single character enclosed in single-quotes
+( \fB'"\fP ). All of the escape sequences supported
+for character constants by the ISO\ C standard shall be supported
+by \fIyacc\fP.
+.LP
+The relationship with the lexical analyzer is discussed in detail
+below.
+.LP
+The application shall ensure that the NUL character is not used in
+grammar rules or literals.
+.SS Declarations Section
+.LP
+The declarations section is used to define the symbols used to define
+the target language and their relationship with each
+other. In particular, much of the additional information required
+to resolve ambiguities in the context-free grammar for the target
+language is provided here.
+.LP
+Usually \fIyacc\fP assigns the relationship between the symbolic names
+it generates and their underlying numeric value. The
+declarations section makes it possible to control the assignment of
+these values.
+.LP
+It is also possible to keep semantic information associated with the
+tokens currently on the parse stack in a user-defined
+C-language \fBunion\fP, if the members of the union are associated
+with the various names in the grammar. The declarations section
+provides for this as well.
+.LP
+The first group of declarators below all take a list of names as arguments.
+That list can optionally be preceded by the name of
+a C union member (called a \fItag\fP below) appearing within \fB'<'\fP
+and \fB'>'\fP . (As an exception to the
+typographical conventions of the rest of this volume of IEEE\ Std\ 1003.1-2001,
+in this case <\fItag\fP> does not
+represent a metavariable, but the literal angle bracket characters
+surrounding a symbol.) The use of \fItag\fP specifies that the
+tokens named on this line shall be of the same C type as the union
+member referenced by \fItag\fP. This is discussed in more
+detail below.
+.LP
+For lists used to define tokens, the first appearance of a given token
+can be followed by a positive integer (as a string of
+decimal digits). If this is done, the underlying value assigned to
+it for lexical purposes shall be taken to be that number.
+.LP
+The following declares \fIname\fP to be a token:
+.sp
+.RS
+.nf
+
+\fB%token\fP \fB[\fP\fB<\fP\fItag\fP\fB>\fP\fB]\fP \fIname\fP \fB[\fP\fInumber\fP\fB][\fP\fIname\fP \fB[\fP\fInumber\fP\fB]]\fP\fB...
+\fP
+.fi
+.RE
+.LP
+If \fItag\fP is present, the C type for all tokens on this line shall
+be declared to be the type referenced by \fItag\fP. If a
+positive integer, \fInumber\fP, follows a \fIname\fP, that value shall
+be assigned to the token.
+.LP
+The following declares \fIname\fP to be a token, and assigns precedence
+to it:
+.sp
+.RS
+.nf
+
+\fB%left\fP \fB[\fP\fB<\fP\fItag\fP\fB>\fP\fB]\fP \fIname\fP \fB[\fP\fInumber\fP\fB][\fP\fIname\fP \fB[\fP\fInumber\fP\fB]]\fP\fB...
+%right\fP \fB[\fP\fB<\fP\fItag\fP\fB>\fP\fB]\fP \fIname\fP \fB[\fP\fInumber\fP\fB][\fP\fIname\fP \fB[\fP\fInumber\fP\fB]]\fP\fB...
+\fP
+.fi
+.RE
+.LP
+One or more lines, each beginning with one of these symbols, can appear
+in this section. All tokens on the same line have the
+same precedence level and associativity; the lines are in order of
+increasing precedence or binding strength. \fB%left\fP denotes
+that the operators on that line are left associative, and \fB%right\fP
+similarly denotes right associative operators. If
+\fItag\fP is present, it shall declare a C type for \fIname\fPs as
+described for \fB%token\fP.
+.LP
+The following declares \fIname\fP to be a token, and indicates that
+this cannot be used associatively:
+.sp
+.RS
+.nf
+
+\fB%nonassoc\fP \fB[\fP\fB<\fP\fItag\fP\fB>\fP\fB]\fP \fIname\fP \fB[\fP\fInumber\fP\fB][\fP\fIname\fP \fB[\fP\fInumber\fP\fB]]\fP\fB...
+\fP
+.fi
+.RE
+.LP
+If the parser encounters associative use of this token it reports
+an error. If \fItag\fP is present, it shall declare a C type
+for \fIname\fPs as described for \fB%token\fP.
+.LP
+The following declares that union member \fIname\fPs are non-terminals,
+and thus it is required to have a \fItag\fP field at
+its beginning:
+.sp
+.RS
+.nf
+
+\fB%type <\fP\fItag\fP\fB>\fP \fIname\fP\fB...
+\fP
+.fi
+.RE
+.LP
+Because it deals with non-terminals only, assigning a token number
+or using a literal is also prohibited. If this construct is
+present, \fIyacc\fP shall perform type checking; if this construct
+is not present, the parse stack shall hold only the \fBint\fP
+type.
+.LP
+Every name used in \fIgrammar\fP not defined by a \fB%token\fP, \fB%left\fP,
+\fB%right\fP, or \fB%nonassoc\fP declaration
+is assumed to represent a non-terminal symbol. The \fIyacc\fP utility
+shall report an error for any non-terminal symbol that does
+not appear on the left side of at least one grammar rule.
+.LP
+Once the type, precedence, or token number of a name is specified,
+it shall not be changed. If the first declaration of a token
+does not assign a token number, \fIyacc\fP shall assign a token number.
+Once this assignment is made, the token number shall not
+be changed by explicit assignment.
+.LP
+The following declarators do not follow the previous pattern.
+.LP
+The following declares the non-terminal \fIname\fP to be the \fIstart
+symbol\fP, which represents the largest, most general
+structure described by the grammar rules:
+.sp
+.RS
+.nf
+
+\fB%start\fP \fIname\fP
+.fi
+.RE
+.LP
+By default, it is the left-hand side of the first grammar rule; this
+default can be overridden with this declaration.
+.LP
+The following declares the \fIyacc\fP value stack to be a union of
+the various types of values desired:
+.sp
+.RS
+.nf
+
+\fB%union {\fP \fIbody of union\fP \fB(\fP\fIin C\fP\fB) }
+\fP
+.fi
+.RE
+.LP
+By default, the values returned by actions (see below) and the lexical
+analyzer shall be of type \fBint\fP. The \fIyacc\fP
+utility keeps track of types, and it shall insert corresponding union
+member names in order to perform strict type checking of the
+resulting parser.
+.LP
+Alternatively, given that at least one <\fItag\fP> construct is used,
+the union can be declared in a header file (which
+shall be included in the declarations section by using a \fB#include\fP
+construct within \fB%{\fP and \fB%}\fP), and a
+\fBtypedef\fP used to define the symbol YYSTYPE to represent this
+union. The effect of \fB%union\fP is to provide the declaration
+of YYSTYPE directly from the \fIyacc\fP input.
+.LP
+C-language declarations and definitions can appear in the declarations
+section, enclosed by the following marks:
+.sp
+.RS
+.nf
+
+\fB%{ ... %}
+\fP
+.fi
+.RE
+.LP
+These statements shall be copied into the code file, and have global
+scope within it so that they can be used in the rules and
+program sections.
+.LP
+The application shall ensure that the declarations section is terminated
+by the token \fB%%\fP.
+.SS Grammar Rules in yacc
+.LP
+The rules section defines the context-free grammar to be accepted
+by the function \fIyacc\fP generates, and associates with
+those rules C-language actions and additional precedence information.
+The grammar is described below, and a formal definition
+follows.
+.LP
+The rules section is comprised of one or more grammar rules. A grammar
+rule has the form:
+.sp
+.RS
+.nf
+
+\fBA : BODY ;
+\fP
+.fi
+.RE
+.LP
+The symbol \fBA\fP represents a non-terminal name, and \fBBODY\fP
+represents a sequence of zero or more \fIname\fPs,
+\fIliteral\fPs, and \fIsemantic action\fPs that can then be followed
+by optional \fIprecedence rule\fPs. Only the names and
+literals participate in the formation of the grammar; the semantic
+actions and precedence rules are used in other ways. The colon
+and the semicolon are \fIyacc\fP punctuation. If there are several
+successive grammar rules with the same left-hand side, the
+vertical bar \fB'|'\fP can be used to avoid rewriting the left-hand
+side; in this case the semicolon appears only after the last
+rule. The BODY part can be empty (or empty of names and literals)
+to indicate that the non-terminal symbol matches the empty
+string.
+.LP
+The \fIyacc\fP utility assigns a unique number to each rule. Rules
+using the vertical bar notation are distinct rules. The
+number assigned to the rule appears in the description file.
+.LP
+The elements comprising a BODY are:
+.TP 7
+\fIname\fP,\ \fIliteral\fP
+These form the rules of the grammar: \fIname\fP is either a \fItoken\fP
+or a \fInon-terminal\fP; \fIliteral\fP stands for
+itself (less the lexically required quotation marks).
+.TP 7
+\fIsemantic action\fP
+.sp
+With each grammar rule, the user can associate actions to be performed
+each time the rule is recognized in the input process. (Note
+that the word "action" can also refer to the actions of the parser-shift,
+reduce, and so on.)
+.LP
+These actions can return values and can obtain the values returned
+by previous actions. These values are kept in objects of type
+YYSTYPE (see \fB%union\fP). The result value of the action shall be
+kept on the parse stack with the left-hand side of the rule,
+to be accessed by other reductions as part of their right-hand side.
+By using the <\fItag\fP> information provided in the
+declarations section, the code generated by \fIyacc\fP can be strictly
+type checked and contain arbitrary information. In
+addition, the lexical analyzer can provide the same kinds of values
+for tokens, if desired.
+.LP
+An action is an arbitrary C statement and as such can do input or
+output, call subprograms, and alter external variables. An
+action is one or more C statements enclosed in curly braces \fB'{'\fP
+and \fB'}'\fP .
+.LP
+Certain pseudo-variables can be used in the action. These are macros
+for access to data structures known internally to
+\fIyacc\fP.
+.TP 7
+$$
+.RS
+The value of the action can be set by assigning it to $$. If type
+checking is enabled and the type of the value to be assigned
+cannot be determined, a diagnostic message may be generated.
+.RE
+.TP 7
+$\fInumber\fP
+.RS
+This refers to the value returned by the component specified by the
+token \fInumber\fP in the right side of a rule, reading
+from left to right; \fInumber\fP can be zero or negative. If \fInumber\fP
+is zero or negative, it refers to the data associated
+with the name on the parser's stack preceding the leftmost symbol
+of the current rule. (That is, \fB"$0"\fP refers to the name
+immediately preceding the leftmost name in the current rule to be
+found on the parser's stack and \fB"$-1"\fP refers to the
+symbol to \fIits\fP left.) If \fInumber\fP refers to an element past
+the current point in the rule, or beyond the bottom of the
+stack, the result is undefined. If type checking is enabled and the
+type of the value to be assigned cannot be determined, a
+diagnostic message may be generated.
+.RE
+.TP 7
+$<\fItag\fP>\fInumber\fP
+.RS
+.sp
+These correspond exactly to the corresponding symbols without the
+\fItag\fP inclusion, but allow for strict type checking (and
+preclude unwanted type conversions). The effect is that the macro
+is expanded to use \fItag\fP to select an element from the
+YYSTYPE union (using \fIdataname.tag\fP). This is particularly useful
+if \fInumber\fP is not positive.
+.RE
+.TP 7
+$<\fItag\fP>$
+.RS
+This imposes on the reference the type of the union member referenced
+by \fItag\fP. This construction is applicable when a
+reference to a left context value occurs in the grammar, and provides
+\fIyacc\fP with a means for selecting a type.
+.RE
+.sp
+.LP
+Actions can occur anywhere in a rule (not just at the end); an action
+can access values returned by actions to its left, and in
+turn the value it returns can be accessed by actions to its right.
+An action appearing in the middle of a rule shall be equivalent
+to replacing the action with a new non-terminal symbol and adding
+an empty rule with that non-terminal symbol on the left-hand
+side. The semantic action associated with the new rule shall be equivalent
+to the original action. The use of actions within rules
+might introduce conflicts that would not otherwise exist.
+.LP
+By default, the value of a rule shall be the value of the first element
+in it. If the first element does not have a type
+(particularly in the case of a literal) and type checking is turned
+on by \fB%type\fP, an error message shall result.
+.TP 7
+\fIprecedence\fP
+The keyword \fB%prec\fP can be used to change the precedence level
+associated with a particular grammar rule. Examples of this
+are in cases where a unary and binary operator have the same symbolic
+representation, but need to be given different precedences,
+or where the handling of an ambiguous if-else construction is necessary.
+The reserved symbol \fB%prec\fP can appear immediately
+after the body of the grammar rule and can be followed by a token
+name or a literal. It shall cause the precedence of the grammar
+rule to become that of the following token name or literal. The action
+for the rule as a whole can follow \fB%prec\fP.
+.sp
+.LP
+If a program section follows, the application shall ensure that the
+grammar rules are terminated by \fB%%\fP.
+.SS Programs Section
+.LP
+The \fIprograms\fP section can include the definition of the lexical
+analyzer \fIyylex\fP(), and any other functions; for
+example, those used in the actions specified in the grammar rules.
+It is unspecified whether the programs section precedes or
+follows the semantic actions in the output file; therefore, if the
+application contains any macro definitions and declarations
+intended to apply to the code in the semantic actions, it shall place
+them within \fB"%{\ ...\ %}"\fP in the
+declarations section.
+.SS Input Grammar
+.LP
+The following input to \fIyacc\fP yields a parser for the input to
+\fIyacc\fP. This formal syntax takes precedence over the
+preceding text syntax description.
+.LP
+The lexical structure is defined less precisely; Lexical Structure
+of the Grammar defines most
+terms. The correspondence between the previous terms and the tokens
+below is as follows.
+.TP 7
+\fBIDENTIFIER\fP
+This corresponds to the concept of \fIname\fP, given previously. It
+also includes literals as defined previously.
+.TP 7
+\fBC_IDENTIFIER\fP
+This is a name, and additionally it is known to be followed by a colon.
+A literal cannot yield this token.
+.TP 7
+\fBNUMBER\fP
+A string of digits (a non-negative decimal integer).
+.TP 7
+\fBTYPE\fP,\ \fBLEFT\fP,\ \fBMARK\fP,\ \fBLCURL\fP,\ \fBRCURL\fP
+.sp
+These correspond directly to \fB%type\fP, \fB%left\fP, \fB%%\fP, \fB%{\fP,
+and \fB%}\fP.
+.TP 7
+\fB{\ ...\ }\fP
+This indicates C-language source code, with the possible inclusion
+of \fB'$'\fP macros as discussed previously.
+.sp
+.sp
+.RS
+.nf
+
+\fB/* Grammar for the input to yacc. */
+/* Basic entries. */
+/* The following are recognized by the lexical analyzer. */
+.sp
+
+%token IDENTIFIER /* Includes identifiers and literals */
+%token C_IDENTIFIER /* identifier (but not literal)
+ followed by a :. */
+%token NUMBER /* [0-9][0-9]* */
+.sp
+
+/* Reserved words : %type=>TYPE %left=>LEFT, and so on */
+.sp
+
+%token LEFT RIGHT NONASSOC TOKEN PREC TYPE START UNION
+.sp
+
+%token MARK /* The %% mark. */
+%token LCURL /* The %{ mark. */
+%token RCURL /* The %} mark. */
+.sp
+
+/* 8-bit character literals stand for themselves; */
+/* tokens have to be defined for multi-byte characters. */
+.sp
+
+%start spec
+.sp
+
+%%
+.sp
+
+spec : defs MARK rules tail
+ ;
+tail : MARK
+ {
+ /* In this action, set up the rest of the file. */
+ }
+ | /* Empty; the second MARK is optional. */
+ ;
+defs : /* Empty. */
+ | defs def
+ ;
+def : START IDENTIFIER
+ | UNION
+ {
+ /* Copy union definition to output. */
+ }
+ | LCURL
+ {
+ /* Copy C code to output file. */
+ }
+ RCURL
+ | rword tag nlist
+ ;
+rword : TOKEN
+ | LEFT
+ | RIGHT
+ | NONASSOC
+ | TYPE
+ ;
+tag : /* Empty: union tag ID optional. */
+ | '<' IDENTIFIER '>'
+ ;
+nlist : nmno
+ | nlist nmno
+ ;
+nmno : IDENTIFIER /* Note: literal invalid with % type. */
+ | IDENTIFIER NUMBER /* Note: invalid with % type. */
+ ;
+.sp
+
+/* Rule section */
+.sp
+
+rules : C_IDENTIFIER rbody prec
+ | rules rule
+ ;
+rule : C_IDENTIFIER rbody prec
+ | '|' rbody prec
+ ;
+rbody : /* empty */
+ | rbody IDENTIFIER
+ | rbody act
+ ;
+act : '{'
+ {
+ /* Copy action, translate $$, and so on. */
+ }
+ '}'
+ ;
+prec : /* Empty */
+ | PREC IDENTIFIER
+ | PREC IDENTIFIER act
+ | prec ';'
+ ;
+\fP
+.fi
+.RE
+.SS Conflicts
+.LP
+The parser produced for an input grammar may contain states in which
+conflicts occur. The conflicts occur because the grammar is
+not LALR(1). An ambiguous grammar always contains at least one LALR(1)
+conflict. The \fIyacc\fP utility shall resolve all
+conflicts, using either default rules or user-specified precedence
+rules.
+.LP
+Conflicts are either shift/reduce conflicts or reduce/reduce conflicts.
+A shift/reduce conflict is where, for a given state and
+lookahead symbol, both a shift action and a reduce action are possible.
+A reduce/reduce conflict is where, for a given state and
+lookahead symbol, reductions by two different rules are possible.
+.LP
+The rules below describe how to specify what actions to take when
+a conflict occurs. Not all shift/reduce conflicts can be
+successfully resolved this way because the conflict may be due to
+something other than ambiguity, so incautious use of these
+facilities can cause the language accepted by the parser to be much
+different from that which was intended. The description file
+shall contain sufficient information to understand the cause of the
+conflict. Where ambiguity is the reason either the default or
+explicit rules should be adequate to produce a working parser.
+.LP
+The declared precedences and associativities (see Declarations Section
+) are used to resolve
+parsing conflicts as follows:
+.IP " 1." 4
+A precedence and associativity is associated with each grammar rule;
+it is the precedence and associativity of the last token or
+literal in the body of the rule. If the \fB%prec\fP keyword is used,
+it overrides this default. Some grammar rules might not have
+both precedence and associativity.
+.LP
+.IP " 2." 4
+If there is a shift/reduce conflict, and both the grammar rule and
+the input symbol have precedence and associativity associated
+with them, then the conflict is resolved in favor of the action (shift
+or reduce) associated with the higher precedence. If the
+precedences are the same, then the associativity is used; left associative
+implies reduce, right associative implies shift, and
+non-associative implies an error in the string being parsed.
+.LP
+.IP " 3." 4
+When there is a shift/reduce conflict that cannot be resolved by rule
+2, the shift is done. Conflicts resolved this way are
+counted in the diagnostic output described in Error Handling .
+.LP
+.IP " 4." 4
+When there is a reduce/reduce conflict, a reduction is done by the
+grammar rule that occurs earlier in the input sequence.
+Conflicts resolved this way are counted in the diagnostic output described
+in Error Handling .
+.LP
+.LP
+Conflicts resolved by precedence or associativity shall not be counted
+in the shift/reduce and reduce/reduce conflicts reported
+by \fIyacc\fP on either standard error or in the description file.
+.SS Error Handling
+.LP
+The token \fBerror\fP shall be reserved for error handling. The name
+\fBerror\fP can be used in grammar rules. It indicates
+places where the parser can recover from a syntax error. The default
+value of \fBerror\fP shall be 256. Its value can be changed
+using a \fB%token\fP declaration. The lexical analyzer should not
+return the value of \fBerror\fP.
+.LP
+The parser shall detect a syntax error when it is in a state where
+the action associated with the lookahead symbol is
+\fBerror\fP. A semantic action can cause the parser to initiate error
+handling by executing the macro YYERROR. When YYERROR is
+executed, the semantic action passes control back to the parser. YYERROR
+cannot be used outside of semantic actions.
+.LP
+When the parser detects a syntax error, it normally calls \fIyyerror\fP()
+with the character string
+\fB"syntax\ error"\fP as its argument. The call shall not be made
+if the parser is still recovering from a previous error
+when the error is detected. The parser is considered to be recovering
+from a previous error until the parser has shifted over at
+least three normal input symbols since the last error was detected
+or a semantic action has executed the macro \fIyyerrok\fP. The
+parser shall not call \fIyyerror\fP() when YYERROR is executed.
+.LP
+The macro function YYRECOVERING shall return 1 if a syntax error has
+been detected and the parser has not yet fully recovered
+from it. Otherwise, zero shall be returned.
+.LP
+When a syntax error is detected by the parser, the parser shall check
+if a previous syntax error has been detected. If a
+previous error was detected, and if no normal input symbols have been
+shifted since the preceding error was detected, the parser
+checks if the lookahead symbol is an endmarker (see Interface to the
+Lexical Analyzer ). If it is,
+the parser shall return with a non-zero value. Otherwise, the lookahead
+symbol shall be discarded and normal parsing shall
+resume.
+.LP
+When YYERROR is executed or when the parser detects a syntax error
+and no previous error has been detected, or at least one
+normal input symbol has been shifted since the previous error was
+detected, the parser shall pop back one state at a time until the
+parse stack is empty or the current state allows a shift over \fBerror\fP.
+If the parser empties the parse stack, it shall return
+with a non-zero value. Otherwise, it shall shift over \fBerror\fP
+and then resume normal parsing. If the parser reads a lookahead
+symbol before the error was detected, that symbol shall still be the
+lookahead symbol when parsing is resumed.
+.LP
+The macro \fIyyerrok\fP in a semantic action shall cause the parser
+to act as if it has fully recovered from any previous
+errors. The macro \fIyyclearin\fP shall cause the parser to discard
+the current lookahead token. If the current lookahead token
+has not yet been read, \fIyyclearin\fP shall have no effect.
+.LP
+The macro YYACCEPT shall cause the parser to return with the value
+zero. The macro YYABORT shall cause the parser to return with
+a non-zero value.
+.SS Interface to the Lexical Analyzer
+.LP
+The \fIyylex\fP() function is an integer-valued function that returns
+a \fItoken number\fP representing the kind of token
+read. If there is a value associated with the token returned by \fIyylex\fP()
+(see the discussion of \fItag\fP above), it shall
+be assigned to the external variable \fIyylval\fP.
+.LP
+If the parser and \fIyylex\fP() do not agree on these token numbers,
+reliable communication between them cannot occur. For
+(single-byte character) literals, the token is simply the numeric
+value of the character in the current character set. The numbers
+for other tokens can either be chosen by \fIyacc\fP, or chosen by
+the user. In either case, the \fB#define\fP construct of C is
+used to allow \fIyylex\fP() to return these numbers symbolically.
+The \fB#define\fP statements are put into the code file, and
+the header file if that file is requested. The set of characters permitted
+by \fIyacc\fP in an identifier is larger than that
+permitted by C. Token names found to contain such characters shall
+not be included in the \fB#define\fP declarations.
+.LP
+If the token numbers are chosen by \fIyacc\fP, the tokens other than
+literals shall be assigned numbers greater than 256,
+although no order is implied. A token can be explicitly assigned a
+number by following its first appearance in the declarations
+section with a number. Names and literals not defined this way retain
+their default definition. All token numbers assigned by
+\fIyacc\fP shall be unique and distinct from the token numbers used
+for literals and user-assigned tokens. If duplicate token
+numbers cause conflicts in parser generation, \fIyacc\fP shall report
+an error; otherwise, it is unspecified whether the token
+assignment is accepted or an error is reported.
+.LP
+The end of the input is marked by a special token called the \fIendmarker\fP,
+which has a token number that is zero or
+negative. (These values are invalid for any other token.) All lexical
+analyzers shall return zero or negative as a token number
+upon reaching the end of their input. If the tokens up to, but excluding,
+the endmarker form a structure that matches the start
+symbol, the parser shall accept the input. If the endmarker is seen
+in any other context, it shall be considered an error.
+.SS Completing the Program
+.LP
+In addition to \fIyyparse\fP() and \fIyylex\fP(), the functions \fIyyerror\fP()
+and \fImain\fP() are required to make a
+complete program. The application can supply \fImain\fP() and \fIyyerror\fP(),
+or those routines can be obtained from the
+\fIyacc\fP library.
+.SS Yacc Library
+.LP
+The following functions shall appear only in the \fIyacc\fP library
+accessible through the \fB-l\ y\fP operand to \fIc99\fP; they can
+therefore be redefined by a conforming application:
+.TP 7
+\fBint\ \fP \fImain\fP(\fBvoid\fP)
+.sp
+This function shall call \fIyyparse\fP() and exit with an unspecified
+value. Other actions within this function are
+unspecified.
+.TP 7
+\fBint\ \fP \fIyyerror\fP(\fBconst\ char\fP\ *\fIs\fP)
+.sp
+This function shall write the NUL-terminated argument to standard
+error, followed by a <newline>.
+.sp
+.LP
+The order of the \fB-l\ y\fP and \fB-l\ l\fP operands given to \fIc99\fP
+is
+significant; the application shall either provide its own \fImain\fP()
+function or ensure that \fB-l\ y\fP precedes
+\fB-l\ l\fP.
+.SS Debugging the Parser
+.LP
+The parser generated by \fIyacc\fP shall have diagnostic facilities
+in it that can be optionally enabled at either compile time
+or at runtime (if enabled at compile time). The compilation of the
+runtime debugging code is under the control of YYDEBUG, a
+preprocessor symbol. If YYDEBUG has a non-zero value, the debugging
+code shall be included. If its value is zero, the code shall
+not be included.
+.LP
+In parsers where the debugging code has been included, the external
+\fBint\fP \fIyydebug\fP can be used to turn debugging on
+(with a non-zero value) and off (zero value) at runtime. The initial
+value of \fIyydebug\fP shall be zero.
+.LP
+When \fB-t\fP is specified, the code file shall be built such that,
+if YYDEBUG is not already defined at compilation time
+(using the \fIc99\fP \fB-D\fP YYDEBUG option, for example), YYDEBUG
+shall be set explicitly
+to 1. When \fB-t\fP is not specified, the code file shall be built
+such that, if YYDEBUG is not already defined, it shall be set
+explicitly to zero.
+.LP
+The format of the debugging output is unspecified but includes at
+least enough information to determine the shift and reduce
+actions, and the input symbols. It also provides information about
+error recovery.
+.SS Algorithms
+.LP
+The parser constructed by \fIyacc\fP implements an LALR(1) parsing
+algorithm as documented in the literature. It is unspecified
+whether the parser is table-driven or direct-coded.
+.LP
+A parser generated by \fIyacc\fP shall never request an input symbol
+from \fIyylex\fP() while in a state where the only
+actions other than the error action are reductions by a single rule.
+.LP
+The literature of parsing theory defines these concepts.
+.SS Limits
+.LP
+The \fIyacc\fP utility may have several internal tables. The minimum
+maximums for these tables are shown in the following
+table. The exact meaning of these values is implementation-defined.
+The implementation shall define the relationship between these
+values and between them and any error messages that the implementation
+may generate should it run out of space for any internal
+structure. An implementation may combine groups of these resources
+into a single pool as long as the total available to the user
+does not fall below the sum of the sizes specified by this section.
+.br
+.sp
+.ce 1
+\fBTable: Internal Limits in \fIyacc\fP\fP
+.TS C
+center; l l lw(40).
+\fB\ \fP \fBMinimum\fP T{
+.na
+\fB\ \fP
+.ad
+T}
+\fBLimit\fP \fBMaximum\fP T{
+.na
+\fBDescription\fP
+.ad
+T}
+{NTERMS} 126 T{
+.na
+Number of tokens.
+.ad
+T}
+{NNONTERM} 200 T{
+.na
+Number of non-terminals.
+.ad
+T}
+{NPROD} 300 T{
+.na
+Number of rules.
+.ad
+T}
+{NSTATES} 600 T{
+.na
+Number of states.
+.ad
+T}
+{MEMSIZE} 5200 T{
+.na
+Length of rules. The total length, in names (tokens and non-terminals), of all the rules of the grammar. The left-hand side is counted for each rule, even if it is not explicitly repeated, as specified in Grammar Rules in yacc .
+.ad
+T}
+{ACTSIZE} 4000 T{
+.na
+Number of actions. "Actions" here (and in the description file) refer to parser actions (shift, reduce, and so on) not to semantic actions defined in Grammar Rules in yacc .
+.ad
+T}
+.TE
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+If any errors are encountered, the run is aborted and \fIyacc\fP exits
+with a non-zero status. Partial code files and header
+files may be produced. The summary information in the description
+file shall always be produced if the \fB-v\fP flag is
+present.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+Historical implementations experience name conflicts on the names
+\fByacc.tmp\fP, \fByacc.acts\fP, \fByacc.debug\fP,
+\fBy.tab.c\fP, \fBy.tab.h\fP, and \fBy.output\fP if more than one
+copy of \fIyacc\fP is running in a single directory at one
+time. The \fB-b\fP option was added to overcome this problem. The
+related problem of allowing multiple \fIyacc\fP parsers to be
+placed in the same file was addressed by adding a \fB-p\fP option
+to override the previously hard-coded \fByy\fP variable
+prefix.
+.LP
+The description of the \fB-p\fP option specifies the minimal set of
+function and variable names that cause conflict when
+multiple parsers are linked together. YYSTYPE does not need to be
+changed. Instead, the programmer can use \fB-b\fP to give the
+header files for different parsers different names, and then the file
+with the \fIyylex\fP() for a given parser can include the
+header for that parser. Names such as \fIyyclearerr\fP do not need
+to be changed because they are used only in the actions; they
+do not have linkage. It is possible that an implementation has other
+names, either internal ones for implementing things such as
+\fIyyclearerr\fP, or providing non-standard features that it wants
+to change with \fB-p\fP.
+.LP
+Unary operators that are the same token as a binary operator in general
+need their precedence adjusted. This is handled by the
+\fB%prec\fP advisory symbol associated with the particular grammar
+rule defining that unary operator. (See Grammar Rules in yacc .) Applications
+are not required to use this operator for unary operators, but the
+grammars that do not require it are rare.
+.SH EXAMPLES
+.LP
+Access to the \fIyacc\fP library is obtained with library search operands
+to \fIc99\fP. To
+use the \fIyacc\fP library \fImain\fP():
+.sp
+.RS
+.nf
+
+\fBc99 y.tab.c -l y
+\fP
+.fi
+.RE
+.LP
+Both the \fIlex\fP library and the \fIyacc\fP library contain \fImain\fP().
+To access the
+\fIyacc\fP \fImain\fP():
+.sp
+.RS
+.nf
+
+\fBc99 y.tab.c lex.yy.c -l y -l l
+\fP
+.fi
+.RE
+.LP
+This ensures that the \fIyacc\fP library is searched first, so that
+its \fImain\fP() is used.
+.LP
+The historical \fIyacc\fP libraries have contained two simple functions
+that are normally coded by the application programmer.
+These functions are similar to the following code:
+.sp
+.RS
+.nf
+
+\fB#include <locale.h>
+int main(void)
+{
+ extern int yyparse();
+.sp
+
+ setlocale(LC_ALL, "");
+.sp
+
+ /* If the following parser is one created by lex, the
+ application must be careful to ensure that LC_CTYPE
+ and LC_COLLATE are set to the POSIX locale. */
+ (void) yyparse();
+ return (0);
+}
+.sp
+
+#include <stdio.h>
+.sp
+
+int yyerror(const char *msg)
+{
+ (void) fprintf(stderr, "%s\\n", msg);
+ return (0);
+}
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+The references in may be helpful in constructing the parser generator.
+The referenced DeRemer and Pennello article (along with
+the works it references) describes a technique to generate parsers
+that conform to this volume of IEEE\ Std\ 1003.1-2001.
+Work in this area continues to be done, so implementors should consult
+current literature before doing any new implementations. The
+original Knuth article is the theoretical basis for this kind of parser,
+but the tables it generates are impractically large for
+reasonable grammars and should not be used. The "equivalent to" wording
+is intentional to assure that the best tables that are
+LALR(1) can be generated.
+.LP
+There has been confusion between the class of grammars, the algorithms
+needed to generate parsers, and the algorithms needed to
+parse the languages. They are all reasonably orthogonal. In particular,
+a parser generator that accepts the full range of LR(1)
+grammars need not generate a table any more complex than one that
+accepts SLR(1) (a relatively weak class of LR grammars) for a
+grammar that happens to be SLR(1). Such an implementation need not
+recognize the case, either; table compression can yield the
+SLR(1) table (or one even smaller than that) without recognizing that
+the grammar is SLR(1). The speed of an LR(1) parser for any
+class is dependent more upon the table representation and compression
+(or the code generation if a direct parser is generated) than
+upon the class of grammar that the table generator handles.
+.LP
+The speed of the parser generator is somewhat dependent upon the class
+of grammar it handles. However, the original Knuth
+article algorithms for constructing LR parsers were judged by its
+author to be impractically slow at that time. Although full LR is
+more complex than LALR(1), as computer speeds and algorithms improve,
+the difference (in terms of acceptable wall-clock execution
+time) is becoming less significant.
+.LP
+Potential authors are cautioned that the referenced DeRemer and Pennello
+article previously cited identifies a bug (an
+over-simplification of the computation of LALR(1) lookahead sets)
+in some of the LALR(1) algorithm statements that preceded it to
+publication. They should take the time to seek out that paper, as
+well as current relevant work, particularly Aho's.
+.LP
+The \fB-b\fP option was added to provide a portable method for permitting
+\fIyacc\fP to work on multiple separate parsers in
+the same directory. If a directory contains more than one \fIyacc\fP
+grammar, and both grammars are constructed at the same time
+(by, for example, a parallel \fImake\fP program), conflict results.
+While the solution is not
+historical practice, it corrects a known deficiency in historical
+implementations. Corresponding changes were made to all sections
+that referenced the filenames \fBy.tab.c\fP (now "the code file"),
+\fBy.tab.h\fP (now "the header file"), and \fBy.output\fP
+(now "the description file").
+.LP
+The grammar for \fIyacc\fP input is based on System V documentation.
+The textual description shows there that the \fB';'\fP
+is required at the end of the rule. The grammar and the implementation
+do not require this. (The use of \fBC_IDENTIFIER\fP causes
+a reduce to occur in the right place.)
+.LP
+Also, in that implementation, the constructs such as \fB%token\fP
+can be terminated by a semicolon, but this is not permitted
+by the grammar. The keywords such as \fB%token\fP can also appear
+in uppercase, which is again not discussed. In most places where
+\fB'%'\fP is used, \fB'\\'\fP can be substituted, and there are alternate
+spellings for some of the symbols (for example,
+\fB%LEFT\fP can be \fB"%<"\fP or even \fB"\\<"\fP ).
+.LP
+Historically, <\fItag\fP> can contain any characters except \fB'>'\fP,
+including white space, in the
+implementation. However, since the \fItag\fP must reference an ISO\ C
+standard union member, in practice conforming
+implementations need to support only the set of characters for ISO\ C
+standard identifiers in this context.
+.LP
+Some historical implementations are known to accept actions that are
+terminated by a period. Historical implementations often
+allow \fB'$'\fP in names. A conforming implementation does not need
+to support either of these behaviors.
+.LP
+Deciding when to use \fB%prec\fP illustrates the difficulty in specifying
+the behavior of \fIyacc\fP. There may be situations
+in which the \fIgrammar\fP is not, strictly speaking, in error, and
+yet \fIyacc\fP cannot interpret it unambiguously. The
+resolution of ambiguities in the grammar can in many instances be
+resolved by providing additional information, such as using
+\fB%type\fP or \fB%union\fP declarations. It is often easier and it
+usually yields a smaller parser to take this alternative when
+it is appropriate.
+.LP
+The size and execution time of a program produced without the runtime
+debugging code is usually smaller and slightly faster in
+historical implementations.
+.LP
+Statistics messages from several historical implementations include
+the following types of information:
+.sp
+.RS
+.nf
+
+\fIn\fP\fB/512 terminals,\fP \fIn\fP\fB/300 non-terminals
+\fP\fIn\fP\fB/600 grammar rules,\fP \fIn\fP\fB/1500 states
+\fP\fIn\fP \fBshift/reduce,\fP \fIn\fP \fBreduce/reduce conflicts reported
+\fP\fIn\fP\fB/350 working sets used
+Memory: states, etc.\fP \fIn\fP\fB/15000, parser\fP \fIn\fP\fB/15000
+\fP\fIn\fP\fB/600 distinct lookahead sets
+\fP\fIn\fP \fBextra closures
+\fP\fIn\fP \fBshift entries,\fP \fIn\fP \fBexceptions
+\fP\fIn\fP \fBgoto entries
+\fP\fIn\fP \fBentries saved by goto default
+Optimizer space used: input\fP \fIn\fP\fB/15000, output\fP \fIn\fP\fB/15000
+\fP\fIn\fP \fBtable entries,\fP \fIn\fP \fBzero
+Maximum spread:\fP \fIn\fP\fB, Maximum offset:\fP \fIn\fP
+.fi
+.RE
+.LP
+The report of internal tables in the description file is left implementation-defined
+because all aspects of these limits are
+also implementation-defined. Some implementations may use dynamic
+allocation techniques and have no specific limit values to
+report.
+.LP
+The format of the \fBy.output\fP file is not given because specification
+of the format was not seen to enhance applications
+portability. The listing is primarily intended to help human users
+understand and debug the parser; use of \fBy.output\fP by a
+conforming application script would be unusual. Furthermore, implementations
+have not produced consistent output and no popular
+format was apparent. The format selected by the implementation should
+be human-readable, in addition to the requirement that it be
+a text file.
+.LP
+Standard error reports are not specifically described because they
+are seldom of use to conforming applications and there was no
+reason to restrict implementations.
+.LP
+Some implementations recognize \fB"={"\fP as equivalent to \fB'{'\fP
+because it appears in historical documentation. This
+construction was recognized and documented as obsolete as long ago
+as 1978, in the referenced \fIYacc: Yet Another
+Compiler-Compiler\fP. This volume of IEEE\ Std\ 1003.1-2001 chose
+to leave it as obsolete and omit it.
+.LP
+Multi-byte characters should be recognized by the lexical analyzer
+and returned as tokens. They should not be returned as
+multi-byte character literals. The token \fBerror\fP that is used
+for error recovery is normally assigned the value 256 in the
+historical implementation. Thus, the token value 256, which is used
+in many multi-byte character sets, is not available for use as
+the value of a user-defined token.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIc99\fP, \fIlex\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man1p/zcat.1p b/man-pages-posix-2003/man1p/zcat.1p
new file mode 100644
index 0000000..ecfb432
--- /dev/null
+++ b/man-pages-posix-2003/man1p/zcat.1p
@@ -0,0 +1,129 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ZCAT" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" zcat
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+zcat \- expand and concatenate data
+.SH SYNOPSIS
+.LP
+\fBzcat\fP \fB[\fP\fIfile\fP\fB...\fP\fB]\fP\fB\fP
+.SH DESCRIPTION
+.LP
+The \fIzcat\fP utility shall write to standard output the uncompressed
+form of files that have been compressed using the \fIcompress\fP utility.
+It is the equivalent of \fIuncompress\fP \fB-c\fP. Input files are
+not affected.
+.SH OPTIONS
+.LP
+None.
+.SH OPERANDS
+.LP
+The following operand shall be supported:
+.TP 7
+\fIfile\fP
+The pathname of a file previously processed by the \fIcompress\fP
+utility. If
+\fIfile\fP already has the \fB.Z\fP suffix specified, it is used as
+submitted. Otherwise, the \fB.Z\fP suffix is appended to the
+filename prior to processing.
+.sp
+.SH STDIN
+.LP
+The standard input shall be used only if no \fIfile\fP operands are
+specified, or if a \fIfile\fP operand is \fB'-'\fP
+\&.
+.SH INPUT FILES
+.LP
+Input files shall be compressed files that are in the format produced
+by the \fIcompress\fP utility.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIzcat\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The compressed files given as input shall be written on standard output
+in their uncompressed form.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+None.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcompress\fP, \fIuncompress\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/FD_CLR.3p b/man-pages-posix-2003/man3p/FD_CLR.3p
new file mode 100644
index 0000000..24347e4
--- /dev/null
+++ b/man-pages-posix-2003/man3p/FD_CLR.3p
@@ -0,0 +1 @@
+.so man3p/select.3p
diff --git a/man-pages-posix-2003/man3p/FD_ISSET.3p b/man-pages-posix-2003/man3p/FD_ISSET.3p
new file mode 100644
index 0000000..24347e4
--- /dev/null
+++ b/man-pages-posix-2003/man3p/FD_ISSET.3p
@@ -0,0 +1 @@
+.so man3p/select.3p
diff --git a/man-pages-posix-2003/man3p/FD_SET.3p b/man-pages-posix-2003/man3p/FD_SET.3p
new file mode 100644
index 0000000..24347e4
--- /dev/null
+++ b/man-pages-posix-2003/man3p/FD_SET.3p
@@ -0,0 +1 @@
+.so man3p/select.3p
diff --git a/man-pages-posix-2003/man3p/FD_ZERO.3p b/man-pages-posix-2003/man3p/FD_ZERO.3p
new file mode 100644
index 0000000..24347e4
--- /dev/null
+++ b/man-pages-posix-2003/man3p/FD_ZERO.3p
@@ -0,0 +1 @@
+.so man3p/select.3p
diff --git a/man-pages-posix-2003/man3p/_Exit.3p b/man-pages-posix-2003/man3p/_Exit.3p
new file mode 100644
index 0000000..1e29b70
--- /dev/null
+++ b/man-pages-posix-2003/man3p/_Exit.3p
@@ -0,0 +1 @@
+.so man3p/exit.3p
diff --git a/man-pages-posix-2003/man3p/_exit.3p b/man-pages-posix-2003/man3p/_exit.3p
new file mode 100644
index 0000000..1e29b70
--- /dev/null
+++ b/man-pages-posix-2003/man3p/_exit.3p
@@ -0,0 +1 @@
+.so man3p/exit.3p
diff --git a/man-pages-posix-2003/man3p/_longjmp.3p b/man-pages-posix-2003/man3p/_longjmp.3p
new file mode 100644
index 0000000..bf3b21e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/_longjmp.3p
@@ -0,0 +1 @@
+.so man3p/_setjmp.3p
diff --git a/man-pages-posix-2003/man3p/_setjmp.3p b/man-pages-posix-2003/man3p/_setjmp.3p
new file mode 100644
index 0000000..9ed2dcd
--- /dev/null
+++ b/man-pages-posix-2003/man3p/_setjmp.3p
@@ -0,0 +1,89 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "_LONGJMP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" _longjmp
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+_longjmp, _setjmp \- non-local goto
+.SH SYNOPSIS
+.LP
+\fB#include <setjmp.h>
+.br
+.sp
+void _longjmp(jmp_buf\fP \fIenv\fP\fB, int\fP \fIval\fP\fB);
+.br
+int _setjmp(jmp_buf\fP \fIenv\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fI_longjmp\fP() and \fI_setjmp\fP() functions shall be equivalent
+to \fIlongjmp\fP() and \fIsetjmp\fP(), respectively, with the
+additional restriction that \fI_longjmp\fP() and \fI_setjmp\fP() shall
+not manipulate the signal mask.
+.LP
+If \fI_longjmp\fP() is called even though \fIenv\fP was never initialized
+by a call to \fI_setjmp\fP(), or when the last such
+call was in a function that has since returned, the results are undefined.
+.SH RETURN VALUE
+.LP
+Refer to \fIlongjmp\fP() and \fIsetjmp\fP().
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+If \fI_longjmp\fP() is executed and the environment in which \fI_setjmp\fP()
+was executed no longer exists, errors can occur.
+The conditions under which the environment of the \fI_setjmp\fP()
+no longer exists include exiting the function that contains the
+\fI_setjmp\fP() call, and exiting an inner block with temporary storage.
+This condition might not be detectable, in which case the
+\fI_longjmp\fP() occurs and, if the environment no longer exists,
+the contents of the temporary storage of an inner block are
+unpredictable. This condition might also cause unexpected process
+termination. If the function has returned, the results are
+undefined.
+.LP
+Passing \fIlongjmp\fP() a pointer to a buffer not created by \fIsetjmp\fP(),
+passing \fI_longjmp\fP() a pointer to a buffer not created by \fI_setjmp\fP(),
+passing \fIsiglongjmp\fP() a pointer to a buffer not created by \fIsigsetjmp\fP(),
+or passing any of these three functions a buffer that has been modified
+by
+the user can cause all the problems listed above, and more.
+.LP
+The \fI_longjmp\fP() and \fI_setjmp\fP() functions are included to
+support programs written to historical system interfaces.
+New applications should use \fIsiglongjmp\fP() and \fIsigsetjmp\fP()
+respectively.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+The \fI_longjmp\fP() and \fI_setjmp\fP() functions may be marked LEGACY
+in a future version.
+.SH SEE ALSO
+.LP
+\fIlongjmp\fP(), \fIsetjmp\fP(), \fIsiglongjmp\fP(), \fIsigsetjmp\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<setjmp.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/_tolower.3p b/man-pages-posix-2003/man3p/_tolower.3p
new file mode 100644
index 0000000..5e2df86
--- /dev/null
+++ b/man-pages-posix-2003/man3p/_tolower.3p
@@ -0,0 +1,59 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "_TOLOWER" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" _tolower
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+_tolower \- transliterate uppercase characters to lowercase
+.SH SYNOPSIS
+.LP
+\fB#include <ctype.h>
+.br
+.sp
+int _tolower(int\fP \fIc\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fI_tolower\fP() macro shall be equivalent to \fItolower\fP(\fIc\fP)
+except that the application shall ensure that the
+argument \fIc\fP is an uppercase letter.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fI_tolower\fP() shall return the lowercase
+letter corresponding to the argument passed.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fItolower\fP(), \fIisupper\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 7, Locale, \fI<ctype.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/_toupper.3p b/man-pages-posix-2003/man3p/_toupper.3p
new file mode 100644
index 0000000..c48ba7e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/_toupper.3p
@@ -0,0 +1,60 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "_TOUPPER" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" _toupper
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+_toupper \- transliterate lowercase characters to uppercase
+.SH SYNOPSIS
+.LP
+\fB#include <ctype.h>
+.br
+.sp
+int _toupper(int\fP \fIc\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fI_toupper\fP() macro shall be equivalent to \fItoupper\fP()
+except that the
+application shall ensure that the argument \fIc\fP is a lowercase
+letter.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fI_toupper\fP() shall return the uppercase
+letter corresponding to the argument passed.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIislower\fP(), \fItoupper\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 7, Locale, \fI<ctype.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/a64l.3p b/man-pages-posix-2003/man3p/a64l.3p
new file mode 100644
index 0000000..7d0e231
--- /dev/null
+++ b/man-pages-posix-2003/man3p/a64l.3p
@@ -0,0 +1,107 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "A64L" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" a64l
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+a64l, l64a \- convert between a 32-bit integer and a radix-64 ASCII
+string
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+long a64l(const char *\fP\fIs\fP\fB);
+.br
+char *l64a(long\fP \fIvalue\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions maintain numbers stored in radix-64 ASCII characters.
+This is a notation by which 32-bit integers can be
+represented by up to six characters; each character represents a digit
+in radix-64 notation. If the type \fBlong\fP contains more
+than 32 bits, only the low-order 32 bits shall be used for these operations.
+.LP
+The characters used to represent digits are \fB'.'\fP (dot) for 0,
+\fB'/'\fP for 1, \fB'0'\fP through \fB'9'\fP for
+[2,11], \fB'A'\fP through \fB'Z'\fP for [12,37], and \fB'a'\fP through
+\fB'z'\fP for [38,63].
+.LP
+The \fIa64l\fP() function shall take a pointer to a radix-64 representation,
+in which the first digit is the least significant,
+and return the corresponding \fBlong\fP value. If the string pointed
+to by \fIs\fP contains more than six characters,
+\fIa64l\fP() shall use the first six. If the first six characters
+of the string contain a null terminator, \fIa64l\fP() shall use
+only characters preceding the null terminator. The \fIa64l\fP() function
+shall scan the character string from left to right with
+the least significant digit on the left, decoding each character as
+a 6-bit radix-64 number. If the type \fBlong\fP contains more
+than 32 bits, the resulting value is sign-extended. The behavior of
+\fIa64l\fP() is unspecified if \fIs\fP is a null pointer or
+the string pointed to by \fIs\fP was not generated by a previous call
+to \fIl64a\fP().
+.LP
+The \fIl64a\fP() function shall take a \fBlong\fP argument and return
+a pointer to the corresponding radix-64 representation.
+The behavior of \fIl64a\fP() is unspecified if \fIvalue\fP is negative.
+.LP
+The value returned by \fIl64a\fP() may be a pointer into a static
+buffer. Subsequent calls to \fIl64a\fP() may overwrite the
+buffer.
+.LP
+The \fIl64a\fP() function need not be reentrant. A function that is
+not required to be reentrant is not required to be
+thread-safe.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIa64l\fP() shall return the \fBlong\fP
+value resulting from conversion of the input string. If a
+string pointed to by \fIs\fP is an empty string, \fIa64l\fP() shall
+return 0L.
+.LP
+The \fIl64a\fP() function shall return a pointer to the radix-64 representation.
+If \fIvalue\fP is 0L, \fIl64a\fP() shall
+return a pointer to an empty string.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+If the type \fBlong\fP contains more than 32 bits, the result of \fIa64l\fP(\fIl64a\fP(\fIx\fP))
+is \fIx\fP in the
+low-order 32 bits.
+.SH RATIONALE
+.LP
+This is not the same encoding as used by either encoding variant of
+the \fIuuencode\fP
+utility.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIstrtoul\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<stdlib.h>\fP, the Shell and Utilities volume of IEEE\ Std\ 1003.1-2001,
+\fIuuencode\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/abort.3p b/man-pages-posix-2003/man3p/abort.3p
new file mode 100644
index 0000000..696fd6f
--- /dev/null
+++ b/man-pages-posix-2003/man3p/abort.3p
@@ -0,0 +1,110 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ABORT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" abort
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+abort \- generate an abnormal process abort
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+void abort(void);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIabort\fP() function shall cause abnormal process termination
+to occur, unless the signal SIGABRT is being caught and the
+signal handler does not return.
+.LP
+The
+abnormal termination processing shall include the default actions
+defined for SIGABRT and may include an attempt to effect \fIfclose\fP()
+on all open streams.
+.LP
+The SIGABRT signal shall be sent to the calling process as if by means
+of \fIraise\fP()
+with the argument SIGABRT.
+.LP
+The
+status made available to \fIwait\fP() or \fIwaitpid\fP() by \fIabort\fP()
+shall be that of a process terminated by the SIGABRT signal.
+The \fIabort\fP() function shall override blocking or ignoring the
+SIGABRT signal.
+.SH RETURN VALUE
+.LP
+The \fIabort\fP() function shall not return.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Catching the signal is intended to provide the application writer
+with a portable means to abort processing, free from possible
+interference from any implementation-defined functions.
+.SH RATIONALE
+.LP
+The ISO/IEC\ 9899:1999 standard requires the \fIabort\fP() function
+to be async-signal-safe. Since
+IEEE\ Std\ 1003.1-2001 defers to the ISO\ C standard, this required
+a change to the DESCRIPTION from ``shall include
+the effect of \fIfclose\fP()'' to ``may include an attempt to effect
+\fIfclose\fP().''
+.LP
+The revised wording permits some backwards-compatibility and avoids
+a potential deadlock situation.
+.LP
+The Open Group Base Resolution bwg2002-003 is applied, removing the
+following XSI shaded paragraph from the DESCRIPTION:
+.LP
+``On XSI-conformant systems, in addition the abnormal termination
+processing shall include the effect of \fIfclose\fP() on message catalog
+descriptors.''
+.LP
+There were several reasons to remove this paragraph:
+.IP " *" 3
+No special processing of open message catalogs needs to be performed
+prior to abnormal process termination.
+.LP
+.IP " *" 3
+The main reason to specifically mention that \fIabort\fP() includes
+the effect of \fIfclose\fP() on open streams is to flush output queued
+on the stream. Message catalogs in this
+context are read-only and, therefore, do not need to be flushed.
+.LP
+.IP " *" 3
+The effect of \fIfclose\fP() on a message catalog descriptor is unspecified.
+Message
+catalog descriptors are allowed, but not required to be implemented
+using a file descriptor, but there is no mention in
+IEEE\ Std\ 1003.1-2001 of a message catalog descriptor using a standard
+I/O stream FILE object as would be expected by \fIfclose\fP().
+.LP
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexit\fP(), \fIkill\fP(), \fIraise\fP(), \fIsignal\fP(), \fIwait\fP(),
+\fIwaitpid\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/abs.3p b/man-pages-posix-2003/man3p/abs.3p
new file mode 100644
index 0000000..e13d763
--- /dev/null
+++ b/man-pages-posix-2003/man3p/abs.3p
@@ -0,0 +1,60 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ABS" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" abs
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+abs \- return an integer absolute value
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+int abs(int\fP \fIi\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIabs\fP() function shall compute the absolute value of its integer
+operand, \fIi\fP. If the result cannot be
+represented, the behavior is undefined.
+.SH RETURN VALUE
+.LP
+The \fIabs\fP() function shall return the absolute value of its integer
+operand.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+In two's-complement representation, the absolute value of the negative
+integer with largest magnitude {INT_MIN} might not be
+representable.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfabs\fP(), \fIlabs\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/accept.3p b/man-pages-posix-2003/man3p/accept.3p
new file mode 100644
index 0000000..c5ffa8d
--- /dev/null
+++ b/man-pages-posix-2003/man3p/accept.3p
@@ -0,0 +1,154 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ACCEPT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" accept
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+accept \- accept a new connection on a socket
+.SH SYNOPSIS
+.LP
+\fB#include <sys/socket.h>
+.br
+.sp
+int accept(int\fP \fIsocket\fP\fB, struct sockaddr *restrict\fP \fIaddress\fP\fB,
+.br
+\ \ \ \ \ \ socklen_t *restrict\fP \fIaddress_len\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIaccept\fP() function shall extract the first connection on
+the queue of pending connections, create a new socket with
+the same socket type protocol and address family as the specified
+socket, and allocate a new file descriptor for that socket.
+.LP
+The \fIaccept\fP() function takes the following arguments:
+.TP 7
+\fIsocket\fP
+Specifies a socket that was created with \fIsocket\fP(), has been
+bound to an address
+with \fIbind\fP(), and has issued a successful call to \fIlisten\fP().
+.TP 7
+\fIaddress\fP
+Either a null pointer, or a pointer to a \fBsockaddr\fP structure
+where the address of the connecting socket shall be
+returned.
+.TP 7
+\fIaddress_len\fP
+Points to a \fBsocklen_t\fP structure which on input specifies the
+length of the supplied \fBsockaddr\fP structure, and on
+output specifies the length of the stored address.
+.sp
+.LP
+If \fIaddress\fP is not a null pointer, the address of the peer for
+the accepted connection shall be stored in the
+\fBsockaddr\fP structure pointed to by \fIaddress\fP, and the length
+of this address shall be stored in the object pointed to by
+\fIaddress_len\fP.
+.LP
+If the actual length of the address is greater than the length of
+the supplied \fBsockaddr\fP structure, the stored address
+shall be truncated.
+.LP
+If the protocol permits connections by unbound clients, and the peer
+is not bound, then the value stored in the object pointed
+to by \fIaddress\fP is unspecified.
+.LP
+If the listen queue is empty of connection requests and O_NONBLOCK
+is not set on the file descriptor for the socket,
+\fIaccept\fP() shall block until a connection is present. If the \fIlisten\fP()
+queue is
+empty of connection requests and O_NONBLOCK is set on the file descriptor
+for the socket, \fIaccept\fP() shall fail and set
+\fIerrno\fP to [EAGAIN] or [EWOULDBLOCK].
+.LP
+The accepted socket cannot itself accept more connections. The original
+socket remains open and can accept more connections.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIaccept\fP() shall return the non-negative
+file descriptor of the accepted socket. Otherwise, -1
+shall be returned and \fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fIaccept\fP() function shall fail if:
+.TP 7
+.B EAGAIN \fRor\fP EWOULDBLOCK
+.sp
+O_NONBLOCK is set for the socket file descriptor and no connections
+are present to be accepted.
+.TP 7
+.B EBADF
+The \fIsocket\fP argument is not a valid file descriptor.
+.TP 7
+.B ECONNABORTED
+.sp
+A connection has been aborted.
+.TP 7
+.B EINTR
+The \fIaccept\fP() function was interrupted by a signal that was caught
+before a valid connection arrived.
+.TP 7
+.B EINVAL
+The \fIsocket\fP is not accepting connections.
+.TP 7
+.B EMFILE
+{OPEN_MAX} file descriptors are currently open in the calling process.
+.TP 7
+.B ENFILE
+The maximum number of file descriptors in the system are already open.
+.TP 7
+.B ENOTSOCK
+The \fIsocket\fP argument does not refer to a socket.
+.TP 7
+.B EOPNOTSUPP
+The socket type of the specified socket does not support accepting
+connections.
+.sp
+.LP
+The \fIaccept\fP() function may fail if:
+.TP 7
+.B ENOBUFS
+No buffer space is available.
+.TP 7
+.B ENOMEM
+There was insufficient memory available to complete the operation.
+.TP 7
+.B EPROTO
+A protocol error has occurred; for example, the STREAMS protocol stack
+has not been initialized.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+When a connection is available, \fIselect\fP() indicates that the
+file descriptor for
+the socket is ready for reading.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIbind\fP(), \fIconnect\fP(), \fIlisten\fP(),
+\fIsocket\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<sys/socket.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/access.3p b/man-pages-posix-2003/man3p/access.3p
new file mode 100644
index 0000000..9885513
--- /dev/null
+++ b/man-pages-posix-2003/man3p/access.3p
@@ -0,0 +1,164 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ACCESS" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" access
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+access \- determine accessibility of a file
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+int access(const char *\fP\fIpath\fP\fB, int\fP \fIamode\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIaccess\fP() function shall check the file named by the pathname
+pointed to by the \fIpath\fP argument for accessibility
+according to the bit pattern contained in \fIamode\fP, using the real
+user ID in place of the effective user ID and the real group
+ID in place of the effective group ID.
+.LP
+The value of \fIamode\fP is either the bitwise-inclusive OR of the
+access permissions to be checked (R_OK, W_OK, X_OK) or the
+existence test (F_OK).
+.LP
+If any access permissions are checked, each shall be checked individually,
+as described in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 3, Definitions. If the process has
+appropriate
+privileges, an implementation may indicate success for X_OK even if
+none of the execute file permission bits are set.
+.SH RETURN VALUE
+.LP
+If the requested access is permitted, \fIaccess\fP() succeeds and
+shall return 0; otherwise, -1 shall be returned and
+\fIerrno\fP shall be set to indicate the error.
+.SH ERRORS
+.LP
+The \fIaccess\fP() function shall fail if:
+.TP 7
+.B 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.
+.TP 7
+.B ELOOP
+A loop exists in symbolic links encountered during resolution of the
+\fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+The length of the \fIpath\fP argument exceeds {PATH_MAX} or a pathname
+component is longer than {NAME_MAX}.
+.TP 7
+.B ENOENT
+A component of \fIpath\fP does not name an existing file or \fIpath\fP
+is an empty string.
+.TP 7
+.B ENOTDIR
+A component of the path prefix is not a directory.
+.TP 7
+.B EROFS
+Write access is requested for a file on a read-only file system.
+.sp
+.LP
+The \fIaccess\fP() function may fail if:
+.TP 7
+.B EINVAL
+The value of the \fIamode\fP argument is invalid.
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the \fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+As a result of encountering a symbolic link in resolution of the \fIpath\fP
+argument, the length of the substituted pathname
+string exceeded {PATH_MAX}.
+.TP 7
+.B ETXTBSY
+Write access is requested for a pure procedure (shared text) file
+that is being executed.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Testing for the Existence of a File
+.LP
+The following example tests whether a file named \fBmyfile\fP exists
+in the \fB/tmp\fP directory.
+.sp
+.RS
+.nf
+
+\fB#include <unistd.h>
+\&...
+int result;
+const char *filename = "/tmp/myfile";
+.sp
+
+result = access (filename, F_OK);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+Additional values of \fIamode\fP other than the set defined in the
+description may be valid; for example, if a system has
+extended access controls.
+.SH RATIONALE
+.LP
+In early proposals, some inadequacies in the \fIaccess\fP() function
+led to the creation of an \fIeaccess\fP() function
+because:
+.IP " 1." 4
+Historical implementations of \fIaccess\fP() do not test file access
+correctly when the process' real user ID is superuser. In
+particular, they always return zero when testing execute permissions
+without regard to whether the file is executable.
+.LP
+.IP " 2." 4
+The superuser has complete access to all files on a system. As a consequence,
+programs started by the superuser and switched to
+the effective user ID with lesser privileges cannot use \fIaccess\fP()
+to test their file access permissions.
+.LP
+.LP
+However, the historical model of \fIeaccess\fP() does not resolve
+problem (1), so this volume of IEEE\ Std\ 1003.1-2001
+now allows \fIaccess\fP() to behave in the desired way because several
+implementations have corrected the problem. It was also
+argued that problem (2) is more easily solved by using \fIopen\fP(),
+\fIchdir\fP(), or one of the \fIexec\fP functions as
+appropriate and responding to the error, rather than creating a new
+function that would not be as reliable. Therefore,
+\fIeaccess\fP() is not included in this volume of IEEE\ Std\ 1003.1-2001.
+.LP
+The sentence concerning appropriate privileges and execute permission
+bits reflects the two possibilities implemented by
+historical implementations when checking superuser access for X_OK.
+.LP
+New implementations are discouraged from returning X_OK unless at
+least one execution permission bit is set.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIchmod\fP(), \fIstat\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/acos.3p b/man-pages-posix-2003/man3p/acos.3p
new file mode 100644
index 0000000..9db7e75
--- /dev/null
+++ b/man-pages-posix-2003/man3p/acos.3p
@@ -0,0 +1,99 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ACOS" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" acos
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+acos, acosf, acosl \- arc cosine functions
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double acos(double\fP \fIx\fP\fB);
+.br
+float acosf(float\fP \fIx\fP\fB);
+.br
+long double acosl(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the principal value of the arc cosine
+of their argument \fIx\fP. The value of \fIx\fP should be
+in the range [-1,1].
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the arc cosine
+of \fIx\fP, in the range [0,pi] radians.
+.LP
+For finite values of \fIx\fP not in the range [-1,1], a domain error
+shall occur, and either a NaN
+(if supported), or an implementation-defined value shall be
+returned.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is +1, +0 shall be returned.
+.LP
+If \fIx\fP is \(+-Inf, a domain error shall occur, and either a NaN
+(if supported), or an implementation-defined value
+shall be returned.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Domain\ Error
+The \fIx\fP argument is finite and is not in the range [-1,1], or
+is \(+-Inf.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [EDOM]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the invalid floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcos\fP(), \fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIisnan\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment of Error Conditions
+for
+Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/acosf.3p b/man-pages-posix-2003/man3p/acosf.3p
new file mode 100644
index 0000000..1a7b62b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/acosf.3p
@@ -0,0 +1 @@
+.so man3p/acos.3p
diff --git a/man-pages-posix-2003/man3p/acosh.3p b/man-pages-posix-2003/man3p/acosh.3p
new file mode 100644
index 0000000..c707389
--- /dev/null
+++ b/man-pages-posix-2003/man3p/acosh.3p
@@ -0,0 +1,96 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ACOSH" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" acosh
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+acosh, acoshf, acoshl \- inverse hyperbolic cosine functions
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double acosh(double\fP \fIx\fP\fB);
+.br
+float acoshf(float\fP \fIx\fP\fB);
+.br
+long double acoshl(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the inverse hyperbolic cosine of their
+argument \fIx\fP.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the inverse
+hyperbolic cosine of their argument.
+.LP
+For finite values of \fIx\fP < 1, a domain error shall occur, and
+\ either a NaN (if supported), or an implementation-defined value
+shall be returned.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is +1, +0 shall be returned.
+.LP
+If \fIx\fP is +Inf, +Inf shall be returned.
+.LP
+If \fIx\fP is -Inf, a domain error shall occur, and either a NaN (if
+supported), or an implementation-defined value shall be
+returned.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Domain\ Error
+The \fIx\fP argument is finite and less than +1.0, or is -Inf.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [EDOM]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the invalid floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcosh\fP(), \fIfeclearexcept\fP(), \fIfetestexcept\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment
+of Error Conditions for Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/acoshf.3p b/man-pages-posix-2003/man3p/acoshf.3p
new file mode 100644
index 0000000..1a98b08
--- /dev/null
+++ b/man-pages-posix-2003/man3p/acoshf.3p
@@ -0,0 +1 @@
+.so man3p/acosh.3p
diff --git a/man-pages-posix-2003/man3p/acoshl.3p b/man-pages-posix-2003/man3p/acoshl.3p
new file mode 100644
index 0000000..1a98b08
--- /dev/null
+++ b/man-pages-posix-2003/man3p/acoshl.3p
@@ -0,0 +1 @@
+.so man3p/acosh.3p
diff --git a/man-pages-posix-2003/man3p/acosl.3p b/man-pages-posix-2003/man3p/acosl.3p
new file mode 100644
index 0000000..1a7b62b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/acosl.3p
@@ -0,0 +1 @@
+.so man3p/acos.3p
diff --git a/man-pages-posix-2003/man3p/aio_cancel.3p b/man-pages-posix-2003/man3p/aio_cancel.3p
new file mode 100644
index 0000000..ea276b6
--- /dev/null
+++ b/man-pages-posix-2003/man3p/aio_cancel.3p
@@ -0,0 +1,99 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "AIO_CANCEL" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" aio_cancel
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+aio_cancel \- cancel an asynchronous I/O request (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <aio.h>
+.br
+.sp
+int aio_cancel(int\fP \fIfildes\fP\fB, struct aiocb *\fP\fIaiocbp\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIaio_cancel\fP() function shall attempt to cancel one or more
+asynchronous I/O requests currently outstanding against
+file descriptor \fIfildes\fP. The \fIaiocbp\fP argument points to
+the asynchronous I/O control block for a particular request to
+be canceled. If \fIaiocbp\fP is NULL, then all outstanding cancelable
+asynchronous I/O requests against \fIfildes\fP shall be
+canceled.
+.LP
+Normal asynchronous notification shall occur for asynchronous I/O
+operations that are successfully canceled. If there are
+requests that cannot be canceled, then the normal asynchronous completion
+process shall take place for those requests when they are
+completed.
+.LP
+For requested operations that are successfully canceled, the associated
+error status shall be set to [ECANCELED] and the return
+status shall be -1. For requested operations that are not successfully
+canceled, the \fIaiocbp\fP shall not be modified by
+\fIaio_cancel\fP().
+.LP
+If \fIaiocbp\fP is not NULL, then if \fIfildes\fP does not have the
+same value as the file descriptor with which the
+asynchronous operation was initiated, unspecified results occur.
+.LP
+Which operations are cancelable is implementation-defined.
+.SH RETURN VALUE
+.LP
+The \fIaio_cancel\fP() function shall return the value AIO_CANCELED
+to the calling process if the requested operation(s) were
+canceled. The value AIO_NOTCANCELED shall be returned if at least
+one of the requested operation(s) cannot be canceled because it
+is in progress. In this case, the state of the other operations, if
+any, referenced in the call to \fIaio_cancel\fP() is not
+indicated by the return value of \fIaio_cancel\fP(). The application
+may determine the state of affairs for these operations by
+using \fIaio_error\fP(). The value AIO_ALLDONE is returned if all
+of the operations have
+already completed. Otherwise, the function shall return -1 and set
+\fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fIaio_cancel\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not a valid file descriptor.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIaio_cancel\fP() function is part of the Asynchronous Input
+and Output option and need not be available on all
+implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIaio_read\fP(), \fIaio_write\fP(), the Base Definitions volume
+of
+IEEE\ Std\ 1003.1-2001, \fI<aio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/aio_error.3p b/man-pages-posix-2003/man3p/aio_error.3p
new file mode 100644
index 0000000..03ae4ae
--- /dev/null
+++ b/man-pages-posix-2003/man3p/aio_error.3p
@@ -0,0 +1,80 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "AIO_ERROR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" aio_error
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+aio_error \- retrieve errors status for an asynchronous I/O operation
+(\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <aio.h>
+.br
+.sp
+int aio_error(const struct aiocb *\fP\fIaiocbp\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIaio_error\fP() function shall return the error status associated
+with the \fBaiocb\fP structure referenced by the
+\fIaiocbp\fP argument. The error status for an asynchronous I/O operation
+is the \fIerrno\fP value that would be set by the
+corresponding \fIread\fP(), \fIwrite\fP(), \fIfdatasync\fP(), or
+\fIfsync\fP() operation. If the operation has not yet completed, then
+the error status shall be
+equal to [EINPROGRESS].
+.SH RETURN VALUE
+.LP
+If the asynchronous I/O operation has completed successfully, then
+0 shall be returned. If the asynchronous operation has
+completed unsuccessfully, then the error status, as described for
+\fIread\fP(), \fIwrite\fP(), \fIfdatasync\fP(), and \fIfsync\fP(),
+shall be returned.
+If the asynchronous I/O operation has not yet completed, then [EINPROGRESS]
+shall be returned.
+.SH ERRORS
+.LP
+The \fIaio_error\fP() function may fail if:
+.TP 7
+.B EINVAL
+The \fIaiocbp\fP argument does not refer to an asynchronous operation
+whose return status has not yet been retrieved.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIaio_error\fP() function is part of the Asynchronous Input and
+Output option and need not be available on all
+implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIaio_cancel\fP(), \fIaio_fsync\fP(), \fIaio_read\fP(), \fIaio_return\fP(),
+\fIaio_write\fP(), \fIclose\fP(), \fIexec\fP(), \fIexit\fP(),
+\fIfork\fP(), \fIlio_listio\fP(), \fIlseek\fP(), \fIread\fP()
+,
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<aio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/aio_fsync.3p b/man-pages-posix-2003/man3p/aio_fsync.3p
new file mode 100644
index 0000000..4e78c41
--- /dev/null
+++ b/man-pages-posix-2003/man3p/aio_fsync.3p
@@ -0,0 +1,133 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "AIO_FSYNC" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" aio_fsync
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+aio_fsync \- asynchronous file synchronization (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <aio.h>
+.br
+.sp
+int aio_fsync(int\fP \fIop\fP\fB, struct aiocb *\fP\fIaiocbp\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIaio_fsync\fP() function shall asynchronously force all I/O
+operations associated with the file indicated by the file
+descriptor \fIaio_fildes\fP member of the \fBaiocb\fP structure referenced
+by the \fIaiocbp\fP argument and queued at the time
+of the call to \fIaio_fsync\fP() to the synchronized I/O completion
+state. The function call shall return when the synchronization
+request has been initiated or queued to the file or device (even when
+the data cannot be synchronized immediately).
+.LP
+If \fIop\fP is O_DSYNC, all currently queued I/O operations shall
+be completed as if by a call to \fIfdatasync\fP(); that is, as defined
+for synchronized I/O data integrity completion. If
+\fIop\fP is O_SYNC, all currently queued I/O operations shall be completed
+as if by a call to \fIfsync\fP(); that is, as defined for synchronized
+I/O file integrity completion. If the
+\fIaio_fsync\fP() function fails, or if the operation queued by \fIaio_fsync\fP()
+fails, then, as for \fIfsync\fP() and \fIfdatasync\fP(), outstanding
+I/O
+operations are not guaranteed to have been completed.
+.LP
+If \fIaio_fsync\fP() succeeds, then it is only the I/O that was queued
+at the time of the call to \fIaio_fsync\fP() that is
+guaranteed to be forced to the relevant completion state. The completion
+of subsequent I/O on the file descriptor is not guaranteed
+to be completed in a synchronized fashion.
+.LP
+The \fIaiocbp\fP argument refers to an asynchronous I/O control block.
+The \fIaiocbp\fP value may be used as an argument to \fIaio_error\fP()
+and \fIaio_return\fP() in
+order to determine the error status and return status, respectively,
+of the asynchronous operation while it is proceeding. When the
+request is queued, the error status for the operation is [EINPROGRESS].
+When all data has been successfully transferred, the error
+status shall be reset to reflect the success or failure of the operation.
+If the operation does not complete successfully, the
+error status for the operation shall be set to indicate the error.
+The \fIaio_sigevent\fP member determines the asynchronous
+notification to occur as specified in \fISignal Generation and Delivery\fP
+when all
+operations have achieved synchronized I/O completion. All other members
+of the structure referenced by \fIaiocbp\fP are ignored.
+If the control block referenced by \fIaiocbp\fP becomes an illegal
+address prior to asynchronous I/O completion, then the behavior
+is undefined.
+.LP
+If the \fIaio_fsync\fP() function fails or \fIaiocbp\fP indicates
+an error condition, data is not guaranteed to have been
+successfully transferred.
+.SH RETURN VALUE
+.LP
+The \fIaio_fsync\fP() function shall return the value 0 to the calling
+process if the I/O operation is successfully queued;
+otherwise, the function shall return the value -1 and set \fIerrno\fP
+to indicate the error.
+.SH ERRORS
+.LP
+The \fIaio_fsync\fP() function shall fail if:
+.TP 7
+.B EAGAIN
+The requested asynchronous operation was not queued due to temporary
+resource limitations.
+.TP 7
+.B EBADF
+The \fIaio_fildes\fP member of the \fBaiocb\fP structure referenced
+by the \fIaiocbp\fP argument is not a valid file
+descriptor open for writing.
+.TP 7
+.B EINVAL
+This implementation does not support synchronized I/O for this file.
+.TP 7
+.B EINVAL
+A value of \fIop\fP other than O_DSYNC or O_SYNC was specified.
+.sp
+.LP
+In the event that any of the queued I/O operations fail, \fIaio_fsync\fP()
+shall return the error condition defined for \fIread\fP() and \fIwrite\fP().
+The error is returned in
+the error status for the asynchronous \fIfsync\fP() operation, which
+can be retrieved using
+\fIaio_error\fP().
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIaio_fsync\fP() function is part of the Asynchronous Input and
+Output option and need not be available on all
+implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfcntl\fP(), \fIfdatasync\fP(), \fIfsync\fP(), \fIopen\fP(),
+\fIread\fP(), \fIwrite\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<aio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/aio_read.3p b/man-pages-posix-2003/man3p/aio_read.3p
new file mode 100644
index 0000000..a8a1a2a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/aio_read.3p
@@ -0,0 +1,169 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "AIO_READ" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" aio_read
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+aio_read \- asynchronous read from a file (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <aio.h>
+.br
+.sp
+int aio_read(struct aiocb *\fP\fIaiocbp\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIaio_read\fP() function shall read \fIaiocbp\fP->\fIaio_nbytes\fP
+from the file associated with
+\fIaiocbp\fP->\fIaio_fildes\fP into the buffer pointed to by \fIaiocbp\fP->\fIaio_buf\fP.
+The function call shall return
+when the read request has been initiated or queued to the file or
+device (even when the data cannot be delivered immediately).
+.LP
+If prioritized I/O is supported for this file, then the asynchronous
+operation shall be submitted at a priority equal to the
+scheduling priority of the process minus \fIaiocbp\fP->\fIaio_reqprio\fP.
+.LP
+The \fIaiocbp\fP value may be used as an argument to \fIaio_error\fP()
+and \fIaio_return\fP() in order to determine the error status and
+return status, respectively, of
+the asynchronous operation while it is proceeding. If an error condition
+is encountered during queuing, the function call shall
+return without having initiated or queued the request. The requested
+operation takes place at the absolute position in the file as
+given by \fIaio_offset\fP, as if \fIlseek\fP() were called immediately
+prior to the
+operation with an \fIoffset\fP equal to \fIaio_offset\fP and a \fIwhence\fP
+equal to SEEK_SET. After a successful call to
+enqueue an asynchronous I/O operation, the value of the file offset
+for the file is unspecified.
+.LP
+The \fIaiocbp\fP->\fIaio_lio_opcode\fP field shall be ignored by \fIaio_read\fP().
+.LP
+The \fIaiocbp\fP argument points to an \fBaiocb\fP structure. If the
+buffer pointed to by \fIaiocbp\fP->\fIaio_buf\fP or
+the control block pointed to by \fIaiocbp\fP becomes an illegal address
+prior to asynchronous I/O completion, then the behavior is
+undefined.
+.LP
+Simultaneous asynchronous operations using the same \fIaiocbp\fP produce
+undefined results.
+.LP
+If synchronized I/O is enabled on the file associated with \fIaiocbp\fP->\fIaio_fildes\fP,
+the behavior of this function shall
+be according to the definitions of synchronized I/O data integrity
+completion and synchronized I/O file integrity completion.
+.LP
+For any system action that changes the process memory space while
+an asynchronous I/O is outstanding to the address range being
+changed, the result of that action is undefined.
+.LP
+For regular files, no data transfer shall occur past the offset maximum
+established in the open file description associated with
+\fIaiocbp\fP->\fIaio_fildes\fP.
+.SH RETURN VALUE
+.LP
+The \fIaio_read\fP() function shall return the value zero to the calling
+process if the I/O operation is successfully queued;
+otherwise, the function shall return the value -1 and set \fIerrno\fP
+to indicate the error.
+.SH ERRORS
+.LP
+The \fIaio_read\fP() function shall fail if:
+.TP 7
+.B EAGAIN
+The requested asynchronous I/O operation was not queued due to system
+resource limitations.
+.sp
+.LP
+Each of the following conditions may be detected synchronously at
+the time of the call to \fIaio_read\fP(), or asynchronously.
+If any of the conditions below are detected synchronously, the \fIaio_read\fP()
+function shall return -1 and set \fIerrno\fP to
+the corresponding value. If any of the conditions below are detected
+asynchronously, the return status of the asynchronous
+operation is set to -1, and the error status of the asynchronous operation
+is set to the corresponding value.
+.TP 7
+.B EBADF
+The \fIaiocbp\fP->\fIaio_fildes\fP argument is not a valid file descriptor
+open for reading.
+.TP 7
+.B EINVAL
+The file offset value implied by \fIaiocbp\fP->\fIaio_offset\fP would
+be invalid, \fIaiocbp\fP->\fIaio_reqprio\fP is
+not a valid value, or \fIaiocbp\fP->\fIaio_nbytes\fP is an invalid
+value.
+.sp
+.LP
+In the case that the \fIaio_read\fP() successfully queues the I/O
+operation but the operation is subsequently canceled or
+encounters an error, the return status of the asynchronous operation
+is one of the values normally returned by the \fIread\fP() function
+call. In addition, the error status of the asynchronous operation
+is set to one
+of the error statuses normally set by the \fIread\fP() function call,
+or one of the following
+values:
+.TP 7
+.B EBADF
+The \fIaiocbp\fP->\fIaio_fildes\fP argument is not a valid file descriptor
+open for reading.
+.TP 7
+.B ECANCELED
+The requested I/O was canceled before the I/O completed due to an
+explicit \fIaio_cancel\fP() request.
+.TP 7
+.B EINVAL
+The file offset value implied by \fIaiocbp\fP->\fIaio_offset\fP would
+be invalid.
+.sp
+.LP
+The following condition may be detected synchronously or asynchronously:
+.TP 7
+.B EOVERFLOW
+The file is a regular file, \fIaiobcp\fP->\fIaio_nbytes\fP is greater
+than 0, and the starting offset in
+\fIaiobcp\fP->\fIaio_offset\fP is before the end-of-file and is at
+or beyond the offset maximum in the open file description
+associated with \fIaiocbp\fP->\fIaio_fildes\fP.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIaio_read\fP() function is part of the Asynchronous Input and
+Output option and need not be available on all
+implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIaio_cancel\fP(), \fIaio_error\fP(), \fIlio_listio\fP(), \fIaio_return\fP(),
+\fIaio_write\fP(), \fIclose\fP(), \fIexec\fP(), \fIexit\fP(),
+\fIfork\fP(), \fIlseek\fP(), \fIread\fP(), the Base Definitions
+volume of
+IEEE\ Std\ 1003.1-2001, \fI<aio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/aio_return.3p b/man-pages-posix-2003/man3p/aio_return.3p
new file mode 100644
index 0000000..41fa32f
--- /dev/null
+++ b/man-pages-posix-2003/man3p/aio_return.3p
@@ -0,0 +1,86 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "AIO_RETURN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" aio_return
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+aio_return \- retrieve return status of an asynchronous I/O operation
+(\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <aio.h>
+.br
+.sp
+ssize_t aio_return(struct aiocb *\fP\fIaiocbp\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIaio_return\fP() function shall return the return status associated
+with the \fBaiocb\fP structure referenced by the
+\fIaiocbp\fP argument. The return status for an asynchronous I/O operation
+is the value that would be returned by the
+corresponding \fIread\fP(), \fIwrite\fP(), or \fIfsync\fP() function
+call. If the error status for the operation is equal to [EINPROGRESS],
+then
+the return status for the operation is undefined. The \fIaio_return\fP()
+function may be called exactly once to retrieve the
+return status of a given asynchronous operation; thereafter, if the
+same \fBaiocb\fP structure is used in a call to
+\fIaio_return\fP() or \fIaio_error\fP(), an error may be returned.
+When the
+\fBaiocb\fP structure referred to by \fIaiocbp\fP is used to submit
+another asynchronous operation, then \fIaio_return\fP() may
+be successfully used to retrieve the return status of that operation.
+.SH RETURN VALUE
+.LP
+If the asynchronous I/O operation has completed, then the return status,
+as described for \fIread\fP(), \fIwrite\fP(), and \fIfsync\fP(), shall
+be returned. If the asynchronous I/O operation has not yet completed,
+the
+results of \fIaio_return\fP() are undefined.
+.SH ERRORS
+.LP
+The \fIaio_return\fP() function may fail if:
+.TP 7
+.B EINVAL
+The \fIaiocbp\fP argument does not refer to an asynchronous operation
+whose return status has not yet been retrieved.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIaio_return\fP() function is part of the Asynchronous Input
+and Output option and need not be available on all
+implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIaio_cancel\fP(), \fIaio_error\fP(), \fIaio_fsync\fP(), \fIaio_read\fP(),
+\fIaio_write\fP(), \fIclose\fP(), \fIexec\fP(), \fIexit\fP(),
+\fIfork\fP(), \fIlio_listio\fP(), \fIlseek\fP(), \fIread\fP()
+,
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<aio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/aio_suspend.3p b/man-pages-posix-2003/man3p/aio_suspend.3p
new file mode 100644
index 0000000..e74b3eb
--- /dev/null
+++ b/man-pages-posix-2003/man3p/aio_suspend.3p
@@ -0,0 +1,106 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "AIO_SUSPEND" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" aio_suspend
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+aio_suspend \- wait for an asynchronous I/O request (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <aio.h>
+.br
+.sp
+int aio_suspend(const struct aiocb * const\fP \fIlist\fP\fB[], int\fP
+\fInent\fP\fB,
+.br
+\ \ \ \ \ \ const struct timespec *\fP\fItimeout\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIaio_suspend\fP() function shall suspend the calling thread
+until at least one of the asynchronous I/O operations
+referenced by the \fIlist\fP argument has completed, until a signal
+interrupts the function, or, if \fItimeout\fP is not NULL,
+until the time interval specified by \fItimeout\fP has passed. If
+any of the \fBaiocb\fP structures in the list correspond to
+completed asynchronous I/O operations (that is, the error status for
+the operation is not equal to [EINPROGRESS]) at the time of
+the call, the function shall return without suspending the calling
+thread. The \fIlist\fP argument is an array of pointers to
+asynchronous I/O control blocks. The \fInent\fP argument indicates
+the number of elements in the array. Each \fBaiocb\fP
+structure pointed to has been used in initiating an asynchronous I/O
+request via \fIaio_read\fP(), \fIaio_write\fP(), or \fIlio_listio\fP().
+This array may contain NULL pointers, which are ignored. If this array
+contains pointers that refer to \fBaiocb\fP structures that have not
+been used in submitting asynchronous I/O, the effect is
+undefined.
+.LP
+If the time interval indicated in the \fBtimespec\fP structure pointed
+to by \fItimeout\fP passes before any of the I/O
+operations referenced by \fIlist\fP are completed, then \fIaio_suspend\fP()
+shall return with an error. If the
+Monotonic Clock option is supported, the clock that shall be used
+to measure this time interval shall be the CLOCK_MONOTONIC clock.
+.SH RETURN VALUE
+.LP
+If the \fIaio_suspend\fP() function returns after one or more asynchronous
+I/O operations have completed, the function shall
+return zero. Otherwise, the function shall return a value of -1 and
+set \fIerrno\fP to indicate the error.
+.LP
+The application may determine which asynchronous I/O completed by
+scanning the associated error and return status using \fIaio_error\fP()
+and \fIaio_return\fP(),
+respectively.
+.SH ERRORS
+.LP
+The \fIaio_suspend\fP() function shall fail if:
+.TP 7
+.B EAGAIN
+No asynchronous I/O indicated in the list referenced by \fIlist\fP
+completed in the time interval indicated by
+\fItimeout\fP.
+.TP 7
+.B EINTR
+A signal interrupted the \fIaio_suspend\fP() function. Note that,
+since each asynchronous I/O operation may possibly provoke a
+signal when it completes, this error return may be caused by the completion
+of one (or more) of the very I/O operations being
+awaited.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIaio_suspend\fP() function is part of the Asynchronous Input
+and Output option and need not be available on all
+implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIaio_read\fP(), \fIaio_write\fP(), \fIlio_listio\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<aio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/aio_write.3p b/man-pages-posix-2003/man3p/aio_write.3p
new file mode 100644
index 0000000..2cfb075
--- /dev/null
+++ b/man-pages-posix-2003/man3p/aio_write.3p
@@ -0,0 +1,171 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "AIO_WRITE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" aio_write
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+aio_write \- asynchronous write to a file (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <aio.h>
+.br
+.sp
+int aio_write(struct aiocb *\fP\fIaiocbp\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIaio_write\fP() function shall write \fIaiocbp\fP->\fIaio_nbytes\fP
+to the file associated with
+\fIaiocbp\fP->\fIaio_fildes\fP from the buffer pointed to by \fIaiocbp\fP->\fIaio_buf\fP.
+The function shall return when
+the write request has been initiated or, at a minimum, queued to the
+file or device.
+.LP
+If prioritized I/O is supported for this file, then the asynchronous
+operation shall be submitted at a priority equal to the
+scheduling priority of the process minus \fIaiocbp\fP->\fIaio_reqprio\fP.
+.LP
+The \fIaiocbp\fP argument may be used as an argument to \fIaio_error\fP()
+and \fIaio_return\fP() in order to determine the error status and
+return status, respectively,
+of the asynchronous operation while it is proceeding.
+.LP
+The \fIaiocbp\fP argument points to an \fBaiocb\fP structure. If the
+buffer pointed to by \fIaiocbp\fP->\fIaio_buf\fP or
+the control block pointed to by \fIaiocbp\fP becomes an illegal address
+prior to asynchronous I/O completion, then the behavior is
+undefined.
+.LP
+If O_APPEND is not set for the file descriptor \fIaio_fildes\fP, then
+the requested operation shall take place at the absolute
+position in the file as given by \fIaio_offset\fP, as if \fIlseek\fP()
+were called
+immediately prior to the operation with an \fIoffset\fP equal to \fIaio_offset\fP
+and a \fIwhence\fP equal to SEEK_SET. If
+O_APPEND is set for the file descriptor, write operations append to
+the file in the same order as the calls were made. After a
+successful call to enqueue an asynchronous I/O operation, the value
+of the file offset for the file is unspecified.
+.LP
+The \fIaiocbp\fP->\fIaio_lio_opcode\fP field shall be ignored by \fIaio_write\fP().
+.LP
+Simultaneous asynchronous operations using the same \fIaiocbp\fP produce
+undefined results.
+.LP
+If synchronized I/O is enabled on the file associated with \fIaiocbp\fP->\fIaio_fildes\fP,
+the behavior of this function shall
+be according to the definitions of synchronized I/O data integrity
+completion, and synchronized I/O file integrity completion.
+.LP
+For any system action that changes the process memory space while
+an asynchronous I/O is outstanding to the address range being
+changed, the result of that action is undefined.
+.LP
+For regular files, no data transfer shall occur past the offset maximum
+established in the open file description associated with
+\fIaiocbp\fP->\fIaio_fildes\fP.
+.SH RETURN VALUE
+.LP
+The \fIaio_write\fP() function shall return the value zero to the
+calling process if the I/O operation is successfully queued;
+otherwise, the function shall return the value -1 and set \fIerrno\fP
+to indicate the error.
+.SH ERRORS
+.LP
+The \fIaio_write\fP() function shall fail if:
+.TP 7
+.B EAGAIN
+The requested asynchronous I/O operation was not queued due to system
+resource limitations.
+.sp
+.LP
+Each of the following conditions may be detected synchronously at
+the time of the call to \fIaio_write\fP(), or asynchronously.
+If any of the conditions below are detected synchronously, the \fIaio_write\fP()
+function shall return -1 and set \fIerrno\fP to
+the corresponding value. If any of the conditions below are detected
+asynchronously, the return status of the asynchronous
+operation shall be set to -1, and the error status of the asynchronous
+operation is set to the corresponding value.
+.TP 7
+.B EBADF
+The \fIaiocbp\fP->\fIaio_fildes\fP argument is not a valid file descriptor
+open for writing.
+.TP 7
+.B EINVAL
+The file offset value implied by \fIaiocbp\fP->\fIaio_offset\fP would
+be invalid, \fIaiocbp\fP->\fIaio_reqprio\fP is
+not a valid value, or \fIaiocbp\fP->\fIaio_nbytes\fP is an invalid
+value.
+.sp
+.LP
+In the case that the \fIaio_write\fP() successfully queues the I/O
+operation, the return status of the asynchronous operation
+shall be one of the values normally returned by the \fIwrite\fP()
+function call. If the
+operation is successfully queued but is subsequently canceled or encounters
+an error, the error status for the asynchronous
+operation contains one of the values normally set by the \fIwrite\fP()
+function call, or one
+of the following:
+.TP 7
+.B EBADF
+The \fIaiocbp\fP->\fIaio_fildes\fP argument is not a valid file descriptor
+open for writing.
+.TP 7
+.B EINVAL
+The file offset value implied by \fIaiocbp\fP->\fIaio_offset\fP would
+be invalid.
+.TP 7
+.B ECANCELED
+The requested I/O was canceled before the I/O completed due to an
+explicit \fIaio_cancel\fP() request.
+.sp
+.LP
+The following condition may be detected synchronously or asynchronously:
+.TP 7
+.B EFBIG
+The file is a regular file, \fIaiobcp\fP->\fIaio_nbytes\fP is greater
+than 0, and the starting offset in
+\fIaiobcp\fP->\fIaio_offset\fP is at or beyond the offset maximum
+in the open file description associated with
+\fIaiocbp\fP->\fIaio_fildes\fP.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIaio_write\fP() function is part of the Asynchronous Input and
+Output option and need not be available on all
+implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIaio_cancel\fP(), \fIaio_error\fP(), \fIaio_read\fP(), \fIaio_return\fP(),
+\fIclose\fP(),
+\fIexec\fP(), \fIexit\fP(), \fIfork\fP(), \fIlio_listio\fP(),
+\fIlseek\fP(), \fIwrite\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<aio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/alarm.3p b/man-pages-posix-2003/man3p/alarm.3p
new file mode 100644
index 0000000..dc89a75
--- /dev/null
+++ b/man-pages-posix-2003/man3p/alarm.3p
@@ -0,0 +1,125 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ALARM" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" alarm
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+alarm \- schedule an alarm signal
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+unsigned alarm(unsigned\fP \fIseconds\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIalarm\fP() function shall cause the system to generate a SIGALRM
+signal for the process after the number of realtime
+seconds specified by \fIseconds\fP have elapsed. Processor scheduling
+delays may prevent the process from handling the signal as
+soon as it is generated.
+.LP
+If \fIseconds\fP is 0, a pending alarm request, if any, is canceled.
+.LP
+Alarm requests are not stacked; only one SIGALRM generation can be
+scheduled in this manner. If the SIGALRM signal has not yet
+been generated, the call shall result in rescheduling the time at
+which the SIGALRM signal is generated.
+.LP
+Interactions between \fIalarm\fP() and any of \fIsetitimer\fP(), \fIualarm\fP(),
+or \fIusleep\fP() are unspecified.
+.SH RETURN VALUE
+.LP
+If there is a previous \fIalarm\fP() request with time remaining,
+\fIalarm\fP() shall return a non-zero value that is the
+number of seconds until the previous request would have generated
+a SIGALRM signal. Otherwise, \fIalarm\fP() shall return 0.
+.SH ERRORS
+.LP
+The \fIalarm\fP() function is always successful, and no return value
+is reserved to indicate an error.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIfork\fP() function clears pending alarms in the child process.
+A new process image
+created by one of the \fIexec\fP functions inherits the time left
+to an alarm signal in the
+old process' image.
+.LP
+Application writers should note that the type of the argument \fIseconds\fP
+and the return value of \fIalarm\fP() is
+\fBunsigned\fP. That means that a Strictly Conforming POSIX System
+Interfaces Application cannot pass a value greater than the
+minimum guaranteed value for {UINT_MAX}, which the ISO\ C standard
+sets as 65535, and any application passing a larger value is
+restricting its portability. A different type was considered, but
+historical implementations, including those with a 16-bit
+\fBint\fP type, consistently use either \fBunsigned\fP or \fBint\fP.
+.LP
+Application writers should be aware of possible interactions when
+the same process uses both the \fIalarm\fP() and \fIsleep\fP() functions.
+.SH RATIONALE
+.LP
+Many historical implementations (including Version 7 and System V)
+allow an alarm to occur up to a second early. Other
+implementations allow alarms up to half a second or one clock tick
+early or do not allow them to occur early at all. The latter is
+considered most appropriate, since it gives the most predictable behavior,
+especially since the signal can always be delayed for an
+indefinite amount of time due to scheduling. Applications can thus
+choose the \fIseconds\fP argument as the minimum amount of time
+they wish to have elapse before the signal.
+.LP
+The term "realtime" here and elsewhere ( \fIsleep\fP(), \fItimes\fP())
+is intended to mean "wall clock" time as common English usage, and
+has nothing to
+do with "realtime operating systems". It is in contrast to \fIvirtual
+time\fP, which could be misinterpreted if just \fItime\fP
+were used.
+.LP
+In some implementations, including 4.3 BSD, very large values of the
+\fIseconds\fP argument are silently rounded down to an
+implementation-defined maximum value. This maximum is large enough
+(to the order of several months) that the effect is not
+noticeable.
+.LP
+There were two possible choices for alarm generation in multi-threaded
+applications: generation for the calling thread or
+generation for the process. The first option would not have been particularly
+useful since the alarm state is maintained on a
+per-process basis and the alarm that is established by the last invocation
+of \fIalarm\fP() is the only one that would be
+active.
+.LP
+Furthermore, allowing generation of an asynchronous signal for a thread
+would have introduced an exception to the overall signal
+model. This requires a compelling reason in order to be justified.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+alarm, \fIexec\fP(), \fIfork\fP(), \fIgetitimer\fP(), \fIpause\fP(),
+\fIsigaction\fP(), \fIsleep\fP(), \fIualarm\fP(),
+\fIusleep\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<signal.h>\fP, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/asctime.3p b/man-pages-posix-2003/man3p/asctime.3p
new file mode 100644
index 0000000..0dfec6a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/asctime.3p
@@ -0,0 +1,145 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ASCTIME" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" asctime
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+asctime, asctime_r \- convert date and time to a string
+.SH SYNOPSIS
+.LP
+\fB#include <time.h>
+.br
+.sp
+char *asctime(const struct tm *\fP\fItimeptr\fP\fB);
+.br
+\fP
+.LP
+\fBchar *asctime_r(const struct tm *restrict\fP \fItm\fP\fB, char
+*restrict\fP \fIbuf\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+For \fIasctime\fP(): The functionality described on this reference
+page is aligned with the ISO\ C standard. Any
+conflict between the requirements described here and the ISO\ C standard
+is unintentional. This volume of
+IEEE\ Std\ 1003.1-2001 defers to the ISO\ C standard.
+.LP
+The \fIasctime\fP() function shall convert the broken-down time in
+the structure pointed to by \fItimeptr\fP into a string in
+the form:
+.sp
+.RS
+.nf
+
+\fBSun Sep 16 01:03:52 1973\\n\\0
+\fP
+.fi
+.RE
+.LP
+using the equivalent of the following algorithm:
+.sp
+.RS
+.nf
+
+\fBchar *asctime(const struct tm *timeptr)
+{
+ static char wday_name[7][3] = {
+ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
+ };
+ static char mon_name[12][3] = {
+ "Jan", "Feb", "Mar", "Apr", "May", "Jun",
+ "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
+ };
+ static char result[26];
+.sp
+
+ sprintf(result, "%.3s %.3s%3d %.2d:%.2d:%.2d %d\\n",
+ wday_name[timeptr->tm_wday],
+ mon_name[timeptr->tm_mon],
+ timeptr->tm_mday, timeptr->tm_hour,
+ timeptr->tm_min, timeptr->tm_sec,
+ 1900 + timeptr->tm_year);
+ return result;
+}
+\fP
+.fi
+.RE
+.LP
+The \fBtm\fP structure is defined in the \fI<time.h>\fP header.
+.LP
+The
+\fIasctime\fP(), \fIctime\fP(), \fIgmtime\fP(), and
+\fIlocaltime\fP() functions shall return values in one of two static
+objects: a
+broken-down time structure and an array of type \fBchar\fP. Execution
+of any of the functions may overwrite the information
+returned in either of these objects by any of the other functions.
+.LP
+The \fIasctime\fP() function need not be reentrant. A function that
+is not required to be reentrant is not required to be
+thread-safe.
+.LP
+The \fIasctime_r\fP() function shall convert the broken-down time
+in the structure pointed to by \fItm\fP into a string (of the
+same form as that returned by \fIasctime\fP()) that is placed in the
+user-supplied buffer pointed to by \fIbuf\fP (which shall
+contain at least 26 bytes) and then return \fIbuf\fP.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIasctime\fP() shall return a pointer
+to the string.
+.LP
+Upon successful completion, \fIasctime_r\fP() shall return a pointer
+to a character string containing the date and time. This
+string is pointed to by the argument \fIbuf\fP. If the function is
+unsuccessful, it shall return NULL.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Values for the broken-down time structure can be obtained by calling
+\fIgmtime\fP() or
+\fIlocaltime\fP(). This function is included for compatibility with
+older
+implementations, and does not support localized date and time formats.
+Applications should use \fIstrftime\fP() to achieve maximum portability.
+.LP
+The \fIasctime_r\fP() function is thread-safe and shall return values
+in a user-supplied buffer instead of possibly using a
+static data area that may be overwritten by each call.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIclock\fP(), \fIctime\fP(), \fIdifftime\fP(), \fIgmtime\fP(),
+\fIlocaltime\fP(),
+\fImktime\fP(), \fIstrftime\fP(), \fIstrptime\fP(), \fItime\fP(),
+\fIutime\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<time.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/asctime_r.3p b/man-pages-posix-2003/man3p/asctime_r.3p
new file mode 100644
index 0000000..bec3ea3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/asctime_r.3p
@@ -0,0 +1 @@
+.so man3p/asctime.3p
diff --git a/man-pages-posix-2003/man3p/asin.3p b/man-pages-posix-2003/man3p/asin.3p
new file mode 100644
index 0000000..6c16b0c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/asin.3p
@@ -0,0 +1,114 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ASIN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" asin
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+asin, asinf, asinl \- arc sine function
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double asin(double\fP \fIx\fP\fB);
+.br
+float asinf(float\fP \fIx\fP\fB);
+.br
+long double asinl(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the principal value of the arc sine
+of their argument \fIx\fP. The value of \fIx\fP should be in
+the range [-1,1].
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the arc sine
+of \fIx\fP, in the range [-pi/2,pi/2] radians.
+.LP
+For finite values of \fIx\fP not in the range [-1,1], a domain error
+shall occur, and either a NaN
+(if supported), or an implementation-defined value shall be
+returned.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is \(+-0, \fIx\fP shall be returned.
+.LP
+If \fIx\fP is \(+-Inf, a domain error shall occur, and either a NaN
+(if supported), or an implementation-defined value
+shall be returned.
+.LP
+If \fIx\fP is subnormal, a range error may occur and \fIx\fP should
+be returned.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Domain\ Error
+The \fIx\fP argument is finite and is not in the range [-1,1], or
+is \(+-Inf.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [EDOM]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the invalid floating-point exception shall be
+raised.
+.sp
+.LP
+These functions may fail if:
+.TP 7
+Range\ Error
+The value of \fIx\fP is subnormal.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the underflow floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIisnan\fP(), \fIsin\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment of Error Conditions
+for
+Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/asinf.3p b/man-pages-posix-2003/man3p/asinf.3p
new file mode 100644
index 0000000..6af1cbe
--- /dev/null
+++ b/man-pages-posix-2003/man3p/asinf.3p
@@ -0,0 +1 @@
+.so man3p/asin.3p
diff --git a/man-pages-posix-2003/man3p/asinh.3p b/man-pages-posix-2003/man3p/asinh.3p
new file mode 100644
index 0000000..e359831
--- /dev/null
+++ b/man-pages-posix-2003/man3p/asinh.3p
@@ -0,0 +1,89 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ASINH" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" asinh
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+asinh, asinhf, asinhl \- inverse hyperbolic sine functions
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double asinh(double\fP \fIx\fP\fB);
+.br
+float asinhf(float\fP \fIx\fP\fB);
+.br
+long double asinhl(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the inverse hyperbolic sine of their
+argument \fIx\fP.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the inverse
+hyperbolic sine of their argument.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is \(+-0, or \(+-Inf, \fIx\fP shall be returned.
+.LP
+If \fIx\fP is subnormal, a range error may occur and \fIx\fP should
+be returned.
+.SH ERRORS
+.LP
+These functions may fail if:
+.TP 7
+Range\ Error
+The value of \fIx\fP is subnormal.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the underflow floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIsinh\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment
+of Error Conditions for Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/asinhf.3p b/man-pages-posix-2003/man3p/asinhf.3p
new file mode 100644
index 0000000..7932c66
--- /dev/null
+++ b/man-pages-posix-2003/man3p/asinhf.3p
@@ -0,0 +1 @@
+.so man3p/asinh.3p
diff --git a/man-pages-posix-2003/man3p/asinhl.3p b/man-pages-posix-2003/man3p/asinhl.3p
new file mode 100644
index 0000000..7932c66
--- /dev/null
+++ b/man-pages-posix-2003/man3p/asinhl.3p
@@ -0,0 +1 @@
+.so man3p/asinh.3p
diff --git a/man-pages-posix-2003/man3p/asinl.3p b/man-pages-posix-2003/man3p/asinl.3p
new file mode 100644
index 0000000..6af1cbe
--- /dev/null
+++ b/man-pages-posix-2003/man3p/asinl.3p
@@ -0,0 +1 @@
+.so man3p/asin.3p
diff --git a/man-pages-posix-2003/man3p/assert.3p b/man-pages-posix-2003/man3p/assert.3p
new file mode 100644
index 0000000..c7d7096
--- /dev/null
+++ b/man-pages-posix-2003/man3p/assert.3p
@@ -0,0 +1,72 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ASSERT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" assert
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+assert \- insert program diagnostics
+.SH SYNOPSIS
+.LP
+\fB#include <assert.h>
+.br
+.sp
+void assert(scalar\fP \fIexpression\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIassert\fP() macro shall insert diagnostics into programs; it
+shall expand to a \fBvoid\fP expression. When it is
+executed, if \fIexpression\fP (which shall have a \fBscalar\fP type)
+is false (that is, compares equal to 0), \fIassert\fP()
+shall write information about the particular call that failed on \fIstderr\fP
+and shall call \fIabort\fP().
+.LP
+The information written about the call that failed shall include the
+text of the argument, the name of the source file, the
+source file line number, and the name of the enclosing function; the
+latter are, respectively, the values of the preprocessing
+macros __FILE__ and __LINE__ and of the identifier __func__.
+.LP
+Forcing a definition of the name NDEBUG, either from the compiler
+command line or with the preprocessor control statement
+\fB#define\fP NDEBUG ahead of the \fB#include\fP \fI<assert.h>\fP
+statement, shall
+stop assertions from being compiled into the program.
+.SH RETURN VALUE
+.LP
+The \fIassert\fP() macro shall not return a value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIabort\fP(), \fIstderr\fP, the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<assert.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/atan.3p b/man-pages-posix-2003/man3p/atan.3p
new file mode 100644
index 0000000..dd7e4f0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/atan.3p
@@ -0,0 +1,92 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ATAN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" atan
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+atan, atanf, atanl \- arc tangent function
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double atan(double\fP \fIx\fP\fB);
+.br
+float atanf(float\fP \fIx\fP\fB);
+.br
+long double atanl(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the principal value of the arc tangent
+of their argument \fIx\fP.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the arc tangent
+of \fIx\fP in the range [-pi/2,pi/2] radians.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is \(+-0, \fIx\fP shall be returned.
+.LP
+If \fIx\fP is \(+-Inf, \(+-pi/2 shall be returned.
+.LP
+If \fIx\fP is subnormal, a range error may occur and \fIx\fP should
+be returned.
+.SH ERRORS
+.LP
+These functions may fail if:
+.TP 7
+Range\ Error
+The value of \fIx\fP is subnormal.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the underflow floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIatan2\fP(), \fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIisnan\fP(),
+\fItan\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment
+of Error Conditions for Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/atan2.3p b/man-pages-posix-2003/man3p/atan2.3p
new file mode 100644
index 0000000..05b1b37
--- /dev/null
+++ b/man-pages-posix-2003/man3p/atan2.3p
@@ -0,0 +1,120 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ATAN2" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" atan2
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+atan2, atan2f, atan2l \- arc tangent functions
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double atan2(double\fP \fIy\fP\fB, double\fP \fIx\fP\fB);
+.br
+float atan2f(float\fP \fIy\fP\fB, float\fP \fIx\fP\fB);
+.br
+long double atan2l(long double\fP \fIy\fP\fB, long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the principal value of the arc tangent
+of \fIy\fP/ \fIx\fP, using the signs of both arguments to
+determine the quadrant of the return value.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the arc tangent
+of \fIy\fP/ \fIx\fP in the range [-pi,pi] radians.
+.LP
+If \fIy\fP is \(+-0 and \fIx\fP is < 0, \(+-pi shall be returned.
+.LP
+If \fIy\fP is \(+-0 and \fIx\fP is > 0, \(+-0 shall be returned.
+.LP
+If \fIy\fP is < 0 and \fIx\fP is \(+-0, -pi/2 shall be returned.
+.LP
+If \fIy\fP is > 0 and \fIx\fP is \(+-0, pi/2 shall be returned.
+.LP
+If \fIx\fP is 0, a pole error shall not occur.
+.LP
+If
+either \fIx\fP or \fIy\fP is NaN, a NaN shall be returned.
+.LP
+If the result underflows, a range error may occur and \fIy\fP/ \fIx\fP
+should be returned.
+.LP
+If \fIy\fP is \(+-0 and \fIx\fP is -0, \(+-pi shall be returned.
+.LP
+If \fIy\fP is \(+-0 and \fIx\fP is +0, \(+-0 shall be returned.
+.LP
+For finite values of \(+- \fIy\fP > 0, if \fIx\fP is -Inf, \(+-pi
+shall be
+returned.
+.LP
+For finite values of \(+- \fIy\fP > 0, if \fIx\fP is +Inf, \(+-0 shall
+be returned.
+.LP
+For finite values of \fIx\fP, if \fIy\fP is \(+-Inf, \(+-pi/2 shall
+be
+returned.
+.LP
+If \fIy\fP is \(+-Inf and \fIx\fP is -Inf, \(+-3pi/4 shall be returned.
+.LP
+If \fIy\fP is \(+-Inf and \fIx\fP is +Inf, \(+-pi/4 shall be returned.
+.LP
+If both arguments are 0, a domain error shall not occur.
+.SH ERRORS
+.LP
+These functions may fail if:
+.TP 7
+Range\ Error
+The result underflows.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the underflow floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIatan\fP(), \fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIisnan\fP(),
+\fItan\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment
+of Error Conditions for Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/atan2f.3p b/man-pages-posix-2003/man3p/atan2f.3p
new file mode 100644
index 0000000..6a6dd83
--- /dev/null
+++ b/man-pages-posix-2003/man3p/atan2f.3p
@@ -0,0 +1 @@
+.so man3p/atan2.3p
diff --git a/man-pages-posix-2003/man3p/atan2l.3p b/man-pages-posix-2003/man3p/atan2l.3p
new file mode 100644
index 0000000..6a6dd83
--- /dev/null
+++ b/man-pages-posix-2003/man3p/atan2l.3p
@@ -0,0 +1 @@
+.so man3p/atan2.3p
diff --git a/man-pages-posix-2003/man3p/atanf.3p b/man-pages-posix-2003/man3p/atanf.3p
new file mode 100644
index 0000000..b87fd3a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/atanf.3p
@@ -0,0 +1 @@
+.so man3p/atan.3p
diff --git a/man-pages-posix-2003/man3p/atanh.3p b/man-pages-posix-2003/man3p/atanh.3p
new file mode 100644
index 0000000..a39216c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/atanh.3p
@@ -0,0 +1,125 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ATANH" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" atanh
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+atanh, atanhf, atanhl \- inverse hyperbolic tangent functions
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double atanh(double\fP \fIx\fP\fB);
+.br
+float atanhf(float\fP \fIx\fP\fB);
+.br
+long double atanhl(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the inverse hyperbolic tangent of their
+argument \fIx\fP.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the inverse
+hyperbolic tangent of their argument.
+.LP
+If \fIx\fP is \(+-1, a pole error shall occur, and \fIatanh\fP(),
+\fIatanhf\fP(), and \fIatanhl\fP() shall return the
+value of the macro HUGE_VAL, HUGE_VALF, and HUGE_VALL, respectively,
+with the same sign as the correct value of the function.
+.LP
+For finite |\fIx\fP|>1, a domain error shall occur, and either
+a NaN (if supported), or an implementation-defined value shall
+be returned.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is \(+-0, \fIx\fP shall be returned.
+.LP
+If \fIx\fP is \(+-Inf, a domain error shall occur, and either a NaN
+(if supported), or an implementation-defined value
+shall be returned.
+.LP
+If \fIx\fP is subnormal, a range error may occur and \fIx\fP should
+be returned.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Domain\ Error
+The \fIx\fP argument is finite and not in the range [-1,1], or
+is \(+-Inf.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [EDOM]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the invalid floating-point exception shall be
+raised.
+.TP 7
+Pole\ Error
+The \fIx\fP argument is \(+-1.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the divide-by-zero floating-point exception shall be
+raised.
+.sp
+.sp
+.LP
+These functions may fail if:
+.TP 7
+Range\ Error
+The value of \fIx\fP is subnormal.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the underflow floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fItanh\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment
+of Error Conditions for Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/atanhf.3p b/man-pages-posix-2003/man3p/atanhf.3p
new file mode 100644
index 0000000..a7a2ec1
--- /dev/null
+++ b/man-pages-posix-2003/man3p/atanhf.3p
@@ -0,0 +1 @@
+.so man3p/atanh.3p
diff --git a/man-pages-posix-2003/man3p/atanhl.3p b/man-pages-posix-2003/man3p/atanhl.3p
new file mode 100644
index 0000000..a7a2ec1
--- /dev/null
+++ b/man-pages-posix-2003/man3p/atanhl.3p
@@ -0,0 +1 @@
+.so man3p/atanh.3p
diff --git a/man-pages-posix-2003/man3p/atanl.3p b/man-pages-posix-2003/man3p/atanl.3p
new file mode 100644
index 0000000..b87fd3a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/atanl.3p
@@ -0,0 +1 @@
+.so man3p/atan.3p
diff --git a/man-pages-posix-2003/man3p/atexit.3p b/man-pages-posix-2003/man3p/atexit.3p
new file mode 100644
index 0000000..4a68bf7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/atexit.3p
@@ -0,0 +1,76 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ATEXIT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" atexit
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+atexit \- register a function to run at process termination
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+int atexit(void (*\fP\fIfunc\fP\fB)(void));
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIatexit\fP() function shall register the function pointed to
+by \fIfunc\fP, to be called without arguments at normal
+program termination. At normal program termination, all functions
+registered by the \fIatexit\fP() function shall be called, in
+the reverse order of their registration, except that a function is
+called after any previously registered functions that had
+already been called at the time it was registered. Normal termination
+occurs either by a call to \fIexit\fP() or a return from \fImain\fP().
+.LP
+At least 32 functions can be registered with \fIatexit\fP().
+.LP
+After a successful call to any of the \fIexec\fP functions, any functions
+previously
+registered by \fIatexit\fP() shall no longer be registered.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIatexit\fP() shall return 0; otherwise,
+it shall return a non-zero value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The functions registered by a call to \fIatexit\fP() must return to
+ensure that all registered functions are called.
+.LP
+The application should call \fIsysconf\fP() to obtain the value of
+{ATEXIT_MAX}, the
+number of functions that can be registered. There is no way for an
+application to tell how many functions have already been
+registered with \fIatexit\fP().
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexit\fP(), \fIsysconf\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/atof.3p b/man-pages-posix-2003/man3p/atof.3p
new file mode 100644
index 0000000..95c8f6b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/atof.3p
@@ -0,0 +1,72 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ATOF" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" atof
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+atof \- convert a string to a double-precision number
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+double atof(const char *\fP\fIstr\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The call \fIatof\fP(\fIstr\fP) shall be equivalent to:
+.sp
+.RS
+.nf
+
+\fBstrtod(\fP\fIstr\fP\fB,(char **)NULL),
+\fP
+.fi
+.RE
+.LP
+except that the handling of errors may differ. If the value cannot
+be represented, the behavior is undefined.
+.SH RETURN VALUE
+.LP
+The \fIatof\fP() function shall return the converted value if the
+value can be represented.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIatof\fP() function is subsumed by \fIstrtod\fP() but is retained
+because it is
+used extensively in existing code. If the number is not known to be
+in range, \fIstrtod\fP() should be used because \fIatof\fP() is not
+required to perform any error
+checking.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIstrtod\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/atoi.3p b/man-pages-posix-2003/man3p/atoi.3p
new file mode 100644
index 0000000..f058117
--- /dev/null
+++ b/man-pages-posix-2003/man3p/atoi.3p
@@ -0,0 +1,92 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ATOI" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" atoi
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+atoi \- convert a string to an integer
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+int atoi(const char *\fP\fIstr\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The call \fIatoi\fP(\fIstr\fP) shall be equivalent to:
+.sp
+.RS
+.nf
+
+\fB(int) strtol(str, (char **)NULL, 10)
+\fP
+.fi
+.RE
+.LP
+except that the handling of errors may differ. If the value cannot
+be represented, the behavior is undefined.
+.SH RETURN VALUE
+.LP
+The \fIatoi\fP() function shall return the converted value if the
+value can be represented.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Converting an Argument
+.LP
+The following example checks for proper usage of the program. If there
+is an argument and the decimal conversion of this
+argument (obtained using \fIatoi\fP()) is greater than 0, then the
+program has a valid number of minutes to wait for an event.
+.sp
+.RS
+.nf
+
+\fB#include <stdlib.h>
+#include <stdio.h>
+\&...
+int minutes_to_event;
+\&...
+if (argc < 2 || ((minutes_to_event = atoi (argv[1]))) <= 0) {
+ fprintf(stderr, "Usage: %s minutes\\n", argv[0]); exit(1);
+}
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The \fIatoi\fP() function is subsumed by \fIstrtol\fP() but is retained
+because it is
+used extensively in existing code. If the number is not known to be
+in range, \fIstrtol\fP() should be used because \fIatoi\fP() is not
+required to perform any error
+checking.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIstrtol\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/atol.3p b/man-pages-posix-2003/man3p/atol.3p
new file mode 100644
index 0000000..a5630e3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/atol.3p
@@ -0,0 +1,84 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ATOL" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" atol
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+atol, atoll \- convert a string to a long integer
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+long atol(const char *\fP\fIstr\fP\fB);
+.br
+long long atoll(const char *\fP\fInptr\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The call \fIatol\fP(\fIstr\fP) shall be equivalent to:
+.sp
+.RS
+.nf
+
+\fBstrtol(str, (char **)NULL, 10)
+\fP
+.fi
+.RE
+.LP
+The call \fIatoll\fP(\fIstr\fP) shall be equivalent to:
+.sp
+.RS
+.nf
+
+\fBstrtoll(nptr, (char **)NULL, 10)
+\fP
+.fi
+.RE
+.LP
+except that the handling of errors may differ. If the value cannot
+be represented, the behavior is undefined.
+.SH RETURN VALUE
+.LP
+These functions shall return the converted value if the value can
+be represented.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIatol\fP() function is subsumed by \fIstrtol\fP() but is retained
+because it is
+used extensively in existing code. If the number is not known to be
+in range, \fIstrtol\fP() should be used because \fIatol\fP() is not
+required to perform any error
+checking.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIstrtol\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/atoll.3p b/man-pages-posix-2003/man3p/atoll.3p
new file mode 100644
index 0000000..b465433
--- /dev/null
+++ b/man-pages-posix-2003/man3p/atoll.3p
@@ -0,0 +1 @@
+.so man3p/atol.3p
diff --git a/man-pages-posix-2003/man3p/basename.3p b/man-pages-posix-2003/man3p/basename.3p
new file mode 100644
index 0000000..bc50aa5
--- /dev/null
+++ b/man-pages-posix-2003/man3p/basename.3p
@@ -0,0 +1,109 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "BASENAME" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" basename
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+basename \- return the last component of a pathname
+.SH SYNOPSIS
+.LP
+\fB#include <libgen.h>
+.br
+.sp
+char *basename(char *\fP\fIpath\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIbasename\fP() function shall take the pathname pointed to by
+\fIpath\fP and return a pointer to the final component of
+the pathname, deleting any trailing \fB'/'\fP characters.
+.LP
+If the string consists entirely of the \fB'/'\fP character, \fIbasename\fP()
+shall return a pointer to the string
+\fB"/"\fP . If the string is exactly \fB"//"\fP, it is implementation-defined
+whether \fB'/'\fP or \fB"//"\fP is
+returned.
+.LP
+If \fIpath\fP is a null pointer or points to an empty string, \fIbasename\fP()
+shall return a pointer to the string
+\fB"."\fP .
+.LP
+The \fIbasename\fP() function may modify the string pointed to by
+\fIpath\fP, and may return a pointer to static storage that
+may then be overwritten by a subsequent call to \fIbasename\fP().
+.LP
+The \fIbasename\fP() function need not be reentrant. A function that
+is not required to be reentrant is not required to be
+thread-safe.
+.SH RETURN VALUE
+.LP
+The \fIbasename\fP() function shall return a pointer to the final
+component of \fIpath\fP.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Using basename()
+.LP
+The following program fragment returns a pointer to the value \fIlib\fP,
+which is the base name of \fB/usr/lib\fP.
+.sp
+.RS
+.nf
+
+\fB#include <libgen.h>
+\&...
+char *name = "/usr/lib";
+char *base;
+.sp
+
+base = basename(name);
+\&...
+\fP
+.fi
+.RE
+.SS Sample Input and Output Strings for basename()
+.LP
+In the following table, the input string is the value pointed to by
+\fIpath\fP, and the output string is the return value of
+the \fIbasename\fP() function.
+.TS C
+center; l l.
+\fBInput String\fP \fBOutput String\fP
+"/usr/lib" "lib"
+"/usr/" "usr"
+"/" "/"
+"///" "/"
+"//usr//lib//" "lib"
+.TE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIdirname\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<libgen.h>\fP, the Shell and Utilities volume of IEEE\ Std\ 1003.1-2001,
+\fIbasename\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/bcmp.3p b/man-pages-posix-2003/man3p/bcmp.3p
new file mode 100644
index 0000000..54e4bc7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/bcmp.3p
@@ -0,0 +1,73 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "BCMP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" bcmp
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+bcmp \- memory operations (\fBLEGACY\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <strings.h>
+.br
+.sp
+int bcmp(const void *\fP\fIs1\fP\fB, const void *\fP\fIs2\fP\fB, size_t\fP
+\fIn\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIbcmp\fP() function shall compare the first \fIn\fP bytes of
+the area pointed to by \fIs1\fP with the area pointed to
+by \fIs2\fP.
+.SH RETURN VALUE
+.LP
+The \fIbcmp\fP() function shall return 0 if \fIs1\fP and \fIs2\fP
+are identical; otherwise, it shall return non-zero. Both
+areas are assumed to be \fIn\fP bytes long. If the value of \fIn\fP
+is 0, \fIbcmp\fP() shall return 0.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fImemcmp\fP() function is preferred over this function.
+.LP
+For maximum portability, it is recommended to replace the function
+call to \fIbcmp\fP() as follows:
+.sp
+.RS
+.nf
+
+\fB#define bcmp(b1,b2,len) memcmp((b1), (b2), (size_t)(len))
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+This function may be withdrawn in a future version.
+.SH SEE ALSO
+.LP
+\fImemcmp\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<strings.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/bcopy.3p b/man-pages-posix-2003/man3p/bcopy.3p
new file mode 100644
index 0000000..c0e538f
--- /dev/null
+++ b/man-pages-posix-2003/man3p/bcopy.3p
@@ -0,0 +1,84 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "BCOPY" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" bcopy
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+bcopy \- memory operations (\fBLEGACY\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <strings.h>
+.br
+.sp
+void bcopy(const void *\fP\fIs1\fP\fB, void *\fP\fIs2\fP\fB, size_t\fP
+\fIn\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIbcopy\fP() function shall copy \fIn\fP bytes from the area
+pointed to by \fIs1\fP to the area pointed to by
+\fIs2\fP.
+.LP
+The bytes are copied correctly even if the area pointed to by \fIs1\fP
+overlaps the area pointed to by \fIs2\fP.
+.SH RETURN VALUE
+.LP
+The \fIbcopy\fP() function shall not return a value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fImemmove\fP() function is preferred over this function.
+.LP
+The following are approximately equivalent (note the order of the
+arguments):
+.sp
+.RS
+.nf
+
+\fBbcopy(s1,s2,n) ~= memmove(s2,s1,n)
+\fP
+.fi
+.RE
+.LP
+For maximum portability, it is recommended to replace the function
+call to \fIbcopy\fP() as follows:
+.sp
+.RS
+.nf
+
+\fB#define bcopy(b1,b2,len) (memmove((b2), (b1), (len)), (void) 0)
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+This function may be withdrawn in a future version.
+.SH SEE ALSO
+.LP
+\fImemmove\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<strings.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/bind.3p b/man-pages-posix-2003/man3p/bind.3p
new file mode 100644
index 0000000..a8b72f0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/bind.3p
@@ -0,0 +1,169 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "BIND" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" bind
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+bind \- bind a name to a socket
+.SH SYNOPSIS
+.LP
+\fB#include <sys/socket.h>
+.br
+.sp
+int bind(int\fP \fIsocket\fP\fB, const struct sockaddr *\fP\fIaddress\fP\fB,
+.br
+\ \ \ \ \ \ socklen_t\fP \fIaddress_len\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIbind\fP() function shall assign a local socket address \fIaddress\fP
+to a socket identified by descriptor \fIsocket\fP
+that has no local socket address assigned. Sockets created with the
+\fIsocket\fP() function
+are initially unnamed; they are identified only by their address family.
+.LP
+The \fIbind\fP() function takes the following arguments:
+.TP 7
+\fIsocket\fP
+Specifies the file descriptor of the socket to be bound.
+.TP 7
+\fIaddress\fP
+Points to a \fBsockaddr\fP structure containing the address to be
+bound to the socket. The length and format of the address
+depend on the address family of the socket.
+.TP 7
+\fIaddress_len\fP
+Specifies the length of the \fBsockaddr\fP structure pointed to by
+the \fIaddress\fP argument.
+.sp
+.LP
+The socket specified by \fIsocket\fP may require the process to have
+appropriate privileges to use the \fIbind\fP()
+function.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIbind\fP() shall return 0; otherwise,
+-1 shall be returned and \fIerrno\fP set to indicate the
+error.
+.SH ERRORS
+.LP
+The \fIbind\fP() function shall fail if:
+.TP 7
+.B EADDRINUSE
+The specified address is already in use.
+.TP 7
+.B EADDRNOTAVAIL
+The specified address is not available from the local machine.
+.TP 7
+.B EAFNOSUPPORT
+The specified address is not a valid address for the address family
+of the specified socket.
+.TP 7
+.B EBADF
+The \fIsocket\fP argument is not a valid file descriptor.
+.TP 7
+.B EINVAL
+The socket is already bound to an address, and the protocol does not
+support binding to a new address; or the socket has been
+shut down.
+.TP 7
+.B ENOTSOCK
+The \fIsocket\fP argument does not refer to a socket.
+.TP 7
+.B EOPNOTSUPP
+The socket type of the specified socket does not support binding to
+an address.
+.sp
+.LP
+If the address family of the socket is AF_UNIX, then \fIbind\fP()
+shall fail if:
+.TP 7
+.B EACCES
+A component of the path prefix denies search permission, or the requested
+name requires writing in a directory with a mode that
+denies write permission.
+.TP 7
+.B EDESTADDRREQ \fRor\fP EISDIR
+The \fIaddress\fP argument is a null pointer.
+.TP 7
+.B EIO
+An I/O error occurred.
+.TP 7
+.B ELOOP
+A loop exists in symbolic links encountered during resolution of the
+pathname in \fIaddress\fP.
+.TP 7
+.B ENAMETOOLONG
+A component of a pathname exceeded {NAME_MAX} characters, or an entire
+pathname exceeded {PATH_MAX} characters.
+.TP 7
+.B ENOENT
+A component of the pathname does not name an existing file or the
+pathname is an empty string.
+.TP 7
+.B ENOTDIR
+A component of the path prefix of the pathname in \fIaddress\fP is
+not a directory.
+.TP 7
+.B EROFS
+The name would reside on a read-only file system.
+.sp
+.LP
+The \fIbind\fP() function may fail if:
+.TP 7
+.B EACCES
+The specified address is protected and the current user does not have
+permission to bind to it.
+.TP 7
+.B EINVAL
+The \fIaddress_len\fP argument is not a valid length for the address
+family.
+.TP 7
+.B EISCONN
+The socket is already connected.
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the pathname in \fIaddress\fP.
+.TP 7
+.B ENAMETOOLONG
+Pathname resolution of a symbolic link produced an intermediate result
+whose length exceeds {PATH_MAX}.
+.TP 7
+.B ENOBUFS
+Insufficient resources were available to complete the call.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+An application program can retrieve the assigned socket name with
+the \fIgetsockname\fP() function.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIconnect\fP(), \fIgetsockname\fP(), \fIlisten\fP(), \fIsocket\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<sys/socket.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/bsd_signal.3p b/man-pages-posix-2003/man3p/bsd_signal.3p
new file mode 100644
index 0000000..1c7c670
--- /dev/null
+++ b/man-pages-posix-2003/man3p/bsd_signal.3p
@@ -0,0 +1,113 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "BSD_SIGNAL" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" bsd_signal
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+bsd_signal \- simplified signal facilities
+.SH SYNOPSIS
+.LP
+\fB#include <signal.h>
+.br
+.sp
+void (*bsd_signal(int\fP \fIsig\fP\fB, void (*\fP\fIfunc\fP\fB)(int)))(int);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIbsd_signal\fP() function provides a partially compatible interface
+for programs written to historical system interfaces
+(see APPLICATION USAGE).
+.LP
+The function call \fIbsd_signal\fP(\fIsig\fP, \fIfunc\fP) shall be
+equivalent to the following:
+.sp
+.RS
+.nf
+
+\fBvoid (*bsd_signal(int sig, void (*func)(int)))(int)
+{
+ struct sigaction act, oact;
+.sp
+
+ act.sa_handler =\fP \fIfunc\fP\fB;
+ act.sa_flags = SA_RESTART;
+
+ sigemptyset(&act.sa_mask);
+ sigaddset(&act.sa_mask,\fP \fIsig\fP\fB);
+ if (sigaction(\fP\fIsig\fP\fB, &act, &oact) == -1)
+ return(SIG_ERR);
+
+ return(oact.sa_handler);
+}
+\fP
+.fi
+.RE
+.LP
+The handler function should be declared:
+.sp
+.RS
+.nf
+
+\fBvoid handler(int\fP \fIsig\fP\fB);
+\fP
+.fi
+.RE
+.LP
+where \fIsig\fP is the signal number. The behavior is undefined if
+\fIfunc\fP is a function that takes more than one argument,
+or an argument of a different type.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIbsd_signal\fP() shall return the previous
+action for \fIsig\fP. Otherwise, SIG_ERR shall be
+returned and \fIerrno\fP shall be set to indicate the error.
+.SH ERRORS
+.LP
+Refer to \fIsigaction\fP().
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+This function is a direct replacement for the BSD \fIsignal\fP() function
+for simple
+applications that are installing a single-argument signal handler
+function. If a BSD signal handler function is being installed
+that expects more than one argument, the application has to be modified
+to use \fIsigaction\fP(). The \fIbsd_signal\fP() function differs
+from \fIsignal\fP() in that the SA_RESTART flag is set and the SA_RESETHAND
+is clear when
+\fIbsd_signal\fP() is used. The state of these flags is not specified
+for \fIsignal\fP().
+.LP
+It is recommended that new applications use the \fIsigaction\fP()
+function.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsigaction\fP(), \fIsigaddset\fP(), \fIsigemptyset\fP(), \fIsignal\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<signal.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/bsearch.3p b/man-pages-posix-2003/man3p/bsearch.3p
new file mode 100644
index 0000000..b9efcc0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/bsearch.3p
@@ -0,0 +1,178 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "BSEARCH" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" bsearch
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+bsearch \- binary search a sorted table
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+void *bsearch(const void *\fP\fIkey\fP\fB, const void *\fP\fIbase\fP\fB,
+size_t\fP \fInel\fP\fB,
+.br
+\ \ \ \ \ \ size_t\fP \fIwidth\fP\fB, int (*\fP\fIcompar\fP\fB)(const
+void *, const void *));
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIbsearch\fP() function shall search an array of \fInel\fP objects,
+the initial element of which is pointed to by
+\fIbase\fP, for an element that matches the object pointed to by \fIkey\fP.
+The size of each element in the array is specified by
+\fIwidth\fP. If the \fInel\fP argument has the value zero, the comparison
+function pointed to by \fIcompar\fP shall not be
+called and no match shall be found.
+.LP
+The comparison function pointed to by \fIcompar\fP shall be called
+with two arguments that point to the \fIkey\fP object and
+to an array element, in that order.
+.LP
+The application shall ensure that the comparison function pointed
+to by \fIcompar\fP does not alter the contents of the array.
+The implementation may reorder elements of the array between calls
+to the comparison function, but shall not alter the contents of
+any individual element.
+.LP
+The implementation shall ensure that the first argument is always
+a pointer to the key.
+.LP
+When the same objects (consisting of width bytes, irrespective of
+their current positions in the array) are passed more than
+once to the comparison function, the results shall be consistent with
+one another. That is, the same object shall always compare
+the same way with the key.
+.LP
+The application shall ensure that the function returns an integer
+less than, equal to, or greater than 0 if the \fIkey\fP
+object is considered, respectively, to be less than, to match, or
+to be greater than the array element. The application shall
+ensure that the array consists of all the elements that compare less
+than, all the elements that compare equal to, and all the
+elements that compare greater than the \fIkey\fP object, in that order.
+.SH RETURN VALUE
+.LP
+The \fIbsearch\fP() function shall return a pointer to a matching
+member of the array, or a null pointer if no match is found.
+If two or more members compare equal, which member is returned is
+unspecified.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+The example below searches a table containing pointers to nodes consisting
+of a string and its length. The table is ordered
+alphabetically on the string in the node pointed to by each entry.
+.LP
+The code fragment below reads in strings and either finds the corresponding
+node and prints out the string and its length, or
+prints an error message.
+.sp
+.RS
+.nf
+
+\fB#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+.sp
+
+#define TABSIZE 1000
+
+.sp
+
+struct node { /* These are stored in the table. */
+ char *string;
+ int length;
+};
+struct node table[TABSIZE]; /* Table to be searched. */
+ .
+ .
+ .
+{
+ struct node *node_ptr, node;
+ /* Routine to compare 2 nodes. */
+ int node_compare(const void *, const void *);
+ char str_space[20]; /* Space to read string into. */
+ .
+ .
+ .
+ node.string = str_space;
+ while (scanf("%s", node.string) != EOF) {
+ node_ptr = (struct node *)bsearch((void *)(&node),
+ (void *)table, TABSIZE,
+ sizeof(struct node), node_compare);
+ if (node_ptr != NULL) {
+ (void)printf("string = %20s, length = %d\\n",
+ node_ptr->string, node_ptr->length);
+ } else {
+ (void)printf("not found: %s\\n", node.string);
+ }
+ }
+}
+/*
+ This routine compares two nodes based on an
+ alphabetical ordering of the string field.
+*/
+int
+node_compare(const void *node1, const void *node2)
+{
+ return strcoll(((const struct node *)node1)->string,
+ ((const struct node *)node2)->string);
+}
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The pointers to the key and the element at the base of the table should
+be of type pointer-to-element.
+.LP
+The comparison function need not compare every byte, so arbitrary
+data may be contained in the elements in addition to the
+values being compared.
+.LP
+In practice, the array is usually sorted according to the comparison
+function.
+.SH RATIONALE
+.LP
+The requirement that the second argument (hereafter referred to as
+\fIp\fP) to the comparison function is a pointer to an
+element of the array implies that for every call all of the following
+expressions are non-zero:
+.sp
+.RS
+.nf
+
+\fB((char *)p - (char *(base) % width == 0
+(char *)p >= (char *)base
+(char *)p < (char *)base + nel * width
+\fP
+.fi
+.RE
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIhcreate\fP(), \fIlsearch\fP(), \fIqsort\fP(), \fItsearch\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/btowc.3p b/man-pages-posix-2003/man3p/btowc.3p
new file mode 100644
index 0000000..f4304ac
--- /dev/null
+++ b/man-pages-posix-2003/man3p/btowc.3p
@@ -0,0 +1,66 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "BTOWC" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" btowc
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+btowc \- single byte to wide character conversion
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+#include <wchar.h>
+.br
+.sp
+wint_t btowc(int\fP \fIc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIbtowc\fP() function shall determine whether \fIc\fP constitutes
+a valid (one-byte) character in the initial shift
+state.
+.LP
+The behavior of this function shall be affected by the \fILC_CTYPE\fP
+category of the current locale.
+.SH RETURN VALUE
+.LP
+The \fIbtowc\fP() function shall return WEOF if \fIc\fP has the value
+EOF or if \fB(unsigned char)\fP \fIc\fP does not
+constitute a valid (one-byte) character in the initial shift state.
+Otherwise, it shall return the wide-character representation of
+that character.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIwctob\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/bzero.3p b/man-pages-posix-2003/man3p/bzero.3p
new file mode 100644
index 0000000..b107b2c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/bzero.3p
@@ -0,0 +1,68 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "BZERO" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" bzero
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+bzero \- memory operations (\fBLEGACY\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <strings.h>
+.br
+.sp
+void bzero(void *\fP\fIs\fP\fB, size_t\fP \fIn\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIbzero\fP() function shall place \fIn\fP zero-valued bytes in
+the area pointed to by \fIs\fP.
+.SH RETURN VALUE
+.LP
+The \fIbzero\fP() function shall not return a value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fImemset\fP() function is preferred over this function.
+.LP
+For maximum portability, it is recommended to replace the function
+call to \fIbzero\fP() as follows:
+.sp
+.RS
+.nf
+
+\fB#define bzero(b,len) (memset((b), '\\0', (len)), (void) 0)
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+This function may be withdrawn in a future version.
+.SH SEE ALSO
+.LP
+\fImemset\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<strings.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/cabs.3p b/man-pages-posix-2003/man3p/cabs.3p
new file mode 100644
index 0000000..7d4056c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/cabs.3p
@@ -0,0 +1,59 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CABS" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" cabs
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+cabs, cabsf, cabsl \- return a complex absolute value
+.SH SYNOPSIS
+.LP
+\fB#include <complex.h>
+.br
+.sp
+double cabs(double complex\fP \fIz\fP\fB);
+.br
+float cabsf(float complex\fP \fIz\fP\fB);
+.br
+long double cabsl(long double complex\fP \fIz\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the complex absolute value (also called
+norm, modulus, or magnitude) of \fIz\fP.
+.SH RETURN VALUE
+.LP
+These functions shall return the complex absolute value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<complex.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/cabsf.3p b/man-pages-posix-2003/man3p/cabsf.3p
new file mode 100644
index 0000000..c1bf1c6
--- /dev/null
+++ b/man-pages-posix-2003/man3p/cabsf.3p
@@ -0,0 +1 @@
+.so man3p/cabs.3p
diff --git a/man-pages-posix-2003/man3p/cabsl.3p b/man-pages-posix-2003/man3p/cabsl.3p
new file mode 100644
index 0000000..c1bf1c6
--- /dev/null
+++ b/man-pages-posix-2003/man3p/cabsl.3p
@@ -0,0 +1 @@
+.so man3p/cabs.3p
diff --git a/man-pages-posix-2003/man3p/cacos.3p b/man-pages-posix-2003/man3p/cacos.3p
new file mode 100644
index 0000000..1c8d042
--- /dev/null
+++ b/man-pages-posix-2003/man3p/cacos.3p
@@ -0,0 +1,63 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CACOS" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" cacos
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+cacos, cacosf, cacosl \- complex arc cosine functions
+.SH SYNOPSIS
+.LP
+\fB#include <complex.h>
+.br
+.sp
+double complex cacos(double complex\fP \fIz\fP\fB);
+.br
+float complex cacosf(float complex\fP \fIz\fP\fB);
+.br
+long double complex cacosl(long double complex\fP \fIz\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the complex arc cosine of \fIz\fP, with
+branch cuts outside the interval [-1,\ +1] along the
+real axis.
+.SH RETURN VALUE
+.LP
+These functions shall return the complex arc cosine value, in the
+range of a strip mathematically unbounded along the imaginary
+axis and in the interval [0,\ pi] along the real axis.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIccos\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<complex.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/cacosf.3p b/man-pages-posix-2003/man3p/cacosf.3p
new file mode 100644
index 0000000..8d774f3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/cacosf.3p
@@ -0,0 +1 @@
+.so man3p/cacos.3p
diff --git a/man-pages-posix-2003/man3p/cacosh.3p b/man-pages-posix-2003/man3p/cacosh.3p
new file mode 100644
index 0000000..9dec897
--- /dev/null
+++ b/man-pages-posix-2003/man3p/cacosh.3p
@@ -0,0 +1,64 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CACOSH" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" cacosh
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+cacosh, cacoshf, cacoshl \- complex arc hyperbolic cosine functions
+.SH SYNOPSIS
+.LP
+\fB#include <complex.h>
+.br
+.sp
+double complex cacosh(double complex\fP \fIz\fP\fB);
+.br
+float complex cacoshf(float complex\fP \fIz\fP\fB);
+.br
+long double complex cacoshl(long double complex\fP \fIz\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the complex arc hyperbolic cosine of
+\fIz\fP, with a branch cut at values less than 1 along the
+real axis.
+.SH RETURN VALUE
+.LP
+These functions shall return the complex arc hyperbolic cosine value,
+in the range of a half-strip of non-negative values along
+the real axis and in the interval [-\fIi\fPpi,\ +\fIi\fPpi] along
+the imaginary axis.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIccosh\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<complex.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/cacoshf.3p b/man-pages-posix-2003/man3p/cacoshf.3p
new file mode 100644
index 0000000..a5fb1e0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/cacoshf.3p
@@ -0,0 +1 @@
+.so man3p/cacosh.3p
diff --git a/man-pages-posix-2003/man3p/cacoshl.3p b/man-pages-posix-2003/man3p/cacoshl.3p
new file mode 100644
index 0000000..a5fb1e0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/cacoshl.3p
@@ -0,0 +1 @@
+.so man3p/cacosh.3p
diff --git a/man-pages-posix-2003/man3p/cacosl.3p b/man-pages-posix-2003/man3p/cacosl.3p
new file mode 100644
index 0000000..8d774f3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/cacosl.3p
@@ -0,0 +1 @@
+.so man3p/cacos.3p
diff --git a/man-pages-posix-2003/man3p/calloc.3p b/man-pages-posix-2003/man3p/calloc.3p
new file mode 100644
index 0000000..5c4dc59
--- /dev/null
+++ b/man-pages-posix-2003/man3p/calloc.3p
@@ -0,0 +1,81 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CALLOC" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" calloc
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+calloc \- a memory allocator
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+void *calloc(size_t\fP \fInelem\fP\fB, size_t\fP \fIelsize\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIcalloc\fP() function shall allocate unused space for an array
+of \fInelem\fP elements each of whose size in bytes is
+\fIelsize\fP. The space shall be initialized to all bits 0.
+.LP
+The order and contiguity of storage allocated by successive calls
+to \fIcalloc\fP() is unspecified. The pointer returned if the
+allocation succeeds shall be suitably aligned so that it may be assigned
+to a pointer to any type of object and then used to access
+such an object or an array of such objects in the space allocated
+(until the space is explicitly freed or reallocated). Each such
+allocation shall yield a pointer to an object disjoint from any other
+object. The pointer returned shall point to the start (lowest
+byte address) of the allocated space. If the space cannot be allocated,
+a null pointer shall be returned. If the size of the space
+requested is 0, the behavior is implementation-defined: the value
+returned shall be either a null pointer or a unique pointer.
+.SH RETURN VALUE
+.LP
+Upon successful completion with both \fInelem\fP and \fIelsize\fP
+non-zero, \fIcalloc\fP() shall return a pointer to the
+allocated space. If either \fInelem\fP or \fIelsize\fP is 0, then
+either a null pointer or a unique pointer value that can be
+successfully passed to \fIfree\fP() shall be returned. Otherwise,
+it shall return a null
+pointer and set \fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fIcalloc\fP() function shall fail if:
+.TP 7
+.B ENOMEM
+Insufficient memory is available.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+There is now no requirement for the implementation to support the
+inclusion of \fI<malloc.h>\fP.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfree\fP(), \fImalloc\fP(), \fIrealloc\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/carg.3p b/man-pages-posix-2003/man3p/carg.3p
new file mode 100644
index 0000000..ee6e9bb
--- /dev/null
+++ b/man-pages-posix-2003/man3p/carg.3p
@@ -0,0 +1,62 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CARG" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" carg
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+carg, cargf, cargl \- complex argument functions
+.SH SYNOPSIS
+.LP
+\fB#include <complex.h>
+.br
+.sp
+double carg(double complex\fP \fIz\fP\fB);
+.br
+float cargf(float complex\fP \fIz\fP\fB);
+.br
+long double cargl(long double complex\fP \fIz\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the argument (also called phase angle)
+of \fIz\fP, with a branch cut along the negative real
+axis.
+.SH RETURN VALUE
+.LP
+These functions shall return the value of the argument in the interval
+[-pi,\ +pi].
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcimag\fP(), \fIconj\fP(), \fIcproj\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<complex.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/cargf.3p b/man-pages-posix-2003/man3p/cargf.3p
new file mode 100644
index 0000000..4c2eb67
--- /dev/null
+++ b/man-pages-posix-2003/man3p/cargf.3p
@@ -0,0 +1 @@
+.so man3p/carg.3p
diff --git a/man-pages-posix-2003/man3p/cargl.3p b/man-pages-posix-2003/man3p/cargl.3p
new file mode 100644
index 0000000..4c2eb67
--- /dev/null
+++ b/man-pages-posix-2003/man3p/cargl.3p
@@ -0,0 +1 @@
+.so man3p/carg.3p
diff --git a/man-pages-posix-2003/man3p/casin.3p b/man-pages-posix-2003/man3p/casin.3p
new file mode 100644
index 0000000..e258047
--- /dev/null
+++ b/man-pages-posix-2003/man3p/casin.3p
@@ -0,0 +1,64 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CASIN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" casin
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+casin, casinf, casinl \- complex arc sine functions
+.SH SYNOPSIS
+.LP
+\fB#include <complex.h>
+.br
+.sp
+double complex casin(double complex\fP \fIz\fP\fB);
+.br
+float complex casinf(float complex\fP \fIz\fP\fB);
+.br
+long double complex casinl(long double complex\fP \fIz\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the complex arc sine of \fIz\fP, with
+branch cuts outside the interval [-1,\ +1] along the
+real axis.
+.SH RETURN VALUE
+.LP
+These functions shall return the complex arc sine value, in the range
+of a strip mathematically unbounded along the imaginary
+axis and in the interval [-pi/2,\ +pi/2] along the
+real axis.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcsin\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<complex.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/casinf.3p b/man-pages-posix-2003/man3p/casinf.3p
new file mode 100644
index 0000000..eb51f53
--- /dev/null
+++ b/man-pages-posix-2003/man3p/casinf.3p
@@ -0,0 +1 @@
+.so man3p/casin.3p
diff --git a/man-pages-posix-2003/man3p/casinh.3p b/man-pages-posix-2003/man3p/casinh.3p
new file mode 100644
index 0000000..46b1a01
--- /dev/null
+++ b/man-pages-posix-2003/man3p/casinh.3p
@@ -0,0 +1,64 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CASINH" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" casinh
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+casinh, casinhf, casinhl \- complex arc hyperbolic sine functions
+.SH SYNOPSIS
+.LP
+\fB#include <complex.h>
+.br
+.sp
+double complex casinh(double complex\fP \fIz\fP\fB);
+.br
+float complex casinhf(float complex\fP \fIz\fP\fB);
+.br
+long double complex casinhl(long double complex\fP \fIz\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the complex arc hyperbolic sine of \fIz\fP,
+with branch cuts outside the interval
+[-\fIi\fP,\ +\fIi\fP] along the imaginary axis.
+.SH RETURN VALUE
+.LP
+These functions shall return the complex arc hyperbolic sine value,
+in the range of a strip mathematically unbounded along the
+real axis and in the interval [-\fIi\fPpi/2,\ +\fIi\fPpi/2] along
+the imaginary axis.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcsinh\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<complex.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/casinhf.3p b/man-pages-posix-2003/man3p/casinhf.3p
new file mode 100644
index 0000000..7c274ad
--- /dev/null
+++ b/man-pages-posix-2003/man3p/casinhf.3p
@@ -0,0 +1 @@
+.so man3p/casinh.3p
diff --git a/man-pages-posix-2003/man3p/casinhl.3p b/man-pages-posix-2003/man3p/casinhl.3p
new file mode 100644
index 0000000..7c274ad
--- /dev/null
+++ b/man-pages-posix-2003/man3p/casinhl.3p
@@ -0,0 +1 @@
+.so man3p/casinh.3p
diff --git a/man-pages-posix-2003/man3p/casinl.3p b/man-pages-posix-2003/man3p/casinl.3p
new file mode 100644
index 0000000..eb51f53
--- /dev/null
+++ b/man-pages-posix-2003/man3p/casinl.3p
@@ -0,0 +1 @@
+.so man3p/casin.3p
diff --git a/man-pages-posix-2003/man3p/catan.3p b/man-pages-posix-2003/man3p/catan.3p
new file mode 100644
index 0000000..164d1af
--- /dev/null
+++ b/man-pages-posix-2003/man3p/catan.3p
@@ -0,0 +1,64 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CATAN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" catan
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+catan, catanf, catanl \- complex arc tangent functions
+.SH SYNOPSIS
+.LP
+\fB#include <complex.h>
+.br
+.sp
+double complex catan(double complex\fP \fIz\fP\fB);
+.br
+float complex catanf(float complex\fP \fIz\fP\fB);
+.br
+long double complex catanl(long double complex\fP \fIz\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the complex arc tangent of \fIz\fP,
+with branch cuts outside the interval
+[-\fIi\fP,\ +\fIi\fP] along the imaginary axis.
+.SH RETURN VALUE
+.LP
+These functions shall return the complex arc tangent value, in the
+range of a strip mathematically unbounded along the imaginary
+axis and in the interval [-pi/2,\ +pi/2] along the
+real axis.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIctan\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<complex.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/catanf.3p b/man-pages-posix-2003/man3p/catanf.3p
new file mode 100644
index 0000000..de428f7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/catanf.3p
@@ -0,0 +1 @@
+.so man3p/catan.3p
diff --git a/man-pages-posix-2003/man3p/catanh.3p b/man-pages-posix-2003/man3p/catanh.3p
new file mode 100644
index 0000000..03fb225
--- /dev/null
+++ b/man-pages-posix-2003/man3p/catanh.3p
@@ -0,0 +1,64 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CATANH" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" catanh
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+catanh, catanhf, catanhl \- complex arc hyperbolic tangent functions
+.SH SYNOPSIS
+.LP
+\fB#include <complex.h>
+.br
+.sp
+double complex catanh(double complex\fP \fIz\fP\fB);
+.br
+float complex catanhf(float complex\fP \fIz\fP\fB);
+.br
+long double complex catanhl(long double complex\fP \fIz\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the complex arc hyperbolic tangent of
+\fIz\fP, with branch cuts outside the interval
+[-1,\ +1] along the real axis.
+.SH RETURN VALUE
+.LP
+These functions shall return the complex arc hyperbolic tangent value,
+in the range of a strip mathematically unbounded along
+the real axis and in the interval [-\fIi\fPpi/2,\ +\fIi\fPpi/2] along
+the imaginary axis.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIctanh\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<complex.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/catanhf.3p b/man-pages-posix-2003/man3p/catanhf.3p
new file mode 100644
index 0000000..c843fca
--- /dev/null
+++ b/man-pages-posix-2003/man3p/catanhf.3p
@@ -0,0 +1 @@
+.so man3p/catanh.3p
diff --git a/man-pages-posix-2003/man3p/catanhl.3p b/man-pages-posix-2003/man3p/catanhl.3p
new file mode 100644
index 0000000..c843fca
--- /dev/null
+++ b/man-pages-posix-2003/man3p/catanhl.3p
@@ -0,0 +1 @@
+.so man3p/catanh.3p
diff --git a/man-pages-posix-2003/man3p/catanl.3p b/man-pages-posix-2003/man3p/catanl.3p
new file mode 100644
index 0000000..de428f7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/catanl.3p
@@ -0,0 +1 @@
+.so man3p/catan.3p
diff --git a/man-pages-posix-2003/man3p/catclose.3p b/man-pages-posix-2003/man3p/catclose.3p
new file mode 100644
index 0000000..45551e0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/catclose.3p
@@ -0,0 +1,67 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CATCLOSE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" catclose
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+catclose \- close a message catalog descriptor
+.SH SYNOPSIS
+.LP
+\fB#include <nl_types.h>
+.br
+.sp
+int catclose(nl_catd\fP \fIcatd\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIcatclose\fP() function shall close the message catalog identified
+by \fIcatd\fP. If a file descriptor is used to
+implement the type \fBnl_catd\fP, that file descriptor shall be closed.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIcatclose\fP() shall return 0; otherwise,
+-1 shall be returned, and \fIerrno\fP set to indicate
+the error.
+.SH ERRORS
+.LP
+The \fIcatclose\fP() function may fail if:
+.TP 7
+.B EBADF
+The catalog descriptor is not valid.
+.TP 7
+.B EINTR
+The \fIcatclose\fP() function was interrupted by a signal.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcatgets\fP(), \fIcatopen\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<nl_types.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/catgets.3p b/man-pages-posix-2003/man3p/catgets.3p
new file mode 100644
index 0000000..5618827
--- /dev/null
+++ b/man-pages-posix-2003/man3p/catgets.3p
@@ -0,0 +1,92 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CATGETS" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" catgets
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+catgets \- read a program message
+.SH SYNOPSIS
+.LP
+\fB#include <nl_types.h>
+.br
+.sp
+char *catgets(nl_catd\fP \fIcatd\fP\fB, int s\fP\fIet_id\fP\fB, int\fP
+\fImsg_id\fP\fB, const char
+*\fP\fIs\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIcatgets\fP() function shall attempt to read message \fImsg_id\fP,
+in set \fIset_id\fP, from the message catalog
+identified by \fIcatd\fP. The \fIcatd\fP argument is a message catalog
+descriptor returned from an earlier call to \fIcatopen\fP(). The \fIs\fP
+argument points to a default message string which shall be returned
+by \fIcatgets\fP() if it cannot retrieve the identified message.
+.LP
+The \fIcatgets\fP() function need not be reentrant. A function that
+is not required to be reentrant is not required to be
+thread-safe.
+.SH RETURN VALUE
+.LP
+If the identified message is retrieved successfully, \fIcatgets\fP()
+shall return a pointer to an internal buffer area
+containing the null-terminated message string. If the call is unsuccessful
+for any reason, \fIs\fP shall be returned and
+\fIerrno\fP may be set to indicate the error.
+.SH ERRORS
+.LP
+The \fIcatgets\fP() function may fail if:
+.TP 7
+.B EBADF
+The \fIcatd\fP argument is not a valid message catalog descriptor
+open for reading.
+.TP 7
+.B EBADMSG
+The message identified by \fIset_id\fP and \fImsg_id\fP in the specified
+message catalog did not satisfy
+implementation-defined security criteria.
+.TP 7
+.B EINTR
+The read operation was terminated due to the receipt of a signal,
+and no data was transferred.
+.TP 7
+.B EINVAL
+The message catalog identified by \fIcatd\fP is corrupted.
+.TP 7
+.B ENOMSG
+The message identified by \fIset_id\fP and \fImsg_id\fP is not in
+the message catalog.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcatclose\fP(), \fIcatopen\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<nl_types.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/catopen.3p b/man-pages-posix-2003/man3p/catopen.3p
new file mode 100644
index 0000000..1b5e98c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/catopen.3p
@@ -0,0 +1,136 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CATOPEN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" catopen
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+catopen \- open a message catalog
+.SH SYNOPSIS
+.LP
+\fB#include <nl_types.h>
+.br
+.sp
+nl_catd catopen(const char *\fP\fIname\fP\fB, int\fP \fIoflag\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIcatopen\fP() function shall open a message catalog and return
+a message catalog descriptor. The \fIname\fP argument
+specifies the name of the message catalog to be opened. If \fIname\fP
+contains a \fB'/'\fP, then \fIname\fP specifies a
+complete name for the message catalog. Otherwise, the environment
+variable \fINLSPATH\fP is used with \fIname\fP substituted for
+the \fB%N\fP conversion specification (see the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Chapter 8, Environment Variables). If \fINLSPATH\fP
+exists in the environment when the process
+starts, then if the process has appropriate privileges, the behavior
+of \fIcatopen\fP() is undefined. If \fINLSPATH\fP does not
+exist in the environment, or if a message catalog cannot be found
+in any of the components specified by \fINLSPATH\fP, then an
+implementation-defined default path shall be used. This default may
+be affected by the setting of \fILC_MESSAGES\fP if the value
+of \fIoflag\fP is NL_CAT_LOCALE, or the \fILANG\fP environment variable
+if \fIoflag\fP is 0.
+.LP
+A message catalog descriptor shall remain valid in a process until
+that process closes it, or a successful call to one of the
+\fIexec\fP functions. A change in the setting of the \fILC_MESSAGES\fP
+category may
+invalidate existing open catalogs.
+.LP
+If a file descriptor is used to implement message catalog descriptors,
+the FD_CLOEXEC flag shall be set; see \fI<fcntl.h>\fP.
+.LP
+If the value of the \fIoflag\fP argument is 0, the \fILANG\fP environment
+variable is used to locate the catalog without
+regard to the \fILC_MESSAGES\fP category. If the \fIoflag\fP argument
+is NL_CAT_LOCALE, the \fILC_MESSAGES\fP category is used
+to locate the message catalog (see the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables).
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIcatopen\fP() shall return a message
+catalog descriptor for use on subsequent calls to \fIcatgets\fP()
+and \fIcatclose\fP(). Otherwise,
+\fIcatopen\fP() shall return ( \fBnl_catd\fP) -1 and set \fIerrno\fP
+to indicate the error.
+.SH ERRORS
+.LP
+The \fIcatopen\fP() function may fail if:
+.TP 7
+.B EACCES
+Search permission is denied for the component of the path prefix of
+the message catalog or read permission is denied for the
+message catalog.
+.TP 7
+.B EMFILE
+{OPEN_MAX} file descriptors are currently open in the calling process.
+.TP 7
+.B ENAMETOOLONG
+The length of a pathname of the message catalog exceeds {PATH_MAX}
+or a pathname component is longer than {NAME_MAX}.
+.TP 7
+.B ENAMETOOLONG
+Pathname resolution of a symbolic link produced an intermediate result
+whose length exceeds {PATH_MAX}.
+.TP 7
+.B ENFILE
+Too many files are currently open in the system.
+.TP 7
+.B ENOENT
+The message catalog does not exist or the \fIname\fP argument points
+to an empty string.
+.TP 7
+.B ENOMEM
+Insufficient storage space is available.
+.TP 7
+.B ENOTDIR
+A component of the path prefix of the message catalog is not a directory.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Some implementations of \fIcatopen\fP() use \fImalloc\fP() to allocate
+space for
+internal buffer areas. The \fIcatopen\fP() function may fail if there
+is insufficient storage space available to accommodate these
+buffers.
+.LP
+Conforming applications must assume that message catalog descriptors
+are not valid after a call to one of the \fIexec\fP functions.
+.LP
+Application writers should be aware that guidelines for the location
+of message catalogs have not yet been developed. Therefore
+they should take care to avoid conflicting with catalogs used by other
+applications and the standard utilities.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcatclose\fP(), \fIcatgets\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<fcntl.h>\fP, \fI<nl_types.h>\fP, the Shell
+and Utilities volume of IEEE\ Std\ 1003.1-2001
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/cbrt.3p b/man-pages-posix-2003/man3p/cbrt.3p
new file mode 100644
index 0000000..9bccdd2
--- /dev/null
+++ b/man-pages-posix-2003/man3p/cbrt.3p
@@ -0,0 +1,68 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CBRT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" cbrt
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+cbrt, cbrtf, cbrtl \- cube root functions
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double cbrt(double\fP \fIx\fP\fB);
+.br
+float cbrtf(float\fP \fIx\fP\fB);
+.br
+long double cbrtl(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the real cube root of their argument
+\fIx\fP.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the cube
+root of \fIx\fP.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is \(+-0 or \(+-Inf, \fIx\fP shall be returned.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+For some applications, a true cube root function, which returns negative
+results for negative arguments, is more appropriate
+than \fIpow\fP( \fIx\fP, 1.0/3.0), which returns a NaN for \fIx\fP
+less than 0.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/cbrtf.3p b/man-pages-posix-2003/man3p/cbrtf.3p
new file mode 100644
index 0000000..1ec7d4a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/cbrtf.3p
@@ -0,0 +1 @@
+.so man3p/cbrt.3p
diff --git a/man-pages-posix-2003/man3p/cbrtl.3p b/man-pages-posix-2003/man3p/cbrtl.3p
new file mode 100644
index 0000000..1ec7d4a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/cbrtl.3p
@@ -0,0 +1 @@
+.so man3p/cbrt.3p
diff --git a/man-pages-posix-2003/man3p/ccos.3p b/man-pages-posix-2003/man3p/ccos.3p
new file mode 100644
index 0000000..0f48c55
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ccos.3p
@@ -0,0 +1,59 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CCOS" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ccos
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ccos, ccosf, ccosl \- complex cosine functions
+.SH SYNOPSIS
+.LP
+\fB#include <complex.h>
+.br
+.sp
+double complex ccos(double complex\fP \fIz\fP\fB);
+.br
+float complex ccosf(float complex\fP \fIz\fP\fB);
+.br
+long double complex ccosl(long double complex\fP \fIz\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the complex cosine of \fIz\fP.
+.SH RETURN VALUE
+.LP
+These functions shall return the complex cosine value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcacos\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<complex.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/ccosf.3p b/man-pages-posix-2003/man3p/ccosf.3p
new file mode 100644
index 0000000..06b2076
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ccosf.3p
@@ -0,0 +1 @@
+.so man3p/ccos.3p
diff --git a/man-pages-posix-2003/man3p/ccosh.3p b/man-pages-posix-2003/man3p/ccosh.3p
new file mode 100644
index 0000000..01e86d4
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ccosh.3p
@@ -0,0 +1,59 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CCOSH" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ccosh
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ccosh, ccoshf, ccoshl \- complex hyperbolic cosine functions
+.SH SYNOPSIS
+.LP
+\fB#include <complex.h>
+.br
+.sp
+double complex ccosh(double complex\fP \fIz\fP\fB);
+.br
+float complex ccoshf(float complex\fP \fIz\fP\fB);
+.br
+long double complex ccoshl(long double complex\fP \fIz\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the complex hyperbolic cosine of \fIz\fP.
+.SH RETURN VALUE
+.LP
+These functions shall return the complex hyperbolic cosine value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcacosh\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<complex.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/ccoshf.3p b/man-pages-posix-2003/man3p/ccoshf.3p
new file mode 100644
index 0000000..2ca803a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ccoshf.3p
@@ -0,0 +1 @@
+.so man3p/ccosh.3p
diff --git a/man-pages-posix-2003/man3p/ccoshl.3p b/man-pages-posix-2003/man3p/ccoshl.3p
new file mode 100644
index 0000000..2ca803a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ccoshl.3p
@@ -0,0 +1 @@
+.so man3p/ccosh.3p
diff --git a/man-pages-posix-2003/man3p/ccosl.3p b/man-pages-posix-2003/man3p/ccosl.3p
new file mode 100644
index 0000000..06b2076
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ccosl.3p
@@ -0,0 +1 @@
+.so man3p/ccos.3p
diff --git a/man-pages-posix-2003/man3p/ceil.3p b/man-pages-posix-2003/man3p/ceil.3p
new file mode 100644
index 0000000..01508a4
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ceil.3p
@@ -0,0 +1,102 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CEIL" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ceil
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ceil, ceilf, ceill \- ceiling value function
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double ceil(double\fP \fIx\fP\fB);
+.br
+float ceilf(float\fP \fIx\fP\fB);
+.br
+long double ceill(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the smallest integral value not less
+than \fIx\fP.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIceil\fP(), \fIceilf\fP(), and \fIceill\fP()
+shall return the smallest integral value not less
+than \fIx\fP, expressed as a type \fBdouble\fP, \fBfloat\fP, or \fBlong
+double\fP, respectively.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is \(+-0 or \(+-Inf, \fIx\fP shall be returned.
+.LP
+If the correct value would cause overflow, a range error shall occur
+and \fIceil\fP(), \fIceilf\fP(), and \fIceill\fP() shall
+return the value of the macro HUGE_VAL, HUGE_VALF, and HUGE_VALL,
+respectively.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Range\ Error
+The result overflows.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the overflow floating-point exception shall be raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The integral value returned by these functions need not be expressible
+as an \fBint\fP or \fBlong\fP. The return value should
+be tested before assigning it to an integer type to avoid the undefined
+results of an integer overflow.
+.LP
+The \fIceil\fP() function can only overflow when the floating-point
+representation has DBL_MANT_DIG > DBL_MAX_EXP.
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIfloor\fP(), \fIisnan\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment of Error Conditions
+for
+Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/ceilf.3p b/man-pages-posix-2003/man3p/ceilf.3p
new file mode 100644
index 0000000..cc8c8cc
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ceilf.3p
@@ -0,0 +1 @@
+.so man3p/ceil.3p
diff --git a/man-pages-posix-2003/man3p/ceill.3p b/man-pages-posix-2003/man3p/ceill.3p
new file mode 100644
index 0000000..cc8c8cc
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ceill.3p
@@ -0,0 +1 @@
+.so man3p/ceil.3p
diff --git a/man-pages-posix-2003/man3p/cexp.3p b/man-pages-posix-2003/man3p/cexp.3p
new file mode 100644
index 0000000..08c49b3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/cexp.3p
@@ -0,0 +1,60 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CEXP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" cexp
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+cexp, cexpf, cexpl \- complex exponential functions
+.SH SYNOPSIS
+.LP
+\fB#include <complex.h>
+.br
+.sp
+double complex cexp(double complex\fP \fIz\fP\fB);
+.br
+float complex cexpf(float complex\fP \fIz\fP\fB);
+.br
+long double complex cexpl(long double complex\fP \fIz\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the complex exponent of \fIz\fP, defined
+as \fIe**z\fP.
+.SH RETURN VALUE
+.LP
+These functions shall return the complex exponential value of \fIz\fP.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIclog\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<complex.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/cexpf.3p b/man-pages-posix-2003/man3p/cexpf.3p
new file mode 100644
index 0000000..4831ba7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/cexpf.3p
@@ -0,0 +1 @@
+.so man3p/cexp.3p
diff --git a/man-pages-posix-2003/man3p/cexpl.3p b/man-pages-posix-2003/man3p/cexpl.3p
new file mode 100644
index 0000000..4831ba7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/cexpl.3p
@@ -0,0 +1 @@
+.so man3p/cexp.3p
diff --git a/man-pages-posix-2003/man3p/cfgetispeed.3p b/man-pages-posix-2003/man3p/cfgetispeed.3p
new file mode 100644
index 0000000..ee29b25
--- /dev/null
+++ b/man-pages-posix-2003/man3p/cfgetispeed.3p
@@ -0,0 +1,111 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CFGETISPEED" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" cfgetispeed
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+cfgetispeed \- get input baud rate
+.SH SYNOPSIS
+.LP
+\fB#include <termios.h>
+.br
+.sp
+speed_t cfgetispeed(const struct termios *\fP\fItermios_p\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIcfgetispeed\fP() function shall extract the input baud rate
+from the \fBtermios\fP structure to which the
+\fItermios_p\fP argument points.
+.LP
+This function shall return exactly the value in the \fBtermios\fP
+data structure, without interpretation.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIcfgetispeed\fP() shall return a value
+of type \fBspeed_t\fP representing the input baud
+rate.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The term "baud" is used historically here, but is not technically
+correct. This is properly "bits per second", which may not
+be the same as baud. However, the term is used because of the historical
+usage and understanding.
+.LP
+The \fIcfgetospeed\fP(), \fIcfgetispeed\fP(), \fIcfsetospeed\fP(),
+and \fIcfsetispeed\fP()
+functions do not take arguments as numbers, but rather as symbolic
+names. There are two reasons for this:
+.IP " 1." 4
+Historically, numbers were not used because of the way the rate was
+stored in the data structure. This is retained even though a
+function is now used.
+.LP
+.IP " 2." 4
+More importantly, only a limited set of possible rates is at all portable,
+and this constrains the application to that set.
+.LP
+.LP
+There is nothing to prevent an implementation accepting as an extension
+a number (such as 126), and since the encoding of the
+Bxxx symbols is not specified, this can be done to avoid introducing
+ambiguity.
+.LP
+Setting the input baud rate to zero was a mechanism to allow for split
+baud rates. Clarifications in this volume of
+IEEE\ Std\ 1003.1-2001 have made it possible to determine whether
+split rates are supported and to support them without
+having to treat zero as a special case. Since this functionality is
+also confusing, it has been declared obsolescent. The 0
+argument referred to is the literal constant 0, not the symbolic constant
+B0. This volume of IEEE\ Std\ 1003.1-2001 does
+not preclude B0 from being defined as the value 0; in fact, implementations
+would likely benefit from the two being equivalent.
+This volume of IEEE\ Std\ 1003.1-2001 does not fully specify whether
+the previous \fIcfsetispeed\fP() value is retained after a \fItcgetattr\fP()
+as the actual value or as zero. Therefore, conforming applications
+should
+always set both the input speed and output speed when setting either.
+.LP
+In historical implementations, the baud rate information is traditionally
+kept in \fBc_cflag\fP. Applications should be written
+to presume that this might be the case (and thus not blindly copy
+\fBc_cflag\fP), but not to rely on it in case it is in some
+other field of the structure. Setting the \fBc_cflag\fP field absolutely
+after setting a baud rate is a non-portable action
+because of this. In general, the unused parts of the flag fields might
+be used by the implementation and should not be blindly
+copied from the descriptions of one terminal device to another.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcfgetospeed\fP(), \fIcfsetispeed\fP(), \fIcfsetospeed\fP(),
+\fItcgetattr\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface, \fI<termios.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/cfgetospeed.3p b/man-pages-posix-2003/man3p/cfgetospeed.3p
new file mode 100644
index 0000000..e8ed4b0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/cfgetospeed.3p
@@ -0,0 +1,63 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CFGETOSPEED" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" cfgetospeed
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+cfgetospeed \- get output baud rate
+.SH SYNOPSIS
+.LP
+\fB#include <termios.h>
+.br
+.sp
+speed_t cfgetospeed(const struct termios *\fP\fItermios_p\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIcfgetospeed\fP() function shall extract the output baud rate
+from the \fBtermios\fP structure to which the
+\fItermios_p\fP argument points.
+.LP
+This function shall return exactly the value in the \fBtermios\fP
+data structure, without interpretation.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIcfgetospeed\fP() shall return a value
+of type \fBspeed_t\fP representing the output baud
+rate.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+Refer to \fIcfgetispeed\fP().
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcfgetispeed\fP(), \fIcfsetispeed\fP(), \fIcfsetospeed\fP(),
+\fItcgetattr\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface, \fI<termios.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/cfsetispeed.3p b/man-pages-posix-2003/man3p/cfsetispeed.3p
new file mode 100644
index 0000000..499d2a8
--- /dev/null
+++ b/man-pages-posix-2003/man3p/cfsetispeed.3p
@@ -0,0 +1,75 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CFSETISPEED" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" cfsetispeed
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+cfsetispeed \- set input baud rate
+.SH SYNOPSIS
+.LP
+\fB#include <termios.h>
+.br
+.sp
+int cfsetispeed(struct termios *\fP\fItermios_p\fP\fB, speed_t\fP
+\fIspeed\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIcfsetispeed\fP() function shall set the input baud rate stored
+in the structure pointed to by \fItermios_p\fP to
+\fIspeed.\fP
+.LP
+There shall be no effect on the baud rates set in the hardware until
+a subsequent successful call to \fItcsetattr\fP() with the same \fBtermios\fP
+structure. Similarly, errors resulting from
+attempts to set baud rates not supported by the terminal device need
+not be detected until the \fItcsetattr\fP() function is called.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIcfsetispeed\fP() shall return 0; otherwise,
+-1 shall be returned, and \fIerrno\fP may be set to
+indicate the error.
+.SH ERRORS
+.LP
+The \fIcfsetispeed\fP() function may fail if:
+.TP 7
+.B EINVAL
+The \fIspeed\fP value is not a valid baud rate.
+.TP 7
+.B EINVAL
+The value of \fIspeed\fP is outside the range of possible speed values
+as specified in \fI<termios.h>\fP.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+Refer to \fIcfgetispeed\fP().
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcfgetispeed\fP(), \fIcfgetospeed\fP(), \fIcfsetospeed\fP(),
+\fItcsetattr\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface, \fI<termios.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/cfsetospeed.3p b/man-pages-posix-2003/man3p/cfsetospeed.3p
new file mode 100644
index 0000000..054813e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/cfsetospeed.3p
@@ -0,0 +1,75 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CFSETOSPEED" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" cfsetospeed
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+cfsetospeed \- set output baud rate
+.SH SYNOPSIS
+.LP
+\fB#include <termios.h>
+.br
+.sp
+int cfsetospeed(struct termios *\fP\fItermios_p\fP\fB, speed_t\fP
+\fIspeed\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIcfsetospeed\fP() function shall set the output baud rate stored
+in the structure pointed to by \fItermios_p\fP to
+\fIspeed\fP.
+.LP
+There shall be no effect on the baud rates set in the hardware until
+a subsequent successful call to \fItcsetattr\fP() with the same \fBtermios\fP
+structure. Similarly, errors resulting from
+attempts to set baud rates not supported by the terminal device need
+not be detected until the \fItcsetattr\fP() function is called.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIcfsetospeed\fP() shall return 0; otherwise,
+it shall return -1 and \fIerrno\fP may be set to
+indicate the error.
+.SH ERRORS
+.LP
+The \fIcfsetospeed\fP() function may fail if:
+.TP 7
+.B EINVAL
+The \fIspeed\fP value is not a valid baud rate.
+.TP 7
+.B EINVAL
+The value of \fIspeed\fP is outside the range of possible speed values
+as specified in \fI<termios.h>\fP.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+Refer to \fIcfgetispeed\fP().
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcfgetispeed\fP(), \fIcfgetospeed\fP(), \fIcfsetispeed\fP(),
+\fItcsetattr\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface, \fI<termios.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/chdir.3p b/man-pages-posix-2003/man3p/chdir.3p
new file mode 100644
index 0000000..08afd12
--- /dev/null
+++ b/man-pages-posix-2003/man3p/chdir.3p
@@ -0,0 +1,108 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CHDIR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" chdir
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+chdir \- change working directory
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+int chdir(const char *\fP\fIpath\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIchdir\fP() function shall cause the directory named by the
+pathname pointed to by the \fIpath\fP argument to become the
+current working directory; that is, the starting point for path searches
+for pathnames not beginning with \fB'/'\fP .
+.SH RETURN VALUE
+.LP
+Upon successful completion, 0 shall be returned. Otherwise, -1 shall
+be returned, the current working directory shall remain
+unchanged, and \fIerrno\fP shall be set to indicate the error.
+.SH ERRORS
+.LP
+The \fIchdir\fP() function shall fail if:
+.TP 7
+.B EACCES
+Search permission is denied for any component of the pathname.
+.TP 7
+.B ELOOP
+A loop exists in symbolic links encountered during resolution of the
+\fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+The length of the \fIpath\fP argument exceeds {PATH_MAX} or a pathname
+component is longer than {NAME_MAX}.
+.TP 7
+.B ENOENT
+A component of \fIpath\fP does not name an existing directory or \fIpath\fP
+is an empty string.
+.TP 7
+.B ENOTDIR
+A component of the pathname is not a directory.
+.sp
+.LP
+The \fIchdir\fP() function may fail if:
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the \fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+As a result of encountering a symbolic link in resolution of the \fIpath\fP
+argument, the length of the substituted pathname
+string exceeded {PATH_MAX}.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Changing the Current Working Directory
+.LP
+The following example makes the value pointed to by \fBdirectory\fP,
+\fB/tmp\fP, the current working directory.
+.sp
+.RS
+.nf
+
+\fB#include <unistd.h>
+\&...
+char *directory = "/tmp";
+int ret;
+.sp
+
+ret = chdir (directory);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIchdir\fP() function only affects the working directory of the
+current process.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgetcwd\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/chmod.3p b/man-pages-posix-2003/man3p/chmod.3p
new file mode 100644
index 0000000..3c04b81
--- /dev/null
+++ b/man-pages-posix-2003/man3p/chmod.3p
@@ -0,0 +1,221 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CHMOD" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" chmod
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+chmod \- change mode of a file
+.SH SYNOPSIS
+.LP
+\fB#include <sys/stat.h>
+.br
+.sp
+int chmod(const char *\fP\fIpath\fP\fB, mode_t\fP \fImode\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIchmod\fP() function shall change S_ISUID, S_ISGID, S_ISVTX,
+and the file permission bits of the file named by the pathname pointed
+to by the \fIpath\fP argument to the
+corresponding bits in the \fImode\fP argument. The application shall
+ensure that the effective user ID of the process matches the
+owner of the file or the process has appropriate privileges in order
+to do this.
+.LP
+S_ISUID, S_ISGID, S_ISVTX, and the file permission
+bits are described in \fI<sys/stat.h>\fP.
+.LP
+If the calling process does not have appropriate privileges, and if
+the group ID of the file does not match the effective group
+ID or one of the supplementary group IDs and if the file is a regular
+file, bit S_ISGID (set-group-ID on execution) in the file's
+mode shall be cleared upon successful return from \fIchmod\fP().
+.LP
+Additional implementation-defined restrictions may cause the S_ISUID
+and S_ISGID bits in \fImode\fP to be ignored.
+.LP
+The effect on file descriptors for files open at the time of a call
+to \fIchmod\fP() is implementation-defined.
+.LP
+Upon successful completion, \fIchmod\fP() shall mark for update the
+\fIst_ctime\fP field of the file.
+.SH RETURN VALUE
+.LP
+Upon successful completion, 0 shall be returned; otherwise, -1 shall
+be returned and \fIerrno\fP set to indicate the error. If
+-1 is returned, no change to the file mode occurs.
+.SH ERRORS
+.LP
+The \fIchmod\fP() function shall fail if:
+.TP 7
+.B EACCES
+Search permission is denied on a component of the path prefix.
+.TP 7
+.B ELOOP
+A loop exists in symbolic links encountered during resolution of the
+\fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+The length of the \fIpath\fP argument exceeds {PATH_MAX} or a pathname
+component is longer than {NAME_MAX}.
+.TP 7
+.B ENOTDIR
+A component of the path prefix is not a directory.
+.TP 7
+.B ENOENT
+A component of \fIpath\fP does not name an existing file or \fIpath\fP
+is an empty string.
+.TP 7
+.B EPERM
+The effective user ID does not match the owner of the file and the
+process does not have appropriate privileges.
+.TP 7
+.B EROFS
+The named file resides on a read-only file system.
+.sp
+.LP
+The \fIchmod\fP() function may fail if:
+.TP 7
+.B EINTR
+A signal was caught during execution of the function.
+.TP 7
+.B EINVAL
+The value of the \fImode\fP argument is invalid.
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the \fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+As a result of encountering a symbolic link in resolution of the \fIpath\fP
+argument, the length of the substituted pathname
+strings exceeded {PATH_MAX}.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Setting Read Permissions for User, Group, and Others
+.LP
+The following example sets read permissions for the owner, group,
+and others.
+.sp
+.RS
+.nf
+
+\fB#include <sys/stat.h>
+.sp
+
+const char *path;
+\&...
+chmod(path, S_IRUSR|S_IRGRP|S_IROTH);
+\fP
+.fi
+.RE
+.SS Setting Read, Write, and Execute Permissions for the Owner Only
+.LP
+The following example sets read, write, and execute permissions for
+the owner, and no permissions for group and others.
+.sp
+.RS
+.nf
+
+\fB#include <sys/stat.h>
+.sp
+
+const char *path;
+\&...
+chmod(path, S_IRWXU);
+\fP
+.fi
+.RE
+.SS Setting Different Permissions for Owner, Group, and Other
+.LP
+The following example sets owner permissions for CHANGEFILE to read,
+write, and execute, group permissions to read and execute,
+and other permissions to read.
+.sp
+.RS
+.nf
+
+\fB#include <sys/stat.h>
+.sp
+
+#define CHANGEFILE "/etc/myfile"
+\&...
+chmod(CHANGEFILE, S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH);
+\fP
+.fi
+.RE
+.SS Setting and Checking File Permissions
+.LP
+The following example sets the file permission bits for a file named
+\fB/home/cnd/mod1\fP, then calls the \fIstat\fP() function to verify
+the permissions.
+.sp
+.RS
+.nf
+
+\fB#include <sys/types.h>
+#include <sys/stat.h>
+.sp
+
+int status;
+struct stat buffer
+\&...
+chmod("home/cnd/mod1", S_IRWXU|S_IRWXG|S_IROTH|S_IWOTH);
+status = stat("home/cnd/mod1", &buffer;);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+In order to ensure that the S_ISUID and S_ISGID bits are set, an application
+requiring this should use \fIstat\fP() after a successful \fIchmod\fP()
+to verify this.
+.LP
+Any file descriptors currently open by any process on the file could
+possibly become invalid if the mode of the file is changed
+to a value which would deny access to that process. One situation
+where this could occur is on a stateless file system. This
+behavior will not occur in a conforming environment.
+.SH RATIONALE
+.LP
+This volume of IEEE\ Std\ 1003.1-2001 specifies that the S_ISGID bit
+is cleared by \fIchmod\fP() on a regular file
+under certain conditions. This is specified on the assumption that
+regular files may be executed, and the system should prevent
+users from making executable \fIsetgid\fP() files perform with privileges
+that the caller
+does not have. On implementations that support execution of other
+file types, the S_ISGID bit should be cleared for those file
+types under the same circumstances.
+.LP
+Implementations that use the S_ISUID bit to indicate some other function
+(for example, mandatory record locking) on
+non-executable files need not clear this bit on writing. They should
+clear the bit for executable files and any other cases where
+the bit grants special powers to processes that change the file contents.
+Similar comments apply to the S_ISGID bit.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIchown\fP(), \fImkdir\fP(), \fImkfifo\fP(),
+\fIopen\fP(), \fIstat\fP(), \fIstatvfs\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<sys/stat.h>\fP,
+\fI<sys/types.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/chown.3p b/man-pages-posix-2003/man3p/chown.3p
new file mode 100644
index 0000000..c3af402
--- /dev/null
+++ b/man-pages-posix-2003/man3p/chown.3p
@@ -0,0 +1,179 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CHOWN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" chown
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+chown \- change owner and group of a file
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+int chown(const char *\fP\fIpath\fP\fB, uid_t\fP \fIowner\fP\fB, gid_t\fP
+\fIgroup\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIchown\fP() function shall change the user and group ownership
+of a file.
+.LP
+The \fIpath\fP argument points to a pathname naming a file. The user
+ID and group ID of the named file shall be set to the
+numeric values contained in \fIowner\fP and \fIgroup\fP, respectively.
+.LP
+Only processes with an effective user ID equal to the user ID of the
+file or with appropriate privileges may change the
+ownership of a file. If _POSIX_CHOWN_RESTRICTED is in effect for \fIpath\fP:
+.IP " *" 3
+Changing the user ID is restricted to processes with appropriate privileges.
+.LP
+.IP " *" 3
+Changing the group ID is permitted to a process with an effective
+user ID equal to the user ID of the file, but without
+appropriate privileges, if and only if \fIowner\fP is equal to the
+file's user ID or ( \fBuid_t\fP)-1 and \fIgroup\fP is equal
+either to the calling process' effective group ID or to one of its
+supplementary group IDs.
+.LP
+.LP
+If the specified file is a regular file, one or more of the S_IXUSR,
+S_IXGRP, or S_IXOTH bits of the file mode are set, and the
+process does not have appropriate privileges, the set-user-ID (S_ISUID)
+and set-group-ID (S_ISGID) bits of the file mode shall be
+cleared upon successful return from \fIchown\fP(). If the specified
+file is a regular file, one or more of the S_IXUSR, S_IXGRP,
+or S_IXOTH bits of the file mode are set, and the process has appropriate
+privileges, it is implementation-defined whether the
+set-user-ID and set-group-ID bits are altered. If the \fIchown\fP()
+function is successfully invoked on a file that is not a
+regular file and one or more of the S_IXUSR, S_IXGRP, or S_IXOTH bits
+of the file mode are set, the set-user-ID and set-group-ID
+bits may be cleared.
+.LP
+If \fIowner\fP or \fIgroup\fP is specified as ( \fBuid_t\fP)-1 or
+( \fBgid_t\fP)-1, respectively, the corresponding ID of
+the file shall not be changed. If both owner and group are -1, the
+times need not be updated.
+.LP
+Upon successful completion, \fIchown\fP() shall mark for update the
+\fIst_ctime\fP field of the file.
+.SH RETURN VALUE
+.LP
+Upon successful completion, 0 shall be returned; otherwise, -1 shall
+be returned and \fIerrno\fP set to indicate the error. If
+-1 is returned, no changes are made in the user ID and group ID of
+the file.
+.SH ERRORS
+.LP
+The \fIchown\fP() function shall fail if:
+.TP 7
+.B EACCES
+Search permission is denied on a component of the path prefix.
+.TP 7
+.B ELOOP
+A loop exists in symbolic links encountered during resolution of the
+\fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+The length of the \fIpath\fP argument exceeds {PATH_MAX} or a pathname
+component is longer than {NAME_MAX}.
+.TP 7
+.B ENOTDIR
+A component of the path prefix is not a directory.
+.TP 7
+.B ENOENT
+A component of \fIpath\fP does not name an existing file or \fIpath\fP
+is an empty string.
+.TP 7
+.B EPERM
+The effective user ID does not match the owner of the file, or the
+calling process does not have appropriate privileges and
+_POSIX_CHOWN_RESTRICTED indicates that such privilege is required.
+.TP 7
+.B EROFS
+The named file resides on a read-only file system.
+.sp
+.LP
+The \fIchown\fP() function may fail if:
+.TP 7
+.B EIO
+An I/O error occurred while reading or writing to the file system.
+.TP 7
+.B EINTR
+The \fIchown\fP() function was interrupted by a signal which was caught.
+.TP 7
+.B EINVAL
+The owner or group ID supplied is not a value supported by the implementation.
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the \fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+As a result of encountering a symbolic link in resolution of the \fIpath\fP
+argument, the length of the substituted pathname
+string exceeded {PATH_MAX}.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Although \fIchown\fP() can be used on some implementations by the
+file owner to change the owner and group to any desired
+values, the only portable use of this function is to change the group
+of a file to the effective GID of the calling process or to a
+member of its group set.
+.SH RATIONALE
+.LP
+System III and System V allow a user to give away files; that is,
+the owner of a file may change its user ID to anything. This
+is a serious problem for implementations that are intended to meet
+government security regulations. Version 7 and 4.3 BSD permit
+only the superuser to change the user ID of a file. Some government
+agencies (usually not ones concerned directly with security)
+find this limitation too confining. This volume of IEEE\ Std\ 1003.1-2001
+uses \fImay\fP to permit secure implementations
+while not disallowing System V.
+.LP
+System III and System V allow the owner of a file to change the group
+ID to anything. Version 7 permits only the superuser to
+change the group ID of a file. 4.3 BSD permits the owner to change
+the group ID of a file to its effective group ID or to any of
+the groups in the list of supplementary group IDs, but to no others.
+.LP
+The POSIX.1-1990 standard requires that the \fIchown\fP() function
+invoked by a non-appropriate privileged process clear the
+S_ISGID and the S_ISUID bits for regular files, and permits them to
+be cleared for other types of files. This is so that changes in
+accessibility do not accidentally cause files to become security holes.
+Unfortunately, requiring these bits to be cleared on
+non-executable data files also clears the mandatory file locking bit
+(shared with S_ISGID), which is an extension on many
+implementations (it first appeared in System V). These bits should
+only be required to be cleared on regular files that have one or
+more of their execute bits set.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIchmod\fP(), \fIpathconf\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<sys/types.h>\fP, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/cimag.3p b/man-pages-posix-2003/man3p/cimag.3p
new file mode 100644
index 0000000..903e475
--- /dev/null
+++ b/man-pages-posix-2003/man3p/cimag.3p
@@ -0,0 +1,67 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CIMAG" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" cimag
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+cimag, cimagf, cimagl \- complex imaginary functions
+.SH SYNOPSIS
+.LP
+\fB#include <complex.h>
+.br
+.sp
+double cimag(double complex\fP \fIz\fP\fB);
+.br
+float cimagf(float complex\fP \fIz\fP\fB);
+.br
+long double cimagl(long double complex\fP \fIz\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the imaginary part of \fIz\fP.
+.SH RETURN VALUE
+.LP
+These functions shall return the imaginary part value (as a real).
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+For a variable \fIz\fP of complex type:
+.sp
+.RS
+.nf
+
+\fBz == creal(z) + cimag(z)*I
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcarg\fP(), \fIconj\fP(), \fIcproj\fP(), \fIcreal\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<complex.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/cimagf.3p b/man-pages-posix-2003/man3p/cimagf.3p
new file mode 100644
index 0000000..855d9d0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/cimagf.3p
@@ -0,0 +1 @@
+.so man3p/cimag.3p
diff --git a/man-pages-posix-2003/man3p/cimagl.3p b/man-pages-posix-2003/man3p/cimagl.3p
new file mode 100644
index 0000000..855d9d0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/cimagl.3p
@@ -0,0 +1 @@
+.so man3p/cimag.3p
diff --git a/man-pages-posix-2003/man3p/clearerr.3p b/man-pages-posix-2003/man3p/clearerr.3p
new file mode 100644
index 0000000..400846d
--- /dev/null
+++ b/man-pages-posix-2003/man3p/clearerr.3p
@@ -0,0 +1,56 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CLEARERR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" clearerr
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+clearerr \- clear indicators on a stream
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+void clearerr(FILE *\fP\fIstream\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIclearerr\fP() function shall clear the end-of-file and error
+indicators for the stream to which \fIstream\fP
+points.
+.SH RETURN VALUE
+.LP
+The \fIclearerr\fP() function shall not return a value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/clock.3p b/man-pages-posix-2003/man3p/clock.3p
new file mode 100644
index 0000000..7eb35da
--- /dev/null
+++ b/man-pages-posix-2003/man3p/clock.3p
@@ -0,0 +1,76 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CLOCK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" clock
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+clock \- report CPU time used
+.SH SYNOPSIS
+.LP
+\fB#include <time.h>
+.br
+.sp
+clock_t clock(void);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIclock\fP() function shall return the implementation's best
+approximation to the processor time used by the process since
+the beginning of an implementation-defined era related only to the
+process invocation.
+.SH RETURN VALUE
+.LP
+To determine the time in seconds, the value returned by \fIclock\fP()
+should be divided by the value of the macro
+CLOCKS_PER_SEC. CLOCKS_PER_SEC is defined to be one million in
+\fI<time.h>\fP. If the processor time used is not available or its
+value cannot be
+represented, the function shall return the value ( \fBclock_t\fP)-1.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+In order to measure the time spent in a program, \fIclock\fP() should
+be called at the start of the program and its return
+value subtracted from the value returned by subsequent calls. The
+value returned by \fIclock\fP() is defined for compatibility
+across systems that have clocks with different resolutions. The resolution
+on any particular system need not be to microsecond
+accuracy.
+.LP
+The value returned by \fIclock\fP() may wrap around on some implementations.
+For example, on a machine with 32-bit values for
+\fBclock_t\fP, it wraps after 2147 seconds or 36 minutes.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIasctime\fP(), \fIctime\fP(), \fIdifftime\fP(), \fIgmtime\fP(),
+\fIlocaltime\fP(),
+\fImktime\fP(), \fIstrftime\fP(), \fIstrptime\fP(), \fItime\fP(),
+\fIutime\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<time.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/clock_getcpuclockid.3p b/man-pages-posix-2003/man3p/clock_getcpuclockid.3p
new file mode 100644
index 0000000..e1fef6b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/clock_getcpuclockid.3p
@@ -0,0 +1,86 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CLOCK_GETCPUCLOCKID" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" clock_getcpuclockid
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+clock_getcpuclockid \- access a process CPU-time clock (\fBADVANCED
+REALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <time.h>
+.br
+.sp
+int clock_getcpuclockid(pid_t\fP \fIpid\fP\fB, clockid_t *\fP\fIclock_id\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIclock_getcpuclockid\fP() function shall return the clock ID
+of the CPU-time clock of the process specified by
+\fIpid\fP. If the process described by \fIpid\fP exists and the calling
+process has permission, the clock ID of this clock shall
+be returned in \fIclock_id\fP.
+.LP
+If \fIpid\fP is zero, the \fIclock_getcpuclockid\fP() function shall
+return the clock ID of the CPU-time clock of the process
+making the call, in \fIclock_id\fP.
+.LP
+The conditions under which one process has permission to obtain the
+CPU-time clock ID of other processes are
+implementation-defined.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIclock_getcpuclockid\fP() shall return
+zero; otherwise, an error number shall be returned to
+indicate the error.
+.SH ERRORS
+.LP
+The \fIclock_getcpuclockid\fP() function shall fail if:
+.TP 7
+.B EPERM
+The requesting process does not have permission to access the CPU-time
+clock for the process.
+.sp
+.LP
+The \fIclock_getcpuclockid\fP() function may fail if:
+.TP 7
+.B ESRCH
+No process can be found corresponding to the process specified by
+\fIpid\fP.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIclock_getcpuclockid\fP() function is part of the Process CPU-Time
+Clocks option and need not be provided on all
+implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIclock_getres\fP(), \fItimer_create\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<time.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/clock_getres.3p b/man-pages-posix-2003/man3p/clock_getres.3p
new file mode 100644
index 0000000..5d09cb5
--- /dev/null
+++ b/man-pages-posix-2003/man3p/clock_getres.3p
@@ -0,0 +1 @@
+.so man3p/clock_gettime.3p
diff --git a/man-pages-posix-2003/man3p/clock_gettime.3p b/man-pages-posix-2003/man3p/clock_gettime.3p
new file mode 100644
index 0000000..7b94428
--- /dev/null
+++ b/man-pages-posix-2003/man3p/clock_gettime.3p
@@ -0,0 +1,210 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CLOCK_GETRES" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" clock_getres
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+clock_getres, clock_gettime, clock_settime \- clock and timer functions
+(\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <time.h>
+.br
+.sp
+int clock_getres(clockid_t\fP \fIclock_id\fP\fB, struct timespec *\fP\fIres\fP\fB);
+.br
+int clock_gettime(clockid_t\fP \fIclock_id\fP\fB, struct timespec
+*\fP\fItp\fP\fB);
+.br
+int clock_settime(clockid_t\fP \fIclock_id\fP\fB, const struct timespec
+*\fP\fItp\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIclock_getres\fP() function shall return the resolution of any
+clock. Clock resolutions are implementation-defined and
+cannot be set by a process. If the argument \fIres\fP is not NULL,
+the resolution of the specified clock shall be stored in the
+location pointed to by \fIres\fP. If \fIres\fP is NULL, the clock
+resolution is not returned. If the \fItime\fP argument of
+\fIclock_settime\fP() is not a multiple of \fIres\fP, then the value
+is truncated to a multiple of \fIres\fP.
+.LP
+The \fIclock_gettime\fP() function shall return the current value
+\fItp\fP for the specified clock, \fIclock_id\fP.
+.LP
+The \fIclock_settime\fP() function shall set the specified clock,
+\fIclock_id\fP, to the value specified by \fItp\fP. Time
+values that are between two consecutive non-negative integer multiples
+of the resolution of the specified clock shall be truncated
+down to the smaller multiple of the resolution.
+.LP
+A clock may be system-wide (that is, visible to all processes) or
+per-process (measuring time that is meaningful only within a
+process). All implementations shall support a \fIclock_id\fP of CLOCK_REALTIME
+as defined in \fI<time.h>\fP. This clock represents the realtime clock
+for the system. For this clock, the
+values returned by \fIclock_gettime\fP() and specified by \fIclock_settime\fP()
+represent the amount of time (in seconds and
+nanoseconds) since the Epoch. An implementation may also support additional
+clocks. The interpretation of time values for these
+clocks is unspecified.
+.LP
+If the value of the CLOCK_REALTIME clock is set via \fIclock_settime\fP(),
+the new value of the clock shall be used to
+determine the time of expiration for absolute time services based
+upon the CLOCK_REALTIME clock. This applies to the time at which
+armed absolute timers expire. If the absolute time requested at the
+invocation of such a time service is before the new value of
+the clock, the time service shall expire immediately as if the clock
+had reached the requested time normally.
+.LP
+Setting the value of the CLOCK_REALTIME clock via \fIclock_settime\fP()
+shall have no effect on threads that are blocked
+waiting for a relative time service based upon this clock, including
+the \fInanosleep\fP() function; nor on the expiration of relative
+timers based upon this clock.
+Consequently, these time services shall expire when the requested
+relative interval elapses, independently of the new or old value
+of the clock.
+.LP
+If the Monotonic Clock option is supported, all implementations shall
+support a \fIclock_id\fP of CLOCK_MONOTONIC defined in \fI<time.h>\fP.
+This clock represents the monotonic clock for the system. For this
+clock,
+the value returned by \fIclock_gettime\fP() represents the amount
+of time (in seconds and nanoseconds) since an unspecified point
+in the past (for example, system start-up time, or the Epoch). This
+point does not change after system start-up time. The value of
+the CLOCK_MONOTONIC clock cannot be set via \fIclock_settime\fP().
+This function shall fail if it is invoked with a
+\fIclock_id\fP argument of CLOCK_MONOTONIC.
+.LP
+The effect of setting a clock via \fIclock_settime\fP() on armed per-process
+timers associated with a clock other than
+CLOCK_REALTIME is implementation-defined.
+.LP
+If
+the value of the CLOCK_REALTIME clock is set via \fIclock_settime\fP(),
+the new value of the clock shall be used to determine the
+time at which the system shall awaken a thread blocked on an absolute
+\fIclock_nanosleep\fP() call based upon the CLOCK_REALTIME clock.
+If the absolute time
+requested at the invocation of such a time service is before the new
+value of the clock, the call shall return immediately as if
+the clock had reached the requested time normally.
+.LP
+Setting the value of the CLOCK_REALTIME clock via \fIclock_settime\fP()
+shall have no effect on any thread that is blocked on a
+relative \fIclock_nanosleep\fP() call. Consequently, the call shall
+return when
+the requested relative interval elapses, independently of the new
+or old value of the clock.
+.LP
+The appropriate privilege to set a particular clock is implementation-defined.
+.LP
+If _POSIX_CPUTIME is defined, implementations shall support clock
+ID values obtained by invoking \fIclock_getcpuclockid\fP(), which
+represent the CPU-time clock of a given process.
+Implementations shall also support the special \fBclockid_t\fP value
+CLOCK_PROCESS_CPUTIME_ID, which represents the CPU-time clock
+of the calling process when invoking one of the \fIclock_*\fP() or
+\fItimer_*\fP() functions. For these clock IDs, the values returned
+by \fIclock_gettime\fP() and
+specified by \fIclock_settime\fP() represent the amount of execution
+time of the process associated with the clock. Changing the
+value of a CPU-time clock via \fIclock_settime\fP() shall have no
+effect on the behavior of the sporadic server scheduling policy
+(see \fIScheduling Policies\fP ).
+.LP
+If _POSIX_THREAD_CPUTIME is defined, implementations shall support
+clock ID values obtained by invoking \fIpthread_getcpuclockid\fP(),
+which represent the CPU-time clock of a given thread.
+Implementations shall also support the special \fBclockid_t\fP value
+CLOCK_THREAD_CPUTIME_ID, which represents the CPU-time clock
+of the calling thread when invoking one of the \fIclock_*\fP() or
+\fItimer_*\fP() functions. For these clock IDs, the values returned
+by \fIclock_gettime\fP() and
+specified by \fIclock_settime\fP() shall represent the amount of execution
+time of the thread associated with the clock. Changing
+the value of a CPU-time clock via \fIclock_settime\fP() shall have
+no effect on the behavior of the sporadic server scheduling
+policy (see \fIScheduling Policies\fP ).
+.SH RETURN VALUE
+.LP
+A return value of 0 shall indicate that the call succeeded. A return
+value of -1 shall indicate that an error occurred, and
+\fIerrno\fP shall be set to indicate the error.
+.SH ERRORS
+.LP
+The \fIclock_getres\fP(), \fIclock_gettime\fP(), and \fIclock_settime\fP()
+functions shall fail if:
+.TP 7
+.B EINVAL
+The \fIclock_id\fP argument does not specify a known clock.
+.sp
+.LP
+The \fIclock_settime\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The \fItp\fP argument to \fIclock_settime\fP() is outside the range
+for the given clock ID.
+.TP 7
+.B EINVAL
+The \fItp\fP argument specified a nanosecond value less than zero
+or greater than or equal to 1000 million.
+.TP 7
+.B EINVAL
+The value of the \fIclock_id\fP argument is CLOCK_MONOTONIC.
+.sp
+.LP
+The \fIclock_settime\fP() function may fail if:
+.TP 7
+.B EPERM
+The requesting process does not have the appropriate privilege to
+set the specified clock.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+These functions are part of the Timers option and need not be available
+on all implementations.
+.LP
+Note that the absolute value of the monotonic clock is meaningless
+(because its origin is arbitrary), and thus there is no need
+to set it. Furthermore, realtime applications can rely on the fact
+that the value of this clock is never set and, therefore, that
+time intervals measured with this clock will not be affected by calls
+to \fIclock_settime\fP().
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIclock_getcpuclockid\fP(), \fIclock_nanosleep\fP(), \fIctime\fP(),
+\fImq_timedreceive\fP(), \fImq_timedsend\fP(), \fInanosleep\fP(),
+\fIpthread_mutex_timedlock\fP(), \fIsem_timedwait\fP(), \fItime\fP(),
+\fItimer_create\fP(), \fItimer_getoverrun\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<time.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/clock_nanosleep.3p b/man-pages-posix-2003/man3p/clock_nanosleep.3p
new file mode 100644
index 0000000..6d4080a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/clock_nanosleep.3p
@@ -0,0 +1,194 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CLOCK_NANOSLEEP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" clock_nanosleep
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+clock_nanosleep \- high resolution sleep with specifiable clock (\fBADVANCED
+REALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <time.h>
+.br
+.sp
+int clock_nanosleep(clockid_t\fP \fIclock_id\fP\fB, int\fP \fIflags\fP\fB,
+.br
+\ \ \ \ \ \ const struct timespec *\fP\fIrqtp\fP\fB, struct timespec
+*\fP\fIrmtp\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+If the flag TIMER_ABSTIME is not set in the \fIflags\fP argument,
+the \fIclock_nanosleep\fP() function shall cause the current
+thread to be suspended from execution until either the time interval
+specified by the \fIrqtp\fP argument has elapsed, or a signal
+is delivered to the calling thread and its action is to invoke a signal-catching
+function, or the process is terminated. The clock
+used to measure the time shall be the clock specified by \fIclock_id\fP.
+.LP
+If the flag TIMER_ABSTIME is set in the \fIflags\fP argument, the
+\fIclock_nanosleep\fP() function shall cause the current
+thread to be suspended from execution until either the time value
+of the clock specified by \fIclock_id\fP reaches the absolute
+time specified by the \fIrqtp\fP argument, or a signal is delivered
+to the calling thread and its action is to invoke a
+signal-catching function, or the process is terminated. If, at the
+time of the call, the time value specified by \fIrqtp\fP is
+less than or equal to the time value of the specified clock, then
+\fIclock_nanosleep\fP() shall return immediately and the calling
+process shall not be suspended.
+.LP
+The suspension time caused by this function may be longer than requested
+because the argument value is rounded up to an integer
+multiple of the sleep resolution, or because of the scheduling of
+other activity by the system. But, except for the case of being
+interrupted by a signal, the suspension time for the relative \fIclock_nanosleep\fP()
+function (that is, with the TIMER_ABSTIME
+flag not set) shall not be less than the time interval specified by
+\fIrqtp\fP, as measured by the corresponding clock. The
+suspension for the absolute \fIclock_nanosleep\fP() function (that
+is, with the TIMER_ABSTIME flag set) shall be in effect at
+least until the value of the corresponding clock reaches the absolute
+time specified by \fIrqtp\fP, except for the case of being
+interrupted by a signal.
+.LP
+The use of the \fIclock_nanosleep\fP() function shall have no effect
+on the action or blockage of any signal.
+.LP
+The \fIclock_nanosleep\fP() function shall fail if the \fIclock_id\fP
+argument refers to the CPU-time clock of the calling
+thread. It is unspecified whether \fIclock_id\fP values of other CPU-time
+clocks are allowed.
+.SH RETURN VALUE
+.LP
+If the \fIclock_nanosleep\fP() function returns because the requested
+time has elapsed, its return value shall be zero.
+.LP
+If the \fIclock_nanosleep\fP() function returns because it has been
+interrupted by a signal, it shall return the corresponding
+error value. For the relative \fIclock_nanosleep\fP() function, if
+the \fIrmtp\fP argument is non-NULL, the \fBtimespec\fP
+structure referenced by it shall be updated to contain the amount
+of time remaining in the interval (the requested time minus the
+time actually slept). If the \fIrmtp\fP argument is NULL, the remaining
+time is not returned. The absolute
+\fIclock_nanosleep\fP() function has no effect on the structure referenced
+by \fIrmtp\fP.
+.LP
+If \fIclock_nanosleep\fP() fails, it shall return the corresponding
+error value.
+.SH ERRORS
+.LP
+The \fIclock_nanosleep\fP() function shall fail if:
+.TP 7
+.B EINTR
+The \fIclock_nanosleep\fP() function was interrupted by a signal.
+.TP 7
+.B EINVAL
+The \fIrqtp\fP argument specified a nanosecond value less than zero
+or greater than or equal to 1000 million; or the
+TIMER_ABSTIME flag was specified in flags and the \fIrqtp\fP argument
+is outside the range for the clock specified by
+\fIclock_id\fP; or the \fIclock_id\fP argument does not specify a
+known clock, or specifies the CPU-time clock of the calling
+thread.
+.TP 7
+.B ENOTSUP
+The \fIclock_id\fP argument specifies a clock for which \fIclock_nanosleep\fP()
+is not supported, such as a CPU-time
+clock.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Calling \fIclock_nanosleep\fP() with the value TIMER_ABSTIME not set
+in the \fIflags\fP argument and with a \fIclock_id\fP of
+CLOCK_REALTIME is equivalent to calling \fInanosleep\fP() with the
+same \fIrqtp\fP and
+\fIrmtp\fP arguments.
+.SH RATIONALE
+.LP
+The \fInanosleep\fP() function specifies that the system-wide clock
+CLOCK_REALTIME is
+used to measure the elapsed time for this time service. However, with
+the introduction of the monotonic clock CLOCK_MONOTONIC a new
+relative sleep function is needed to allow an application to take
+advantage of the special characteristics of this clock.
+.LP
+There are many applications in which a process needs to be suspended
+and then activated multiple times in a periodic way; for
+example, to poll the status of a non-interrupting device or to refresh
+a display device. For these cases, it is known that precise
+periodic activation cannot be achieved with a relative \fIsleep\fP()
+or \fInanosleep\fP() function call. Suppose, for example, a periodic
+process that is activated at
+time \fIT\fP0, executes for a while, and then wants to suspend itself
+until time \fIT\fP0+ \fIT\fP, the period being \fIT\fP.
+If this process wants to use the \fInanosleep\fP() function, it must
+first call \fIclock_gettime\fP() to get the current time, then calculate
+the difference between the
+current time and \fIT\fP0+ \fIT\fP and, finally, call \fInanosleep\fP()
+using the
+computed interval. However, the process could be preempted by a different
+process between the two function calls, and in this case
+the interval computed would be wrong; the process would wake up later
+than desired. This problem would not occur with the absolute
+\fIclock_nanosleep\fP() function, since only one function call would
+be necessary to suspend the process until the desired time.
+In other cases, however, a relative sleep is needed, and that is why
+both functionalities are required.
+.LP
+Although it is possible to implement periodic processes using the
+timers interface, this implementation would require the use of
+signals, and the reservation of some signal numbers. In this regard,
+the reasons for including an absolute version of the
+\fIclock_nanosleep\fP() function in IEEE\ Std\ 1003.1-2001 are the
+same as for the inclusion of the relative \fInanosleep\fP().
+.LP
+It is also possible to implement precise periodic processes using
+\fIpthread_cond_timedwait\fP(), in which an absolute timeout is specified
+that
+takes effect if the condition variable involved is never signaled.
+However, the use of this interface is unnatural, and involves
+performing other operations on mutexes and condition variables that
+imply an unnecessary overhead. Furthermore, \fIpthread_cond_timedwait\fP()
+is not available in implementations that do not
+support threads.
+.LP
+Although the interface of the relative and absolute versions of the
+new high resolution sleep service is the same
+\fIclock_nanosleep\fP() function, the \fIrmtp\fP argument is only
+used in the relative sleep. This argument is needed in the
+relative \fIclock_nanosleep\fP() function to reissue the function
+call if it is interrupted by a signal, but it is not needed in
+the absolute \fIclock_nanosleep\fP() function call; if the call is
+interrupted by a signal, the absolute \fIclock_nanosleep\fP()
+function can be invoked again with the same \fIrqtp\fP argument used
+in the interrupted call.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIclock_getres\fP(), \fInanosleep\fP(), \fIpthread_cond_timedwait\fP(),
+\fIsleep\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<time.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/clock_settime.3p b/man-pages-posix-2003/man3p/clock_settime.3p
new file mode 100644
index 0000000..5d09cb5
--- /dev/null
+++ b/man-pages-posix-2003/man3p/clock_settime.3p
@@ -0,0 +1 @@
+.so man3p/clock_gettime.3p
diff --git a/man-pages-posix-2003/man3p/clog.3p b/man-pages-posix-2003/man3p/clog.3p
new file mode 100644
index 0000000..28bb85f
--- /dev/null
+++ b/man-pages-posix-2003/man3p/clog.3p
@@ -0,0 +1,64 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CLOG" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" clog
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+clog, clogf, clogl \- complex natural logarithm functions
+.SH SYNOPSIS
+.LP
+\fB#include <complex.h>
+.br
+.sp
+double complex clog(double complex\fP \fIz\fP\fB);
+.br
+float complex clogf(float complex\fP \fIz\fP\fB);
+.br
+long double complex clogl(long double complex\fP \fIz\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the complex natural (base \fIe\fP) logarithm
+of \fIz\fP, with a branch cut along the negative
+real axis.
+.SH RETURN VALUE
+.LP
+These functions shall return the complex natural logarithm value,
+in the range of a strip mathematically unbounded along the
+real axis and in the interval [-\fIi\fPpi,\ +\fIi\fPpi] along the
+imaginary axis.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcexp\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<complex.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/clogf.3p b/man-pages-posix-2003/man3p/clogf.3p
new file mode 100644
index 0000000..354caa3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/clogf.3p
@@ -0,0 +1 @@
+.so man3p/clog.3p
diff --git a/man-pages-posix-2003/man3p/clogl.3p b/man-pages-posix-2003/man3p/clogl.3p
new file mode 100644
index 0000000..354caa3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/clogl.3p
@@ -0,0 +1 @@
+.so man3p/clog.3p
diff --git a/man-pages-posix-2003/man3p/close.3p b/man-pages-posix-2003/man3p/close.3p
new file mode 100644
index 0000000..c46b3b2
--- /dev/null
+++ b/man-pages-posix-2003/man3p/close.3p
@@ -0,0 +1,225 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CLOSE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" close
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+close \- close a file descriptor
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+int close(int\fP \fIfildes\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIclose\fP() function shall deallocate the file descriptor indicated
+by \fIfildes\fP. To deallocate means to make the
+file descriptor available for return by subsequent calls to \fIopen\fP()
+or other functions
+that allocate file descriptors. All outstanding record locks owned
+by the process on the file associated with the file descriptor
+shall be removed (that is, unlocked).
+.LP
+If \fIclose\fP() is interrupted by a signal that is to be caught,
+it shall return -1 with \fIerrno\fP set to [EINTR] and the
+state of \fIfildes\fP is unspecified. If an I/O error occurred while
+reading from or writing to the file system during
+\fIclose\fP(), it may return -1 with \fIerrno\fP set to [EIO]; if
+this error is returned, the state of \fIfildes\fP is
+unspecified.
+.LP
+When all file descriptors associated with a pipe or FIFO special file
+are closed, any data remaining in the pipe or FIFO shall
+be discarded.
+.LP
+When all file descriptors associated with an open file description
+have been closed, the open file description shall be
+freed.
+.LP
+If the link count of the file is 0, when all file descriptors associated
+with the file are closed, the space occupied by the
+file shall be freed and the file shall no longer be accessible.
+.LP
+If a STREAMS-based \fIfildes\fP is closed and the calling process
+was previously registered to receive a SIGPOLL signal for events
+associated with that STREAM, the calling process shall be unregistered
+for events associated with the STREAM. The last
+\fIclose\fP() for a STREAM shall cause the STREAM associated with
+\fIfildes\fP to be dismantled. If O_NONBLOCK is not set and
+there have been no signals posted for the STREAM, and if there is
+data on the module's write queue, \fIclose\fP() shall wait for
+an unspecified time (for each module and driver) for any output to
+drain before dismantling the STREAM. The time delay can be
+changed via an I_SETCLTIME \fIioctl\fP() request. If the O_NONBLOCK
+flag is set, or if there
+are any pending signals, \fIclose\fP() shall not wait for output to
+drain, and shall dismantle the STREAM immediately.
+.LP
+If the implementation supports STREAMS-based pipes, and \fIfildes\fP
+is associated with one end of a pipe, the last
+\fIclose\fP() shall cause a hangup to occur on the other end of the
+pipe. In addition, if the other end of the pipe has been named
+by \fIfattach\fP(), then the last \fIclose\fP() shall force the named
+end to be detached
+by \fIfdetach\fP(). If the named end has no open file descriptors
+associated with it and
+gets detached, the STREAM associated with that end shall also be dismantled.
+.LP
+If \fIfildes\fP refers to the master side of a pseudo-terminal, and
+this is the last close, a SIGHUP signal shall be sent to the
+controlling process, if any, for which the slave side of the pseudo-terminal
+is the controlling terminal. It is unspecified whether
+closing the master side of the pseudo-terminal flushes all queued
+input and output.
+.LP
+If \fIfildes\fP refers to the slave side of a STREAMS-based pseudo-terminal,
+a zero-length message may be sent to the master.
+.LP
+When there is an outstanding cancelable asynchronous I/O operation
+against \fIfildes\fP when \fIclose\fP() is called, that I/O
+operation may be canceled. An I/O operation that is not canceled completes
+as if the \fIclose\fP() operation had not yet occurred.
+All operations that are not canceled shall complete as if the \fIclose\fP()
+blocked until the operations completed. The
+\fIclose\fP() operation itself need not block awaiting such I/O completion.
+Whether any I/O operation is canceled, and which I/O
+operation may be canceled upon \fIclose\fP(), is implementation-defined.
+.LP
+If a shared memory object or a memory mapped file remains referenced
+at the last close (that is, a process has it mapped), then the
+entire contents of the memory object shall persist until the memory
+object becomes unreferenced. If this is the last close of a
+shared memory object or a memory mapped file and the close results
+in the memory object becoming unreferenced, and the memory
+object has been unlinked, then the memory object shall be removed.
+.LP
+If \fIfildes\fP refers to a socket, \fIclose\fP() shall cause the
+socket to be destroyed. If the socket is in connection-mode,
+and the SO_LINGER option is set for the socket with non-zero linger
+time, and the socket has untransmitted data, then
+\fIclose\fP() shall block for up to the current linger interval until
+all data is transmitted.
+.SH RETURN VALUE
+.LP
+Upon successful completion, 0 shall be returned; otherwise, -1 shall
+be returned and \fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fIclose\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not a valid file descriptor.
+.TP 7
+.B EINTR
+The \fIclose\fP() function was interrupted by a signal.
+.sp
+.LP
+The \fIclose\fP() function may fail if:
+.TP 7
+.B EIO
+An I/O error occurred while reading from or writing to the file system.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Reassigning a File Descriptor
+.LP
+The following example closes the file descriptor associated with standard
+output for the current process, re-assigns standard
+output to a new file descriptor, and closes the original file descriptor
+to clean up. This example assumes that the file descriptor
+0 (which is the descriptor for standard input) is not closed.
+.sp
+.RS
+.nf
+
+\fB#include <unistd.h>
+\&...
+int pfd;
+\&...
+close(1);
+dup(pfd);
+close(pfd);
+\&...
+\fP
+.fi
+.RE
+.LP
+Incidentally, this is exactly what could be achieved using:
+.sp
+.RS
+.nf
+
+\fBdup2(pfd, 1);
+close(pfd);
+\fP
+.fi
+.RE
+.SS Closing a File Descriptor
+.LP
+In the following example, \fIclose\fP() is used to close a file descriptor
+after an unsuccessful attempt is made to associate
+that file descriptor with a stream.
+.sp
+.RS
+.nf
+
+\fB#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+.sp
+
+#define LOCKFILE "/etc/ptmp"
+\&...
+int pfd;
+FILE *fpfd;
+\&...
+if ((fpfd = fdopen (pfd, "w")) == NULL) {
+ close(pfd);
+ unlink(LOCKFILE);
+ exit(1);
+}
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+An application that had used the \fIstdio\fP routine \fIfopen\fP()
+to open a file should
+use the corresponding \fIfclose\fP() routine rather than \fIclose\fP().
+Once a file is
+closed, the file descriptor no longer exists, since the integer corresponding
+to it no longer refers to a file.
+.SH RATIONALE
+.LP
+The use of interruptible device close routines should be discouraged
+to avoid problems with the implicit closes of file
+descriptors by \fIexec\fP and \fIexit\fP(). This volume
+of IEEE\ Std\ 1003.1-2001 only intends to permit such behavior by
+specifying the [EINTR] error condition.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fISTREAMS\fP, \fIfattach\fP(), \fIfclose\fP(), \fIfdetach\fP(),
+\fIfopen\fP(), \fIioctl\fP(), \fIopen\fP(), the Base Definitions
+volume of
+IEEE\ Std\ 1003.1-2001, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/closedir.3p b/man-pages-posix-2003/man3p/closedir.3p
new file mode 100644
index 0000000..5bc8048
--- /dev/null
+++ b/man-pages-posix-2003/man3p/closedir.3p
@@ -0,0 +1,93 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CLOSEDIR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" closedir
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+closedir \- close a directory stream
+.SH SYNOPSIS
+.LP
+\fB#include <dirent.h>
+.br
+.sp
+int closedir(DIR *\fP\fIdirp\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIclosedir\fP() function shall close the directory stream referred
+to by the argument \fIdirp\fP. Upon return, the value
+of \fIdirp\fP may no longer point to an accessible object of the type
+\fBDIR\fP. If a file descriptor is used to implement type
+\fBDIR\fP, that file descriptor shall be closed.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIclosedir\fP() shall return 0; otherwise,
+-1 shall be returned and \fIerrno\fP set to indicate
+the error.
+.SH ERRORS
+.LP
+The \fIclosedir\fP() function may fail if:
+.TP 7
+.B EBADF
+The \fIdirp\fP argument does not refer to an open directory stream.
+.TP 7
+.B EINTR
+The \fIclosedir\fP() function was interrupted by a signal.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Closing a Directory Stream
+.LP
+The following program fragment demonstrates how the \fIclosedir\fP()
+function is used.
+.sp
+.RS
+.nf
+
+\fB\&...
+ DIR *dir;
+ struct dirent *dp;
+\&...
+ if ((dir = opendir (".")) == NULL) {
+\&...
+ }
+.sp
+
+ while ((dp = readdir (dir)) != NULL) {
+\&...
+ }
+.sp
+
+ closedir(dir);
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIopendir\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<dirent.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/closelog.3p b/man-pages-posix-2003/man3p/closelog.3p
new file mode 100644
index 0000000..904d7e9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/closelog.3p
@@ -0,0 +1 @@
+.so man3p/syslog.3p
diff --git a/man-pages-posix-2003/man3p/confstr.3p b/man-pages-posix-2003/man3p/confstr.3p
new file mode 100644
index 0000000..42629ad
--- /dev/null
+++ b/man-pages-posix-2003/man3p/confstr.3p
@@ -0,0 +1,225 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CONFSTR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" confstr
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+confstr \- get configurable variables
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+size_t confstr(int\fP \fIname\fP\fB, char *\fP\fIbuf\fP\fB, size_t\fP
+\fIlen\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIconfstr\fP() function shall return configuration-defined string
+values. Its use and purpose are similar to \fIsysconf\fP(), but it
+is used where string values rather than numeric values are returned.
+.LP
+The \fIname\fP argument represents the system variable to be queried.
+The implementation shall support the following name
+values, defined in \fI<unistd.h>\fP. It may support others:
+.LP
+.sp
+_CS_PATH
+.br
+_CS_POSIX_V6_ILP32_OFF32_CFLAGS
+.br
+_CS_POSIX_V6_ILP32_OFF32_LDFLAGS
+.br
+_CS_POSIX_V6_ILP32_OFF32_LIBS
+.br
+_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS
+.br
+_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS
+.br
+_CS_POSIX_V6_ILP32_OFFBIG_LIBS
+.br
+_CS_POSIX_V6_LP64_OFF64_CFLAGS
+.br
+_CS_POSIX_V6_LP64_OFF64_LDFLAGS
+.br
+_CS_POSIX_V6_LP64_OFF64_LIBS
+.br
+_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS
+.br
+_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS
+.br
+_CS_POSIX_V6_LPBIG_OFFBIG_LIBS
+.br
+_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS
+.br
+.sp
+_CS_XBS5_ILP32_OFF32_CFLAGS (\fBLEGACY\fP)
+.br
+_CS_XBS5_ILP32_OFF32_LDFLAGS (\fBLEGACY\fP)
+.br
+_CS_XBS5_ILP32_OFF32_LIBS (\fBLEGACY\fP)
+.br
+_CS_XBS5_ILP32_OFF32_LINTFLAGS (\fBLEGACY\fP)
+.br
+_CS_XBS5_ILP32_OFFBIG_CFLAGS (\fBLEGACY\fP)
+.br
+_CS_XBS5_ILP32_OFFBIG_LDFLAGS (\fBLEGACY\fP)
+.br
+_CS_XBS5_ILP32_OFFBIG_LIBS (\fBLEGACY\fP)
+.br
+_CS_XBS5_ILP32_OFFBIG_LINTFLAGS (\fBLEGACY\fP)
+.br
+_CS_XBS5_LP64_OFF64_CFLAGS (\fBLEGACY\fP)
+.br
+_CS_XBS5_LP64_OFF64_LDFLAGS (\fBLEGACY\fP)
+.br
+_CS_XBS5_LP64_OFF64_LIBS (\fBLEGACY\fP)
+.br
+_CS_XBS5_LP64_OFF64_LINTFLAGS (\fBLEGACY\fP)
+.br
+_CS_XBS5_LPBIG_OFFBIG_CFLAGS (\fBLEGACY\fP)
+.br
+_CS_XBS5_LPBIG_OFFBIG_LDFLAGS (\fBLEGACY\fP)
+.br
+_CS_XBS5_LPBIG_OFFBIG_LIBS (\fBLEGACY\fP)
+.br
+_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS (\fBLEGACY\fP)
+.br
+.sp
+.LP
+If \fIlen\fP is not 0, and if \fIname\fP has a configuration-defined
+value, \fIconfstr\fP() shall copy that value into the
+\fIlen\fP-byte buffer pointed to by \fIbuf\fP. If the string to be
+returned is longer than \fIlen\fP bytes, including the
+terminating null, then \fIconfstr\fP() shall truncate the string to
+\fIlen\fP-1 bytes and null-terminate the result. The
+application can detect that the string was truncated by comparing
+the value returned by \fIconfstr\fP() with \fIlen\fP.
+.LP
+If \fIlen\fP is 0 and \fIbuf\fP is a null pointer, then \fIconfstr\fP()
+shall still return the integer value as defined
+below, but shall not return a string. If \fIlen\fP is 0 but \fIbuf\fP
+is not a null pointer, the result is unspecified.
+.LP
+If the implementation supports the POSIX shell option, the string
+stored in \fIbuf\fP after a call to:
+.sp
+.RS
+.nf
+
+\fBconfstr(_CS_PATH, buf, sizeof(buf))
+\fP
+.fi
+.RE
+.LP
+can be used as a value of the \fIPATH\fP environment variable that
+accesses all of the standard utilities of
+IEEE\ Std\ 1003.1-2001, if the return value is less than or equal
+to \fIsizeof\fP( \fIbuf\fP).
+.SH RETURN VALUE
+.LP
+If \fIname\fP has a configuration-defined value, \fIconfstr\fP() shall
+return the size of buffer that would be needed to hold
+the entire configuration-defined value including the terminating null.
+If this return value is greater than \fIlen\fP, the string
+returned in \fIbuf\fP is truncated.
+.LP
+If \fIname\fP is invalid, \fIconfstr\fP() shall return 0 and set \fIerrno\fP
+to indicate the error.
+.LP
+If \fIname\fP does not have a configuration-defined value, \fIconfstr\fP()
+shall return 0 and leave \fIerrno\fP
+unchanged.
+.SH ERRORS
+.LP
+The \fIconfstr\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The value of the \fIname\fP argument is invalid.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+An application can distinguish between an invalid \fIname\fP parameter
+value and one that corresponds to a configurable
+variable that has no configuration-defined value by checking if \fIerrno\fP
+is modified. This mirrors the behavior of \fIsysconf\fP().
+.LP
+The original need for this function was to provide a way of finding
+the configuration-defined default value for the environment
+variable \fIPATH\fP. Since \fIPATH\fP can be modified by the user
+to include directories that could contain utilities replacing
+the standard utilities in the Shell and Utilities volume of IEEE\ Std\ 1003.1-2001,
+applications need a way to determine
+the system-supplied \fIPATH\fP environment variable value that contains
+the correct search path for the standard utilities.
+.LP
+An application could use:
+.sp
+.RS
+.nf
+
+\fBconfstr(name, (char *)NULL, (size_t)0)
+\fP
+.fi
+.RE
+.LP
+to find out how big a buffer is needed for the string value; use \fImalloc\fP()
+to
+allocate a buffer to hold the string; and call \fIconfstr\fP() again
+to get the string. Alternately, it could allocate a fixed,
+static buffer that is big enough to hold most answers (perhaps 512
+or 1024 bytes), but then use \fImalloc\fP() to allocate a larger buffer
+if it finds that this is too small.
+.SH RATIONALE
+.LP
+Application developers can normally determine any configuration variable
+by means of reading from the stream opened by a call
+to:
+.sp
+.RS
+.nf
+
+\fBpopen("command -p getconf variable", "r");
+\fP
+.fi
+.RE
+.LP
+The \fIconfstr\fP() function with a \fIname\fP argument of _CS_PATH
+returns a string that can be used as a \fIPATH\fP
+environment variable setting that will reference the standard shell
+and utilities as described in the Shell and Utilities volume of
+IEEE\ Std\ 1003.1-2001.
+.LP
+The \fIconfstr\fP() function copies the returned string into a buffer
+supplied by the application instead of returning a
+pointer to a string. This allows a cleaner function in some implementations
+(such as those with lightweight threads) and resolves
+questions about when the application must copy the string returned.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpathconf\fP(), \fIsysconf\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<unistd.h>\fP, the Shell and Utilities
+volume of
+IEEE\ Std\ 1003.1-2001, \fIc99\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/conj.3p b/man-pages-posix-2003/man3p/conj.3p
new file mode 100644
index 0000000..377f953
--- /dev/null
+++ b/man-pages-posix-2003/man3p/conj.3p
@@ -0,0 +1,60 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CONJ" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" conj
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+conj, conjf, conjl \- complex conjugate functions
+.SH SYNOPSIS
+.LP
+\fB#include <complex.h>
+.br
+.sp
+double complex conj(double complex\fP \fIz\fP\fB);
+.br
+float complex conjf(float complex\fP \fIz\fP\fB);
+.br
+long double complex conjl(long double complex\fP \fIz\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the complex conjugate of \fIz\fP, by
+reversing the sign of its imaginary part.
+.SH RETURN VALUE
+.LP
+These functions return the complex conjugate value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcarg\fP(), \fIcimag\fP(), \fIcproj\fP(), \fIcreal\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<complex.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/conjf.3p b/man-pages-posix-2003/man3p/conjf.3p
new file mode 100644
index 0000000..965b610
--- /dev/null
+++ b/man-pages-posix-2003/man3p/conjf.3p
@@ -0,0 +1 @@
+.so man3p/conj.3p
diff --git a/man-pages-posix-2003/man3p/conjl.3p b/man-pages-posix-2003/man3p/conjl.3p
new file mode 100644
index 0000000..965b610
--- /dev/null
+++ b/man-pages-posix-2003/man3p/conjl.3p
@@ -0,0 +1 @@
+.so man3p/conj.3p
diff --git a/man-pages-posix-2003/man3p/connect.3p b/man-pages-posix-2003/man3p/connect.3p
new file mode 100644
index 0000000..ae8a1fb
--- /dev/null
+++ b/man-pages-posix-2003/man3p/connect.3p
@@ -0,0 +1,225 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CONNECT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" connect
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+connect \- connect a socket
+.SH SYNOPSIS
+.LP
+\fB#include <sys/socket.h>
+.br
+.sp
+int connect(int\fP \fIsocket\fP\fB, const struct sockaddr *\fP\fIaddress\fP\fB,
+.br
+\ \ \ \ \ \ socklen_t\fP \fIaddress_len\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIconnect\fP() function shall attempt to make a connection on
+a socket. The function takes the following arguments:
+.TP 7
+\fIsocket\fP
+Specifies the file descriptor associated with the socket.
+.TP 7
+\fIaddress\fP
+Points to a \fBsockaddr\fP structure containing the peer address.
+The length and format of the address depend on the address
+family of the socket.
+.TP 7
+\fIaddress_len\fP
+Specifies the length of the \fBsockaddr\fP structure pointed to by
+the \fIaddress\fP argument.
+.sp
+.LP
+If the socket has not already been bound to a local address, \fIconnect\fP()
+shall bind it to an address which, unless the
+socket's address family is AF_UNIX, is an unused local address.
+.LP
+If the initiating socket is not connection-mode, then \fIconnect\fP()
+shall set the socket's peer address, and no connection is
+made. For SOCK_DGRAM sockets, the peer address identifies where all
+datagrams are sent on subsequent \fIsend\fP() functions, and limits
+the remote sender for subsequent \fIrecv\fP() functions. If \fIaddress\fP
+is a null address for the protocol, the socket's peer
+address shall be reset.
+.LP
+If the initiating socket is connection-mode, then \fIconnect\fP()
+shall attempt to establish a connection to the address
+specified by the \fIaddress\fP argument. If the connection cannot
+be established immediately and O_NONBLOCK is not set for the
+file descriptor for the socket, \fIconnect\fP() shall block for up
+to an unspecified timeout interval until the connection is
+established. If the timeout interval expires before the connection
+is established, \fIconnect\fP() shall fail and the connection
+attempt shall be aborted. If \fIconnect\fP() is interrupted by a signal
+that is caught while blocked waiting to establish a
+connection, \fIconnect\fP() shall fail and set \fIerrno\fP to [EINTR],
+but the connection request shall not be aborted, and the
+connection shall be established asynchronously.
+.LP
+If the connection cannot be established immediately and O_NONBLOCK
+is set for the file descriptor for the socket,
+\fIconnect\fP() shall fail and set \fIerrno\fP to [EINPROGRESS], but
+the connection request shall not be aborted, and the
+connection shall be established asynchronously. Subsequent calls to
+\fIconnect\fP() for the same socket, before the connection is
+established, shall fail and set \fIerrno\fP to [EALREADY].
+.LP
+When the connection has been established asynchronously, \fIselect\fP()
+and \fIpoll\fP() shall indicate that the file descriptor for the socket
+is ready for writing.
+.LP
+The socket in use may require the process to have appropriate privileges
+to use the \fIconnect\fP() function.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIconnect\fP() shall return 0; otherwise,
+-1 shall be returned and \fIerrno\fP set to indicate
+the error.
+.SH ERRORS
+.LP
+The \fIconnect\fP() function shall fail if:
+.TP 7
+.B EADDRNOTAVAIL
+The specified address is not available from the local machine.
+.TP 7
+.B EAFNOSUPPORT
+The specified address is not a valid address for the address family
+of the specified socket.
+.TP 7
+.B EALREADY
+A connection request is already in progress for the specified socket.
+.TP 7
+.B EBADF
+The \fIsocket\fP argument is not a valid file descriptor.
+.TP 7
+.B ECONNREFUSED
+The target address was not listening for connections or refused the
+connection request.
+.TP 7
+.B EINPROGRESS
+O_NONBLOCK is set for the file descriptor for the socket and the connection
+cannot be immediately established; the connection
+shall be established asynchronously.
+.TP 7
+.B EINTR
+The attempt to establish a connection was interrupted by delivery
+of a signal that was caught; the connection shall be
+established asynchronously.
+.TP 7
+.B EISCONN
+The specified socket is connection-mode and is already connected.
+.TP 7
+.B ENETUNREACH
+No route to the network is present.
+.TP 7
+.B ENOTSOCK
+The \fIsocket\fP argument does not refer to a socket.
+.TP 7
+.B EPROTOTYPE
+The specified address has a different type than the socket bound to
+the specified peer address.
+.TP 7
+.B ETIMEDOUT
+The attempt to connect timed out before a connection was made.
+.sp
+.LP
+If the address family of the socket is AF_UNIX, then \fIconnect\fP()
+shall fail if:
+.TP 7
+.B EIO
+An I/O error occurred while reading from or writing to the file system.
+.TP 7
+.B ELOOP
+A loop exists in symbolic links encountered during resolution of the
+pathname in \fIaddress\fP.
+.TP 7
+.B ENAMETOOLONG
+A component of a pathname exceeded {NAME_MAX} characters, or an entire
+pathname exceeded {PATH_MAX} characters.
+.TP 7
+.B ENOENT
+A component of the pathname does not name an existing file or the
+pathname is an empty string.
+.TP 7
+.B ENOTDIR
+A component of the path prefix of the pathname in \fIaddress\fP is
+not a directory.
+.sp
+.LP
+The \fIconnect\fP() function may fail if:
+.TP 7
+.B EACCES
+Search permission is denied for a component of the path prefix; or
+write access to the named socket is denied.
+.TP 7
+.B EADDRINUSE
+Attempt to establish a connection that uses addresses that are already
+in use.
+.TP 7
+.B ECONNRESET
+Remote host reset the connection request.
+.TP 7
+.B EHOSTUNREACH
+The destination host cannot be reached (probably because the host
+is down or a remote router cannot reach it).
+.TP 7
+.B EINVAL
+The \fIaddress_len\fP argument is not a valid length for the address
+family; or invalid address family in the \fBsockaddr\fP
+structure.
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the pathname in \fIaddress\fP.
+.TP 7
+.B ENAMETOOLONG
+Pathname resolution of a symbolic link produced an intermediate result
+whose length exceeds {PATH_MAX}.
+.TP 7
+.B ENETDOWN
+The local network interface used to reach the destination is down.
+.TP 7
+.B ENOBUFS
+No buffer space is available.
+.TP 7
+.B EOPNOTSUPP
+The socket is listening and cannot be connected.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+If \fIconnect\fP() fails, the state of the socket is unspecified.
+Conforming applications should close the file descriptor and
+create a new socket before attempting to reconnect.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIaccept\fP(), \fIbind\fP(), \fIclose\fP(), \fIgetsockname\fP(),
+\fIpoll\fP(), \fIselect\fP(), \fIsend\fP(), \fIshutdown\fP(),
+\fIsocket\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<sys/socket.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/copysign.3p b/man-pages-posix-2003/man3p/copysign.3p
new file mode 100644
index 0000000..0732495
--- /dev/null
+++ b/man-pages-posix-2003/man3p/copysign.3p
@@ -0,0 +1,64 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "COPYSIGN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" copysign
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+copysign, copysignf, copysignl \- number manipulation function
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double copysign(double\fP \fIx\fP\fB, double\fP \fIy\fP\fB);
+.br
+float copysignf(float\fP \fIx\fP\fB, float\fP \fIy\fP\fB);
+.br
+long double copysignl(long double\fP \fIx\fP\fB, long double\fP \fIy\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall produce a value with the magnitude of \fIx\fP
+and the sign of \fIy\fP. On implementations that represent
+a signed zero but do not treat negative zero consistently in arithmetic
+operations, these functions regard the sign of zero as
+positive.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return a value with
+the magnitude of \fIx\fP and the sign of \fIy\fP.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsignbit\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/copysignf.3p b/man-pages-posix-2003/man3p/copysignf.3p
new file mode 100644
index 0000000..83a43fe
--- /dev/null
+++ b/man-pages-posix-2003/man3p/copysignf.3p
@@ -0,0 +1 @@
+.so man3p/copysign.3p
diff --git a/man-pages-posix-2003/man3p/copysignl.3p b/man-pages-posix-2003/man3p/copysignl.3p
new file mode 100644
index 0000000..83a43fe
--- /dev/null
+++ b/man-pages-posix-2003/man3p/copysignl.3p
@@ -0,0 +1 @@
+.so man3p/copysign.3p
diff --git a/man-pages-posix-2003/man3p/cos.3p b/man-pages-posix-2003/man3p/cos.3p
new file mode 100644
index 0000000..4723140
--- /dev/null
+++ b/man-pages-posix-2003/man3p/cos.3p
@@ -0,0 +1,106 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "COS" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" cos
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+cos, cosf, cosl \- cosine function
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double cos(double\fP \fIx\fP\fB);
+.br
+float cosf(float\fP \fIx\fP\fB);
+.br
+long double cosl(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the cosine of their argument \fIx\fP,
+measured in radians.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the cosine
+of \fIx\fP.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is \(+-0, the value 1.0 shall be returned.
+.LP
+If \fIx\fP is \(+-Inf, a domain error shall occur, and either a NaN
+(if supported), or an implementation-defined value
+shall be returned.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Domain\ Error
+The \fIx\fP argument is \(+-Inf.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [EDOM]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the invalid floating-point exception shall be raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Taking the Cosine of a 45-Degree Angle
+.sp
+.RS
+.nf
+
+\fB#include <math.h>
+\&...
+double radians = 45 * M_PI / 180;
+double result;
+\&...
+result = cos(radians);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+These functions may lose accuracy when their argument is near an odd
+multiple of pi/2 or is
+far from 0.
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIacos\fP(), \fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIisnan\fP(),
+\fIsin\fP(), \fItan\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Section 4.18, Treatment of Error Conditions for Mathematical Functions,
+\fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/cosf.3p b/man-pages-posix-2003/man3p/cosf.3p
new file mode 100644
index 0000000..6cff53c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/cosf.3p
@@ -0,0 +1 @@
+.so man3p/cos.3p
diff --git a/man-pages-posix-2003/man3p/cosh.3p b/man-pages-posix-2003/man3p/cosh.3p
new file mode 100644
index 0000000..ea6d8c4
--- /dev/null
+++ b/man-pages-posix-2003/man3p/cosh.3p
@@ -0,0 +1,98 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "COSH" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" cosh
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+cosh, coshf, coshl \- hyperbolic cosine functions
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double cosh(double\fP \fIx\fP\fB);
+.br
+float coshf(float\fP \fIx\fP\fB);
+.br
+long double coshl(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the hyperbolic cosine of their argument
+\fIx\fP.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the hyperbolic
+cosine of \fIx\fP.
+.LP
+If the correct value would cause overflow, a range error shall occur
+and \fIcosh\fP(), \fIcoshf\fP(), and \fIcoshl\fP() shall
+return the value of the macro HUGE_VAL, HUGE_VALF, and HUGE_VALL,
+respectively.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is \(+-0, the value 1.0 shall be returned.
+.LP
+If \fIx\fP is \(+-Inf, +Inf shall be returned.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Range\ Error
+The result would cause an overflow.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the overflow floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.LP
+For IEEE\ Std\ 754-1985 \fBdouble\fP, 710.5 < |\fIx\fP| implies that
+\fIcosh\fP( \fIx\fP) has overflowed.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIacosh\fP(), \fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIisnan\fP(),
+\fIsinh\fP(),
+\fItanh\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Section 4.18, Treatment of Error Conditions for Mathematical Functions,
+\fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/coshf.3p b/man-pages-posix-2003/man3p/coshf.3p
new file mode 100644
index 0000000..49cd5d0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/coshf.3p
@@ -0,0 +1 @@
+.so man3p/cosh.3p
diff --git a/man-pages-posix-2003/man3p/coshl.3p b/man-pages-posix-2003/man3p/coshl.3p
new file mode 100644
index 0000000..49cd5d0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/coshl.3p
@@ -0,0 +1 @@
+.so man3p/cosh.3p
diff --git a/man-pages-posix-2003/man3p/cosl.3p b/man-pages-posix-2003/man3p/cosl.3p
new file mode 100644
index 0000000..6cff53c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/cosl.3p
@@ -0,0 +1 @@
+.so man3p/cos.3p
diff --git a/man-pages-posix-2003/man3p/cpow.3p b/man-pages-posix-2003/man3p/cpow.3p
new file mode 100644
index 0000000..2b48559
--- /dev/null
+++ b/man-pages-posix-2003/man3p/cpow.3p
@@ -0,0 +1,65 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CPOW" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" cpow
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+cpow, cpowf, cpowl \- complex power functions
+.SH SYNOPSIS
+.LP
+\fB#include <complex.h>
+.br
+.sp
+double complex cpow(double complex\fP \fIx\fP\fB, double complex\fP
+\fIy\fP\fB);
+.br
+float complex cpowf(float complex\fP \fIx\fP\fB, float complex\fP
+\fIy\fP\fB);
+.br
+long double complex cpowl(long double complex\fP \fIx\fP\fB,
+.br
+\ \ \ \ \ \ long double complex\fP \fIy\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the complex power function \fIx**y\fP,
+with a branch cut for the first
+parameter along the negative real axis.
+.SH RETURN VALUE
+.LP
+These functions shall return the complex power function value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcabs\fP(), \fIcsqrt\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<complex.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/cpowf.3p b/man-pages-posix-2003/man3p/cpowf.3p
new file mode 100644
index 0000000..a5c741e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/cpowf.3p
@@ -0,0 +1 @@
+.so man3p/cpow.3p
diff --git a/man-pages-posix-2003/man3p/cpowl.3p b/man-pages-posix-2003/man3p/cpowl.3p
new file mode 100644
index 0000000..a5c741e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/cpowl.3p
@@ -0,0 +1 @@
+.so man3p/cpow.3p
diff --git a/man-pages-posix-2003/man3p/cproj.3p b/man-pages-posix-2003/man3p/cproj.3p
new file mode 100644
index 0000000..e548118
--- /dev/null
+++ b/man-pages-posix-2003/man3p/cproj.3p
@@ -0,0 +1,88 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CPROJ" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" cproj
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+cproj, cprojf, cprojl \- complex projection functions
+.SH SYNOPSIS
+.LP
+\fB#include <complex.h>
+.br
+.sp
+double complex cproj(double complex\fP \fIz\fP\fB);
+.br
+float complex cprojf(float complex\fP \fIz\fP\fB);
+.br
+long double complex cprojl(long double complex\fP \fIz\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute a projection of \fIz\fP onto the Riemann
+sphere: \fIz\fP projects to \fIz\fP, except that all
+complex infinities (even those with one infinite part and one NaN
+part) project to positive infinity on the real axis. If \fIz\fP
+has an infinite part, then \fIcproj\fP( \fIz\fP) shall be equivalent
+to:
+.sp
+.RS
+.nf
+
+\fBINFINITY + I * copysign(0.0, cimag(z))
+\fP
+.fi
+.RE
+.SH RETURN VALUE
+.LP
+These functions shall return the value of the projection onto the
+Riemann sphere.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+Two topologies are commonly used in complex mathematics: the complex
+plane with its continuum of infinities, and the Riemann
+sphere with its single infinity. The complex plane is better suited
+for transcendental functions, the Riemann sphere for algebraic
+functions. The complex types with their multiplicity of infinities
+provide a useful (though imperfect) model for the complex plane.
+The \fIcproj\fP() function helps model the Riemann sphere by mapping
+all infinities to one, and should be used just before any
+operation, especially comparisons, that might give spurious results
+for any of the other infinities. Note that a complex value with
+one infinite part and one NaN part is regarded as an infinity, not
+a NaN, because if one part is infinite, the complex value is
+infinite independent of the value of the other part. For the same
+reason, \fIcabs\fP()
+returns an infinity if its argument has an infinite part and a NaN
+part.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcarg\fP(), \fIcimag\fP(), \fIconj\fP(), \fIcreal\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<complex.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/cprojf.3p b/man-pages-posix-2003/man3p/cprojf.3p
new file mode 100644
index 0000000..f2a22c9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/cprojf.3p
@@ -0,0 +1 @@
+.so man3p/cproj.3p
diff --git a/man-pages-posix-2003/man3p/cprojl.3p b/man-pages-posix-2003/man3p/cprojl.3p
new file mode 100644
index 0000000..f2a22c9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/cprojl.3p
@@ -0,0 +1 @@
+.so man3p/cproj.3p
diff --git a/man-pages-posix-2003/man3p/creal.3p b/man-pages-posix-2003/man3p/creal.3p
new file mode 100644
index 0000000..db56f0a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/creal.3p
@@ -0,0 +1,67 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CREAL" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" creal
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+creal, crealf, creall \- complex real functions
+.SH SYNOPSIS
+.LP
+\fB#include <complex.h>
+.br
+.sp
+double creal(double complex\fP \fIz\fP\fB);
+.br
+float crealf(float complex\fP \fIz\fP\fB);
+.br
+long double creall(long double complex\fP \fIz\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the real part of \fIz\fP.
+.SH RETURN VALUE
+.LP
+These functions shall return the real part value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+For a variable \fIz\fP of type \fBcomplex\fP:
+.sp
+.RS
+.nf
+
+\fBz == creal(z) + cimag(z)*I
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcarg\fP(), \fIcimag\fP(), \fIconj\fP(), \fIcproj\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<complex.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/crealf.3p b/man-pages-posix-2003/man3p/crealf.3p
new file mode 100644
index 0000000..6343924
--- /dev/null
+++ b/man-pages-posix-2003/man3p/crealf.3p
@@ -0,0 +1 @@
+.so man3p/creal.3p
diff --git a/man-pages-posix-2003/man3p/creall.3p b/man-pages-posix-2003/man3p/creall.3p
new file mode 100644
index 0000000..6343924
--- /dev/null
+++ b/man-pages-posix-2003/man3p/creall.3p
@@ -0,0 +1 @@
+.so man3p/creal.3p
diff --git a/man-pages-posix-2003/man3p/creat.3p b/man-pages-posix-2003/man3p/creat.3p
new file mode 100644
index 0000000..133c27e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/creat.3p
@@ -0,0 +1,100 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CREAT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" creat
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+creat \- create a new file or rewrite an existing one
+.SH SYNOPSIS
+.LP
+\fB#include <sys/stat.h> \fP
+\fB
+.br
+#include <fcntl.h>
+.br
+.sp
+int creat(const char *\fP\fIpath\fP\fB, mode_t\fP \fImode\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The function call:
+.sp
+.RS
+.nf
+
+\fBcreat(path, mode)
+\fP
+.fi
+.RE
+.LP
+shall be equivalent to:
+.sp
+.RS
+.nf
+
+\fBopen(path, O_WRONLY|O_CREAT|O_TRUNC, mode)
+\fP
+.fi
+.RE
+.SH RETURN VALUE
+.LP
+Refer to \fIopen\fP().
+.SH ERRORS
+.LP
+Refer to \fIopen\fP().
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Creating a File
+.LP
+The following example creates the file \fB/tmp/file\fP with read and
+write permissions for the file owner and read permission
+for group and others. The resulting file descriptor is assigned to
+the \fIfd\fP variable.
+.sp
+.RS
+.nf
+
+\fB#include <fcntl.h>
+\&...
+int fd;
+mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH;
+char *filename = "/tmp/file";
+\&...
+fd = creat(filename, mode);
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIcreat\fP() function is redundant. Its services are also provided
+by the \fIopen\fP() function. It has been included primarily for historical
+purposes since many existing
+applications depend on it. It is best considered a part of the C binding
+rather than a function that should be provided in other
+languages.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIopen\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<fcntl.h>\fP, \fI<sys/stat.h>\fP, \fI<sys/types.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/crypt.3p b/man-pages-posix-2003/man3p/crypt.3p
new file mode 100644
index 0000000..833df2a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/crypt.3p
@@ -0,0 +1,137 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CRYPT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" crypt
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+crypt \- string encoding function (\fBCRYPT\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+char *crypt(const char *\fP\fIkey\fP\fB, const char *\fP\fIsalt\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIcrypt\fP() function is a string encoding function. The algorithm
+is implementation-defined.
+.LP
+The \fIkey\fP argument points to a string to be encoded. The \fIsalt\fP
+argument is a string chosen from the set:
+.sp
+.RS
+.nf
+
+\fBa 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
+0 1 2 3 4 5 6 7 8 9 . /
+\fP
+.fi
+.RE
+.LP
+The first two characters of this string may be used to perturb the
+encoding algorithm.
+.LP
+The return value of \fIcrypt\fP() points to static data that is overwritten
+by each call.
+.LP
+The \fIcrypt\fP() function need not be reentrant. A function that
+is not required to be reentrant is not required to be
+thread-safe.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIcrypt\fP() shall return a pointer to
+the encoded string. The first two characters of the
+returned value shall be those of the \fIsalt\fP argument. Otherwise,
+it shall return a null pointer and set \fIerrno\fP to
+indicate the error.
+.SH ERRORS
+.LP
+The \fIcrypt\fP() function shall fail if:
+.TP 7
+.B ENOSYS
+The functionality is not supported on this implementation.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Encoding Passwords
+.LP
+The following example finds a user database entry matching a particular
+user name and changes the current password to a new
+password. The \fIcrypt\fP() function generates an encoded version
+of each password. The first call to \fIcrypt\fP() produces an
+encoded version of the old password; that encoded password is then
+compared to the password stored in the user database. The second
+call to \fIcrypt\fP() encodes the new password before it is stored.
+.LP
+The \fIputpwent\fP() function, used in the following example, is not
+part of IEEE\ Std\ 1003.1-2001.
+.sp
+.RS
+.nf
+
+\fB#include <unistd.h>
+#include <pwd.h>
+#include <string.h>
+#include <stdio.h>
+\&...
+int valid_change;
+int pfd; /* Integer for file descriptor returned by open(). */
+FILE *fpfd; /* File pointer for use in putpwent(). */
+struct passwd *p;
+char user[100];
+char oldpasswd[100];
+char newpasswd[100];
+char savepasswd[100];
+\&...
+valid_change = 0;
+while ((p = getpwent()) != NULL) {
+ /* Change entry if found. */
+ if (strcmp(p->pw_name, user) == 0) {
+ if (strcmp(p->pw_passwd, crypt(oldpasswd, p->pw_passwd)) == 0) {
+ strcpy(savepasswd, crypt(newpasswd, user));
+ p->pw_passwd = savepasswd;
+ valid_change = 1;
+ }
+ else {
+ fprintf(stderr, "Old password is not valid\\n");
+ }
+ }
+ /* Put passwd entry into ptmp. */
+ putpwent(p, fpfd);
+}
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The values returned by this function need not be portable among XSI-conformant
+systems.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIencrypt\fP(), \fIsetkey\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/csin.3p b/man-pages-posix-2003/man3p/csin.3p
new file mode 100644
index 0000000..39f138b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/csin.3p
@@ -0,0 +1,59 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CSIN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" csin
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+csin, csinf, csinl \- complex sine functions
+.SH SYNOPSIS
+.LP
+\fB#include <complex.h>
+.br
+.sp
+double complex csin(double complex\fP \fIz\fP\fB);
+.br
+float complex csinf(float complex\fP \fIz\fP\fB);
+.br
+long double complex csinl(long double complex\fP \fIz\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the complex sine of \fIz\fP.
+.SH RETURN VALUE
+.LP
+These functions shall return the complex sine value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcasin\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<complex.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/csinf.3p b/man-pages-posix-2003/man3p/csinf.3p
new file mode 100644
index 0000000..b42a764
--- /dev/null
+++ b/man-pages-posix-2003/man3p/csinf.3p
@@ -0,0 +1 @@
+.so man3p/csin.3p
diff --git a/man-pages-posix-2003/man3p/csinh.3p b/man-pages-posix-2003/man3p/csinh.3p
new file mode 100644
index 0000000..26bdf37
--- /dev/null
+++ b/man-pages-posix-2003/man3p/csinh.3p
@@ -0,0 +1,59 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CSINH" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" csinh
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+csinh, csinhf, csinhl \- complex hyperbolic sine functions
+.SH SYNOPSIS
+.LP
+\fB#include <complex.h>
+.br
+.sp
+double complex csinh(double complex\fP \fIz\fP\fB);
+.br
+float complex csinhf(float complex\fP \fIz\fP\fB);
+.br
+long double complex csinhl(long double complex\fP \fIz\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the complex hyperbolic sine of \fIz\fP.
+.SH RETURN VALUE
+.LP
+These functions shall return the complex hyperbolic sine value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcasinh\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<complex.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/csinhf.3p b/man-pages-posix-2003/man3p/csinhf.3p
new file mode 100644
index 0000000..23497d8
--- /dev/null
+++ b/man-pages-posix-2003/man3p/csinhf.3p
@@ -0,0 +1 @@
+.so man3p/csinh.3p
diff --git a/man-pages-posix-2003/man3p/csinhl.3p b/man-pages-posix-2003/man3p/csinhl.3p
new file mode 100644
index 0000000..23497d8
--- /dev/null
+++ b/man-pages-posix-2003/man3p/csinhl.3p
@@ -0,0 +1 @@
+.so man3p/csinh.3p
diff --git a/man-pages-posix-2003/man3p/csinl.3p b/man-pages-posix-2003/man3p/csinl.3p
new file mode 100644
index 0000000..b42a764
--- /dev/null
+++ b/man-pages-posix-2003/man3p/csinl.3p
@@ -0,0 +1 @@
+.so man3p/csin.3p
diff --git a/man-pages-posix-2003/man3p/csqrt.3p b/man-pages-posix-2003/man3p/csqrt.3p
new file mode 100644
index 0000000..698edc4
--- /dev/null
+++ b/man-pages-posix-2003/man3p/csqrt.3p
@@ -0,0 +1,62 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CSQRT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" csqrt
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+csqrt, csqrtf, csqrtl \- complex square root functions
+.SH SYNOPSIS
+.LP
+\fB#include <complex.h>
+.br
+.sp
+double complex csqrt(double complex\fP \fIz\fP\fB);
+.br
+float complex csqrtf(float complex\fP \fIz\fP\fB);
+.br
+long double complex csqrtl(long double complex\fP \fIz\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the complex square root of \fIz\fP,
+with a branch cut along the negative real axis.
+.SH RETURN VALUE
+.LP
+These functions shall return the complex square root value, in the
+range of the right half-plane (including the imaginary
+axis).
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcabs\fP(), \fIcpow\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<complex.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/csqrtf.3p b/man-pages-posix-2003/man3p/csqrtf.3p
new file mode 100644
index 0000000..5b87b5b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/csqrtf.3p
@@ -0,0 +1 @@
+.so man3p/csqrt.3p
diff --git a/man-pages-posix-2003/man3p/csqrtl.3p b/man-pages-posix-2003/man3p/csqrtl.3p
new file mode 100644
index 0000000..5b87b5b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/csqrtl.3p
@@ -0,0 +1 @@
+.so man3p/csqrt.3p
diff --git a/man-pages-posix-2003/man3p/ctan.3p b/man-pages-posix-2003/man3p/ctan.3p
new file mode 100644
index 0000000..80f73d1
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ctan.3p
@@ -0,0 +1,59 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CTAN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ctan
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ctan, ctanf, ctanl \- complex tangent functions
+.SH SYNOPSIS
+.LP
+\fB#include <complex.h>
+.br
+.sp
+double complex ctan(double complex\fP \fIz\fP\fB);
+.br
+float complex ctanf(float complex\fP \fIz\fP\fB);
+.br
+long double complex ctanl(long double complex\fP \fIz\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the complex tangent of \fIz\fP.
+.SH RETURN VALUE
+.LP
+These functions shall return the complex tangent value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcatan\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<complex.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/ctanf.3p b/man-pages-posix-2003/man3p/ctanf.3p
new file mode 100644
index 0000000..785deda
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ctanf.3p
@@ -0,0 +1 @@
+.so man3p/ctan.3p
diff --git a/man-pages-posix-2003/man3p/ctanh.3p b/man-pages-posix-2003/man3p/ctanh.3p
new file mode 100644
index 0000000..720d3b2
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ctanh.3p
@@ -0,0 +1,59 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CTANH" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ctanh
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ctanh, ctanhf, ctanhl \- complex hyperbolic tangent functions
+.SH SYNOPSIS
+.LP
+\fB#include <complex.h>
+.br
+.sp
+double complex ctanh(double complex\fP \fIz\fP\fB);
+.br
+float complex ctanhf(float complex\fP \fIz\fP\fB);
+.br
+long double complex ctanhl(long double complex\fP \fIz\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the complex hyperbolic tangent of \fIz\fP.
+.SH RETURN VALUE
+.LP
+These functions shall return the complex hyperbolic tangent value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcatanh\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<complex.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/ctanhf.3p b/man-pages-posix-2003/man3p/ctanhf.3p
new file mode 100644
index 0000000..0599a3a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ctanhf.3p
@@ -0,0 +1 @@
+.so man3p/ctanh.3p
diff --git a/man-pages-posix-2003/man3p/ctanhl.3p b/man-pages-posix-2003/man3p/ctanhl.3p
new file mode 100644
index 0000000..0599a3a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ctanhl.3p
@@ -0,0 +1 @@
+.so man3p/ctanh.3p
diff --git a/man-pages-posix-2003/man3p/ctanl.3p b/man-pages-posix-2003/man3p/ctanl.3p
new file mode 100644
index 0000000..785deda
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ctanl.3p
@@ -0,0 +1 @@
+.so man3p/ctan.3p
diff --git a/man-pages-posix-2003/man3p/ctermid.3p b/man-pages-posix-2003/man3p/ctermid.3p
new file mode 100644
index 0000000..18e46ce
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ctermid.3p
@@ -0,0 +1,115 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CTERMID" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ctermid
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ctermid \- generate a pathname for the controlling terminal
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+char *ctermid(char *\fP\fIs\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIctermid\fP() function shall generate a string that, when used
+as a pathname, refers to the current controlling terminal
+for the current process. If \fIctermid\fP() returns a pathname, access
+to the file is not guaranteed.
+.LP
+If the application uses any of the _POSIX_THREAD_SAFE_FUNCTIONS or
+_POSIX_THREADS functions, it shall ensure that the
+\fIctermid\fP() function is called with a non-NULL parameter.
+.SH RETURN VALUE
+.LP
+If \fIs\fP is a null pointer, the string shall be generated in an
+area that may be static (and therefore may be overwritten by
+each call), the address of which shall be returned. Otherwise, \fIs\fP
+is assumed to point to a character array of at least
+L_ctermid bytes; the string is placed in this array and the value
+of \fIs\fP shall be returned. The symbolic constant L_ctermid is
+defined in \fI<stdio.h>\fP, and shall have a value greater than 0.
+.LP
+The \fIctermid\fP() function shall return an empty string if the pathname
+that would refer to the controlling terminal cannot
+be determined, or if the function is unsuccessful.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Determining the Controlling Terminal for the Current Process
+.LP
+The following example returns a pointer to a string that identifies
+the controlling terminal for the current process. The
+pathname for the terminal is stored in the array pointed to by the
+\fIptr\fP argument, which has a size of L_ctermid bytes, as
+indicated by the \fIterm\fP argument.
+.sp
+.RS
+.nf
+
+\fB#include <stdio.h>
+\&...
+char term[L_ctermid];
+char *ptr;
+.sp
+
+ptr = ctermid(term);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The difference between \fIctermid\fP() and \fIttyname\fP() is that
+\fIttyname\fP() must be handed a file descriptor and return a path
+of the terminal associated with
+that file descriptor, while \fIctermid\fP() returns a string (such
+as \fB"/dev/tty"\fP ) that refers to the current controlling
+terminal if used as a pathname.
+.SH RATIONALE
+.LP
+L_ctermid must be defined appropriately for a given implementation
+and must be greater than zero so that array declarations
+using it are accepted by the compiler. The value includes the terminating
+null byte.
+.LP
+Conforming applications that use threads cannot call \fIctermid\fP()
+with NULL as the parameter if either
+_POSIX_THREAD_SAFE_FUNCTIONS or _POSIX_THREADS is defined. If \fIs\fP
+is not NULL, the \fIctermid\fP() function generates a
+string that, when used as a pathname, refers to the current controlling
+terminal for the current process. If \fIs\fP is NULL, the
+return value of \fIctermid\fP() is undefined.
+.LP
+There is no additional burden on the programmer-changing to use a
+hypothetical thread-safe version of \fIctermid\fP() along
+with allocating a buffer is more of a burden than merely allocating
+a buffer. Application code should not assume that the returned
+string is short, as some implementations have more than two pathname
+components before reaching a logical device name.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIttyname\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/ctime.3p b/man-pages-posix-2003/man3p/ctime.3p
new file mode 100644
index 0000000..8189060
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ctime.3p
@@ -0,0 +1,117 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CTIME" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ctime
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ctime, ctime_r \- convert a time value to a date and time string
+.SH SYNOPSIS
+.LP
+\fB#include <time.h>
+.br
+.sp
+char *ctime(const time_t *\fP\fIclock\fP\fB);
+.br
+\fP
+.LP
+\fBchar *ctime_r(const time_t *\fP\fIclock\fP\fB, char *\fP\fIbuf\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+For \fIctime\fP(): The functionality described on this reference
+page is aligned with the ISO\ C standard. Any
+conflict between the requirements described here and the ISO\ C standard
+is unintentional. This volume of
+IEEE\ Std\ 1003.1-2001 defers to the ISO\ C standard.
+.LP
+The \fIctime\fP() function shall convert the time pointed to by \fIclock\fP,
+representing time in seconds since the Epoch, to
+local time in the form of a string. It shall be equivalent to:
+.sp
+.RS
+.nf
+
+\fBasctime(localtime(clock))
+\fP
+.fi
+.RE
+.LP
+The
+\fIasctime\fP(), \fIctime\fP(), \fIgmtime\fP(),
+and \fIlocaltime\fP() functions shall return values in one of two
+static objects: a
+broken-down time structure and an array of \fBchar\fP. Execution of
+any of the functions may overwrite the information returned in
+either of these objects by any of the other functions.
+.LP
+The \fIctime\fP() function need not be reentrant. A function that
+is not required to be reentrant is not required to be
+thread-safe.
+.LP
+The \fIctime_r\fP() function shall convert the calendar time pointed
+to by \fIclock\fP to local time in exactly the same form as
+\fIctime\fP() and put the string into the array pointed to by \fIbuf\fP
+(which shall be at least 26 bytes in size) and return
+\fIbuf\fP.
+.LP
+Unlike \fIctime\fP(), the thread-safe version \fIctime_r\fP() is not
+required to set \fItzname\fP.
+.SH RETURN VALUE
+.LP
+The \fIctime\fP() function shall return the pointer returned by \fIasctime\fP()
+with
+that broken-down time as an argument.
+.LP
+Upon successful completion, \fIctime_r\fP() shall return a pointer
+to the string pointed to by \fIbuf\fP. When an error is
+encountered, a null pointer shall be returned.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Values for the broken-down time structure can be obtained by calling
+\fIgmtime\fP() or
+\fIlocaltime\fP(). The \fIctime\fP() function is included for compatibility
+with older
+implementations, and does not support localized date and time formats.
+Applications should use the \fIstrftime\fP() function to achieve maximum
+portability.
+.LP
+The \fIctime_r\fP() function is thread-safe and shall return values
+in a user-supplied buffer instead of possibly using a
+static data area that may be overwritten by each call.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIasctime\fP(), \fIclock\fP(), \fIdifftime\fP(), \fIgmtime\fP(),
+\fIlocaltime\fP(),
+\fImktime\fP(), \fIstrftime\fP(), \fIstrptime\fP(), \fItime\fP(),
+\fIutime\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<time.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/ctime_r.3p b/man-pages-posix-2003/man3p/ctime_r.3p
new file mode 100644
index 0000000..e48210d
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ctime_r.3p
@@ -0,0 +1 @@
+.so man3p/ctime.3p
diff --git a/man-pages-posix-2003/man3p/daylight.3p b/man-pages-posix-2003/man3p/daylight.3p
new file mode 100644
index 0000000..3c5f1bc
--- /dev/null
+++ b/man-pages-posix-2003/man3p/daylight.3p
@@ -0,0 +1 @@
+.so man3p/tzset.3p
diff --git a/man-pages-posix-2003/man3p/dbm_clearerr.3p b/man-pages-posix-2003/man3p/dbm_clearerr.3p
new file mode 100644
index 0000000..3e739bc
--- /dev/null
+++ b/man-pages-posix-2003/man3p/dbm_clearerr.3p
@@ -0,0 +1 @@
+.so man3p/dbm_open.3p
diff --git a/man-pages-posix-2003/man3p/dbm_close.3p b/man-pages-posix-2003/man3p/dbm_close.3p
new file mode 100644
index 0000000..3e739bc
--- /dev/null
+++ b/man-pages-posix-2003/man3p/dbm_close.3p
@@ -0,0 +1 @@
+.so man3p/dbm_open.3p
diff --git a/man-pages-posix-2003/man3p/dbm_delete.3p b/man-pages-posix-2003/man3p/dbm_delete.3p
new file mode 100644
index 0000000..3e739bc
--- /dev/null
+++ b/man-pages-posix-2003/man3p/dbm_delete.3p
@@ -0,0 +1 @@
+.so man3p/dbm_open.3p
diff --git a/man-pages-posix-2003/man3p/dbm_error.3p b/man-pages-posix-2003/man3p/dbm_error.3p
new file mode 100644
index 0000000..3e739bc
--- /dev/null
+++ b/man-pages-posix-2003/man3p/dbm_error.3p
@@ -0,0 +1 @@
+.so man3p/dbm_open.3p
diff --git a/man-pages-posix-2003/man3p/dbm_fetch.3p b/man-pages-posix-2003/man3p/dbm_fetch.3p
new file mode 100644
index 0000000..3e739bc
--- /dev/null
+++ b/man-pages-posix-2003/man3p/dbm_fetch.3p
@@ -0,0 +1 @@
+.so man3p/dbm_open.3p
diff --git a/man-pages-posix-2003/man3p/dbm_firstkey.3p b/man-pages-posix-2003/man3p/dbm_firstkey.3p
new file mode 100644
index 0000000..3e739bc
--- /dev/null
+++ b/man-pages-posix-2003/man3p/dbm_firstkey.3p
@@ -0,0 +1 @@
+.so man3p/dbm_open.3p
diff --git a/man-pages-posix-2003/man3p/dbm_nextkey.3p b/man-pages-posix-2003/man3p/dbm_nextkey.3p
new file mode 100644
index 0000000..3e739bc
--- /dev/null
+++ b/man-pages-posix-2003/man3p/dbm_nextkey.3p
@@ -0,0 +1 @@
+.so man3p/dbm_open.3p
diff --git a/man-pages-posix-2003/man3p/dbm_open.3p b/man-pages-posix-2003/man3p/dbm_open.3p
new file mode 100644
index 0000000..aa8fc40
--- /dev/null
+++ b/man-pages-posix-2003/man3p/dbm_open.3p
@@ -0,0 +1,243 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "DBM_CLEARERR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" dbm_clearerr
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+dbm_clearerr, dbm_close, dbm_delete, dbm_error, dbm_fetch, dbm_firstkey,
+dbm_nextkey, dbm_open, dbm_store \- database
+functions
+.SH SYNOPSIS
+.LP
+\fB#include <ndbm.h>
+.br
+.sp
+int dbm_clearerr(DBM *\fP\fIdb\fP\fB);
+.br
+void dbm_close(DBM *\fP\fIdb\fP\fB);
+.br
+int dbm_delete(DBM *\fP\fIdb\fP\fB, datum\fP \fIkey\fP\fB);
+.br
+int dbm_error(DBM *\fP\fIdb\fP\fB);
+.br
+datum dbm_fetch(DBM *\fP\fIdb\fP\fB, datum\fP \fIkey\fP\fB);
+.br
+datum dbm_firstkey(DBM *\fP\fIdb\fP\fB);
+.br
+datum dbm_nextkey(DBM *\fP\fIdb\fP\fB);
+.br
+DBM *dbm_open(const char *\fP\fIfile\fP\fB, int\fP \fIopen_flags\fP\fB,
+mode_t\fP \fIfile_mode\fP\fB);
+.br
+int dbm_store(DBM *\fP\fIdb\fP\fB, datum\fP \fIkey\fP\fB, datum\fP
+\fIcontent\fP\fB, int\fP
+\fIstore_mode\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions create, access, and modify a database.
+.LP
+A \fBdatum\fP consists of at least two members, \fIdptr\fP and \fIdsize\fP.
+The \fIdptr\fP member points to an object that
+is \fIdsize\fP bytes in length. Arbitrary binary data, as well as
+character strings, may be stored in the object pointed to by
+\fIdptr\fP.
+.LP
+The database is stored in two files. One file is a directory containing
+a bitmap of keys and has \fB.dir\fP as its suffix. The
+second file contains all data and has \fB.pag\fP as its suffix.
+.LP
+The \fIdbm_open\fP() function shall open a database. The \fIfile\fP
+argument to the function is the pathname of the database.
+The function opens two files named \fIfile\fP\fB.dir\fP and \fIfile\fP\fB.pag\fP.
+The \fIopen_flags\fP argument has the same
+meaning as the \fIflags\fP argument of \fIopen\fP() except that a
+database opened for
+write-only access opens the files for read and write access and the
+behavior of the O_APPEND flag is unspecified. The
+\fIfile_mode\fP argument has the same meaning as the third argument
+of \fIopen\fP().
+.LP
+The \fIdbm_close\fP() function shall close a database. The application
+shall ensure that argument \fIdb\fP is a pointer to a
+\fBdbm\fP structure that has been returned from a call to \fIdbm_open\fP().
+.LP
+These database functions shall support an internal block size large
+enough to support key/content pairs of at least 1023
+bytes.
+.LP
+The \fIdbm_fetch\fP() function shall read a record from a database.
+The argument \fIdb\fP is a pointer to a database structure
+that has been returned from a call to \fIdbm_open\fP(). The argument
+\fIkey\fP is a \fBdatum\fP that has been initialized by the
+application to the value of the key that matches the key of the record
+the program is fetching.
+.LP
+The \fIdbm_store\fP() function shall write a record to a database.
+The argument \fIdb\fP is a pointer to a database structure
+that has been returned from a call to \fIdbm_open\fP(). The argument
+\fIkey\fP is a \fBdatum\fP that has been initialized by the
+application to the value of the key that identifies (for subsequent
+reading, writing, or deleting) the record the application is
+writing. The argument \fIcontent\fP is a \fBdatum\fP that has been
+initialized by the application to the value of the record the
+program is writing. The argument \fIstore_mode\fP controls whether
+\fIdbm_store\fP() replaces any pre-existing record that has
+the same key that is specified by the \fIkey\fP argument. The application
+shall set \fIstore_mode\fP to either DBM_INSERT or
+DBM_REPLACE. If the database contains a record that matches the \fIkey\fP
+argument and \fIstore_mode\fP is DBM_REPLACE, the
+existing record shall be replaced with the new record. If the database
+contains a record that matches the \fIkey\fP argument and
+\fIstore_mode\fP is DBM_INSERT, the existing record shall be left
+unchanged and the new record ignored. If the database does not
+contain a record that matches the \fIkey\fP argument and \fIstore_mode\fP
+is either DBM_INSERT or DBM_REPLACE, the new record
+shall be inserted in the database.
+.LP
+If the sum of a key/content pair exceeds the internal block size,
+the result is unspecified. Moreover, the application shall
+ensure that all key/content pairs that hash together fit on a single
+block. The \fIdbm_store\fP() function shall return an error
+in the event that a disk block fills with inseparable data.
+.LP
+The \fIdbm_delete\fP() function shall delete a record and its key
+from the database. The argument \fIdb\fP is a pointer to a
+database structure that has been returned from a call to \fIdbm_open\fP().
+The argument \fIkey\fP is a \fBdatum\fP that has been
+initialized by the application to the value of the key that identifies
+the record the program is deleting.
+.LP
+The \fIdbm_firstkey\fP() function shall return the first key in the
+database. The argument \fIdb\fP is a pointer to a database
+structure that has been returned from a call to \fIdbm_open\fP().
+.LP
+The \fIdbm_nextkey\fP() function shall return the next key in the
+database. The argument \fIdb\fP is a pointer to a database
+structure that has been returned from a call to \fIdbm_open\fP().
+The application shall ensure that the \fIdbm_firstkey\fP()
+function is called before calling \fIdbm_nextkey\fP(). Subsequent
+calls to \fIdbm_nextkey\fP() return the next key until all of
+the keys in the database have been returned.
+.LP
+The \fIdbm_error\fP() function shall return the error condition of
+the database. The argument \fIdb\fP is a pointer to a
+database structure that has been returned from a call to \fIdbm_open\fP().
+.LP
+The \fIdbm_clearerr\fP() function shall clear the error condition
+of the database. The argument \fIdb\fP is a pointer to a
+database structure that has been returned from a call to \fIdbm_open\fP().
+.LP
+The \fIdptr\fP pointers returned by these functions may point into
+static storage that may be changed by subsequent calls.
+.LP
+These functions need not be reentrant. A function that is not required
+to be reentrant is not required to be thread-safe.
+.SH RETURN VALUE
+.LP
+The \fIdbm_store\fP() and \fIdbm_delete\fP() functions shall return
+0 when they succeed and a negative value when they
+fail.
+.LP
+The \fIdbm_store\fP() function shall return 1 if it is called with
+a \fIflags\fP value of DBM_INSERT and the function finds an
+existing record with the same key.
+.LP
+The \fIdbm_error\fP() function shall return 0 if the error condition
+is not set and return a non-zero value if the error
+condition is set.
+.LP
+The return value of \fIdbm_clearerr\fP() is unspecified.
+.LP
+The \fIdbm_firstkey\fP() and \fIdbm_nextkey\fP() functions shall return
+a key \fBdatum\fP. When the end of the database is
+reached, the \fIdptr\fP member of the key is a null pointer. If an
+error is detected, the \fIdptr\fP member of the key shall be a
+null pointer and the error condition of the database shall be set.
+.LP
+The \fIdbm_fetch\fP() function shall return a content \fBdatum\fP.
+If no record in the database matches the key or if an error
+condition has been detected in the database, the \fIdptr\fP member
+of the content shall be a null pointer.
+.LP
+The \fIdbm_open\fP() function shall return a pointer to a database
+structure. If an error is detected during the operation,
+\fIdbm_open\fP() shall return a ( \fBDBM *\fP)0.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The following code can be used to traverse the database:
+.sp
+.RS
+.nf
+
+\fBfor(key = dbm_firstkey(db); key.dptr != NULL; key = dbm_nextkey(db))
+\fP
+.fi
+.RE
+.LP
+The \fIdbm_\fP* functions provided in this library should not be confused
+in any way with those of a general-purpose database
+management system. These functions do not provide for multiple search
+keys per entry, they do not protect against multi-user access
+(in other words they do not lock records or files), and they do not
+provide the many other useful database functions that are found
+in more robust database management systems. Creating and updating
+databases by use of these functions is relatively slow because of
+data copies that occur upon hash collisions. These functions are useful
+for applications requiring fast lookup of relatively static
+information that is to be indexed by a single key.
+.LP
+Note that a strictly conforming application is extremely limited by
+these functions: since there is no way to determine that the
+keys in use do not all hash to the same value (although that would
+be rare), a strictly conforming application cannot be guaranteed
+that it can store more than one block's worth of data in the database.
+As long as a key collision does not occur, additional data
+may be stored, but because there is no way to determine whether an
+error is due to a key collision or some other error condition (
+\fIdbm_error\fP() being effectively a Boolean), once an error is detected,
+the application is effectively limited to guessing what
+the error might be if it wishes to continue using these functions.
+.LP
+The \fIdbm_delete\fP() function need not physically reclaim file space,
+although it does make it available for reuse by the
+database.
+.LP
+After calling \fIdbm_store\fP() or \fIdbm_delete\fP() during a pass
+through the keys by \fIdbm_firstkey\fP() and
+\fIdbm_nextkey\fP(), the application should reset the database by
+calling \fIdbm_firstkey\fP() before again calling
+\fIdbm_nextkey\fP(). The contents of these files are unspecified and
+may not be portable.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIopen\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<ndbm.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/dbm_store.3p b/man-pages-posix-2003/man3p/dbm_store.3p
new file mode 100644
index 0000000..3e739bc
--- /dev/null
+++ b/man-pages-posix-2003/man3p/dbm_store.3p
@@ -0,0 +1 @@
+.so man3p/dbm_open.3p
diff --git a/man-pages-posix-2003/man3p/difftime.3p b/man-pages-posix-2003/man3p/difftime.3p
new file mode 100644
index 0000000..1e45868
--- /dev/null
+++ b/man-pages-posix-2003/man3p/difftime.3p
@@ -0,0 +1,60 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "DIFFTIME" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" difftime
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+difftime \- compute the difference between two calendar time values
+.SH SYNOPSIS
+.LP
+\fB#include <time.h>
+.br
+.sp
+double difftime(time_t\fP \fItime1\fP\fB, time_t\fP \fItime0\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIdifftime\fP() function shall compute the difference between
+two calendar times (as returned by \fItime\fP()): \fItime\fP1- \fItime\fP0.
+.SH RETURN VALUE
+.LP
+The \fIdifftime\fP() function shall return the difference expressed
+in seconds as a type \fBdouble\fP.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIasctime\fP(), \fIclock\fP(), \fIctime\fP(),
+\fIgmtime\fP(), \fIlocaltime\fP(), \fImktime\fP(), \fIstrftime\fP(),
+\fIstrptime\fP(),
+\fItime\fP(), \fIutime\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<time.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/dirname.3p b/man-pages-posix-2003/man3p/dirname.3p
new file mode 100644
index 0000000..212e152
--- /dev/null
+++ b/man-pages-posix-2003/man3p/dirname.3p
@@ -0,0 +1,141 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "DIRNAME" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" dirname
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+dirname \- report the parent directory name of a file pathname
+.SH SYNOPSIS
+.LP
+\fB#include <libgen.h>
+.br
+.sp
+char *dirname(char *\fP\fIpath\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIdirname\fP() function shall take a pointer to a character string
+that contains a pathname, and return a pointer to a
+string that is a pathname of the parent directory of that file. Trailing
+\fB'/'\fP characters in the path are not counted as
+part of the path.
+.LP
+If \fIpath\fP does not contain a \fB'/'\fP, then \fIdirname\fP()
+shall return a pointer to the string \fB"."\fP . If
+\fIpath\fP is a null pointer or points to an empty string, \fIdirname\fP()
+shall return a pointer to the string \fB"."\fP
+\&.
+.LP
+The \fIdirname\fP() function need not be reentrant. A function that
+is not required to be reentrant is not required to be
+thread-safe.
+.SH RETURN VALUE
+.LP
+The \fIdirname\fP() function shall return a pointer to a string that
+is the parent directory of \fIpath\fP. If \fIpath\fP is
+a null pointer or points to an empty string, a pointer to a string
+\fB"."\fP is returned.
+.LP
+The \fIdirname\fP() function may modify the string pointed to by \fIpath\fP,
+and may return a pointer to static storage that
+may then be overwritten by subsequent calls to \fIdirname\fP().
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+The following code fragment reads a pathname, changes the current
+working directory to the parent directory, and opens the
+file.
+.sp
+.RS
+.nf
+
+\fBchar path[PATH_MAX], *pathcopy;
+int fd;
+fgets(path, PATH_MAX, stdin);
+pathcopy = strdup(path);
+chdir(dirname(pathcopy));
+fd = open(basename(path), O_RDONLY);
+\fP
+.fi
+.RE
+.SS Sample Input and Output Strings for dirname()
+.LP
+In the following table, the input string is the value pointed to by
+\fIpath\fP, and the output string is the return value of
+the \fIdirname\fP() function.
+.TS C
+center; l l.
+\fBInput String\fP \fBOutput String\fP
+"/usr/lib" "/usr"
+"/usr/" "/"
+"usr" "."
+"/" "/"
+"." "."
+".." "."
+.TE
+.SS Changing the Current Directory to the Parent Directory
+.LP
+The following program fragment reads a pathname, changes the current
+working directory to the parent directory, and opens the
+file.
+.sp
+.RS
+.nf
+
+\fB#include <unistd.h>
+#include <limits.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <string.h>
+#include <libgen.h>
+\&...
+char path[PATH_MAX], *pathcopy;
+int fd;
+\&...
+fgets(path, PATH_MAX, stdin);
+pathcopy = strdup(path);
+chdir(dirname(pathcopy));
+fd = open(basename(path), O_RDONLY);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The \fIdirname\fP() and \fIbasename\fP() functions together yield
+a complete
+pathname. The expression \fIdirname\fP(\fIpath\fP) obtains the pathname
+of the directory where \fIbasename\fP(\fIpath\fP) is
+found.
+.LP
+Since the meaning of the leading \fB"//"\fP is implementation-defined,
+\fIdirname\fP(" \fB//foo\fP) may return either
+\fB"//"\fP or \fB'/'\fP (but nothing else).
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIbasename\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<libgen.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/div.3p b/man-pages-posix-2003/man3p/div.3p
new file mode 100644
index 0000000..de07010
--- /dev/null
+++ b/man-pages-posix-2003/man3p/div.3p
@@ -0,0 +1,72 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "DIV" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" div
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+div \- compute the quotient and remainder of an integer division
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+div_t div(int\fP \fInumer\fP\fB, int\fP \fIdenom\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIdiv\fP() function shall compute the quotient and remainder
+of the division of the numerator \fInumer\fP by the
+denominator \fIdenom\fP. If the division is inexact, the resulting
+quotient is the integer of lesser magnitude that is the nearest
+to the algebraic quotient. If the result cannot be represented, the
+behavior is undefined; otherwise, \fIquot\fP* \fIdenom\fP+
+\fIrem\fP shall equal \fInumer\fP.
+.SH RETURN VALUE
+.LP
+The \fIdiv\fP() function shall return a structure of type \fBdiv_t\fP,
+comprising both the quotient and the remainder. The
+structure includes the following members, in any order:
+.sp
+.RS
+.nf
+
+\fBint quot; /* quotient */
+int rem; /* remainder */
+\fP
+.fi
+.RE
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIldiv\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/dlclose.3p b/man-pages-posix-2003/man3p/dlclose.3p
new file mode 100644
index 0000000..5a5d10d
--- /dev/null
+++ b/man-pages-posix-2003/man3p/dlclose.3p
@@ -0,0 +1,115 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "DLCLOSE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" dlclose
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+dlclose \- close a dlopen object
+.SH SYNOPSIS
+.LP
+\fB#include <dlfcn.h>
+.br
+.sp
+int dlclose(void *\fP\fIhandle\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIdlclose\fP() function shall inform the system that the object
+referenced by a \fIhandle\fP returned from a previous \fIdlopen\fP()
+invocation is no longer needed by the application.
+.LP
+The use of \fIdlclose\fP() reflects a statement of intent on the part
+of the process, but does not create any requirement upon
+the implementation, such as removal of the code or symbols referenced
+by \fIhandle\fP. Once an object has been closed using
+\fIdlclose\fP() an application should assume that its symbols are
+no longer available to \fIdlsym\fP(). All objects loaded automatically
+as a result of invoking \fIdlopen\fP() on the referenced object shall
+also be closed if this is the last reference to
+it.
+.LP
+Although a \fIdlclose\fP() operation is not required to remove structures
+from an address space, neither is an implementation
+prohibited from doing so. The only restriction on such a removal is
+that no object shall be removed to which references have been
+relocated, until or unless all such references are removed. For instance,
+an object that had been loaded with a \fIdlopen\fP() operation specifying
+the RTLD_GLOBAL flag might provide a target for dynamic
+relocations performed in the processing of other objects-in such environments,
+an application may assume that no relocation, once
+made, shall be undone or remade unless the object requiring the relocation
+has itself been removed.
+.SH RETURN VALUE
+.LP
+If the referenced object was successfully closed, \fIdlclose\fP()
+shall return 0. If the object could not be closed, or if
+\fIhandle\fP does not refer to an open object, \fIdlclose\fP() shall
+return a non-zero value. More detailed diagnostic
+information shall be available through \fIdlerror\fP().
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+The following example illustrates use of \fIdlopen\fP() and \fIdlclose\fP():
+.sp
+.RS
+.nf
+
+\fB\&...
+/* Open a dynamic library and then close it ... */
+.sp
+
+#include <dlfcn.h>
+void *mylib;
+int eret;
+.sp
+
+mylib = dlopen("mylib.so", RTLD_LOCAL | RTLD_LAZY);
+\&...
+eret = dlclose(mylib);
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+A conforming application should employ a \fIhandle\fP returned from
+a \fIdlopen\fP()
+invocation only within a given scope bracketed by the \fIdlopen\fP()
+and \fIdlclose\fP()
+operations. Implementations are free to use reference counting or
+other techniques such that multiple calls to \fIdlopen\fP() referencing
+the same object may return the same object for \fIhandle\fP.
+Implementations are also free to reuse a \fIhandle\fP. For these reasons,
+the value of a \fIhandle\fP must be treated as an
+opaque object by the application, used only in calls to \fIdlsym\fP()
+and
+\fIdlclose\fP().
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIdlerror\fP(), \fIdlopen\fP(), \fIdlsym\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<dlfcn.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/dlerror.3p b/man-pages-posix-2003/man3p/dlerror.3p
new file mode 100644
index 0000000..a77800b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/dlerror.3p
@@ -0,0 +1,93 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "DLERROR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" dlerror
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+dlerror \- get diagnostic information
+.SH SYNOPSIS
+.LP
+\fB#include <dlfcn.h>
+.br
+.sp
+char *dlerror(void); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIdlerror\fP() function shall return a null-terminated character
+string (with no trailing <newline>) that describes
+the last error that occurred during dynamic linking processing. If
+no dynamic linking errors have occurred since the last
+invocation of \fIdlerror\fP(), \fIdlerror\fP() shall return NULL.
+Thus, invoking \fIdlerror\fP() a second time, immediately
+following a prior invocation, shall result in NULL being returned.
+.LP
+The \fIdlerror\fP() function need not be reentrant. A function that
+is not required to be reentrant is not required to be
+thread-safe.
+.SH RETURN VALUE
+.LP
+If successful, \fIdlerror\fP() shall return a null-terminated character
+string; otherwise, NULL shall be returned.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+The following example prints out the last dynamic linking error:
+.sp
+.RS
+.nf
+
+\fB\&...
+#include <dlfcn.h>
+.sp
+
+char *errstr;
+.sp
+
+errstr = dlerror();
+if (errstr != NULL)
+printf ("A dynamic linking error occurred: (%s)\\n", errstr);
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The messages returned by \fIdlerror\fP() may reside in a static buffer
+that is overwritten on each call to \fIdlerror\fP().
+Application code should not write to this buffer. Programs wishing
+to preserve an error message should make their own copies of
+that message. Depending on the application environment with respect
+to asynchronous execution events, such as signals or other
+asynchronous computation sharing the address space, conforming applications
+should use a critical section to retrieve the error
+pointer and buffer.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIdlclose\fP(), \fIdlopen\fP(), \fIdlsym\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<dlfcn.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/dlopen.3p b/man-pages-posix-2003/man3p/dlopen.3p
new file mode 100644
index 0000000..d4674a1
--- /dev/null
+++ b/man-pages-posix-2003/man3p/dlopen.3p
@@ -0,0 +1,199 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "DLOPEN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" dlopen
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+dlopen \- gain access to an executable object file
+.SH SYNOPSIS
+.LP
+\fB#include <dlfcn.h>
+.br
+.sp
+void *dlopen(const char *\fP\fIfile\fP\fB, int\fP \fImode\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIdlopen\fP() function shall make an executable object file specified
+by \fIfile\fP available to the calling program. The
+class of files eligible for this operation and the manner of their
+construction are implementation-defined, though typically such
+files are executable objects such as shared libraries, relocatable
+files, or programs. Note that some implementations permit the
+construction of dependencies between such objects that are embedded
+within files. In such cases, a \fIdlopen\fP() operation shall
+load such dependencies in addition to the object referenced by \fIfile\fP.
+Implementations may also impose specific constraints on
+the construction of programs that can employ \fIdlopen\fP() and its
+related services.
+.LP
+A successful \fIdlopen\fP() shall return a \fIhandle\fP which the
+caller may use on subsequent calls to \fIdlsym\fP() and \fIdlclose\fP().
+The value of this
+\fIhandle\fP should not be interpreted in any way by the caller.
+.LP
+The \fIfile\fP argument is used to construct a pathname to the object
+file. If \fIfile\fP contains a slash character, the
+\fIfile\fP argument is used as the pathname for the file. Otherwise,
+\fIfile\fP is used in an implementation-defined manner to
+yield a pathname.
+.LP
+If the value of \fIfile\fP is 0, \fIdlopen\fP() shall provide a \fIhandle\fP
+on a global symbol object. This object shall
+provide access to the symbols from an ordered set of objects consisting
+of the original program image file, together with any
+objects loaded at program start-up as specified by that process image
+file (for example, shared libraries), and the set of objects
+loaded using a \fIdlopen\fP() operation together with the RTLD_GLOBAL
+flag. As the latter set of objects can change during
+execution, the set identified by \fIhandle\fP can also change dynamically.
+.LP
+Only a single copy of an object file is brought into the address space,
+even if \fIdlopen\fP() is invoked multiple times in
+reference to the file, and even if different pathnames are used to
+reference the file.
+.LP
+The \fImode\fP parameter describes how \fIdlopen\fP() shall operate
+upon \fIfile\fP with respect to the processing of
+relocations and the scope of visibility of the symbols provided within
+\fIfile\fP. When an object is brought into the address
+space of a process, it may contain references to symbols whose addresses
+are not known until the object is loaded. These references
+shall be relocated before the symbols can be accessed. The \fImode\fP
+parameter governs when these relocations take place and may
+have the following values:
+.TP 7
+RTLD_LAZY
+Relocations shall be performed at an implementation-defined time,
+ranging from the time of the \fIdlopen\fP() call until the
+first reference to a given symbol occurs. Specifying RTLD_LAZY should
+improve performance on implementations supporting dynamic
+symbol binding as a process may not reference all of the functions
+in any given object. And, for systems supporting dynamic symbol
+resolution for normal process execution, this behavior mimics the
+normal handling of process execution.
+.TP 7
+RTLD_NOW
+All necessary relocations shall be performed when the object is first
+loaded. This may waste some processing if relocations are
+performed for functions that are never referenced. This behavior may
+be useful for applications that need to know as soon as an
+object is loaded that all symbols referenced during execution are
+available.
+.sp
+.LP
+Any object loaded by \fIdlopen\fP() that requires relocations against
+global symbols can reference the symbols in the original
+process image file, any objects loaded at program start-up, from the
+object itself as well as any other object included in the same
+\fIdlopen\fP() invocation, and any objects that were loaded in any
+\fIdlopen\fP() invocation and which specified the RTLD_GLOBAL
+flag. To determine the scope of visibility for the symbols loaded
+with a \fIdlopen\fP() invocation, the \fImode\fP parameter
+should be a bitwise-inclusive OR with one of the following values:
+.TP 7
+RTLD_GLOBAL
+The object's symbols shall be made available for the relocation processing
+of any other object. In addition, symbol lookup
+using \fIdlopen\fP(\fI0, mode\fP) and an associated \fIdlsym\fP()
+allows objects loaded
+with this \fImode\fP to be searched.
+.TP 7
+RTLD_LOCAL
+The object's symbols shall not be made available for the relocation
+processing of any other object.
+.sp
+.LP
+If neither RTLD_GLOBAL nor RTLD_LOCAL are specified, then an implementation-defined
+default behavior shall be applied.
+.LP
+If a \fIfile\fP is specified in multiple \fIdlopen\fP() invocations,
+\fImode\fP is interpreted at each invocation. Note,
+however, that once RTLD_NOW has been specified all relocations shall
+have been completed rendering further RTLD_NOW operations
+redundant and any further RTLD_LAZY operations irrelevant. Similarly,
+note that once RTLD_GLOBAL has been specified the object
+shall maintain the RTLD_GLOBAL status regardless of any previous or
+future specification of RTLD_LOCAL, as long as the object
+remains in the address space (see \fIdlclose\fP()).
+.LP
+Symbols introduced into a program through calls to \fIdlopen\fP()
+may be used in relocation activities. Symbols so introduced
+may duplicate symbols already defined by the program or previous \fIdlopen\fP()
+operations. To resolve the ambiguities such a
+situation might present, the resolution of a symbol reference to symbol
+definition is based on a symbol resolution order. Two such
+resolution orders are defined: \fIload\fP or \fIdependency\fP ordering.
+Load order establishes an ordering among symbol
+definitions, such that the definition first loaded (including definitions
+from the image file and any dependent objects loaded with
+it) has priority over objects added later (via \fIdlopen\fP()). Load
+ordering is used in relocation processing. Dependency
+ordering uses a breadth-first order starting with a given object,
+then all of its dependencies, then any dependents of those,
+iterating until all dependencies are satisfied. With the exception
+of the global symbol object obtained via a \fIdlopen\fP()
+operation on a \fIfile\fP of 0, dependency ordering is used by the
+\fIdlsym\fP() function.
+Load ordering is used in \fIdlsym\fP() operations upon the global
+symbol object.
+.LP
+When an object is first made accessible via \fIdlopen\fP() it and
+its dependent objects are added in dependency order. Once all
+the objects are added, relocations are performed using load order.
+Note that if an object or its dependencies had been previously
+loaded, the load and dependency orders may yield different resolutions.
+.LP
+The symbols introduced by \fIdlopen\fP() operations and available
+through \fIdlsym\fP()
+are at a minimum those which are exported as symbols of global scope
+by the object. Typically such symbols shall be those that were
+specified in (for example) C source code as having \fIextern\fP linkage.
+The precise manner in which an implementation constructs
+the set of exported symbols for a \fIdlopen\fP() object is specified
+by that implementation.
+.SH RETURN VALUE
+.LP
+If \fIfile\fP cannot be found, cannot be opened for reading, is not
+of an appropriate object format for processing by
+\fIdlopen\fP(), or if an error occurs during the process of loading
+\fIfile\fP or relocating its symbolic references,
+\fIdlopen\fP() shall return NULL. More detailed diagnostic information
+shall be available through \fIdlerror\fP().
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIdlclose\fP(), \fIdlerror\fP(), \fIdlsym\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<dlfcn.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/dlsym.3p b/man-pages-posix-2003/man3p/dlsym.3p
new file mode 100644
index 0000000..61c6b5a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/dlsym.3p
@@ -0,0 +1,153 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "DLSYM" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" dlsym
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+dlsym \- obtain the address of a symbol from a dlopen object
+.SH SYNOPSIS
+.LP
+\fB#include <dlfcn.h>
+.br
+.sp
+void *dlsym(void *restrict\fP \fIhandle\fP\fB, const char *restrict\fP
+\fIname\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIdlsym\fP() function shall obtain the address of a symbol defined
+within an object made accessible through a \fIdlopen\fP() call. The
+\fIhandle\fP argument is the value returned from a call to \fIdlopen\fP()
+(and which has not since been released via a call to \fIdlclose\fP()),
+and \fIname\fP is the symbol's name as a character string.
+.LP
+The \fIdlsym\fP() function shall search for the named symbol in all
+objects loaded automatically as a result of loading the
+object referenced by \fIhandle\fP (see \fIdlopen\fP()). Load ordering
+is used in \fIdlsym\fP()
+operations upon the global symbol object. The symbol resolution algorithm
+used shall be dependency order as described in \fIdlopen\fP().
+.LP
+The RTLD_DEFAULT and RTLD_NEXT flags are reserved for future use.
+.SH RETURN VALUE
+.LP
+If \fIhandle\fP does not refer to a valid object opened by \fIdlopen\fP(),
+or if the
+named symbol cannot be found within any of the objects associated
+with \fIhandle\fP, \fIdlsym\fP() shall return NULL. More
+detailed diagnostic information shall be available through \fIdlerror\fP()
+\&.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+The following example shows how \fIdlopen\fP() and \fIdlsym\fP() can
+be used to access
+either function or data objects. For simplicity, error checking has
+been omitted.
+.sp
+.RS
+.nf
+
+\fBvoid *handle;
+int *iptr, (*fptr)(int);
+.sp
+
+/* open the needed object */
+handle = dlopen("/usr/home/me/libfoo.so", RTLD_LOCAL | RTLD_LAZY);
+.sp
+
+/* find the address of function and data objects */
+*(void **)(&fptr) = dlsym(handle, "my_function");
+iptr = (int *)dlsym(handle, "my_object");
+.sp
+
+/* invoke function, passing value of integer as a parameter */
+(*fptr)(*iptr);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+Special purpose values for \fIhandle\fP are reserved for future use.
+These values and their meanings are:
+.TP 7
+RTLD_DEFAULT
+The symbol lookup happens in the normal global scope; that is, a search
+for a symbol using this handle would find the same
+definition as a direct use of this symbol in the program code.
+.TP 7
+RTLD_NEXT
+Specifies the next object after this one that defines \fIname\fP.
+\fIThis one\fP refers to the object containing the
+invocation of \fIdlsym\fP(). The \fInext\fP object is the one found
+upon the application of a load order symbol resolution
+algorithm (see \fIdlopen\fP()). The next object is either one of
+global scope (because it was
+introduced as part of the original process image or because it was
+added with a \fIdlopen\fP() operation including the RTLD_GLOBAL flag),
+or is an object that was included in the
+same \fIdlopen\fP() operation that loaded this one.
+.LP
+The RTLD_NEXT flag is useful to navigate an intentionally created
+hierarchy of multiply-defined symbols created through
+\fIinterposition\fP. For example, if a program wished to create an
+implementation of \fImalloc\fP() that embedded some statistics gathering
+about memory allocations, such an
+implementation could use the real \fImalloc\fP() definition to perform
+the memory
+allocation-and itself only embed the necessary logic to implement
+the statistics gathering function.
+.sp
+.SH RATIONALE
+.LP
+The ISO\ C standard does not require that pointers to functions can
+be cast back and forth to pointers to data. Indeed, the
+ISO\ C standard does not require that an object of type \fBvoid *\fP
+can hold a pointer to a function. Implementations
+supporting the XSI extension, however, do require that an object of
+type \fBvoid *\fP can hold a pointer to a function. The result
+of converting a pointer to a function into a pointer to another data
+type (except \fBvoid *\fP) is still undefined, however. Note
+that compilers conforming to the ISO\ C standard are required to generate
+a warning if a conversion from a \fBvoid *\fP
+pointer to a function pointer is attempted as in:
+.sp
+.RS
+.nf
+
+\fBfptr = (int (*)(int))dlsym(handle, "my_function");
+\fP
+.fi
+.RE
+.LP
+Due to the problem noted here, a future version may either add a new
+function to return function pointers, or the current
+interface may be deprecated in favor of two new functions: one that
+returns data pointers and the other that returns function
+pointers.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIdlclose\fP(), \fIdlerror\fP(), \fIdlopen\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<dlfcn.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/drand48.3p b/man-pages-posix-2003/man3p/drand48.3p
new file mode 100644
index 0000000..5f39fb1
--- /dev/null
+++ b/man-pages-posix-2003/man3p/drand48.3p
@@ -0,0 +1,172 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "DRAND48" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" drand48
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+drand48, erand48, jrand48, lcong48, lrand48, mrand48, nrand48, seed48,
+srand48 \- generate uniformly distributed
+pseudo\-random numbers
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+double drand48(void);
+.br
+double erand48(unsigned short\fP \fIxsubi\fP\fB[3]);
+.br
+long jrand48(unsigned short\fP \fIxsubi\fP\fB[3]);
+.br
+void lcong48(unsigned short\fP \fIparam\fP\fB[7]);
+.br
+long lrand48(void);
+.br
+long mrand48(void);
+.br
+long nrand48(unsigned short\fP \fIxsubi\fP\fB[3]);
+.br
+unsigned short *seed48(unsigned short\fP \fIseed16v\fP\fB[3]);
+.br
+void srand48(long\fP \fIseedval\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+This family of functions shall generate pseudo-random numbers using
+a linear congruential algorithm and 48-bit integer
+arithmetic.
+.LP
+The \fIdrand48\fP() and \fIerand48\fP() functions shall return non-negative,
+double-precision, floating-point values,
+uniformly distributed over the interval [0.0,1.0).
+.LP
+The \fIlrand48\fP() and \fInrand48\fP() functions shall return non-negative,
+long integers, uniformly distributed over the
+interval [0,2**31).
+.LP
+The \fImrand48\fP() and \fIjrand48\fP() functions shall return signed
+long integers uniformly distributed over the interval
+[-2**31,2**31).
+.LP
+The \fIsrand48\fP(), \fIseed48\fP(), and \fIlcong48\fP() functions
+are initialization entry points, one of which should be
+invoked before either \fIdrand48\fP(), \fIlrand48\fP(), or \fImrand48\fP()
+is called. (Although it is not recommended practice,
+constant default initializer values shall be supplied automatically
+if \fIdrand48\fP(), \fIlrand48\fP(), or \fImrand48\fP() is
+called without a prior call to an initialization entry point.) The
+\fIerand48\fP(), \fInrand48\fP(), and \fIjrand48\fP()
+functions do not require an initialization entry point to be called
+first.
+.LP
+All the routines work by generating a sequence of 48-bit integer values,
+X_i, according to the linear congruential
+formula:
+X_n+1 = (aX_n + c)_mod m\ \ \ n>= 0
+.LP
+The parameter \fIm\fP = 2**48; hence 48-bit integer arithmetic is
+performed. Unless \fIlcong48\fP() is invoked, the multiplier
+value \fIa\fP and the addend value \fIc\fP are given by:
+\fIa\fP = 5DEECE66D_16 = 273673163155_8
+.LP
+\fIc\fP = B_16 = 13_8
+.LP
+The value returned by any of the \fIdrand48\fP(), \fIerand48\fP(),
+\fIjrand48\fP(), \fIlrand48\fP(), \fImrand48\fP(), or
+\fInrand48\fP() functions is computed by first generating the next
+48-bit X_i in the sequence. Then the appropriate number
+of bits, according to the type of data item to be returned, are copied
+from the high-order (leftmost) bits of X_i and
+transformed into the returned value.
+.LP
+The \fIdrand48\fP(), \fIlrand48\fP(), and \fImrand48\fP() functions
+store the last 48-bit X_i generated in an internal
+buffer; that is why the application shall ensure that these are initialized
+prior to being invoked. The \fIerand48\fP(),
+\fInrand48\fP(), and \fIjrand48\fP() functions require the calling
+program to provide storage for the successive X_i values
+in the array specified as an argument when the functions are invoked.
+That is why these routines do not have to be initialized; the
+calling program merely has to place the desired initial value of X_i
+into the array and pass it as an argument. By using
+different arguments, \fIerand48\fP(), \fInrand48\fP(), and \fIjrand48\fP()
+allow separate modules of a large program to generate
+several \fIindependent\fP streams of pseudo-random numbers; that is,
+the sequence of numbers in each stream shall \fInot\fP
+depend upon how many times the routines are called to generate numbers
+for the other streams.
+.LP
+The initializer function \fIsrand48\fP() sets the high-order 32 bits
+of X_i to the low-order 32 bits contained in its
+argument. The low-order 16 bits of X_i are set to the arbitrary value
+330E_16.
+.LP
+The initializer function \fIseed48\fP() sets the value of X_i to the
+48-bit value specified in the argument array. The
+low-order 16 bits of X_i are set to the low-order 16 bits of \fIseed16v\fP[\fI0\fP].
+The mid-order 16 bits of X_i are
+set to the low-order 16 bits of \fIseed16v\fP[\fI1\fP]. The high-order
+16 bits of X_i are set to the low-order 16 bits of
+\fIseed16v\fP[\fI2\fP]. In addition, the previous value of X_i is
+copied into a 48-bit internal buffer, used only by
+\fIseed48\fP(), and a pointer to this buffer is the value returned
+by \fIseed48\fP(). This returned pointer, which can just be
+ignored if not needed, is useful if a program is to be restarted from
+a given point at some future time-use the pointer to get at
+and store the last X_i value, and then use this value to reinitialize
+via \fIseed48\fP() when the program is restarted.
+.LP
+The initializer function \fIlcong48\fP() allows the user to specify
+the initial X_i, the multiplier value \fIa\fP, and the
+addend value \fIc\fP.
+Argument array elements \fIparam\fP[\fI0-2\fP] specify X_i, \fIparam\fP[\fI3-5\fP]
+specify the
+multiplier \fIa\fP, and \fIparam\fP[\fI6\fP] specifies the 16-bit
+addend \fIc\fP. After \fIlcong48\fP() is called, a subsequent call
+to
+either \fIsrand48\fP() or \fIseed48\fP() shall restore the standard
+multiplier and addend values, \fIa\fP and \fIc,\fP
+specified above.
+.LP
+The \fIdrand48\fP(), \fIlrand48\fP(), and \fImrand48\fP() functions
+need not be reentrant. A function that is not required to
+be reentrant is not required to be thread-safe.
+.SH RETURN VALUE
+.LP
+As described in the DESCRIPTION above.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIrand\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/dup.3p b/man-pages-posix-2003/man3p/dup.3p
new file mode 100644
index 0000000..18d8da1
--- /dev/null
+++ b/man-pages-posix-2003/man3p/dup.3p
@@ -0,0 +1,199 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "DUP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" dup
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+dup, dup2 \- duplicate an open file descriptor
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+int dup(int\fP \fIfildes\fP\fB);
+.br
+int dup2(int\fP \fIfildes\fP\fB, int\fP \fIfildes2\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIdup\fP() and \fIdup2\fP() functions provide an alternative
+interface to the service provided by \fIfcntl\fP() using the F_DUPFD
+command. The call:
+.sp
+.RS
+.nf
+
+\fBfid = dup(\fP\fIfildes\fP\fB);
+\fP
+.fi
+.RE
+.LP
+shall be equivalent to:
+.sp
+.RS
+.nf
+
+\fBfid = fcntl(\fP\fIfildes\fP\fB, F_DUPFD, 0);
+\fP
+.fi
+.RE
+.LP
+The call:
+.sp
+.RS
+.nf
+
+\fBfid = dup2(\fP\fIfildes\fP\fB,\fP \fIfildes2\fP\fB);
+\fP
+.fi
+.RE
+.LP
+shall be equivalent to:
+.sp
+.RS
+.nf
+
+\fBclose(\fP\fIfildes2\fP\fB);
+fid = fcntl(\fP\fIfildes\fP\fB, F_DUPFD,\fP \fIfildes2\fP\fB);
+\fP
+.fi
+.RE
+.LP
+except for the following:
+.IP " *" 3
+If \fIfildes2\fP is less than 0 or greater than or equal to {OPEN_MAX},
+\fIdup2\fP() shall return -1 with \fIerrno\fP set to
+[EBADF].
+.LP
+.IP " *" 3
+If \fIfildes\fP is a valid file descriptor and is equal to \fIfildes2\fP,
+\fIdup2\fP() shall return \fIfildes2\fP without
+closing it.
+.LP
+.IP " *" 3
+If \fIfildes\fP is not a valid file descriptor, \fIdup2\fP() shall
+return -1 and shall not close \fIfildes2\fP.
+.LP
+.IP " *" 3
+The value returned shall be equal to the value of \fIfildes2\fP upon
+successful completion, or -1 upon failure.
+.LP
+.SH RETURN VALUE
+.LP
+Upon successful completion a non-negative integer, namely the file
+descriptor, shall be returned; otherwise, -1 shall be
+returned and \fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fIdup\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not a valid open file descriptor.
+.TP 7
+.B EMFILE
+The number of file descriptors in use by this process would exceed
+{OPEN_MAX}.
+.sp
+.LP
+The \fIdup2\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not a valid open file descriptor or the
+argument \fIfildes2\fP is negative or greater than or
+equal to {OPEN_MAX}.
+.TP 7
+.B EINTR
+The \fIdup2\fP() function was interrupted by a signal.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Redirecting Standard Output to a File
+.LP
+The following example closes standard output for the current processes,
+re-assigns standard output to go to the file referenced
+by \fIpfd\fP, and closes the original file descriptor to clean up.
+.sp
+.RS
+.nf
+
+\fB#include <unistd.h>
+\&...
+int pfd;
+\&...
+close(1);
+dup(pfd);
+close(pfd);
+\&...
+\fP
+.fi
+.RE
+.SS Redirecting Error Messages
+.LP
+The following example redirects messages from \fIstderr\fP to \fIstdout\fP.
+.sp
+.RS
+.nf
+
+\fB#include <unistd.h>
+\&...
+dup2(1, 2);
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIdup\fP() and \fIdup2\fP() functions are redundant. Their services
+are also provided by the \fIfcntl\fP() function. They have been included
+in this volume of IEEE\ Std\ 1003.1-2001
+primarily for historical reasons, since many existing applications
+use them.
+.LP
+While the brief code segment shown is very similar in behavior to
+\fIdup2\fP(), a conforming implementation based on other
+functions defined in this volume of IEEE\ Std\ 1003.1-2001 is significantly
+more complex. Least obvious is the possible
+effect of a signal-catching function that could be invoked between
+steps and allocate or deallocate file descriptors. This could be
+avoided by blocking signals.
+.LP
+The \fIdup2\fP() function is not marked obsolescent because it presents
+a type-safe version of functionality provided in a
+type-unsafe version by \fIfcntl\fP(). It is used in the POSIX Ada
+binding.
+.LP
+The \fIdup2\fP() function is not intended for use in critical regions
+as a synchronization mechanism.
+.LP
+In the description of [EBADF], the case of \fIfildes\fP being out
+of range is covered by the given case of \fIfildes\fP not
+being valid. The descriptions for \fIfildes\fP and \fIfildes2\fP are
+different because the only kind of invalidity that is
+relevant for \fIfildes2\fP is whether it is out of range; that is,
+it does not matter whether \fIfildes2\fP refers to an open
+file when the \fIdup2\fP() call is made.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIclose\fP(), \fIfcntl\fP(), \fIopen\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/dup2.3p b/man-pages-posix-2003/man3p/dup2.3p
new file mode 100644
index 0000000..8ee51a9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/dup2.3p
@@ -0,0 +1 @@
+.so man3p/dup.3p
diff --git a/man-pages-posix-2003/man3p/ecvt.3p b/man-pages-posix-2003/man3p/ecvt.3p
new file mode 100644
index 0000000..c53dbef
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ecvt.3p
@@ -0,0 +1,124 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ECVT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ecvt
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ecvt, fcvt, gcvt \- convert a floating-point number to a string (\fBLEGACY\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+char *ecvt(double\fP \fIvalue\fP\fB, int\fP \fIndigit\fP\fB, int *restrict\fP
+\fIdecpt\fP\fB,
+.br
+\ \ \ \ \ \ int *restrict\fP \fIsign\fP\fB);
+.br
+char *fcvt(double\fP \fIvalue\fP\fB, int\fP \fIndigit\fP\fB, int *restrict\fP
+\fIdecpt\fP\fB,
+.br
+\ \ \ \ \ \ int *restrict\fP \fIsign\fP\fB);
+.br
+char *gcvt(double\fP \fIvalue\fP\fB, int\fP \fIndigit\fP\fB, char
+*\fP\fIbuf\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIecvt\fP(), \fIfcvt\fP(), and \fIgcvt\fP() functions shall convert
+floating-point numbers to null-terminated
+strings.
+.LP
+The \fIecvt\fP() function shall convert \fIvalue\fP to a null-terminated
+string of \fIndigit\fP digits (where \fIndigit\fP
+is reduced to an unspecified limit determined by the precision of
+a \fBdouble\fP) and return a pointer to the string. The
+high-order digit shall be non-zero, unless the value is 0. The low-order
+digit shall be rounded in an implementation-defined
+manner. The position of the radix character relative to the beginning
+of the string shall be stored in the integer pointed to by
+\fIdecpt\fP (negative means to the left of the returned digits). If
+\fIvalue\fP is zero, it is unspecified whether the integer
+pointed to by \fIdecpt\fP would be 0 or 1. The radix character shall
+not be included in the returned string. If the sign of the
+result is negative, the integer pointed to by \fIsign\fP shall be
+non-zero; otherwise, it shall be 0.
+.LP
+If the converted value is out of range or is not representable, the
+contents of the returned string are unspecified.
+.LP
+The \fIfcvt\fP() function shall be equivalent to \fIecvt\fP(), except
+that \fIndigit\fP specifies the number of digits
+desired after the radix character. The total number of digits in the
+result string is restricted to an unspecified limit as
+determined by the precision of a \fBdouble\fP.
+.LP
+The \fIgcvt\fP() function shall convert \fIvalue\fP to a null-terminated
+string (similar to that of the \fB%g\fP conversion
+specification format of \fIprintf\fP()) in the array pointed to by
+\fIbuf\fP and shall
+return \fIbuf\fP. It shall produce \fIndigit\fP significant digits
+(limited to an unspecified value determined by the precision
+of a \fBdouble\fP) in the \fB%f\fP conversion specification format
+of \fIprintf\fP() if
+possible, or the \fB%e\fP conversion specification format of \fIprintf\fP()
+(scientific
+notation) otherwise. A minus sign shall be included in the returned
+string if \fIvalue\fP is less than 0. A radix character shall
+be included in the returned string if \fIvalue\fP is not a whole number.
+Trailing zeros shall be suppressed where \fIvalue\fP is
+not a whole number. The radix character is determined by the current
+locale. If \fIsetlocale\fP() has not been called successfully, the
+default locale, POSIX, is used. The
+default locale specifies a period ( \fB'.'\fP ) as the radix character.
+The \fILC_NUMERIC\fP category determines the value of
+the radix character within the current locale.
+.LP
+These functions need not be reentrant. A function that is not required
+to be reentrant is not required to be thread-safe.
+.SH RETURN VALUE
+.LP
+The \fIecvt\fP() and \fIfcvt\fP() functions shall return a pointer
+to a null-terminated string of digits.
+.LP
+The \fIgcvt\fP() function shall return \fIbuf\fP.
+.LP
+The return values from \fIecvt\fP() and \fIfcvt\fP() may point to
+static data which may be overwritten by subsequent calls to
+these functions.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIsprintf\fP() function is preferred over this function.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+These functions may be withdrawn in a future version.
+.SH SEE ALSO
+.LP
+\fIprintf\fP(), \fIsetlocale\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/encrypt.3p b/man-pages-posix-2003/man3p/encrypt.3p
new file mode 100644
index 0000000..d39a48e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/encrypt.3p
@@ -0,0 +1,89 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ENCRYPT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" encrypt
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+encrypt \- encoding function (\fBCRYPT\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+void encrypt(char\fP \fIblock\fP\fB[64], int\fP \fIedflag\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIencrypt\fP() function shall provide access to an implementation-defined
+encoding algorithm. The key generated by \fIsetkey\fP() is used to
+encrypt the string \fIblock\fP with \fIencrypt\fP().
+.LP
+The \fIblock\fP argument to \fIencrypt\fP() shall be an array of length
+64 bytes containing only the bytes with values of 0
+and 1. The array is modified in place to a similar array using the
+key set by \fIsetkey\fP(). If \fIedflag\fP is 0, the argument is encoded.
+If \fIedflag\fP is 1, the argument
+may be decoded (see the APPLICATION USAGE section); if the argument
+is not decoded, \fIerrno\fP shall be set to [ENOSYS].
+.LP
+The \fIencrypt\fP() function shall not change the setting of \fIerrno\fP
+if successful. An application wishing to check for
+error situations should set \fIerrno\fP to 0 before calling \fIencrypt\fP().
+If \fIerrno\fP is non-zero on return, an error has
+occurred.
+.LP
+The \fIencrypt\fP() function need not be reentrant. A function that
+is not required to be reentrant is not required to be
+thread-safe.
+.SH RETURN VALUE
+.LP
+The \fIencrypt\fP() function shall not return a value.
+.SH ERRORS
+.LP
+The \fIencrypt\fP() function shall fail if:
+.TP 7
+.B ENOSYS
+The functionality is not supported on this implementation.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Historical implementations of the \fIencrypt\fP() function used a
+rather primitive encoding algorithm.
+.LP
+In some environments, decoding might not be implemented. This is related
+to some Government restrictions on encryption and
+decryption routines. Historical practice has been to ship a different
+version of the encryption library without the decryption
+feature in the routines supplied. Thus the exported version of \fIencrypt\fP()
+does encoding but not decoding.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcrypt\fP(), \fIsetkey\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/endgrent.3p b/man-pages-posix-2003/man3p/endgrent.3p
new file mode 100644
index 0000000..8dc5add
--- /dev/null
+++ b/man-pages-posix-2003/man3p/endgrent.3p
@@ -0,0 +1 @@
+.so man3p/getgrent.3p
diff --git a/man-pages-posix-2003/man3p/endhostent.3p b/man-pages-posix-2003/man3p/endhostent.3p
new file mode 100644
index 0000000..490b764
--- /dev/null
+++ b/man-pages-posix-2003/man3p/endhostent.3p
@@ -0,0 +1 @@
+.so man3p/gethostent.3p
diff --git a/man-pages-posix-2003/man3p/endnetent.3p b/man-pages-posix-2003/man3p/endnetent.3p
new file mode 100644
index 0000000..17b642a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/endnetent.3p
@@ -0,0 +1 @@
+.so man3p/getnetent.3p
diff --git a/man-pages-posix-2003/man3p/endprotoent.3p b/man-pages-posix-2003/man3p/endprotoent.3p
new file mode 100644
index 0000000..82a4140
--- /dev/null
+++ b/man-pages-posix-2003/man3p/endprotoent.3p
@@ -0,0 +1 @@
+.so man3p/getprotoent.3p
diff --git a/man-pages-posix-2003/man3p/endpwent.3p b/man-pages-posix-2003/man3p/endpwent.3p
new file mode 100644
index 0000000..235cf8b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/endpwent.3p
@@ -0,0 +1 @@
+.so man3p/getpwent.3p
diff --git a/man-pages-posix-2003/man3p/endservent.3p b/man-pages-posix-2003/man3p/endservent.3p
new file mode 100644
index 0000000..dc6b5d8
--- /dev/null
+++ b/man-pages-posix-2003/man3p/endservent.3p
@@ -0,0 +1 @@
+.so man3p/getservent.3p
diff --git a/man-pages-posix-2003/man3p/endutxent.3p b/man-pages-posix-2003/man3p/endutxent.3p
new file mode 100644
index 0000000..f7769c3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/endutxent.3p
@@ -0,0 +1 @@
+.so man3p/getutxid.3p
diff --git a/man-pages-posix-2003/man3p/environ.3p b/man-pages-posix-2003/man3p/environ.3p
new file mode 100644
index 0000000..fe3e7ef
--- /dev/null
+++ b/man-pages-posix-2003/man3p/environ.3p
@@ -0,0 +1 @@
+.so man3p/exec.3p
diff --git a/man-pages-posix-2003/man3p/erand48.3p b/man-pages-posix-2003/man3p/erand48.3p
new file mode 100644
index 0000000..a71d5ed
--- /dev/null
+++ b/man-pages-posix-2003/man3p/erand48.3p
@@ -0,0 +1 @@
+.so man3p/drand48.3p
diff --git a/man-pages-posix-2003/man3p/erf.3p b/man-pages-posix-2003/man3p/erf.3p
new file mode 100644
index 0000000..c357311
--- /dev/null
+++ b/man-pages-posix-2003/man3p/erf.3p
@@ -0,0 +1,96 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ERF" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" erf
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+erf, erff, erfl \- error functions
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double erf(double\fP \fIx\fP\fB);
+.br
+float erff(float\fP \fIx\fP\fB);
+.br
+long double erfl(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the error function of their argument
+\fIx\fP, defined as:
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the value
+of the error function.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is \(+-0, \(+-0 shall be returned.
+.LP
+If \fIx\fP is \(+-Inf, \(+-1 shall be returned.
+.LP
+If \fIx\fP is subnormal, a range error may occur, and 2 * \fIx\fP/
+\fIsqrt\fP(pi) should
+be returned.
+.SH ERRORS
+.LP
+These functions may fail if:
+.TP 7
+Range\ Error
+The result underflows.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the underflow floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Underflow occurs when |\fIx\fP| < DBL_MIN * ( \fIsqrt\fP(pi)/2).
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIerfc\fP(), \fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIisnan\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment of Error Conditions
+for
+Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/erfc.3p b/man-pages-posix-2003/man3p/erfc.3p
new file mode 100644
index 0000000..49b5978
--- /dev/null
+++ b/man-pages-posix-2003/man3p/erfc.3p
@@ -0,0 +1,108 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ERFC" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" erfc
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+erfc, erfcf, erfcl \- complementary error functions
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double erfc(double\fP \fIx\fP\fB);
+.br
+float erfcf(float\fP \fIx\fP\fB);
+.br
+long double erfcl(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the complementary error function 1.0
+- \fIerf\fP(\fIx\fP).
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the value
+of the complementary error function.
+.LP
+If the correct value would cause underflow and is not representable,
+a range error may occur and either 0.0 (if
+representable), or an implementation-defined value shall be
+returned.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is \(+-0, +1 shall be returned.
+.LP
+If \fIx\fP is -Inf, +2 shall be returned.
+.LP
+If \fIx\fP is +Inf, +0 shall be returned.
+.LP
+If the correct value would cause underflow and is representable, a
+range error may occur and the correct value shall be
+returned.
+.SH ERRORS
+.LP
+These functions may fail if:
+.TP 7
+Range\ Error
+The result underflows.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the underflow floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIerfc\fP() function is provided because of the extreme loss
+of relative accuracy if \fIerf\fP(\fIx\fP) is called for
+large \fIx\fP and the result subtracted from 1.0.
+.LP
+Note for IEEE\ Std\ 754-1985 \fBdouble\fP, 26.55 < \fIx\fP implies
+\fIerfc\fP( \fIx\fP) has underflowed.
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIerf\fP(), \fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIisnan\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment of Error Conditions
+for
+Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/erfcf.3p b/man-pages-posix-2003/man3p/erfcf.3p
new file mode 100644
index 0000000..6f54796
--- /dev/null
+++ b/man-pages-posix-2003/man3p/erfcf.3p
@@ -0,0 +1 @@
+.so man3p/erfc.3p
diff --git a/man-pages-posix-2003/man3p/erfcl.3p b/man-pages-posix-2003/man3p/erfcl.3p
new file mode 100644
index 0000000..6f54796
--- /dev/null
+++ b/man-pages-posix-2003/man3p/erfcl.3p
@@ -0,0 +1 @@
+.so man3p/erfc.3p
diff --git a/man-pages-posix-2003/man3p/erff.3p b/man-pages-posix-2003/man3p/erff.3p
new file mode 100644
index 0000000..044e4c9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/erff.3p
@@ -0,0 +1 @@
+.so man3p/erf.3p
diff --git a/man-pages-posix-2003/man3p/erfl.3p b/man-pages-posix-2003/man3p/erfl.3p
new file mode 100644
index 0000000..044e4c9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/erfl.3p
@@ -0,0 +1 @@
+.so man3p/erf.3p
diff --git a/man-pages-posix-2003/man3p/errno.3p b/man-pages-posix-2003/man3p/errno.3p
new file mode 100644
index 0000000..ae45788
--- /dev/null
+++ b/man-pages-posix-2003/man3p/errno.3p
@@ -0,0 +1,79 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ERRNO" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" errno
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+errno \- error return value
+.SH SYNOPSIS
+.LP
+\fB#include <errno.h>\fP
+.SH DESCRIPTION
+.LP
+The lvalue \fIerrno\fP is used by many functions to return error values.
+.LP
+Many functions provide an error number in \fIerrno\fP, which has type
+\fBint\fP and is defined in \fI<errno.h>\fP. The value of \fIerrno\fP
+shall be defined only after a call to a function
+for which it is explicitly stated to be set and until it is changed
+by the next function call or if the application assigns it a
+value. The value of \fIerrno\fP should only be examined when it is
+indicated to be valid by a function's return value.
+Applications shall obtain the definition of \fIerrno\fP by the inclusion
+of \fI<errno.h>\fP. No function in this volume of IEEE\ Std\ 1003.1-2001
+shall set
+\fIerrno\fP to 0.
+.LP
+It is unspecified whether \fIerrno\fP is a macro or an identifier
+declared with external linkage. If a macro definition is
+suppressed in order to access an actual object, or a program defines
+an identifier with the name \fIerrno\fP, the behavior is
+undefined.
+.LP
+The symbolic values stored in \fIerrno\fP are documented in the ERRORS
+sections on all relevant pages.
+.SH RETURN VALUE
+.LP
+None.
+.SH ERRORS
+.LP
+None.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Previously both POSIX and X/Open documents were more restrictive than
+the ISO\ C standard in that they required \fIerrno\fP
+to be defined as an external variable, whereas the ISO\ C standard
+required only that \fIerrno\fP be defined as a modifiable
+lvalue with type \fBint\fP.
+.LP
+An application that needs to examine the value of \fIerrno\fP to determine
+the error should set it to 0 before a function call,
+then inspect it before a subsequent function call.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIError Numbers\fP, the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<errno.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/exec.3p b/man-pages-posix-2003/man3p/exec.3p
new file mode 100644
index 0000000..9ae35a3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/exec.3p
@@ -0,0 +1,868 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "EXEC" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" exec
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+environ, execl, execv, execle, execve, execlp, execvp \- execute a
+file
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+extern char **environ;
+.br
+int execl(const char *\fP\fIpath\fP\fB, const char *\fP\fIarg0\fP\fB,
+\&... /*, (char *)0 */);
+.br
+int execv(const char *\fP\fIpath\fP\fB, char *const\fP \fIargv\fP\fB[]);
+.br
+int execle(const char *\fP\fIpath\fP\fB, const char *\fP\fIarg0\fP\fB,
+\&... /*,
+.br
+\ \ \ \ \ \ (char *)0, char *const\fP \fIenvp\fP\fB[]*/);
+.br
+int execve(const char *\fP\fIpath\fP\fB, char *const\fP \fIargv\fP\fB[],
+char *const\fP \fIenvp\fP\fB[]);
+.br
+int execlp(const char *\fP\fIfile\fP\fB, const char *\fP\fIarg0\fP\fB,
+\&... /*, (char *)0 */);
+.br
+int execvp(const char *\fP\fIfile\fP\fB, char *const\fP \fIargv\fP\fB[]);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIexec\fP family of functions shall replace the current process
+image with a new process image. The new image shall be
+constructed from a regular, executable file called the \fInew process
+image file\fP. There shall be no return from a successful
+\fIexec\fP, because the calling process image is overlaid by the new
+process image.
+.LP
+When a C-language program is executed as a result of this call, it
+shall be entered as a C-language function call as
+follows:
+.sp
+.RS
+.nf
+
+\fBint main (\fP\fIint argc, char *argv\fP\fB[]);
+\fP
+.fi
+.RE
+.LP
+where \fIargc\fP is the argument count and \fIargv\fP is an array
+of character pointers to the arguments themselves. In
+addition, the following variable:
+.sp
+.RS
+.nf
+
+\fBextern char **environ;
+\fP
+.fi
+.RE
+.LP
+is initialized as a pointer to an array of character pointers to the
+environment strings. The \fIargv\fP and \fIenviron\fP
+arrays are each terminated by a null pointer. The null pointer terminating
+the \fIargv\fP array is not counted in \fIargc\fP.
+.LP
+Conforming multi-threaded applications shall not use the \fIenviron\fP
+variable to access or modify any environment variable while
+any other thread is concurrently modifying any environment variable.
+A call to any function dependent on any environment variable
+shall be considered a use of the \fIenviron\fP variable to access
+that environment variable.
+.LP
+The arguments specified by a program with one of the \fIexec\fP functions
+shall be passed on to the new process image in the
+corresponding \fImain\fP() arguments.
+.LP
+The argument \fIpath\fP points to a pathname that identifies the new
+process image file.
+.LP
+The argument \fIfile\fP is used to construct a pathname that identifies
+the new process image file. If the \fIfile\fP argument
+contains a slash character, the \fIfile\fP argument shall be used
+as the pathname for this file. Otherwise, the path prefix for
+this file is obtained by a search of the directories passed as the
+environment variable \fIPATH\fP (see the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 8, Environment Variables).
+If this
+environment variable is not present, the results of the search are
+implementation-defined.
+.LP
+There are two distinct ways in which the contents of the process image
+file may cause the execution to fail, distinguished by
+the setting of \fIerrno\fP to either [ENOEXEC] or [EINVAL] (see the
+ERRORS section). In the cases where the other members of the
+\fIexec\fP family of functions would fail and set \fIerrno\fP to [ENOEXEC],
+the \fIexeclp\fP() and \fIexecvp\fP() functions
+shall execute a command interpreter and the environment of the executed
+command shall be as if the process invoked the \fIsh\fP utility using
+\fIexecl\fP() as follows:
+.sp
+.RS
+.nf
+
+\fBexecl(<shell path>, arg0, file, arg1, ..., (char *)0);
+\fP
+.fi
+.RE
+.LP
+where <\fIshell\ path\fP> is an unspecified pathname for the \fIsh\fP
+utility,
+\fIfile\fP is the process image file, and for \fIexecvp\fP(), where
+\fIarg\fP0, \fIarg\fP1, and so on correspond to the values
+passed to \fIexecvp\fP() in \fIargv\fP[0], \fIargv\fP[1], and so on.
+.LP
+The arguments represented by \fIarg0\fP,... are pointers to null-terminated
+character strings. These strings shall constitute
+the argument list available to the new process image. The list is
+terminated by a null pointer. The argument \fIarg0\fP should
+point to a filename that is associated with the process being started
+by one of the \fIexec\fP functions.
+.LP
+The argument \fIargv\fP is an array of character pointers to null-terminated
+strings. The application shall ensure that the
+last member of this array is a null pointer. These strings shall constitute
+the argument list available to the new process image.
+The value in \fIargv\fP[0] should point to a filename that is associated
+with the process being started by one of the \fIexec\fP
+functions.
+.LP
+The argument \fIenvp\fP is an array of character pointers to null-terminated
+strings. These strings shall constitute the
+environment for the new process image. The \fIenvp\fP array is terminated
+by a null pointer.
+.LP
+For those forms not containing an \fIenvp\fP pointer ( \fIexecl\fP(),
+\fIexecv\fP(), \fIexeclp\fP(), and \fIexecvp\fP()),
+the environment for the new process image shall be taken from the
+external variable \fIenviron\fP in the calling process.
+.LP
+The number of bytes available for the new process' combined argument
+and environment lists is {ARG_MAX}. It is
+implementation-defined whether null terminators, pointers, and/or
+any alignment bytes are included in this total.
+.LP
+File descriptors open in the calling process image shall remain open
+in the new process image, except for those whose close-on-
+\fIexec\fP flag FD_CLOEXEC is set. For those file descriptors that
+remain open, all attributes of the open file description remain
+unchanged. For any file descriptor that is closed for this reason,
+file locks are removed as a result of the close as described in
+\fIclose\fP(). Locks that are not removed by closing of file descriptors
+remain unchanged.
+.LP
+If file descriptors 0, 1, and 2 would otherwise be closed after a
+successful call to one of the \fIexec\fP family of functions,
+and the new process image file has the set-user-ID or set-group-ID
+file mode bits set, and the
+ST_NOSUID bit is not set for the file system containing the new process
+image file, implementations may open an unspecified file for each
+of these file descriptors in the new process
+image.
+.LP
+Directory streams open in the calling process image shall be closed
+in the new process image.
+.LP
+The state of the floating-point environment in the new process image
+shall be set to the default.
+.LP
+The state of conversion descriptors and message catalog descriptors
+in the new process image is undefined. For the new process image,
+the equivalent of:
+.sp
+.RS
+.nf
+
+\fBsetlocale(LC_ALL, "C")
+\fP
+.fi
+.RE
+.LP
+shall be executed at start-up.
+.LP
+Signals set to the default action (SIG_DFL) in the calling process
+image shall be set to the default action in the new process
+image. Except for SIGCHLD, signals set to be ignored (SIG_IGN) by
+the calling process image shall be set to be ignored by the new
+process image. Signals set to be caught by the calling process image
+shall be set to the default action in the new process image
+(see \fI<signal.h>\fP). If the SIGCHLD signal is set to be ignored
+by the calling
+process image, it is unspecified whether the SIGCHLD signal is set
+to be ignored or to the default action in the new process image.
+\ After a successful call to any of the \fIexec\fP functions, alternate
+signal stacks are not preserved and the SA_ONSTACK
+flag shall be cleared for all signals.
+.LP
+After a successful call to any of the \fIexec\fP functions, any functions
+previously registered by \fIatexit\fP() are no longer registered.
+.LP
+If the ST_NOSUID bit is set for the file system containing the new
+process image file, then the effective user ID, effective group
+ID, saved set-user-ID, and saved set-group-ID are unchanged in the
+new process image. Otherwise, if the set-user-ID mode bit of the
+new process image file is set, the effective user ID of the new
+process image shall be set to the user ID of the new process image
+file. Similarly, if the set-group-ID mode bit of the new process
+image file is set, the effective group ID of the new process image
+shall be set to the group ID of the new process image file. The
+real user ID, real group ID, and supplementary group IDs of the new
+process image shall remain the same as those of the calling
+process image. The effective user ID and effective group ID of the
+new process image shall be saved (as the saved set-user-ID and
+the saved set-group-ID) for use by \fIsetuid\fP().
+.LP
+Any shared memory segments attached to the calling process image shall
+not be attached to the new process image.
+.LP
+Any named semaphores open in the calling process shall be closed as
+if by appropriate calls to \fIsem_close\fP().
+.LP
+Any blocks of typed memory that were mapped in the calling process
+are unmapped, as if \fImunmap\fP() was implicitly called to unmap
+them.
+.LP
+Memory locks established by the calling process via calls to \fImlockall\fP()
+or \fImlock\fP() shall be removed. If locked pages in the address
+space of the calling process are also
+mapped into the address spaces of other processes and are locked by
+those processes, the locks established by the other processes
+shall be unaffected by the call by this process to the \fIexec\fP
+function. If the \fIexec\fP function fails, the effect on
+memory locks is unspecified.
+.LP
+Memory mappings created in the process are unmapped before the address
+space is rebuilt for the new process image.
+.LP
+For
+the SCHED_FIFO and SCHED_RR scheduling policies, the policy and priority
+settings shall not be changed by a call to an \fIexec\fP
+function. For other scheduling policies, the policy and priority settings
+on \fIexec\fP are implementation-defined.
+.LP
+Per-process timers created by the calling process shall be deleted
+before replacing the current process image with the new process
+image.
+.LP
+All open message queue descriptors in the calling process shall be
+closed, as described in \fImq_close\fP().
+.LP
+Any outstanding asynchronous I/O operations may be canceled. Those
+asynchronous I/O operations that are not canceled shall complete
+as if the \fIexec\fP function had not yet occurred, but any associated
+signal notifications shall be suppressed. It is unspecified
+whether the \fIexec\fP function itself blocks awaiting such I/O completion.
+In no event, however, shall the new process image
+created by the \fIexec\fP function be affected by the presence of
+outstanding asynchronous I/O operations at the time the
+\fIexec\fP function is called. Whether any I/O is canceled, and which
+I/O may be canceled upon \fIexec\fP, is
+implementation-defined.
+.LP
+The new process image shall inherit the CPU-time clock of the calling
+process image. This inheritance means that the process
+CPU-time clock of the process being \fIexec\fP-ed shall not be reinitialized
+or altered as a result of the \fIexec\fP function
+other than to reflect the time spent by the process executing the
+\fIexec\fP function itself.
+.LP
+The initial value of the CPU-time clock of the initial thread of the
+new process image shall be set to zero.
+.LP
+If the calling process is being traced, the new process image shall
+continue to be traced into the same trace stream as the
+original process image, but the new process image shall not inherit
+the mapping of trace event names to trace event type
+identifiers that was defined by calls to the \fIposix_trace_eventid_open\fP()
+or the \fIposix_trace_trid_eventid_open\fP() functions in the calling
+process
+image.
+.LP
+If the calling process is a trace controller process, any trace streams
+that were created by the calling process shall be shut
+down as described in the \fIposix_trace_shutdown\fP() function.
+.LP
+The new process shall inherit at least the following attributes from
+the calling process image:
+.IP " *" 3
+Nice value (see \fInice\fP())
+.LP
+.IP " *" 3
+\fIsemadj\fP values (see \fIsemop\fP())
+.LP
+.IP " *" 3
+Process ID
+.LP
+.IP " *" 3
+Parent process ID
+.LP
+.IP " *" 3
+Process group ID
+.LP
+.IP " *" 3
+Session membership
+.LP
+.IP " *" 3
+Real user ID
+.LP
+.IP " *" 3
+Real group ID
+.LP
+.IP " *" 3
+Supplementary group IDs
+.LP
+.IP " *" 3
+Time left until an alarm clock signal (see \fIalarm\fP())
+.LP
+.IP " *" 3
+Current working directory
+.LP
+.IP " *" 3
+Root directory
+.LP
+.IP " *" 3
+File mode creation mask (see \fIumask\fP())
+.LP
+.IP " *" 3
+File size limit (see \fIulimit\fP())
+.LP
+.IP " *" 3
+Process signal mask (see \fIsigprocmask\fP())
+.LP
+.IP " *" 3
+Pending signal (see \fIsigpending\fP())
+.LP
+.IP " *" 3
+\fItms_utime\fP, \fItms_stime\fP, \fItms_cutime\fP, and \fItms_cstime\fP
+(see \fItimes\fP())
+.LP
+.IP " *" 3
+Resource limits
+.LP
+.IP " *" 3
+Controlling terminal
+.LP
+.IP " *" 3
+Interval timers
+.LP
+.LP
+All other process attributes defined in this volume of IEEE\ Std\ 1003.1-2001
+shall be the same in the new and old
+process images. The inheritance of process attributes not defined
+by this volume of IEEE\ Std\ 1003.1-2001 is
+implementation-defined.
+.LP
+A call to any \fIexec\fP function from a process with more than one
+thread shall result in all threads being terminated and the
+new executable image being loaded and executed. No destructor functions
+shall be called.
+.LP
+Upon successful completion, the \fIexec\fP functions shall mark for
+update the \fIst_atime\fP field of the file. If an
+\fIexec\fP function failed but was able to locate the process image
+file, whether the \fIst_atime\fP field is marked for update
+is unspecified. Should the \fIexec\fP function succeed, the process
+image file shall be considered to have been opened with \fIopen\fP().
+The corresponding \fIclose\fP() shall be
+considered to occur at a time after this open, but before process
+termination or successful completion of a subsequent call to one
+of the \fIexec\fP functions, \fIposix_spawn\fP(), or \fIposix_spawnp\fP().
+The \fIargv\fP[] and \fIenvp\fP[] arrays of pointers and the strings
+to which those arrays point shall not be modified by a call to one
+of the \fIexec\fP functions, except as a consequence of
+replacing the process image.
+.LP
+The saved resource limits in the new process image are set to be a
+copy of the process' corresponding hard and soft limits.
+.SH RETURN VALUE
+.LP
+If one of the \fIexec\fP functions returns to the calling process
+image, an error has occurred; the return value shall be -1,
+and \fIerrno\fP shall be set to indicate the error.
+.SH ERRORS
+.LP
+The \fIexec\fP functions shall fail if:
+.TP 7
+.B E2BIG
+The number of bytes used by the new process image's argument list
+and environment list is greater than the system-imposed limit
+of {ARG_MAX} bytes.
+.TP 7
+.B EACCES
+Search permission is denied for a directory listed in the new process
+image file's path prefix, or the new process image file
+denies execution permission, or the new process image file is not
+a regular file and the implementation does not support execution
+of files of its type.
+.TP 7
+.B EINVAL
+The new process image file has the appropriate permission and has
+a recognized executable binary format, but the system does
+not support execution of a file with this format.
+.TP 7
+.B ELOOP
+A loop exists in symbolic links encountered during resolution of the
+\fIpath\fP or \fIfile\fP argument.
+.TP 7
+.B ENAMETOOLONG
+The length of the \fIpath\fP or \fIfile\fP arguments exceeds {PATH_MAX}
+or a pathname component is longer than {NAME_MAX}.
+.TP 7
+.B ENOENT
+A component of \fIpath\fP or \fIfile\fP does not name an existing
+file or \fIpath\fP or \fIfile\fP is an empty string.
+.TP 7
+.B ENOTDIR
+A component of the new process image file's path prefix is not a directory.
+.sp
+.LP
+The \fIexec\fP functions, except for \fIexeclp\fP() and \fIexecvp\fP(),
+shall fail if:
+.TP 7
+.B ENOEXEC
+The new process image file has the appropriate access permission but
+has an unrecognized format.
+.sp
+.LP
+The \fIexec\fP functions may fail if:
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the \fIpath\fP or \fIfile\fP argument.
+.TP 7
+.B ENAMETOOLONG
+As a result of encountering a symbolic link in resolution of the \fIpath\fP
+argument, the length of the substituted pathname
+string exceeded {PATH_MAX}.
+.TP 7
+.B ENOMEM
+The new process image requires more memory than is allowed by the
+hardware or system-imposed memory management
+constraints.
+.TP 7
+.B ETXTBSY
+The new process image file is a pure procedure (shared text) file
+that is currently open for writing by some process.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Using execl()
+.LP
+The following example executes the \fIls\fP command, specifying the
+pathname of the
+executable ( \fB/bin/ls\fP) and using arguments supplied directly
+to the command to produce single-column output.
+.sp
+.RS
+.nf
+
+\fB#include <unistd.h>
+.sp
+
+int ret;
+\&...
+ret = execl ("/bin/ls", "ls", "-1", (char *)0);
+\fP
+.fi
+.RE
+.SS Using execle()
+.LP
+The following example is similar to Using execl() . In addition, it
+specifies the environment
+for the new process image using the \fIenv\fP argument.
+.sp
+.RS
+.nf
+
+\fB#include <unistd.h>
+.sp
+
+int ret;
+char *env[] = { "HOME=/usr/home", "LOGNAME=home", (char *)0 };
+\&...
+ret = execle ("/bin/ls", "ls", "-l", (char *)0, env);
+\fP
+.fi
+.RE
+.SS Using execlp()
+.LP
+The following example searches for the location of the \fIls\fP command
+among the
+directories specified by the \fIPATH\fP environment variable.
+.sp
+.RS
+.nf
+
+\fB#include <unistd.h>
+.sp
+
+int ret;
+\&...
+ret = execlp ("ls", "ls", "-l", (char *)0);
+\fP
+.fi
+.RE
+.SS Using execv()
+.LP
+The following example passes arguments to the \fIls\fP command in
+the \fIcmd\fP array.
+.sp
+.RS
+.nf
+
+\fB#include <unistd.h>
+.sp
+
+int ret;
+char *cmd[] = { "ls", "-l", (char *)0 };
+\&...
+ret = execv ("/bin/ls", cmd);
+\fP
+.fi
+.RE
+.SS Using execve()
+.LP
+The following example passes arguments to the \fIls\fP command in
+the \fIcmd\fP array, and
+specifies the environment for the new process image using the \fIenv\fP
+argument.
+.sp
+.RS
+.nf
+
+\fB#include <unistd.h>
+.sp
+
+int ret;
+char *cmd[] = { "ls", "-l", (char *)0 };
+char *env[] = { "HOME=/usr/home", "LOGNAME=home", (char *)0 };
+\&...
+ret = execve ("/bin/ls", cmd, env);
+\fP
+.fi
+.RE
+.SS Using execvp()
+.LP
+The following example searches for the location of the \fIls\fP command
+among the
+directories specified by the \fIPATH\fP environment variable, and
+passes arguments to the \fIls\fP command in the \fIcmd\fP array.
+.sp
+.RS
+.nf
+
+\fB#include <unistd.h>
+.sp
+
+int ret;
+char *cmd[] = { "ls", "-l", (char *)0 };
+\&...
+ret = execvp ("ls", cmd);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+As the state of conversion descriptors and message catalog descriptors
+in the new process image is undefined, conforming
+applications should not rely on their use and should close them prior
+to calling one of the \fIexec\fP functions.
+.LP
+Applications that require other than the default POSIX locale should
+call \fIsetlocale\fP() with the appropriate parameters to establish
+the locale of the new
+process.
+.LP
+The \fIenviron\fP array should not be accessed directly by the application.
+.LP
+Applications should not depend on file descriptors 0, 1, and 2 being
+closed after an \fIexec\fP. A future version may allow
+these file descriptors to be automatically opened for any process.
+.SH RATIONALE
+.LP
+Early proposals required that the value of \fIargc\fP passed to \fImain\fP()
+be "one or greater". This was driven by the
+same requirement in drafts of the ISO\ C standard. In fact, historical
+implementations have passed a value of zero when no
+arguments are supplied to the caller of the \fIexec\fP functions.
+This requirement was removed from the ISO\ C standard and
+subsequently removed from this volume of IEEE\ Std\ 1003.1-2001 as
+well. The wording, in particular the use of the word
+\fIshould\fP, requires a Strictly Conforming POSIX Application to
+pass at least one argument to the \fIexec\fP function, thus
+guaranteeing that \fIargc\fP be one or greater when invoked by such
+an application. In fact, this is good practice, since many
+existing applications reference \fIargv\fP[0] without first checking
+the value of \fIargc\fP.
+.LP
+The requirement on a Strictly Conforming POSIX Application also states
+that the value passed as the first argument be a filename
+associated with the process being started. Although some existing
+applications pass a pathname rather than a filename in some
+circumstances, a filename is more generally useful, since the common
+usage of \fIargv\fP[0] is in printing diagnostics. In some
+cases the filename passed is not the actual filename of the file;
+for example, many implementations of the \fIlogin\fP utility use
+a convention of prefixing a hyphen ( \fB'-'\fP ) to the actual filename,
+which indicates to the command interpreter being
+invoked that it is a "login shell".
+.LP
+Historically there have been two ways that implementations can \fIexec\fP
+shell scripts.
+.LP
+One common historical implementation is that the \fIexecl\fP(), \fIexecv\fP(),
+\fIexecle\fP(), and \fIexecve\fP() functions
+return an [ENOEXEC] error for any file not recognizable as executable,
+including a shell script. When the \fIexeclp\fP() and
+\fIexecvp\fP() functions encounter such a file, they assume the file
+to be a shell script and invoke a known command interpreter
+to interpret such files. This is now required by IEEE\ Std\ 1003.1-2001.
+These implementations of \fIexecvp\fP() and
+\fIexeclp\fP() only give the [ENOEXEC] error in the rare case of a
+problem with the command interpreter's executable file. Because
+of these implementations, the [ENOEXEC] error is not mentioned for
+\fIexeclp\fP() or \fIexecvp\fP(), although implementations can
+still give it.
+.LP
+Another way that some historical implementations handle shell scripts
+is by recognizing the first two bytes of the file as the
+character string \fB"#!"\fP and using the remainder of the first line
+of the file as the name of the command interpreter to
+execute.
+.LP
+One potential source of confusion noted by the standard developers
+is over how the contents of a process image file affect the
+behavior of the \fIexec\fP family of functions. The following is a
+description of the actions taken:
+.IP " 1." 4
+If the process image file is a valid executable (in a format that
+is executable and valid and having appropriate permission) for
+this system, then the system executes the file.
+.LP
+.IP " 2." 4
+If the process image file has appropriate permission and is in a format
+that is executable but not valid for this system (such
+as a recognized binary for another architecture), then this is an
+error and \fIerrno\fP is set to [EINVAL] (see later RATIONALE on
+[EINVAL]).
+.LP
+.IP " 3." 4
+If the process image file has appropriate permission but is not otherwise
+recognized:
+.RS
+.IP " a." 4
+If this is a call to \fIexeclp\fP() or \fIexecvp\fP(), then they invoke
+a command interpreter assuming that the process image
+file is a shell script.
+.LP
+.IP " b." 4
+If this is not a call to \fIexeclp\fP() or \fIexecvp\fP(), then an
+error occurs and \fIerrno\fP is set to [ENOEXEC].
+.LP
+.RE
+.LP
+.LP
+Applications that do not require to access their arguments may use
+the form:
+.sp
+.RS
+.nf
+
+\fBmain(void)
+\fP
+.fi
+.RE
+as specified in the ISO\ C standard. However, the implementation will
+always provide the two arguments \fIargc\fP and
+\fIargv\fP, even if they are not used.
+.LP
+Some implementations provide a third argument to \fImain\fP() called
+\fIenvp\fP. This is defined as a pointer to the
+environment. The ISO\ C standard specifies invoking \fImain\fP() with
+two arguments, so implementations must support
+applications written this way. Since this volume of IEEE\ Std\ 1003.1-2001
+defines the global variable \fIenviron\fP,
+which is also provided by historical implementations and can be used
+anywhere that \fIenvp\fP could be used, there is no
+functional need for the \fIenvp\fP argument. Applications should use
+the \fIgetenv\fP()
+function rather than accessing the environment directly via either
+\fIenvp\fP or \fIenviron\fP. Implementations are required to
+support the two-argument calling sequence, but this does not prohibit
+an implementation from supporting \fIenvp\fP as an optional
+third argument.
+.LP
+This volume of IEEE\ Std\ 1003.1-2001 specifies that signals set to
+SIG_IGN remain set to SIG_IGN, and that the process
+signal mask be unchanged across an \fIexec\fP. This is consistent
+with historical implementations, and it permits some useful
+functionality, such as the \fInohup\fP command. However, it should
+be noted that many
+existing applications wrongly assume that they start with certain
+signals set to the default action and/or unblocked. In
+particular, applications written with a simpler signal model that
+does not include blocking of signals, such as the one in the
+ISO\ C standard, may not behave properly if invoked with some signals
+blocked. Therefore, it is best not to block or ignore
+signals across \fIexec\fPs without explicit reason to do so, and especially
+not to block signals across \fIexec\fPs of arbitrary
+(not closely co-operating) programs.
+.LP
+The \fIexec\fP functions always save the value of the effective user
+ID and effective group ID of the process at the completion
+of the \fIexec\fP, whether or not the set-user-ID or the set-group-ID
+bit of the process image file is set.
+.LP
+The statement about \fIargv\fP[] and \fIenvp\fP[] being constants
+is included to make explicit to future writers of language
+bindings that these objects are completely constant. Due to a limitation
+of the ISO\ C standard, it is not possible to state
+that idea in standard C. Specifying two levels of \fIconst\fP- \fIqualification\fP
+for the \fIargv\fP[] and \fIenvp\fP[]
+parameters for the \fIexec\fP functions may seem to be the natural
+choice, given that these functions do not modify either the
+array of pointers or the characters to which the function points,
+but this would disallow existing correct code. Instead, only the
+array of pointers is noted as constant. The table of assignment compatibility
+for \fIdst\fP= \fIsrc\fP derived from the
+ISO\ C standard summarizes the compatibility:
+.TS C
+center; l1 l1 l1 l1 l.
+\fIdst\fP: \fBchar *[]\fP \fBconst char *[]\fP \fBchar *const[]\fP \fBconst char *const[]\fP
+\fB\fIsrc\fP:\fP \ \ \ \
+\fBchar *[]\fP VALID - VALID -
+\fBconst char *[]\fP - VALID - VALID
+\fBchar * const []\fP - - VALID -
+\fBconst char *const[]\fP - - - VALID
+.TE
+.LP
+Since all existing code has a source type matching the first row,
+the column that gives the most valid combinations is the third
+column. The only other possibility is the fourth column, but using
+it would require a cast on the \fIargv\fP or \fIenvp\fP
+arguments. It is unfortunate that the fourth column cannot be used,
+because the declaration a non-expert would naturally use would
+be that in the second row.
+.LP
+The ISO\ C standard and this volume of IEEE\ Std\ 1003.1-2001 do not
+conflict on the use of \fIenviron\fP, but some
+historical implementations of \fIenviron\fP may cause a conflict.
+As long as \fIenviron\fP is treated in the same way as an entry
+point (for example, \fIfork\fP()), it conforms to both standards.
+A library can contain \fIfork\fP(), but if there is a user-provided
+\fIfork\fP(), that \fIfork\fP() is given precedence and no
+problem ensues. The situation is similar for \fIenviron\fP: the definition
+in this volume of IEEE\ Std\ 1003.1-2001 is to
+be used if there is no user-provided \fIenviron\fP to take precedence.
+At least three implementations are known to exist that
+solve this problem.
+.TP 7
+.B E2BIG
+The limit {ARG_MAX} applies not just to the size of the argument list,
+but to the sum of that and the size of the environment
+list.
+.TP 7
+.B EFAULT
+Some historical systems return [EFAULT] rather than [ENOEXEC] when
+the new process image file is corrupted. They are
+non-conforming.
+.TP 7
+.B EINVAL
+This error condition was added to IEEE\ Std\ 1003.1-2001 to allow
+an implementation to detect executable files
+generated for different architectures, and indicate this situation
+to the application. Historical implementations of shells,
+\fIexecvp\fP(), and \fIexeclp\fP() that encounter an [ENOEXEC] error
+will execute a shell on the assumption that the file is a
+shell script. This will not produce the desired effect when the file
+is a valid executable for a different architecture. An
+implementation may now choose to avoid this problem by returning [EINVAL]
+when a valid executable for a different architecture is
+encountered. Some historical implementations return [EINVAL] to indicate
+that the \fIpath\fP argument contains a character with
+the high order bit set. The standard developers chose to deviate from
+historical practice for the following reasons:
+.RS
+.IP " 1." 4
+The new utilization of [EINVAL] will provide some measure of utility
+to the user community.
+.LP
+.IP " 2." 4
+Historical use of [EINVAL] is not acceptable in an internationalized
+operating environment.
+.LP
+.RE
+.TP 7
+.B ENAMETOOLONG
+Since the file pathname may be constructed by taking elements in the
+\fIPATH\fP variable and putting them together with the
+filename, the [ENAMETOOLONG] error condition could also be reached
+this way.
+.TP 7
+.B ETXTBSY
+System V returns this error when the executable file is currently
+open for writing by some process. This volume of
+IEEE\ Std\ 1003.1-2001 neither requires nor prohibits this behavior.
+.sp
+.LP
+Other systems (such as System V) may return [EINTR] from \fIexec\fP.
+This is not addressed by this volume of
+IEEE\ Std\ 1003.1-2001, but implementations may have a window between
+the call to \fIexec\fP and the time that a signal
+could cause one of the \fIexec\fP calls to return with [EINTR].
+.LP
+An explicit statement regarding the floating-point environment (as
+defined in the \fI<fenv.h>\fP header) was added to make it clear that
+the floating-point environment is set
+to its default when a call to one of the \fIexec\fP functions succeeds.
+The requirements for inheritance or setting to the default
+for other process and thread start-up functions is covered by more
+generic statements in their descriptions and can be summarized
+as follows:
+.TP 7
+\fIposix_spawn\fP()
+Set to default.
+.TP 7
+\fIfork\fP()
+Inherit.
+.TP 7
+\fIpthread_create\fP()
+Inherit.
+.sp
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIalarm\fP(), \fIatexit\fP(), \fIchmod\fP(),
+\fIclose\fP(), \fIexit\fP(), \fIfcntl\fP(), \fIfork\fP(), \fIfstatvfs\fP(),
+\fIgetenv\fP(), \fIgetitimer\fP(), \fIgetrlimit\fP(), \fImmap\fP(),
+\fInice\fP(), \fIposix_spawn\fP(), \fIposix_trace_eventid_open\fP(),
+\fIposix_trace_shutdown\fP(), \fIposix_trace_trid_eventid_open\fP(),
+\fIputenv\fP(), \fIsemop\fP(), \fIsetlocale\fP(), \fIshmat\fP()
+,
+\fIsigaction\fP(), \fIsigaltstack\fP(), \fIsigpending\fP(), \fIsigprocmask\fP(),
+\fIsystem\fP(), \fItimes\fP(), \fIulimit\fP(), \fIumask\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 11,
+General Terminal Interface, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/execl.3p b/man-pages-posix-2003/man3p/execl.3p
new file mode 100644
index 0000000..fe3e7ef
--- /dev/null
+++ b/man-pages-posix-2003/man3p/execl.3p
@@ -0,0 +1 @@
+.so man3p/exec.3p
diff --git a/man-pages-posix-2003/man3p/execle.3p b/man-pages-posix-2003/man3p/execle.3p
new file mode 100644
index 0000000..fe3e7ef
--- /dev/null
+++ b/man-pages-posix-2003/man3p/execle.3p
@@ -0,0 +1 @@
+.so man3p/exec.3p
diff --git a/man-pages-posix-2003/man3p/execlp.3p b/man-pages-posix-2003/man3p/execlp.3p
new file mode 100644
index 0000000..fe3e7ef
--- /dev/null
+++ b/man-pages-posix-2003/man3p/execlp.3p
@@ -0,0 +1 @@
+.so man3p/exec.3p
diff --git a/man-pages-posix-2003/man3p/execv.3p b/man-pages-posix-2003/man3p/execv.3p
new file mode 100644
index 0000000..fe3e7ef
--- /dev/null
+++ b/man-pages-posix-2003/man3p/execv.3p
@@ -0,0 +1 @@
+.so man3p/exec.3p
diff --git a/man-pages-posix-2003/man3p/execve.3p b/man-pages-posix-2003/man3p/execve.3p
new file mode 100644
index 0000000..fe3e7ef
--- /dev/null
+++ b/man-pages-posix-2003/man3p/execve.3p
@@ -0,0 +1 @@
+.so man3p/exec.3p
diff --git a/man-pages-posix-2003/man3p/execvp.3p b/man-pages-posix-2003/man3p/execvp.3p
new file mode 100644
index 0000000..fe3e7ef
--- /dev/null
+++ b/man-pages-posix-2003/man3p/execvp.3p
@@ -0,0 +1 @@
+.so man3p/exec.3p
diff --git a/man-pages-posix-2003/man3p/exit.3p b/man-pages-posix-2003/man3p/exit.3p
new file mode 100644
index 0000000..c8fd55b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/exit.3p
@@ -0,0 +1,385 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "EXIT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" exit
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+exit, _Exit, _exit \- terminate a process
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+void exit(int\fP \fIstatus\fP\fB);
+.br
+void _Exit(int\fP \fIstatus\fP\fB);
+.br
+.sp
+.sp
+#include <unistd.h>
+.br
+void _exit(int\fP \fIstatus\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+For \fIexit\fP() and \fI_Exit\fP(): The functionality described
+on this reference page is aligned with the
+ISO\ C standard. Any conflict between the requirements described here
+and the ISO\ C standard is unintentional. This volume
+of IEEE\ Std\ 1003.1-2001 defers to the ISO\ C standard.
+.LP
+The value of \fIstatus\fP may be 0, EXIT_SUCCESS, EXIT_FAILURE,
+\ or any other value, though only the least significant 8 bits
+(that is, \fIstatus\fP & 0377) shall be available to a waiting parent
+process.
+.LP
+The \fIexit\fP() function shall first call all functions registered
+by \fIatexit\fP(),
+in the reverse order of their registration, except that a function
+is called after any previously registered functions that had
+already been called at the time it was registered. Each function is
+called as many times as it was registered. If, during the call
+to any such function, a call to the \fIlongjmp\fP() function is made
+that would terminate
+the call to the registered function, the behavior is undefined.
+.LP
+If a function registered by a call to \fIatexit\fP() fails to return,
+the remaining
+registered functions shall not be called and the rest of the \fIexit\fP()
+processing shall not be completed. If \fIexit\fP() is
+called more than once, the behavior is undefined.
+.LP
+The \fIexit\fP() function shall then flush all open streams with unwritten
+buffered data, close all open streams, and remove
+all files created by \fItmpfile\fP(). Finally, control shall be terminated
+with the
+consequences described below.
+.LP
+The
+\fI_Exit\fP() and \fI_exit\fP() functions shall be functionally equivalent.
+.LP
+The \fI_Exit\fP() and \fI_exit\fP() functions
+shall not call functions registered with \fIatexit\fP() nor any registered
+signal handlers.
+Whether open streams are flushed or closed, or temporary files are
+removed is implementation-defined. Finally, the calling process
+is terminated with the consequences described below.
+.LP
+These functions shall terminate the calling process with the following
+consequences:
+.TP 7
+\fBNote:\fP
+These consequences are all extensions to the ISO\ C standard and are
+not further CX shaded. However, XSI extensions are
+shaded.
+.sp
+.IP " *" 3
+All of the file descriptors, directory streams, conversion descriptors,
+and message catalog descriptors open in the calling process shall
+be closed.
+.LP
+.IP " *" 3
+If the parent process of the calling process is executing a \fIwait\fP()
+or \fIwaitpid\fP(), and has neither set its SA_NOCLDWAIT flag
+nor set SIGCHLD to
+SIG_IGN, it shall be notified of the calling process' termination
+and the low-order eight bits (that is, bits 0377) of \fIstatus\fP
+shall be made available to it. If the parent is not waiting, the
+child's status shall be made available to it when the parent subsequently
+executes \fIwait\fP() or \fIwaitpid\fP().
+.LP
+The semantics of the \fIwaitid\fP() function shall be equivalent to
+\fIwait\fP().
+.LP
+.IP " *" 3
+If the parent process of the calling process is not executing a \fIwait\fP()
+or \fIwaitpid\fP(), and has neither set its SA_NOCLDWAIT flag
+nor set SIGCHLD to
+SIG_IGN, the calling process shall be transformed into a \fIzombie
+process\fP. A \fIzombie process\fP is an inactive process and it shall
+be deleted at some later time when its parent process
+executes \fIwait\fP() or \fIwaitpid\fP().
+.LP
+The semantics of the \fIwaitid\fP() function shall be equivalent to
+\fIwait\fP().
+.LP
+.IP " *" 3
+Termination of a process does not directly terminate its children.
+The sending of a SIGHUP signal as described below indirectly
+terminates children in some circumstances.
+.LP
+.IP " *" 3
+Either:
+.LP
+If the implementation supports the SIGCHLD signal, a SIGCHLD shall
+be sent to the parent process.
+.LP
+Or:
+.LP
+If the parent process has set its SA_NOCLDWAIT flag, or set SIGCHLD
+to SIG_IGN, the status shall be discarded, and the lifetime of
+the calling process shall end immediately. If SA_NOCLDWAIT is set,
+it is implementation-defined whether a SIGCHLD signal is sent to
+the parent process.
+.LP
+.IP " *" 3
+The parent process ID of all of the calling process' existing child
+processes and zombie processes shall be set to the process
+ID of an implementation-defined system process. That is, these processes
+shall be inherited by a special system process.
+.LP
+.IP " *" 3
+Each attached shared-memory segment is detached and the value of \fIshm_nattch\fP
+(see \fIshmget\fP()) in the data structure associated with its shared
+memory ID shall be decremented by
+1.
+.LP
+.IP " *" 3
+For each semaphore for which the calling process has set a \fIsemadj\fP
+value (see \fIsemop\fP()), that
+value shall be added to the \fIsemval\fP of the specified semaphore.
+.LP
+.IP " *" 3
+If the process is a controlling process, the SIGHUP signal shall be
+sent to each process in the foreground process group of the
+controlling terminal belonging to the calling process.
+.LP
+.IP " *" 3
+If the process is a controlling process, the controlling terminal
+associated with the session shall be disassociated from the
+session, allowing it to be acquired by a new controlling process.
+.LP
+.IP " *" 3
+If the exit of the process causes a process group to become orphaned,
+and if any member of the newly-orphaned process group is
+stopped, then a SIGHUP signal followed by a SIGCONT signal shall be
+sent to each process in the newly-orphaned process group.
+.LP
+.IP " *" 3
+All open named semaphores in the calling process shall be closed as
+if by appropriate calls to \fIsem_close\fP().
+.LP
+.IP " *" 3
+Any
+memory locks established by the process via calls to \fImlockall\fP()
+or \fImlock\fP() shall be removed. If locked pages in the address
+space of the calling process are also
+mapped into the address spaces of other processes and are locked by
+those processes, the locks established by the other processes
+shall be unaffected by the call by this process to \fI_Exit\fP() or
+\fI_exit\fP().
+.LP
+.IP " *" 3
+Memory mappings that were created in the process shall be unmapped
+before the process is destroyed.
+.LP
+.IP " *" 3
+Any blocks of typed memory that were mapped in the calling process
+shall be unmapped, as if \fImunmap\fP() was implicitly called to unmap
+them.
+.LP
+.IP " *" 3
+All open message queue descriptors in the calling process shall be
+closed as if by appropriate calls to \fImq_close\fP().
+.LP
+.IP " *" 3
+Any outstanding cancelable asynchronous I/O operations may be canceled.
+Those asynchronous I/O operations that are not canceled
+shall complete as if the \fI_Exit\fP() or \fI_exit\fP() operation
+had not yet occurred, but any associated signal notifications
+shall be suppressed. The \fI_Exit\fP() or \fI_exit\fP() operation
+may block awaiting such I/O completion. Whether any I/O is
+canceled, and which I/O may be canceled upon \fI_Exit\fP() or \fI_exit\fP(),
+is implementation-defined.
+.LP
+.IP " *" 3
+Threads terminated by a call to \fI_Exit\fP() or \fI_exit\fP() shall
+not invoke their cancellation cleanup handlers or
+per-thread data destructors.
+.LP
+.IP " *" 3
+If the calling process is a trace controller process, any trace streams
+that were created by the calling process shall be shut down
+as described by the \fIposix_trace_shutdown\fP() function, and any
+process'
+mapping of trace event names to trace event type identifiers built
+for these trace streams may be deallocated.
+.LP
+.SH RETURN VALUE
+.LP
+These functions do not return.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Normally applications should use \fIexit\fP() rather than \fI_Exit\fP()
+or \fI_exit\fP().
+.SH RATIONALE
+.SS Process Termination
+.LP
+Early proposals drew a distinction between normal and abnormal process
+termination. Abnormal termination was caused only by
+certain signals and resulted in implementation-defined "actions",
+as discussed below. Subsequent proposals distinguished three
+types of termination: \fInormal termination\fP (as in the current
+specification), \fIsimple abnormal termination\fP, and
+\fIabnormal termination with actions\fP. Again the distinction between
+the two types of abnormal termination was that they were
+caused by different signals and that implementation-defined actions
+would result in the latter case. Given that these actions were
+completely implementation-defined, the early proposals were only saying
+when the actions could occur and how their occurrence could
+be detected, but not what they were. This was of little or no use
+to conforming applications, and thus the distinction is not made
+in this volume of IEEE\ Std\ 1003.1-2001.
+.LP
+The implementation-defined actions usually include, in most historical
+implementations, the creation of a file named \fBcore\fP
+in the current working directory of the process. This file contains
+an image of the memory of the process, together with
+descriptive information about the process, perhaps sufficient to reconstruct
+the state of the process at the receipt of the
+signal.
+.LP
+There is a potential security problem in creating a \fBcore\fP file
+if the process was set-user-ID and the current user is not
+the owner of the program, if the process was set-group-ID and none
+of the user's groups match the group of the program, or if the
+user does not have permission to write in the current directory. In
+this situation, an implementation either should not create a
+\fBcore\fP file or should make it unreadable by the user.
+.LP
+Despite the silence of this volume of IEEE\ Std\ 1003.1-2001 on this
+feature, applications are advised not to create
+files named \fBcore\fP because of potential conflicts in many implementations.
+Some implementations use a name other than
+\fBcore\fP for the file; for example, by appending the process ID
+to the filename.
+.SS Terminating a Process
+.LP
+It is important that the consequences of process termination as described
+occur regardless of whether the process called
+\fI_exit\fP() (perhaps indirectly through \fIexit\fP()) or instead
+was terminated due to a signal or for some other reason. Note
+that in the specific case of \fIexit\fP() this means that the \fIstatus\fP
+argument to \fIexit\fP() is treated in the same way
+as the \fIstatus\fP argument to \fI_exit\fP().
+.LP
+A language other than C may have other termination primitives than
+the C-language \fIexit\fP() function, and programs written
+in such a language should use its native termination primitives, but
+those should have as part of their function the behavior of
+\fI_exit\fP() as described. Implementations in languages other than
+C are outside the scope of this version of this volume of
+IEEE\ Std\ 1003.1-2001, however.
+.LP
+As required by the ISO\ C standard, using \fBreturn\fP from \fImain\fP()
+has the same behavior (other than with respect to
+language scope issues) as calling \fIexit\fP() with the returned value.
+Reaching the end of the \fImain\fP() function has the
+same behavior as calling \fIexit\fP(0).
+.LP
+A value of zero (or EXIT_SUCCESS, which is required to be zero) for
+the argument \fIstatus\fP conventionally indicates
+successful termination. This corresponds to the specification for
+\fIexit\fP() in the ISO\ C standard. The convention is
+followed by utilities such as \fImake\fP and various shells, which
+interpret a zero status
+from a child process as success. For this reason, applications should
+not call \fIexit\fP(0) or \fI_exit\fP(0) when they
+terminate unsuccessfully; for example, in signal-catching functions.
+.LP
+Historically, the implementation-defined process that inherits children
+whose parents have terminated without waiting on them is
+called \fIinit\fP and has a process ID of 1.
+.LP
+The sending of a SIGHUP to the foreground process group when a controlling
+process terminates corresponds to somewhat different
+historical implementations. In System V, the kernel sends a SIGHUP
+on termination of (essentially) a controlling process. In 4.2
+BSD, the kernel does not send SIGHUP in a case like this, but the
+termination of a controlling process is usually noticed by a
+system daemon, which arranges to send a SIGHUP to the foreground process
+group with the \fIvhangup\fP() function. However, in 4.2
+BSD, due to the behavior of the shells that support job control, the
+controlling process is usually a shell with no other processes
+in its process group. Thus, a change to make \fI_exit\fP() behave
+this way in such systems should not cause problems with existing
+applications.
+.LP
+The termination of a process may cause a process group to become orphaned
+in either of two ways. The connection of a process
+group to its parent(s) outside of the group depends on both the parents
+and their children. Thus, a process group may be orphaned
+by the termination of the last connecting parent process outside of
+the group or by the termination of the last direct descendant
+of the parent process(es). In either case, if the termination of a
+process causes a process group to become orphaned, processes
+within the group are disconnected from their job control shell, which
+no longer has any information on the existence of the process
+group. Stopped processes within the group would languish forever.
+In order to avoid this problem, newly orphaned process groups
+that contain stopped processes are sent a SIGHUP signal and a SIGCONT
+signal to indicate that they have been disconnected from
+their session. The SIGHUP signal causes the process group members
+to terminate unless they are catching or ignoring SIGHUP. Under
+most circumstances, all of the members of the process group are stopped
+if any of them are stopped.
+.LP
+The action of sending a SIGHUP and a SIGCONT signal to members of
+a newly orphaned process group is similar to the action of 4.2
+BSD, which sends SIGHUP and SIGCONT to each stopped child of an exiting
+process. If such children exit in response to the SIGHUP,
+any additional descendants receive similar treatment at that time.
+In this volume of IEEE\ Std\ 1003.1-2001, the signals
+are sent to the entire process group at the same time. Also, in this
+volume of IEEE\ Std\ 1003.1-2001, but not in 4.2 BSD,
+stopped processes may be orphaned, but may be members of a process
+group that is not orphaned; therefore, the action taken at
+\fI_exit\fP() must consider processes other than child processes.
+.LP
+It is possible for a process group to be orphaned by a call to \fIsetpgid\fP()
+or \fIsetsid\fP(), as well as by process termination. This volume
+of
+IEEE\ Std\ 1003.1-2001 does not require sending SIGHUP and SIGCONT
+in those cases, because, unlike process termination,
+those cases are not caused accidentally by applications that are unaware
+of job control. An implementation can choose to send
+SIGHUP and SIGCONT in those cases as an extension; such an extension
+must be documented as required in \fI<signal.h>\fP.
+.LP
+The ISO/IEC\ 9899:1999 standard adds the \fI_Exit\fP() function that
+results in immediate program termination without
+triggering signals or \fIatexit\fP()-registered functions. In
+IEEE\ Std\ 1003.1-2001, this is equivalent to the \fI_exit\fP() function.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIatexit\fP(), \fIclose\fP(), \fIfclose\fP(),
+\fIlongjmp\fP(), \fIposix_trace_shutdown\fP(), \fIposix_trace_trid_eventid_open\fP(),
+\fIsemop\fP(), \fIshmget\fP(), \fIsigaction\fP(), \fIwait\fP()
+,
+\fIwaitid\fP(), \fIwaitpid\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<stdlib.h>\fP, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/exp.3p b/man-pages-posix-2003/man3p/exp.3p
new file mode 100644
index 0000000..eb0c58b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/exp.3p
@@ -0,0 +1,121 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "EXP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" exp
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+exp, expf, expl \- exponential function
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double exp(double\fP \fIx\fP\fB);
+.br
+float expf(float\fP \fIx\fP\fB);
+.br
+long double expl(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the base- \fIe\fP exponential of \fIx\fP.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the exponential
+value of \fIx\fP.
+.LP
+If the correct value would cause overflow, a range error shall occur
+and \fIexp\fP(), \fIexpf\fP(), and \fIexpl\fP() shall
+return the value of the macro HUGE_VAL, HUGE_VALF, and HUGE_VALL,
+respectively.
+.LP
+If the correct value would cause underflow, and is not representable,
+a range error may occur, and either 0.0 (if
+supported), or an implementation-defined value shall be
+returned.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is \(+-0, 1 shall be returned.
+.LP
+If \fIx\fP is -Inf, +0 shall be returned.
+.LP
+If \fIx\fP is +Inf, \fIx\fP shall be returned.
+.LP
+If the correct value would cause underflow, and is representable,
+a range error may occur and the correct value shall be
+returned.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Range\ Error
+The result overflows.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the overflow floating-point exception shall be
+raised.
+.sp
+.LP
+These functions may fail if:
+.TP 7
+Range\ Error
+The result underflows.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the underflow floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Note that for IEEE\ Std\ 754-1985 \fBdouble\fP, 709.8 < \fIx\fP implies
+\fIexp\fP( \fIx\fP) has overflowed. The
+value \fIx\fP <\ -708.4 implies \fIexp\fP( \fIx\fP) has underflowed.
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIisnan\fP(), \fIlog\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment of Error Conditions
+for
+Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/exp2.3p b/man-pages-posix-2003/man3p/exp2.3p
new file mode 100644
index 0000000..ee3a514
--- /dev/null
+++ b/man-pages-posix-2003/man3p/exp2.3p
@@ -0,0 +1,119 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "EXP2" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" exp2
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+exp2, exp2f, exp2l \- exponential base 2 functions
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double exp2(double\fP \fIx\fP\fB);
+.br
+float exp2f(float\fP \fIx\fP\fB);
+.br
+long double exp2l(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the base-2 exponential of \fIx\fP.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return 2\fI**x\fP.
+.LP
+If the correct value would cause overflow, a range error shall occur
+and \fIexp2\fP(), \fIexp2f\fP(), and \fIexp2l\fP() shall
+return the value of the macro HUGE_VAL, HUGE_VALF, and HUGE_VALL,
+respectively.
+.LP
+If the correct value would cause underflow, and is not representable,
+a range error may occur, and either 0.0 (if
+supported), or an implementation-defined value shall be
+returned.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is \(+-0, 1 shall be returned.
+.LP
+If \fIx\fP is -Inf, +0 shall be returned.
+.LP
+If \fIx\fP is +Inf, \fIx\fP shall be returned.
+.LP
+If the correct value would cause underflow, and is representable,
+a range error may occur and the correct value shall be
+returned.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Range\ Error
+The result overflows.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the overflow floating-point exception shall be
+raised.
+.sp
+.LP
+These functions may fail if:
+.TP 7
+Range\ Error
+The result underflows.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the underflow floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+For IEEE\ Std\ 754-1985 \fBdouble\fP, 1024 <= \fIx\fP implies \fIexp2\fP(
+\fIx\fP) has overflowed. The value
+\fIx\fP <\ -1022 implies \fIexp\fP( \fIx\fP) has underflowed.
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexp\fP(), \fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIisnan\fP(),
+\fIlog\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment
+of Error Conditions for Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/exp2f.3p b/man-pages-posix-2003/man3p/exp2f.3p
new file mode 100644
index 0000000..8bfc3a9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/exp2f.3p
@@ -0,0 +1 @@
+.so man3p/exp2.3p
diff --git a/man-pages-posix-2003/man3p/exp2l.3p b/man-pages-posix-2003/man3p/exp2l.3p
new file mode 100644
index 0000000..8bfc3a9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/exp2l.3p
@@ -0,0 +1 @@
+.so man3p/exp2.3p
diff --git a/man-pages-posix-2003/man3p/expf.3p b/man-pages-posix-2003/man3p/expf.3p
new file mode 100644
index 0000000..768bad2
--- /dev/null
+++ b/man-pages-posix-2003/man3p/expf.3p
@@ -0,0 +1 @@
+.so man3p/exp.3p
diff --git a/man-pages-posix-2003/man3p/expl.3p b/man-pages-posix-2003/man3p/expl.3p
new file mode 100644
index 0000000..768bad2
--- /dev/null
+++ b/man-pages-posix-2003/man3p/expl.3p
@@ -0,0 +1 @@
+.so man3p/exp.3p
diff --git a/man-pages-posix-2003/man3p/expm1.3p b/man-pages-posix-2003/man3p/expm1.3p
new file mode 100644
index 0000000..250c4d3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/expm1.3p
@@ -0,0 +1,130 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "EXPM1" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" expm1
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+expm1, expm1f, expm1l \- compute exponential functions
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double expm1(double\fP \fIx\fP\fB);
+.br
+float expm1f(float\fP \fIx\fP\fB);
+.br
+long double expm1l(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute \fIe**x\fP-1.0.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions return \fIe**x\fP-1.0.
+.LP
+If the correct value would cause overflow, a range error shall occur
+and \fIexpm1\fP(), \fIexpm1f\fP(), and \fIexpm1l\fP()
+shall return the value of the macro HUGE_VAL, HUGE_VALF, and HUGE_VALL,
+respectively.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is \(+-0, \(+-0 shall be returned.
+.LP
+If \fIx\fP is -Inf, -1 shall be returned.
+.LP
+If \fIx\fP is +Inf, \fIx\fP shall be returned.
+.LP
+If \fIx\fP is subnormal, a range error may occur and \fIx\fP should
+be returned.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Range\ Error
+The result overflows.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the overflow floating-point exception shall be
+raised.
+.sp
+.LP
+These functions may fail if:
+.TP 7
+Range\ Error
+The value of \fIx\fP is subnormal.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the underflow floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The value of \fIexpm1\fP(\fIx\fP) may be more accurate than \fIexp\fP(\fIx\fP)-1.0
+for small values of \fIx\fP.
+.LP
+The \fIexpm1\fP() and \fIlog1p\fP() functions are useful for financial
+calculations of
+((1+\fIx\fP)**\fIn\fP-1)/\fIx\fP, namely:
+.sp
+.RS
+.nf
+
+\fBexpm1(\fP\fIn\fP \fB* log1p(\fP\fIx\fP\fB))/\fP\fIx\fP
+.fi
+.RE
+.LP
+when \fIx\fP is very small (for example, when calculating small daily
+interest rates). These functions also simplify writing
+accurate inverse hyperbolic functions.
+.LP
+For IEEE\ Std\ 754-1985 \fBdouble\fP, 709.8 < \fIx\fP implies \fIexpm1\fP(
+\fIx\fP) has overflowed.
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexp\fP(), \fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIilogb\fP(),
+\fIlog1p\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, Section 4.18,
+Treatment of Error Conditions for Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/expm1f.3p b/man-pages-posix-2003/man3p/expm1f.3p
new file mode 100644
index 0000000..ad120c7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/expm1f.3p
@@ -0,0 +1 @@
+.so man3p/expm1.3p
diff --git a/man-pages-posix-2003/man3p/expm1l.3p b/man-pages-posix-2003/man3p/expm1l.3p
new file mode 100644
index 0000000..ad120c7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/expm1l.3p
@@ -0,0 +1 @@
+.so man3p/expm1.3p
diff --git a/man-pages-posix-2003/man3p/fabs.3p b/man-pages-posix-2003/man3p/fabs.3p
new file mode 100644
index 0000000..5f79cad
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fabs.3p
@@ -0,0 +1,68 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FABS" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fabs
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fabs, fabsf, fabsl \- absolute value function
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double fabs(double\fP \fIx\fP\fB);
+.br
+float fabsf(float\fP \fIx\fP\fB);
+.br
+long double fabsl(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the absolute value of their argument
+\fIx\fP,| \fIx\fP|.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the absolute
+value of \fIx\fP.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is \(+-0, +0 shall be returned.
+.LP
+If \fIx\fP is \(+-Inf, +Inf shall be returned.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIisnan\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fabsf.3p b/man-pages-posix-2003/man3p/fabsf.3p
new file mode 100644
index 0000000..61d8218
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fabsf.3p
@@ -0,0 +1 @@
+.so man3p/fabs.3p
diff --git a/man-pages-posix-2003/man3p/fabsl.3p b/man-pages-posix-2003/man3p/fabsl.3p
new file mode 100644
index 0000000..61d8218
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fabsl.3p
@@ -0,0 +1 @@
+.so man3p/fabs.3p
diff --git a/man-pages-posix-2003/man3p/fattach.3p b/man-pages-posix-2003/man3p/fattach.3p
new file mode 100644
index 0000000..7d9ae98
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fattach.3p
@@ -0,0 +1,171 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FATTACH" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fattach
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fattach \- attach a STREAMS-based file descriptor to a file in the
+file system name space (\fBSTREAMS\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <stropts.h>
+.br
+.sp
+int fattach(int\fP \fIfildes\fP\fB, const char *\fP\fIpath\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfattach\fP() function shall attach a STREAMS-based file descriptor
+to a file, effectively associating a pathname with
+\fIfildes\fP. The application shall ensure that the \fIfildes\fP argument
+is a valid open file descriptor associated with a
+STREAMS file. The \fIpath\fP argument points to a pathname of an existing
+file. The application shall have the appropriate
+privileges or be the owner of the file named by \fIpath\fP and have
+write permission. A successful call to \fIfattach\fP() shall
+cause all pathnames that name the file named by \fIpath\fP to name
+the STREAMS file associated with \fIfildes\fP, until the
+STREAMS file is detached from the file. A STREAMS file can be attached
+to more than one file and can have several pathnames
+associated with it.
+.LP
+The attributes of the named STREAMS file shall be initialized as follows:
+the permissions, user ID, group ID, and times are set
+to those of the file named by \fIpath\fP, the number of links is set
+to 1, and the size and device identifier are set to those of
+the STREAMS file associated with \fIfildes\fP. If any attributes of
+the named STREAMS file are subsequently changed (for example,
+by \fIchmod\fP()), neither the attributes of the underlying file nor
+the attributes of the
+STREAMS file to which \fIfildes\fP refers shall be affected.
+.LP
+File descriptors referring to the underlying file, opened prior to
+an \fIfattach\fP() call, shall continue to refer to the
+underlying file.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIfattach\fP() shall return 0. Otherwise,
+-1 shall be returned and \fIerrno\fP set to indicate
+the error.
+.SH ERRORS
+.LP
+The \fIfattach\fP() function shall fail if:
+.TP 7
+.B EACCES
+Search permission is denied for a component of the path prefix, or
+the process is the owner of \fIpath\fP but does not have
+write permissions on the file named by \fIpath\fP.
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not a valid open file descriptor.
+.TP 7
+.B EBUSY
+The file named by \fIpath\fP is currently a mount point or has a STREAMS
+file attached to it.
+.TP 7
+.B ELOOP
+A loop exists in symbolic links encountered during resolution of the
+\fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+The size of \fIpath\fP exceeds {PATH_MAX} or a component of \fIpath\fP
+is longer than {NAME_MAX}.
+.TP 7
+.B ENOENT
+A component of \fIpath\fP does not name an existing file or \fIpath\fP
+is an empty string.
+.TP 7
+.B ENOTDIR
+A component of the path prefix is not a directory.
+.TP 7
+.B EPERM
+The effective user ID of the process is not the owner of the file
+named by \fIpath\fP and the process does not have
+appropriate privilege.
+.sp
+.LP
+The \fIfattach\fP() function may fail if:
+.TP 7
+.B EINVAL
+The \fIfildes\fP argument does not refer to a STREAMS file.
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the \fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+Pathname resolution of a symbolic link produced an intermediate result
+whose length exceeds {PATH_MAX}.
+.TP 7
+.B EXDEV
+A link to a file on another file system was attempted.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Attaching a File Descriptor to a File
+.LP
+In the following example, \fIfd\fP refers to an open STREAMS file.
+The call to \fIfattach\fP() associates this STREAM with the
+file \fB/tmp/named-STREAM\fP, such that any future calls to open \fB/tmp/named-STREAM\fP,
+prior to breaking the attachment via a
+call to \fIfdetach\fP(), will instead create a new file handle referring
+to the STREAMS
+file associated with \fIfd\fP.
+.sp
+.RS
+.nf
+
+\fB#include <stropts.h>
+\&...
+ int fd;
+ char *filename = "/tmp/named-STREAM";
+ int ret;
+.sp
+
+ ret = fattach(fd, filename);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The \fIfattach\fP() function behaves similarly to the traditional
+\fImount\fP() function in the way a file is temporarily
+replaced by the root directory of the mounted file system. In the
+case of \fIfattach\fP(), the replaced file need not be a
+directory and the replacing file is a STREAMS file.
+.SH RATIONALE
+.LP
+The file attributes of a file which has been the subject of an \fIfattach\fP()
+call are specifically set because of an artefact
+of the original implementation. The internal mechanism was the same
+as for the \fImount\fP() function. Since \fImount\fP() is
+typically only applied to directories, the effects when applied to
+a regular file are a little surprising, especially as regards
+the link count which rigidly remains one, even if there were several
+links originally and despite the fact that all original links
+refer to the STREAM as long as the \fIfattach\fP() remains in effect.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfdetach\fP(), \fIisastream\fP(), the Base Definitions volume
+of
+IEEE\ Std\ 1003.1-2001, \fI<stropts.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fchdir.3p b/man-pages-posix-2003/man3p/fchdir.3p
new file mode 100644
index 0000000..fbd6735
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fchdir.3p
@@ -0,0 +1,85 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FCHDIR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fchdir
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fchdir \- change working directory
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+int fchdir(int\fP \fIfildes\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfchdir\fP() function shall be equivalent to \fIchdir\fP() except
+that the
+directory that is to be the new current working directory is specified
+by the file descriptor \fIfildes\fP.
+.LP
+A conforming application can obtain a file descriptor for a file of
+type directory using \fIopen\fP(), provided that the file status flags
+and access modes do not contain O_WRONLY or
+O_RDWR.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIfchdir\fP() shall return 0. Otherwise,
+it shall return -1 and set \fIerrno\fP to indicate the
+error. On failure the current working directory shall remain unchanged.
+.SH ERRORS
+.LP
+The \fIfchdir\fP() function shall fail if:
+.TP 7
+.B EACCES
+Search permission is denied for the directory referenced by \fIfildes\fP.
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not an open file descriptor.
+.TP 7
+.B ENOTDIR
+The open file descriptor \fIfildes\fP does not refer to a directory.
+.sp
+.LP
+The \fIfchdir\fP() may fail if:
+.TP 7
+.B EINTR
+A signal was caught during the execution of \fIfchdir\fP().
+.TP 7
+.B EIO
+An I/O error occurred while reading from or writing to the file system.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIchdir\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fchmod.3p b/man-pages-posix-2003/man3p/fchmod.3p
new file mode 100644
index 0000000..34cd6ac
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fchmod.3p
@@ -0,0 +1,119 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FCHMOD" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fchmod
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fchmod \- change mode of a file
+.SH SYNOPSIS
+.LP
+\fB#include <sys/stat.h>
+.br
+.sp
+int fchmod(int\fP \fIfildes\fP\fB, mode_t\fP \fImode\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfchmod\fP() function shall be equivalent to \fIchmod\fP() except
+that the file
+whose permissions are changed is specified by the file descriptor
+\fIfildes\fP.
+.LP
+If \fIfildes\fP references a shared memory object, the \fIfchmod\fP()
+function need only affect the S_IRUSR, S_IWUSR, S_IRGRP,
+S_IWGRP, S_IROTH, and S_IWOTH file permission bits.
+.LP
+If \fIfildes\fP references a typed memory object, the behavior of
+\fIfchmod\fP() is unspecified.
+.LP
+If \fIfildes\fP refers to a socket, the behavior of \fIfchmod\fP()
+is unspecified.
+.LP
+If \fIfildes\fP refers to a STREAM (which is \fIfattach\fP()-ed into
+the file system name
+space) the call returns successfully, doing nothing.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIfchmod\fP() shall return 0. Otherwise,
+it shall return -1 and set \fIerrno\fP to indicate the
+error.
+.SH ERRORS
+.LP
+The \fIfchmod\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not an open file descriptor.
+.TP 7
+.B EPERM
+The effective user ID does not match the owner of the file and the
+process does not have appropriate privilege.
+.TP 7
+.B EROFS
+The file referred to by \fIfildes\fP resides on a read-only file system.
+.sp
+.LP
+The \fIfchmod\fP() function may fail if:
+.TP 7
+.B EINTR
+The \fIfchmod\fP() function was interrupted by a signal.
+.TP 7
+.B EINVAL
+The value of the \fImode\fP argument is invalid.
+.TP 7
+.B EINVAL
+The \fIfildes\fP argument refers to a pipe and the implementation
+disallows execution of \fIfchmod\fP() on a pipe.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Changing the Current Permissions for a File
+.LP
+The following example shows how to change the permissions for a file
+named \fB/home/cnd/mod1\fP so that the owner and group
+have read/write/execute permissions, but the world only has read/write
+permissions.
+.sp
+.RS
+.nf
+
+\fB#include <sys/stat.h>
+#include <fcntl.h>
+.sp
+
+mode_t mode;
+int fildes;
+\&...
+fildes = open("/home/cnd/mod1", O_RDWR);
+fchmod(fildes, S_IRWXU | S_IRWXG | S_IROTH | S_IWOTH);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIchmod\fP(), \fIchown\fP(), \fIcreat\fP(), \fIfcntl\fP(), \fIfstatvfs\fP(),
+\fImknod\fP(), \fIopen\fP(), \fIread\fP(), \fIstat\fP(), \fIwrite\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<sys/stat.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fchown.3p b/man-pages-posix-2003/man3p/fchown.3p
new file mode 100644
index 0000000..f9f2208
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fchown.3p
@@ -0,0 +1,120 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FCHOWN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fchown
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fchown \- change owner and group of a file
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+int fchown(int\fP \fIfildes\fP\fB, uid_t\fP \fIowner\fP\fB, gid_t\fP
+\fIgroup\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfchown\fP() function shall be equivalent to \fIchown\fP() except
+that the file
+whose owner and group are changed is specified by the file descriptor
+\fIfildes\fP.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIfchown\fP() shall return 0. Otherwise,
+it shall return -1 and set \fIerrno\fP to indicate the
+error.
+.SH ERRORS
+.LP
+The \fIfchown\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not an open file descriptor.
+.TP 7
+.B EPERM
+The effective user ID does not match the owner of the file or the
+process does not have appropriate privilege and
+_POSIX_CHOWN_RESTRICTED indicates that such privilege is required.
+.TP 7
+.B EROFS
+The file referred to by \fIfildes\fP resides on a read-only file system.
+.sp
+.LP
+The \fIfchown\fP() function may fail if:
+.TP 7
+.B EINVAL
+The owner or group ID is not a value supported by the implementation.
+The \fIfildes\fP argument refers to a pipe or socket
+\ or an \fIfattach\fP()-ed STREAM and the implementation disallows
+execution of \fIfchown\fP() on a pipe.
+.TP 7
+.B EIO
+A physical I/O error has occurred.
+.TP 7
+.B EINTR
+The \fIfchown\fP() function was interrupted by a signal which was
+caught.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Changing the Current Owner of a File
+.LP
+The following example shows how to change the owner of a file named
+\fB/home/cnd/mod1\fP to "jones" and the group to
+"cnd".
+.LP
+The numeric value for the user ID is obtained by extracting the user
+ID from the user database entry associated with "jones".
+Similarly, the numeric value for the group ID is obtained by extracting
+the group ID from the group database entry associated with
+"cnd". This example assumes the calling program has appropriate privileges.
+.sp
+.RS
+.nf
+
+\fB#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <pwd.h>
+#include <grp.h>
+.sp
+
+struct passwd *pwd;
+struct group *grp;
+int fildes;
+\&...
+fildes = open("/home/cnd/mod1", O_RDWR);
+pwd = getpwnam("jones");
+grp = getgrnam("cnd");
+fchown(fildes, pwd->pw_uid, grp->gr_gid);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIchown\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fclose.3p b/man-pages-posix-2003/man3p/fclose.3p
new file mode 100644
index 0000000..aa01af0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fclose.3p
@@ -0,0 +1,127 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FCLOSE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fclose
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fclose \- close a stream
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+int fclose(FILE *\fP\fIstream\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfclose\fP() function shall cause the stream pointed to by \fIstream\fP
+to be flushed and the associated file to be
+closed. Any unwritten buffered data for the stream shall be written
+to the file; any unread buffered data shall be discarded.
+Whether or not the call succeeds, the stream shall be disassociated
+from the file and any buffer set by the \fIsetbuf\fP() or \fIsetvbuf\fP()
+function shall be
+disassociated from the stream. If the associated buffer was automatically
+allocated, it shall be deallocated.
+.LP
+The
+\fIfclose\fP() function shall mark for update the \fIst_ctime\fP and
+\fIst_mtime\fP fields of the underlying file, if the stream
+was writable, and if buffered data remains that has not yet been written
+to the file. The \fIfclose\fP() function shall perform
+the equivalent of a \fIclose\fP() on the file descriptor that is associated
+with the stream
+pointed to by \fIstream\fP.
+.LP
+After the call to \fIfclose\fP(), any use of \fIstream\fP results
+in undefined behavior.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIfclose\fP() shall return 0; otherwise,
+it shall return EOF and set
+\fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fIfclose\fP() function shall fail if:
+.TP 7
+.B EAGAIN
+The O_NONBLOCK flag is set for the file descriptor underlying \fIstream\fP
+and the process would be delayed in the write
+operation.
+.TP 7
+.B EBADF
+The file descriptor underlying stream is not valid.
+.TP 7
+.B EFBIG
+An
+attempt was made to write a file that exceeds the maximum file size.
+.TP 7
+.B EFBIG
+An attempt was made to write a file that exceeds the process' file
+size limit.
+.TP 7
+.B EFBIG
+The file is a regular file and an attempt was made to write at or
+beyond the offset maximum associated with the corresponding
+stream.
+.TP 7
+.B EINTR
+The \fIfclose\fP() function was interrupted by a signal.
+.TP 7
+.B EIO
+The process is a member of a background process group attempting to
+write to its controlling terminal, TOSTOP is set, the process
+is neither ignoring nor blocking SIGTTOU, and the process group of
+the process is orphaned. This error may also be returned under
+implementation-defined conditions.
+.TP 7
+.B ENOSPC
+There was no free space remaining on the device containing the file.
+.TP 7
+.B EPIPE
+An
+attempt is made to write to a pipe or FIFO that is not open for reading
+by any process. A SIGPIPE signal shall also be sent to the
+thread.
+.sp
+.LP
+The \fIfclose\fP() function may fail if:
+.TP 7
+.B ENXIO
+A
+request was made of a nonexistent device, or the request was outside
+the capabilities of the device.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIclose\fP(), \fIfopen\fP(), \fIgetrlimit\fP(), \fIulimit\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fcntl.3p b/man-pages-posix-2003/man3p/fcntl.3p
new file mode 100644
index 0000000..a6f5268
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fcntl.3p
@@ -0,0 +1,481 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FCNTL" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fcntl
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fcntl \- file control
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h> \fP
+\fB
+.br
+#include <fcntl.h>
+.br
+.sp
+int fcntl(int\fP \fIfildes\fP\fB, int\fP \fIcmd\fP\fB, ...);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfcntl\fP() function shall perform the operations described
+below on open files. The \fIfildes\fP argument is a file
+descriptor.
+.LP
+The available values for \fIcmd\fP are defined in \fI<fcntl.h>\fP
+and are as
+follows:
+.TP 7
+F_DUPFD
+Return a new file descriptor which shall be the lowest numbered available
+(that is, not already open) file descriptor greater
+than or equal to the third argument, \fIarg\fP, taken as an integer
+of type \fBint\fP. The new file descriptor shall refer to the
+same open file description as the original file descriptor, and shall
+share any locks. The FD_CLOEXEC flag associated with the new
+file descriptor shall be cleared to keep the file open across calls
+to one of the \fIexec\fP
+functions.
+.TP 7
+F_GETFD
+Get the file descriptor flags defined in \fI<fcntl.h>\fP that are
+associated with
+the file descriptor \fIfildes\fP. File descriptor flags are associated
+with a single file descriptor and do not affect other file
+descriptors that refer to the same file.
+.TP 7
+F_SETFD
+Set the file descriptor flags defined in \fI<fcntl.h>\fP, that are
+associated
+with \fIfildes\fP, to the third argument, \fIarg\fP, taken as type
+\fBint\fP. If the FD_CLOEXEC flag in the third argument is 0,
+the file shall remain open across the \fIexec\fP functions; otherwise,
+the file shall be
+closed upon successful execution of one of the \fIexec\fP functions.
+.TP 7
+F_GETFL
+Get the file status flags and file access modes, defined in \fI<fcntl.h>\fP,
+for
+the file description associated with \fIfildes\fP. The file access
+modes can be extracted from the return value using the mask
+O_ACCMODE, which is defined in \fI<fcntl.h>\fP. File status flags
+and file access
+modes are associated with the file description and do not affect other
+file descriptors that refer to the same file with different
+open file descriptions.
+.TP 7
+F_SETFL
+Set the file status flags, defined in \fI<fcntl.h>\fP, for the file
+description
+associated with \fIfildes\fP from the corresponding bits in the third
+argument, \fIarg\fP, taken as type \fBint\fP. Bits
+corresponding to the file access mode and the file creation flags,
+as defined in \fI<fcntl.h>\fP, that are set in \fIarg\fP shall be
+ignored. If any bits in \fIarg\fP other
+than those mentioned here are changed by the application, the result
+is unspecified.
+.TP 7
+F_GETOWN
+If \fIfildes\fP refers to a socket, get the process or process group
+ID specified to receive SIGURG signals when out-of-band
+data is available. Positive values indicate a process ID; negative
+values, other than -1, indicate a process group ID. If
+\fIfildes\fP does not refer to a socket, the results are unspecified.
+.TP 7
+F_SETOWN
+If \fIfildes\fP refers to a socket, set the process or process group
+ID specified to receive SIGURG signals when out-of-band
+data is available, using the value of the third argument, \fIarg\fP,
+taken as type \fBint\fP. Positive values indicate a process
+ID; negative values, other than -1, indicate a process group ID. If
+\fIfildes\fP does not refer to a socket, the results are
+unspecified.
+.sp
+.LP
+The following values for \fIcmd\fP are available for advisory record
+locking. Record locking shall be supported for regular
+files, and may be supported for other files.
+.TP 7
+F_GETLK
+Get the first lock which blocks the lock description pointed to by
+the third argument, \fIarg\fP, taken as a pointer to type
+\fBstruct flock\fP, defined in \fI<fcntl.h>\fP. The information retrieved
+shall
+overwrite the information passed to \fIfcntl\fP() in the structure
+\fBflock\fP. If no lock is found that would prevent this lock
+from being created, then the structure shall be left unchanged except
+for the lock type which shall be set to F_UNLCK.
+.TP 7
+F_SETLK
+Set or clear a file segment lock according to the lock description
+pointed to by the third argument, \fIarg\fP, taken as a
+pointer to type \fBstruct flock\fP, defined in \fI<fcntl.h>\fP. F_SETLK
+can
+establish shared (or read) locks (F_RDLCK) or exclusive (or write)
+locks (F_WRLCK), as well as to remove either type of lock
+(F_UNLCK). F_RDLCK, F_WRLCK, and F_UNLCK are defined in \fI<fcntl.h>\fP.
+If a shared
+or exclusive lock cannot be set, \fIfcntl\fP() shall return immediately
+with a return value of -1.
+.TP 7
+F_SETLKW
+This command shall be equivalent to F_SETLK except that if a shared
+or exclusive lock is blocked by other locks, the thread
+shall wait until the request can be satisfied. If a signal that is
+to be caught is received while \fIfcntl\fP() is waiting for a
+region, \fIfcntl\fP() shall be interrupted. Upon return from the signal
+handler, \fIfcntl\fP() shall return -1 with \fIerrno\fP
+set to [EINTR], and the lock operation shall not be done.
+.sp
+.LP
+Additional implementation-defined values for \fIcmd\fP may be defined
+in \fI<fcntl.h>\fP. Their names shall start with F_.
+.LP
+When a shared lock is set on a segment of a file, other processes
+shall be able to 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 shall fail if the file descriptor was not opened with
+read access.
+.LP
+An exclusive lock shall prevent 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 shall fail if the
+file descriptor was not opened with write access.
+.LP
+The structure \fBflock\fP describes the type ( \fIl_type\fP), starting
+offset ( \fIl_whence\fP), relative offset (
+\fIl_start\fP), size ( \fIl_len\fP), and process ID ( \fIl_pid\fP)
+of the segment of the file to be affected.
+.LP
+The value of \fIl_whence\fP is SEEK_SET, SEEK_CUR, or SEEK_END, to
+indicate that the relative offset \fIl_start\fP bytes shall
+be measured from the start of the file, current position, or end of
+the file, respectively. The value of \fIl_len\fP is the number
+of consecutive bytes to be locked. The value of \fIl_len\fP may be
+negative (where the definition of \fBoff_t\fP permits negative
+values of \fIl_len\fP). The \fIl_pid\fP field is only used with F_GETLK
+to return the process ID of the process holding a
+blocking lock. After a successful F_GETLK request, when a blocking
+lock is found, the values returned in the \fBflock\fP structure
+shall be as follows:
+.TP 7
+\fIl_type\fP
+Type of blocking lock found.
+.TP 7
+\fIl_whence\fP
+SEEK_SET.
+.TP 7
+\fIl_start\fP
+Start of the blocking lock.
+.TP 7
+\fIl_len\fP
+Length of the blocking lock.
+.TP 7
+\fIl_pid\fP
+Process ID of the process that holds the blocking lock.
+.sp
+.LP
+If the command is F_SETLKW and the process must wait for another process
+to release a lock, then the range of bytes to be locked
+shall be determined before the \fIfcntl\fP() function blocks. If the
+file size or file descriptor seek offset change while
+\fIfcntl\fP() is blocked, this shall not affect the range of bytes
+locked.
+.LP
+If \fIl_len\fP is positive, the area affected shall start at \fIl_start\fP
+and end at \fIl_start\fP+ \fIl_len\fP-1. If
+\fIl_len\fP is negative, the area affected shall start at \fIl_start\fP+
+\fIl_len\fP and end at \fIl_start\fP-1. Locks may
+start and extend beyond the current end of a file, but shall not extend
+before the beginning of the file. A lock shall be set to
+extend to the largest possible value of the file offset for that file
+by setting \fIl_len\fP to 0. If such a lock also has
+\fIl_start\fP set to 0 and \fIl_whence\fP is set to SEEK_SET, the
+whole file shall be locked.
+.LP
+There shall be at most one type of lock set for each byte in the file.
+Before a successful return from an F_SETLK or an 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 shall be replaced by the
+new lock type. As specified above under the descriptions of
+shared locks and exclusive locks, an F_SETLK or an F_SETLKW request
+(respectively) shall fail or block 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.
+.LP
+All locks associated with a file for a given process shall be removed
+when a file descriptor for that file is closed by that
+process or the process holding that file descriptor terminates. Locks
+are not inherited by a child process.
+.LP
+A potential for deadlock occurs if a process controlling a locked
+region is put to sleep by attempting to lock another process'
+locked region. If the system detects that sleeping until a locked
+region is unlocked would cause a deadlock, \fIfcntl\fP() shall
+fail with an [EDEADLK] error.
+.LP
+An unlock (F_UNLCK) request in which \fIl_len\fP is non-zero and the
+offset of the last byte of the requested segment is the
+maximum value for an object of type \fBoff_t\fP, when the process
+has an existing lock in which \fIl_len\fP is 0 and which
+includes the last byte of the requested segment, shall be treated
+as a request to unlock from the start of the requested segment
+with an \fIl_len\fP equal to 0. Otherwise, an unlock (F_UNLCK) request
+shall attempt to unlock only the requested segment.
+.LP
+When the file descriptor \fIfildes\fP refers to a shared memory object,
+the behavior of \fIfcntl\fP() shall be the same as for a
+regular file except the effect of the following values for the argument
+\fIcmd\fP shall be unspecified: F_SETFL, F_GETLK, F_SETLK,
+and F_SETLKW.
+.LP
+If \fIfildes\fP refers to a typed memory object, the result of the
+\fIfcntl\fP() function is unspecified.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the value returned shall depend on \fIcmd\fP
+as follows:
+.TP 7
+F_DUPFD
+A new file descriptor.
+.TP 7
+F_GETFD
+Value of flags defined in \fI<fcntl.h>\fP. The return value shall
+not be
+negative.
+.TP 7
+F_SETFD
+Value other than -1.
+.TP 7
+F_GETFL
+Value of file status flags and access modes. The return value is not
+negative.
+.TP 7
+F_SETFL
+Value other than -1.
+.TP 7
+F_GETLK
+Value other than -1.
+.TP 7
+F_SETLK
+Value other than -1.
+.TP 7
+F_SETLKW
+Value other than -1.
+.TP 7
+F_GETOWN
+Value of the socket owner process or process group; this will not
+be -1.
+.TP 7
+F_SETOWN
+Value other than -1.
+.sp
+.LP
+Otherwise, -1 shall be returned and \fIerrno\fP set to indicate the
+error.
+.SH ERRORS
+.LP
+The \fIfcntl\fP() function shall fail if:
+.TP 7
+.B EACCES \fRor\fP EAGAIN
+.sp
+The \fIcmd\fP argument is F_SETLK; the type of lock ( \fIl_type\fP)
+is a shared (F_RDLCK) or exclusive (F_WRLCK) lock 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.
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not a valid open file descriptor, or
+the argument \fIcmd\fP is F_SETLK or F_SETLKW, the type of
+lock, \fIl_type\fP, is a shared lock (F_RDLCK), and \fIfildes\fP is
+not a valid file descriptor open for reading, or the type of
+lock, \fIl_type\fP, is an exclusive lock (F_WRLCK), and \fIfildes\fP
+is not a valid file descriptor open for writing.
+.TP 7
+.B EINTR
+The \fIcmd\fP argument is F_SETLKW and the function was interrupted
+by a signal.
+.TP 7
+.B EINVAL
+The \fIcmd\fP argument is invalid, or the \fIcmd\fP argument is F_DUPFD
+and \fIarg\fP is negative or greater than or equal
+to {OPEN_MAX}, or the \fIcmd\fP argument is F_GETLK, F_SETLK, or F_SETLKW
+and the data pointed to by \fIarg\fP is not valid, or
+\fIfildes\fP refers to a file that does not support locking.
+.TP 7
+.B EMFILE
+The argument \fIcmd\fP is F_DUPFD and {OPEN_MAX} file descriptors
+are currently open in the calling process, or no file
+descriptors greater than or equal to \fIarg\fP are available.
+.TP 7
+.B ENOLCK
+The argument \fIcmd\fP is F_SETLK or 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.
+.TP 7
+.B EOVERFLOW
+One of the values to be returned cannot be represented correctly.
+.TP 7
+.B EOVERFLOW
+The \fIcmd\fP argument is F_GETLK, F_SETLK, or F_SETLKW and the smallest
+or, if \fIl_len\fP is non-zero, the largest offset
+of any byte in the requested segment cannot be represented correctly
+in an object of type \fBoff_t\fP.
+.sp
+.LP
+The \fIfcntl\fP() function may fail if:
+.TP 7
+.B EDEADLK
+The \fIcmd\fP argument is F_SETLKW, the lock is blocked by a lock
+from another process, and putting the calling process to
+sleep to wait for that lock to become free would cause a deadlock.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The ellipsis in the SYNOPSIS is the syntax specified by the ISO\ C
+standard for a variable number of arguments. It is used
+because System V uses pointers for the implementation of file locking
+functions.
+.LP
+The \fIarg\fP values to F_GETFD, F_SETFD, F_GETFL, and F_SETFL all
+represent flag values to allow for future growth.
+Applications using these functions should do a read-modify-write operation
+on them, rather than assuming that only the values
+defined by this volume of IEEE\ Std\ 1003.1-2001 are valid. It is
+a common error to forget this, particularly in the case
+of F_SETFD.
+.LP
+This volume of IEEE\ Std\ 1003.1-2001 permits concurrent read and
+write access to file data using the \fIfcntl\fP()
+function; this is a change from the 1984 /usr/group standard and early
+proposals. Without concurrency controls, this feature may
+not be fully utilized without occasional loss of data.
+.LP
+Data losses occur in several ways. One case occurs when several processes
+try to update the same record, without sequencing
+controls; several updates may occur in parallel and the last writer
+"wins". Another case is a bit-tree or other internal
+list-based database that is undergoing reorganization. Without exclusive
+use to the tree segment by the updating process, other
+reading processes chance getting lost in the database when the index
+blocks are split, condensed, inserted, or deleted. While
+\fIfcntl\fP() is useful for many applications, it is not intended
+to be overly general and does not handle the bit-tree example
+well.
+.LP
+This facility is only required for regular files because it is not
+appropriate for many devices such as terminals and network
+connections.
+.LP
+Since \fIfcntl\fP() works with "any file descriptor associated with
+that file, however it is obtained", the file descriptor
+may have been inherited through a \fIfork\fP() or \fIexec\fP operation
+and thus may affect a file that another process also has open.
+.LP
+The use of the open file description to identify what to lock requires
+extra calls and presents problems if several processes
+are sharing an open file description, but there are too many implementations
+of the existing mechanism for this volume of
+IEEE\ Std\ 1003.1-2001 to use different specifications.
+.LP
+Another consequence of this model is that closing any file descriptor
+for a given file (whether or not it is the same open file
+description that created the lock) causes the locks on that file to
+be relinquished for that process. Equivalently, any close for
+any file/process pair relinquishes the locks owned on that file for
+that process. But note that while an open file description may
+be shared through \fIfork\fP(), locks are not inherited through \fIfork\fP().
+Yet locks may be inherited through one of the \fIexec\fP functions.
+.LP
+The identification of a machine in a network environment is outside
+the scope of this volume of IEEE\ Std\ 1003.1-2001.
+Thus, an \fIl_sysid\fP member, such as found in System V, is not included
+in the locking structure.
+.LP
+Changing of lock types can result in a previously locked region being
+split into smaller regions.
+.LP
+Mandatory locking was a major feature of the 1984 /usr/group standard.
+.LP
+For advisory file record locking to be effective, all processes that
+have access to a file must cooperate and use the advisory
+mechanism before doing I/O on the file. Enforcement-mode record locking
+is important when it cannot be assumed that all processes
+are cooperating. For example, if one user uses an editor to update
+a file at the same time that a second user executes another
+process that updates the same file and if only one of the two processes
+is using advisory locking, the processes are not
+cooperating. Enforcement-mode record locking would protect against
+accidental collisions.
+.LP
+Secondly, advisory record locking requires a process using locking
+to bracket each I/O operation with lock (or test) and unlock
+operations. With enforcement-mode file and record locking, a process
+can lock the file once and unlock when all I/O operations have
+been completed. Enforcement-mode record locking provides a base that
+can be enhanced; for example, with sharable locks. That is,
+the mechanism could be enhanced to allow a process to lock a file
+so other processes could read it, but none of them could write
+it.
+.LP
+Mandatory locks were omitted for several reasons:
+.IP " 1." 4
+Mandatory lock setting was done by multiplexing the set-group-ID bit
+in most implementations; this was confusing, at best.
+.LP
+.IP " 2." 4
+The relationship to file truncation as supported in 4.2 BSD was not
+well specified.
+.LP
+.IP " 3." 4
+Any publicly readable file could be locked by anyone. Many historical
+implementations keep the password database in a publicly
+readable file. A malicious user could thus prohibit logins. Another
+possibility would be to hold open a long-distance telephone
+line.
+.LP
+.IP " 4." 4
+Some demand-paged historical implementations offer memory mapped files,
+and enforcement cannot be done on that type of file.
+.LP
+.LP
+Since sleeping on a region is interrupted with any signal, \fIalarm\fP()
+may be used to
+provide a timeout facility in applications requiring it. This is useful
+in deadlock detection. Since implementation of full
+deadlock detection is not always feasible, the [EDEADLK] error was
+made optional.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIalarm\fP(), \fIclose\fP(), \fIexec\fP(), \fIopen\fP(), \fIsigaction\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<fcntl.h>\fP,
+\fI<signal.h>\fP, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fcvt.3p b/man-pages-posix-2003/man3p/fcvt.3p
new file mode 100644
index 0000000..ad49771
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fcvt.3p
@@ -0,0 +1 @@
+.so man3p/ecvt.3p
diff --git a/man-pages-posix-2003/man3p/fdatasync.3p b/man-pages-posix-2003/man3p/fdatasync.3p
new file mode 100644
index 0000000..b9b1930
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fdatasync.3p
@@ -0,0 +1,79 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FDATASYNC" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fdatasync
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fdatasync \- synchronize the data of a file (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+int fdatasync(int\fP \fIfildes\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfdatasync\fP() function shall force all currently queued I/O
+operations associated with the file indicated by file
+descriptor \fIfildes\fP to the synchronized I/O completion state.
+.LP
+The functionality shall be equivalent to \fIfsync\fP() with the symbol
+_POSIX_SYNCHRONIZED_IO defined, with the exception that all I/O operations
+shall be completed as defined for synchronized I/O data
+integrity completion.
+.SH RETURN VALUE
+.LP
+If successful, the \fIfdatasync\fP() function shall return the value
+0; otherwise, the function shall return the value -1 and
+set \fIerrno\fP to indicate the error. If the \fIfdatasync\fP() function
+fails, outstanding I/O operations are not guaranteed to
+have been completed.
+.SH ERRORS
+.LP
+The \fIfdatasync\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not a valid file descriptor open for
+writing.
+.TP 7
+.B EINVAL
+This implementation does not support synchronized I/O for this file.
+.sp
+.LP
+In the event that any of the queued I/O operations fail, \fIfdatasync\fP()
+shall return the error conditions defined for \fIread\fP() and \fIwrite\fP().
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIaio_fsync\fP(), \fIfcntl\fP(), \fIfsync\fP(), \fIopen\fP(),
+\fIread\fP(), \fIwrite\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fdetach.3p b/man-pages-posix-2003/man3p/fdetach.3p
new file mode 100644
index 0000000..9288830
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fdetach.3p
@@ -0,0 +1,131 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FDETACH" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fdetach
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fdetach \- detach a name from a STREAMS-based file descriptor (\fBSTREAMS\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <stropts.h>
+.br
+.sp
+int fdetach(const char *\fP\fIpath\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfdetach\fP() function shall detach a STREAMS-based file from
+the file to which it was attached by a previous call to \fIfattach\fP().
+The \fIpath\fP argument points to the pathname of the attached STREAMS
+file. The process shall have appropriate privileges or be the owner
+of the file. A successful call to \fIfdetach\fP() shall cause
+all pathnames that named the attached STREAMS file to again name the
+file to which the STREAMS file was attached. All subsequent
+operations on \fIpath\fP shall operate on the underlying file and
+not on the STREAMS file.
+.LP
+All open file descriptions established while the STREAMS file was
+attached to the file referenced by \fIpath\fP shall still
+refer to the STREAMS file after the \fIfdetach\fP() has taken effect.
+.LP
+If there are no open file descriptors or other references to the STREAMS
+file, then a successful call to \fIfdetach\fP() shall
+be equivalent to performing the last \fIclose\fP() on the attached
+file.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIfdetach\fP() shall return 0; otherwise,
+it shall return -1 and set \fIerrno\fP to indicate the
+error.
+.SH ERRORS
+.LP
+The \fIfdetach\fP() function shall fail if:
+.TP 7
+.B EACCES
+Search permission is denied on a component of the path prefix.
+.TP 7
+.B EINVAL
+The \fIpath\fP argument names a file that is not currently attached.
+.TP 7
+.B ELOOP
+A loop exists in symbolic links encountered during resolution of the
+\fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+The size of a pathname exceeds {PATH_MAX} or a pathname component
+is longer than {NAME_MAX}.
+.TP 7
+.B ENOENT
+A component of \fIpath\fP does not name an existing file or \fIpath\fP
+is an empty string.
+.TP 7
+.B ENOTDIR
+A component of the path prefix is not a directory.
+.TP 7
+.B EPERM
+The effective user ID is not the owner of \fIpath\fP and the process
+does not have appropriate privileges.
+.sp
+.LP
+The \fIfdetach\fP() function may fail if:
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the \fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+Pathname resolution of a symbolic link produced an intermediate result
+whose length exceeds {PATH_MAX}.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Detaching a File
+.LP
+The following example detaches the STREAMS-based file \fB/tmp/named-STREAM\fP
+from the file to which it was attached by a
+previous, successful call to \fIfattach\fP(). Subsequent calls to
+open this file refer to
+the underlying file, not to the STREAMS file.
+.sp
+.RS
+.nf
+
+\fB#include <stropts.h>
+\&...
+ char *filename = "/tmp/named-STREAM";
+ int ret;
+.sp
+
+ ret = fdetach(filename);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfattach\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<stropts.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fdim.3p b/man-pages-posix-2003/man3p/fdim.3p
new file mode 100644
index 0000000..ee82ce5
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fdim.3p
@@ -0,0 +1,116 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FDIM" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fdim
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fdim, fdimf, fdiml \- compute positive difference between two floating-point
+numbers
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double fdim(double\fP \fIx\fP\fB, double\fP \fIy\fP\fB);
+.br
+float fdimf(float\fP \fIx\fP\fB, float\fP \fIy\fP\fB);
+.br
+long double fdiml(long double\fP \fIx\fP\fB, long double\fP \fIy\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall determine the positive difference between their
+arguments. If \fIx\fP is greater than \fIy\fP, \fIx\fP-
+\fIy\fP is returned. If \fIx\fP is less than or equal to \fIy\fP,
++0 is returned.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the positive
+difference value.
+.LP
+If \fIx\fP- \fIy\fP is positive and overflows, a range error shall
+occur and \fIfdim\fP(), \fIfdimf\fP(), and \fIfdiml\fP()
+shall return the value of the macro HUGE_VAL, HUGE_VALF, and HUGE_VALL,
+respectively.
+.LP
+If \fIx\fP- \fIy\fP is positive and underflows, a range error may
+occur, and either ( \fIx\fP- \fIy\fP) (if representable),
+\ or 0.0 (if supported), or an implementation-defined value
+shall be returned.
+.LP
+If
+\fIx\fP or \fIy\fP is NaN, a NaN shall be returned.
+.SH ERRORS
+.LP
+The \fIfdim\fP() function shall fail if:
+.TP 7
+Range\ Error
+The result overflows.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the overflow floating-point exception shall be
+raised.
+.sp
+.LP
+The \fIfdim\fP() function may fail if:
+.TP 7
+Range\ Error
+The result underflows.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the underflow floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On implementations supporting IEEE\ Std\ 754-1985, \fIx\fP- \fIy\fP
+cannot underflow, and hence the 0.0 return value
+is shaded as an extension for implementations supporting the XSI extension
+rather than an MX extension.
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIfmax\fP(), \fIfmin\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment of Error Conditions
+for
+Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fdimf.3p b/man-pages-posix-2003/man3p/fdimf.3p
new file mode 100644
index 0000000..f4eb104
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fdimf.3p
@@ -0,0 +1 @@
+.so man3p/fdim.3p
diff --git a/man-pages-posix-2003/man3p/fdiml.3p b/man-pages-posix-2003/man3p/fdiml.3p
new file mode 100644
index 0000000..f4eb104
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fdiml.3p
@@ -0,0 +1 @@
+.so man3p/fdim.3p
diff --git a/man-pages-posix-2003/man3p/fdopen.3p b/man-pages-posix-2003/man3p/fdopen.3p
new file mode 100644
index 0000000..c5bc55c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fdopen.3p
@@ -0,0 +1,143 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FDOPEN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fdopen
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fdopen \- associate a stream with a file descriptor
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+FILE *fdopen(int\fP \fIfildes\fP\fB, const char *\fP\fImode\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfdopen\fP() function shall associate a stream with a file descriptor.
+.LP
+The \fImode\fP argument is a character string having one of the following
+values:
+.TP 7
+\fIr\fP\ or\ \fIrb\fP
+Open a file for reading.
+.TP 7
+\fIw\fP\ or\ \fIwb\fP
+Open a file for writing.
+.TP 7
+\fIa\fP\ or\ \fIab\fP
+Open a file for writing at end-of-file.
+.TP 7
+\fIr\fP+\ or\ \fIrb\fP+\ or\ \fIr\fP+\fIb\fP
+Open a file for update (reading and writing).
+.TP 7
+\fIw\fP+\ or\ \fIwb\fP+\ or\ \fIw\fP+\fIb\fP
+Open a file for update (reading and writing).
+.TP 7
+\fIa\fP+\ or\ \fIab\fP+\ or\ \fIa\fP+\fIb\fP
+Open a file for update (reading and writing) at end-of-file.
+.sp
+.LP
+The meaning of these flags is exactly as specified in \fIfopen\fP(),
+except that modes
+beginning with \fIw\fP shall not cause truncation of the file.
+.LP
+Additional values for the \fImode\fP argument may be supported by
+an implementation.
+.LP
+The application shall ensure that the mode of the stream as expressed
+by the \fImode\fP argument is allowed by the file access
+mode of the open file description to which \fIfildes\fP refers. The
+file position indicator associated with the new stream is set
+to the position indicated by the file offset associated with the file
+descriptor.
+.LP
+The error and end-of-file indicators for the stream shall be cleared.
+The \fIfdopen\fP() function may cause the \fIst_atime\fP
+field of the underlying file to be marked for update.
+.LP
+If \fIfildes\fP refers to a shared memory object, the result of the
+\fIfdopen\fP() function is unspecified.
+.LP
+If \fIfildes\fP refers to a typed memory object, the result of the
+\fIfdopen\fP() function is unspecified.
+.LP
+The \fIfdopen\fP() function shall preserve the offset maximum previously
+set for the open file description corresponding to
+\fIfildes\fP.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIfdopen\fP() shall return a pointer
+to a stream; otherwise, a null pointer shall be returned and
+\fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fIfdopen\fP() function may fail if:
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not a valid file descriptor.
+.TP 7
+.B EINVAL
+The \fImode\fP argument is not a valid mode.
+.TP 7
+.B EMFILE
+{FOPEN_MAX} streams are currently open in the calling process.
+.TP 7
+.B EMFILE
+{STREAM_MAX} streams are currently open in the calling process.
+.TP 7
+.B ENOMEM
+Insufficient space to allocate a buffer.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+File descriptors are obtained from calls like \fIopen\fP(), \fIdup\fP(),
+\fIcreat\fP(), or \fIpipe\fP(), which open files but do not return
+streams.
+.SH RATIONALE
+.LP
+The file descriptor may have been obtained from \fIopen\fP(), \fIcreat\fP(),
+\fIpipe\fP(), \fIdup\fP(), or \fIfcntl\fP(); inherited through \fIfork\fP()
+or \fIexec\fP; or perhaps obtained by
+implementation-defined means, such as the 4.3 BSD \fIsocket\fP() call.
+.LP
+The meanings of the \fImode\fP arguments of \fIfdopen\fP() and \fIfopen\fP()
+differ.
+With \fIfdopen\fP(), open for write (\fIw\fP or \fIw+\fP) does not
+truncate, and append (\fIa\fP or \fIa+\fP) cannot create
+for writing. The \fImode\fP argument formats that include \fIa b\fP
+are allowed for consistency with the ISO\ C standard
+function \fIfopen\fP(). The \fIb\fP has no effect on the resulting
+stream. Although not
+explicitly required by this volume of IEEE\ Std\ 1003.1-2001, a good
+implementation of append (\fIa\fP) mode would cause
+the O_APPEND flag to be set.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIInteraction of File Descriptors and Standard I/O Streams\fP, \fIfclose\fP(),
+\fIfopen\fP(), \fIopen\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/feclearexcept.3p b/man-pages-posix-2003/man3p/feclearexcept.3p
new file mode 100644
index 0000000..32fdb56
--- /dev/null
+++ b/man-pages-posix-2003/man3p/feclearexcept.3p
@@ -0,0 +1,60 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FECLEAREXCEPT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" feclearexcept
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+feclearexcept \- clear floating-point exception
+.SH SYNOPSIS
+.LP
+\fB#include <fenv.h>
+.br
+.sp
+int feclearexcept(int\fP \fIexcepts\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfeclearexcept\fP() function shall attempt to clear the supported
+floating-point exceptions represented by
+\fIexcepts\fP.
+.SH RETURN VALUE
+.LP
+If the argument is zero or if all the specified exceptions were successfully
+cleared, \fIfeclearexcept\fP() shall return zero.
+Otherwise, it shall return a non-zero value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfegetexceptflag\fP(), \fIferaiseexcept\fP(), \fIfesetexceptflag\fP(),
+\fIfetestexcept\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<fenv.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fegetenv.3p b/man-pages-posix-2003/man3p/fegetenv.3p
new file mode 100644
index 0000000..519e984
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fegetenv.3p
@@ -0,0 +1,72 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FEGETENV" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fegetenv
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fegetenv, fesetenv \- get and set current floating-point environment
+.SH SYNOPSIS
+.LP
+\fB#include <fenv.h>
+.br
+.sp
+int fegetenv(fenv_t *\fP\fIenvp\fP\fB);
+.br
+int fesetenv(const fenv_t *\fP\fIenvp\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfegetenv\fP() function shall attempt to store the current floating-point
+environment in the object pointed to by
+\fIenvp\fP.
+.LP
+The \fIfesetenv\fP() function shall attempt to establish the floating-point
+environment represented by the object pointed to by
+\fIenvp\fP. The argument \fIenvp\fP shall point to an object set by
+a call to \fIfegetenv\fP() or \fIfeholdexcept\fP(), or equal a floating-point
+environment macro. The \fIfesetenv\fP()
+function does not raise floating-point exceptions, but only installs
+the state of the floating-point status flags represented
+through its argument.
+.SH RETURN VALUE
+.LP
+If the representation was successfully stored, \fIfegetenv\fP() shall
+return zero. Otherwise, it shall return a non-zero value.
+If the environment was successfully established, \fIfesetenv\fP()
+shall return zero. Otherwise, it shall return a non-zero
+value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeholdexcept\fP(), \fIfeupdateenv\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<fenv.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fegetexceptflag.3p b/man-pages-posix-2003/man3p/fegetexceptflag.3p
new file mode 100644
index 0000000..392b8d7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fegetexceptflag.3p
@@ -0,0 +1,75 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FEGETEXCEPTFLAG" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fegetexceptflag
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fegetexceptflag, fesetexceptflag \- get and set floating-point status
+flags
+.SH SYNOPSIS
+.LP
+\fB#include <fenv.h>
+.br
+.sp
+int fegetexceptflag(fexcept_t *\fP\fIflagp\fP\fB, int\fP \fIexcepts\fP\fB);
+.br
+int fesetexceptflag(const fexcept_t *\fP\fIflagp\fP\fB, int\fP \fIexcepts\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfegetexceptflag\fP() function shall attempt to store an implementation-defined
+representation of the states of the
+floating-point status flags indicated by the argument \fIexcepts\fP
+in the object pointed to by the argument \fIflagp\fP.
+.LP
+The \fIfesetexceptflag\fP() function shall attempt to set the floating-point
+status flags indicated by the argument
+\fIexcepts\fP to the states stored in the object pointed to by \fIflagp\fP.
+The value pointed to by \fIflagp\fP shall have been
+set by a previous call to \fIfegetexceptflag\fP() whose second argument
+represented at least those floating-point exceptions
+represented by the argument \fIexcepts\fP. This function does not
+raise floating-point exceptions, but only sets the state of the
+flags.
+.SH RETURN VALUE
+.LP
+If the representation was successfully stored, \fIfegetexceptflag\fP()
+shall return zero. Otherwise, it shall return a non-zero
+value. If the \fIexcepts\fP argument is zero or if all the specified
+exceptions were successfully set, \fIfesetexceptflag\fP()
+shall return zero. Otherwise, it shall return a non-zero value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeclearexcept\fP(), \fIferaiseexcept\fP(), \fIfetestexcept\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<fenv.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fegetround.3p b/man-pages-posix-2003/man3p/fegetround.3p
new file mode 100644
index 0000000..9e1a9e2
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fegetround.3p
@@ -0,0 +1,91 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FEGETROUND" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fegetround
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fegetround, fesetround \- get and set current rounding direction
+.SH SYNOPSIS
+.LP
+\fB#include <fenv.h>
+.br
+.sp
+int fegetround(void);
+.br
+int fesetround(int\fP \fIround\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfegetround\fP() function shall get the current rounding direction.
+.LP
+The \fIfesetround\fP() function shall establish the rounding direction
+represented by its argument \fIround\fP. If the
+argument is not equal to the value of a rounding direction macro,
+the rounding direction is not changed.
+.SH RETURN VALUE
+.LP
+The \fIfegetround\fP() function shall return the value of the rounding
+direction macro representing the current rounding
+direction or a negative value if there is no such rounding direction
+macro or the current rounding direction is not
+determinable.
+.LP
+The \fIfesetround\fP() function shall return a zero value if and only
+if the requested rounding direction was established.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+The following example saves, sets, and restores the rounding direction,
+reporting an error and aborting if setting the rounding
+direction fails:
+.sp
+.RS
+.nf
+
+\fB#include <fenv.h>
+#include <assert.h>
+void f(int round_dir)
+{
+ #pragma STDC FENV_ACCESS ON
+ int save_round;
+ int setround_ok;
+ save_round = fegetround();
+ setround_ok = fesetround(round_dir);
+ assert(setround_ok == 0);
+ /* ... */
+ fesetround(save_round);
+ /* ... */
+}
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<fenv.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/feholdexcept.3p b/man-pages-posix-2003/man3p/feholdexcept.3p
new file mode 100644
index 0000000..a4ee486
--- /dev/null
+++ b/man-pages-posix-2003/man3p/feholdexcept.3p
@@ -0,0 +1,65 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FEHOLDEXCEPT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" feholdexcept
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+feholdexcept \- save current floating-point environment
+.SH SYNOPSIS
+.LP
+\fB#include <fenv.h>
+.br
+.sp
+int feholdexcept(fenv_t *\fP\fIenvp\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfeholdexcept\fP() function shall save the current floating-point
+environment in the object pointed to by \fIenvp\fP,
+clear the floating-point status flags, and then install a non-stop
+(continue on floating-point exceptions) mode, if available, for
+all floating-point exceptions.
+.SH RETURN VALUE
+.LP
+The \fIfeholdexcept\fP() function shall return zero if and only if
+non-stop floating-point exception handling was successfully
+installed.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIfeholdexcept\fP() function should be effective on typical IEC\ 60559:1989
+standard implementations which have the
+default non-stop mode and at least one other mode for trap handling
+or aborting. If the implementation provides only the non-stop
+mode, then installing the non-stop mode is trivial.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfegetenv\fP(), \fIfesetenv\fP(), \fIfeupdateenv\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<fenv.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/feof.3p b/man-pages-posix-2003/man3p/feof.3p
new file mode 100644
index 0000000..6176e88
--- /dev/null
+++ b/man-pages-posix-2003/man3p/feof.3p
@@ -0,0 +1,57 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FEOF" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" feof
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+feof \- test end-of-file indicator on a stream
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+int feof(FILE *\fP\fIstream\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfeof\fP() function shall test the end-of-file indicator for
+the stream pointed to by \fIstream\fP.
+.SH RETURN VALUE
+.LP
+The \fIfeof\fP() function shall return non-zero if and only if the
+end-of-file indicator is set for \fIstream\fP.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIclearerr\fP(), \fIferror\fP(), \fIfopen\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/feraiseexcept.3p b/man-pages-posix-2003/man3p/feraiseexcept.3p
new file mode 100644
index 0000000..20da1e5
--- /dev/null
+++ b/man-pages-posix-2003/man3p/feraiseexcept.3p
@@ -0,0 +1,71 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FERAISEEXCEPT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" feraiseexcept
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+feraiseexcept \- raise floating-point exception
+.SH SYNOPSIS
+.LP
+\fB#include <fenv.h>
+.br
+.sp
+int feraiseexcept(int\fP \fIexcepts\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIferaiseexcept\fP() function shall attempt to raise the supported
+floating-point exceptions represented by the argument
+\fIexcepts\fP. The order in which these floating-point exceptions
+are raised is unspecified. Whether the \fIferaiseexcept\fP()
+function additionally raises the inexact floating-point exception
+whenever it raises the overflow or underflow floating-point
+exception is implementation-defined.
+.SH RETURN VALUE
+.LP
+If the argument is zero or if all the specified exceptions were successfully
+raised, \fIferaiseexcept\fP() shall return zero.
+Otherwise, it shall return a non-zero value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The effect is intended to be similar to that of floating-point exceptions
+raised by arithmetic operations. Hence, enabled traps
+for floating-point exceptions raised by this function are taken.
+.SH RATIONALE
+.LP
+Raising overflow or underflow is allowed to also raise inexact because
+on some architectures the only practical way to raise an
+exception is to execute an instruction that has the exception as a
+side effect. The function is not restricted to accept only valid
+coincident expressions for atomic operations, so the function can
+be used to raise exceptions accrued over several operations.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeclearexcept\fP(), \fIfegetexceptflag\fP(), \fIfesetexceptflag\fP(),
+\fIfetestexcept\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<fenv.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/ferror.3p b/man-pages-posix-2003/man3p/ferror.3p
new file mode 100644
index 0000000..2c76045
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ferror.3p
@@ -0,0 +1,57 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FERROR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ferror
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ferror \- test error indicator on a stream
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+int ferror(FILE *\fP\fIstream\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIferror\fP() function shall test the error indicator for the
+stream pointed to by \fIstream\fP.
+.SH RETURN VALUE
+.LP
+The \fIferror\fP() function shall return non-zero if and only if the
+error indicator is set for \fIstream\fP.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIclearerr\fP(), \fIfeof\fP(), \fIfopen\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fesetenv.3p b/man-pages-posix-2003/man3p/fesetenv.3p
new file mode 100644
index 0000000..9ab2a31
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fesetenv.3p
@@ -0,0 +1 @@
+.so man3p/fegetenv.3p
diff --git a/man-pages-posix-2003/man3p/fesetexceptflag.3p b/man-pages-posix-2003/man3p/fesetexceptflag.3p
new file mode 100644
index 0000000..43b52da
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fesetexceptflag.3p
@@ -0,0 +1 @@
+.so man3p/fegetexceptflag.3p
diff --git a/man-pages-posix-2003/man3p/fesetround.3p b/man-pages-posix-2003/man3p/fesetround.3p
new file mode 100644
index 0000000..18c8739
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fesetround.3p
@@ -0,0 +1 @@
+.so man3p/fegetround.3p
diff --git a/man-pages-posix-2003/man3p/fetestexcept.3p b/man-pages-posix-2003/man3p/fetestexcept.3p
new file mode 100644
index 0000000..7d5370f
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fetestexcept.3p
@@ -0,0 +1,82 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FETESTEXCEPT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fetestexcept
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fetestexcept \- test floating-point exception flags
+.SH SYNOPSIS
+.LP
+\fB#include <fenv.h>
+.br
+.sp
+int fetestexcept(int\fP \fIexcepts\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfetestexcept\fP() function shall determine which of a specified
+subset of the floating-point exception flags are
+currently set. The \fIexcepts\fP argument specifies the floating-point
+status flags to be queried.
+.SH RETURN VALUE
+.LP
+The \fIfetestexcept\fP() function shall return the value of the bitwise-inclusive
+OR of the floating-point exception macros
+corresponding to the currently set floating-point exceptions included
+in \fIexcepts\fP.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+The following example calls function \fIf\fP() if an invalid exception
+is set, and then function \fIg\fP() if an overflow
+exception is set:
+.sp
+.RS
+.nf
+
+\fB#include <fenv.h>
+/* ... */
+{
+ #pragma STDC FENV_ACCESS ON
+ int set_excepts;
+ feclearexcept(FE_INVALID | FE_OVERFLOW);
+ // maybe raise exceptions
+ set_excepts = fetestexcept(FE_INVALID | FE_OVERFLOW);
+ if (set_excepts & FE_INVALID) f();
+ if (set_excepts & FE_OVERFLOW) g();
+ /* ... */
+}
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeclearexcept\fP(), \fIfegetexceptflag\fP(), \fIferaiseexcept\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<fenv.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/feupdateenv.3p b/man-pages-posix-2003/man3p/feupdateenv.3p
new file mode 100644
index 0000000..53c6ed0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/feupdateenv.3p
@@ -0,0 +1,85 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FEUPDATEENV" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" feupdateenv
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+feupdateenv \- update floating-point environment
+.SH SYNOPSIS
+.LP
+\fB#include <fenv.h>
+.br
+.sp
+int feupdateenv(const fenv_t *\fP\fIenvp\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfeupdateenv\fP() function shall attempt to save the currently
+raised floating-point exceptions in its automatic storage,
+attempt to install the floating-point environment represented by the
+object pointed to by \fIenvp\fP, and then attempt to raise
+the saved floating-point exceptions. The argument \fIenvp\fP shall
+point to an object set by a call to \fIfeholdexcept\fP() or \fIfegetenv\fP(),
+or equal
+a floating-point environment macro.
+.SH RETURN VALUE
+.LP
+The \fIfeupdateenv\fP() function shall return a zero value if and
+only if all the required actions were successfully carried
+out.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+The following example shows sample code to hide spurious underflow
+floating-point exceptions:
+.sp
+.RS
+.nf
+
+\fB#include <fenv.h>
+double f(double x)
+{
+ #pragma STDC FENV_ACCESS ON
+ double result;
+ fenv_t save_env;
+ feholdexcept(&save_env);
+ // compute result
+ if (/* test spurious underflow */)
+ feclearexcept(FE_UNDERFLOW);
+ feupdateenv(&save_env);
+ return result;
+}
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfegetenv\fP(), \fIfeholdexcept\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<fenv.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fflush.3p b/man-pages-posix-2003/man3p/fflush.3p
new file mode 100644
index 0000000..3daeb15
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fflush.3p
@@ -0,0 +1,155 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FFLUSH" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fflush
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fflush \- flush a stream
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+int fflush(FILE *\fP\fIstream\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+If \fIstream\fP points to an output stream or an update stream in
+which the most recent operation was not input,
+\fIfflush\fP() shall cause any unwritten data for that stream to be
+written to the file, and the
+\fIst_ctime\fP and \fIst_mtime\fP fields of the underlying file shall
+be marked for update.
+.LP
+If \fIstream\fP is a null pointer, \fIfflush\fP() shall perform this
+flushing action on all streams for which the behavior is
+defined above.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIfflush\fP() shall return 0; otherwise,
+it shall set the error indicator for the stream, return
+EOF,
+\ and set \fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fIfflush\fP() function shall fail if:
+.TP 7
+.B EAGAIN
+The O_NONBLOCK flag is set for the file descriptor underlying \fIstream\fP
+and the process would be delayed in the write
+operation.
+.TP 7
+.B EBADF
+The file descriptor underlying \fIstream\fP is not valid.
+.TP 7
+.B EFBIG
+An
+attempt was made to write a file that exceeds the maximum file size.
+.TP 7
+.B EFBIG
+An attempt was made to write a file that exceeds the process' file
+size limit.
+.TP 7
+.B EFBIG
+The file is a regular file and an attempt was made to write at or
+beyond the offset maximum associated with the corresponding
+stream.
+.TP 7
+.B EINTR
+The \fIfflush\fP() function was interrupted by a signal.
+.TP 7
+.B EIO
+The process is a member of a background process group attempting to
+write to its controlling terminal, TOSTOP is set, the process
+is neither ignoring nor blocking SIGTTOU, and the process group of
+the process is orphaned. This error may also be returned under
+implementation-defined conditions.
+.TP 7
+.B ENOSPC
+There was no free space remaining on the device containing the file.
+.TP 7
+.B EPIPE
+An
+attempt is made to write to a pipe or FIFO that is not open for reading
+by any process. A SIGPIPE signal shall also be sent to the
+thread.
+.sp
+.LP
+The \fIfflush\fP() function may fail if:
+.TP 7
+.B ENXIO
+A
+request was made of a nonexistent device, or the request was outside
+the capabilities of the device.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Sending Prompts to Standard Output
+.LP
+The following example uses \fIprintf\fP() calls to print a series
+of prompts for
+information the user must enter from standard input. The \fIfflush\fP()
+calls force the output to standard output. The
+\fIfflush\fP() function is used because standard output is usually
+buffered and the prompt may not immediately be printed on the
+output or terminal. The \fIgets\fP() calls read strings from standard
+input and place the
+results in variables, for use later in the program.
+.sp
+.RS
+.nf
+
+\fB#include <stdio.h>
+\&...
+char user[100];
+char oldpasswd[100];
+char newpasswd[100];
+\&...
+printf("User name: ");
+fflush(stdout);
+gets(user);
+.sp
+
+printf("Old password: ");
+fflush(stdout);
+gets(oldpasswd);
+.sp
+
+printf("New password: ");
+fflush(stdout);
+gets(newpasswd);
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+Data buffered by the system may make determining the validity of the
+position of the current file descriptor impractical. Thus,
+enforcing the repositioning of the file descriptor after \fIfflush\fP()
+on streams open for \fIread\fP() is not mandated by IEEE\ Std\ 1003.1-2001.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgetrlimit\fP(), \fIulimit\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/ffs.3p b/man-pages-posix-2003/man3p/ffs.3p
new file mode 100644
index 0000000..5e88710
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ffs.3p
@@ -0,0 +1,59 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FFS" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ffs
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ffs \- find first set bit
+.SH SYNOPSIS
+.LP
+\fB#include <strings.h>
+.br
+.sp
+int ffs(int\fP \fIi\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIffs\fP() function shall find the first bit set (beginning with
+the least significant bit) in \fIi\fP, and return the
+index of that bit. Bits are numbered starting at one (the least significant
+bit).
+.SH RETURN VALUE
+.LP
+The \fIffs\fP() function shall return the index of the first bit set.
+If \fIi\fP is 0, then \fIffs\fP() shall return 0.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<strings.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fgetc.3p b/man-pages-posix-2003/man3p/fgetc.3p
new file mode 100644
index 0000000..f0808b3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fgetc.3p
@@ -0,0 +1,125 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FGETC" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fgetc
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fgetc \- get a byte from a stream
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+int fgetc(FILE *\fP\fIstream\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+If the end-of-file indicator for the input stream pointed to by \fIstream\fP
+is not set and a next byte is present, the
+\fIfgetc\fP() function shall obtain the next byte as an \fBunsigned
+char\fP converted to an \fBint\fP, from the input stream
+pointed to by \fIstream\fP, and advance the associated file position
+indicator for the stream (if defined). Since \fIfgetc\fP()
+operates on bytes, reading a character consisting of multiple bytes
+(or "a multi-byte character") may require multiple calls to
+\fIfgetc\fP().
+.LP
+The
+\fIfgetc\fP() function may mark the \fIst_atime\fP field of the file
+associated with \fIstream\fP for update. The
+\fIst_atime\fP field shall be marked for update by the first successful
+execution of \fIfgetc\fP(), \fIfgets\fP(), \fIfgetwc\fP(), \fIfgetws\fP(),
+\fIfread\fP(), \fIfscanf\fP(), \fIgetc\fP(), \fIgetchar\fP(), \fIgets\fP(),
+or \fIscanf\fP() using \fIstream\fP that returns data not supplied
+by a prior call to \fIungetc\fP() or \fIungetwc\fP().
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIfgetc\fP() shall return the next byte
+from the input stream pointed to by \fIstream\fP. If the
+end-of-file indicator for the stream is set, or if the stream is at
+end-of-file, the end-of-file indicator for the stream shall be
+set and \fIfgetc\fP() shall return EOF. If a read error occurs, the
+error indicator for the stream shall be set, \fIfgetc\fP()
+shall return EOF, and shall set \fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fIfgetc\fP() function shall fail if data needs to be read and:
+.TP 7
+.B EAGAIN
+The O_NONBLOCK flag is set for the file descriptor underlying \fIstream\fP
+and the process would be delayed in the \fIfgetc\fP()
+operation.
+.TP 7
+.B EBADF
+The file descriptor underlying \fIstream\fP is not a valid file descriptor
+open for reading.
+.TP 7
+.B EINTR
+The read operation was terminated due to the receipt of a signal,
+and no data was transferred.
+.TP 7
+.B EIO
+A
+physical I/O error has occurred, or the process is in a background
+process group attempting to read from its controlling terminal,
+and either the process is ignoring or blocking the SIGTTIN signal
+or the process group is orphaned. This error may also be
+generated for implementation-defined reasons.
+.TP 7
+.B EOVERFLOW
+The file is a regular file and an attempt was made to read at or beyond
+the offset maximum associated with the corresponding
+stream.
+.sp
+.LP
+The \fIfgetc\fP() function may fail if:
+.TP 7
+.B ENOMEM
+Insufficient storage space is available.
+.TP 7
+.B ENXIO
+A
+request was made of a nonexistent device, or the request was outside
+the capabilities of the device.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+If the integer value returned by \fIfgetc\fP() is stored into a variable
+of type \fBchar\fP and then compared against the
+integer constant EOF, the comparison may never succeed, because sign-extension
+of a variable of type \fBchar\fP on widening to
+integer is implementation-defined.
+.LP
+The \fIferror\fP() or \fIfeof\fP() functions must
+be used to distinguish between an error condition and an end-of-file
+condition.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeof\fP(), \fIferror\fP(), \fIfopen\fP(), \fIgetchar\fP(),
+\fIgetc\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fgetpos.3p b/man-pages-posix-2003/man3p/fgetpos.3p
new file mode 100644
index 0000000..0edad48
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fgetpos.3p
@@ -0,0 +1,80 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FGETPOS" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fgetpos
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fgetpos \- get current file position information
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+int fgetpos(FILE *restrict\fP \fIstream\fP\fB, fpos_t *restrict\fP
+\fIpos\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfgetpos\fP() function shall store the current values of the
+parse state (if any) and file position indicator for the
+stream pointed to by \fIstream\fP in the object pointed to by \fIpos\fP.
+The value stored contains unspecified information usable
+by \fIfsetpos\fP() for repositioning the stream to its position at
+the time of the call to
+\fIfgetpos\fP().
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIfgetpos\fP() shall return 0; otherwise,
+it shall return a non-zero value and set \fIerrno\fP to
+indicate the error.
+.SH ERRORS
+.LP
+The \fIfgetpos\fP() function shall fail if:
+.TP 7
+.B EOVERFLOW
+The current value of the file position cannot be represented correctly
+in an object of type \fBfpos_t\fP.
+.sp
+.LP
+The \fIfgetpos\fP() function may fail if:
+.TP 7
+.B EBADF
+The file descriptor underlying \fIstream\fP is not valid.
+.TP 7
+.B ESPIPE
+The file descriptor underlying \fIstream\fP is associated with a pipe,
+FIFO, or socket.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfopen\fP(), \fIftell\fP(), \fIrewind\fP(),
+\fIungetc\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fgets.3p b/man-pages-posix-2003/man3p/fgets.3p
new file mode 100644
index 0000000..f9eda15
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fgets.3p
@@ -0,0 +1,92 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FGETS" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fgets
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fgets \- get a string from a stream
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+char *fgets(char *restrict\fP \fIs\fP\fB, int\fP \fIn\fP\fB, FILE
+*restrict\fP \fIstream\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfgets\fP() function shall read bytes from \fIstream\fP into
+the array pointed to by \fIs\fP, until \fIn\fP-1 bytes
+are read, or a <newline> is read and transferred to \fIs\fP, or an
+end-of-file condition is encountered. The string is then
+terminated with a null byte.
+.LP
+The
+\fIfgets\fP() function may mark the \fIst_atime\fP field of the file
+associated with \fIstream\fP for update. The
+\fIst_atime\fP field shall be marked for update by the first successful
+execution of \fIfgetc\fP(), \fIfgets\fP(), \fIfgetwc\fP(), \fIfgetws\fP(),
+\fIfread\fP(), \fIfscanf\fP(), \fIgetc\fP(), \fIgetchar\fP(), \fIgets\fP(),
+or \fIscanf\fP() using \fIstream\fP that returns data not supplied
+by a prior call to \fIungetc\fP() or \fIungetwc\fP().
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIfgets\fP() shall return \fIs\fP. If
+the stream is at end-of-file, the end-of-file indicator for
+the stream shall be set and \fIfgets\fP() shall return a null pointer.
+If a read error occurs, the error indicator for the stream
+shall be set, \fIfgets\fP() shall return a null pointer, and shall
+set \fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+Refer to \fIfgetc\fP().
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Reading Input
+.LP
+The following example uses \fIfgets\fP() to read each line of input.
+{LINE_MAX}, which defines the maximum size of the input
+line, is defined in the \fI<limits.h>\fP header.
+.sp
+.RS
+.nf
+
+\fB#include <stdio.h>
+\&...
+char line[LINE_MAX];
+\&...
+while (fgets(line, LINE_MAX, fp) != NULL) {
+\&...
+}
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfopen\fP(), \fIfread\fP(), \fIgets\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fgetwc.3p b/man-pages-posix-2003/man3p/fgetwc.3p
new file mode 100644
index 0000000..d9cbc63
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fgetwc.3p
@@ -0,0 +1,127 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FGETWC" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fgetwc
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fgetwc \- get a wide-character code from a stream
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+#include <wchar.h>
+.br
+.sp
+wint_t fgetwc(FILE *\fP\fIstream\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfgetwc\fP() function shall obtain the next character (if present)
+from the input stream pointed to by \fIstream\fP,
+convert that to the corresponding wide-character code, and advance
+the associated file position indicator for the stream (if
+defined).
+.LP
+If an error occurs, the resulting value of the file position indicator
+for the stream is unspecified.
+.LP
+The
+\fIfgetwc\fP() function may mark the \fIst_atime\fP field of the file
+associated with \fIstream\fP for update. The
+\fIst_atime\fP field shall be marked for update by the first successful
+execution of \fIfgetc\fP(), \fIfgets\fP(), \fIfgetwc\fP(), \fIfgetws\fP(),
+\fIfread\fP(), \fIfscanf\fP(), \fIgetc\fP(), \fIgetchar\fP(), \fIgets\fP(),
+or \fIscanf\fP() using \fIstream\fP that returns data not supplied
+by a prior call to \fIungetc\fP() or \fIungetwc\fP().
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIfgetwc\fP() function shall return
+the wide-character code of the character read from the
+input stream pointed to by \fIstream\fP converted to a type \fBwint_t\fP.
+If the stream is at end-of-file, the end-of-file
+indicator for the stream shall be set and \fIfgetwc\fP() shall return
+WEOF. If a read error occurs, the error indicator for the
+stream shall be set, \fIfgetwc\fP() shall return WEOF, and shall
+set \fIerrno\fP to indicate the error. If an encoding error occurs,
+the error indicator for the stream shall be
+set, \fIfgetwc\fP() shall return WEOF, and shall set \fIerrno\fP to
+indicate the error.
+.SH ERRORS
+.LP
+The \fIfgetwc\fP() function shall fail if data needs to be read and:
+.TP 7
+.B EAGAIN
+The O_NONBLOCK flag is set for the file descriptor underlying \fIstream\fP
+and the process would be delayed in the \fIfgetwc\fP()
+operation.
+.TP 7
+.B EBADF
+The file descriptor underlying \fIstream\fP is not a valid file descriptor
+open for reading.
+.TP 7
+.B EILSEQ
+The data obtained from the input stream does not form a valid character.
+.TP 7
+.B EINTR
+The read operation was terminated due to the receipt of a signal,
+and no data was transferred.
+.TP 7
+.B EIO
+A
+physical I/O error has occurred, or the process is in a background
+process group attempting to read from its controlling terminal,
+and either the process is ignoring or blocking the SIGTTIN signal
+or the process group is orphaned. This error may also be
+generated for implementation-defined reasons.
+.TP 7
+.B EOVERFLOW
+The file is a regular file and an attempt was made to read at or beyond
+the offset maximum associated with the corresponding
+stream.
+.sp
+.LP
+The \fIfgetwc\fP() function may fail if:
+.TP 7
+.B ENOMEM
+Insufficient storage space is available.
+.TP 7
+.B ENXIO
+A
+request was made of a nonexistent device, or the request was outside
+the capabilities of the device.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIferror\fP() or \fIfeof\fP() functions must
+be used to distinguish between an error condition and an end-of-file
+condition.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeof\fP(), \fIferror\fP(), \fIfopen\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<stdio.h>\fP,
+\fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fgetws.3p b/man-pages-posix-2003/man3p/fgetws.3p
new file mode 100644
index 0000000..9240da0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fgetws.3p
@@ -0,0 +1,82 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FGETWS" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fgetws
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fgetws \- get a wide-character string from a stream
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+#include <wchar.h>
+.br
+.sp
+wchar_t *fgetws(wchar_t *restrict\fP \fIws\fP\fB, int\fP \fIn\fP\fB,
+.br
+\ \ \ \ \ \ FILE *restrict\fP \fIstream\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfgetws\fP() function shall read characters from the \fIstream\fP,
+convert these to the corresponding wide-character
+codes, place them in the \fBwchar_t\fP array pointed to by \fIws\fP,
+until \fIn\fP-1 characters are read, or a <newline>
+is read, converted, and transferred to \fIws\fP, or an end-of-file
+condition is encountered. The wide-character string, \fIws\fP,
+shall then be terminated with a null wide-character code.
+.LP
+If an error occurs, the resulting value of the file position indicator
+for the stream is unspecified.
+.LP
+The
+\fIfgetws\fP() function may mark the \fIst_atime\fP field of the file
+associated with \fIstream\fP for update. The
+\fIst_atime\fP field shall be marked for update by the first successful
+execution of \fIfgetc\fP(), \fIfgets\fP(), \fIfgetwc\fP(), \fIfgetws\fP(),
+\fIfread\fP(), \fIfscanf\fP(), \fIgetc\fP(), \fIgetchar\fP(), \fIgets\fP(),
+or \fIscanf\fP() using \fIstream\fP that returns data not supplied
+by a prior call to \fIungetc\fP() or \fIungetwc\fP().
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIfgetws\fP() shall return \fIws\fP.
+If the stream is at end-of-file, the end-of-file indicator
+for the stream shall be set and \fIfgetws\fP() shall return a null
+pointer. If a read error occurs, the error indicator for the
+stream shall be set, \fIfgetws\fP() shall return a null pointer,
+\ and shall set \fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+Refer to \fIfgetwc\fP().
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfopen\fP(), \fIfread\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<stdio.h>\fP, \fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fileno.3p b/man-pages-posix-2003/man3p/fileno.3p
new file mode 100644
index 0000000..3ce37eb
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fileno.3p
@@ -0,0 +1,72 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FILENO" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fileno
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fileno \- map a stream pointer to a file descriptor
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+int fileno(FILE *\fP\fIstream\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfileno\fP() function shall return the integer file descriptor
+associated with the stream pointed to by
+\fIstream\fP.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIfileno\fP() shall return the integer
+value of the file descriptor associated with \fIstream\fP.
+Otherwise, the value -1 shall be returned and \fIerrno\fP set to indicate
+the error.
+.SH ERRORS
+.LP
+The \fIfileno\fP() function may fail if:
+.TP 7
+.B EBADF
+The \fIstream\fP argument is not a valid stream.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+Without some specification of which file descriptors are associated
+with these streams, it is impossible for an application to
+set up the streams for another application it starts with \fIfork\fP()
+and \fIexec\fP. In particular, it would not be possible to write a
+portable version of the \fIsh\fP command interpreter (although there
+may be other constraints that would prevent that
+portability).
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIInteraction of File Descriptors and Standard I/O Streams\fP, \fIfdopen\fP(),
+\fIfopen\fP(), \fIstdin\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/flockfile.3p b/man-pages-posix-2003/man3p/flockfile.3p
new file mode 100644
index 0000000..eee59ec
--- /dev/null
+++ b/man-pages-posix-2003/man3p/flockfile.3p
@@ -0,0 +1,129 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FLOCKFILE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" flockfile
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+flockfile, ftrylockfile, funlockfile \- stdio locking functions
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+void flockfile(FILE *\fP\fIfile\fP\fB);
+.br
+int ftrylockfile(FILE *\fP\fIfile\fP\fB);
+.br
+void funlockfile(FILE *\fP\fIfile\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall provide for explicit application-level locking
+of stdio ( \fBFILE *\fP) objects. These functions can be
+used by a thread to delineate a sequence of I/O statements that are
+executed as a unit.
+.LP
+The \fIflockfile\fP() function shall acquire for a thread ownership
+of a ( \fBFILE *\fP) object.
+.LP
+The \fIftrylockfile\fP() function shall acquire for a thread ownership
+of a ( \fBFILE *\fP) object if the object is available;
+\fIftrylockfile\fP() is a non-blocking version of \fIflockfile\fP().
+.LP
+The \fIfunlockfile\fP() function shall relinquish the ownership granted
+to the thread. The behavior is undefined if a thread
+other than the current owner calls the \fIfunlockfile\fP() function.
+.LP
+The functions shall behave as if there is a lock count associated
+with each ( \fBFILE *\fP) object. This count is implicitly
+initialized to zero when the ( \fBFILE *\fP) object is created. The
+( \fBFILE *\fP) object is unlocked when the count is zero.
+When the count is positive, a single thread owns the ( \fBFILE *\fP)
+object. When the \fIflockfile\fP() function is called, if
+the count is zero or if the count is positive and the caller owns
+the ( \fBFILE *\fP) object, the count shall be incremented.
+Otherwise, the calling thread shall be suspended, waiting for the
+count to return to zero. Each call to \fIfunlockfile\fP() shall
+decrement the count. This allows matching calls to \fIflockfile\fP()
+(or successful calls to \fIftrylockfile\fP()) and
+\fIfunlockfile\fP() to be nested.
+.LP
+All functions that reference ( \fBFILE *\fP) objects shall behave
+as if they use \fIflockfile\fP() and \fIfunlockfile\fP()
+internally to obtain ownership of these ( \fBFILE *\fP) objects.
+.SH RETURN VALUE
+.LP
+None for \fIflockfile\fP() and \fIfunlockfile\fP().
+.LP
+The \fIftrylockfile\fP() function shall return zero for success and
+non-zero to indicate that the lock cannot be acquired.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Applications using these functions may be subject to priority inversion,
+as discussed in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 3.285, Priority Inversion.
+.SH RATIONALE
+.LP
+The \fIflockfile\fP() and \fIfunlockfile\fP() functions provide an
+orthogonal mutual-exclusion lock for each \fBFILE\fP. The
+\fIftrylockfile\fP() function provides a non-blocking attempt to acquire
+a file lock, analogous to \fIpthread_mutex_trylock\fP().
+.LP
+These locks behave as if they are the same as those used internally
+by \fIstdio\fP for thread-safety. This both provides
+thread-safety of these functions without requiring a second level
+of internal locking and allows functions in \fIstdio\fP to be
+implemented in terms of other \fIstdio\fP functions.
+.LP
+Application writers and implementors should be aware that there are
+potential deadlock problems on \fBFILE\fP objects. For
+example, the line-buffered flushing semantics of \fIstdio\fP (requested
+via {_IOLBF}) require that certain input operations
+sometimes cause the buffered contents of implementation-defined line-buffered
+output streams to be flushed. If two threads each
+hold the lock on the other's \fBFILE\fP, deadlock ensues. This type
+of deadlock can be avoided by acquiring \fBFILE\fP locks in a
+consistent order. In particular, the line-buffered output stream deadlock
+can typically be avoided by acquiring locks on input
+streams before locks on output streams if a thread would be acquiring
+both.
+.LP
+In summary, threads sharing \fIstdio\fP streams with other threads
+can use \fIflockfile\fP() and \fIfunlockfile\fP() to cause
+sequences of I/O performed by a single thread to be kept bundled.
+The only case where the use of \fIflockfile\fP() and
+\fIfunlockfile\fP() is required is to provide a scope protecting uses
+of the
+\fI*_unlocked\fP() functions/macros. This moves the cost/performance
+tradeoff to the optimal
+point.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgetc_unlocked\fP(), \fIputc_unlocked\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/floor.3p b/man-pages-posix-2003/man3p/floor.3p
new file mode 100644
index 0000000..52dffcf
--- /dev/null
+++ b/man-pages-posix-2003/man3p/floor.3p
@@ -0,0 +1,102 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FLOOR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" floor
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+floor, floorf, floorl \- floor function
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double floor(double\fP \fIx\fP\fB);
+.br
+float floorf(float\fP \fIx\fP\fB);
+.br
+long double floorl(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the largest integral value not greater
+than \fIx\fP.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the largest
+integral value not greater than \fIx\fP, expressed as a
+\fBdouble\fP, \fBfloat\fP, or \fBlong double\fP, as appropriate for
+the return type of the function.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is \(+-0 or \(+-Inf, \fIx\fP shall be returned.
+.LP
+If the correct value would cause overflow, a range error shall occur
+and \fIfloor\fP(), \fIfloorf\fP(), and \fIfloorl\fP() shall
+return the value of the macro -HUGE_VAL, -HUGE_VALF, and -HUGE_VALL,
+respectively.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Range\ Error
+The result would cause an overflow.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the overflow floating-point exception shall be raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The integral value returned by these functions might not be expressible
+as an \fBint\fP or \fBlong\fP. The return value should
+be tested before assigning it to an integer type to avoid the undefined
+results of an integer overflow.
+.LP
+The \fIfloor\fP() function can only overflow when the floating-point
+representation has DBL_MANT_DIG > DBL_MAX_EXP.
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIceil\fP(), \fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIisnan\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment of Error Conditions
+for
+Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/floorf.3p b/man-pages-posix-2003/man3p/floorf.3p
new file mode 100644
index 0000000..ea5aa81
--- /dev/null
+++ b/man-pages-posix-2003/man3p/floorf.3p
@@ -0,0 +1 @@
+.so man3p/floor.3p
diff --git a/man-pages-posix-2003/man3p/floorl.3p b/man-pages-posix-2003/man3p/floorl.3p
new file mode 100644
index 0000000..ea5aa81
--- /dev/null
+++ b/man-pages-posix-2003/man3p/floorl.3p
@@ -0,0 +1 @@
+.so man3p/floor.3p
diff --git a/man-pages-posix-2003/man3p/fma.3p b/man-pages-posix-2003/man3p/fma.3p
new file mode 100644
index 0000000..f7065d9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fma.3p
@@ -0,0 +1,141 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FMA" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fma
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fma, fmaf, fmal \- floating-point multiply-add
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double fma(double\fP \fIx\fP\fB, double\fP \fIy\fP\fB, double\fP \fIz\fP\fB);
+.br
+float fmaf(float\fP \fIx\fP\fB, float\fP \fIy\fP\fB, float\fP \fIz\fP\fB);
+.br
+long double fmal(long double\fP \fIx\fP\fB, long double\fP \fIy\fP\fB,
+long double\fP \fIz\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute (\fIx\fP\ *\ \fIy\fP)\ +\ \fIz\fP, rounded
+as one ternary operation: they shall
+compute the value (as if) to infinite precision and round once to
+the result format, according to the rounding mode characterized
+by the value of FLT_ROUNDS.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return (\fIx\fP\ *\ \fIy\fP)\ +
+\fIz\fP, rounded as one ternary
+operation.
+.LP
+If
+\fIx\fP or \fIy\fP are NaN, a NaN shall be returned.
+.LP
+If \fIx\fP multiplied by \fIy\fP is an exact infinity and \fIz\fP
+is also an infinity but with the opposite sign, a domain
+error shall occur, and either a NaN (if supported), or an implementation-defined
+value shall be returned.
+.LP
+If one of \fIx\fP and \fIy\fP is infinite, the other is zero, and
+\fIz\fP is not a NaN, a domain error shall occur, and
+either a NaN (if supported), or an implementation-defined value shall
+be returned.
+.LP
+If one of \fIx\fP and \fIy\fP is infinite, the other is zero, and
+\fIz\fP is a NaN, a NaN shall be returned and a domain
+error may occur.
+.LP
+If \fIx\fP* \fIy\fP is not 0*Inf nor Inf*0 and \fIz\fP is a NaN, a
+NaN shall be returned.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Domain\ Error
+The value of \fIx\fP* \fIy\fP+ \fIz\fP is invalid, or the value \fIx\fP*
+\fIy\fP is invalid and \fIz\fP is not a NaN.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [EDOM]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the invalid floating-point exception shall be raised.
+.TP 7
+Range\ Error
+The result overflows.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the overflow floating-point exception shall be raised.
+.sp
+.LP
+These functions may fail if:
+.TP 7
+Domain\ Error
+The value \fIx\fP* \fIy\fP is invalid and \fIz\fP is a NaN.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [EDOM]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the invalid floating-point exception shall be raised.
+.TP 7
+Range\ Error
+The result underflows.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the underflow floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+In many cases, clever use of floating (\fIfused\fP) multiply-add leads
+to much improved code; but its unexpected use by the
+compiler can undermine carefully written code. The FP_CONTRACT macro
+can be used to disallow use of floating multiply-add; and the
+\fIfma\fP() function guarantees its use where desired. Many current
+machines provide hardware floating multiply-add instructions;
+software implementation can be used for others.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeclearexcept\fP(), \fIfetestexcept\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment
+of
+Error Conditions for Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fmaf.3p b/man-pages-posix-2003/man3p/fmaf.3p
new file mode 100644
index 0000000..b52cbea
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fmaf.3p
@@ -0,0 +1 @@
+.so man3p/fma.3p
diff --git a/man-pages-posix-2003/man3p/fmal.3p b/man-pages-posix-2003/man3p/fmal.3p
new file mode 100644
index 0000000..b52cbea
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fmal.3p
@@ -0,0 +1 @@
+.so man3p/fma.3p
diff --git a/man-pages-posix-2003/man3p/fmax.3p b/man-pages-posix-2003/man3p/fmax.3p
new file mode 100644
index 0000000..0a18019
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fmax.3p
@@ -0,0 +1,69 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FMAX" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fmax
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fmax, fmaxf, fmaxl \- determine maximum numeric value of two floating-point
+numbers
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double fmax(double\fP \fIx\fP\fB, double\fP \fIy\fP\fB);
+.br
+float fmaxf(float\fP \fIx\fP\fB, float\fP \fIy\fP\fB);
+.br
+long double fmaxl(long double\fP \fIx\fP\fB, long double\fP \fIy\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall determine the maximum numeric value of their
+arguments. NaN arguments shall be treated as missing data: if
+one argument is a NaN and the other numeric, then these functions
+shall choose the numeric value.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the maximum
+numeric value of their arguments.
+.LP
+If just one argument is a NaN, the other argument shall be returned.
+.LP
+If
+\fIx\fP and \fIy\fP are NaN, a NaN shall be returned.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfdim\fP(), \fIfmin\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fmaxf.3p b/man-pages-posix-2003/man3p/fmaxf.3p
new file mode 100644
index 0000000..9f3413d
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fmaxf.3p
@@ -0,0 +1 @@
+.so man3p/fmax.3p
diff --git a/man-pages-posix-2003/man3p/fmaxl.3p b/man-pages-posix-2003/man3p/fmaxl.3p
new file mode 100644
index 0000000..9f3413d
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fmaxl.3p
@@ -0,0 +1 @@
+.so man3p/fmax.3p
diff --git a/man-pages-posix-2003/man3p/fmin.3p b/man-pages-posix-2003/man3p/fmin.3p
new file mode 100644
index 0000000..44f8cec
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fmin.3p
@@ -0,0 +1,69 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FMIN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fmin
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fmin, fminf, fminl \- determine minimum numeric value of two floating-point
+numbers
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double fmin(double\fP \fIx\fP\fB, double\fP \fIy\fP\fB);
+.br
+float fminf(float\fP \fIx\fP\fB, float\fP \fIy\fP\fB);
+.br
+long double fminl(long double\fP \fIx\fP\fB, long double\fP \fIy\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall determine the minimum numeric value of their
+arguments. NaN arguments shall be treated as missing data: if
+one argument is a NaN and the other numeric, then these functions
+shall choose the numeric value.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the minimum
+numeric value of their arguments.
+.LP
+If just one argument is a NaN, the other argument shall be returned.
+.LP
+If
+\fIx\fP and \fIy\fP are NaN, a NaN shall be returned.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfdim\fP(), \fIfmax\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fminf.3p b/man-pages-posix-2003/man3p/fminf.3p
new file mode 100644
index 0000000..8a3d367
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fminf.3p
@@ -0,0 +1 @@
+.so man3p/fmin.3p
diff --git a/man-pages-posix-2003/man3p/fminl.3p b/man-pages-posix-2003/man3p/fminl.3p
new file mode 100644
index 0000000..8a3d367
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fminl.3p
@@ -0,0 +1 @@
+.so man3p/fmin.3p
diff --git a/man-pages-posix-2003/man3p/fmod.3p b/man-pages-posix-2003/man3p/fmod.3p
new file mode 100644
index 0000000..4a96df5
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fmod.3p
@@ -0,0 +1,119 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FMOD" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fmod
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fmod, fmodf, fmodl \- floating-point remainder value function
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double fmod(double\fP \fIx\fP\fB, double\fP \fIy\fP\fB);
+.br
+float fmodf(float\fP \fIx\fP\fB, float\fP \fIy\fP\fB);
+.br
+long double fmodl(long double\fP \fIx\fP\fB, long double\fP \fIy\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall return the floating-point remainder of the division
+of \fIx\fP by \fIy\fP.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+These functions shall return the value \fIx\fP- \fIi\fP* \fIy\fP,
+for some integer \fIi\fP such that, if \fIy\fP is
+non-zero, the result has the same sign as \fIx\fP and magnitude less
+than the magnitude of \fIy\fP.
+.LP
+If the correct value would cause underflow, and is not representable,
+a range error may occur, and either 0.0 (if
+supported), or an implementation-defined value shall be
+returned.
+.LP
+If
+\fIx\fP or \fIy\fP is NaN, a NaN shall be returned.
+.LP
+If \fIy\fP is zero, a domain error shall occur, and either a NaN (if
+supported), or an implementation-defined value shall be
+returned.
+.LP
+If \fIx\fP is infinite, a domain error shall occur, and either a NaN
+(if supported), or an implementation-defined value shall
+be returned.
+.LP
+If \fIx\fP is \(+-0 and \fIy\fP is not zero, \(+-0 shall be returned.
+.LP
+If \fIx\fP is not infinite and \fIy\fP is \(+-Inf, \fIx\fP shall be
+returned.
+.LP
+If the correct value would cause underflow, and is representable,
+a range error may occur and the correct value shall be
+returned.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Domain\ Error
+The \fIx\fP argument is infinite or \fIy\fP is zero.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [EDOM]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the invalid floating-point exception shall be raised.
+.sp
+.LP
+These functions may fail if:
+.TP 7
+Range\ Error
+The result underflows.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the underflow floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIisnan\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment
+of Error Conditions for Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fmodf.3p b/man-pages-posix-2003/man3p/fmodf.3p
new file mode 100644
index 0000000..212b52c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fmodf.3p
@@ -0,0 +1 @@
+.so man3p/fmod.3p
diff --git a/man-pages-posix-2003/man3p/fmodl.3p b/man-pages-posix-2003/man3p/fmodl.3p
new file mode 100644
index 0000000..212b52c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fmodl.3p
@@ -0,0 +1 @@
+.so man3p/fmod.3p
diff --git a/man-pages-posix-2003/man3p/fmtmsg.3p b/man-pages-posix-2003/man3p/fmtmsg.3p
new file mode 100644
index 0000000..4ad9d82
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fmtmsg.3p
@@ -0,0 +1,256 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FMTMSG" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fmtmsg
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fmtmsg \- display a message in the specified format on standard error
+and/or a system console
+.SH SYNOPSIS
+.LP
+\fB#include <fmtmsg.h>
+.br
+.sp
+int fmtmsg(long\fP \fIclassification\fP\fB, const char *\fP\fIlabel\fP\fB,
+int\fP \fIseverity\fP\fB,
+.br
+\ \ \ \ \ \ const char *\fP\fItext\fP\fB, const char *\fP\fIaction\fP\fB,
+const char
+*\fP\fItag\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfmtmsg\fP() function shall display messages in a specified
+format instead of the traditional \fIprintf\fP() function.
+.LP
+Based on a message's classification component, \fIfmtmsg\fP() shall
+write a formatted message either to standard error, to the
+console, or to both.
+.LP
+A formatted message consists of up to five components as defined below.
+The component \fIclassification\fP is not part of a
+message displayed to the user, but defines the source of the message
+and directs the display of the formatted message.
+.TP 7
+\fIclassification\fP
+Contains the sum of identifying values constructed from the constants
+defined below. Any one identifier from a subclass may be
+used in combination with a single identifier from a different subclass.
+Two or more identifiers from the same subclass should not
+be used together, with the exception of identifiers from the display
+subclass. (Both display subclass identifiers may be used so
+that messages can be displayed to both standard error and the system
+console.)
+.TP 7
+\fBMajor Classifications\fP
+.RS
+.sp
+Identifies the source of the condition. Identifiers are: MM_HARD (hardware),
+MM_SOFT (software), and MM_FIRM (firmware).
+.RE
+.TP 7
+\fBMessage Source Subclassifications\fP
+.RS
+.sp
+Identifies the type of software in which the problem is detected.
+Identifiers are: MM_APPL (application), MM_UTIL (utility), and
+MM_OPSYS (operating system).
+.RE
+.TP 7
+\fBDisplay Subclassifications\fP
+.RS
+.sp
+Indicates where the message is to be displayed. Identifiers are: MM_PRINT
+to display the message on the standard error stream,
+MM_CONSOLE to display the message on the system console. One or both
+identifiers may be used.
+.RE
+.TP 7
+\fBStatus Subclassifications\fP
+.RS
+.sp
+Indicates whether the application can recover from the condition.
+Identifiers are: MM_RECOVER (recoverable) and MM_NRECOV
+(non-recoverable).
+.RE
+.sp
+.LP
+An additional identifier, MM_NULLMC, indicates that no classification
+component is supplied for the message.
+.TP 7
+\fIlabel\fP
+Identifies the source of the message. The format is two fields separated
+by a colon. The first field is up to 10 bytes, the
+second is up to 14 bytes.
+.TP 7
+\fIseverity\fP
+Indicates the seriousness of the condition. Identifiers for the levels
+of \fIseverity\fP are:
+.TP 7
+MM_HALT
+.RS
+Indicates that the application has encountered a severe fault and
+is halting. Produces the string \fB"HALT"\fP .
+.RE
+.TP 7
+MM_ERROR
+.RS
+Indicates that the application has detected a fault. Produces the
+string \fB"ERROR"\fP .
+.RE
+.TP 7
+MM_WARNING
+.RS
+Indicates a condition that is out of the ordinary, that might be a
+problem, and should be watched. Produces the string
+\fB"WARNING"\fP .
+.RE
+.TP 7
+MM_INFO
+.RS
+Provides information about a condition that is not in error. Produces
+the string \fB"INFO"\fP .
+.RE
+.TP 7
+MM_NOSEV
+.RS
+Indicates that no severity level is supplied for the message.
+.RE
+.sp
+.TP 7
+\fItext\fP
+Describes the error condition that produced the message. The character
+string is not limited to a specific size. If the
+character string is empty, then the text produced is unspecified.
+.TP 7
+\fIaction\fP
+Describes the first step to be taken in the error-recovery process.
+The \fIfmtmsg\fP() function precedes the action string
+with the prefix: \fB"TO FIX:"\fP . The \fIaction\fP string is not
+limited to a specific size.
+.TP 7
+\fItag\fP
+An identifier that references on-line documentation for the message.
+Suggested usage is that \fItag\fP includes the
+\fIlabel\fP and a unique identifying number. A sample \fItag\fP is
+\fB"XSI:cat:146"\fP .
+.sp
+.LP
+The \fIMSGVERB\fP environment variable (for message verbosity) shall
+determine for \fIfmtmsg\fP() which message components it
+is to select when writing messages to standard error. The value of
+\fIMSGVERB\fP shall be a colon-separated list of optional
+keywords. Valid keywords are: \fIlabel\fP, \fIseverity\fP, \fItext\fP,
+\fIaction\fP, and \fItag\fP. If \fIMSGVERB\fP contains
+a keyword for a component and the component's value is not the component's
+null value, \fIfmtmsg\fP() shall include that component
+in the message when writing the message to standard error. If \fIMSGVERB\fP
+does not include a keyword for a message component,
+that component shall not be included in the display of the message.
+The keywords may appear in any order. If \fIMSGVERB\fP is not
+defined, if its value is the null string, if its value is not of the
+correct format, or if it contains keywords other than the
+valid ones listed above, \fIfmtmsg\fP() shall select all components.
+.LP
+\fIMSGVERB\fP shall determine which components are selected for display
+to standard error. All message components shall be
+included in console messages.
+.SH RETURN VALUE
+.LP
+The \fIfmtmsg\fP() function shall return one of the following values:
+.TP 7
+MM_OK
+The function succeeded.
+.TP 7
+MM_NOTOK
+The function failed completely.
+.TP 7
+MM_NOMSG
+The function was unable to generate a message on standard error, but
+otherwise succeeded.
+.TP 7
+MM_NOCON
+The function was unable to generate a console message, but otherwise
+succeeded.
+.sp
+.SH ERRORS
+.LP
+None.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.IP " 1." 4
+The following example of \fIfmtmsg\fP():
+.sp
+.RS
+.nf
+
+\fBfmtmsg(MM_PRINT, "XSI:cat", MM_ERROR, "illegal option",
+"refer to cat in user's reference manual", "XSI:cat:001")
+\fP
+.fi
+.RE
+.LP
+produces a complete message in the specified message format:
+.sp
+.RS
+.nf
+
+\fBXSI:cat: ERROR: illegal option
+TO FIX: refer to cat in user's reference manual XSI:cat:001
+\fP
+.fi
+.RE
+.LP
+.IP " 2." 4
+When the environment variable \fIMSGVERB\fP is set as follows:
+.sp
+.RS
+.nf
+
+\fBMSGVERB=severity:text:action
+\fP
+.fi
+.RE
+.LP
+and Example 1 is used, \fIfmtmsg\fP() produces:
+.sp
+.RS
+.nf
+
+\fBERROR: illegal option
+TO FIX: refer to cat in user's reference manual
+\fP
+.fi
+.RE
+.LP
+.SH APPLICATION USAGE
+.LP
+One or more message components may be systematically omitted from
+messages generated by an application by using the null value
+of the argument for that component.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIprintf\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<fmtmsg.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fnmatch.3p b/man-pages-posix-2003/man3p/fnmatch.3p
new file mode 100644
index 0000000..17a4b00
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fnmatch.3p
@@ -0,0 +1,127 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FNMATCH" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fnmatch
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fnmatch \- match a filename or a pathname
+.SH SYNOPSIS
+.LP
+\fB#include <fnmatch.h>
+.br
+.sp
+int fnmatch(const char *\fP\fIpattern\fP\fB, const char *\fP\fIstring\fP\fB,
+int\fP \fIflags\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfnmatch\fP() function shall match patterns as described in
+the Shell and Utilities volume of
+IEEE\ Std\ 1003.1-2001, Section 2.13.1, Patterns Matching a Single
+Character, and Section 2.13.2, Patterns Matching Multiple Characters.
+It checks the string specified by the \fIstring\fP
+argument to see if it matches the pattern specified by the \fIpattern\fP
+argument.
+.LP
+The \fIflags\fP argument shall modify the interpretation of \fIpattern\fP
+and \fIstring\fP. It is the bitwise-inclusive OR of
+zero or more of the flags defined in \fI<fnmatch.h>\fP. If the FNM_PATHNAME
+flag is
+set in \fIflags\fP, then a slash character ( \fB'/'\fP ) in \fIstring\fP
+shall be explicitly matched by a slash in
+\fIpattern\fP; it shall not be matched by either the asterisk or question-mark
+special characters, nor by a bracket expression. If
+the FNM_PATHNAME flag is not set, the slash character shall be treated
+as an ordinary character.
+.LP
+If FNM_NOESCAPE is not set in \fIflags\fP, a backslash character (
+\fB'\\'\fP ) in \fIpattern\fP followed by any other
+character shall match that second character in \fIstring\fP. In particular,
+\fB"\\\\"\fP shall match a backslash in
+\fIstring\fP. If FNM_NOESCAPE is set, a backslash character shall
+be treated as an ordinary character.
+.LP
+If FNM_PERIOD is set in \fIflags\fP, then a leading period ( \fB'.'\fP
+) in \fIstring\fP shall match a period in
+\fIpattern\fP; as described by rule 2 in the Shell and Utilities volume
+of IEEE\ Std\ 1003.1-2001, Section 2.13.3, Patterns Used for Filename
+Expansion where the location of
+"leading" is indicated by the value of FNM_PATHNAME:
+.IP " *" 3
+If FNM_PATHNAME is set, a period is "leading" if it is the first character
+in \fIstring\fP or if it immediately follows a
+slash.
+.LP
+.IP " *" 3
+If FNM_PATHNAME is not set, a period is "leading" only if it is the
+first character of \fIstring\fP.
+.LP
+.LP
+If FNM_PERIOD is not set, then no special restrictions are placed
+on matching a period.
+.SH RETURN VALUE
+.LP
+If \fIstring\fP matches the pattern specified by \fIpattern\fP, then
+\fIfnmatch\fP() shall return 0. If there is no match,
+\fIfnmatch\fP() shall return FNM_NOMATCH, which is defined in \fI<fnmatch.h>\fP.
+If an error occurs, \fIfnmatch\fP() shall return another non-zero
+value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIfnmatch\fP() function has two major uses. It could be used
+by an application or utility that needs to read a directory
+and apply a pattern against each entry. The \fIfind\fP utility is
+an example of this. It can
+also be used by the \fIpax\fP utility to process its \fIpattern\fP
+operands, or by
+applications that need to match strings in a similar manner.
+.LP
+The name \fIfnmatch\fP() is intended to imply \fIfilename\fP match,
+rather than \fIpathname\fP match. The default action of
+this function is to match filenames, rather than pathnames, since
+it gives no special significance to the slash character. With the
+FNM_PATHNAME flag, \fIfnmatch\fP() does match pathnames, but without
+tilde expansion, parameter expansion, or special treatment
+for a period at the beginning of a filename.
+.SH RATIONALE
+.LP
+This function replaced the REG_FILENAME flag of \fIregcomp\fP() in
+early proposals of
+this volume of IEEE\ Std\ 1003.1-2001. It provides virtually the same
+functionality as the \fIregcomp\fP() and \fIregexec\fP() functions
+using the
+REG_FILENAME and REG_FSLASH flags (the REG_FSLASH flag was proposed
+for \fIregcomp\fP(),
+and would have had the opposite effect from FNM_PATHNAME), but with
+a simpler function and less system overhead.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIglob\fP(), \fIwordexp\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<fnmatch.h>\fP, the Shell and Utilities
+volume
+of IEEE\ Std\ 1003.1-2001
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fopen.3p b/man-pages-posix-2003/man3p/fopen.3p
new file mode 100644
index 0000000..4caa07e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fopen.3p
@@ -0,0 +1,241 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FOPEN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fopen
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fopen \- open a stream
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+FILE *fopen(const char *restrict\fP \fIfilename\fP\fB, const char
+*restrict\fP \fImode\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfopen\fP() function shall open the file whose pathname is the
+string pointed to by \fIfilename\fP, and associates a
+stream with it.
+.LP
+The \fImode\fP argument points to a string. If the string is one of
+the following, the file shall be opened in the indicated
+mode. Otherwise, the behavior is undefined.
+.TP 7
+\fIr\fP\ or\ \fIrb\fP
+Open file for reading.
+.TP 7
+\fIw\fP\ or\ \fIwb\fP
+Truncate to zero length or create file for writing.
+.TP 7
+\fIa\fP\ or\ \fIab\fP
+Append; open or create file for writing at end-of-file.
+.TP 7
+\fIr+\fP\ or\ \fIrb+\fP\ or\ \fIr+b\fP
+Open file for update (reading and writing).
+.TP 7
+\fIw+\fP\ or\ \fIwb+\fP\ or\ \fIw+b\fP
+Truncate to zero length or create file for update.
+.TP 7
+\fIa+\fP\ or\ \fIab+\fP\ or\ \fIa+b\fP
+Append; open or create file for update, writing at end-of-file.
+.sp
+.LP
+The
+character \fB'b'\fP shall have no effect, but is allowed for ISO\ C
+standard conformance. Opening a file with read mode (\fIr\fP as the
+first character in the \fImode\fP argument) shall
+fail if the file does not exist or cannot be read.
+.LP
+Opening a file with append mode (\fIa\fP as the first character in
+the \fImode\fP argument) shall cause all subsequent writes
+to the file to be forced to the then current end-of-file, regardless
+of intervening calls to \fIfseek\fP().
+.LP
+When a file is opened with update mode ( \fB'+'\fP as the second or
+third character in the \fImode\fP argument), both input
+and output may be performed on the associated stream. However, the
+application shall ensure that output is not directly followed by
+input without an intervening call to \fIfflush\fP() or to a file positioning
+function ( \fIfseek\fP(), \fIfsetpos\fP(), or \fIrewind\fP()), and
+input is not directly followed by output without an intervening call
+to a file
+positioning function, unless the input operation encounters end-of-file.
+.LP
+When opened, a stream is fully buffered if and only if it can be determined
+not to refer to an interactive device. The error and
+end-of-file indicators for the stream shall be cleared.
+.LP
+If
+\fImode\fP is \fIw\fP, \fIwb\fP, \fIa\fP, \fIab\fP, \fIw\fP+, \fIwb\fP+,
+\fIw\fP+\fIb\fP, \fIa\fP+, \fIab\fP+, or
+\fIa\fP+\fIb\fP, and the file did not previously exist, upon successful
+completion, the \fIfopen\fP() function shall mark for
+update the \fIst_atime\fP, \fIst_ctime\fP, and \fIst_mtime\fP fields
+of the file and the \fIst_ctime\fP and \fIst_mtime\fP
+fields of the parent directory.
+.LP
+If \fImode\fP is \fIw\fP, \fIwb\fP, \fIw\fP+, \fIwb\fP+, or \fIw\fP+\fIb\fP,
+and the file did previously exist, upon
+successful completion, \fIfopen\fP() shall mark for update the \fIst_ctime\fP
+and \fIst_mtime\fP fields of the file. The
+\fIfopen\fP() function shall allocate a file descriptor as \fIopen\fP()
+does.
+.LP
+After a successful call to the \fIfopen\fP() function, the orientation
+of the stream shall be cleared, the encoding
+rule shall be cleared, and the associated \fBmbstate_t\fP object
+shall be set to describe an initial conversion state.
+.LP
+The
+largest value that can be represented correctly in an object of type
+\fBoff_t\fP shall be established as the offset maximum in the
+open file description.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIfopen\fP() shall return a pointer to
+the object controlling the stream. Otherwise, a null
+pointer shall be returned, and \fIerrno\fP shall be set to indicate
+the error.
+.SH ERRORS
+.LP
+The \fIfopen\fP() function shall fail if:
+.TP 7
+.B EACCES
+Search permission is denied on a component of the path prefix, or
+the file exists and the permissions specified by \fImode\fP are
+denied, or the file does not exist and write permission is denied
+for the parent directory of the file to be created.
+.TP 7
+.B EINTR
+A
+signal was caught during \fIfopen\fP().
+.TP 7
+.B EISDIR
+The named file is a directory and \fImode\fP requires write access.
+.TP 7
+.B ELOOP
+A
+loop exists in symbolic links encountered during resolution of the
+\fIpath\fP argument.
+.TP 7
+.B EMFILE
+{OPEN_MAX} file descriptors are currently open in the calling process.
+.TP 7
+.B ENAMETOOLONG
+.sp
+The length of the \fIfilename\fP argument exceeds {PATH_MAX} or a
+pathname component is longer than {NAME_MAX}.
+.TP 7
+.B ENFILE
+The maximum allowable number of files is currently open in the system.
+.TP 7
+.B ENOENT
+A
+component of \fIfilename\fP does not name an existing file or \fIfilename\fP
+is an empty string.
+.TP 7
+.B ENOSPC
+The directory or file system that would contain the new file cannot
+be expanded, the file does not exist, and the file was to be
+created.
+.TP 7
+.B ENOTDIR
+A
+component of the path prefix is not a directory.
+.TP 7
+.B ENXIO
+The named file is a character special or block special file, and the
+device associated with this special file does not exist.
+.TP 7
+.B EOVERFLOW
+The named file is a regular file and the size of the file cannot be
+represented correctly in an object of type \fBoff_t\fP.
+.TP 7
+.B EROFS
+The named file resides on a read-only file system and \fImode\fP requires
+write access.
+.sp
+.LP
+The \fIfopen\fP() function may fail if:
+.TP 7
+.B EINVAL
+The value of the \fImode\fP argument is not valid.
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the \fIpath\fP argument.
+.TP 7
+.B EMFILE
+{FOPEN_MAX} streams are currently open in the calling process.
+.TP 7
+.B EMFILE
+{STREAM_MAX} streams are currently open in the calling process.
+.TP 7
+.B ENAMETOOLONG
+.sp
+Pathname resolution of a symbolic link produced an intermediate result
+whose length exceeds {PATH_MAX}.
+.TP 7
+.B ENOMEM
+Insufficient storage space is available.
+.TP 7
+.B ETXTBSY
+The file is a pure procedure (shared text) file that is being executed
+and \fImode\fP requires write access.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Opening a File
+.LP
+The following example tries to open the file named \fBfile\fP for
+reading. The \fIfopen\fP() function returns a file pointer
+that is used in subsequent \fIfgets\fP() and \fIfclose\fP() calls.
+If the program cannot open the file, it just ignores it.
+.sp
+.RS
+.nf
+
+\fB#include <stdio.h>
+\&...
+FILE *fp;
+\&...
+void rgrep(const char *file)
+{
+\&...
+ if ((fp = fopen(file, "r")) == NULL)
+ return;
+\&...
+}
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfclose\fP(), \fIfdopen\fP(), \fIfreopen\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fork.3p b/man-pages-posix-2003/man3p/fork.3p
new file mode 100644
index 0000000..647099d
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fork.3p
@@ -0,0 +1,363 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FORK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fork
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fork \- create a new process
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+pid_t fork(void);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfork\fP() function shall create a new process. The new process
+(child process) shall be an exact copy of the calling
+process (parent process) except as detailed below:
+.IP " *" 3
+The child process shall have a unique process ID.
+.LP
+.IP " *" 3
+The child process ID also shall not match any active process group
+ID.
+.LP
+.IP " *" 3
+The child process shall have a different parent process ID, which
+shall be the process ID of the calling process.
+.LP
+.IP " *" 3
+The child process shall have its own copy of the parent's file descriptors.
+Each of the child's file descriptors shall refer to
+the same open file description with the corresponding file descriptor
+of the parent.
+.LP
+.IP " *" 3
+The child process shall have its own copy of the parent's open directory
+streams. Each open directory stream in the child
+process may share directory stream positioning with the corresponding
+directory stream of the parent.
+.LP
+.IP " *" 3
+The child process shall have its own copy of the parent's message
+catalog descriptors.
+.LP
+.IP " *" 3
+The child process' values of \fItms_utime\fP, \fItms_stime\fP, \fItms_cutime\fP,
+and \fItms_cstime\fP shall be set to 0.
+.LP
+.IP " *" 3
+The time left until an alarm clock signal shall be reset to zero,
+and the alarm, if any, shall be canceled; see \fIalarm\fP().
+.LP
+.IP " *" 3
+All \fIsemadj\fP values shall be cleared.
+.LP
+.IP " *" 3
+File locks set by the parent process shall not be inherited by the
+child process.
+.LP
+.IP " *" 3
+The set of signals pending for the child process shall be initialized
+to the empty set.
+.LP
+.IP " *" 3
+Interval timers shall be reset in the child process.
+.LP
+.IP " *" 3
+Any semaphores that are open in the parent process shall also be open
+in the child process.
+.LP
+.IP " *" 3
+The
+child process shall not inherit any address space memory locks established
+by the parent process via calls to \fImlockall\fP() or \fImlock\fP().
+.LP
+.IP " *" 3
+Memory mappings created in the parent shall be retained in the child
+process. MAP_PRIVATE mappings inherited from the parent shall
+also be MAP_PRIVATE mappings in the child, and any modifications to
+the data in these mappings made by the parent prior to calling
+\fIfork\fP() shall be visible to the child. Any modifications to the
+data in MAP_PRIVATE mappings made by the parent after
+\fIfork\fP() returns shall be visible only to the parent. Modifications
+to the data in MAP_PRIVATE mappings made by the child
+shall be visible only to the child.
+.LP
+.IP " *" 3
+For
+the SCHED_FIFO and SCHED_RR scheduling policies, the child process
+shall inherit the policy and priority settings of the parent
+process during a \fIfork\fP() function. For other scheduling policies,
+the policy and priority settings on \fIfork\fP() are
+implementation-defined.
+.LP
+.IP " *" 3
+Per-process timers created by the parent shall not be inherited by
+the child process.
+.LP
+.IP " *" 3
+The child process shall have its own copy of the message queue descriptors
+of the parent. Each of the message descriptors of the
+child shall refer to the same open message queue description as the
+corresponding message descriptor of the parent.
+.LP
+.IP " *" 3
+No asynchronous input or asynchronous output operations shall be inherited
+by the child process.
+.LP
+.IP " *" 3
+A process shall be created with a single thread. If a multi-threaded
+process calls \fIfork\fP(), the new process shall contain
+a replica of the calling thread and its entire address space, possibly
+including the states of mutexes and other resources.
+Consequently, to avoid errors, the child process may only execute
+async-signal-safe operations until such time as one of the \fIexec\fP
+functions is called. Fork handlers may be established by means
+of the \fIpthread_atfork\fP() function in order to maintain application
+invariants across
+\fIfork\fP() calls.
+.LP
+When the application calls \fIfork\fP() from a signal handler and
+any of the fork handlers registered by \fIpthread_atfork\fP() calls
+a function that is not asynch-signal-safe, the behavior is
+undefined.
+.LP
+.IP " *" 3
+If the Trace option and the Trace Inherit option are both supported:
+.LP
+If the calling process was being traced in a trace stream that had
+its inheritance policy set to POSIX_TRACE_INHERITED, the
+child process shall be traced into that trace stream, and the child
+process shall inherit the parent's mapping of trace event names
+to trace event type identifiers. If the trace stream in which the
+calling process was being traced had its inheritance policy set
+to POSIX_TRACE_CLOSE_FOR_CHILD, the child process shall not be traced
+into that trace stream. The inheritance policy is set by a
+call to the \fIposix_trace_attr_setinherited\fP() function.
+.LP
+.IP " *" 3
+If the Trace option is supported, but the Trace Inherit option is
+not supported:
+.LP
+The child process shall not be traced into any of the trace streams
+of its parent process.
+.LP
+.IP " *" 3
+If the Trace option is supported, the child process of a trace controller
+process shall not control the trace streams controlled by
+its parent process.
+.LP
+.IP " *" 3
+The initial value of the CPU-time clock of the child process shall
+be set to zero.
+.LP
+.IP " *" 3
+The initial value of the CPU-time clock of the single thread of the
+child process shall be set to zero.
+.LP
+.LP
+All other process characteristics defined by IEEE\ Std\ 1003.1-2001
+shall be the same in the parent and child processes.
+The inheritance of process characteristics not defined by IEEE\ Std\ 1003.1-2001
+is unspecified by
+IEEE\ Std\ 1003.1-2001.
+.LP
+After \fIfork\fP(), both the parent and the child processes shall
+be capable of executing independently before either one
+terminates.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIfork\fP() shall return 0 to the child
+process and shall return the process ID of the child
+process to the parent process. Both processes shall continue to execute
+from the \fIfork\fP() function. Otherwise, -1 shall be
+returned to the parent process, no child process shall be created,
+and \fIerrno\fP shall be set to indicate the error.
+.SH ERRORS
+.LP
+The \fIfork\fP() function shall fail if:
+.TP 7
+.B EAGAIN
+The system lacked the necessary resources to create another process,
+or the system-imposed limit on the total number of
+processes under execution system-wide or by a single user {CHILD_MAX}
+would be exceeded.
+.sp
+.LP
+The \fIfork\fP() function may fail if:
+.TP 7
+.B ENOMEM
+Insufficient storage space is available.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+Many historical implementations have timing windows where a signal
+sent to a process group (for example, an interactive SIGINT)
+just prior to or during execution of \fIfork\fP() is delivered to
+the parent following the \fIfork\fP() but not to the child
+because the \fIfork\fP() code clears the child's set of pending signals.
+This volume of IEEE\ Std\ 1003.1-2001 does not
+require, or even permit, this behavior. However, it is pragmatic to
+expect that problems of this nature may continue to exist in
+implementations that appear to conform to this volume of IEEE\ Std\ 1003.1-2001
+and pass available verification suites.
+This behavior is only a consequence of the implementation failing
+to make the interval between signal generation and delivery
+totally invisible. From the application's perspective, a \fIfork\fP()
+call should appear atomic. A signal that is generated prior
+to the \fIfork\fP() should be delivered prior to the \fIfork\fP().
+A signal sent to the process group after the \fIfork\fP()
+should be delivered to both parent and child. The implementation may
+actually initialize internal data structures corresponding to
+the child's set of pending signals to include signals sent to the
+process group during the \fIfork\fP(). Since the \fIfork\fP()
+call can be considered as atomic from the application's perspective,
+the set would be initialized as empty and such signals would
+have arrived after the \fIfork\fP(); see also \fI<signal.h>\fP.
+.LP
+One approach that has been suggested to address the problem of signal
+inheritance across \fIfork\fP() is to add an [EINTR]
+error, which would be returned when a signal is detected during the
+call. While this is preferable to losing signals, it was not
+considered an optimal solution. Although it is not recommended for
+this purpose, such an error would be an allowable extension for
+an implementation.
+.LP
+The [ENOMEM] error value is reserved for those implementations that
+detect and distinguish such a condition. This condition
+occurs when an implementation detects that there is not enough memory
+to create the process. This is intended to be returned when
+[EAGAIN] is inappropriate because there can never be enough memory
+(either primary or secondary storage) to perform the operation.
+Since \fIfork\fP() duplicates an existing process, this must be a
+condition where there is sufficient memory for one such process,
+but not for two. Many historical implementations actually return [ENOMEM]
+due to temporary lack of memory, a case that is not
+generally distinct from [EAGAIN] from the perspective of a conforming
+application.
+.LP
+Part of the reason for including the optional error [ENOMEM] is because
+the SVID specifies it and it should be reserved for the
+error condition specified there. The condition is not applicable on
+many implementations.
+.LP
+IEEE\ Std\ 1003.1-1988 neglected to require concurrent execution of
+the parent and child of \fIfork\fP(). A system that
+single-threads processes was clearly not intended and is considered
+an unacceptable "toy implementation" of this volume of
+IEEE\ Std\ 1003.1-2001. The only objection anticipated to the phrase
+"executing independently" is testability, but this
+assertion should be testable. Such tests require that both the parent
+and child can block on a detectable action of the other, such
+as a write to a pipe or a signal. An interactive exchange of such
+actions should be possible for the system to conform to the
+intent of this volume of IEEE\ Std\ 1003.1-2001.
+.LP
+The [EAGAIN] error exists to warn applications that such a condition
+might occur. Whether it occurs or not is not in any
+practical sense under the control of the application because the condition
+is usually a consequence of the user's use of the
+system, not of the application's code. Thus, no application can or
+should rely upon its occurrence under any circumstances, nor
+should the exact semantics of what concept of "user" is used be of
+concern to the application writer. Validation writers should
+be cognizant of this limitation.
+.LP
+There are two reasons why POSIX programmers call \fIfork\fP(). One
+reason is to create a new thread of control within the same
+program (which was originally only possible in POSIX by creating a
+new process); the other is to create a new process running a
+different program. In the latter case, the call to \fIfork\fP() is
+soon followed by a call to one of the \fIexec\fP functions.
+.LP
+The general problem with making \fIfork\fP() work in a multi-threaded
+world is what to do with all of the threads. There are
+two alternatives. One is to copy all of the threads into the new process.
+This causes the programmer or implementation to deal with
+threads that are suspended on system calls or that might be about
+to execute system calls that should not be executed in the new
+process. The other alternative is to copy only the thread that calls
+\fIfork\fP(). This creates the difficulty that the state of
+process-local resources is usually held in process memory. If a thread
+that is not calling \fIfork\fP() holds a resource, that
+resource is never released in the child process because the thread
+whose job it is to release the resource does not exist in the
+child process.
+.LP
+When a programmer is writing a multi-threaded program, the first described
+use of \fIfork\fP(), creating new threads in the
+same program, is provided by the \fIpthread_create\fP() function.
+The \fIfork\fP()
+function is thus used only to run new programs, and the effects of
+calling functions that require certain resources between the
+call to \fIfork\fP() and the call to an \fIexec\fP function are undefined.
+.LP
+The addition of the \fIforkall\fP() function to the standard was considered
+and rejected. The \fIforkall\fP() function lets
+all the threads in the parent be duplicated in the child. This essentially
+duplicates the state of the parent in the child. This
+allows threads in the child to continue processing and allows locks
+and the state to be preserved without explicit \fIpthread_atfork\fP()
+code. The calling process has to ensure that the threads processing
+state that is shared between the parent and child (that is, file descriptors
+or MAP_SHARED memory) behaves properly after
+\fIforkall\fP(). For example, if a thread is reading a file descriptor
+in the parent when \fIforkall\fP() is called, then two
+threads (one in the parent and one in the child) are reading the file
+descriptor after the \fIforkall\fP(). If this is not desired
+behavior, the parent process has to synchronize with such threads
+before calling \fIforkall\fP().
+.LP
+While the \fIfork\fP() function is async-signal-safe, there is no
+way for an implementation to determine whether the fork
+handlers established by \fIpthread_atfork\fP() are async-signal-safe.
+The fork
+handlers may attempt to execute portions of the implementation that
+are not async-signal-safe, such as those that are protected by
+mutexes, leading to a deadlock condition. It is therefore undefined
+for the fork handlers to execute functions that are not
+async-signal-safe when \fIfork\fP() is called from a signal handler.
+.LP
+When \fIforkall\fP() is called, threads, other than the calling thread,
+that are in functions that can return with an [EINTR]
+error may have those functions return [EINTR] if the implementation
+cannot ensure that the function behaves correctly in the parent
+and child. In particular, \fIpthread_cond_wait\fP() and \fIpthread_cond_timedwait\fP()
+need to return in order to ensure that the condition
+has not changed. These functions can be awakened by a spurious condition
+wakeup rather than returning [EINTR].
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIalarm\fP(), \fIexec\fP(), \fIfcntl\fP(), \fIposix_trace_attr_getinherited\fP(),
+\fIposix_trace_trid_eventid_open\fP(), \fIpthread_atfork\fP(),
+\fIsemop\fP(), \fIsignal\fP(), \fItimes\fP(), the Base Definitions
+volume of
+IEEE\ Std\ 1003.1-2001, \fI<sys/types.h>\fP, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fpathconf.3p b/man-pages-posix-2003/man3p/fpathconf.3p
new file mode 100644
index 0000000..7b08350
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fpathconf.3p
@@ -0,0 +1 @@
+.so man3p/pathconf.3p
diff --git a/man-pages-posix-2003/man3p/fpclassify.3p b/man-pages-posix-2003/man3p/fpclassify.3p
new file mode 100644
index 0000000..e9d275f
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fpclassify.3p
@@ -0,0 +1,62 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FPCLASSIFY" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fpclassify
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fpclassify \- classify real floating type
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+int fpclassify(real-floating\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfpclassify\fP() macro shall classify its argument value as
+NaN, infinite, normal, subnormal, zero, or into another
+implementation-defined category. First, an argument represented in
+a format wider than its semantic type is converted to its
+semantic type. Then classification is based on the type of the argument.
+.SH RETURN VALUE
+.LP
+The \fIfpclassify\fP() macro shall return the value of the number
+classification macro appropriate to the value of its
+argument.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIisfinite\fP(), \fIisinf\fP(), \fIisnan\fP(), \fIisnormal\fP(),
+\fIsignbit\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fprintf.3p b/man-pages-posix-2003/man3p/fprintf.3p
new file mode 100644
index 0000000..b1ca735
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fprintf.3p
@@ -0,0 +1 @@
+.so man3p/printf.3p
diff --git a/man-pages-posix-2003/man3p/fputc.3p b/man-pages-posix-2003/man3p/fputc.3p
new file mode 100644
index 0000000..b0bb40e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fputc.3p
@@ -0,0 +1,131 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FPUTC" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fputc
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fputc \- put a byte on a stream
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+int fputc(int\fP \fIc\fP\fB, FILE *\fP\fIstream\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfputc\fP() function shall write the byte specified by \fIc\fP
+(converted to an \fBunsigned char\fP) to the output
+stream pointed to by \fIstream\fP, at the position indicated by the
+associated file-position indicator for the stream (if
+defined), and shall advance the indicator appropriately. If the file
+cannot support positioning requests, or if the stream was
+opened with append mode, the byte shall be appended to the output
+stream.
+.LP
+The
+\fIst_ctime\fP and \fIst_mtime\fP fields of the file shall be marked
+for update between the successful execution of
+\fIfputc\fP() and the next successful completion of a call to \fIfflush\fP()
+or \fIfclose\fP() on the same stream or a call to \fIexit\fP()
+or \fIabort\fP().
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIfputc\fP() shall return the value it
+has written. Otherwise, it shall return EOF, the error
+indicator for the stream shall be set, and \fIerrno\fP shall be
+set to indicate the error.
+.SH ERRORS
+.LP
+The \fIfputc\fP() function shall fail if either the \fIstream\fP is
+unbuffered or the \fIstream\fP's buffer needs to be
+flushed, and:
+.TP 7
+.B EAGAIN
+The O_NONBLOCK flag is set for the file descriptor underlying \fIstream\fP
+and the process would be delayed in the write
+operation.
+.TP 7
+.B EBADF
+The file descriptor underlying \fIstream\fP is not a valid file descriptor
+open for writing.
+.TP 7
+.B EFBIG
+An
+attempt was made to write to a file that exceeds the maximum file
+size.
+.TP 7
+.B EFBIG
+An attempt was made to write to a file that exceeds the process' file
+size limit.
+.TP 7
+.B EFBIG
+The file is a regular file and an attempt was made to write at or
+beyond the offset maximum.
+.TP 7
+.B EINTR
+The write operation was terminated due to the receipt of a signal,
+and no data was transferred.
+.TP 7
+.B EIO
+A
+physical I/O error has occurred, or the process is a member of a background
+process group attempting to write to its controlling
+terminal, TOSTOP is set, the process is neither ignoring nor blocking
+SIGTTOU, and the process group of the process is orphaned.
+This error may also be returned under implementation-defined conditions.
+.TP 7
+.B ENOSPC
+There was no free space remaining on the device containing the file.
+.TP 7
+.B EPIPE
+An
+attempt is made to write to a pipe or FIFO that is not open for reading
+by any process. A SIGPIPE signal shall also be sent to the
+thread.
+.sp
+.LP
+The \fIfputc\fP() function may fail if:
+.TP 7
+.B ENOMEM
+Insufficient storage space is available.
+.TP 7
+.B ENXIO
+A
+request was made of a nonexistent device, or the request was outside
+the capabilities of the device.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIferror\fP(), \fIfopen\fP(), \fIgetrlimit\fP(), \fIputc\fP(),
+\fIputs\fP(), \fIsetbuf\fP(), \fIulimit\fP(), the Base Definitions
+volume of
+IEEE\ Std\ 1003.1-2001, \fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fputs.3p b/man-pages-posix-2003/man3p/fputs.3p
new file mode 100644
index 0000000..083279e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fputs.3p
@@ -0,0 +1,91 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FPUTS" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fputs
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fputs \- put a string on a stream
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+int fputs(const char *restrict\fP \fIs\fP\fB, FILE *restrict\fP \fIstream\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfputs\fP() function shall write the null-terminated string
+pointed to by \fIs\fP to the stream pointed to by
+\fIstream\fP. The terminating null byte shall not be written.
+.LP
+The
+\fIst_ctime\fP and \fIst_mtime\fP fields of the file shall be marked
+for update between the successful execution of
+\fIfputs\fP() and the next successful completion of a call to \fIfflush\fP()
+or \fIfclose\fP() on the same stream or a call to \fIexit\fP()
+or \fIabort\fP().
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIfputs\fP() shall return a non-negative
+number. Otherwise, it shall return EOF, set an error
+indicator for the stream, and set \fIerrno\fP to indicate the
+error.
+.SH ERRORS
+.LP
+Refer to \fIfputc\fP().
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Printing to Standard Output
+.LP
+The following example gets the current time, converts it to a string
+using \fIlocaltime\fP() and \fIasctime\fP(), and prints it to
+standard output using \fIfputs\fP(). It then prints the number of
+minutes to an event for which it is waiting.
+.sp
+.RS
+.nf
+
+\fB#include <time.h>
+#include <stdio.h>
+\&...
+time_t now;
+int minutes_to_event;
+\&...
+time(&now);
+printf("The time is ");
+fputs(asctime(localtime(&now)), stdout);
+printf("There are still %d minutes to the event.\\n",
+ minutes_to_event);
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The \fIputs\fP() function appends a <newline> while \fIfputs\fP()
+does not.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfopen\fP(), \fIputc\fP(), \fIputs\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fputwc.3p b/man-pages-posix-2003/man3p/fputwc.3p
new file mode 100644
index 0000000..10ad16b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fputwc.3p
@@ -0,0 +1,133 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FPUTWC" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fputwc
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fputwc \- put a wide-character code on a stream
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+#include <wchar.h>
+.br
+.sp
+wint_t fputwc(wchar_t\fP \fIwc\fP\fB, FILE *\fP\fIstream\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfputwc\fP() function shall write the character corresponding
+to the wide-character code \fIwc\fP to the output stream
+pointed to by \fIstream\fP, at the position indicated by the associated
+file-position indicator for the stream (if defined), and
+advances the indicator appropriately. If the file cannot support positioning
+requests, or if the stream was opened with append
+mode, the character is appended to the output stream. If an error
+occurs while writing the character, the shift state of the output
+file is left in an undefined state.
+.LP
+The
+\fIst_ctime\fP and \fIst_mtime\fP fields of the file shall be marked
+for update between the successful execution of
+\fIfputwc\fP() and the next successful completion of a call to \fIfflush\fP()
+or \fIfclose\fP() on the same stream or a call to \fIexit\fP()
+or \fIabort\fP().
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIfputwc\fP() shall return \fIwc\fP.
+Otherwise, it shall return WEOF, the error indicator for the
+stream shall be set, and \fIerrno\fP shall be set to indicate
+the error.
+.SH ERRORS
+.LP
+The \fIfputwc\fP() function shall fail if either the stream is unbuffered
+or data in the \fIstream\fP's buffer needs to be
+written, and:
+.TP 7
+.B EAGAIN
+The O_NONBLOCK flag is set for the file descriptor underlying \fIstream\fP
+and the process would be delayed in the write
+operation.
+.TP 7
+.B EBADF
+The file descriptor underlying \fIstream\fP is not a valid file descriptor
+open for writing.
+.TP 7
+.B EFBIG
+An
+attempt was made to write to a file that exceeds the maximum file
+size or the process' file size limit.
+.TP 7
+.B EFBIG
+The file is a regular file and an attempt was made to write at or
+beyond the offset maximum associated with the corresponding
+stream.
+.TP 7
+.B EILSEQ
+The wide-character code \fIwc\fP does not correspond to a valid character.
+.TP 7
+.B EINTR
+The write operation was terminated due to the receipt of a signal,
+and no data was transferred.
+.TP 7
+.B EIO
+A
+physical I/O error has occurred, or the process is a member of a background
+process group attempting to write to its controlling
+terminal, TOSTOP is set, the process is neither ignoring nor blocking
+SIGTTOU, and the process group of the process is orphaned.
+This error may also be returned under implementation-defined conditions.
+.TP 7
+.B ENOSPC
+There was no free space remaining on the device containing the file.
+.TP 7
+.B EPIPE
+An
+attempt is made to write to a pipe or FIFO that is not open for reading
+by any process. A SIGPIPE signal shall also be sent to the
+thread.
+.sp
+.LP
+The \fIfputwc\fP() function may fail if:
+.TP 7
+.B ENOMEM
+Insufficient storage space is available.
+.TP 7
+.B ENXIO
+A
+request was made of a nonexistent device, or the request was outside
+the capabilities of the device.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIferror\fP(), \fIfopen\fP(), \fIsetbuf\fP(),
+\fIulimit\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<stdio.h>\fP, \fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fputws.3p b/man-pages-posix-2003/man3p/fputws.3p
new file mode 100644
index 0000000..21f9312
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fputws.3p
@@ -0,0 +1,72 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FPUTWS" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fputws
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fputws \- put a wide-character string on a stream
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+#include <wchar.h>
+.br
+.sp
+int fputws(const wchar_t *restrict\fP \fIws\fP\fB, FILE *restrict\fP
+\fIstream\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfputws\fP() function shall write a character string corresponding
+to the (null-terminated) wide-character string pointed
+to by \fIws\fP to the stream pointed to by \fIstream\fP. No character
+corresponding to the terminating null wide-character code
+shall be written.
+.LP
+The
+\fIst_ctime\fP and \fIst_mtime\fP fields of the file shall be marked
+for update between the successful execution of
+\fIfputws\fP() and the next successful completion of a call to \fIfflush\fP()
+or \fIfclose\fP() on the same stream or a call to \fIexit\fP()
+or \fIabort\fP().
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIfputws\fP() shall return a non-negative
+number. Otherwise, it shall return -1, set an error
+indicator for the stream, and set \fIerrno\fP to indicate the
+error.
+.SH ERRORS
+.LP
+Refer to \fIfputwc\fP().
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIfputws\fP() function does not append a <newline>.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfopen\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<stdio.h>\fP, \fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fread.3p b/man-pages-posix-2003/man3p/fread.3p
new file mode 100644
index 0000000..2b1ae6c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fread.3p
@@ -0,0 +1,109 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FREAD" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fread
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fread \- binary input
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+size_t fread(void *restrict\fP \fIptr\fP\fB, size_t\fP \fIsize\fP\fB,
+size_t\fP \fInitems\fP\fB,
+.br
+\ \ \ \ \ \ FILE *restrict\fP \fIstream\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfread\fP() function shall read into the array pointed to by
+\fIptr\fP up to \fInitems\fP elements whose size is
+specified by \fIsize\fP in bytes, from the stream pointed to by \fIstream\fP.
+For each object, \fIsize\fP calls shall be made to
+the \fIfgetc\fP() function and the results stored, in the order read,
+in an array of
+\fBunsigned char\fP exactly overlaying the object. The file position
+indicator for the stream (if defined) shall be advanced by
+the number of bytes successfully read. If an error occurs, the resulting
+value of the file position indicator for the stream is
+unspecified. If a partial element is read, its value is unspecified.
+.LP
+The
+\fIfread\fP() function may mark the \fIst_atime\fP field of the file
+associated with \fIstream\fP for update. The
+\fIst_atime\fP field shall be marked for update by the first successful
+execution of \fIfgetc\fP(), \fIfgets\fP(), \fIfgetwc\fP(), \fIfgetws\fP(),
+\fIfread\fP(), \fIfscanf\fP(), \fIgetc\fP(), \fIgetchar\fP(), \fIgets\fP(),
+or \fIscanf\fP() using \fIstream\fP that returns data not supplied
+by a prior call to \fIungetc\fP() or \fIungetwc\fP().
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIfread\fP() shall return the number
+of elements successfully read which is less than
+\fInitems\fP only if a read error or end-of-file is encountered. If
+\fIsize\fP or \fInitems\fP is 0, \fIfread\fP() shall return
+0 and the contents of the array and the state of the stream remain
+unchanged. Otherwise, if a read error occurs, the error
+indicator for the stream shall be set, and \fIerrno\fP shall be
+set to indicate the error.
+.SH ERRORS
+.LP
+Refer to \fIfgetc\fP().
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Reading from a Stream
+.LP
+The following example reads a single element from the \fIfp\fP stream
+into the array pointed to by \fIbuf\fP.
+.sp
+.RS
+.nf
+
+\fB#include <stdio.h>
+\&...
+size_t bytes_read;
+char buf[100];
+FILE *fp;
+\&...
+bytes_read = fread(buf, sizeof(buf), 1, fp);
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The \fIferror\fP() or \fIfeof\fP() functions must
+be used to distinguish between an error condition and an end-of-file
+condition.
+.LP
+Because of possible differences in element length and byte ordering,
+files written using \fIfwrite\fP() are application-dependent, and
+possibly cannot be read using \fIfread\fP() by a
+different application or by the same application on a different processor.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeof\fP(), \fIferror\fP(), \fIfgetc\fP(), \fIfopen\fP(), \fIgetc\fP(),
+\fIgets\fP(), \fIscanf\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/free.3p b/man-pages-posix-2003/man3p/free.3p
new file mode 100644
index 0000000..4323793
--- /dev/null
+++ b/man-pages-posix-2003/man3p/free.3p
@@ -0,0 +1,66 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FREE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" free
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+free \- free allocated memory
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+void free(void *\fP\fIptr\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfree\fP() function shall cause the space pointed to by \fIptr\fP
+to be deallocated; that is, made available for further
+allocation. If \fIptr\fP is a null pointer, no action shall occur.
+Otherwise, if the argument does not match a pointer earlier
+returned by the \fIcalloc\fP(), \fImalloc\fP(),
+\fIposix_memalign\fP(), \fIrealloc\fP(), or \fIstrdup\fP() function,
+or if the space has been deallocated by a call to \fIfree\fP() or
+\fIrealloc\fP(), the behavior is undefined.
+.LP
+Any use of a pointer that refers to freed space results in undefined
+behavior.
+.SH RETURN VALUE
+.LP
+The \fIfree\fP() function shall not return a value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+There is now no requirement for the implementation to support the
+inclusion of \fI<malloc.h>\fP.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcalloc\fP(), \fImalloc\fP(), \fIrealloc\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/freeaddrinfo.3p b/man-pages-posix-2003/man3p/freeaddrinfo.3p
new file mode 100644
index 0000000..055f9ec
--- /dev/null
+++ b/man-pages-posix-2003/man3p/freeaddrinfo.3p
@@ -0,0 +1 @@
+.so man3p/getaddrinfo.3p
diff --git a/man-pages-posix-2003/man3p/freopen.3p b/man-pages-posix-2003/man3p/freopen.3p
new file mode 100644
index 0000000..b6a766a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/freopen.3p
@@ -0,0 +1,189 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FREOPEN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" freopen
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+freopen \- open a stream
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+FILE *freopen(const char *restrict\fP \fIfilename\fP\fB, const char
+*restrict\fP \fImode\fP\fB,
+.br
+\ \ \ \ \ \ FILE *restrict\fP \fIstream\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfreopen\fP() function shall first attempt to flush the stream
+and close any file descriptor associated with
+\fIstream\fP. Failure to flush or close the file descriptor successfully
+shall be ignored. The error and end-of-file indicators
+for the stream shall be cleared.
+.LP
+The \fIfreopen\fP() function shall open the file whose pathname is
+the string pointed to by \fIfilename\fP and associate the
+stream pointed to by \fIstream\fP with it. The \fImode\fP argument
+shall be used just as in \fIfopen\fP().
+.LP
+The original stream shall be closed regardless of whether the subsequent
+open succeeds.
+.LP
+If \fIfilename\fP is a null pointer, the \fIfreopen\fP() function
+shall attempt to change the mode of the stream to that
+specified by \fImode\fP, as if the name of the file currently associated
+with the stream had been used. It is
+implementation-defined which changes of mode are permitted (if any),
+and under what circumstances.
+.LP
+After a successful call to the \fIfreopen\fP() function, the orientation
+of the stream shall be cleared, the encoding
+rule shall be cleared, and the associated \fBmbstate_t\fP object
+shall be set to describe an initial conversion state.
+.LP
+The
+largest value that can be represented correctly in an object of type
+\fBoff_t\fP shall be established as the offset maximum in the
+open file description.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIfreopen\fP() shall return the value
+of \fIstream\fP. Otherwise, a null pointer shall be
+returned, and \fIerrno\fP shall be set to indicate the error.
+.SH ERRORS
+.LP
+The \fIfreopen\fP() function shall fail if:
+.TP 7
+.B EACCES
+Search permission is denied on a component of the path prefix, or
+the file exists and the permissions specified by \fImode\fP are
+denied, or the file does not exist and write permission is denied
+for the parent directory of the file to be created.
+.TP 7
+.B EINTR
+A
+signal was caught during \fIfreopen\fP().
+.TP 7
+.B EISDIR
+The named file is a directory and \fImode\fP requires write access.
+.TP 7
+.B ELOOP
+A
+loop exists in symbolic links encountered during resolution of the
+\fIpath\fP argument.
+.TP 7
+.B EMFILE
+{OPEN_MAX} file descriptors are currently open in the calling process.
+.TP 7
+.B ENAMETOOLONG
+.sp
+The length of the \fIfilename\fP argument exceeds {PATH_MAX} or a
+pathname component is longer than {NAME_MAX}.
+.TP 7
+.B ENFILE
+The maximum allowable number of files is currently open in the system.
+.TP 7
+.B ENOENT
+A
+component of \fIfilename\fP does not name an existing file or \fIfilename\fP
+is an empty string.
+.TP 7
+.B ENOSPC
+The directory or file system that would contain the new file cannot
+be expanded, the file does not exist, and it was to be created.
+.TP 7
+.B ENOTDIR
+A
+component of the path prefix is not a directory.
+.TP 7
+.B ENXIO
+The named file is a character special or block special file, and the
+device associated with this special file does not exist.
+.TP 7
+.B EOVERFLOW
+The named file is a regular file and the size of the file cannot be
+represented correctly in an object of type \fBoff_t\fP.
+.TP 7
+.B EROFS
+The named file resides on a read-only file system and \fImode\fP requires
+write access.
+.sp
+.LP
+The \fIfreopen\fP() function may fail if:
+.TP 7
+.B EINVAL
+The value of the \fImode\fP argument is not valid.
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the \fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+.sp
+Pathname resolution of a symbolic link produced an intermediate result
+whose length exceeds {PATH_MAX}.
+.TP 7
+.B ENOMEM
+Insufficient storage space is available.
+.TP 7
+.B ENXIO
+A
+request was made of a nonexistent device, or the request was outside
+the capabilities of the device.
+.TP 7
+.B ETXTBSY
+The file is a pure procedure (shared text) file that is being executed
+and \fImode\fP requires write access.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Directing Standard Output to a File
+.LP
+The following example logs all standard output to the \fB/tmp/logfile\fP
+file.
+.sp
+.RS
+.nf
+
+\fB#include <stdio.h>
+\&...
+FILE *fp;
+\&...
+fp = freopen ("/tmp/logfile", "a+", stdout);
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The \fIfreopen\fP() function is typically used to attach the preopened
+\fIstreams\fP associated with \fIstdin\fP,
+\fIstdout\fP, and \fIstderr\fP to other files.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfclose\fP(), \fIfopen\fP(), \fIfdopen\fP(),
+\fImbsinit\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/frexp.3p b/man-pages-posix-2003/man3p/frexp.3p
new file mode 100644
index 0000000..7617569
--- /dev/null
+++ b/man-pages-posix-2003/man3p/frexp.3p
@@ -0,0 +1,76 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FREXP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" frexp
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+frexp, frexpf, frexpl \- extract mantissa and exponent from a double
+precision number
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double frexp(double\fP \fInum\fP\fB, int *\fP\fIexp\fP\fB);
+.br
+float frexpf(float\fP \fInum\fP\fB, int *\fP\fIexp\fP\fB);
+.br
+long double frexpl(long double\fP \fInum\fP\fB, int *\fP\fIexp\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall break a floating-point number \fInum\fP into
+a normalized fraction and an integral power of 2. The
+integer exponent shall be stored in the \fBint\fP object pointed to
+by \fIexp\fP.
+.SH RETURN VALUE
+.LP
+For finite arguments, these functions shall return the value \fIx\fP,
+such that \fIx\fP has a magnitude in the interval
+[0.5,1) or 0, and \fInum\fP equals \fIx\fP times 2 raised to the power
+*\fIexp\fP.
+.LP
+If
+\fInum\fP is NaN, a NaN shall be returned, and the value of *\fIexp\fP
+is unspecified.
+.LP
+If \fInum\fP is \(+-0, \(+-0 shall be returned, and the value of *\fIexp\fP
+shall be 0.
+.LP
+If \fInum\fP is \(+-Inf, \fInum\fP shall be returned, and the value
+of *\fIexp\fP is unspecified.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIisnan\fP(), \fIldexp\fP(), \fImodf\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/frexpf.3p b/man-pages-posix-2003/man3p/frexpf.3p
new file mode 100644
index 0000000..6d976f3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/frexpf.3p
@@ -0,0 +1 @@
+.so man3p/frexp.3p
diff --git a/man-pages-posix-2003/man3p/frexpl.3p b/man-pages-posix-2003/man3p/frexpl.3p
new file mode 100644
index 0000000..6d976f3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/frexpl.3p
@@ -0,0 +1 @@
+.so man3p/frexp.3p
diff --git a/man-pages-posix-2003/man3p/fscanf.3p b/man-pages-posix-2003/man3p/fscanf.3p
new file mode 100644
index 0000000..0a084c9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fscanf.3p
@@ -0,0 +1 @@
+.so man3p/scanf.3p
diff --git a/man-pages-posix-2003/man3p/fseek.3p b/man-pages-posix-2003/man3p/fseek.3p
new file mode 100644
index 0000000..e3ea867
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fseek.3p
@@ -0,0 +1,191 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FSEEK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fseek
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fseek, fseeko \- reposition a file-position indicator in a stream
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+int fseek(FILE *\fP\fIstream\fP\fB, long\fP \fIoffset\fP\fB, int\fP
+\fIwhence\fP\fB);
+.br
+\fP
+.LP
+\fBint fseeko(FILE *\fP\fIstream\fP\fB, off_t\fP \fIoffset\fP\fB,
+int\fP \fIwhence\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfseek\fP() function shall set the file-position indicator for
+the stream pointed to by \fIstream\fP. If a read or write
+error occurs, the error indicator for the stream shall be set and
+\fIfseek\fP() fails.
+.LP
+The new position, measured in bytes from the beginning of the file,
+shall be obtained by adding \fIoffset\fP to the position
+specified by \fIwhence\fP. The specified point is the beginning of
+the file for SEEK_SET, the current value of the file-position
+indicator for SEEK_CUR, or end-of-file for SEEK_END.
+.LP
+If the stream is to be used with wide-character input/output functions,
+the application shall ensure that \fIoffset\fP is
+either 0 or a value returned by an earlier call to \fIftell\fP() on
+the same stream and
+\fIwhence\fP is SEEK_SET.
+.LP
+A successful call to \fIfseek\fP() shall clear the end-of-file indicator
+for the stream and undo any effects of \fIungetc\fP() and \fIungetwc\fP()
+on the same stream.
+After an \fIfseek\fP() call, the next operation on an update stream
+may be either input or output.
+.LP
+If
+the most recent operation, other than \fIftell\fP(), on a given stream
+is \fIfflush\fP(), the file offset in the underlying open file description
+shall be adjusted to
+reflect the location specified by \fIfseek\fP().
+.LP
+The \fIfseek\fP() function shall allow the file-position indicator
+to be set beyond the end of existing data in the file. If
+data is later written at this point, subsequent reads of data in the
+gap shall return bytes with the value 0 until data is actually
+written into the gap.
+.LP
+The behavior of \fIfseek\fP() on devices which are incapable of seeking
+is implementation-defined. The value of the file offset
+associated with such a device is undefined.
+.LP
+If the stream is writable and buffered data had not been written to
+the underlying file, \fIfseek\fP() shall cause the
+unwritten data to be written to the file and shall mark the \fIst_ctime\fP
+and \fIst_mtime\fP fields of the file for update.
+.LP
+In a locale with state-dependent encoding, whether \fIfseek\fP() restores
+the stream's shift state is
+implementation-defined.
+.LP
+The \fIfseeko\fP() function shall be equivalent to the \fIfseek\fP()
+function except that the \fIoffset\fP argument is of
+type \fBoff_t\fP.
+.SH RETURN VALUE
+.LP
+The \fIfseek\fP() and \fIfseeko\fP() functions
+shall return 0 if they succeed.
+.LP
+Otherwise, they shall return -1 and set \fIerrno\fP to indicate the
+error.
+.SH ERRORS
+.LP
+The \fIfseek\fP() and \fIfseeko\fP()
+\ functions shall fail if, either the \fIstream\fP is unbuffered
+or the \fIstream\fP's buffer needed to be flushed, and
+the call to \fIfseek\fP() or \fIfseeko\fP() causes an underlying \fIlseek\fP()
+or \fIwrite\fP() to be invoked, and:
+.TP 7
+.B EAGAIN
+The O_NONBLOCK flag is set for the file descriptor and the process
+would be delayed in the write operation.
+.TP 7
+.B EBADF
+The file descriptor underlying the stream file is not open for writing
+or the stream's buffer needed to be flushed and the file is
+not open.
+.TP 7
+.B EFBIG
+An
+attempt was made to write a file that exceeds the maximum file size.
+.TP 7
+.B EFBIG
+An attempt was made to write a file that exceeds the process' file
+size limit.
+.TP 7
+.B EFBIG
+The file is a regular file and an attempt was made to write at or
+beyond the offset maximum associated with the corresponding
+stream.
+.TP 7
+.B EINTR
+The write operation was terminated due to the receipt of a signal,
+and no data was transferred.
+.TP 7
+.B EINVAL
+The \fIwhence\fP argument is invalid. The resulting file-position
+indicator would be set to a negative value.
+.TP 7
+.B EIO
+A
+physical I/O error has occurred, or the process is a member of a background
+process group attempting to perform a \fIwrite\fP() to its controlling
+terminal, TOSTOP is set, the process is neither ignoring nor
+blocking SIGTTOU, and the process group of the process is orphaned.
+This error may also be returned under implementation-defined
+conditions.
+.TP 7
+.B ENOSPC
+There was no free space remaining on the device containing the file.
+.TP 7
+.B ENXIO
+A
+request was made of a nonexistent device, or the request was outside
+the capabilities of the device.
+.TP 7
+.B EOVERFLOW
+For \fIfseek\fP(), the resulting file offset would be a value which
+cannot be represented correctly in an object of type
+\fBlong\fP.
+.TP 7
+.B EOVERFLOW
+For \fIfseeko\fP(), the resulting file offset would be a value which
+cannot be represented correctly in an object of type
+\fBoff_t\fP.
+.TP 7
+.B EPIPE
+An
+attempt was made to write to a pipe or FIFO that is not open for reading
+by any process; a SIGPIPE signal shall also be sent to the
+thread.
+.TP 7
+.B ESPIPE
+The file descriptor underlying \fIstream\fP is associated with a pipe
+or FIFO.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfopen\fP(), \fIfsetpos\fP(), \fIftell\fP(),
+\fIgetrlimit\fP(), \fIlseek\fP(), \fIrewind\fP(), \fIulimit\fP(),
+\fIungetc\fP(), \fIwrite\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fseeko.3p b/man-pages-posix-2003/man3p/fseeko.3p
new file mode 100644
index 0000000..294e7ce
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fseeko.3p
@@ -0,0 +1 @@
+.so man3p/fseek.3p
diff --git a/man-pages-posix-2003/man3p/fsetpos.3p b/man-pages-posix-2003/man3p/fsetpos.3p
new file mode 100644
index 0000000..0d9c1a4
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fsetpos.3p
@@ -0,0 +1,132 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FSETPOS" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fsetpos
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fsetpos \- set current file position
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+int fsetpos(FILE *\fP\fIstream\fP\fB, const fpos_t *\fP\fIpos\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfsetpos\fP() function shall set the file position and state
+indicators for the stream pointed to by \fIstream\fP
+according to the value of the object pointed to by \fIpos\fP, which
+the application shall ensure is a value obtained from an
+earlier call to \fIfgetpos\fP() on the same stream. If a read or write
+error occurs, the
+error indicator for the stream shall be set and \fIfsetpos\fP() fails.
+.LP
+A successful call to the \fIfsetpos\fP() function shall clear the
+end-of-file indicator for the stream and undo any effects of
+\fIungetc\fP() on the same stream. After an \fIfsetpos\fP() call,
+the next operation on an
+update stream may be either input or output.
+.LP
+The
+behavior of \fIfsetpos\fP() on devices which are incapable of seeking
+is implementation-defined. The value of the file offset
+associated with such a device is undefined.
+.SH RETURN VALUE
+.LP
+The \fIfsetpos\fP() function shall return 0 if it succeeds; otherwise,
+it shall return a non-zero value and set \fIerrno\fP to
+indicate the error.
+.SH ERRORS
+.LP
+The \fIfsetpos\fP() function shall fail if, either the \fIstream\fP
+is unbuffered or the \fIstream\fP's
+buffer needed to be flushed, and the call to \fIfsetpos\fP() causes
+an underlying \fIlseek\fP() or \fIwrite\fP() to be invoked, and:
+.TP 7
+.B EAGAIN
+The O_NONBLOCK flag is set for the file descriptor and the process
+would be delayed in the write operation.
+.TP 7
+.B EBADF
+The file descriptor underlying the stream file is not open for writing
+or the stream's buffer needed to be flushed and the file is
+not open.
+.TP 7
+.B EFBIG
+An
+attempt was made to write a file that exceeds the maximum file size.
+.TP 7
+.B EFBIG
+An attempt was made to write a file that exceeds the process' file
+size limit.
+.TP 7
+.B EFBIG
+The file is a regular file and an attempt was made to write at or
+beyond the offset maximum associated with the corresponding
+stream.
+.TP 7
+.B EINTR
+The write operation was terminated due to the receipt of a signal,
+and no data was transferred.
+.TP 7
+.B EIO
+A
+physical I/O error has occurred, or the process is a member of a background
+process group attempting to perform a \fIwrite\fP() to its controlling
+terminal, TOSTOP is set, the process is neither ignoring nor
+blocking SIGTTOU, and the process group of the process is orphaned.
+This error may also be returned under implementation-defined
+conditions.
+.TP 7
+.B ENOSPC
+There was no free space remaining on the device containing the file.
+.TP 7
+.B ENXIO
+A
+request was made of a nonexistent device, or the request was outside
+the capabilities of the device.
+.TP 7
+.B EPIPE
+The file descriptor underlying \fIstream\fP is associated with a pipe
+or FIFO.
+.TP 7
+.B EPIPE
+An
+attempt was made to write to a pipe or FIFO that is not open for reading
+by any process; a SIGPIPE signal shall also be sent to the
+thread.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfopen\fP(), \fIftell\fP(), \fIlseek\fP(), \fIrewind\fP(), \fIungetc\fP(),
+\fIwrite\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fstat.3p b/man-pages-posix-2003/man3p/fstat.3p
new file mode 100644
index 0000000..681d635
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fstat.3p
@@ -0,0 +1,135 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FSTAT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fstat
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fstat \- get file status
+.SH SYNOPSIS
+.LP
+\fB#include <sys/stat.h>
+.br
+.sp
+int fstat(int\fP \fIfildes\fP\fB, struct stat *\fP\fIbuf\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfstat\fP() function shall obtain information about an open
+file associated with the file descriptor \fIfildes\fP, and
+shall write it to the area pointed to by \fIbuf\fP.
+.LP
+If \fIfildes\fP references a shared memory object, the implementation
+shall update in the \fBstat\fP structure pointed to by the
+\fIbuf\fP argument only the \fIst_uid\fP, \fIst_gid\fP, \fIst_size\fP,
+and \fIst_mode\fP fields, and only the S_IRUSR,
+S_IWUSR, S_IRGRP, S_IWGRP, S_IROTH, and S_IWOTH file permission bits
+need be valid. The implementation may update other fields and
+flags.
+.LP
+If \fIfildes\fP references a typed memory object, the implementation
+shall update in the \fBstat\fP structure pointed to by the
+\fIbuf\fP argument only the \fIst_uid\fP, \fIst_gid\fP, \fIst_size\fP,
+and \fIst_mode\fP fields, and only the S_IRUSR,
+S_IWUSR, S_IRGRP, S_IWGRP, S_IROTH, and S_IWOTH file permission bits
+need be valid. The implementation may update other fields and
+flags.
+.LP
+The \fIbuf\fP argument is a pointer to a \fBstat\fP structure, as
+defined in \fI<sys/stat.h>\fP, into which information is placed concerning
+the file.
+.LP
+The structure members \fIst_mode\fP, \fIst_ino\fP, \fIst_dev\fP, \fIst_uid\fP,
+\fIst_gid\fP, \fIst_atime\fP,
+\fIst_ctime\fP, and \fIst_mtime\fP shall have meaningful values for
+all other file types defined in this volume of
+IEEE\ Std\ 1003.1-2001. The value of the member \fIst_nlink\fP shall
+be set to the number of links to the file.
+.LP
+An implementation that provides additional or alternative file access
+control mechanisms may, under implementation-defined
+conditions, cause \fIfstat\fP() to fail.
+.LP
+The \fIfstat\fP() function shall update any time-related fields as
+described in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 4.7, File Times Update, before writing
+into the \fBstat\fP structure.
+.SH RETURN VALUE
+.LP
+Upon successful completion, 0 shall be returned. Otherwise, -1 shall
+be returned and \fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fIfstat\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not a valid file descriptor.
+.TP 7
+.B EIO
+An I/O error occurred while reading from the file system.
+.TP 7
+.B EOVERFLOW
+The file size in bytes or the number of blocks allocated to the file
+or the file serial number cannot be represented correctly
+in the structure pointed to by \fIbuf\fP.
+.sp
+.LP
+The \fIfstat\fP() function may fail if:
+.TP 7
+.B EOVERFLOW
+One of the values is too large to store into the structure pointed
+to by the \fIbuf\fP argument.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Obtaining File Status Information
+.LP
+The following example shows how to obtain file status information
+for a file named \fB/home/cnd/mod1\fP. The structure variable
+\fIbuffer\fP is defined for the \fBstat\fP structure. The \fB/home/cnd/mod1\fP
+file is opened with read/write privileges and is
+passed to the open file descriptor \fIfildes\fP.
+.sp
+.RS
+.nf
+
+\fB#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+.sp
+
+struct stat buffer;
+int status;
+\&...
+fildes = open("/home/cnd/mod1", O_RDWR);
+status = fstat(fildes, &buffer);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIlstat\fP(), \fIstat\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<sys/stat.h>\fP, \fI<sys/types.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fstatvfs.3p b/man-pages-posix-2003/man3p/fstatvfs.3p
new file mode 100644
index 0000000..d32458e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fstatvfs.3p
@@ -0,0 +1 @@
+.so man3p/statvfs.3p
diff --git a/man-pages-posix-2003/man3p/fsync.3p b/man-pages-posix-2003/man3p/fsync.3p
new file mode 100644
index 0000000..7640fdf
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fsync.3p
@@ -0,0 +1,126 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FSYNC" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fsync
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fsync \- synchronize changes to a file
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+int fsync(int\fP \fIfildes\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfsync\fP() function shall request that all data for the open
+file descriptor named by \fIfildes\fP is to be transferred
+to the storage device associated with the file described by \fIfildes\fP
+in an implementation-defined manner. The \fIfsync\fP()
+function shall not return until the system has completed that action
+or until an error is detected.
+.LP
+If _POSIX_SYNCHRONIZED_IO is defined, the \fIfsync\fP() function shall
+force all currently queued I/O operations associated with
+the file indicated by file descriptor \fIfildes\fP to the synchronized
+I/O completion state. All I/O operations shall be completed
+as defined for synchronized I/O file integrity completion.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIfsync\fP() shall return 0. Otherwise,
+-1 shall be returned and \fIerrno\fP set to indicate the
+error. If the \fIfsync\fP() function fails, outstanding I/O operations
+are not guaranteed to have been completed.
+.SH ERRORS
+.LP
+The \fIfsync\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not a valid descriptor.
+.TP 7
+.B EINTR
+The \fIfsync\fP() function was interrupted by a signal.
+.TP 7
+.B EINVAL
+The \fIfildes\fP argument does not refer to a file on which this operation
+is possible.
+.TP 7
+.B EIO
+An I/O error occurred while reading from or writing to the file system.
+.sp
+.LP
+In the event that any of the queued I/O operations fail, \fIfsync\fP()
+shall return the error conditions defined for \fIread\fP() and \fIwrite\fP().
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIfsync\fP() function should be used by programs which require
+modifications to a file to be completed before continuing;
+for example, a program which contains a simple transaction facility
+might use it to ensure that all modifications to a file or
+files caused by a transaction are recorded.
+.SH RATIONALE
+.LP
+The \fIfsync\fP() function is intended to force a physical write of
+data from the buffer cache, and to assure that after a
+system crash or other failure that all data up to the time of the
+\fIfsync\fP() call is recorded on the disk. Since the concepts
+of "buffer cache", "system crash", "physical write", and "non-volatile
+storage" are not defined here, the wording has to be
+more abstract.
+.LP
+If _POSIX_SYNCHRONIZED_IO is not defined, the wording relies heavily
+on the conformance document to tell the user what can be
+expected from the system. It is explicitly intended that a null implementation
+is permitted. This could be valid in the case where
+the system cannot assure non-volatile storage under any circumstances
+or when the system is highly fault-tolerant and the
+functionality is not required. In the middle ground between these
+extremes, \fIfsync\fP() might or might not actually cause data
+to be written where it is safe from a power failure. The conformance
+document should identify at least that one configuration
+exists (and how to obtain that configuration) where this can be assured
+for at least some files that the user can select to use for
+critical data. It is not intended that an exhaustive list is required,
+but rather sufficient information is provided so that if
+critical data needs to be saved, the user can determine how the system
+is to be configured to allow the data to be written to
+non-volatile storage.
+.LP
+It is reasonable to assert that the key aspects of \fIfsync\fP() are
+unreasonable to test in a test suite. That does not make
+the function any less valuable, just more difficult to test. A formal
+conformance test should probably force a system crash (power
+shutdown) during the test for this condition, but it needs to be done
+in such a way that automated testing does not require this to
+be done except when a formal record of the results is being made.
+It would also not be unreasonable to omit testing for
+\fIfsync\fP(), allowing it to be treated as a quality-of-implementation
+issue.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsync\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/ftell.3p b/man-pages-posix-2003/man3p/ftell.3p
new file mode 100644
index 0000000..8f1b4dc
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ftell.3p
@@ -0,0 +1,97 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FTELL" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ftell
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ftell, ftello \- return a file offset in a stream
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+long ftell(FILE *\fP\fIstream\fP\fB);
+.br
+\fP
+.LP
+\fBoff_t ftello(FILE *\fP\fIstream\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIftell\fP() function shall obtain the current value of the file-position
+indicator for the stream pointed to by
+\fIstream\fP.
+.LP
+The
+\fIftello\fP() function shall be equivalent to \fIftell\fP(), except
+that the return value is of type \fBoff_t\fP.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIftell\fP() and \fIftello\fP()
+\ shall return the current value of the file-position indicator for
+the stream measured in bytes
+from the beginning of the file.
+.LP
+Otherwise, \fIftell\fP() and \fIftello\fP() shall return
+-1, cast to \fBlong\fP and \fBoff_t\fP respectively, and set \fIerrno\fP
+to indicate the error.
+.SH ERRORS
+.LP
+The \fIftell\fP() and \fIftello\fP() functions
+shall fail if:
+.TP 7
+.B EBADF
+The file descriptor underlying \fIstream\fP is not an open file descriptor.
+.TP 7
+.B EOVERFLOW
+For \fIftell\fP(), the current file offset cannot be represented correctly
+in an object of type \fBlong\fP.
+.TP 7
+.B EOVERFLOW
+For \fIftello\fP(), the current file offset cannot be represented
+correctly in an object of type \fBoff_t\fP.
+.TP 7
+.B ESPIPE
+The file descriptor underlying \fIstream\fP is associated with a pipe
+or FIFO.
+.sp
+.LP
+The \fIftell\fP() function may fail if:
+.TP 7
+.B ESPIPE
+The file descriptor underlying \fIstream\fP is associated with a socket.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfgetpos\fP(), \fIfopen\fP(), \fIfseek\fP(),
+\fIlseek\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/ftello.3p b/man-pages-posix-2003/man3p/ftello.3p
new file mode 100644
index 0000000..680d18d
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ftello.3p
@@ -0,0 +1 @@
+.so man3p/ftell.3p
diff --git a/man-pages-posix-2003/man3p/ftime.3p b/man-pages-posix-2003/man3p/ftime.3p
new file mode 100644
index 0000000..4f36dde
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ftime.3p
@@ -0,0 +1,89 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FTIME" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ftime
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ftime \- get date and time (\fBLEGACY\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <sys/timeb.h>
+.br
+.sp
+int ftime(struct timeb *\fP\fItp\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIftime\fP() function shall set the \fItime\fP and \fImillitm\fP
+members of the \fBtimeb\fP structure pointed to by
+\fItp\fP to contain the seconds and milliseconds portions, respectively,
+of the current time in seconds since the Epoch. The
+contents of the \fItimezone\fP and \fIdstflag\fP members of \fItp\fP
+after a call to \fIftime\fP() are unspecified.
+.LP
+The system clock need not have millisecond granularity. Depending
+on any granularity (particularly a granularity of one) renders
+code non-portable.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIftime\fP() function shall return
+0; otherwise, -1 shall be returned.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Getting the Current Time and Date
+.LP
+The following example shows how to get the current system time values
+using the \fIftime\fP() function. The \fBtimeb\fP
+structure pointed to by \fItp\fP is filled with the current system
+time values for \fItime\fP and \fImillitm\fP.
+.sp
+.RS
+.nf
+
+\fB#include <sys/timeb.h>
+.sp
+
+struct timeb tp;
+int status;
+\&...
+status = ftime(&tp);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+For applications portability, the \fItime\fP() function should be
+used to determine the
+current time instead of \fIftime\fP(). Realtime applications should
+use \fIclock_gettime\fP() to determine the current time instead of
+\fIftime\fP().
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+This function may be withdrawn in a future version.
+.SH SEE ALSO
+.LP
+\fIclock_getres\fP(), \fIctime\fP(), \fIgettimeofday\fP(), \fItime\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<sys/timeb.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/ftok.3p b/man-pages-posix-2003/man3p/ftok.3p
new file mode 100644
index 0000000..722da9c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ftok.3p
@@ -0,0 +1,145 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FTOK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ftok
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ftok \- generate an IPC key
+.SH SYNOPSIS
+.LP
+\fB#include <sys/ipc.h>
+.br
+.sp
+key_t ftok(const char *\fP\fIpath\fP\fB, int\fP \fIid\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIftok\fP() function shall return a key based on \fIpath\fP and
+\fIid\fP that is usable in subsequent calls to \fImsgget\fP(), \fIsemget\fP(),
+and \fIshmget\fP(). The application shall ensure that the \fIpath\fP
+argument is the pathname of an
+existing file that the process is able to \fIstat\fP().
+.LP
+The \fIftok\fP() function shall return the same key value for all
+paths that name the same file, when called with the same
+\fIid\fP value, and return different key values when called with different
+\fIid\fP values or with paths that name different
+files existing on the same file system at the same time. It is unspecified
+whether \fIftok\fP() shall return the same key value
+when called again after the file named by \fIpath\fP is removed and
+recreated with the same name.
+.LP
+Only the low-order 8-bits of \fIid\fP are significant. The behavior
+of \fIftok\fP() is unspecified if these bits are 0.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIftok\fP() shall return a key. Otherwise,
+\fIftok\fP() shall return (\fBkey_t\fP)-1 and set
+\fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fIftok\fP() function shall fail if:
+.TP 7
+.B EACCES
+Search permission is denied for a component of the path prefix.
+.TP 7
+.B ELOOP
+A loop exists in symbolic links encountered during resolution of the
+\fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+The length of the \fIpath\fP argument exceeds {PATH_MAX} or a pathname
+component is longer than {NAME_MAX}.
+.TP 7
+.B ENOENT
+A component of \fIpath\fP does not name an existing file or \fIpath\fP
+is an empty string.
+.TP 7
+.B ENOTDIR
+A component of the path prefix is not a directory.
+.sp
+.LP
+The \fIftok\fP() function may fail if:
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the \fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+Pathname resolution of a symbolic link produced an intermediate result
+whose length exceeds {PATH_MAX}.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Getting an IPC Key
+.LP
+The following example gets a unique key that can be used by the IPC
+functions \fIsemget\fP(), \fImsgget\fP(), and \fIshmget\fP(). The
+key returned by \fIftok\fP() for this example is based on the ID value
+\fIS\fP and the pathname \fB/tmp\fP.
+.sp
+.RS
+.nf
+
+\fB#include <sys/ipc.h>
+\&...
+key_t key;
+char *path = "/tmp";
+int id = 'S';
+.sp
+
+key = ftok(path, id);
+\fP
+.fi
+.RE
+.SS Saving an IPC Key
+.LP
+The following example gets a unique key based on the pathname \fB/tmp\fP
+and the ID value \fIa\fP. It also assigns the value
+of the resulting key to the \fIsemkey\fP variable so that it will
+be available to a later call to \fIsemget\fP(), \fImsgget\fP(), or
+\fIshmget\fP().
+.sp
+.RS
+.nf
+
+\fB#include <sys/ipc.h>
+\&...
+key_t semkey;
+.sp
+
+if ((semkey = ftok("/tmp", 'a')) == (key_t) -1) {
+ perror("IPC error: ftok"); exit(1);
+}
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+For maximum portability, \fIid\fP should be a single-byte character.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fImsgget\fP(), \fIsemget\fP(), \fIshmget\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<sys/ipc.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/ftruncate.3p b/man-pages-posix-2003/man3p/ftruncate.3p
new file mode 100644
index 0000000..0a2f410
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ftruncate.3p
@@ -0,0 +1,135 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FTRUNCATE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ftruncate
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ftruncate \- truncate a file to a specified length
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+int ftruncate(int\fP \fIfildes\fP\fB, off_t\fP \fIlength\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+If \fIfildes\fP is not a valid file descriptor open for writing, the
+\fIftruncate\fP() function shall fail.
+.LP
+If \fIfildes\fP refers to a regular file, the \fIftruncate\fP() function
+shall cause the size of the file to be truncated to
+\fIlength\fP. If the size of the file previously exceeded \fIlength\fP,
+the extra data shall no longer be available to reads on
+the file. If the file previously was smaller than this size, \fIftruncate\fP()
+shall either increase the size of the file or fail.
+\ XSI-conformant systems shall increase the size of the file.
+If the file size is increased, the extended area shall appear as if
+it were zero-filled. The value of the seek pointer shall not be
+modified by a call to \fIftruncate\fP().
+.LP
+Upon successful completion, if \fIfildes\fP refers to a regular file,
+the \fIftruncate\fP() function shall mark for update the
+\fIst_ctime\fP and \fIst_mtime\fP fields of the file and the S_ISUID
+and S_ISGID bits of the file mode may be cleared. If the
+\fIftruncate\fP() function is unsuccessful, the file is unaffected.
+.LP
+If the request would cause the file size to exceed the soft file size
+limit for the process, the request shall fail and the
+implementation shall generate the SIGXFSZ signal for the thread.
+.LP
+If \fIfildes\fP refers to a directory, \fIftruncate\fP() shall fail.
+.LP
+If \fIfildes\fP refers to any other file type, except a shared memory
+object, the result is unspecified.
+.LP
+If \fIfildes\fP refers to a shared memory object, \fIftruncate\fP()
+shall set the size of the shared memory object to
+\fIlength\fP.
+.LP
+If the effect of \fIftruncate\fP() is to decrease the size of a shared
+memory object or memory mapped file and whole pages beyond
+the new end were previously mapped, then the whole pages beyond the
+new end shall be discarded.
+.LP
+If the Memory Protection option is supported, references to discarded
+pages shall result in the generation of a SIGBUS signal;
+otherwise, the result of such references is undefined.
+.LP
+If the effect of \fIftruncate\fP() is to increase the size of a shared
+memory object, it is unspecified whether the contents of
+any mapped pages between the old end-of-file and the new are flushed
+to the underlying object.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIftruncate\fP() shall return 0; otherwise,
+-1 shall be returned and \fIerrno\fP set to indicate
+the error.
+.SH ERRORS
+.LP
+The \fIftruncate\fP() function shall fail if:
+.TP 7
+.B EINTR
+A signal was caught during execution.
+.TP 7
+.B EINVAL
+The \fIlength\fP argument was less than 0.
+.TP 7
+.B EFBIG \fRor\fP EINVAL
+.sp
+The \fIlength\fP argument was greater than the maximum file size.
+.TP 7
+.B EFBIG
+The file is a regular file and \fIlength\fP is greater than the offset
+maximum established in the open file description associated
+with \fIfildes\fP.
+.TP 7
+.B EIO
+An I/O error occurred while reading from or writing to a file system.
+.TP 7
+.B EBADF \fRor\fP EINVAL
+.sp
+The \fIfildes\fP argument is not a file descriptor open for writing.
+.TP 7
+.B EINVAL
+The \fIfildes\fP argument references a file that was opened without
+write permission.
+.TP 7
+.B EROFS
+The named file resides on a read-only file system.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIftruncate\fP() function is part of IEEE\ Std\ 1003.1-2001 as
+it was deemed to be more useful than \fItruncate\fP(). The \fItruncate\fP()
+function is
+provided as an XSI extension.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIopen\fP(), \fItruncate\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/ftrylockfile.3p b/man-pages-posix-2003/man3p/ftrylockfile.3p
new file mode 100644
index 0000000..cdaeb64
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ftrylockfile.3p
@@ -0,0 +1 @@
+.so man3p/flockfile.3p
diff --git a/man-pages-posix-2003/man3p/ftw.3p b/man-pages-posix-2003/man3p/ftw.3p
new file mode 100644
index 0000000..542f443
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ftw.3p
@@ -0,0 +1,199 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FTW" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ftw
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ftw \- traverse (walk) a file tree
+.SH SYNOPSIS
+.LP
+\fB#include <ftw.h>
+.br
+.sp
+int ftw(const char *\fP\fIpath\fP\fB, int (*\fP\fIfn\fP\fB)(const
+char *,
+.br
+\ \ \ \ \ \ const struct stat *\fP\fIptr\fP\fB, int\fP \fIflag\fP\fB),
+int\fP
+\fIndirs\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIftw\fP() function shall recursively descend the directory hierarchy
+rooted in \fIpath\fP. For each object in the
+hierarchy, \fIftw\fP() shall call the function pointed to by \fIfn\fP,
+passing it a pointer to a null-terminated character string
+containing the name of the object, a pointer to a \fBstat\fP structure
+containing information about the object, and an integer.
+Possible values of the integer, defined in the \fI<ftw.h>\fP header,
+are:
+.TP 7
+FTW_D
+For a directory.
+.TP 7
+FTW_DNR
+For a directory that cannot be read.
+.TP 7
+FTW_F
+For a file.
+.TP 7
+FTW_SL
+For a symbolic link (but see also FTW_NS below).
+.TP 7
+FTW_NS
+For an object other than a symbolic link on which \fIstat\fP() could
+not successfully be
+executed. If the object is a symbolic link and \fIstat\fP() failed,
+it is unspecified whether
+\fIftw\fP() passes FTW_SL or FTW_NS to the user-supplied function.
+.sp
+.LP
+If the integer is FTW_DNR, descendants of that directory shall not
+be processed. If the integer is FTW_NS, the \fBstat\fP
+structure contains undefined values. An example of an object that
+would cause FTW_NS to be passed to the function pointed to by
+\fIfn\fP would be a file in a directory with read but without execute
+(search) permission.
+.LP
+The \fIftw\fP() function shall visit a directory before visiting any
+of its descendants.
+.LP
+The \fIftw\fP() function shall use at most one file descriptor for
+each level in the tree.
+.LP
+The argument \fIndirs\fP should be in the range [1, {OPEN_MAX}].
+.LP
+The tree traversal shall continue until either the tree is exhausted,
+an invocation of \fIfn\fP returns a non-zero value, or
+some error, other than [EACCES], is detected within \fIftw\fP().
+.LP
+The \fIndirs\fP argument shall specify the maximum number of directory
+streams or file descriptors or both available for use by
+\fIftw\fP() while traversing the tree. When \fIftw\fP() returns it
+shall close any directory streams and file descriptors it uses
+not counting any opened by the application-supplied \fIfn\fP function.
+.LP
+The results are unspecified if the application-supplied \fIfn\fP function
+does not preserve the current working directory.
+.LP
+The \fIftw\fP() function need not be reentrant. A function that is
+not required to be reentrant is not required to be
+thread-safe.
+.SH RETURN VALUE
+.LP
+If the tree is exhausted, \fIftw\fP() shall return 0. If the function
+pointed to by \fIfn\fP returns a non-zero value,
+\fIftw\fP() shall stop its tree traversal and return whatever value
+was returned by the function pointed to by \fIfn\fP. If
+\fIftw\fP() detects an error, it shall return -1 and set \fIerrno\fP
+to indicate the error.
+.LP
+If \fIftw\fP() encounters an error other than [EACCES] (see FTW_DNR
+and FTW_NS above), it shall return -1 and set \fIerrno\fP
+to indicate the error. The external variable \fIerrno\fP may contain
+any error value that is possible when a directory is opened
+or when one of the \fIstat\fP functions is executed on a directory
+or file.
+.SH ERRORS
+.LP
+The \fIftw\fP() function shall fail if:
+.TP 7
+.B EACCES
+Search permission is denied for any component of \fIpath\fP or read
+permission is denied for \fIpath\fP.
+.TP 7
+.B ELOOP
+A loop exists in symbolic links encountered during resolution of the
+\fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+The length of the \fIpath\fP argument exceeds {PATH_MAX} or a pathname
+component is longer than {NAME_MAX}.
+.TP 7
+.B ENOENT
+A component of \fIpath\fP does not name an existing file or \fIpath\fP
+is an empty string.
+.TP 7
+.B ENOTDIR
+A component of \fIpath\fP is not a directory.
+.TP 7
+.B EOVERFLOW
+A field in the \fBstat\fP structure cannot be represented correctly
+in the current programming environment for one or more
+files found in the file hierarchy.
+.sp
+.LP
+The \fIftw\fP() function may fail if:
+.TP 7
+.B EINVAL
+The value of the \fIndirs\fP argument is invalid.
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the \fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+Pathname resolution of a symbolic link produced an intermediate result
+whose length exceeds {PATH_MAX}.
+.sp
+.LP
+In addition, if the function pointed to by \fIfn\fP encounters system
+errors, \fIerrno\fP may be set accordingly.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Walking a Directory Structure
+.LP
+The following example walks the current directory structure, calling
+the \fIfn\fP function for every directory entry, using at
+most 10 file descriptors:
+.sp
+.RS
+.nf
+
+\fB#include <ftw.h>
+\&...
+if (ftw(".", fn, 10) != 0) {
+ perror("ftw"); exit(2);
+}
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The \fIftw\fP() function may allocate dynamic storage during its operation.
+If \fIftw\fP() is forcibly terminated, such as by
+\fIlongjmp\fP() or \fIsiglongjmp\fP() being
+executed by the function pointed to by \fIfn\fP or an interrupt routine,
+\fIftw\fP() does not have a chance to free that storage,
+so it remains permanently allocated. A safe way to handle interrupts
+is to store the fact that an interrupt has occurred, and
+arrange to have the function pointed to by \fIfn\fP return a non-zero
+value at its next invocation.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIlongjmp\fP(), \fIlstat\fP(), \fImalloc\fP(), \fInftw\fP(),
+\fIopendir\fP(), \fIsiglongjmp\fP(), \fIstat\fP(), the Base Definitions
+volume of
+IEEE\ Std\ 1003.1-2001, \fI<ftw.h>\fP, \fI<sys/stat.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/funlockfile.3p b/man-pages-posix-2003/man3p/funlockfile.3p
new file mode 100644
index 0000000..cdaeb64
--- /dev/null
+++ b/man-pages-posix-2003/man3p/funlockfile.3p
@@ -0,0 +1 @@
+.so man3p/flockfile.3p
diff --git a/man-pages-posix-2003/man3p/fwide.3p b/man-pages-posix-2003/man3p/fwide.3p
new file mode 100644
index 0000000..dfe4a29
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fwide.3p
@@ -0,0 +1,78 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FWIDE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fwide
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fwide \- set stream orientation
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+#include <wchar.h>
+.br
+.sp
+int fwide(FILE *\fP\fIstream\fP\fB, int\fP \fImode\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfwide\fP() function shall determine the orientation of the
+stream pointed to by \fIstream\fP. If \fImode\fP is greater
+than zero, the function first attempts to make the stream wide-oriented.
+If \fImode\fP is less than zero, the function first
+attempts to make the stream byte-oriented. Otherwise, \fImode\fP is
+zero and the function does not alter the orientation of the
+stream.
+.LP
+If the orientation of the stream has already been determined, \fIfwide\fP()
+shall not change it.
+.LP
+Since no return value is reserved to indicate an error, an application
+wishing to check for error situations should set
+\fIerrno\fP to 0, then call \fIfwide\fP(), then check \fIerrno\fP,
+and if it is non-zero, assume an error has occurred.
+.SH RETURN VALUE
+.LP
+The \fIfwide\fP() function shall return a value greater than zero
+if, after the call, the stream has wide-orientation, a value
+less than zero if the stream has byte-orientation, or zero if the
+stream has no orientation.
+.SH ERRORS
+.LP
+The \fIfwide\fP() function may fail if:
+.TP 7
+.B EBADF
+The \fIstream\fP argument is not a valid stream.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+A call to \fIfwide\fP() with \fImode\fP set to zero can be used to
+determine the current orientation of a stream.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fwprintf.3p b/man-pages-posix-2003/man3p/fwprintf.3p
new file mode 100644
index 0000000..2298188
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fwprintf.3p
@@ -0,0 +1 @@
+.so man3p/wprintf.3p
diff --git a/man-pages-posix-2003/man3p/fwrite.3p b/man-pages-posix-2003/man3p/fwrite.3p
new file mode 100644
index 0000000..739536e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fwrite.3p
@@ -0,0 +1,85 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FWRITE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fwrite
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fwrite \- binary output
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+size_t fwrite(const void *restrict\fP \fIptr\fP\fB, size_t\fP \fIsize\fP\fB,
+size_t\fP \fInitems\fP\fB,
+.br
+\ \ \ \ \ \ FILE *restrict\fP \fIstream\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfwrite\fP() function shall write, from the array pointed to
+by \fIptr\fP, up to \fInitems\fP elements whose size is
+specified by \fIsize\fP, to the stream pointed to by \fIstream\fP.
+For each object, \fIsize\fP calls shall be made to the \fIfputc\fP()
+function, taking the values (in order) from an array of \fBunsigned
+char\fP
+exactly overlaying the object. The file-position indicator for the
+stream (if defined) shall be advanced by the number of bytes
+successfully written. If an error occurs, the resulting value of the
+file-position indicator for the stream is unspecified.
+.LP
+The
+\fIst_ctime\fP and \fIst_mtime\fP fields of the file shall be marked
+for update between the successful execution of
+\fIfwrite\fP() and the next successful completion of a call to \fIfflush\fP()
+or \fIfclose\fP() on the same stream, or a call to \fIexit\fP()
+or \fIabort\fP().
+.SH RETURN VALUE
+.LP
+The \fIfwrite\fP() function shall return the number of elements successfully
+written, which may be less than \fInitems\fP if a
+write error is encountered. If \fIsize\fP or \fInitems\fP is 0, \fIfwrite\fP()
+shall return 0 and the state of the stream
+remains unchanged. Otherwise, if a write error occurs, the error indicator
+for the stream shall be set, and
+\fIerrno\fP shall be set to indicate the error.
+.SH ERRORS
+.LP
+Refer to \fIfputc\fP().
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Because of possible differences in element length and byte ordering,
+files written using \fIfwrite\fP() are
+application-dependent, and possibly cannot be read using \fIfread\fP()
+by a different
+application or by the same application on a different processor.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIferror\fP(), \fIfopen\fP(), \fIprintf\fP(),
+\fIputc\fP(), \fIputs\fP(), \fIwrite\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/fwscanf.3p b/man-pages-posix-2003/man3p/fwscanf.3p
new file mode 100644
index 0000000..672fbc2
--- /dev/null
+++ b/man-pages-posix-2003/man3p/fwscanf.3p
@@ -0,0 +1 @@
+.so man3p/wscanf.3p
diff --git a/man-pages-posix-2003/man3p/gai_strerror.3p b/man-pages-posix-2003/man3p/gai_strerror.3p
new file mode 100644
index 0000000..340da77
--- /dev/null
+++ b/man-pages-posix-2003/man3p/gai_strerror.3p
@@ -0,0 +1,82 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GAI_STRERROR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" gai_strerror
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+gai_strerror \- address and name information error description
+.SH SYNOPSIS
+.LP
+\fB#include <netdb.h>
+.br
+.sp
+const char *gai_strerror(int\fP \fIecode\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgai_strerror\fP() function shall return a text string describing
+an error value for the \fIgetaddrinfo\fP() and \fIgetnameinfo\fP()
+functions listed in the \fI<netdb.h>\fP header.
+.LP
+When the \fIecode\fP argument is one of the following values listed
+in the \fI<netdb.h>\fP header:
+.sp
+.RS
+.nf
+
+[EAI_AGAIN]
+[EAI_BADFLAGS]
+[EAI_FAIL]
+[EAI_FAMILY]
+[EAI_MEMORY]
+[EAI_NONAME]
+[EAI_OVERFLOW]
+[EAI_SERVICE]
+[EAI_SOCKTYPE]
+[EAI_SYSTEM]
+.fi
+.RE
+.LP
+the function return value shall point to a string describing the error.
+If the argument is not one of those values, the function
+shall return a pointer to a string whose contents indicate an unknown
+error.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIgai_strerror\fP() shall return a pointer
+to an implementation-defined string.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgetaddrinfo\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<netdb.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/gcvt.3p b/man-pages-posix-2003/man3p/gcvt.3p
new file mode 100644
index 0000000..ad49771
--- /dev/null
+++ b/man-pages-posix-2003/man3p/gcvt.3p
@@ -0,0 +1 @@
+.so man3p/ecvt.3p
diff --git a/man-pages-posix-2003/man3p/getaddrinfo.3p b/man-pages-posix-2003/man3p/getaddrinfo.3p
new file mode 100644
index 0000000..c765e6d
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getaddrinfo.3p
@@ -0,0 +1,317 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FREEADDRINFO" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" freeaddrinfo
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+freeaddrinfo, getaddrinfo \- get address information
+.SH SYNOPSIS
+.LP
+\fB#include <sys/socket.h>
+.br
+#include <netdb.h>
+.br
+.sp
+void freeaddrinfo(struct addrinfo *\fP\fIai\fP\fB);
+.br
+int getaddrinfo(const char *restrict\fP \fInodename\fP\fB,
+.br
+\ \ \ \ \ \ const char *restrict\fP \fIservname\fP\fB,
+.br
+\ \ \ \ \ \ const struct addrinfo *restrict\fP \fIhints\fP\fB,
+.br
+\ \ \ \ \ \ struct addrinfo **restrict\fP \fIres\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfreeaddrinfo\fP() function shall free one or more \fBaddrinfo\fP
+structures returned by \fIgetaddrinfo\fP(), along
+with any additional storage associated with those structures. If the
+\fIai_next\fP field of the structure is not null, the entire
+list of structures shall be freed. The \fIfreeaddrinfo\fP() function
+shall support the freeing of arbitrary sublists of an
+\fBaddrinfo\fP list originally returned by \fIgetaddrinfo\fP().
+.LP
+The \fIgetaddrinfo\fP() function shall translate the name of a service
+location (for example, a host name) and/or a service
+name and shall return a set of socket addresses and associated information
+to be used in creating a socket with which to address
+the specified service.
+.TP 7
+\fBNote:\fP
+In many cases it is implemented by the Domain Name System, as documented
+in RFC\ 1034, RFC\ 1035, and
+RFC\ 1886.
+.sp
+.LP
+The \fIfreeaddrinfo\fP() and \fIgetaddrinfo\fP() functions shall be
+thread-safe.
+.LP
+The \fInodename\fP and \fIservname\fP arguments are either null pointers
+or pointers to null-terminated strings. One or both
+of these two arguments shall be supplied by the application as a non-null
+pointer.
+.LP
+The format of a valid name depends on the address family or families.
+If a specific family is not given and the name could be
+interpreted as valid within multiple supported families, the implementation
+shall attempt to resolve the name in all supported
+families and, in absence of errors, one or more results shall be returned.
+.LP
+If the \fInodename\fP argument is not null, it can be a descriptive
+name or can be an address string. If the specified address
+family is AF_INET, AF_INET6, or AF_UNSPEC, valid
+descriptive names include host names. If the specified address family
+is AF_INET or AF_UNSPEC, address strings using Internet
+standard dot notation as specified in \fIinet_addr\fP() are valid.
+.LP
+If the specified address family is AF_INET6 or AF_UNSPEC, standard
+IPv6 text forms described in \fIinet_ntop\fP() are valid.
+.LP
+If \fInodename\fP is not null, the requested service location is named
+by \fInodename\fP; otherwise, the requested service
+location is local to the caller.
+.LP
+If \fIservname\fP is null, the call shall return network-level addresses
+for the specified \fInodename.\fP If \fIservname\fP
+is not null, it is a null-terminated character string identifying
+the requested service. This can be either a descriptive name or a
+numeric representation suitable for use with the address family or
+families. If the specified address family is AF_INET,
+\ AF_INET6, or AF_UNSPEC, the service can be specified as a
+string specifying a decimal port number.
+.LP
+If the \fIhints\fP argument is not null, it refers to a structure
+containing input values that may direct the operation by
+providing options and by limiting the returned information to a specific
+socket type, address family, and/or protocol. In this
+\fIhints\fP structure every member other than \fIai_flags\fP, \fIai_family\fP,
+\fIai_socktype\fP, and \fIai_protocol\fP shall
+be set to zero or a null pointer. A value of AF_UNSPEC for \fIai_family\fP
+means that the caller shall accept any address family.
+A value of zero for \fIai_socktype\fP means that the caller shall
+accept any socket type. A value of zero for \fIai_protocol\fP
+means that the caller shall accept any protocol. If \fIhints\fP is
+a null pointer, the behavior shall be as if it referred to a
+structure containing the value zero for the \fIai_flags\fP, \fIai_socktype\fP,
+and \fIai_protocol\fP fields, and AF_UNSPEC for
+the \fIai_family\fP field.
+.LP
+The \fIai_flags\fP field to which the \fIhints\fP parameter points
+shall be set to zero or be the bitwise-inclusive OR of one
+or more of the values AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST, AI_NUMERICSERV,
+AI_V4MAPPED, AI_ALL, and AI_ADDRCONFIG.
+.LP
+If the AI_PASSIVE flag is specified, the returned address information
+shall be suitable for use in binding a socket for
+accepting incoming connections for the specified service. In this
+case, if the \fInodename\fP argument is null, then the IP
+address portion of the socket address structure shall be set to INADDR_ANY
+for an IPv4 address or IN6ADDR_ANY_INIT for an IPv6
+address. If the AI_PASSIVE flag is not specified, the returned address
+information shall be suitable for a call to \fIconnect\fP() (for a
+connection-mode protocol) or for a call to \fIconnect\fP(), \fIsendto\fP(),
+or \fIsendmsg\fP() (for a connectionless protocol). In this case,
+if the \fInodename\fP argument is
+null, then the IP address portion of the socket address structure
+shall be set to the loopback address. The AI_PASSIVE flag shall
+be ignored if the \fInodename\fP argument is not null.
+.LP
+If the AI_CANONNAME flag is specified and the \fInodename\fP argument
+is not null, the function shall attempt to determine the
+canonical name corresponding to \fInodename\fP (for example, if \fInodename\fP
+is an alias or shorthand notation for a complete
+name).
+.TP 7
+\fBNote:\fP
+Since different implementations use different conceptual models, the
+terms ``canonical name'' and ``alias'' cannot be precisely
+defined for the general case. However, Domain Name System implementations
+are expected to interpret them as they are used in
+RFC\ 1034.
+.LP
+A numeric host address string is not a ``name'', and thus does not
+have a ``canonical name'' form; no address to host name
+translation is performed. See below for handling of the case where
+a canonical name cannot be obtained.
+.sp
+.LP
+If the AI_NUMERICHOST flag is specified, then a non-null \fInodename\fP
+string supplied shall be a numeric host address string.
+Otherwise, an [EAI_NONAME] error is returned. This flag shall prevent
+any type of name resolution service (for example, the DNS)
+from being invoked.
+.LP
+If the AI_NUMERICSERV flag is specified, then a non-null \fIservname\fP
+string supplied shall be a numeric port string.
+Otherwise, an [EAI_NONAME] error shall be returned. This flag shall
+prevent any type of name resolution service (for example, NIS+)
+from being invoked.
+.LP
+If the AI_V4MAPPED flag is specified along with an \fIai_family\fP
+of AF_INET6, then \fIgetaddrinfo\fP() shall return IPv4-mapped
+IPv6 addresses on finding no matching IPv6 addresses ( \fIai_addrlen\fP
+shall be 16). The AI_V4MAPPED flag shall be ignored unless
+\fIai_family\fP equals AF_INET6. If the AI_ALL flag is used with the
+AI_V4MAPPED flag, then \fIgetaddrinfo\fP() shall return all
+matching IPv6 and IPv4 addresses. The AI_ALL flag without the AI_V4MAPPED
+flag is ignored.
+.LP
+If the AI_ADDRCONFIG flag is specified, IPv4 addresses shall be returned
+only if an IPv4 address is configured on the local
+system, and IPv6 addresses shall be returned only if an IPv6 address
+is configured on the local system.
+.LP
+The \fIai_socktype\fP field to which argument \fIhints\fP points specifies
+the socket type for the service, as defined in \fIsocket\fP(). If
+a specific socket type is not given (for example, a value of zero)
+and the service name
+could be interpreted as valid with multiple supported socket types,
+the implementation shall attempt to resolve the service name
+for all supported socket types and, in the absence of errors, all
+possible results shall be returned. A non-zero socket type value
+shall limit the returned information to values with the specified
+socket type.
+.LP
+If the \fIai_family\fP field to which \fIhints\fP points has the value
+AF_UNSPEC, addresses shall be returned for use with any
+address family that can be used with the specified \fInodename\fP
+and/or \fIservname\fP. Otherwise, addresses shall be returned
+for use only with the specified address family. If \fIai_family\fP
+is not AF_UNSPEC and \fIai_protocol\fP is not zero, then
+addresses are returned for use only with the specified address family
+and protocol; the value of \fIai_protocol\fP shall be
+interpreted as in a call to the \fIsocket\fP() function with the corresponding
+values of
+\fIai_family\fP and \fIai_protocol\fP.
+.SH RETURN VALUE
+.LP
+A zero return value for \fIgetaddrinfo\fP() indicates successful completion;
+a non-zero return value indicates failure. The
+possible values for the failures are listed in the ERRORS section.
+.LP
+Upon successful return of \fIgetaddrinfo\fP(), the location to which
+\fIres\fP points shall refer to a linked list of
+\fBaddrinfo\fP structures, each of which shall specify a socket address
+and information for use in creating a socket with which to
+use that socket address. The list shall include at least one \fBaddrinfo\fP
+structure. The \fIai_next\fP field of each structure
+contains a pointer to the next structure on the list, or a null pointer
+if it is the last structure on the list. Each structure on
+the list shall include values for use with a call to the \fIsocket\fP()
+function, and a
+socket address for use with the \fIconnect\fP() function or, if the
+AI_PASSIVE flag was
+specified, for use with the \fIbind\fP() function. The fields \fIai_family\fP,
+\fIai_socktype\fP, and \fIai_protocol\fP shall be usable as the arguments
+to the \fIsocket\fP() function to create a socket suitable for use
+with the returned address. The fields
+\fIai_addr\fP and \fIai_addrlen\fP are usable as the arguments to
+the \fIconnect\fP() or
+\fIbind\fP() functions with such a socket, according to the AI_PASSIVE
+flag.
+.LP
+If \fInodename\fP is not null, and if requested by the AI_CANONNAME
+flag, the \fIai_canonname\fP field of the first returned
+\fBaddrinfo\fP structure shall point to a null-terminated string containing
+the canonical name corresponding to the input
+\fInodename\fP; if the canonical name is not available, then \fIai_canonname\fP
+shall refer to the \fInodename\fP argument or a
+string with the same contents. The contents of the \fIai_flags\fP
+field of the returned structures are undefined.
+.LP
+All fields in socket address structures returned by \fIgetaddrinfo\fP()
+that are not filled in through an explicit argument
+(for example, \fIsin6_flowinfo\fP) shall be set to zero.
+.TP 7
+\fBNote:\fP
+This makes it easier to compare socket address structures.
+.sp
+.SH ERRORS
+.LP
+The \fIgetaddrinfo\fP() function shall fail and return the corresponding
+value if:
+.TP 7
+.B EAI_AGAIN
+The name could not be resolved at this time. Future attempts may succeed.
+.TP 7
+.B EAI_BADFLAGS
+.sp
+The \fIflags\fP parameter had an invalid value.
+.TP 7
+.B EAI_FAIL
+A non-recoverable error occurred when attempting to resolve the name.
+.TP 7
+.B EAI_FAMILY
+The address family was not recognized.
+.TP 7
+.B EAI_MEMORY
+There was a memory allocation failure when trying to allocate storage
+for the return value.
+.TP 7
+.B EAI_NONAME
+The name does not resolve for the supplied parameters.
+.LP
+Neither \fInodename\fP nor \fIservname\fP were supplied. At least
+one of these shall be supplied.
+.TP 7
+.B EAI_SERVICE
+The service passed was not recognized for the specified socket type.
+.TP 7
+.B EAI_SOCKTYPE
+.sp
+The intended socket type was not recognized.
+.TP 7
+.B EAI_SYSTEM
+A system error occurred; the error code can be found in \fIerrno\fP.
+.TP 7
+.B EAI_OVERFLOW
+.sp
+An argument buffer overflowed.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+If the caller handles only TCP and not UDP, for example, then the
+\fIai_protocol\fP member of the \fIhints\fP structure should
+be set to IPPROTO_TCP when \fIgetaddrinfo\fP() is called.
+.LP
+If the caller handles only IPv4 and not IPv6, then the \fIai_family\fP
+member of the \fIhints\fP structure should be set to
+AF_INET when \fIgetaddrinfo\fP() is called.
+.LP
+The term ``canonical name'' is misleading; it is taken from the Domain
+Name System (RFC\ 2181). It should be noted that the
+canonical name is a result of alias processing, and not necessarily
+a unique attribute of a host, address, or set of addresses. See
+RFC\ 2181 for more discussion of this in the Domain Name System context.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIconnect\fP(), \fIgai_strerror\fP(), \fIgethostbyaddr\fP(), \fIgetnameinfo\fP(),
+\fIgetservbyname\fP(), \fIsocket\fP(), the Base Definitions volume
+of
+IEEE\ Std\ 1003.1-2001, \fI<netdb.h>\fP, \fI<sys/socket.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getc.3p b/man-pages-posix-2003/man3p/getc.3p
new file mode 100644
index 0000000..0b77c97
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getc.3p
@@ -0,0 +1,69 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETC" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getc
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getc \- get a byte from a stream
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+int getc(FILE *\fP\fIstream\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetc\fP() function shall be equivalent to \fIfgetc\fP(), except
+that if it is implemented as
+a macro it may evaluate \fIstream\fP more than once, so the argument
+should never be an expression with side effects.
+.SH RETURN VALUE
+.LP
+Refer to \fIfgetc\fP().
+.SH ERRORS
+.LP
+Refer to \fIfgetc\fP().
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+If the integer value returned by \fIgetc\fP() is stored into a variable
+of type \fBchar\fP and then compared against the
+integer constant EOF, the comparison may never succeed, because sign-extension
+of a variable of type \fBchar\fP on widening to
+integer is implementation-defined.
+.LP
+Since it may be implemented as a macro, \fIgetc\fP() may treat incorrectly
+a \fIstream\fP argument with side effects. In
+particular, \fIgetc\fP(*\fIf\fP++) does not necessarily work as expected.
+Therefore, use of this function should be preceded by
+\fB"#undef getc"\fP in such situations; \fIfgetc\fP() could also be
+used.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfgetc\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getc_unlocked.3p b/man-pages-posix-2003/man3p/getc_unlocked.3p
new file mode 100644
index 0000000..c7026cf
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getc_unlocked.3p
@@ -0,0 +1 @@
+.so man3p/getchar_unlocked.3p
diff --git a/man-pages-posix-2003/man3p/getchar.3p b/man-pages-posix-2003/man3p/getchar.3p
new file mode 100644
index 0000000..0417ddb
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getchar.3p
@@ -0,0 +1,59 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETCHAR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getchar
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getchar \- get a byte from a stdin stream
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+int getchar(void);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetchar\fP() function shall be equivalent to \fIgetc\fP(\fIstdin\fP).
+.SH RETURN VALUE
+.LP
+Refer to \fIfgetc\fP().
+.SH ERRORS
+.LP
+Refer to \fIfgetc\fP().
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+If the integer value returned by \fIgetchar\fP() is stored into a
+variable of type \fBchar\fP and then compared against the
+integer constant EOF, the comparison may never succeed, because sign-extension
+of a variable of type \fBchar\fP on widening to
+integer is implementation-defined.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgetc\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getchar_unlocked.3p b/man-pages-posix-2003/man3p/getchar_unlocked.3p
new file mode 100644
index 0000000..f3298a5
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getchar_unlocked.3p
@@ -0,0 +1,162 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETC_UNLOCKED" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getc_unlocked
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked \-
+stdio with explicit client locking
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+int getc_unlocked(FILE *\fP\fIstream\fP\fB);
+.br
+int getchar_unlocked(void);
+.br
+int putc_unlocked(int\fP \fIc\fP\fB, FILE *\fP\fIstream\fP\fB);
+.br
+int putchar_unlocked(int\fP \fIc\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+Versions of the functions \fIgetc\fP(), \fIgetchar\fP(), \fIputc\fP(),
+and \fIputchar\fP() respectively named \fIgetc_unlocked\fP(), \fIgetchar_unlocked\fP(),
+\fIputc_unlocked\fP(), and \fIputchar_unlocked\fP() shall be provided
+which are functionally equivalent to the original versions,
+with the exception that they are not required to be implemented in
+a thread-safe manner. They may only safely be used within a
+scope protected by \fIflockfile\fP() (or \fIftrylockfile\fP()) and
+\fIfunlockfile\fP().
+These functions may safely be used in a multi-threaded program if
+and only if they are called while the invoking thread owns the (
+\fBFILE *\fP) object, as is the case after a successful call to the
+\fIflockfile\fP()
+or \fIftrylockfile\fP() functions.
+.SH RETURN VALUE
+.LP
+See \fIgetc\fP(), \fIgetchar\fP(), \fIputc\fP(),
+and \fIputchar\fP().
+.SH ERRORS
+.LP
+See \fIgetc\fP(), \fIgetchar\fP(), \fIputc\fP(),
+and \fIputchar\fP().
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Since they may be implemented as macros, \fIgetc_unlocked\fP() and
+\fIputc_unlocked\fP() may treat incorrectly a \fIstream\fP
+argument with side effects. In particular, \fIgetc_unlocked\fP(*f++)
+and \fIputc_unlocked\fP(*f++) do not necessarily work as
+expected. Therefore, use of these functions in such situations should
+be preceded by the following statement as appropriate:
+.sp
+.RS
+.nf
+
+\fB#undef getc_unlocked
+#undef putc_unlocked
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+Some I/O functions are typically implemented as macros for performance
+reasons (for example, \fIputc\fP() and \fIgetc\fP()). For safety,
+they need to be
+synchronized, but it is often too expensive to synchronize on every
+character. Nevertheless, it was felt that the safety concerns
+were more important; consequently, the \fIgetc\fP(), \fIgetchar\fP(),
+\fIputc\fP(), and \fIputchar\fP() functions are required to be thread-safe.
+However, unlocked versions are also
+provided with names that clearly indicate the unsafe nature of their
+operation but can be used to exploit their higher performance.
+These unlocked versions can be safely used only within explicitly
+locked program regions, using exported locking primitives. In
+particular, a sequence such as:
+.sp
+.RS
+.nf
+
+\fBflockfile(fileptr);
+putc_unlocked('1', fileptr);
+putc_unlocked('\\n', fileptr);
+fprintf(fileptr, "Line 2\\n");
+funlockfile(fileptr);
+\fP
+.fi
+.RE
+.LP
+is permissible, and results in the text sequence:
+.sp
+.RS
+.nf
+
+\fB1
+Line 2
+\fP
+.fi
+.RE
+.LP
+being printed without being interspersed with output from other threads.
+.LP
+It would be wrong to have the standard names such as \fIgetc\fP(),
+\fIputc\fP(), and so on, map to the "faster, but unsafe" rather than
+the "slower, but safe''
+versions. In either case, you would still want to inspect all uses
+of \fIgetc\fP(), \fIputc\fP(), and so on, by hand when converting
+existing code. Choosing the safe bindings as the
+default, at least, results in correct code and maintains the "atomicity
+at the function" invariant. To do otherwise would
+introduce gratuitous synchronization errors into converted code. Other
+routines that modify the \fIstdio\fP ( \fBFILE *\fP)
+structures or buffers are also safely synchronized.
+.LP
+Note that there is no need for functions of the form \fIgetc_locked\fP(),
+\fIputc_locked\fP(), and so on, since this is the
+functionality of \fIgetc\fP(), \fIputc\fP(), \fIet
+al\fP. It would be inappropriate to use a feature test macro to switch
+a macro definition of \fIgetc\fP() between \fIgetc_locked\fP() and
+\fIgetc_unlocked\fP(), since the ISO\ C standard
+requires an actual function to exist, a function whose behavior could
+not be changed by the feature test macro. Also, providing
+both the \fIxxx_locked\fP() and \fIxxx_unlocked\fP() forms leads to
+the confusion of whether the suffix describes the behavior of
+the function or the circumstances under which it should be used.
+.LP
+Three additional routines, \fIflockfile\fP(), \fIftrylockfile\fP(),
+and \fIfunlockfile\fP()
+(which may be macros), are provided to allow the user to delineate
+a sequence of I/O statements that are executed
+synchronously.
+.LP
+The \fIungetc\fP() function is infrequently called relative to the
+other
+functions/macros so no unlocked variation is needed.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgetc\fP(), \fIgetchar\fP(), \fIputc\fP(), \fIputchar\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getcontext.3p b/man-pages-posix-2003/man3p/getcontext.3p
new file mode 100644
index 0000000..4c82ea7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getcontext.3p
@@ -0,0 +1,106 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETCONTEXT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getcontext
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getcontext, setcontext \- get and set current user context
+.SH SYNOPSIS
+.LP
+\fB#include <ucontext.h>
+.br
+.sp
+int getcontext(ucontext_t *\fP\fIucp\fP\fB);
+.br
+int setcontext(const ucontext_t *\fP\fIucp\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetcontext\fP() function shall initialize the structure pointed
+to by \fIucp\fP to the current user context of the
+calling thread. The \fBucontext_t\fP type that \fIucp\fP points to
+defines the user context and includes the contents of the
+calling thread's machine registers, the signal mask, and the current
+execution stack.
+.LP
+The \fIsetcontext\fP() function shall restore the user context pointed
+to by \fIucp\fP. A successful call to
+\fIsetcontext\fP() shall not return; program execution resumes at
+the point specified by the \fIucp\fP argument passed to
+\fIsetcontext\fP(). The \fIucp\fP argument should be created either
+by a prior call to \fIgetcontext\fP() or \fImakecontext\fP(), or by
+being passed as an argument to a signal handler. If the \fIucp\fP
+argument was created with \fIgetcontext\fP(), program execution continues
+as if the corresponding call of \fIgetcontext\fP() had
+just returned. If the \fIucp\fP argument was created with \fImakecontext\fP(),
+program execution continues with the function passed to \fImakecontext\fP().
+When that
+function returns, the thread shall continue as if after a call to
+\fIsetcontext\fP() with the \fIucp\fP argument that was input
+to \fImakecontext\fP(). If the \fIuc_link\fP member of the \fBucontext_t\fP
+structure pointed to by the \fIucp\fP argument is equal to 0, then
+this context is the main context, and the thread shall exit
+when this context returns. The effects of passing a \fIucp\fP argument
+obtained from any other source are unspecified.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIsetcontext\fP() shall not return and
+\fIgetcontext\fP() shall return 0; otherwise, a value of
+-1 shall be returned.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+Refer to \fImakecontext\fP().
+.SH APPLICATION USAGE
+.LP
+When a signal handler is executed, the current user context is saved
+and a new context is created. If the thread leaves the
+signal handler via \fIlongjmp\fP(), then it is unspecified whether
+the context at the time
+of the corresponding \fIsetjmp\fP() call is restored and thus whether
+future calls to
+\fIgetcontext\fP() provide an accurate representation of the current
+context, since the context restored by \fIlongjmp\fP() does not necessarily
+contain all the information that \fIsetcontext\fP()
+requires. Signal handlers should use \fIsiglongjmp\fP() or \fIsetcontext\fP()
+instead.
+.LP
+Conforming applications should not modify or access the \fIuc_mcontext\fP
+member of \fBucontext_t\fP. A conforming application
+cannot assume that context includes any process-wide static data,
+possibly including \fIerrno\fP. Users manipulating contexts
+should take care to handle these explicitly when required.
+.LP
+Use of contexts to create alternate stacks is not defined by this
+volume of IEEE\ Std\ 1003.1-2001.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIbsd_signal\fP(), \fImakecontext\fP(), \fIsetcontext\fP(), \fIsetjmp\fP(),
+\fIsigaction\fP(), \fIsigaltstack\fP(), \fIsiglongjmp\fP(), \fIsigprocmask\fP(),
+\fIsigsetjmp\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<ucontext.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getcwd.3p b/man-pages-posix-2003/man3p/getcwd.3p
new file mode 100644
index 0000000..bcd5f06
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getcwd.3p
@@ -0,0 +1,150 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETCWD" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getcwd
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getcwd \- get the pathname of the current working directory
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+char *getcwd(char *\fP\fIbuf\fP\fB, size_t\fP \fIsize\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetcwd\fP() function shall place an absolute pathname of the
+current working directory in the array pointed to by
+\fIbuf\fP, and return \fIbuf\fP. The pathname copied to the array
+shall contain no components that are symbolic links. The
+\fIsize\fP argument is the size in bytes of the character array pointed
+to by the \fIbuf\fP argument. If \fIbuf\fP is a null
+pointer, the behavior of \fIgetcwd\fP() is unspecified.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIgetcwd\fP() shall return the \fIbuf\fP
+argument. Otherwise, \fIgetcwd\fP() shall return a null
+pointer and set \fIerrno\fP to indicate the error. The contents of
+the array pointed to by \fIbuf\fP are then undefined.
+.SH ERRORS
+.LP
+The \fIgetcwd\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The \fIsize\fP argument is 0.
+.TP 7
+.B ERANGE
+The \fIsize\fP argument is greater than 0, but is smaller than the
+length of the pathname +1.
+.sp
+.LP
+The \fIgetcwd\fP() function may fail if:
+.TP 7
+.B EACCES
+Read or search permission was denied for a component of the pathname.
+.TP 7
+.B ENOMEM
+Insufficient storage space is available.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Determining the Absolute Pathname of the Current Working Directory
+.LP
+The following example returns a pointer to an array that holds the
+absolute pathname of the current working directory. The
+pointer is returned in the \fIptr\fP variable, which points to the
+\fIbuf\fP array where the pathname is stored.
+.sp
+.RS
+.nf
+
+\fB#include <stdlib.h>
+#include <unistd.h>
+\&...
+long size;
+char *buf;
+char *ptr;
+.sp
+
+size = pathconf(".", _PC_PATH_MAX);
+.sp
+
+if ((buf = (char *)malloc((size_t)size)) != NULL)
+ ptr = getcwd(buf, (size_t)size);
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+Since the maximum pathname length is arbitrary unless {PATH_MAX} is
+defined, an application generally cannot supply a \fIbuf\fP
+with \fIsize\fP {{PATH_MAX}+1}.
+.LP
+Having \fIgetcwd\fP() take no arguments and instead use the \fImalloc\fP()
+function to
+produce space for the returned argument was considered. The advantage
+is that \fIgetcwd\fP() knows how big the working directory
+pathname is and can allocate an appropriate amount of space. But the
+programmer would have to use the \fIfree\fP() function to free the
+resulting object, or each use of \fIgetcwd\fP() would further
+reduce the available memory. Also, \fImalloc\fP() and \fIfree\fP()
+are used nowhere else in this volume of IEEE\ Std\ 1003.1-2001. Finally,
+\fIgetcwd\fP() is taken from the SVID where it has the two arguments
+used in this volume of IEEE\ Std\ 1003.1-2001.
+.LP
+The older function \fIgetwd\fP() was rejected for use in this context
+because it had only
+a buffer argument and no \fIsize\fP argument, and thus had no way
+to prevent overwriting the buffer, except to depend on the
+programmer to provide a large enough buffer.
+.LP
+On some implementations, if \fIbuf\fP is a null pointer, \fIgetcwd\fP()
+may obtain \fIsize\fP bytes of memory using \fImalloc\fP(). In this
+case, the pointer returned by \fIgetcwd\fP() may be used as the argument
+in a subsequent call to \fIfree\fP(). Invoking \fIgetcwd\fP() with
+\fIbuf\fP as a null
+pointer is not recommended in conforming applications.
+.LP
+If a program is operating in a directory where some (grand)parent
+directory does not permit reading, \fIgetcwd\fP() may fail,
+as in most implementations it must read the directory to determine
+the name of the file. This can occur if search, but not read,
+permission is granted in an intermediate directory, or if the program
+is placed in that directory by some more privileged process
+(for example, login). Including the [EACCES] error condition makes
+the reporting of the error consistent and warns the application
+writer that \fIgetcwd\fP() can fail for reasons beyond the control
+of the application writer or user. Some implementations can
+avoid this occurrence (for example, by implementing \fIgetcwd\fP()
+using \fIpwd\fP, where \fIpwd\fP is a set-user-root process), thus
+the error was made optional. Since this volume of
+IEEE\ Std\ 1003.1-2001 permits the addition of other errors, this
+would be a common addition and yet one that applications
+could not be expected to deal with without this addition.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fImalloc\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getdate.3p b/man-pages-posix-2003/man3p/getdate.3p
new file mode 100644
index 0000000..57ee88a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getdate.3p
@@ -0,0 +1,355 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETDATE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getdate
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getdate \- convert user format date and time
+.SH SYNOPSIS
+.LP
+\fB#include <time.h>
+.br
+.sp
+struct tm *getdate(const char *\fP\fIstring\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetdate\fP() function shall convert a string representation
+of a date or time into a broken-down time.
+.LP
+The external variable or macro \fIgetdate_err\fP is used by \fIgetdate\fP()
+to return error values.
+.LP
+Templates are used to parse and interpret the input string. The templates
+are contained in a text file identified by the
+environment variable \fIDATEMSK\fP. The \fIDATEMSK\fP variable should
+be set to indicate the full pathname of the file that
+contains the templates. The first line in the template that matches
+the input specification is used for interpretation and
+conversion into the internal time format.
+.LP
+The following conversion specifications shall be supported:
+.TP 7
+\fB%%\fP
+Equivalent to \fB%\fP .
+.TP 7
+\fB%a\fP
+Abbreviated weekday name.
+.TP 7
+\fB%A\fP
+Full weekday name.
+.TP 7
+\fB%b\fP
+Abbreviated month name.
+.TP 7
+\fB%B\fP
+Full month name.
+.TP 7
+\fB%c\fP
+Locale's appropriate date and time representation.
+.TP 7
+\fB%C\fP
+Century number [00,99]; leading zeros are permitted but not required.
+.TP 7
+\fB%d\fP
+Day of month [01,31]; the leading 0 is optional.
+.TP 7
+\fB%D\fP
+Date as \fB%m\fP / \fB%d\fP / \fB%y\fP .
+.TP 7
+\fB%e\fP
+Equivalent to \fB%d\fP .
+.TP 7
+\fB%h\fP
+Abbreviated month name.
+.TP 7
+\fB%H\fP
+Hour [00,23].
+.TP 7
+\fB%I\fP
+Hour [01,12].
+.TP 7
+\fB%m\fP
+Month number [01,12].
+.TP 7
+\fB%M\fP
+Minute [00,59].
+.TP 7
+\fB%n\fP
+Equivalent to <newline>.
+.TP 7
+\fB%p\fP
+Locale's equivalent of either AM or PM.
+.TP 7
+\fB%r\fP
+The locale's appropriate representation of time in AM and PM notation.
+In the POSIX locale, this shall be equivalent to
+\fB%I\fP : \fB%M\fP : \fB%S\fP \fB%p\fP .
+.TP 7
+\fB%R\fP
+Time as \fB%H\fP : \fB%M\fP .
+.TP 7
+\fB%S\fP
+Seconds [00,60]. The range goes to 60 (rather than stopping at 59)
+to allow positive leap seconds to be expressed. Since leap
+seconds cannot be predicted by any algorithm, leap second data must
+come from some external source.
+.TP 7
+\fB%t\fP
+Equivalent to <tab>.
+.TP 7
+\fB%T\fP
+Time as \fB%H\fP : \fB%M\fP : \fB%S\fP .
+.TP 7
+\fB%w\fP
+Weekday number (Sunday = [0,6]).
+.TP 7
+\fB%x\fP
+Locale's appropriate date representation.
+.TP 7
+\fB%X\fP
+Locale's appropriate time representation.
+.TP 7
+\fB%y\fP
+Year within century. When a century is not otherwise specified, values
+in the range [69,99] shall refer to years 1969 to 1999
+inclusive, and values in the range [00,68] shall refer to years 2000
+to 2068 inclusive.
+.TP 7
+\fBNote:\fP
+.RS
+It is expected that in a future version of IEEE\ Std\ 1003.1-2001
+the default century inferred from a 2-digit year will
+change. (This would apply to all commands accepting a 2-digit year
+as input.)
+.RE
+.sp
+.TP 7
+\fB%Y\fP
+Year as \fB"ccyy"\fP (for example, 2001).
+.TP 7
+\fB%Z\fP
+Timezone name or no characters if no timezone exists. If the timezone
+supplied by \fB%Z\fP is not the timezone that
+\fIgetdate\fP() expects, an invalid input specification error shall
+result. The \fIgetdate\fP() function calculates an expected
+timezone based on information supplied to the function (such as the
+hour, day, and month).
+.sp
+.LP
+The match between the template and input specification performed by
+\fIgetdate\fP() shall be case-insensitive.
+.LP
+The month and weekday names can consist of any combination of upper
+and lowercase letters. The process can request that the
+input date or time specification be in a specific language by setting
+the \fILC_TIME\fP category (see \fIsetlocale\fP()).
+.LP
+Leading zeros are not necessary for the descriptors that allow leading
+zeros. However, at most two digits are allowed for those
+descriptors, including leading zeros. Extra whitespace in either the
+template file or in \fIstring\fP shall be ignored.
+.LP
+The results are undefined if the conversion specifications \fB%c\fP,
+\fB%x\fP, and \fB%X\fP include unsupported
+conversion specifications.
+.LP
+The following rules apply for converting the input specification into
+the internal format:
+.IP " *" 3
+If \fB%Z\fP is being scanned, then \fIgetdate\fP() shall initialize
+the broken-down time to be the current time in the
+scanned timezone. Otherwise, it shall initialize the broken-down time
+based on the current local time as if \fIlocaltime\fP() had been called.
+.LP
+.IP " *" 3
+If only the weekday is given, the day chosen shall be the day, starting
+with today and moving into the future, which first
+matches the named day.
+.LP
+.IP " *" 3
+If only the month (and no year) is given, the month chosen shall be
+the month, starting with the current month and moving into
+the future, which first matches the named month. The first day of
+the month shall be assumed if no day is given.
+.LP
+.IP " *" 3
+If no hour, minute, and second are given, the current hour, minute,
+and second shall be assumed.
+.LP
+.IP " *" 3
+If no date is given, the hour chosen shall be the hour, starting with
+the current hour and moving into the future, which first
+matches the named hour.
+.LP
+.LP
+If a conversion specification in the DATEMSK file does not correspond
+to one of the conversion specifications above, the
+behavior is unspecified.
+.LP
+The \fIgetdate\fP() function need not be reentrant. A function that
+is not required to be reentrant is not required to be
+thread-safe.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIgetdate\fP() shall return a pointer
+to a \fBstruct tm\fP. Otherwise, it shall return a null
+pointer and set \fIgetdate_err\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fIgetdate\fP() function shall fail in the following cases, setting
+\fIgetdate_err\fP to the value shown in the list
+below. Any changes to \fIerrno\fP are unspecified.
+.IP " 1." 4
+The \fIDATEMSK\fP environment variable is null or undefined.
+.LP
+.IP " 2." 4
+The template file cannot be opened for reading.
+.LP
+.IP " 3." 4
+Failed to get file status information.
+.LP
+.IP " 4." 4
+The template file is not a regular file.
+.LP
+.IP " 5." 4
+An I/O error is encountered while reading the template file.
+.LP
+.IP " 6." 4
+Memory allocation failed (not enough memory available).
+.LP
+.IP " 7." 4
+There is no line in the template that matches the input.
+.LP
+.IP " 8." 4
+Invalid input specification. For example, February 31; or a time is
+specified that cannot be represented in a \fBtime_t\fP
+(representing the time in seconds since the Epoch).
+.LP
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.IP " 1." 4
+The following example shows the possible contents of a template:
+.sp
+.RS
+.nf
+
+\fB%m
+%A %B %d, %Y, %H:%M:%S
+%A
+%B
+%m/%d/%y %I %p
+%d,%m,%Y %H:%M
+at %A the %dst of %B in %Y
+run job at %I %p,%B %dnd
+%A den %d. %B %Y %H.%M Uhr
+\fP
+.fi
+.RE
+.LP
+.IP " 2." 4
+The following are examples of valid input specifications for the template
+in Example 1:
+.sp
+.RS
+.nf
+
+\fBgetdate("10/1/87 4 PM");
+getdate("Friday");
+getdate("Friday September 18, 1987, 10:30:30");
+getdate("24,9,1986 10:30");
+getdate("at monday the 1st of december in 1986");
+getdate("run job at 3 PM, december 2nd");
+\fP
+.fi
+.RE
+.LP
+If the \fILC_TIME\fP category is set to a German locale that includes
+\fIfreitag\fP as a weekday name and \fIoktober\fP as a
+month name, the following would be valid:
+.sp
+.RS
+.nf
+
+\fBgetdate("freitag den 10. oktober 1986 10.30 Uhr");
+\fP
+.fi
+.RE
+.LP
+.IP " 3." 4
+The following example shows how local date and time specification
+can be defined in the template:
+.TS C
+center; l l.
+\fBInvocation\fP \fBLine in Template\fP
+getdate("11/27/86") %m/%d/%y
+getdate("27.11.86") %d.%m.%y
+getdate("86-11-27") %y-%m-%d
+getdate("Friday 12:00:00") %A %H:%M:%S
+.TE
+.LP
+.IP " 4." 4
+The following examples help to illustrate the above rules assuming
+that the current date is Mon Sep 22 12:19:47 EDT 1986 and the
+\fILC_TIME\fP category is set to the default C locale:
+.TS C
+center; l2 l2 l.
+\fBInput\fP \fBLine in Template\fP \fBDate\fP
+Mon %a Mon Sep 22 12:19:47 EDT 1986
+Sun %a Sun Sep 28 12:19:47 EDT 1986
+Fri %a Fri Sep 26 12:19:47 EDT 1986
+September %B Mon Sep 1 12:19:47 EDT 1986
+January %B Thu Jan 1 12:19:47 EST 1987
+December %B Mon Dec 1 12:19:47 EST 1986
+Sep Mon %b %a Mon Sep 1 12:19:47 EDT 1986
+Jan Fri %b %a Fri Jan 2 12:19:47 EST 1987
+Dec Mon %b %a Mon Dec 1 12:19:47 EST 1986
+Jan Wed 1989 %b %a %Y Wed Jan 4 12:19:47 EST 1989
+Fri 9 %a %H Fri Sep 26 09:00:00 EDT 1986
+Feb 10:30 %b %H:%S Sun Feb 1 10:00:30 EST 1987
+10:30 %H:%M Tue Sep 23 10:30:00 EDT 1986
+13:30 %H:%M Mon Sep 22 13:30:00 EDT 1986
+.TE
+.LP
+.SH APPLICATION USAGE
+.LP
+Although historical versions of \fIgetdate\fP() did not require that
+\fI<time.h>\fP declare the external variable \fIgetdate_err\fP, this
+volume of
+IEEE\ Std\ 1003.1-2001 does require it. The standard developers encourage
+applications to remove declarations of
+\fIgetdate_err\fP and instead incorporate the declaration by including
+\fI<time.h>\fP.
+.LP
+Applications should use \fB%Y\fP (4-digit years) in preference to
+\fB%y\fP (2-digit years).
+.SH RATIONALE
+.LP
+In standard locales, the conversion specifications \fB%c\fP, \fB%x\fP,
+and \fB%X\fP do not include unsupported
+conversion specifiers and so the text regarding results being undefined
+is not a problem in that case.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIctime\fP(), \fIlocaltime\fP(), \fIsetlocale\fP(), \fIstrftime\fP(),
+\fItimes\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<time.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getdate_err.3p b/man-pages-posix-2003/man3p/getdate_err.3p
new file mode 100644
index 0000000..99baff9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getdate_err.3p
@@ -0,0 +1 @@
+.so man3p/getdate.3p
diff --git a/man-pages-posix-2003/man3p/getegid.3p b/man-pages-posix-2003/man3p/getegid.3p
new file mode 100644
index 0000000..b347e30
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getegid.3p
@@ -0,0 +1,59 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETEGID" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getegid
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getegid \- get the effective group ID
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+gid_t getegid(void);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetegid\fP() function shall return the effective group ID of
+the calling process.
+.SH RETURN VALUE
+.LP
+The \fIgetegid\fP() function shall always be successful and no return
+value is reserved to indicate an error.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgeteuid\fP(), \fIgetgid\fP(), \fIgetuid\fP(), \fIsetegid\fP(),
+\fIseteuid\fP(), \fIsetgid\fP(), \fIsetregid\fP(), \fIsetreuid\fP(),
+\fIsetuid\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<sys/types.h>\fP, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getenv.3p b/man-pages-posix-2003/man3p/getenv.3p
new file mode 100644
index 0000000..5a6dcb4
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getenv.3p
@@ -0,0 +1,162 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETENV" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getenv
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getenv \- get value of an environment variable
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+char *getenv(const char *\fP\fIname\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetenv\fP() function shall search the environment of the calling
+process (see the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 8, Environment Variables) for the
+environment
+variable \fIname\fP if it exists and return a pointer to the value
+of the environment variable. If the specified environment
+variable cannot be found, a null pointer shall be returned. The application
+shall ensure that it does not modify the string pointed
+to by the \fIgetenv\fP() function.
+.LP
+The string pointed to may be overwritten by a subsequent call to \fIgetenv\fP(),
+\fIsetenv\fP(), or \fIunsetenv\fP(), but shall not be overwritten
+by a call to any other function in this volume
+of IEEE\ Std\ 1003.1-2001.
+.LP
+If
+the application modifies \fIenviron\fP or the pointers to which it
+points, the behavior of \fIgetenv\fP() is undefined.
+.LP
+The \fIgetenv\fP() function need not be reentrant. A function that
+is not required to be reentrant is not required to be
+thread-safe.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIgetenv\fP() shall return a pointer
+to a string containing the \fIvalue\fP for the specified
+\fIname\fP. If the specified \fIname\fP cannot be found in the environment
+of the calling process, a null pointer shall be
+returned.
+.LP
+The return value from \fIgetenv\fP() may point to static data which
+may be overwritten by subsequent calls to \fIgetenv\fP(),
+\fIsetenv\fP(), or \fIunsetenv\fP().
+.LP
+On XSI-conformant systems, the return value from \fIgetenv\fP() may
+point to static data which may also be overwritten by
+subsequent calls to \fIputenv\fP().
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Getting the Value of an Environment Variable
+.LP
+The following example gets the value of the \fIHOME\fP environment
+variable.
+.sp
+.RS
+.nf
+
+\fB#include <stdlib.h>
+\&...
+const char *name = "HOME";
+char *value;
+.sp
+
+value = getenv(name);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIclearenv\fP() function was considered but rejected. The \fIputenv\fP()
+function
+has now been included for alignment with the Single UNIX Specification.
+.LP
+The \fIgetenv\fP() function is inherently not reentrant because it
+returns a value pointing to static data.
+.LP
+Conforming applications are required not to modify \fIenviron\fP directly,
+but to use only the functions described here to
+manipulate the process environment as an abstract object. Thus, the
+implementation of the environment access functions has complete
+control over the data structure used to represent the environment
+(subject to the requirement that \fIenviron\fP be maintained as
+a list of strings with embedded equal signs for applications that
+wish to scan the environment). This constraint allows the
+implementation to properly manage the memory it allocates, either
+by using allocated storage for all variables (copying them on the
+first invocation of \fIsetenv\fP() or \fIunsetenv\fP()), or keeping
+track of which strings are currently in allocated space and which
+are not, via a separate table or some other means. This enables the
+implementation to free any allocated space used by strings (and
+perhaps the pointers to them) stored in \fIenviron\fP when \fIunsetenv\fP()
+is called. A
+C runtime start-up procedure (that which invokes \fImain\fP() and
+perhaps initializes \fIenviron\fP) can also initialize a flag
+indicating that none of the environment has yet been copied to allocated
+storage, or that the separate table has not yet been
+initialized.
+.LP
+In fact, for higher performance of \fIgetenv\fP(), the implementation
+could also maintain a separate copy of the environment in
+a data structure that could be searched much more quickly (such as
+an indexed hash table, or a binary tree), and update both it and
+the linear list at \fIenviron\fP when \fIsetenv\fP() or \fIunsetenv\fP()
+is invoked.
+.LP
+Performance of \fIgetenv\fP() can be important for applications which
+have large numbers of environment variables. Typically,
+applications like this use the environment as a resource database
+of user-configurable parameters. The fact that these variables
+are in the user's shell environment usually means that any other program
+that uses environment variables (such as \fIls\fP, which attempts
+to use \fICOLUMNS ),\fP or really almost any utility ( \fILANG\fP,
+\fILC_ALL\fP, and so on) is similarly slowed down by the linear search
+through the variables.
+.LP
+An implementation that maintains separate data structures, or even
+one that manages the memory it consumes, is not currently
+required as it was thought it would reduce consensus among implementors
+who do not want to change their historical
+implementations.
+.LP
+The POSIX Threads Extension states that multi-threaded applications
+must not modify \fIenviron\fP directly, and that
+IEEE\ Std\ 1003.1-2001 is providing functions which such applications
+can use in the future to manipulate the environment
+in a thread-safe manner. Thus, moving away from application use of
+\fIenviron\fP is desirable from that standpoint as well.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexec\fP(), \fIputenv\fP(), \fIsetenv\fP(), \fIunsetenv\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 8, Environment Variables, \fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/geteuid.3p b/man-pages-posix-2003/man3p/geteuid.3p
new file mode 100644
index 0000000..4751390
--- /dev/null
+++ b/man-pages-posix-2003/man3p/geteuid.3p
@@ -0,0 +1,59 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETEUID" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" geteuid
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+geteuid \- get the effective user ID
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+uid_t geteuid(void);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgeteuid\fP() function shall return the effective user ID of
+the calling process.
+.SH RETURN VALUE
+.LP
+The \fIgeteuid\fP() function shall always be successful and no return
+value is reserved to indicate an error.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgetegid\fP(), \fIgetgid\fP(), \fIgetuid\fP(), \fIsetegid\fP(),
+\fIseteuid\fP(), \fIsetgid\fP(), \fIsetregid\fP(), \fIsetreuid\fP(),
+\fIsetuid\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<sys/types.h>\fP, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getgid.3p b/man-pages-posix-2003/man3p/getgid.3p
new file mode 100644
index 0000000..0bee42b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getgid.3p
@@ -0,0 +1,59 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETGID" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getgid
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getgid \- get the real group ID
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+gid_t getgid(void);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetgid\fP() function shall return the real group ID of the
+calling process.
+.SH RETURN VALUE
+.LP
+The \fIgetgid\fP() function shall always be successful and no return
+value is reserved to indicate an error.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgetegid\fP(), \fIgeteuid\fP(), \fIgetuid\fP(), \fIsetegid\fP(),
+\fIseteuid\fP(), \fIsetgid\fP(), \fIsetregid\fP(), \fIsetreuid\fP(),
+\fIsetuid\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<sys/types.h>\fP, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getgrent.3p b/man-pages-posix-2003/man3p/getgrent.3p
new file mode 100644
index 0000000..3ee7088
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getgrent.3p
@@ -0,0 +1,111 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ENDGRENT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" endgrent
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+endgrent, getgrent, setgrent \- group database entry functions
+.SH SYNOPSIS
+.LP
+\fB#include <grp.h>
+.br
+.sp
+void endgrent(void);
+.br
+struct group *getgrent(void);
+.br
+void setgrent(void); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetgrent\fP() function shall return a pointer to a structure
+containing the broken-out fields of an entry in the group
+database. When first called, \fIgetgrent\fP() shall return a pointer
+to a \fBgroup\fP structure containing the first entry in the
+group database. Thereafter, it shall return a pointer to a \fBgroup\fP
+structure containing the next group structure in the group
+database, so successive calls may be used to search the entire database.
+.LP
+An implementation that provides extended security controls may impose
+further implementation-defined restrictions on accessing
+the group database. In particular, the system may deny the existence
+of some or all of the group database entries associated with
+groups other than those groups associated with the caller and may
+omit users other than the caller from the list of members of
+groups in database entries that are returned.
+.LP
+The \fIsetgrent\fP() function shall rewind the group database to allow
+repeated searches.
+.LP
+The \fIendgrent\fP() function may be called to close the group database
+when processing is complete.
+.LP
+These functions need not be reentrant. A function that is not required
+to be reentrant is not required to be thread-safe.
+.SH RETURN VALUE
+.LP
+When first called, \fIgetgrent\fP() shall return a pointer to the
+first group structure in the group database. Upon subsequent
+calls it shall return the next group structure in the group database.
+The \fIgetgrent\fP() function shall return a null pointer on
+end-of-file or an error and \fIerrno\fP may be set to indicate the
+error.
+.LP
+The return value may point to a static area which is overwritten by
+a subsequent call to \fIgetgrgid\fP(), \fIgetgrnam\fP(), or
+\fIgetgrent\fP().
+.SH ERRORS
+.LP
+The \fIgetgrent\fP() function may fail if:
+.TP 7
+.B EINTR
+A signal was caught during the operation.
+.TP 7
+.B EIO
+An I/O error has occurred.
+.TP 7
+.B EMFILE
+{OPEN_MAX} file descriptors are currently open in the calling process.
+.TP 7
+.B ENFILE
+The maximum allowable number of files is currently open in the system.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+These functions are provided due to their historical usage. Applications
+should avoid dependencies on fields in the group
+database, whether the database is a single file, or where in the file
+system name space the database resides. Applications should
+use \fIgetgrnam\fP() and \fIgetgrgid\fP()
+whenever possible because it avoids these dependencies.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgetgrgid\fP(), \fIgetgrnam\fP(), \fIgetlogin\fP(), \fIgetpwent\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<grp.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getgrgid.3p b/man-pages-posix-2003/man3p/getgrgid.3p
new file mode 100644
index 0000000..990fc7a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getgrgid.3p
@@ -0,0 +1,147 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETGRGID" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getgrgid
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getgrgid, getgrgid_r \- get group database entry for a group ID
+.SH SYNOPSIS
+.LP
+\fB#include <grp.h>
+.br
+.sp
+struct group *getgrgid(gid_t\fP \fIgid\fP\fB);
+.br
+\fP
+.LP
+\fBint getgrgid_r(gid_t\fP \fIgid\fP\fB, struct group *\fP\fIgrp\fP\fB,
+char
+*\fP\fIbuffer\fP\fB,
+.br
+\ \ \ \ \ \ size_t\fP \fIbufsize\fP\fB, struct group **\fP\fIresult\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetgrgid\fP() function shall search the group database for
+an entry with a matching \fIgid\fP.
+.LP
+The \fIgetgrgid\fP() function need not be reentrant. A function that
+is not required to be reentrant is not required to be
+thread-safe.
+.LP
+The \fIgetgrgid_r\fP() function shall update the \fBgroup\fP structure
+pointed to by \fIgrp\fP and store a pointer to that
+structure at the location pointed to by \fIresult\fP. The structure
+shall contain an entry from the group database with a matching
+\fIgid\fP. Storage referenced by the group structure is allocated
+from the memory provided with the \fIbuffer\fP parameter, which
+is \fIbufsize\fP bytes in size. The maximum size needed for this buffer
+can be determined with the {_SC_GETGR_R_SIZE_MAX} \fIsysconf\fP()
+parameter. A NULL pointer shall be returned at the location pointed
+to by
+\fIresult\fP on error or if the requested entry is not found.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIgetgrgid\fP() shall return a pointer
+to a \fBstruct group\fP with the structure defined in \fI<grp.h>\fP
+with a matching entry if one is found. The \fIgetgrgid\fP() function
+shall
+return a null pointer if either the requested entry was not found,
+or an error occurred. On error, \fIerrno\fP shall be set to
+indicate the error.
+.LP
+The return value may point to a static area which is overwritten by
+a subsequent call to \fIgetgrent\fP(), \fIgetgrgid\fP(), or \fIgetgrnam\fP().
+.LP
+If successful, the \fIgetgrgid_r\fP() function shall return zero;
+otherwise, an error number shall be returned to indicate the
+error.
+.SH ERRORS
+.LP
+The \fIgetgrgid\fP() and \fIgetgrgid_r\fP() functions may fail if:
+.TP 7
+.B EIO
+An I/O error has occurred.
+.TP 7
+.B EINTR
+A signal was caught during \fIgetgrgid\fP().
+.TP 7
+.B EMFILE
+{OPEN_MAX} file descriptors are currently open in the calling process.
+.TP 7
+.B ENFILE
+The maximum allowable number of files is currently open in the system.
+.sp
+.LP
+The \fIgetgrgid_r\fP() function may fail if:
+.TP 7
+.B ERANGE
+Insufficient storage was supplied via \fIbuffer\fP and \fIbufsize\fP
+to contain the data to be referenced by the resulting
+\fBgroup\fP structure.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Finding an Entry in the Group Database
+.LP
+The following example uses \fIgetgrgid\fP() to search the group database
+for a group ID that was previously stored in a
+\fBstat\fP structure, then prints out the group name if it is found.
+If the group is not found, the program prints the numeric
+value of the group for the entry.
+.sp
+.RS
+.nf
+
+\fB#include <sys/types.h>
+#include <grp.h>
+#include <stdio.h>
+\&...
+struct stat statbuf;
+struct group *grp;
+\&...
+if ((grp = getgrgid(statbuf.st_gid)) != NULL)
+ printf(" %-8.8s", grp->gr_name);
+else
+ printf(" %-8d", statbuf.st_gid);
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+Applications wishing to check for error situations should set \fIerrno\fP
+to 0 before calling \fIgetgrgid\fP(). If
+\fIerrno\fP is set on return, an error occurred.
+.LP
+The \fIgetgrgid_r\fP() function is thread-safe and shall return values
+in a user-supplied buffer instead of possibly using a
+static data area that may be overwritten by each call.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIendgrent\fP(), \fIgetgrnam\fP(), the Base Definitions volume
+of
+IEEE\ Std\ 1003.1-2001, \fI<grp.h>\fP, \fI<limits.h>\fP, \fI<sys/types.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getgrgid_r.3p b/man-pages-posix-2003/man3p/getgrgid_r.3p
new file mode 100644
index 0000000..b0bb4ae
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getgrgid_r.3p
@@ -0,0 +1 @@
+.so man3p/getgrgid.3p
diff --git a/man-pages-posix-2003/man3p/getgrnam.3p b/man-pages-posix-2003/man3p/getgrnam.3p
new file mode 100644
index 0000000..db96583
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getgrnam.3p
@@ -0,0 +1,124 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETGRNAM" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getgrnam
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getgrnam, getgrnam_r \- search group database for a name
+.SH SYNOPSIS
+.LP
+\fB#include <grp.h>
+.br
+.sp
+struct group *getgrnam(const char *\fP\fIname\fP\fB);
+.br
+\fP
+.LP
+\fBint getgrnam_r(const char *\fP\fIname\fP\fB, struct group *\fP\fIgrp\fP\fB,
+char
+*\fP\fIbuffer\fP\fB,
+.br
+\ \ \ \ \ \ size_t\fP \fIbufsize\fP\fB, struct group **\fP\fIresult\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetgrnam\fP() function shall search the group database for
+an entry with a matching \fIname\fP.
+.LP
+The \fIgetgrnam\fP() function need not be reentrant. A function that
+is not required to be reentrant is not required to be
+thread-safe.
+.LP
+The \fIgetgrnam_r\fP() function shall update the \fBgroup\fP structure
+pointed to by \fIgrp\fP and store a pointer to that
+structure at the location pointed to by \fIresult\fP. The structure
+shall contain an entry from the group database with a matching
+\fIgid\fP or \fIname\fP. Storage referenced by the \fBgroup\fP structure
+is allocated from the memory provided with the
+\fIbuffer\fP parameter, which is \fIbufsize\fP bytes in size. The
+maximum size needed for this buffer can be determined with the
+{_SC_GETGR_R_SIZE_MAX} \fIsysconf\fP() parameter. A NULL pointer is
+returned at the
+location pointed to by \fIresult\fP on error or if the requested entry
+is not found.
+.SH RETURN VALUE
+.LP
+The \fIgetgrnam\fP() function shall return a pointer to a \fBstruct
+group\fP with the structure defined in \fI<grp.h>\fP with a matching
+entry if one is found. The \fIgetgrnam\fP() function shall
+return a null pointer if either the requested entry was not found,
+or an error occurred. On error, \fIerrno\fP shall be set to
+indicate the error.
+.LP
+The return value may point to a static area which is overwritten by
+a subsequent call to \fIgetgrent\fP(), \fIgetgrgid\fP(), or
+\fIgetgrnam\fP().
+.LP
+If successful, the \fIgetgrnam_r\fP() function shall return zero;
+otherwise, an error number shall be returned to indicate the
+error.
+.SH ERRORS
+.LP
+The \fIgetgrnam\fP() and \fIgetgrnam_r\fP() functions may fail if:
+.TP 7
+.B EIO
+An I/O error has occurred.
+.TP 7
+.B EINTR
+A signal was caught during \fIgetgrnam\fP().
+.TP 7
+.B EMFILE
+{OPEN_MAX} file descriptors are currently open in the calling process.
+.TP 7
+.B ENFILE
+The maximum allowable number of files is currently open in the system.
+.sp
+.LP
+The \fIgetgrnam_r\fP() function may fail if:
+.TP 7
+.B ERANGE
+Insufficient storage was supplied via \fIbuffer\fP and \fIbufsize\fP
+to contain the data to be referenced by the resulting
+\fBgroup\fP structure.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Applications wishing to check for error situations should set \fIerrno\fP
+to 0 before calling \fIgetgrnam\fP(). If
+\fIerrno\fP is set on return, an error occurred.
+.LP
+The \fIgetgrnam_r\fP() function is thread-safe and shall return values
+in a user-supplied buffer instead of possibly using a
+static data area that may be overwritten by each call.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIendgrent\fP(), \fIgetgrgid\fP(), the Base Definitions volume
+of
+IEEE\ Std\ 1003.1-2001, \fI<grp.h>\fP, \fI<limits.h>\fP, \fI<sys/types.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getgrnam_r.3p b/man-pages-posix-2003/man3p/getgrnam_r.3p
new file mode 100644
index 0000000..2103de3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getgrnam_r.3p
@@ -0,0 +1 @@
+.so man3p/getgrnam.3p
diff --git a/man-pages-posix-2003/man3p/getgroups.3p b/man-pages-posix-2003/man3p/getgroups.3p
new file mode 100644
index 0000000..88844ec
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getgroups.3p
@@ -0,0 +1,121 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETGROUPS" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getgroups
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getgroups \- get supplementary group IDs
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+int getgroups(int\fP \fIgidsetsize\fP\fB, gid_t\fP \fIgrouplist\fP\fB[]);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetgroups\fP() function shall fill in the array \fIgrouplist\fP
+with the current supplementary group IDs of the calling
+process. It is implementation-defined whether \fIgetgroups\fP() also
+returns the effective group ID in the \fIgrouplist\fP
+array.
+.LP
+The \fIgidsetsize\fP argument specifies the number of elements in
+the array \fIgrouplist\fP. The actual number of group IDs
+stored in the array shall be returned. The values of array entries
+with indices greater than or equal to the value returned are
+undefined.
+.LP
+If \fIgidsetsize\fP is 0, \fIgetgroups\fP() shall return the number
+of group IDs that it would otherwise return without
+modifying the array pointed to by \fIgrouplist\fP.
+.LP
+If the effective group ID of the process is returned with the supplementary
+group IDs, the value returned shall always be
+greater than or equal to one and less than or equal to the value of
+{NGROUPS_MAX}+1.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the number of supplementary group IDs
+shall be returned. A return value of -1 indicates failure and
+\fIerrno\fP shall be set to indicate the error.
+.SH ERRORS
+.LP
+The \fIgetgroups\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The \fIgidsetsize\fP argument is non-zero and less than the number
+of group IDs that would have been returned.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Getting the Supplementary Group IDs of the Calling Process
+.LP
+The following example places the current supplementary group IDs of
+the calling process into the \fIgroup\fP array.
+.sp
+.RS
+.nf
+
+\fB#include <sys/types.h>
+#include <unistd.h>
+\&...
+gid_t *group;
+int nogroups;
+long ngroups_max;
+.sp
+
+ngroups_max = sysconf(_SC_NGROUPS_MAX) + 1;
+group = (gid_t *)malloc(ngroups_max *sizeof(gid_t));
+.sp
+
+ngroups = getgroups(ngroups_max, group);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The related function \fIsetgroups\fP() is a privileged operation and
+therefore is not covered by this volume of
+IEEE\ Std\ 1003.1-2001.
+.LP
+As implied by the definition of supplementary groups, the effective
+group ID may appear in the array returned by
+\fIgetgroups\fP() or it may be returned only by \fIgetegid\fP(). Duplication
+may exist,
+but the application needs to call \fIgetegid\fP() to be sure of getting
+all of the
+information. Various implementation variations and administrative
+sequences cause the set of groups appearing in the result of
+\fIgetgroups\fP() to vary in order and as to whether the effective
+group ID is included, even when the set of groups is the same
+(in the mathematical sense of "set"). (The history of a process and
+its parents could affect the details of the result.)
+.LP
+Application writers should note that {NGROUPS_MAX} is not necessarily
+a constant on all implementations.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgetegid\fP(), \fIsetgid\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<sys/types.h>\fP, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/gethostbyaddr.3p b/man-pages-posix-2003/man3p/gethostbyaddr.3p
new file mode 100644
index 0000000..40a1ddd
--- /dev/null
+++ b/man-pages-posix-2003/man3p/gethostbyaddr.3p
@@ -0,0 +1 @@
+.so man3p/gethostbyname.3p
diff --git a/man-pages-posix-2003/man3p/gethostbyname.3p b/man-pages-posix-2003/man3p/gethostbyname.3p
new file mode 100644
index 0000000..9133ded
--- /dev/null
+++ b/man-pages-posix-2003/man3p/gethostbyname.3p
@@ -0,0 +1,149 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETHOSTBYADDR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" gethostbyaddr
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+gethostbyaddr, gethostbyname \- network host database functions
+.SH SYNOPSIS
+.LP
+\fB#include <netdb.h>
+.br
+.sp
+\fP
+.LP
+\fBstruct hostent *gethostbyaddr(const void *\fP\fIaddr\fP\fB, socklen_t\fP
+\fIlen\fP\fB,
+.br
+\ \ \ \ \ \ int\fP \fItype\fP\fB);
+.br
+struct hostent *gethostbyname(const char *\fP\fIname\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall retrieve information about hosts. This information
+is considered to be stored in a database that can be
+accessed sequentially or randomly. Implementation of this database
+is unspecified.
+.TP 7
+\fBNote:\fP
+In many cases it is implemented by the Domain Name System, as documented
+in RFC\ 1034, RFC\ 1035, and
+RFC\ 1886.
+.sp
+.LP
+Entries shall be returned in \fBhostent\fP structures.
+.LP
+The \fIgethostbyaddr\fP() function shall return an entry containing
+addresses of address family \fItype\fP for the host with
+address \fIaddr\fP. The \fIlen\fP argument contains the length of
+the address pointed to by \fIaddr\fP. The
+\fIgethostbyaddr\fP() function need not be reentrant. A function that
+is not required to be reentrant is not required to be
+thread-safe.
+.LP
+The \fIgethostbyname\fP() function shall return an entry containing
+addresses of address family AF_INET for the host with name
+\fIname\fP. The \fIgethostbyname\fP() function need not be reentrant.
+A function that is not required to be reentrant is not
+required to be thread-safe.
+.LP
+The \fIaddr\fP argument of \fIgethostbyaddr\fP() shall be an \fBin_addr\fP
+structure when \fItype\fP is AF_INET. It contains
+a binary format (that is, not null-terminated) address in network
+byte order. The \fIgethostbyaddr\fP() function is not guaranteed
+to return addresses of address families other than AF_INET, even when
+such addresses exist in the database.
+.LP
+If \fIgethostbyaddr\fP() returns successfully, then the \fIh_addrtype\fP
+field in the result shall be the same as the
+\fItype\fP argument that was passed to the function, and the \fIh_addr_list\fP
+field shall list a single address that is a copy
+of the \fIaddr\fP argument that was passed to the function.
+.LP
+The \fIname\fP argument of \fIgethostbyname\fP() shall be a node name;
+the behavior of \fIgethostbyname\fP() when passed a
+numeric address string is unspecified. For IPv4, a numeric address
+string shall be in the dotted-decimal notation described in \fIinet_addr\fP()
+\&.
+.LP
+If \fIname\fP is not a numeric address string and is an alias for
+a valid host name, then \fIgethostbyname\fP() shall return
+information about the host name to which the alias refers, and \fIname\fP
+shall be included in the list of aliases returned.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return a pointer
+to a \fBhostent\fP structure if the requested entry was
+found, and a null pointer if the end of the database was reached or
+the requested entry was not found.
+.LP
+Upon unsuccessful completion, \fIgethostbyaddr\fP() and \fIgethostbyname\fP()
+shall set \fIh_errno\fP to indicate the
+error.
+.SH ERRORS
+.LP
+These functions shall fail in the following cases. The \fIgethostbyaddr\fP()
+and \fIgethostbyname\fP() functions shall set
+\fIh_errno\fP to the value shown in the list below. Any changes to
+\fIerrno\fP are unspecified.
+.TP 7
+.B HOST_NOT_FOUND
+.sp
+No such host is known.
+.TP 7
+.B NO_DATA
+The server recognized the request and the name, but no address is
+available. Another type of request to the name server for the
+domain might return an answer.
+.TP 7
+.B NO_RECOVERY
+.sp
+An unexpected server failure occurred which cannot be recovered.
+.TP 7
+.B TRY_AGAIN
+A temporary and possibly transient error occurred, such as a failure
+of a server to respond.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIgethostbyaddr\fP() and \fIgethostbyname\fP() functions may
+return pointers to static data, which may be overwritten by
+subsequent calls to any of these functions.
+.LP
+The \fIgetaddrinfo\fP() and \fIgetnameinfo\fP() functions are preferred
+over the \fIgethostbyaddr\fP() and
+\fIgethostbyname\fP() functions.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+The \fIgethostbyaddr\fP() and \fIgethostbyname\fP() functions may
+be withdrawn in a future version.
+.SH SEE ALSO
+.LP
+\fIendhostent\fP(), \fIendservent\fP(), \fIgai_strerror\fP(), \fIgetaddrinfo\fP(),
+\fIh_errno\fP(), \fIinet_addr\fP(), the Base Definitions volume
+of
+IEEE\ Std\ 1003.1-2001, \fI<netdb.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/gethostent.3p b/man-pages-posix-2003/man3p/gethostent.3p
new file mode 100644
index 0000000..c7df19a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/gethostent.3p
@@ -0,0 +1,95 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ENDHOSTENT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" endhostent
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+endhostent, gethostent, sethostent \- network host database functions
+.SH SYNOPSIS
+.LP
+\fB#include <netdb.h>
+.br
+.sp
+void endhostent(void);
+.br
+struct hostent *gethostent(void);
+.br
+void sethostent(int\fP \fIstayopen\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall retrieve information about hosts. This information
+is considered to be stored in a database that can be
+accessed sequentially or randomly. The implementation of this database
+is unspecified.
+.TP 7
+\fBNote:\fP
+In many cases this database is implemented by the Domain Name System,
+as documented in RFC\ 1034, RFC\ 1035, and
+RFC\ 1886.
+.sp
+.LP
+The \fIsethostent\fP() function shall open a connection to the database
+and set the next entry for retrieval to the first entry
+in the database. If the \fIstayopen\fP argument is non-zero, the connection
+shall not be closed by a call to \fIgethostent\fP(),
+\fIgethostbyname\fP(), or \fIgethostbyaddr\fP(), and the implementation
+may maintain an open file descriptor.
+.LP
+The \fIgethostent\fP() function shall read the next entry in the database,
+opening and closing a connection to the database as
+necessary.
+.LP
+Entries shall be returned in \fBhostent\fP structures. Refer to \fIgethostbyaddr\fP()
+for a
+definition of the \fBhostent\fP structure.
+.LP
+The \fIendhostent\fP() function shall close the connection to the
+database, releasing any open file descriptor.
+.LP
+These functions need not be reentrant. A function that is not required
+to be reentrant is not required to be thread-safe.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIgethostent\fP() function shall
+return a pointer to a \fBhostent\fP structure if the
+requested entry was found, and a null pointer if the end of the database
+was reached or the requested entry was not found.
+.SH ERRORS
+.LP
+No errors are defined for \fIendhostent\fP(), \fIgethostent\fP(),
+and \fIsethostent\fP().
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIgethostent\fP() function may return pointers to static data,
+which may be overwritten by subsequent calls to any of
+these functions.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIendservent\fP(), \fIgethostbyaddr\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<netdb.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/gethostid.3p b/man-pages-posix-2003/man3p/gethostid.3p
new file mode 100644
index 0000000..0886c6b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/gethostid.3p
@@ -0,0 +1,59 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETHOSTID" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" gethostid
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+gethostid \- get an identifier for the current host
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+long gethostid(void); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgethostid\fP() function shall retrieve a 32-bit identifier
+for the current host.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIgethostid\fP() shall return an identifier
+for the current host.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+This volume of IEEE\ Std\ 1003.1-2001 does not define the domain in
+which the return value is unique.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIrandom\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/gethostname.3p b/man-pages-posix-2003/man3p/gethostname.3p
new file mode 100644
index 0000000..f8c0b3b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/gethostname.3p
@@ -0,0 +1,64 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETHOSTNAME" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" gethostname
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+gethostname \- get name of current host
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+int gethostname(char *\fP\fIname\fP\fB, size_t\fP \fInamelen\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgethostname\fP() function shall return the standard host name
+for the current machine. The \fInamelen\fP argument shall
+specify the size of the array pointed to by the \fIname\fP argument.
+The returned name shall be null-terminated, except that if
+\fInamelen\fP is an insufficient length to hold the host name, then
+the returned name shall be truncated and it is unspecified
+whether the returned name is null-terminated.
+.LP
+Host names are limited to {HOST_NAME_MAX} bytes.
+.SH RETURN VALUE
+.LP
+Upon successful completion, 0 shall be returned; otherwise, -1 shall
+be returned.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgethostid\fP(), \fIuname\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getitimer.3p b/man-pages-posix-2003/man3p/getitimer.3p
new file mode 100644
index 0000000..24cc9a1
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getitimer.3p
@@ -0,0 +1,122 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETITIMER" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getitimer
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getitimer, setitimer \- get and set value of interval timer
+.SH SYNOPSIS
+.LP
+\fB#include <sys/time.h>
+.br
+.sp
+int getitimer(int\fP \fIwhich\fP\fB, struct itimerval *\fP\fIvalue\fP\fB);
+.br
+int setitimer(int\fP \fIwhich\fP\fB, const struct itimerval *restrict\fP
+\fIvalue\fP\fB,
+.br
+\ \ \ \ \ \ struct itimerval *restrict\fP \fIovalue\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetitimer\fP() function shall store the current value of the
+timer specified by \fIwhich\fP into the structure pointed
+to by \fIvalue\fP. The \fIsetitimer\fP() function shall set the timer
+specified by \fIwhich\fP to the value specified in the
+structure pointed to by \fIvalue\fP, and if \fIovalue\fP is not a
+null pointer, store the previous value of the timer in the
+structure pointed to by \fIovalue\fP.
+.LP
+A timer value is defined by the \fBitimerval\fP structure, specified
+in \fI<sys/time.h>\fP. If \fIit_value\fP is non-zero, it shall indicate
+the time to the next
+timer expiration. If \fIit_interval\fP is non-zero, it shall specify
+a value to be used in reloading \fIit_value\fP when the
+timer expires. Setting \fIit_value\fP to 0 shall disable a timer,
+regardless of the value of \fIit_interval\fP. Setting
+\fIit_interval\fP to 0 shall disable a timer after its next expiration
+(assuming \fIit_value\fP is non-zero).
+.LP
+Implementations may place limitations on the granularity of timer
+values. For each interval timer, if the requested timer value
+requires a finer granularity than the implementation supports, the
+actual timer value shall be rounded up to the next supported
+value.
+.LP
+An XSI-conforming implementation provides each process with at least
+three interval timers, which are indicated by the
+\fIwhich\fP argument:
+.TP 7
+ITIMER_REAL
+Decrements in real time. A SIGALRM signal is delivered when this timer
+expires.
+.TP 7
+ITIMER_VIRTUAL
+Decrements in process virtual time. It runs only when the process
+is executing. A SIGVTALRM signal is delivered when it
+expires.
+.TP 7
+ITIMER_PROF
+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 ITIMER_PROF timer expires, the SIGPROF
+signal is delivered.
+.sp
+.LP
+The interaction between \fIsetitimer\fP() and any of \fIalarm\fP(),
+\fIsleep\fP(), or \fIusleep\fP() is unspecified.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIgetitimer\fP() or \fIsetitimer\fP()
+shall return 0; otherwise, -1 shall be returned and
+\fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fIsetitimer\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The \fIvalue\fP argument is not in canonical form. (In canonical form,
+the number of microseconds is a non-negative integer
+less than 1000000 and the number of seconds is a non-negative integer.)
+.sp
+.LP
+The \fIgetitimer\fP() and \fIsetitimer\fP() functions may fail if:
+.TP 7
+.B EINVAL
+The \fIwhich\fP argument is not recognized.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIalarm\fP(), \fIsleep\fP(), \fItimer_getoverrun\fP(), \fIualarm\fP(),
+\fIusleep\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<signal.h>\fP, \fI<sys/time.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getlogin.3p b/man-pages-posix-2003/man3p/getlogin.3p
new file mode 100644
index 0000000..48fc982
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getlogin.3p
@@ -0,0 +1,177 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETLOGIN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getlogin
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getlogin, getlogin_r \- get login name
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+char *getlogin(void);
+.br
+\fP
+.LP
+\fBint getlogin_r(char *\fP\fIname\fP\fB, size_t\fP \fInamesize\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetlogin\fP() function shall return a pointer to a string containing
+the user name associated by the login activity with
+the controlling terminal of the current process. If \fIgetlogin\fP()
+returns a non-null pointer, then that pointer points to the
+name that the user logged in under, even if there are several login
+names with the same user ID.
+.LP
+The \fIgetlogin\fP() function need not be reentrant. A function that
+is not required to be reentrant is not required to be
+thread-safe.
+.LP
+The \fIgetlogin_r\fP() function shall put the name associated by the
+login activity with the controlling terminal of the current
+process in the character array pointed to by \fIname\fP. The array
+is \fInamesize\fP characters long and should have space for
+the name and the terminating null character. The maximum size of the
+login name is {LOGIN_NAME_MAX}.
+.LP
+If \fIgetlogin_r\fP() is successful, \fIname\fP points to the name
+the user used at login, even if there are several login
+names with the same user ID.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIgetlogin\fP() shall return a pointer
+to the login name or a null pointer if the user's login
+name cannot be found. Otherwise, it shall return a null pointer and
+set \fIerrno\fP to indicate the error.
+.LP
+The return value from \fIgetlogin\fP() may point to static data whose
+content is overwritten by each call.
+.LP
+If successful, the \fIgetlogin_r\fP() function shall return zero;
+otherwise, an error number shall be returned to indicate the
+error.
+.SH ERRORS
+.LP
+The \fIgetlogin\fP() and \fIgetlogin_r\fP() functions may fail if:
+.TP 7
+.B EMFILE
+{OPEN_MAX} file descriptors are currently open in the calling process.
+.TP 7
+.B ENFILE
+The maximum allowable number of files is currently open in the system.
+.TP 7
+.B ENXIO
+The calling process has no controlling terminal.
+.sp
+.LP
+The \fIgetlogin_r\fP() function may fail if:
+.TP 7
+.B ERANGE
+The value of \fInamesize\fP is smaller than the length of the string
+to be returned including the terminating null character.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Getting the User Login Name
+.LP
+The following example calls the \fIgetlogin\fP() function to obtain
+the name of the user associated with the calling process,
+and passes this information to the \fIgetpwnam\fP() function to get
+the associated user
+database information.
+.sp
+.RS
+.nf
+
+\fB#include <unistd.h>
+#include <sys/types.h>
+#include <pwd.h>
+#include <stdio.h>
+\&...
+char *lgn;
+struct passwd *pw;
+\&...
+if ((lgn = getlogin()) == NULL || (pw = getpwnam(lgn)) == NULL) {
+ fprintf(stderr, "Get of user information failed.\\n"); exit(1);
+ }
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+Three names associated with the current process can be determined:
+\fIgetpwuid\fP( \fIgeteuid\fP()) shall return the name associated
+with the effective user ID of the process;
+\fIgetlogin\fP() shall return the name associated with the current
+login activity; and \fIgetpwuid\fP( \fIgetuid\fP()) shall return the
+name associated with the real user ID of the process.
+.LP
+The \fIgetlogin_r\fP() function is thread-safe and returns values
+in a user-supplied buffer instead of possibly using a static
+data area that may be overwritten by each call.
+.SH RATIONALE
+.LP
+The \fIgetlogin\fP() function returns a pointer to the user's login
+name. The same user ID may be shared by several login
+names. If it is desired to get the user database entry that is used
+during login, the result of \fIgetlogin\fP() should be used to
+provide the argument to the \fIgetpwnam\fP() function. (This might
+be used to determine
+the user's login shell, particularly where a single user has multiple
+login shells with distinct login names, but the same user
+ID.)
+.LP
+The information provided by the \fIcuserid\fP() function, which was
+originally defined in the POSIX.1-1988 standard and
+subsequently removed, can be obtained by the following:
+.sp
+.RS
+.nf
+
+\fBgetpwuid(geteuid())
+\fP
+.fi
+.RE
+.LP
+while the information provided by historical implementations of \fIcuserid\fP()
+can be obtained by:
+.sp
+.RS
+.nf
+
+\fBgetpwuid(getuid())
+\fP
+.fi
+.RE
+.LP
+The thread-safe version of this function places the user name in a
+user-supplied buffer and returns a non-zero value if it
+fails. The non-thread-safe version may return the name in a static
+data area that may be overwritten by each call.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgetpwnam\fP(), \fIgetpwuid\fP(), \fIgeteuid\fP(), \fIgetuid\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<limits.h>\fP, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getlogin_r.3p b/man-pages-posix-2003/man3p/getlogin_r.3p
new file mode 100644
index 0000000..ebb17b8
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getlogin_r.3p
@@ -0,0 +1 @@
+.so man3p/getlogin.3p
diff --git a/man-pages-posix-2003/man3p/getmsg.3p b/man-pages-posix-2003/man3p/getmsg.3p
new file mode 100644
index 0000000..16f185d
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getmsg.3p
@@ -0,0 +1,283 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETMSG" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getmsg
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getmsg, getpmsg \- receive next message from a STREAMS file (\fBSTREAMS\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <stropts.h>
+.br
+.sp
+int getmsg(int\fP \fIfildes\fP\fB, struct strbuf *restrict\fP \fIctlptr\fP\fB,
+.br
+\ \ \ \ \ \ struct strbuf *restrict\fP \fIdataptr\fP\fB, int *restrict\fP
+\fIflagsp\fP\fB);
+.br
+int getpmsg(int\fP \fIfildes\fP\fB, struct strbuf *restrict\fP \fIctlptr\fP\fB,
+.br
+\ \ \ \ \ \ struct strbuf *restrict\fP \fIdataptr\fP\fB, int *restrict\fP
+\fIbandp\fP\fB,
+.br
+\ \ \ \ \ \ int *restrict\fP \fIflagsp\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetmsg\fP() function shall retrieve the contents of a message
+located at the head of the STREAM head read queue
+associated with a STREAMS file and place the contents into one or
+more buffers. The message contains either a data part, a control
+part, or both. The data and control parts of the message shall be
+placed into separate buffers, as described below. The semantics
+of each part are defined by the originator of the message.
+.LP
+The \fIgetpmsg\fP() function shall be equivalent to \fIgetmsg\fP(),
+except that it provides finer control over the priority of
+the messages received. Except where noted, all requirements on \fIgetmsg\fP()
+also pertain to \fIgetpmsg\fP().
+.LP
+The \fIfildes\fP argument specifies a file descriptor referencing
+a STREAMS-based file.
+.LP
+The \fIctlptr\fP and \fIdataptr\fP arguments each point to a \fBstrbuf\fP
+structure, in which the \fIbuf\fP member points to
+a buffer in which the data or control information is to be placed,
+and the \fImaxlen\fP member indicates the maximum number of
+bytes this buffer can hold. On return, the \fIlen\fP member shall
+contain the number of bytes of data or control information
+actually received. The \fIlen\fP member shall be set to 0 if there
+is a zero-length control or data part and \fIlen\fP shall be
+set to -1 if no data or control information is present in the message.
+.LP
+When \fIgetmsg\fP() is called, \fIflagsp\fP should point to an integer
+that indicates the type of message the process is able
+to receive. This is described further below.
+.LP
+The \fIctlptr\fP argument is used to hold the control part of the
+message, and \fIdataptr\fP is used to hold the data part of
+the message. If \fIctlptr\fP (or \fIdataptr\fP) is a null pointer
+or the \fImaxlen\fP member is -1, the control (or data) part
+of the message shall not be processed and shall be left on the STREAM
+head read queue, and if the \fIctlptr\fP (or \fIdataptr\fP)
+is not a null pointer, \fIlen\fP shall be set to -1. If the \fImaxlen\fP
+member is set to 0 and there is a zero-length control
+(or data) part, that zero-length part shall be removed from the read
+queue and \fIlen\fP shall be set to 0. If the \fImaxlen\fP
+member is set to 0 and there are more than 0 bytes of control (or
+data) information, that information shall be left on the read
+queue and \fIlen\fP shall be set to 0. If the \fImaxlen\fP member
+in \fIctlptr\fP (or \fIdataptr\fP) is less than the control
+(or data) part of the message, \fImaxlen\fP bytes shall be retrieved.
+In this case, the remainder of the message shall be left on
+the STREAM head read queue and a non-zero return value shall be provided.
+.LP
+By default, \fIgetmsg\fP() shall process the first available message
+on the STREAM head read queue. However, a process may
+choose to retrieve only high-priority messages by setting the integer
+pointed to by \fIflagsp\fP to RS_HIPRI. In this case,
+\fIgetmsg\fP() shall only process the next message if it is a high-priority
+message. When the integer pointed to by \fIflagsp\fP
+is 0, any available message shall be retrieved. In this case, on return,
+the integer pointed to by \fIflagsp\fP shall be set to
+RS_HIPRI if a high-priority message was retrieved, or 0 otherwise.
+.LP
+For \fIgetpmsg\fP(), the flags are different. The \fIflagsp\fP argument
+points to a bitmask with the following
+mutually-exclusive flags defined: MSG_HIPRI, MSG_BAND, and MSG_ANY.
+Like \fIgetmsg\fP(), \fIgetpmsg\fP() shall process the first
+available message on the STREAM head read queue. A process may choose
+to retrieve only high-priority messages by setting the
+integer pointed to by \fIflagsp\fP to MSG_HIPRI and the integer pointed
+to by \fIbandp\fP to 0. In this case, \fIgetpmsg\fP()
+shall only process the next message if it is a high-priority message.
+In a similar manner, a process may choose to retrieve a
+message from a particular priority band by setting the integer pointed
+to by \fIflagsp\fP to MSG_BAND and the integer pointed to
+by \fIbandp\fP to the priority band of interest. In this case, \fIgetpmsg\fP()
+shall only process the next message if it is in a
+priority band equal to, or greater than, the integer pointed to by
+\fIbandp\fP, or if it is a high-priority message. If a process
+wants to get the first message off the queue, the integer pointed
+to by \fIflagsp\fP should be set to MSG_ANY and the integer
+pointed to by \fIbandp\fP should be set to 0. On return, if the message
+retrieved was a high-priority message, the integer pointed
+to by \fIflagsp\fP shall be set to MSG_HIPRI and the integer pointed
+to by \fIbandp\fP shall be set to 0. Otherwise, the integer
+pointed to by \fIflagsp\fP shall be set to MSG_BAND and the integer
+pointed to by \fIbandp\fP shall be set to the priority band
+of the message.
+.LP
+If O_NONBLOCK is not set, \fIgetmsg\fP() and \fIgetpmsg\fP() shall
+block until a message of the type specified by
+\fIflagsp\fP is available at the front of the STREAM head read queue.
+If O_NONBLOCK is set and a message of the specified type is
+not present at the front of the read queue, \fIgetmsg\fP() and \fIgetpmsg\fP()
+shall fail and set \fIerrno\fP to [EAGAIN].
+.LP
+If a hangup occurs on the STREAM from which messages are retrieved,
+\fIgetmsg\fP() and \fIgetpmsg\fP() shall continue to
+operate normally, as described above, until the STREAM head read queue
+is empty. Thereafter, they shall return 0 in the \fIlen\fP
+members of \fIctlptr\fP and \fIdataptr\fP.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIgetmsg\fP() and \fIgetpmsg\fP() shall
+return a non-negative value. A value of 0 indicates that
+a full message was read successfully. A return value of MORECTL indicates
+that more control information is waiting for retrieval. A
+return value of MOREDATA indicates that more data is waiting for retrieval.
+A return value of the bitwise-logical OR of MORECTL and
+MOREDATA indicates that both types of information remain. Subsequent
+\fIgetmsg\fP() and \fIgetpmsg\fP() calls shall retrieve the
+remainder of the message. However, if a message of higher priority
+has come in on the STREAM head read queue, the next call to
+\fIgetmsg\fP() or \fIgetpmsg\fP() shall retrieve that higher-priority
+message before retrieving the remainder of the previous
+message.
+.LP
+If the high priority control part of the message is consumed, the
+message shall be placed back on the queue as a normal message
+of band 0. Subsequent \fIgetmsg\fP() and \fIgetpmsg\fP() calls shall
+retrieve the remainder of the message. If, however, a
+priority message arrives or already exists on the STREAM head, the
+subsequent call to \fIgetmsg\fP() or \fIgetpmsg\fP() shall
+retrieve the higher-priority message before retrieving the remainder
+of the message that was put back.
+.LP
+Upon failure, \fIgetmsg\fP() and \fIgetpmsg\fP() shall return -1 and
+set \fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fIgetmsg\fP() and \fIgetpmsg\fP() functions shall fail if:
+.TP 7
+.B EAGAIN
+The O_NONBLOCK flag is set and no messages are available.
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not a valid file descriptor open for
+reading.
+.TP 7
+.B EBADMSG
+The queued message to be read is not valid for \fIgetmsg\fP() or \fIgetpmsg\fP()
+or a pending file descriptor is at the
+STREAM head.
+.TP 7
+.B EINTR
+A signal was caught during \fIgetmsg\fP() or \fIgetpmsg\fP().
+.TP 7
+.B EINVAL
+An illegal value was specified by \fIflagsp\fP, or the STREAM or multiplexer
+referenced by \fIfildes\fP is linked (directly
+or indirectly) downstream from a multiplexer.
+.TP 7
+.B ENOSTR
+A STREAM is not associated with \fIfildes\fP.
+.sp
+.LP
+In addition, \fIgetmsg\fP() and \fIgetpmsg\fP() shall fail if the
+STREAM head had processed an asynchronous error before the
+call. In this case, the value of \fIerrno\fP does not reflect the
+result of \fIgetmsg\fP() or \fIgetpmsg\fP() but reflects the
+prior error.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Getting Any Message
+.LP
+In the following example, the value of \fIfd\fP is assumed to refer
+to an open STREAMS file. The call to \fIgetmsg\fP()
+retrieves any available message on the associated STREAM-head read
+queue, returning control and data information to the buffers
+pointed to by \fIctrlbuf\fP and \fIdatabuf\fP, respectively.
+.sp
+.RS
+.nf
+
+\fB#include <stropts.h>
+\&...
+int fd;
+char ctrlbuf[128];
+char databuf[512];
+struct strbuf ctrl;
+struct strbuf data;
+int flags = 0;
+int ret;
+.sp
+
+ctrl.buf = ctrlbuf;
+ctrl.maxlen = sizeof(ctrlbuf);
+.sp
+
+data.buf = databuf;
+data.maxlen = sizeof(databuf);
+.sp
+
+ret = getmsg (fd, &ctrl, &data, &flags);
+\fP
+.fi
+.RE
+.SS Getting the First Message off the Queue
+.LP
+In the following example, the call to \fIgetpmsg\fP() retrieves the
+first available message on the associated STREAM-head read
+queue.
+.sp
+.RS
+.nf
+
+\fB#include <stropts.h>
+\&...
+.sp
+
+int fd;
+char ctrlbuf[128];
+char databuf[512];
+struct strbuf ctrl;
+struct strbuf data;
+int band = 0;
+int flags = MSG_ANY;
+int ret;
+.sp
+
+ctrl.buf = ctrlbuf;
+ctrl.maxlen = sizeof(ctrlbuf);
+.sp
+
+data.buf = databuf;
+data.maxlen = sizeof(databuf);
+.sp
+
+ret = getpmsg (fd, &ctrl, &data, &band, &flags);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fISTREAMS\fP, \fIpoll\fP(), \fIputmsg\fP(), \fIread\fP(), \fIwrite\fP(),
+the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<stropts.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getnameinfo.3p b/man-pages-posix-2003/man3p/getnameinfo.3p
new file mode 100644
index 0000000..c8236b6
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getnameinfo.3p
@@ -0,0 +1,198 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETNAMEINFO" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getnameinfo
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getnameinfo \- get name information
+.SH SYNOPSIS
+.LP
+\fB#include <sys/socket.h>
+.br
+#include <netdb.h>
+.br
+.sp
+int getnameinfo(const struct sockaddr *restrict\fP \fIsa\fP\fB, socklen_t\fP
+\fIsalen\fP\fB,
+.br
+\ \ \ \ \ \ char *restrict\fP \fInode\fP\fB, socklen_t\fP \fInodelen\fP\fB,
+char *restrict\fP
+\fIservice\fP\fB,
+.br
+\ \ \ \ \ \ socklen_t\fP \fIservicelen\fP\fB, int\fP \fIflags\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetnameinfo\fP() function shall translate a socket address
+to a node name and service location, all of which are defined
+as in \fIgetaddrinfo\fP().
+.LP
+The \fIsa\fP argument points to a socket address structure to be translated.
+.LP
+If the socket address structure contains an IPv4-mapped IPv6 address
+or an IPv4-compatible IPv6 address, the implementation shall
+extract the embedded IPv4 address and lookup the node name for that
+IPv4 address.
+.TP 7
+\fBNote:\fP
+The IPv6 unspecified address ( \fB"::"\fP ) and the IPv6 loopback
+address ( \fB"::1"\fP ) are not IPv4-compatible
+addresses. If the address is the IPv6 unspecified address ( \fB"::"\fP
+), a lookup is not performed, and the [EAI_NONAME] error
+is returned.
+.sp
+.LP
+If the \fInode\fP argument is non-NULL and the \fInodelen\fP argument
+is non-zero, then the \fInode\fP argument points to a
+buffer able to contain up to \fInodelen\fP characters that receives
+the node name as a null-terminated string. If the \fInode\fP
+argument is NULL or the \fInodelen\fP argument is zero, the node name
+shall not be returned. If the node's name cannot be located,
+the numeric form of the address contained in the socket address structure
+pointed to by the \fIsa\fP argument is returned instead
+of its name.
+.LP
+If the \fIservice\fP argument is non-NULL and the \fIservicelen\fP
+argument is non-zero, then the \fIservice\fP argument
+points to a buffer able to contain up to \fIservicelen\fP bytes that
+receives the service name as a null-terminated string. If the
+\fIservice\fP argument is NULL or the \fIservicelen\fP argument is
+zero, the service name shall not be returned. If the service's
+name cannot be located, the numeric form of the service address (for
+example, its port number) shall be returned instead of its
+name.
+.LP
+The \fIflags\fP argument is a flag that changes the default actions
+of the function. By default the fully-qualified domain name
+(FQDN) for the host shall be returned, but:
+.IP " *" 3
+If the flag bit NI_NOFQDN is set, only the node name portion of the
+FQDN shall be returned for local hosts.
+.LP
+.IP " *" 3
+If the flag bit NI_NUMERICHOST is set, the numeric form of the address
+contained in the socket address structure pointed to by
+the \fIsa\fP argument shall be returned instead of its name, under
+all circumstances.
+.LP
+.IP " *" 3
+If the flag bit NI_NAMEREQD is set, an error shall be returned if
+the host's name cannot be located.
+.LP
+.IP " *" 3
+If the flag bit NI_NUMERICSERV is set, the numeric form of the service
+address shall be returned (for example, its port number)
+instead of its name, under all circumstances.
+.LP
+.IP " *" 3
+If the flag bit NI_NUMERICSCOPE is set, the numeric form of the scope
+identifier shall be returned (for example, interface
+index) instead of its name. This flag shall be ignored if the \fIsa\fP
+argument is not an IPv6 address.
+.LP
+.IP " *" 3
+If the flag bit NI_DGRAM is set, this indicates that the service is
+a datagram service (SOCK_DGRAM). The default behavior shall
+assume that the service is a stream service (SOCK_STREAM).
+.LP
+.TP 7
+\fBNotes:\fP
+.RS
+.IP " 1." 4
+The two NI_NUMERICxxx flags are required to support the \fB-n\fP flag
+that many commands provide.
+.LP
+.IP " 2." 4
+The NI_DGRAM flag is required for the few AF_INET and AF_INET6 port
+numbers (for example, [512,514]) that represent different
+services for UDP and TCP.
+.LP
+.RE
+.sp
+.LP
+The \fIgetnameinfo\fP() function shall be thread-safe.
+.SH RETURN VALUE
+.LP
+A zero return value for \fIgetnameinfo\fP() indicates successful completion;
+a non-zero return value indicates failure. The
+possible values for the failures are listed in the ERRORS section.
+.LP
+Upon successful completion, \fIgetnameinfo\fP() shall return the \fInode\fP
+and \fIservice\fP names, if requested, in the
+buffers provided. The returned names are always null-terminated strings.
+.SH ERRORS
+.LP
+The \fIgetnameinfo\fP() function shall fail and return the corresponding
+value if:
+.TP 7
+.B EAI_AGAIN
+The name could not be resolved at this time. Future attempts may succeed.
+.TP 7
+.B EAI_BADFLAGS
+.sp
+The \fIflags\fP had an invalid value.
+.TP 7
+.B EAI_FAIL
+A non-recoverable error occurred.
+.TP 7
+.B EAI_FAMILY
+The address family was not recognized or the address length was invalid
+for the specified family.
+.TP 7
+.B EAI_MEMORY
+There was a memory allocation failure.
+.TP 7
+.B EAI_NONAME
+The name does not resolve for the supplied parameters.
+.LP
+NI_NAMEREQD is set and the host's name cannot be located, or both
+\fInodename\fP and \fIservname\fP were null.
+.TP 7
+.B EAI_OVERFLOW
+.sp
+An argument buffer overflowed. The buffer pointed to by the \fInode\fP
+argument or the \fIservice\fP argument was too small.
+.TP 7
+.B EAI_SYSTEM
+A system error occurred. The error code can be found in \fIerrno\fP.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+If the returned values are to be used as part of any further name
+resolution (for example, passed to \fIgetaddrinfo\fP()), applications
+should provide buffers large enough to store any result
+possible on the system.
+.LP
+Given the IPv4-mapped IPv6 address \fB"::ffff:1.2.3.4"\fP, the implementation
+performs a lookup as if the socket address
+structure contains the IPv4 address \fB"1.2.3.4"\fP .
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgai_strerror\fP(), \fIgetaddrinfo\fP(), \fIgetservbyname\fP(),
+\fIinet_ntop\fP(), \fIsocket\fP(), the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, \fI<netdb.h>\fP, \fI<sys/socket.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getnetbyaddr.3p b/man-pages-posix-2003/man3p/getnetbyaddr.3p
new file mode 100644
index 0000000..17b642a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getnetbyaddr.3p
@@ -0,0 +1 @@
+.so man3p/getnetent.3p
diff --git a/man-pages-posix-2003/man3p/getnetbyname.3p b/man-pages-posix-2003/man3p/getnetbyname.3p
new file mode 100644
index 0000000..17b642a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getnetbyname.3p
@@ -0,0 +1 @@
+.so man3p/getnetent.3p
diff --git a/man-pages-posix-2003/man3p/getnetent.3p b/man-pages-posix-2003/man3p/getnetent.3p
new file mode 100644
index 0000000..0c5a83b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getnetent.3p
@@ -0,0 +1,109 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ENDNETENT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" endnetent
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+endnetent, getnetbyaddr, getnetbyname, getnetent, setnetent \- network
+database functions
+.SH SYNOPSIS
+.LP
+\fB#include <netdb.h>
+.br
+.sp
+void endnetent(void);
+.br
+struct netent *getnetbyaddr(uint32_t\fP \fInet\fP\fB, int\fP \fItype\fP\fB);
+.br
+struct netent *getnetbyname(const char *\fP\fIname\fP\fB);
+.br
+struct netent *getnetent(void);
+.br
+void setnetent(int\fP \fIstayopen\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall retrieve information about networks. This information
+is considered to be stored in a database that can be
+accessed sequentially or randomly. The implementation of this database
+is unspecified.
+.LP
+The \fIsetnetent\fP() function shall open and rewind the database.
+If the \fIstayopen\fP argument is non-zero, the connection
+to the \fInet\fP database shall not be closed after each call to \fIgetnetent\fP()
+(either directly, or indirectly through one of
+the other \fIgetnet*\fP() functions), and the implementation may maintain
+an open file
+descriptor to the database.
+.LP
+The \fIgetnetent\fP() function shall read the next entry of the database,
+opening and closing a connection to the database as
+necessary.
+.LP
+The \fIgetnetbyaddr\fP() function shall search the database from the
+beginning, and find the first entry for which the address
+family specified by \fItype\fP matches the \fIn_addrtype\fP member
+and the network number \fInet\fP matches the \fIn_net\fP
+member, opening and closing a connection to the database as necessary.
+The \fInet\fP argument shall be the network number in host
+byte order.
+.LP
+The \fIgetnetbyname\fP() function shall search the database from the
+beginning and find the first entry for which the network
+name specified by \fIname\fP matches the \fIn_name\fP member, opening
+and closing a connection to the database as necessary.
+.LP
+The \fIgetnetbyaddr\fP(), \fIgetnetbyname\fP(), and \fIgetnetent\fP()
+functions shall each return a pointer to a
+\fBnetent\fP structure, the members of which shall contain the fields
+of an entry in the network database.
+.LP
+The \fIendnetent\fP() function shall close the database, releasing
+any open file descriptor.
+.LP
+These functions need not be reentrant. A function that is not required
+to be reentrant is not required to be thread-safe.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIgetnetbyaddr\fP(), \fIgetnetbyname\fP(),
+and \fIgetnetent\fP() shall return a pointer to a
+\fBnetent\fP structure if the requested entry was found, and a null
+pointer if the end of the database was reached or the
+requested entry was not found. Otherwise, a null pointer shall be
+returned.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIgetnetbyaddr\fP(), \fIgetnetbyname\fP(), and \fIgetnetent\fP()
+functions may return pointers to static data, which may
+be overwritten by subsequent calls to any of these functions.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<netdb.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getopt.3p b/man-pages-posix-2003/man3p/getopt.3p
new file mode 100644
index 0000000..231fcbc
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getopt.3p
@@ -0,0 +1,326 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETOPT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getopt
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getopt, optarg, opterr, optind, optopt \- command option parsing
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+int getopt(int\fP \fIargc\fP\fB, char * const\fP \fIargv\fP\fB[],
+const char *\fP\fIoptstring\fP\fB);
+.br
+extern char *optarg;
+.br
+extern int optind, opterr, optopt;
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetopt\fP() function is a command-line parser that shall follow
+Utility Syntax Guidelines 3, 4, 5, 6, 7, 9, and 10 in
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, Section 12.2,
+Utility Syntax Guidelines.
+.LP
+The parameters \fIargc\fP and \fIargv\fP are the argument count and
+argument array as passed to \fImain\fP() (see \fIexec\fP()). The
+argument \fIoptstring\fP is a string of recognized
+option characters; if a character is followed by a colon, the option
+takes an argument. All option characters allowed by Utility
+Syntax Guideline 3 are allowed in \fIoptstring\fP. The implementation
+may accept other characters as an extension.
+.LP
+The variable \fIoptind\fP is the index of the next element of the
+\fIargv\fP[] vector to be processed. It shall be initialized
+to 1 by the system, and \fIgetopt\fP() shall update it when it finishes
+with each element of \fIargv\fP[]. When an element of
+\fIargv\fP[] contains multiple option characters, it is unspecified
+how \fIgetopt\fP() determines which options have already been
+processed.
+.LP
+The \fIgetopt\fP() function shall return the next option character
+(if one is found) from \fIargv\fP that matches a character
+in \fIoptstring\fP, if there is one that matches. If the option takes
+an argument, \fIgetopt\fP() shall set the variable
+\fIoptarg\fP to point to the option-argument as follows:
+.IP " 1." 4
+If the option was the last character in the string pointed to by an
+element of \fIargv\fP, then \fIoptarg\fP shall contain the
+next element of \fIargv\fP, and \fIoptind\fP shall be incremented
+by 2. If the resulting value of \fIoptind\fP is greater than
+\fIargc\fP, this indicates a missing option-argument, and \fIgetopt\fP()
+shall return an error indication.
+.LP
+.IP " 2." 4
+Otherwise, \fIoptarg\fP shall point to the string following the option
+character in that element of \fIargv\fP, and
+\fIoptind\fP shall be incremented by 1.
+.LP
+.LP
+If, when \fIgetopt\fP() is called:
+.sp
+.RS
+.nf
+
+\fIargv\fP\fB[optind]\fP is a null pointer\fB*\fP
+\fIargv\fP\fB[optind]\fP is not the character \fB- \fP
+\fIargv\fP\fB[optind]\fP points to the string \fB"-"\fP
+.fi
+.RE
+.LP
+\fIgetopt\fP() shall return -1 without changing \fIoptind\fP. If:
+.sp
+.RS
+.nf
+
+\fIargv\fP\fB[optind] \fP points to the string \fB"--"
+\fP
+.fi
+.RE
+.LP
+\fIgetopt\fP() shall return -1 after incrementing \fIoptind\fP.
+.LP
+If \fIgetopt\fP() encounters an option character that is not contained
+in \fIoptstring\fP, it shall return the question-mark (
+\fB'?'\fP ) character. If it detects a missing option-argument, it
+shall return the colon character ( \fB':'\fP ) if the
+first character of \fIoptstring\fP was a colon, or a question-mark
+character ( \fB'?'\fP ) otherwise. In either case,
+\fIgetopt\fP() shall set the variable \fIoptopt\fP to the option character
+that caused the error. If the application has not set
+the variable \fIopterr\fP to 0 and the first character of \fIoptstring\fP
+is not a colon, \fIgetopt\fP() shall also print a
+diagnostic message to \fIstderr\fP in the format specified for the
+\fIgetopts\fP
+utility.
+.LP
+The \fIgetopt\fP() function need not be reentrant. A function that
+is not required to be reentrant is not required to be
+thread-safe.
+.SH RETURN VALUE
+.LP
+The \fIgetopt\fP() function shall return the next option character
+specified on the command line.
+.LP
+A colon ( \fB':'\fP ) shall be returned if \fIgetopt\fP() detects
+a missing argument and the first character of
+\fIoptstring\fP was a colon ( \fB':'\fP ).
+.LP
+A question mark ( \fB'?'\fP ) shall be returned if \fIgetopt\fP()
+encounters an option character not in \fIoptstring\fP or
+detects a missing argument and the first character of \fIoptstring\fP
+was not a colon ( \fB':'\fP ).
+.LP
+Otherwise, \fIgetopt\fP() shall return -1 when all command line options
+are parsed.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Parsing Command Line Options
+.LP
+The following code fragment shows how you might process the arguments
+for a utility that can take the mutually-exclusive options
+\fIa\fP and \fIb\fP and the options \fIf\fP and \fIo\fP, both of which
+require arguments:
+.sp
+.RS
+.nf
+
+\fB#include <unistd.h>
+.sp
+
+int
+main(int argc, char *argv[ ])
+{
+ int c;
+ int bflg, aflg, errflg;
+ char *ifile;
+ char *ofile;
+ extern char *optarg;
+ extern int optind, optopt;
+ . . .
+ while ((c = getopt(argc, argv, ":abf:o:")) != -1) {
+ switch(c) {
+ case 'a':
+ if (bflg)
+ errflg++;
+ else
+ aflg++;
+ break;
+ case 'b':
+ if (aflg)
+ errflg++;
+ else {
+ bflg++;
+ bproc();
+ }
+ break;
+ case 'f':
+ ifile = optarg;
+ break;
+ case 'o':
+ ofile = optarg;
+ break;
+ case ':': /* -f or -o without operand */
+ fprintf(stderr,
+ "Option -%c requires an operand\\n", optopt);
+ errflg++;
+ break;
+ case '?':
+ fprintf(stderr,
+ "Unrecognized option: -%c\\n", optopt);
+ errflg++;
+ }
+ }
+ if (errflg) {
+ fprintf(stderr, "usage: . . . ");
+ exit(2);
+ }
+ for ( ; optind < argc; optind++) {
+ if (access(argv[optind], R_OK)) {
+ . . .
+}
+\fP
+.fi
+.RE
+.LP
+This code accepts any of the following as equivalent:
+.sp
+.RS
+.nf
+
+\fBcmd -ao arg path path
+cmd -a -o arg path path
+cmd -o arg -a path path
+cmd -a -o arg -- path path
+cmd -a -oarg path path
+cmd -aoarg path path
+\fP
+.fi
+.RE
+.SS Checking Options and Arguments
+.LP
+The following example parses a set of command line options and prints
+messages to standard output for each option and argument
+that it encounters.
+.sp
+.RS
+.nf
+
+\fB#include <unistd.h>
+#include <stdio.h>
+\&...
+int c;
+char *filename;
+extern char *optarg;
+extern int optind, optopt, opterr;
+\&...
+while ((c = getopt(argc, argv, ":abf:")) != -1) {
+ switch(c) {
+ case 'a':
+ printf("a is set\\n");
+ break;
+ case 'b':
+ printf("b is set\\n");
+ break;
+ case 'f':
+ filename = optarg;
+ printf("filename is %s\\n", filename);
+ break;
+ case ':':
+ printf("-%c without filename\\n", optopt);
+ break;
+ case '?':
+ printf("unknown arg %c\\n", optopt);
+ break;
+ }
+}
+\fP
+.fi
+.RE
+.SS Selecting Options from the Command Line
+.LP
+The following example selects the type of database routines the user
+wants to use based on the \fIOptions\fP argument.
+.sp
+.RS
+.nf
+
+\fB#include <unistd.h>
+#include <string.h>
+\&...
+char *Options = "hdbtl";
+\&...
+int dbtype, i;
+char c;
+char *st;
+\&...
+dbtype = 0;
+while ((c = getopt(argc, argv, Options)) != -1) {
+ if ((st = strchr(Options, c)) != NULL) {
+ dbtype = st - Options;
+ break;
+ }
+}
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The \fIgetopt\fP() function is only required to support option characters
+included in Utility Syntax Guideline 3. Many
+historical implementations of \fIgetopt\fP() support other characters
+as options. This is an allowed extension, but applications
+that use extensions are not maximally portable. Note that support
+for multi-byte option characters is only possible when such
+characters can be represented as type \fBint\fP.
+.SH RATIONALE
+.LP
+The \fIoptopt\fP variable represents historical practice and allows
+the application to obtain the identity of the invalid
+option.
+.LP
+The description has been written to make it clear that \fIgetopt\fP(),
+like the \fIgetopts\fP utility, deals with option-arguments whether
+separated from the option by
+<blank>s or not. Note that the requirements on \fIgetopt\fP() and
+\fIgetopts\fP are
+more stringent than the Utility Syntax Guidelines.
+.LP
+The \fIgetopt\fP() function shall return -1, rather than EOF, so that
+\fI<stdio.h>\fP is not required.
+.LP
+The special significance of a colon as the first character of \fIoptstring\fP
+makes \fIgetopt\fP() consistent with the \fIgetopts\fP utility. It
+allows an application to make a distinction between a missing
+argument and an incorrect option letter without having to examine
+the option letter. It is true that a missing argument can only be
+detected in one case, but that is a case that has to be considered.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexec\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<unistd.h>\fP, the Shell and Utilities
+volume of
+IEEE\ Std\ 1003.1-2001
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getpeername.3p b/man-pages-posix-2003/man3p/getpeername.3p
new file mode 100644
index 0000000..9b6c772
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getpeername.3p
@@ -0,0 +1,95 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETPEERNAME" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getpeername
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getpeername \- get the name of the peer socket
+.SH SYNOPSIS
+.LP
+\fB#include <sys/socket.h>
+.br
+.sp
+int getpeername(int\fP \fIsocket\fP\fB, struct sockaddr *restrict\fP
+\fIaddress\fP\fB,
+.br
+\ \ \ \ \ \ socklen_t *restrict\fP \fIaddress_len\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetpeername\fP() function shall retrieve the peer address of
+the specified socket, store this address in the
+\fBsockaddr\fP structure pointed to by the \fIaddress\fP argument,
+and store the length of this address in the object pointed to
+by the \fIaddress_len\fP argument.
+.LP
+If the actual length of the address is greater than the length of
+the supplied \fBsockaddr\fP structure, the stored address
+shall be truncated.
+.LP
+If the protocol permits connections by unbound clients, and the peer
+is not bound, then the value stored in the object pointed
+to by \fIaddress\fP is unspecified.
+.SH RETURN VALUE
+.LP
+Upon successful completion, 0 shall be returned. Otherwise, -1 shall
+be returned and \fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fIgetpeername\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fIsocket\fP argument is not a valid file descriptor.
+.TP 7
+.B EINVAL
+The socket has been shut down.
+.TP 7
+.B ENOTCONN
+The socket is not connected or otherwise has not had the peer pre-specified.
+.TP 7
+.B ENOTSOCK
+The \fIsocket\fP argument does not refer to a socket.
+.TP 7
+.B EOPNOTSUPP
+The operation is not supported for the socket protocol.
+.sp
+.LP
+The \fIgetpeername\fP() function may fail if:
+.TP 7
+.B ENOBUFS
+Insufficient resources were available in the system to complete the
+call.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIaccept\fP(), \fIbind\fP(), \fIgetsockname\fP(), \fIsocket\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<sys/socket.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getpgid.3p b/man-pages-posix-2003/man3p/getpgid.3p
new file mode 100644
index 0000000..697b779
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getpgid.3p
@@ -0,0 +1,78 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETPGID" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getpgid
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getpgid \- get the process group ID for a process
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+pid_t getpgid(pid_t\fP \fIpid\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetpgid\fP() function shall return the process group ID of
+the process whose process ID is equal to \fIpid\fP. If
+\fIpid\fP is equal to 0, \fIgetpgid\fP() shall return the process
+group ID of the calling process.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIgetpgid\fP() shall return a process
+group ID. Otherwise, it shall return (\fBpid_t\fP)-1 and
+set \fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fIgetpgid\fP() function shall fail if:
+.TP 7
+.B EPERM
+The process whose process ID is equal to \fIpid\fP is not in the same
+session as the calling process, and the implementation
+does not allow access to the process group ID of that process from
+the calling process.
+.TP 7
+.B ESRCH
+There is no process with a process ID equal to \fIpid\fP.
+.sp
+.LP
+The \fIgetpgid\fP() function may fail if:
+.TP 7
+.B EINVAL
+The value of the \fIpid\fP argument is invalid.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexec\fP(), \fIfork\fP(), \fIgetpgrp\fP(), \fIgetpid\fP(), \fIgetsid\fP(),
+\fIsetpgid\fP(), \fIsetsid\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getpgrp.3p b/man-pages-posix-2003/man3p/getpgrp.3p
new file mode 100644
index 0000000..2eabfc9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getpgrp.3p
@@ -0,0 +1,64 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETPGRP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getpgrp
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getpgrp \- get the process group ID of the calling process
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+pid_t getpgrp(void);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetpgrp\fP() function shall return the process group ID of
+the calling process.
+.SH RETURN VALUE
+.LP
+The \fIgetpgrp\fP() function shall always be successful and no return
+value is reserved to indicate an error.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+4.3 BSD provides a \fIgetpgrp\fP() function that returns the process
+group ID for a specified process. Although this function
+supports job control, all known job control shells always specify
+the calling process with this function. Thus, the simpler System
+V \fIgetpgrp\fP() suffices, and the added complexity of the 4.3 BSD
+\fIgetpgrp\fP() is provided by the XSI extension \fIgetpgid\fP().
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexec\fP(), \fIfork\fP(), \fIgetpgid\fP(), \fIgetpid\fP(), \fIgetppid\fP(),
+\fIkill\fP(), \fIsetpgid\fP(), \fIsetsid\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<sys/types.h>\fP,
+\fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getpid.3p b/man-pages-posix-2003/man3p/getpid.3p
new file mode 100644
index 0000000..c66621a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getpid.3p
@@ -0,0 +1,59 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETPID" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getpid
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getpid \- get the process ID
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+pid_t getpid(void);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetpid\fP() function shall return the process ID of the calling
+process.
+.SH RETURN VALUE
+.LP
+The \fIgetpid\fP() function shall always be successful and no return
+value is reserved to indicate an error.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexec\fP(), \fIfork\fP(), \fIgetpgrp\fP(), \fIgetppid\fP(),
+\fIkill\fP(), \fIsetpgid\fP(), \fIsetsid\fP(), the Base Definitions
+volume of
+IEEE\ Std\ 1003.1-2001, \fI<sys/types.h>\fP, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getpmsg.3p b/man-pages-posix-2003/man3p/getpmsg.3p
new file mode 100644
index 0000000..84ede0b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getpmsg.3p
@@ -0,0 +1 @@
+.so man3p/getmsg.3p
diff --git a/man-pages-posix-2003/man3p/getppid.3p b/man-pages-posix-2003/man3p/getppid.3p
new file mode 100644
index 0000000..a53ab5f
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getppid.3p
@@ -0,0 +1,60 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETPPID" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getppid
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getppid \- get the parent process ID
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+pid_t getppid(void);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetppid\fP() function shall return the parent process ID of
+the calling process.
+.SH RETURN VALUE
+.LP
+The \fIgetppid\fP() function shall always be successful and no return
+value is reserved to indicate an error.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexec\fP(), \fIfork\fP(), \fIgetpgid\fP(), \fIgetpgrp\fP(),
+\fIgetpid\fP(), \fIkill\fP(), \fIsetpgid\fP(), \fIsetsid\fP(),
+the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<sys/types.h>\fP,
+\fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getpriority.3p b/man-pages-posix-2003/man3p/getpriority.3p
new file mode 100644
index 0000000..a1a3f44
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getpriority.3p
@@ -0,0 +1,180 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETPRIORITY" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getpriority
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getpriority, setpriority \- get and set the nice value
+.SH SYNOPSIS
+.LP
+\fB#include <sys/resource.h>
+.br
+.sp
+int getpriority(int\fP \fIwhich\fP\fB, id_t\fP \fIwho\fP\fB);
+.br
+int setpriority(int\fP \fIwhich\fP\fB, id_t\fP \fIwho\fP\fB, int\fP
+\fIvalue\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetpriority\fP() function shall obtain the nice value of a
+process, process group, or user. The \fIsetpriority\fP()
+function shall set the nice value of a process, process group, or
+user to \fIvalue\fP+ {NZERO}.
+.LP
+Target processes are specified by the values of the \fIwhich\fP and
+\fIwho\fP arguments. The \fIwhich\fP argument may be one
+of the following values: PRIO_PROCESS, PRIO_PGRP, or PRIO_USER, indicating
+that the \fIwho\fP argument is to be interpreted as a
+process ID, a process group ID, or an effective user ID, respectively.
+A 0 value for the \fIwho\fP argument specifies the current
+process, process group, or user.
+.LP
+The nice value set with \fIsetpriority\fP() shall be applied to the
+process. If the process is multi-threaded, the nice value
+shall affect all system scope threads in the process.
+.LP
+If more than one process is specified, \fIgetpriority\fP() shall return
+value {NZERO} less than the lowest nice value
+pertaining to any of the specified processes, and \fIsetpriority\fP()
+shall set the nice values of all of the specified processes
+to \fIvalue\fP+ {NZERO}.
+.LP
+The default nice value is {NZERO}; lower nice values shall cause more
+favorable scheduling. While the range of valid nice values
+is [0,{NZERO}*2-1], implementations may enforce more restrictive limits.
+If \fIvalue\fP+ {NZERO} is less than the system's lowest
+supported nice value, \fIsetpriority\fP() shall set the nice value
+to the lowest supported value; if \fIvalue\fP+ {NZERO} is
+greater than the system's highest supported nice value, \fIsetpriority\fP()
+shall set the nice value to the highest supported
+value.
+.LP
+Only a process with appropriate privileges can lower its nice value.
+.LP
+Any processes or threads using SCHED_FIFO or SCHED_RR shall be unaffected
+by a call to \fIsetpriority\fP(). This is not considered
+an error. A process which subsequently reverts to SCHED_OTHER need
+not have its priority affected by such a \fIsetpriority\fP()
+call.
+.LP
+The effect of changing the nice value may vary depending on the process-scheduling
+algorithm in effect.
+.LP
+Since \fIgetpriority\fP() can return the value -1 on successful completion,
+it is necessary to set \fIerrno\fP to 0 prior to a
+call to \fIgetpriority\fP(). If \fIgetpriority\fP() returns the value
+-1, then \fIerrno\fP can be checked to see if an error
+occurred or if the value is a legitimate nice value.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIgetpriority\fP() shall return an integer
+in the range -{NZERO} to {NZERO}-1. Otherwise, -1 shall
+be returned and \fIerrno\fP set to indicate the error.
+.LP
+Upon successful completion, \fIsetpriority\fP() shall return 0; otherwise,
+-1 shall be returned and \fIerrno\fP set to
+indicate the error.
+.SH ERRORS
+.LP
+The \fIgetpriority\fP() and \fIsetpriority\fP() functions shall fail
+if:
+.TP 7
+.B ESRCH
+No process could be located using the \fIwhich\fP and \fIwho\fP argument
+values specified.
+.TP 7
+.B EINVAL
+The value of the \fIwhich\fP argument was not recognized, or the value
+of the \fIwho\fP argument is not a valid process ID,
+process group ID, or user ID.
+.sp
+.LP
+In addition, \fIsetpriority\fP() may fail if:
+.TP 7
+.B EPERM
+A process was located, but neither the real nor effective user ID
+of the executing process match the effective user ID of the
+process whose nice value is being changed.
+.TP 7
+.B EACCES
+A request was made to change the nice value to a lower numeric value
+and the current process does not have appropriate
+privileges.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Using getpriority()
+.LP
+The following example returns the current scheduling priority for
+the process ID returned by the call to \fIgetpid\fP().
+.sp
+.RS
+.nf
+
+\fB#include <sys/resource.h>
+\&...
+int which = PRIO_PROCESS;
+id_t pid;
+int ret;
+.sp
+
+pid = getpid();
+ret = getpriority(which, pid);
+\fP
+.fi
+.RE
+.SS Using setpriority()
+.LP
+The following example sets the priority for the current process ID
+to -20.
+.sp
+.RS
+.nf
+
+\fB#include <sys/resource.h>
+\&...
+int which = PRIO_PROCESS;
+id_t pid;
+int priority = -20;
+int ret;
+.sp
+
+pid = getpid();
+ret = setpriority(which, pid, priority);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The \fIgetpriority\fP() and \fIsetpriority\fP() functions work with
+an offset nice value (nice value -{NZERO}). The nice value
+is in the range [0,2*{NZERO} -1], while the return value for \fIgetpriority\fP()
+and the third parameter for \fIsetpriority\fP()
+are in the range [-{NZERO},{NZERO} -1].
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fInice\fP(), \fIsched_get_priority_max\fP(), \fIsched_setscheduler\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<sys/resource.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getprotobyname.3p b/man-pages-posix-2003/man3p/getprotobyname.3p
new file mode 100644
index 0000000..82a4140
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getprotobyname.3p
@@ -0,0 +1 @@
+.so man3p/getprotoent.3p
diff --git a/man-pages-posix-2003/man3p/getprotobynumber.3p b/man-pages-posix-2003/man3p/getprotobynumber.3p
new file mode 100644
index 0000000..82a4140
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getprotobynumber.3p
@@ -0,0 +1 @@
+.so man3p/getprotoent.3p
diff --git a/man-pages-posix-2003/man3p/getprotoent.3p b/man-pages-posix-2003/man3p/getprotoent.3p
new file mode 100644
index 0000000..5a9c267
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getprotoent.3p
@@ -0,0 +1,109 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ENDPROTOENT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" endprotoent
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+endprotoent, getprotobyname, getprotobynumber, getprotoent, setprotoent
+\- network protocol database
+functions
+.SH SYNOPSIS
+.LP
+\fB#include <netdb.h>
+.br
+.sp
+void endprotoent(void);
+.br
+struct protoent *getprotobyname(const char *\fP\fIname\fP\fB);
+.br
+struct protoent *getprotobynumber(int\fP \fIproto\fP\fB);
+.br
+struct protoent *getprotoent(void);
+.br
+void setprotoent(int\fP \fIstayopen\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall retrieve information about protocols. This information
+is considered to be stored in a database that can
+be accessed sequentially or randomly. The implementation of this database
+is unspecified.
+.LP
+The \fIsetprotoent\fP() function shall open a connection to the database,
+and set the next entry to the first entry. If the
+\fIstayopen\fP argument is non-zero, the connection to the network
+protocol database shall not be closed after each call to
+\fIgetprotoent\fP() (either directly, or indirectly through one of
+the other \fIgetproto*\fP() functions), and the implementation may
+maintain an open file descriptor for
+the database.
+.LP
+The \fIgetprotobyname\fP() function shall search the database from
+the beginning and find the first entry for which the
+protocol name specified by \fIname\fP matches the \fIp_name\fP member,
+opening and closing a connection to the database as
+necessary.
+.LP
+The \fIgetprotobynumber\fP() function shall search the database from
+the beginning and find the first entry for which the
+protocol number specified by \fIproto\fP matches the \fIp_proto\fP
+member, opening and closing a connection to the database as
+necessary.
+.LP
+The \fIgetprotoent\fP() function shall read the next entry of the
+database, opening and closing a connection to the database as
+necessary.
+.LP
+The \fIgetprotobyname\fP(), \fIgetprotobynumber\fP(), and \fIgetprotoent\fP()
+functions shall each return a pointer to a
+\fBprotoent\fP structure, the members of which shall contain the fields
+of an entry in the network protocol database.
+.LP
+The \fIendprotoent\fP() function shall close the connection to the
+database, releasing any open file descriptor.
+.LP
+These functions need not be reentrant. A function that is not required
+to be reentrant is not required to be thread-safe.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIgetprotobyname\fP(), \fIgetprotobynumber\fP(),
+and \fIgetprotoent\fP() return a pointer to a
+\fBprotoent\fP structure if the requested entry was found, and a null
+pointer if the end of the database was reached or the
+requested entry was not found. Otherwise, a null pointer is returned.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIgetprotobyname\fP(), \fIgetprotobynumber\fP(), and \fIgetprotoent\fP()
+functions may return pointers to static data,
+which may be overwritten by subsequent calls to any of these functions.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<netdb.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getpwent.3p b/man-pages-posix-2003/man3p/getpwent.3p
new file mode 100644
index 0000000..8feca86
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getpwent.3p
@@ -0,0 +1,136 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ENDPWENT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" endpwent
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+endpwent, getpwent, setpwent \- user database functions
+.SH SYNOPSIS
+.LP
+\fB#include <pwd.h>
+.br
+.sp
+void endpwent(void);
+.br
+struct passwd *getpwent(void);
+.br
+void setpwent(void); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall retrieve information about users.
+.LP
+The \fIgetpwent\fP() function shall return a pointer to a structure
+containing the broken-out fields of an entry in the user
+database. Each entry in the user database contains a \fBpasswd\fP
+structure. When first called, \fIgetpwent\fP() shall return a
+pointer to a \fBpasswd\fP structure containing the first entry in
+the user database. Thereafter, it shall return a pointer to a
+\fBpasswd\fP structure containing the next entry in the user database.
+Successive calls can be used to search the entire user
+database.
+.LP
+If an end-of-file or an error is encountered on reading, \fIgetpwent\fP()
+shall return a null pointer.
+.LP
+An implementation that provides extended security controls may impose
+further implementation-defined restrictions on accessing
+the user database. In particular, the system may deny the existence
+of some or all of the user database entries associated with
+users other than the caller.
+.LP
+The \fIsetpwent\fP() function effectively rewinds the user database
+to allow repeated searches.
+.LP
+The \fIendpwent\fP() function may be called to close the user database
+when processing is complete.
+.LP
+These functions need not be reentrant. A function that is not required
+to be reentrant is not required to be thread-safe.
+.SH RETURN VALUE
+.LP
+The \fIgetpwent\fP() function shall return a null pointer on end-of-file
+or error.
+.SH ERRORS
+.LP
+The \fIgetpwent\fP(), \fIsetpwent\fP(), and \fIendpwent\fP() functions
+may fail if:
+.TP 7
+.B EIO
+An I/O error has occurred.
+.sp
+.LP
+In addition, \fIgetpwent\fP() and \fIsetpwent\fP() may fail if:
+.TP 7
+.B EMFILE
+{OPEN_MAX} file descriptors are currently open in the calling process.
+.TP 7
+.B ENFILE
+The maximum allowable number of files is currently open in the system.
+.sp
+.LP
+The return value may point to a static area which is overwritten by
+a subsequent call to \fIgetpwuid\fP(), \fIgetpwnam\fP(), or
+\fIgetpwent\fP().
+.br
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Searching the User Database
+.LP
+The following example uses the \fIgetpwent\fP() function to get successive
+entries in the user database, returning a pointer to
+a \fBpasswd\fP structure that contains information about each user.
+The call to \fIendpwent\fP() closes the user database and
+cleans up.
+.sp
+.RS
+.nf
+
+\fB#include <pwd.h>
+\&...
+struct passwd *p;
+\&...
+while ((p = getpwent ()) != NULL) {
+\&...
+}
+.sp
+
+endpwent();
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+These functions are provided due to their historical usage. Applications
+should avoid dependencies on fields in the password
+database, whether the database is a single file, or where in the file
+system name space the database resides. Applications should
+use \fIgetpwuid\fP() whenever possible because it avoids these dependencies.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIendgrent\fP(), \fIgetlogin\fP(), \fIgetpwnam\fP(), \fIgetpwuid\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<pwd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getpwnam.3p b/man-pages-posix-2003/man3p/getpwnam.3p
new file mode 100644
index 0000000..88fe702
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getpwnam.3p
@@ -0,0 +1,153 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETPWNAM" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getpwnam
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getpwnam, getpwnam_r \- search user database for a name
+.SH SYNOPSIS
+.LP
+\fB#include <pwd.h>
+.br
+.sp
+struct passwd *getpwnam(const char *\fP\fIname\fP\fB);
+.br
+\fP
+.LP
+\fBint getpwnam_r(const char *\fP\fIname\fP\fB, struct passwd *\fP\fIpwd\fP\fB,
+char
+*\fP\fIbuffer\fP\fB,
+.br
+\ \ \ \ \ \ size_t\fP \fIbufsize\fP\fB, struct passwd **\fP\fIresult\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetpwnam\fP() function shall search the user database for an
+entry with a matching \fIname\fP.
+.LP
+The \fIgetpwnam\fP() function need not be reentrant. A function that
+is not required to be reentrant is not required to be
+thread-safe.
+.LP
+Applications wishing to check for error situations should set \fIerrno\fP
+to 0 before calling \fIgetpwnam\fP(). If
+\fIgetpwnam\fP() returns a null pointer and \fIerrno\fP is non-zero,
+an error occurred.
+.LP
+The \fIgetpwnam_r\fP() function shall update the \fBpasswd\fP structure
+pointed to by \fIpwd\fP and store a pointer to that
+structure at the location pointed to by \fIresult\fP. The structure
+shall contain an entry from the user database with a matching
+\fIname\fP. Storage referenced by the structure is allocated from
+the memory provided with the \fIbuffer\fP parameter, which is
+\fIbufsize\fP bytes in size. The maximum size needed for this buffer
+can be determined with the {_SC_GETPW_R_SIZE_MAX} \fIsysconf\fP()
+parameter. A NULL pointer shall be returned at the location pointed
+to by
+\fIresult\fP on error or if the requested entry is not found.
+.SH RETURN VALUE
+.LP
+The \fIgetpwnam\fP() function shall return a pointer to a \fBstruct
+passwd\fP with the structure as defined in \fI<pwd.h>\fP with a matching
+entry if found. A null pointer shall be returned if the requested
+entry is not found, or an error occurs. On error, \fIerrno\fP shall
+be set to indicate the error.
+.LP
+The return value may point to a static area which is overwritten by
+a subsequent call to \fIgetpwent\fP(), \fIgetpwnam\fP(), or \fIgetpwuid\fP().
+.LP
+If successful, the \fIgetpwnam_r\fP() function shall return zero;
+otherwise, an error number shall be returned to indicate the
+error.
+.SH ERRORS
+.LP
+The \fIgetpwnam\fP() and \fIgetpwnam_r\fP() functions may fail if:
+.TP 7
+.B EIO
+An I/O error has occurred.
+.TP 7
+.B EINTR
+A signal was caught during \fIgetpwnam\fP().
+.TP 7
+.B EMFILE
+{OPEN_MAX} file descriptors are currently open in the calling process.
+.TP 7
+.B ENFILE
+The maximum allowable number of files is currently open in the system.
+.sp
+.LP
+The \fIgetpwnam_r\fP() function may fail if:
+.TP 7
+.B ERANGE
+Insufficient storage was supplied via \fIbuffer\fP and \fIbufsize\fP
+to contain the data to be referenced by the resulting
+\fBpasswd\fP structure.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Getting an Entry for the Login Name
+.LP
+The following example uses the \fIgetlogin\fP() function to return
+the name of the
+user who logged in; this information is passed to the \fIgetpwnam\fP()
+function to get the user database entry for that user.
+.sp
+.RS
+.nf
+
+\fB#include <sys/types.h>
+#include <pwd.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+\&...
+char *lgn;
+struct passwd *pw;
+\&...
+if ((lgn = getlogin()) == NULL || (pw = getpwnam(lgn)) == NULL) {
+ fprintf(stderr, "Get of user information failed.\\n"); exit(1);
+}
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+Three names associated with the current process can be determined:
+\fIgetpwuid\fP( \fIgeteuid\fP()) returns the name associated with
+the effective user ID of the process; \fIgetlogin\fP() returns the
+name associated with the current login activity; and
+\fIgetpwuid\fP( \fIgetuid\fP()) returns the name associated with the
+real user ID of the
+process.
+.LP
+The \fIgetpwnam_r\fP() function is thread-safe and returns values
+in a user-supplied buffer instead of possibly using a static
+data area that may be overwritten by each call.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgetpwuid\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<limits.h>\fP, \fI<pwd.h>\fP, \fI<sys/types.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getpwnam_r.3p b/man-pages-posix-2003/man3p/getpwnam_r.3p
new file mode 100644
index 0000000..9ee0665
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getpwnam_r.3p
@@ -0,0 +1 @@
+.so man3p/getpwnam.3p
diff --git a/man-pages-posix-2003/man3p/getpwuid.3p b/man-pages-posix-2003/man3p/getpwuid.3p
new file mode 100644
index 0000000..3298f6f
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getpwuid.3p
@@ -0,0 +1,196 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETPWUID" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getpwuid
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getpwuid, getpwuid_r \- search user database for a user ID
+.SH SYNOPSIS
+.LP
+\fB#include <pwd.h>
+.br
+.sp
+struct passwd *getpwuid(uid_t\fP \fIuid\fP\fB);
+.br
+\fP
+.LP
+\fBint getpwuid_r(uid_t\fP \fIuid\fP\fB, struct passwd *\fP\fIpwd\fP\fB,
+char
+*\fP\fIbuffer\fP\fB,
+.br
+\ \ \ \ \ \ size_t\fP \fIbufsize\fP\fB, struct passwd **\fP\fIresult\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetpwuid\fP() function shall search the user database for an
+entry with a matching \fIuid\fP.
+.LP
+The \fIgetpwuid\fP() function need not be reentrant. A function that
+is not required to be reentrant is not required to be
+thread-safe.
+.LP
+Applications wishing to check for error situations should set \fIerrno\fP
+to 0 before calling \fIgetpwuid\fP(). If
+\fIgetpwuid\fP() returns a null pointer and \fIerrno\fP is set to
+non-zero, an error occurred.
+.LP
+The \fIgetpwuid_r\fP() function shall update the \fBpasswd\fP structure
+pointed to by \fIpwd\fP and store a pointer to that
+structure at the location pointed to by \fIresult\fP. The structure
+shall contain an entry from the user database with a matching
+\fIuid\fP. Storage referenced by the structure is allocated from the
+memory provided with the \fIbuffer\fP parameter, which is
+\fIbufsize\fP bytes in size. The maximum size needed for this buffer
+can be determined with the {_SC_GETPW_R_SIZE_MAX} \fIsysconf\fP()
+parameter. A NULL pointer shall be returned at the location pointed
+to by
+\fIresult\fP on error or if the requested entry is not found.
+.SH RETURN VALUE
+.LP
+The \fIgetpwuid\fP() function shall return a pointer to a \fBstruct
+passwd\fP with the structure as defined in \fI<pwd.h>\fP with a matching
+entry if found. A null pointer shall be returned if the requested
+entry is not found, or an error occurs. On error, \fIerrno\fP shall
+be set to indicate the error.
+.LP
+The return value may point to a static area which is overwritten by
+a subsequent call to \fIgetpwent\fP(), \fIgetpwnam\fP(), or
+\fIgetpwuid\fP().
+.LP
+If successful, the \fIgetpwuid_r\fP() function shall return zero;
+otherwise, an error number shall be returned to indicate the
+error.
+.SH ERRORS
+.LP
+The \fIgetpwuid\fP() and \fIgetpwuid_r\fP() functions may fail if:
+.TP 7
+.B EIO
+An I/O error has occurred.
+.TP 7
+.B EINTR
+A signal was caught during \fIgetpwuid\fP().
+.TP 7
+.B EMFILE
+{OPEN_MAX} file descriptors are currently open in the calling process.
+.TP 7
+.B ENFILE
+The maximum allowable number of files is currently open in the system.
+.sp
+.LP
+The \fIgetpwuid_r\fP() function may fail if:
+.TP 7
+.B ERANGE
+Insufficient storage was supplied via \fIbuffer\fP and \fIbufsize\fP
+to contain the data to be referenced by the resulting
+\fBpasswd\fP structure.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Getting an Entry for the Root User
+.LP
+The following example gets the user database entry for the user with
+user ID 0 (root).
+.sp
+.RS
+.nf
+
+\fB#include <sys/types.h>
+#include <pwd.h>
+\&...
+uid_t id = 0;
+struct passwd *pwd;
+.sp
+
+pwd = getpwuid(id);
+\fP
+.fi
+.RE
+.SS Finding the Name for the Effective User ID
+.LP
+The following example defines \fIpws\fP as a pointer to a structure
+of type \fBpasswd\fP, which is used to store the structure
+pointer returned by the call to the \fIgetpwuid\fP() function. The
+\fIgeteuid\fP()
+function shall return the effective user ID of the calling process;
+this is used as the search criteria for the \fIgetpwuid\fP()
+function. The call to \fIgetpwuid\fP() shall return a pointer to the
+structure containing that user ID value.
+.sp
+.RS
+.nf
+
+\fB#include <unistd.h>
+#include <sys/types.h>
+#include <pwd.h>
+\&...
+struct passwd *pws;
+pws = getpwuid(geteuid());
+\fP
+.fi
+.RE
+.SS Finding an Entry in the User Database
+.LP
+The following example uses \fIgetpwuid\fP() to search the user database
+for a user ID that was previously stored in a
+\fBstat\fP structure, then prints out the user name if it is found.
+If the user is not found, the program prints the numeric value
+of the user ID for the entry.
+.sp
+.RS
+.nf
+
+\fB#include <sys/types.h>
+#include <pwd.h>
+#include <stdio.h>
+\&...
+struct stat statbuf;
+struct passwd *pwd;
+\&...
+if ((pwd = getpwuid(statbuf.st_uid)) != NULL)
+ printf(" %-8.8s", pwd->pw_name);
+else
+ printf(" %-8d", statbuf.st_uid);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+Three names associated with the current process can be determined:
+\fIgetpwuid\fP( \fIgeteuid\fP()) returns the name associated with
+the effective user ID of the process; \fIgetlogin\fP() returns the
+name associated with the current login activity; and
+\fIgetpwuid\fP( \fIgetuid\fP()) returns the name associated with the
+real user ID of the
+process.
+.LP
+The \fIgetpwuid_r\fP() function is thread-safe and returns values
+in a user-supplied buffer instead of possibly using a static
+data area that may be overwritten by each call.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgetpwnam\fP(), \fIgeteuid\fP(), \fIgetuid\fP(), \fIgetlogin\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<limits.h>\fP, \fI<pwd.h>\fP, \fI<sys/types.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getpwuid_r.3p b/man-pages-posix-2003/man3p/getpwuid_r.3p
new file mode 100644
index 0000000..90e8a66
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getpwuid_r.3p
@@ -0,0 +1 @@
+.so man3p/getpwuid.3p
diff --git a/man-pages-posix-2003/man3p/getrlimit.3p b/man-pages-posix-2003/man3p/getrlimit.3p
new file mode 100644
index 0000000..a58c63e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getrlimit.3p
@@ -0,0 +1,194 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETRLIMIT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getrlimit
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getrlimit, setrlimit \- control maximum resource consumption
+.SH SYNOPSIS
+.LP
+\fB#include <sys/resource.h>
+.br
+.sp
+int getrlimit(int\fP \fIresource\fP\fB, struct rlimit *\fP\fIrlp\fP\fB);
+.br
+int setrlimit(int\fP \fIresource\fP\fB, const struct rlimit *\fP\fIrlp\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetrlimit\fP() function shall get, and the \fIsetrlimit\fP()
+function shall set, limits on the consumption of a variety
+of resources.
+.LP
+Each call to either \fIgetrlimit\fP() or \fIsetrlimit\fP() identifies
+a specific resource to be operated upon as well as a
+resource limit. A resource limit is represented by an \fBrlimit\fP
+structure. The \fIrlim_cur\fP member specifies the current or
+soft limit and the \fIrlim_max\fP member specifies the maximum or
+hard limit. Soft limits may be changed by a process to any value
+that is less than or equal to the hard limit. A process may (irreversibly)
+lower its hard limit to any value that is greater than
+or equal to the soft limit. Only a process with appropriate privileges
+can raise a hard limit. Both hard and soft limits can be
+changed in a single call to \fIsetrlimit\fP() subject to the constraints
+described above.
+.LP
+The value RLIM_INFINITY, defined in \fI<sys/resource.h>\fP, shall
+be
+considered to be larger than any other limit value. If a call to \fIgetrlimit\fP()
+returns RLIM_INFINITY for a resource, it means
+the implementation shall not enforce limits on that resource. Specifying
+RLIM_INFINITY as any resource limit value on a successful
+call to \fIsetrlimit\fP() shall inhibit enforcement of that resource
+limit.
+.LP
+The following resources are defined:
+.TP 7
+RLIMIT_CORE
+This is the maximum size of a \fBcore\fP file, in bytes, that may
+be created by a process. A limit of 0 shall prevent the
+creation of a \fBcore\fP file. If this limit is exceeded, the writing
+of a \fBcore\fP file shall terminate at this size.
+.TP 7
+RLIMIT_CPU
+This is the maximum amount of CPU time, in seconds, used by a process.
+If this limit is exceeded, SIGXCPU shall be generated
+for the process. If the process is catching or ignoring SIGXCPU, or
+all threads belonging to that process are blocking SIGXCPU, the
+behavior is unspecified.
+.TP 7
+RLIMIT_DATA
+This is the maximum size of a process' data segment, in bytes. If
+this limit is exceeded, the \fImalloc\fP() function shall fail with
+\fIerrno\fP set to [ENOMEM].
+.TP 7
+RLIMIT_FSIZE
+This is the maximum size of a file, in bytes, that may be created
+by a process. If a write or truncate operation would cause
+this limit to be exceeded, SIGXFSZ shall be generated for the thread.
+If the thread is blocking, or the process is catching or
+ignoring SIGXFSZ, continued attempts to increase the size of a file
+from end-of-file to beyond the limit shall fail with
+\fIerrno\fP set to [EFBIG].
+.TP 7
+RLIMIT_NOFILE
+This is a number one greater than the maximum value that the system
+may assign to a newly-created descriptor. If this limit is
+exceeded, functions that allocate a file descriptor shall fail with
+\fIerrno\fP set to [EMFILE]. This limit constrains the number
+of file descriptors that a process may allocate.
+.TP 7
+RLIMIT_STACK
+This is the maximum size of a process' stack, in bytes. The implementation
+does not automatically grow the stack beyond this
+limit. If this limit is exceeded, SIGSEGV shall be generated for the
+thread. If the thread is blocking SIGSEGV, or the process is
+ignoring or catching SIGSEGV and has not made arrangements to use
+an alternate stack, the disposition of SIGSEGV shall be set to
+SIG_DFL before it is generated.
+.TP 7
+RLIMIT_AS
+This is the maximum size of a process' total available memory, in
+bytes. If this limit is exceeded, the \fImalloc\fP() and \fImmap\fP()
+functions shall fail with
+\fIerrno\fP set to [ENOMEM]. In addition, the automatic stack growth
+fails with the effects outlined above.
+.sp
+.LP
+When using the \fIgetrlimit\fP() function, if a resource limit can
+be represented correctly in an object of type \fBrlim_t\fP,
+then its representation is returned; otherwise, if the value of the
+resource limit is equal to that of the corresponding saved hard
+limit, the value returned shall be RLIM_SAVED_MAX; otherwise, the
+value returned shall be RLIM_SAVED_CUR.
+.LP
+When using the \fIsetrlimit\fP() function, if the requested new limit
+is RLIM_INFINITY, the new limit shall be "no limit'';
+otherwise, if the requested new limit is RLIM_SAVED_MAX, the new limit
+shall be the corresponding saved hard limit; otherwise, if
+the requested new limit is RLIM_SAVED_CUR, the new limit shall be
+the corresponding saved soft limit; otherwise, the new limit
+shall be the requested value. In addition, if the corresponding saved
+limit can be represented correctly in an object of type
+\fBrlim_t\fP then it shall be overwritten with the new limit.
+.LP
+The result of setting a limit to RLIM_SAVED_MAX or RLIM_SAVED_CUR
+is unspecified unless a previous call to \fIgetrlimit\fP()
+returned that value as the soft or hard limit for the corresponding
+resource limit.
+.LP
+The determination of whether a limit can be correctly represented
+in an object of type \fBrlim_t\fP is implementation-defined.
+For example, some implementations permit a limit whose value is greater
+than RLIM_INFINITY and others do not.
+.LP
+The \fIexec\fP family of functions shall cause resource limits to
+be saved.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIgetrlimit\fP() and \fIsetrlimit\fP()
+shall return 0. Otherwise, these functions shall return -1
+and set \fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fIgetrlimit\fP() and \fIsetrlimit\fP() functions shall fail if:
+.TP 7
+.B EINVAL
+An invalid \fIresource\fP was specified; or in a \fIsetrlimit\fP()
+call, the new \fIrlim_cur\fP exceeds the new
+\fIrlim_max\fP.
+.TP 7
+.B EPERM
+The limit specified to \fIsetrlimit\fP() would have raised the maximum
+limit value, and the calling process does not have
+appropriate privileges.
+.sp
+.LP
+The \fIsetrlimit\fP() function may fail if:
+.TP 7
+.B EINVAL
+The limit specified cannot be lowered because current usage is already
+higher than the limit.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+If a process attempts to set the hard limit or soft limit for RLIMIT_NOFILE
+to less than the value of {_POSIX_OPEN_MAX} from \fI<limits.h>\fP,
+unexpected behavior may occur.
+.LP
+If a process attempts to set the hard limit or soft limit for RLIMIT_NOFILE
+to less than the highest currently open file
+descriptor +1, unexpected behavior may occur.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexec\fP(), \fIfork\fP(), \fImalloc\fP(), \fIopen\fP(), \fIsigaltstack\fP()
+,
+\fIsysconf\fP(), \fIulimit\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<stropts.h>\fP, \fI<sys/resource.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getrusage.3p b/man-pages-posix-2003/man3p/getrusage.3p
new file mode 100644
index 0000000..f1cea0e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getrusage.3p
@@ -0,0 +1,95 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETRUSAGE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getrusage
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getrusage \- get information about resource utilization
+.SH SYNOPSIS
+.LP
+\fB#include <sys/resource.h>
+.br
+.sp
+int getrusage(int\fP \fIwho\fP\fB, struct rusage *\fP\fIr_usage\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetrusage\fP() function shall provide measures of the resources
+used by the current process or its terminated and
+waited-for child processes. If the value of the \fIwho\fP argument
+is RUSAGE_SELF, information shall be returned about resources
+used by the current process. If the value of the \fIwho\fP argument
+is RUSAGE_CHILDREN, information shall be returned about
+resources used by the terminated and waited-for children of the current
+process. If the child is never waited for (for example, if
+the parent has SA_NOCLDWAIT set or sets SIGCHLD to SIG_IGN), the resource
+information for the child process is discarded and not
+included in the resource information provided by \fIgetrusage\fP().
+.LP
+The \fIr_usage\fP argument is a pointer to an object of type \fBstruct
+rusage\fP in which the returned information is
+stored.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIgetrusage\fP() shall return 0; otherwise,
+-1 shall be returned and \fIerrno\fP set to indicate
+the error.
+.SH ERRORS
+.LP
+The \fIgetrusage\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The value of the \fIwho\fP argument is not valid.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Using getrusage()
+.LP
+The following example returns information about the resources used
+by the current process.
+.sp
+.RS
+.nf
+
+\fB#include <sys/resource.h>
+\&...
+int who = RUSAGE_SELF;
+struct rusage usage;
+int ret;
+.sp
+
+ret = getrusage(who, &usage);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexit\fP(), \fIsigaction\fP(), \fItime\fP(),
+\fItimes\fP(), \fIwait\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<sys/resource.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/gets.3p b/man-pages-posix-2003/man3p/gets.3p
new file mode 100644
index 0000000..0007630
--- /dev/null
+++ b/man-pages-posix-2003/man3p/gets.3p
@@ -0,0 +1,83 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETS" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" gets
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+gets \- get a string from a stdin stream
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+char *gets(char *\fP\fIs\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgets\fP() function shall read bytes from the standard input
+stream, \fIstdin\fP, into the array pointed to by \fIs\fP,
+until a <newline> is read or an end-of-file condition is encountered.
+Any <newline> shall be discarded and a null byte
+shall be placed immediately after the last byte read into the array.
+.LP
+The
+\fIgets\fP() function may mark the \fIst_atime\fP field of the file
+associated with \fIstream\fP for update. The \fIst_atime\fP
+field shall be marked for update by the first successful execution
+of \fIfgetc\fP(), \fIfgets\fP(), \fIfread\fP(), \fIgetc\fP(), \fIgetchar\fP(),
+\fIgets\fP(), \fIfscanf\fP(), or \fIscanf\fP() using \fIstream\fP
+that
+returns data not supplied by a prior call to \fIungetc\fP().
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIgets\fP() shall return \fIs\fP. If
+the stream is at end-of-file, the end-of-file indicator for
+the stream shall be set and \fIgets\fP() shall return a null pointer.
+If a read error occurs, the error indicator for the stream
+shall be set, \fIgets\fP() shall return a null pointer, and set
+\fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+Refer to \fIfgetc\fP().
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Reading a line that overflows the array pointed to by \fIs\fP results
+in undefined behavior. The use of \fIfgets\fP() is recommended.
+.LP
+Since the user cannot specify the length of the buffer passed to \fIgets\fP(),
+use of this function is discouraged. The length
+of the string read is unlimited. It is possible to overflow this buffer
+in such a way as to cause applications to fail, or possible
+system security violations.
+.LP
+It is recommended that the \fIfgets\fP() function should be used to
+read input lines.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeof\fP(), \fIferror\fP(), \fIfgets\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getservbyname.3p b/man-pages-posix-2003/man3p/getservbyname.3p
new file mode 100644
index 0000000..dc6b5d8
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getservbyname.3p
@@ -0,0 +1 @@
+.so man3p/getservent.3p
diff --git a/man-pages-posix-2003/man3p/getservbyport.3p b/man-pages-posix-2003/man3p/getservbyport.3p
new file mode 100644
index 0000000..dc6b5d8
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getservbyport.3p
@@ -0,0 +1 @@
+.so man3p/getservent.3p
diff --git a/man-pages-posix-2003/man3p/getservent.3p b/man-pages-posix-2003/man3p/getservent.3p
new file mode 100644
index 0000000..6b341d5
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getservent.3p
@@ -0,0 +1,119 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ENDSERVENT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" endservent
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+endservent, getservbyname, getservbyport, getservent, setservent \-
+network services database functions
+.SH SYNOPSIS
+.LP
+\fB#include <netdb.h>
+.br
+.sp
+void endservent(void);
+.br
+struct servent *getservbyname(const char *\fP\fIname\fP\fB, const
+char *\fP\fIproto\fP\fB);
+.br
+struct servent *getservbyport(int\fP \fIport\fP\fB, const char *\fP\fIproto\fP\fB);
+.br
+struct servent *getservent(void);
+.br
+void setservent(int\fP \fIstayopen\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall retrieve information about network services.
+This information is considered to be stored in a database
+that can be accessed sequentially or randomly. The implementation
+of this database is unspecified.
+.LP
+The \fIsetservent\fP() function shall open a connection to the database,
+and set the next entry to the first entry. If the
+\fIstayopen\fP argument is non-zero, the \fInet\fP database shall
+not be closed after each call to the \fIgetservent\fP()
+function (either directly, or indirectly through one of the other
+\fIgetserv*\fP()
+functions), and the implementation may maintain an open file descriptor
+for the database.
+.LP
+The \fIgetservent\fP() function shall read the next entry of the database,
+opening and closing a connection to the database as
+necessary.
+.LP
+The \fIgetservbyname\fP() function shall search the database from
+the beginning and find the first entry for which the service
+name specified by \fIname\fP matches the \fIs_name\fP member and the
+protocol name specified by \fIproto\fP matches the
+\fIs_proto\fP member, opening and closing a connection to the database
+as necessary. If \fIproto\fP is a null pointer, any value
+of the \fIs_proto\fP member shall be matched.
+.LP
+The \fIgetservbyport\fP() function shall search the database from
+the beginning and find the first entry for which the port
+specified by \fIport\fP matches the \fIs_port\fP member and the protocol
+name specified by \fIproto\fP matches the
+\fIs_proto\fP member, opening and closing a connection to the database
+as necessary. If \fIproto\fP is a null pointer, any value
+of the \fIs_proto\fP member shall be matched. The \fIport\fP argument
+shall be in network byte order.
+.LP
+The \fIgetservbyname\fP(), \fIgetservbyport\fP(), and \fIgetservent\fP()
+functions shall each return a pointer to a
+\fBservent\fP structure, the members of which shall contain the fields
+of an entry in the network services database.
+.LP
+The \fIendservent\fP() function shall close the database, releasing
+any open file descriptor.
+.LP
+These functions need not be reentrant. A function that is not required
+to be reentrant is not required to be thread-safe.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIgetservbyname\fP(), \fIgetservbyport\fP(),
+and \fIgetservent\fP() return a pointer to a
+\fBservent\fP structure if the requested entry was found, and a null
+pointer if the end of the database was reached or the
+requested entry was not found. Otherwise, a null pointer is returned.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIport\fP argument of \fIgetservbyport\fP() need not be compatible
+with the port values of all address families.
+.LP
+The \fIgetservbyname\fP(), \fIgetservbyport\fP(), and \fIgetservent\fP()
+functions may return pointers to static data, which
+may be overwritten by subsequent calls to any of these functions.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIendhostent\fP(), \fIendprotoent\fP(), \fIhtonl\fP(), \fIinet_addr\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<netdb.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getsid.3p b/man-pages-posix-2003/man3p/getsid.3p
new file mode 100644
index 0000000..9d5e8f3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getsid.3p
@@ -0,0 +1,73 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETSID" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getsid
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getsid \- get the process group ID of a session leader
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+pid_t getsid(pid_t\fP \fIpid\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetsid\fP() function shall obtain the process group ID of the
+process that is the session leader of the process
+specified by \fIpid\fP. If \fIpid\fP is (\fBpid_t\fP)0, it specifies
+the calling process.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIgetsid\fP() shall return the process
+group ID of the session leader of the specified process.
+Otherwise, it shall return (\fBpid_t\fP)-1 and set \fIerrno\fP to
+indicate the error.
+.SH ERRORS
+.LP
+The \fIgetsid\fP() function shall fail if:
+.TP 7
+.B EPERM
+The process specified by \fIpid\fP is not in the same session as the
+calling process, and the implementation does not allow
+access to the process group ID of the session leader of that process
+from the calling process.
+.TP 7
+.B ESRCH
+There is no process with a process ID equal to \fIpid\fP.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexec\fP(), \fIfork\fP(), \fIgetpid\fP(), \fIgetpgid\fP(), \fIsetpgid\fP(),
+\fIsetsid\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getsockname.3p b/man-pages-posix-2003/man3p/getsockname.3p
new file mode 100644
index 0000000..89d63ba
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getsockname.3p
@@ -0,0 +1,95 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETSOCKNAME" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getsockname
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getsockname \- get the socket name
+.SH SYNOPSIS
+.LP
+\fB#include <sys/socket.h>
+.br
+.sp
+int getsockname(int\fP \fIsocket\fP\fB, struct sockaddr *restrict\fP
+\fIaddress\fP\fB,
+.br
+\ \ \ \ \ \ socklen_t *restrict\fP \fIaddress_len\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetsockname\fP() function shall retrieve the locally-bound
+name of the specified socket, store this address in the
+\fBsockaddr\fP structure pointed to by the \fIaddress\fP argument,
+and store the length of this address in the object pointed to
+by the \fIaddress_len\fP argument.
+.LP
+If the actual length of the address is greater than the length of
+the supplied \fBsockaddr\fP structure, the stored address
+shall be truncated.
+.LP
+If the socket has not been bound to a local name, the value stored
+in the object pointed to by \fIaddress\fP is
+unspecified.
+.SH RETURN VALUE
+.LP
+Upon successful completion, 0 shall be returned, the \fIaddress\fP
+argument shall point to the address of the socket, and the
+\fIaddress_len\fP argument shall point to the length of the address.
+Otherwise, -1 shall be returned and \fIerrno\fP set to
+indicate the error.
+.SH ERRORS
+.LP
+The \fIgetsockname\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fIsocket\fP argument is not a valid file descriptor.
+.TP 7
+.B ENOTSOCK
+The \fIsocket\fP argument does not refer to a socket.
+.TP 7
+.B EOPNOTSUPP
+The operation is not supported for this socket's protocol.
+.sp
+.LP
+The \fIgetsockname\fP() function may fail if:
+.TP 7
+.B EINVAL
+The socket has been shut down.
+.TP 7
+.B ENOBUFS
+Insufficient resources were available in the system to complete the
+function.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIaccept\fP(), \fIbind\fP(), \fIgetpeername\fP(), \fIsocket\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<sys/socket.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getsockopt.3p b/man-pages-posix-2003/man3p/getsockopt.3p
new file mode 100644
index 0000000..5260959
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getsockopt.3p
@@ -0,0 +1,232 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETSOCKOPT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getsockopt
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getsockopt \- get the socket options
+.SH SYNOPSIS
+.LP
+\fB#include <sys/socket.h>
+.br
+.sp
+int getsockopt(int\fP \fIsocket\fP\fB, int\fP \fIlevel\fP\fB, int\fP
+\fIoption_name,\fP\fB
+.br
+\ \ \ \ \ \ void *restrict\fP \fIoption_value\fP\fB, socklen_t *restrict\fP
+\fIoption_len\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetsockopt\fP() function manipulates options associated with
+a socket.
+.LP
+The \fIgetsockopt\fP() function shall retrieve the value for the option
+specified by the \fIoption_name\fP argument for the
+socket specified by the \fIsocket\fP argument. If the size of the
+option value is greater than \fIoption_len\fP, the value stored
+in the object pointed to by the \fIoption_value\fP argument shall
+be silently truncated. Otherwise, the object pointed to by the
+\fIoption_len\fP argument shall be modified to indicate the actual
+length of the value.
+.LP
+The \fIlevel\fP argument specifies the protocol level at which the
+option resides. To retrieve options at the socket level,
+specify the \fIlevel\fP argument as SOL_SOCKET. To retrieve options
+at other levels, supply the appropriate level identifier for
+the protocol controlling the option. For example, to indicate that
+an option is interpreted by the TCP (Transmission Control
+Protocol), set \fIlevel\fP to IPPROTO_TCP as defined in the \fI<netinet/in.h>\fP
+header.
+.LP
+The socket in use may require the process to have appropriate privileges
+to use the \fIgetsockopt\fP() function.
+.LP
+The \fIoption_name\fP argument specifies a single option to be retrieved.
+It can be one of the following values defined in \fI<sys/socket.h>\fP:
+.TP 7
+SO_DEBUG
+Reports whether debugging information is being recorded. This option
+shall store an \fBint\fP value. This is a Boolean
+option.
+.TP 7
+SO_ACCEPTCONN
+Reports whether socket listening is enabled. This option shall store
+an \fBint\fP value. This is a Boolean option.
+.TP 7
+SO_BROADCAST
+Reports whether transmission of broadcast messages is supported, if
+this is supported by the protocol. This option shall store
+an \fBint\fP value. This is a Boolean option.
+.TP 7
+SO_REUSEADDR
+Reports whether the rules used in validating addresses supplied to
+\fIbind\fP() should
+allow reuse of local addresses, if this is supported by the protocol.
+This option shall store an \fBint\fP value. This is a
+Boolean option.
+.TP 7
+SO_KEEPALIVE
+Reports whether connections are kept active with periodic transmission
+of messages, if this is supported by the protocol.
+.LP
+If the connected socket fails to respond to these messages, the connection
+shall be broken and threads writing to that socket
+shall be notified with a SIGPIPE signal. This option shall store an
+\fBint\fP value. This is a Boolean option.
+.TP 7
+SO_LINGER
+Reports whether the socket lingers on \fIclose\fP() if data is present.
+If SO_LINGER is
+set, the system blocks the process during \fIclose\fP() until it can
+transmit the data or
+until the end of the interval indicated by the \fIl_linger\fP member,
+whichever comes first. If SO_LINGER is not specified, and \fIclose\fP()
+is issued, the system handles the call in a way that allows the process
+to
+continue as quickly as possible. This option shall store a \fBlinger\fP
+structure.
+.TP 7
+SO_OOBINLINE
+Reports whether the socket leaves received out-of-band data (data
+marked urgent) inline. This option shall store an \fBint\fP
+value. This is a Boolean option.
+.TP 7
+SO_SNDBUF
+Reports send buffer size information. This option shall store an \fBint\fP
+value.
+.TP 7
+SO_RCVBUF
+Reports receive buffer size information. This option shall store an
+\fBint\fP value.
+.TP 7
+SO_ERROR
+Reports information about error status and clears it. This option
+shall store an \fBint\fP value.
+.TP 7
+SO_TYPE
+Reports the socket type. This option shall store an \fBint\fP value.
+Socket types are described in \fISocket Types\fP .
+.TP 7
+SO_DONTROUTE
+Reports whether outgoing messages bypass the standard routing facilities.
+The destination shall be on a directly-connected
+network, and messages are directed to the appropriate network interface
+according to the destination address. The effect, if any,
+of this option depends on what protocol is in use. This option shall
+store an \fBint\fP value. This is a Boolean option.
+.TP 7
+SO_RCVLOWAT
+Reports the minimum number of bytes to process for socket input operations.
+The default value for SO_RCVLOWAT is 1. If
+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. (They may 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 returned;
+for example, out-of-band data.) This option shall store an
+\fBint\fP value. Note that not all implementations allow this option
+to be retrieved.
+.TP 7
+SO_RCVTIMEO
+Reports the timeout value for input operations. This option shall
+store a \fBtimeval\fP structure with the number of seconds
+and microseconds specifying the limit on how long to wait for an input
+operation to complete. If a receive operation has blocked
+for this much time without receiving additional data, it shall return
+with a partial count or \fIerrno\fP set to [EAGAIN] or
+[EWOULDBLOCK] if no data was received. The default for this option
+is zero, which indicates that a receive operation shall not time
+out. Note that not all implementations allow this option to be retrieved.
+.TP 7
+SO_SNDLOWAT
+Reports the minimum number of bytes to process for socket output operations.
+Non-blocking output operations shall process no
+data if flow control does not allow the smaller of the send low water
+mark value or the entire request to be processed. This option
+shall store an \fBint\fP value. Note that not all implementations
+allow this option to be retrieved.
+.TP 7
+SO_SNDTIMEO
+Reports the timeout value specifying the amount of time that an output
+function blocks because flow control prevents data from
+being sent. If a send operation has blocked for this time, it shall
+return with a partial count or with \fIerrno\fP set to
+[EAGAIN] or [EWOULDBLOCK] if no data was sent. The default for this
+option is zero, which indicates that a send operation shall not
+time out. The option shall store a \fBtimeval\fP structure. Note that
+not all implementations allow this option to be
+retrieved.
+.sp
+.LP
+For Boolean options, a zero value indicates that the option is disabled
+and a non-zero value indicates that the option is
+enabled.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIgetsockopt\fP() shall return 0; otherwise,
+-1 shall be returned and \fIerrno\fP set to indicate
+the error.
+.SH ERRORS
+.LP
+The \fIgetsockopt\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fIsocket\fP argument is not a valid file descriptor.
+.TP 7
+.B EINVAL
+The specified option is invalid at the specified socket level.
+.TP 7
+.B ENOPROTOOPT
+.sp
+The option is not supported by the protocol.
+.TP 7
+.B ENOTSOCK
+The \fIsocket\fP argument does not refer to a socket.
+.sp
+.LP
+The \fIgetsockopt\fP() function may fail if:
+.TP 7
+.B EACCES
+The calling process does not have the appropriate privileges.
+.TP 7
+.B EINVAL
+The socket has been shut down.
+.TP 7
+.B ENOBUFS
+Insufficient resources are available in the system to complete the
+function.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIbind\fP(), \fIclose\fP(), \fIendprotoent\fP(), \fIsetsockopt\fP(),
+\fIsocket\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<sys/socket.h>\fP, \fI<netinet/in.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getsubopt.3p b/man-pages-posix-2003/man3p/getsubopt.3p
new file mode 100644
index 0000000..f50e107
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getsubopt.3p
@@ -0,0 +1,220 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETSUBOPT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getsubopt
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getsubopt \- parse suboption arguments from a string
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+int getsubopt(char **\fP\fIoptionp\fP\fB, char * const *\fP\fIkeylistp\fP\fB,
+char **\fP\fIvaluep\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetsubopt\fP() function shall parse suboption arguments in
+a flag argument. Such options often result from the use of \fIgetopt\fP().
+.LP
+The \fIgetsubopt\fP() argument \fIoptionp\fP is a pointer to a pointer
+to the option argument string. The suboption arguments
+shall be separated by commas and each may consist of either a single
+token, or a token-value pair separated by an equal sign.
+.LP
+The \fIkeylistp\fP argument shall be a pointer to a vector of strings.
+The end of the vector is identified by a null pointer.
+Each entry in the vector is one of the possible tokens that might
+be found in *\fIoptionp\fP. Since commas delimit suboption
+arguments in \fIoptionp\fP, they should not appear in any of the strings
+pointed to by \fIkeylistp\fP. Similarly, because an
+equal sign separates a token from its value, the application should
+not include an equal sign in any of the strings pointed to by
+\fIkeylistp\fP.
+.LP
+The \fIvaluep\fP argument is the address of a value string pointer.
+.LP
+If a comma appears in \fIoptionp\fP, it shall be interpreted as a
+suboption separator. After commas have been processed, if
+there are one or more equal signs in a suboption string, the first
+equal sign in any suboption string shall be interpreted as a
+separator between a token and a value. Subsequent equal signs in a
+suboption string shall be interpreted as part of the value.
+.LP
+If the string at *\fIoptionp\fP contains only one suboption argument
+(equivalently, no commas), \fIgetsubopt\fP() shall update
+*\fIoptionp\fP to point to the null character at the end of the string.
+Otherwise, it shall isolate the suboption argument by
+replacing the comma separator with a null character, and shall update
+*\fIoptionp\fP to point to the start of the next suboption
+argument. If the suboption argument has an associated value (equivalently,
+contains an equal sign), \fIgetsubopt\fP() shall update
+*\fIvaluep\fP to point to the value's first character. Otherwise,
+it shall set *\fIvaluep\fP to a null pointer. The calling
+application may use this information to determine whether the presence
+or absence of a value for the suboption is an error.
+.LP
+Additionally, when \fIgetsubopt\fP() fails to match the suboption
+argument with a token in the \fIkeylistp\fP array, the
+calling application should decide if this is an error, or if the unrecognized
+option should be processed in another way.
+.SH RETURN VALUE
+.LP
+The \fIgetsubopt\fP() function shall return the index of the matched
+token string, or -1 if no token strings were matched.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.sp
+.RS
+.nf
+
+\fB#include <stdio.h>
+#include <stdlib.h>
+.sp
+
+int do_all;
+const char *type;
+int read_size;
+int write_size;
+int read_only;
+.sp
+
+enum
+{
+ RO_OPTION = 0,
+ RW_OPTION,
+ READ_SIZE_OPTION,
+ WRITE_SIZE_OPTION
+};
+.sp
+
+const char *mount_opts[] =
+{
+ [RO_OPTION] = "ro",
+ [RW_OPTION] = "rw",
+ [READ_SIZE_OPTION] = "rsize",
+ [WRITE_SIZE_OPTION] = "wsize",
+ NULL
+};
+.sp
+
+int
+main(int argc, char *argv[])
+{
+ char *subopts, *value;
+ int opt;
+.sp
+
+ while ((opt = getopt(argc, argv, "at:o:")) != -1)
+ switch(opt)
+ {
+ case 'a':
+ do_all = 1;
+ break;
+ case 't':
+ type = optarg;
+ break;
+ case 'o':
+ subopts = optarg;
+ while (*subopts != '\\0')
+ switch(getsubopt(&subopts, mount_opts, &value))
+ {
+ case RO_OPTION:
+ read_only = 1;
+ break;
+ case RW_OPTION:
+ read_only = 0;
+ break;
+ case READ_SIZE_OPTION:
+ if (value == NULL)
+ abort();
+ read_size = atoi(value);
+ break;
+ case WRITE_SIZE_OPTION:
+ if (value == NULL)
+ abort();
+ write_size = atoi(value);
+ break;
+ default:
+ /* Unknown suboption. */
+ printf("Unknown suboption `%s'\\n", value);
+ break;
+ }
+ break;
+ default:
+ abort();
+ }
+.sp
+
+ /* Do the real work. */
+.sp
+
+ return 0;
+}
+\fP
+.fi
+.RE
+.SS Parsing Suboptions
+.LP
+The following example uses the \fIgetsubopt\fP() function to parse
+a \fIvalue\fP argument in the \fIoptarg\fP external
+variable returned by a call to \fIgetopt\fP().
+.sp
+.RS
+.nf
+
+\fB#include <stdlib.h>
+\&...
+char *tokens[] = {"HOME", "PATH", "LOGNAME", (char *) NULL };
+char *value;
+int opt, index;
+.sp
+
+while ((opt = getopt(argc, argv, "e:")) != -1) {
+ switch(opt) {
+ case 'e' :
+ while ((index = getsubopt(&optarg, tokens, &value)) != -1) {
+ switch(index) {
+\&...
+ }
+ break;
+\&...
+ }
+}
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgetopt\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/gettimeofday.3p b/man-pages-posix-2003/man3p/gettimeofday.3p
new file mode 100644
index 0000000..81f8582
--- /dev/null
+++ b/man-pages-posix-2003/man3p/gettimeofday.3p
@@ -0,0 +1,63 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETTIMEOFDAY" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" gettimeofday
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+gettimeofday \- get the date and time
+.SH SYNOPSIS
+.LP
+\fB#include <sys/time.h>
+.br
+.sp
+int gettimeofday(struct timeval *restrict\fP \fItp\fP\fB, void *restrict\fP
+\fItzp\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgettimeofday\fP() function shall obtain the current time, expressed
+as seconds and microseconds since the Epoch, and
+store it in the \fBtimeval\fP structure pointed to by \fItp\fP. The
+resolution of the system clock is unspecified.
+.LP
+If \fItzp\fP is not a null pointer, the behavior is unspecified.
+.SH RETURN VALUE
+.LP
+The \fIgettimeofday\fP() function shall return 0 and no value shall
+be reserved to indicate an error.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIctime\fP(), \fIftime\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<sys/time.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getuid.3p b/man-pages-posix-2003/man3p/getuid.3p
new file mode 100644
index 0000000..ff5b849
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getuid.3p
@@ -0,0 +1,74 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETUID" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getuid
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getuid \- get a real user ID
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+uid_t getuid(void);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetuid\fP() function shall return the real user ID of the calling
+process.
+.SH RETURN VALUE
+.LP
+The \fIgetuid\fP() function shall always be successful and no return
+value is reserved to indicate the error.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Setting the Effective User ID to the Real User ID
+.LP
+The following example sets the effective user ID and the real user
+ID of the current process to the real user ID of the
+caller.
+.sp
+.RS
+.nf
+
+\fB#include <unistd.h>
+#include <sys/types.h>
+\&...
+setreuid(getuid(), getuid());
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgetegid\fP(), \fIgeteuid\fP(), \fIgetgid\fP(), \fIsetegid\fP(),
+\fIseteuid\fP(), \fIsetgid\fP(), \fIsetregid\fP(), \fIsetreuid\fP(),
+\fIsetuid\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<sys/types.h>\fP, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getutxent.3p b/man-pages-posix-2003/man3p/getutxent.3p
new file mode 100644
index 0000000..f7769c3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getutxent.3p
@@ -0,0 +1 @@
+.so man3p/getutxid.3p
diff --git a/man-pages-posix-2003/man3p/getutxid.3p b/man-pages-posix-2003/man3p/getutxid.3p
new file mode 100644
index 0000000..60636b2
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getutxid.3p
@@ -0,0 +1,204 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ENDUTXENT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" endutxent
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+endutxent, getutxent, getutxid, getutxline, pututxline, setutxent
+\- user accounting database functions
+.SH SYNOPSIS
+.LP
+\fB#include <utmpx.h>
+.br
+.sp
+void endutxent(void);
+.br
+struct utmpx *getutxent(void);
+.br
+struct utmpx *getutxid(const struct utmpx *\fP\fIid\fP\fB);
+.br
+struct utmpx *getutxline(const struct utmpx *\fP\fIline\fP\fB);
+.br
+struct utmpx *pututxline(const struct utmpx *\fP\fIutmpx\fP\fB);
+.br
+void setutxent(void); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall provide access to the user accounting database.
+.LP
+The \fIgetutxent\fP() function shall read the next entry from the
+user accounting database. If the database is not already
+open, it shall open it. If it reaches the end of the database, it
+shall fail.
+.LP
+The \fIgetutxid\fP() function shall search forward from the current
+point in the database. If the \fIut_type\fP value of the
+\fButmpx\fP structure pointed to by \fIid\fP is BOOT_TIME, OLD_TIME,
+or NEW_TIME, then it shall stop when it finds an entry with
+a matching \fIut_type\fP value. If the \fIut_type\fP value is INIT_PROCESS,
+LOGIN_PROCESS, USER_PROCESS, or DEAD_PROCESS, then it
+shall stop when it finds an entry whose type is one of these four
+and whose \fIut_id\fP member matches the \fIut_id\fP member of
+the \fButmpx\fP structure pointed to by \fIid\fP. If the end of the
+database is reached without a match, \fIgetutxid\fP() shall
+fail.
+.LP
+The \fIgetutxline\fP() function shall search forward from the current
+point in the database until it finds an entry of the type
+LOGIN_PROCESS or USER_PROCESS which also has a \fIut_line\fP value
+matching that in the \fButmpx\fP structure pointed to by
+\fIline\fP. If the end of the database is reached without a match,
+\fIgetutxline\fP() shall fail.
+.LP
+The \fIgetutxid\fP() or \fIgetutxline\fP() function may cache data.
+For this reason, to use \fIgetutxline\fP() to search for
+multiple occurrences, the application shall zero out the static data
+after each success, or \fIgetutxline\fP() may return a
+pointer to the same \fButmpx\fP structure.
+.LP
+There is one exception to the rule about clearing the structure before
+further reads are done. The implicit read done by
+\fIpututxline\fP() (if it finds that it is not already at the correct
+place in the user accounting database) shall not modify the
+static structure returned by \fIgetutxent\fP(), \fIgetutxid\fP(),
+or \fIgetutxline\fP(), if the application has modified this
+structure and passed the pointer back to \fIpututxline\fP().
+.LP
+For all entries that match a request, the \fIut_type\fP member indicates
+the type of the entry. Other members of the entry
+shall contain meaningful data based on the value of the \fIut_type\fP
+member as follows:
+.TS C
+center; l lw(40).
+\fBut_type Member\fP T{
+.na
+\fBOther Members with Meaningful Data\fP
+.ad
+T}
+EMPTY T{
+.na
+No others
+.ad
+T}
+BOOT_TIME T{
+.na
+\fIut_tv\fP
+.ad
+T}
+OLD_TIME T{
+.na
+\fIut_tv\fP
+.ad
+T}
+NEW_TIME T{
+.na
+\fIut_tv\fP
+.ad
+T}
+USER_PROCESS T{
+.na
+\fIut_id\fP, \fIut_user\fP (login name of the user), \fIut_line\fP, \fIut_pid\fP, \fIut_tv\fP
+.ad
+T}
+INIT_PROCESS T{
+.na
+\fIut_id\fP, \fIut_pid\fP, \fIut_tv\fP
+.ad
+T}
+LOGIN_PROCESS T{
+.na
+\fIut_id\fP, \fIut_user\fP (implementation-defined name of the login process), \fIut_pid\fP, \fIut_tv\fP
+.ad
+T}
+DEAD_PROCESS T{
+.na
+\fIut_id\fP, \fIut_pid\fP, \fIut_tv\fP
+.ad
+T}
+.TE
+.LP
+An implementation that provides extended security controls may impose
+implementation-defined restrictions on accessing the user
+accounting database. In particular, the system may deny the existence
+of some or all of the user accounting database entries
+associated with users other than the caller.
+.LP
+If the process has appropriate privileges, the \fIpututxline\fP()
+function shall write out the structure into the user
+accounting database. It shall use \fIgetutxid\fP() to search for a
+record that satisfies the request. If this search succeeds,
+then the entry shall be replaced. Otherwise, a new entry shall be
+made at the end of the user accounting database.
+.LP
+The \fIendutxent\fP() function shall close the user accounting database.
+.LP
+The \fIsetutxent\fP() function shall reset the input to the beginning
+of the database. This should be done before each search
+for a new entry if it is desired that the entire database be examined.
+.LP
+These functions need not be reentrant. A function that is not required
+to be reentrant is not required to be thread-safe.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIgetutxent\fP(), \fIgetutxid\fP(), and
+\fIgetutxline\fP() shall return a pointer to a
+\fButmpx\fP structure containing a copy of the requested entry in
+the user accounting database. Otherwise, a null pointer shall be
+returned.
+.LP
+The return value may point to a static area which is overwritten by
+a subsequent call to \fIgetutxid\fP() or
+\fIgetutxline\fP().
+.LP
+Upon successful completion, \fIpututxline\fP() shall return a pointer
+to a \fButmpx\fP structure containing a copy of the
+entry added to the user accounting database. Otherwise, a null pointer
+shall be returned.
+.LP
+The \fIendutxent\fP() and \fIsetutxent\fP() functions shall not return
+a value.
+.SH ERRORS
+.LP
+No errors are defined for the \fIendutxent\fP(), \fIgetutxent\fP(),
+\fIgetutxid\fP(), \fIgetutxline\fP(), and
+\fIsetutxent\fP() functions.
+.LP
+The \fIpututxline\fP() function may fail if:
+.TP 7
+.B EPERM
+The process does not have appropriate privileges.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The sizes of the arrays in the structure can be found using the \fIsizeof\fP
+operator.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<utmpx.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getutxline.3p b/man-pages-posix-2003/man3p/getutxline.3p
new file mode 100644
index 0000000..f7769c3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getutxline.3p
@@ -0,0 +1 @@
+.so man3p/getutxid.3p
diff --git a/man-pages-posix-2003/man3p/getwc.3p b/man-pages-posix-2003/man3p/getwc.3p
new file mode 100644
index 0000000..60ebf4b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getwc.3p
@@ -0,0 +1,65 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETWC" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getwc
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getwc \- get a wide character from a stream
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+#include <wchar.h>
+.br
+.sp
+wint_t getwc(FILE *\fP\fIstream\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetwc\fP() function shall be equivalent to \fIfgetwc\fP(),
+except that if it is
+implemented as a macro it may evaluate \fIstream\fP more than once,
+so the argument should never be an expression with side
+effects.
+.SH RETURN VALUE
+.LP
+Refer to \fIfgetwc\fP().
+.SH ERRORS
+.LP
+Refer to \fIfgetwc\fP().
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Since it may be implemented as a macro, \fIgetwc\fP() may treat incorrectly
+a \fIstream\fP argument with side effects. In
+particular, \fIgetwc\fP(*\fIf\fP++) does not necessarily work as expected.
+Therefore, use of this function is not recommended; \fIfgetwc\fP()
+should be used instead.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfgetwc\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<stdio.h>\fP, \fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getwchar.3p b/man-pages-posix-2003/man3p/getwchar.3p
new file mode 100644
index 0000000..aa0eb68
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getwchar.3p
@@ -0,0 +1,59 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETWCHAR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getwchar
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getwchar \- get a wide character from a stdin stream
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+wint_t getwchar(void);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetwchar\fP() function shall be equivalent to \fIgetwc\fP(\fIstdin\fP).
+.SH RETURN VALUE
+.LP
+Refer to \fIfgetwc\fP().
+.SH ERRORS
+.LP
+Refer to \fIfgetwc\fP().
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+If the \fBwint_t\fP value returned by \fIgetwchar\fP() is stored into
+a variable of type \fBwchar_t\fP and then compared
+against the \fBwint_t\fP macro WEOF, the result may be incorrect.
+Only the \fBwint_t\fP type is guaranteed to be able to
+represent any wide character and WEOF.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfgetwc\fP(), \fIgetwc\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/getwd.3p b/man-pages-posix-2003/man3p/getwd.3p
new file mode 100644
index 0000000..b4c1e04
--- /dev/null
+++ b/man-pages-posix-2003/man3p/getwd.3p
@@ -0,0 +1,79 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GETWD" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" getwd
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+getwd \- get the current working directory pathname (\fBLEGACY\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+char *getwd(char *\fP\fIpath_name\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgetwd\fP() function shall determine an absolute pathname of
+the current working directory of the calling process, and
+copy a string containing that pathname into the array pointed to by
+the \fIpath_name\fP argument.
+.LP
+If the length of the pathname of the current working directory is
+greater than ({PATH_MAX}+1) including the null byte,
+\fIgetwd\fP() shall fail and return a null pointer.
+.SH RETURN VALUE
+.LP
+Upon successful completion, a pointer to the string containing the
+absolute pathname of the current working directory shall be
+returned. Otherwise, \fIgetwd\fP() shall return a null pointer and
+the contents of the array pointed to by \fIpath_name\fP are
+undefined.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+For applications portability, the \fIgetcwd\fP() function should be
+used to determine
+the current working directory instead of \fIgetwd\fP().
+.SH RATIONALE
+.LP
+Since the user cannot specify the length of the buffer passed to \fIgetwd\fP(),
+use of this function is discouraged. The length
+of a pathname described in {PATH_MAX} is file system-dependent and
+may vary from one mount point to another, or might even be
+unlimited. It is possible to overflow this buffer in such a way as
+to cause applications to fail, or possible system security
+violations.
+.LP
+It is recommended that the \fIgetcwd\fP() function should be used
+to determine the
+current working directory.
+.SH FUTURE DIRECTIONS
+.LP
+This function may be withdrawn in a future version.
+.SH SEE ALSO
+.LP
+\fIgetcwd\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/glob.3p b/man-pages-posix-2003/man3p/glob.3p
new file mode 100644
index 0000000..dc4fa11
--- /dev/null
+++ b/man-pages-posix-2003/man3p/glob.3p
@@ -0,0 +1,359 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GLOB" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" glob
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+glob, globfree \- generate pathnames matching a pattern
+.SH SYNOPSIS
+.LP
+\fB#include <glob.h>
+.br
+.sp
+int glob(const char *restrict\fP \fIpattern\fP\fB, int\fP \fIflags\fP\fB,
+.br
+\ \ \ \ \ \ int(*\fP\fIerrfunc\fP\fB)(const char *\fP\fIepath\fP\fB,
+int\fP
+\fIeerrno\fP\fB),
+.br
+\ \ \ \ \ \ glob_t *restrict\fP \fIpglob\fP\fB);
+.br
+void globfree(glob_t *\fP\fIpglob\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIglob\fP() function is a pathname generator that shall implement
+the rules defined in the Shell and Utilities volume of
+IEEE\ Std\ 1003.1-2001, Section 2.13, Pattern Matching Notation, with
+optional support for rule 3 in the Shell and Utilities volume of IEEE\ Std\ 1003.1-2001,
+Section 2.13.3, Patterns Used for Filename Expansion.
+.LP
+The structure type \fBglob_t\fP is defined in \fI<glob.h>\fP and includes
+at least
+the following members:
+.TS C
+center; l1 l1 l.
+\fBMember Type\fP \fBMember Name\fP \fBDescription\fP
+\fBsize_t\fP \fIgl_pathc\fP Count of paths matched by \fIpattern\fP.
+\fBchar **\fP \fIgl_pathv\fP Pointer to a list of matched pathnames.
+\fBsize_t\fP \fIgl_offs\fP Slots to reserve at the beginning of \fIgl_pathv\fP.
+.TE
+.LP
+The argument \fIpattern\fP is a pointer to a pathname pattern to be
+expanded. The \fIglob\fP() function shall match all
+accessible pathnames against this pattern and develop a list of all
+pathnames that match. In order to have access to a pathname,
+\fIglob\fP() requires search permission on every component of a path
+except the last, and read permission on each directory of any
+filename component of \fIpattern\fP that contains any of the following
+special characters: \fB'*'\fP, \fB'?'\fP, and
+\fB'['\fP .
+.LP
+The \fIglob\fP() function shall store the number of matched pathnames
+into \fIpglob\fP->\fIgl_pathc\fP and a pointer to a
+list of pointers to pathnames into \fIpglob\fP->\fIgl_pathv\fP. The
+pathnames shall be in sort order as defined by the current
+setting of the \fILC_COLLATE\fP category; see the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Section 7.3.2, LC_COLLATE. The first
+pointer after the last pathname shall be a null
+pointer. If the pattern does not match any pathnames, the returned
+number of matched paths is set to 0, and the contents of
+\fIpglob\fP->\fIgl_pathv\fP are implementation-defined.
+.LP
+It is the caller's responsibility to create the structure pointed
+to by \fIpglob\fP. The \fIglob\fP() function shall allocate
+other space as needed, including the memory pointed to by \fIgl_pathv\fP.
+The \fIglobfree\fP() function shall free any space
+associated with \fIpglob\fP from a previous call to \fIglob\fP().
+.LP
+The \fIflags\fP argument is used to control the behavior of \fIglob\fP().
+The value of \fIflags\fP is a bitwise-inclusive OR
+of zero or more of the following constants, which are defined in \fI<glob.h>\fP:
+.TP 7
+GLOB_APPEND
+Append pathnames generated to the ones from a previous call to \fIglob\fP().
+.TP 7
+GLOB_DOOFFS
+Make use of \fIpglob\fP->\fIgl_offs\fP. If this flag is set, \fIpglob\fP->\fIgl_offs\fP
+is used to specify how many
+null pointers to add to the beginning of \fIpglob\fP->\fIgl_pathv\fP.
+In other words, \fIpglob\fP->\fIgl_pathv\fP shall
+point to \fIpglob\fP->\fIgl_offs\fP null pointers, followed by \fIpglob\fP->\fIgl_pathc\fP
+pathname pointers, followed by
+a null pointer.
+.TP 7
+GLOB_ERR
+Cause \fIglob\fP() to return when it encounters a directory that it
+cannot open or read. Ordinarily, \fIglob\fP() continues
+to find matches.
+.TP 7
+GLOB_MARK
+Each pathname that is a directory that matches \fIpattern\fP shall
+have a slash appended.
+.TP 7
+GLOB_NOCHECK
+Supports rule 3 in the Shell and Utilities volume of IEEE\ Std\ 1003.1-2001,
+Section 2.13.3, Patterns Used for Filename Expansion. If \fIpattern\fP
+does not
+match any pathname, then \fIglob\fP() shall return a list consisting
+of only \fIpattern\fP, and the number of matched pathnames
+is 1.
+.TP 7
+GLOB_NOESCAPE
+Disable backslash escaping.
+.TP 7
+GLOB_NOSORT
+Ordinarily, \fIglob\fP() sorts the matching pathnames according to
+the current setting of the \fILC_COLLATE\fP category; see
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, Section 7.3.2,
+LC_COLLATE. When this flag is used, the order of pathnames returned
+is unspecified.
+.sp
+.LP
+The GLOB_APPEND flag can be used to append a new set of pathnames
+to those found in a previous call to \fIglob\fP(). The
+following rules apply to applications when two or more calls to \fIglob\fP()
+are made with the same value of \fIpglob\fP and
+without intervening calls to \fIglobfree\fP():
+.IP " 1." 4
+The first such call shall not set GLOB_APPEND. All subsequent calls
+shall set it.
+.LP
+.IP " 2." 4
+All the calls shall set GLOB_DOOFFS, or all shall not set it.
+.LP
+.IP " 3." 4
+After the second call, \fIpglob\fP->\fIgl_pathv\fP points to a list
+containing the following:
+.RS
+.IP " a." 4
+Zero or more null pointers, as specified by GLOB_DOOFFS and \fIpglob\fP->\fIgl_offs\fP.
+.LP
+.IP " b." 4
+Pointers to the pathnames that were in the \fIpglob\fP->\fIgl_pathv\fP
+list before the call, in the same order as
+before.
+.LP
+.IP " c." 4
+Pointers to the new pathnames generated by the second call, in the
+specified order.
+.LP
+.RE
+.LP
+.IP " 4." 4
+The count returned in \fIpglob\fP->\fIgl_pathc\fP shall be the total
+number of pathnames from the two calls.
+.LP
+.IP " 5." 4
+The application can change any of the fields after a call to \fIglob\fP().
+If it does, the application shall reset them to the
+original value before a subsequent call, using the same \fIpglob\fP
+value, to \fIglobfree\fP() or \fIglob\fP() with the
+GLOB_APPEND flag.
+.LP
+.LP
+If, during the search, a directory is encountered that cannot be opened
+or read and \fIerrfunc\fP is not a null pointer,
+\fIglob\fP() calls (\fI*errfunc\fP()) with two arguments:
+.IP " 1." 4
+The \fIepath\fP argument is a pointer to the path that failed.
+.LP
+.IP " 2." 4
+The \fIeerrno\fP argument is the value of \fIerrno\fP from the failure,
+as set by \fIopendir\fP(), \fIreaddir\fP(), or \fIstat\fP(). (Other
+values may be used to report other errors not explicitly documented
+for those
+functions.)
+.LP
+.LP
+If (\fI*errfunc\fP()) is called and returns non-zero, or if the GLOB_ERR
+flag is set in \fIflags\fP, \fIglob\fP() shall stop
+the scan and return GLOB_ABORTED after setting \fIgl_pathc\fP and
+\fIgl_pathv\fP in \fIpglob\fP to reflect the paths already
+scanned. If GLOB_ERR is not set and either \fIerrfunc\fP is a null
+pointer or (\fI*errfunc\fP()) returns 0, the error shall be
+ignored.
+.LP
+The \fIglob\fP() function shall not fail because of large files.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIglob\fP() shall return 0. The argument
+\fIpglob\fP->\fIgl_pathc\fP shall return the number
+of matched pathnames and the argument \fIpglob\fP->\fIgl_pathv\fP
+shall contain a pointer to a null-terminated list of matched
+and sorted pathnames. However, if \fIpglob\fP->\fIgl_pathc\fP is 0,
+the content of \fIpglob\fP->\fIgl_pathv\fP is
+undefined.
+.LP
+The \fIglobfree\fP() function shall not return a value.
+.LP
+If \fIglob\fP() terminates due to an error, it shall return one of
+the non-zero constants defined in \fI<glob.h>\fP. The arguments \fIpglob\fP->\fIgl_pathc\fP
+and
+\fIpglob\fP->\fIgl_pathv\fP are still set as defined above.
+.SH ERRORS
+.LP
+The \fIglob\fP() function shall fail and return the corresponding
+value if:
+.TP 7
+GLOB_ABORTED
+The scan was stopped because GLOB_ERR was set or (\fI*errfunc\fP())
+returned non-zero.
+.TP 7
+GLOB_NOMATCH
+The pattern does not match any existing pathname, and GLOB_NOCHECK
+was not set in flags.
+.TP 7
+GLOB_NOSPACE
+An attempt to allocate memory failed.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+One use of the GLOB_DOOFFS flag is by applications that build an argument
+list for use with \fIexecv\fP(), \fIexecve\fP(), or \fIexecvp\fP().
+Suppose, for example, that an application wants to do the equivalent
+of:
+.sp
+.RS
+.nf
+
+\fBls -l *.c
+\fP
+.fi
+.RE
+.LP
+but for some reason:
+.sp
+.RS
+.nf
+
+\fBsystem("ls -l *.c")
+\fP
+.fi
+.RE
+.LP
+is not acceptable. The application could obtain approximately the
+same result using the sequence:
+.sp
+.RS
+.nf
+
+\fBglobbuf.gl_offs = 2;
+glob("*.c", GLOB_DOOFFS, NULL, &globbuf);
+globbuf.gl_pathv[0] = "ls";
+globbuf.gl_pathv[1] = "-l";
+execvp("ls", &globbuf.gl_pathv[0]);
+\fP
+.fi
+.RE
+.LP
+Using the same example:
+.sp
+.RS
+.nf
+
+\fBls -l *.c *.h
+\fP
+.fi
+.RE
+.LP
+could be approximately simulated using GLOB_APPEND as follows:
+.sp
+.RS
+.nf
+
+\fBglobbuf.gl_offs = 2;
+glob("*.c", GLOB_DOOFFS, NULL, &globbuf);
+glob("*.h", GLOB_DOOFFS|GLOB_APPEND, NULL, &globbuf);
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+This function is not provided for the purpose of enabling utilities
+to perform pathname expansion on their arguments, as this
+operation is performed by the shell, and utilities are explicitly
+not expected to redo this. Instead, it is provided for
+applications that need to do pathname expansion on strings obtained
+from other sources, such as a pattern typed by a user or read
+from a file.
+.LP
+If a utility needs to see if a pathname matches a given pattern, it
+can use \fIfnmatch\fP().
+.LP
+Note that \fIgl_pathc\fP and \fIgl_pathv\fP have meaning even if \fIglob\fP()
+fails. This allows \fIglob\fP() to report
+partial results in the event of an error. However, if \fIgl_pathc\fP
+is 0, \fIgl_pathv\fP is unspecified even if \fIglob\fP()
+did not return an error.
+.LP
+The GLOB_NOCHECK option could be used when an application wants to
+expand a pathname if wildcards are specified, but wants to
+treat the pattern as just a string otherwise. The \fIsh\fP utility
+might use this for
+option-arguments, for example.
+.LP
+The new pathnames generated by a subsequent call with GLOB_APPEND
+are not sorted together with the previous pathnames. This
+mirrors the way that the shell handles pathname expansion when multiple
+expansions are done on a command line.
+.LP
+Applications that need tilde and parameter expansion should use \fIwordexp\fP().
+.SH RATIONALE
+.LP
+It was claimed that the GLOB_DOOFFS flag is unnecessary because it
+could be simulated using:
+.sp
+.RS
+.nf
+
+\fBnew = (char **)malloc((n + pglob->gl_pathc + 1)
+ * sizeof(char *));
+(void) memcpy(new+n, pglob->gl_pathv,
+ pglob->gl_pathc * sizeof(char *));
+(void) memset(new, 0, n * sizeof(char *));
+free(pglob->gl_pathv);
+pglob->gl_pathv = new;
+\fP
+.fi
+.RE
+.LP
+However, this assumes that the memory pointed to by \fIgl_pathv\fP
+is a block that was separately created using \fImalloc\fP(). This
+is not necessarily the case. An application should make no assumptions
+about
+how the memory referenced by fields in \fIpglob\fP was allocated.
+It might have been obtained from \fImalloc\fP() in a large chunk and
+then carved up within \fIglob\fP(), or it might have been
+created using a different memory allocator. It is not the intent of
+the standard developers to specify or imply how the memory used
+by \fIglob\fP() is managed.
+.LP
+The GLOB_APPEND flag would be used when an application wants to expand
+several different patterns into a single list.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexec\fP(), \fIfnmatch\fP(), \fIopendir\fP(), \fIreaddir\fP(),
+\fIstat\fP(), \fIwordexp\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<glob.h>\fP, the Shell and Utilities volume
+of IEEE\ Std\ 1003.1-2001
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/globfree.3p b/man-pages-posix-2003/man3p/globfree.3p
new file mode 100644
index 0000000..7978c32
--- /dev/null
+++ b/man-pages-posix-2003/man3p/globfree.3p
@@ -0,0 +1 @@
+.so man3p/glob.3p
diff --git a/man-pages-posix-2003/man3p/gmtime.3p b/man-pages-posix-2003/man3p/gmtime.3p
new file mode 100644
index 0000000..3f49599
--- /dev/null
+++ b/man-pages-posix-2003/man3p/gmtime.3p
@@ -0,0 +1,119 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GMTIME" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" gmtime
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+gmtime, gmtime_r \- convert a time value to a broken-down UTC time
+.SH SYNOPSIS
+.LP
+\fB#include <time.h>
+.br
+.sp
+struct tm *gmtime(const time_t *\fP\fItimer\fP\fB);
+.br
+\fP
+.LP
+\fBstruct tm *gmtime_r(const time_t *restrict\fP \fItimer\fP\fB,
+.br
+\ \ \ \ \ \ struct tm *restrict\fP \fIresult\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+For \fIgmtime\fP(): The functionality described on this reference
+page is aligned with the ISO\ C standard. Any
+conflict between the requirements described here and the ISO\ C standard
+is unintentional. This volume of
+IEEE\ Std\ 1003.1-2001 defers to the ISO\ C standard.
+.LP
+The \fIgmtime\fP() function shall convert the time in seconds since
+the Epoch pointed to by \fItimer\fP into a broken-down
+time, expressed as Coordinated Universal Time (UTC).
+.LP
+The
+relationship between a time in seconds since the Epoch used as an
+argument to \fIgmtime\fP() and the \fBtm\fP structure (defined
+in the \fI<time.h>\fP header) is that the result shall be as specified
+in the
+expression given in the definition of seconds since the Epoch (see
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Section 4.14, Seconds Since the Epoch), where the names in the structure
+and in
+the expression correspond.
+.LP
+The same relationship shall apply for \fIgmtime_r\fP().
+.LP
+The
+\fIgmtime\fP() function need not be reentrant. A function that is
+not required to be reentrant is not required to be
+thread-safe.
+.LP
+The \fIasctime\fP(), \fIctime\fP(),
+\fIgmtime\fP(), and \fIlocaltime\fP() functions shall return values
+in one of two
+static objects: a broken-down time structure and an array of type
+\fBchar\fP. Execution of any of the functions may overwrite the
+information returned in either of these objects by any of the other
+functions.
+.LP
+The \fIgmtime_r\fP() function shall convert the time in seconds since
+the Epoch pointed to by \fItimer\fP into a broken-down time
+expressed as Coordinated Universal Time (UTC). The broken-down time
+is stored in the structure referred to by \fIresult\fP. The
+\fIgmtime_r\fP() function shall also return the address of the same
+structure.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIgmtime\fP() function shall return
+a pointer to a \fBstruct tm\fP. If an error is detected,
+\fIgmtime\fP() shall return a null pointer and set \fIerrno\fP
+to indicate the error.
+.LP
+Upon successful completion, \fIgmtime_r\fP() shall return the address
+of the structure pointed to by the argument \fIresult\fP.
+If an error is detected, \fIgmtime_r\fP() shall return a null pointer.
+.SH ERRORS
+.LP
+The \fIgmtime\fP() function shall fail if:
+.TP 7
+.B EOVERFLOW
+The result cannot be represented.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIgmtime_r\fP() function is thread-safe and returns values in
+a user-supplied buffer instead of possibly using a static
+data area that may be overwritten by each call.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIasctime\fP(), \fIclock\fP(), \fIctime\fP(),
+\fIdifftime\fP(), \fIlocaltime\fP(), \fImktime\fP(), \fIstrftime\fP(),
+\fIstrptime\fP(),
+\fItime\fP(), \fIutime\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<time.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/gmtime_r.3p b/man-pages-posix-2003/man3p/gmtime_r.3p
new file mode 100644
index 0000000..e326857
--- /dev/null
+++ b/man-pages-posix-2003/man3p/gmtime_r.3p
@@ -0,0 +1 @@
+.so man3p/gmtime.3p
diff --git a/man-pages-posix-2003/man3p/grantpt.3p b/man-pages-posix-2003/man3p/grantpt.3p
new file mode 100644
index 0000000..2b704bc
--- /dev/null
+++ b/man-pages-posix-2003/man3p/grantpt.3p
@@ -0,0 +1,80 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "GRANTPT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" grantpt
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+grantpt \- grant access to the slave pseudo-terminal device
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+int grantpt(int\fP \fIfildes\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIgrantpt\fP() function shall change the mode and ownership of
+the slave pseudo-terminal device associated with its master
+pseudo-terminal counterpart. The \fIfildes\fP argument is a file descriptor
+that refers to a master pseudo-terminal device. The
+user ID of the slave shall be set to the real UID of the calling process
+and the group ID shall be set to an unspecified group ID.
+The permission mode of the slave pseudo-terminal shall be set to readable
+and writable by the owner, and writable by the group.
+.LP
+The behavior of the \fIgrantpt\fP() function is unspecified if the
+application has installed a signal handler to catch SIGCHLD
+signals.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIgrantpt\fP() shall return 0; otherwise,
+it shall return -1 and set \fIerrno\fP to indicate the
+error.
+.SH ERRORS
+.LP
+The \fIgrantpt\fP() function may fail if:
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not a valid open file descriptor.
+.TP 7
+.B EINVAL
+The \fIfildes\fP argument is not associated with a master pseudo-terminal
+device.
+.TP 7
+.B EACCES
+The corresponding slave pseudo-terminal device could not be accessed.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIopen\fP(), \fIptsname\fP(), \fIunlockpt\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/h_errno.3p b/man-pages-posix-2003/man3p/h_errno.3p
new file mode 100644
index 0000000..5ecc949
--- /dev/null
+++ b/man-pages-posix-2003/man3p/h_errno.3p
@@ -0,0 +1,62 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "H_ERRNO" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" h_errno
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+h_errno \- error return value for network database operations
+.SH SYNOPSIS
+.LP
+\fB#include <netdb.h> \fP
+.SH DESCRIPTION
+.LP
+This method of returning errors is used only in connection with obsolescent
+functions.
+.LP
+The \fI<netdb.h>\fP header provides a declaration of \fIh_errno\fP
+as a
+modifiable lvalue of type \fBint\fP.
+.LP
+It is unspecified whether \fIh_errno\fP is a macro or an identifier
+declared with external linkage. If a macro definition is
+suppressed in order to access an actual object, or a program defines
+an identifier with the name \fIh_errno\fP, the behavior is
+undefined.
+.SH RETURN VALUE
+.LP
+None.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Applications should obtain the definition of \fIh_errno\fP by the
+inclusion of the \fI<netdb.h>\fP header.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+\fIh_errno\fP may be withdrawn in a future version.
+.SH SEE ALSO
+.LP
+\fIendhostent\fP(), \fIerrno\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<netdb.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/hcreate.3p b/man-pages-posix-2003/man3p/hcreate.3p
new file mode 100644
index 0000000..314c0c9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/hcreate.3p
@@ -0,0 +1,180 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "HCREATE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" hcreate
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+hcreate, hdestroy, hsearch \- manage hash search table
+.SH SYNOPSIS
+.LP
+\fB#include <search.h>
+.br
+.sp
+int hcreate(size_t\fP \fInel\fP\fB);
+.br
+void hdestroy(void);
+.br
+ENTRY *hsearch(ENTRY\fP \fIitem\fP\fB, ACTION\fP \fIaction\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIhcreate\fP(), \fIhdestroy\fP(), and \fIhsearch\fP() functions
+shall manage hash search tables.
+.LP
+The \fIhcreate\fP() function shall allocate sufficient space for the
+table, and the application shall ensure it is called
+before \fIhsearch\fP() is used. The \fInel\fP argument is an estimate
+of the maximum number of entries that the table shall
+contain. This number may be adjusted upward by the algorithm in order
+to obtain certain mathematically favorable circumstances.
+.LP
+The \fIhdestroy\fP() function shall dispose of the search table, and
+may be followed by another call to \fIhcreate\fP(). After
+the call to \fIhdestroy\fP(), the data can no longer be considered
+accessible.
+.LP
+The \fIhsearch\fP() function is a hash-table search routine. It shall
+return a pointer into a hash table indicating the
+location at which an entry can be found. The \fIitem\fP argument is
+a structure of type \fBENTRY\fP (defined in the \fI<search.h>\fP header)
+containing two pointers: \fIitem.key\fP points to the comparison
+key (a \fBchar *\fP), and \fIitem.data\fP (a \fBvoid *\fP) points
+to any other data to be associated with that key. The
+comparison function used by \fIhsearch\fP() is \fIstrcmp\fP(). The
+\fIaction\fP argument
+is a member of an enumeration type \fBACTION\fP indicating the disposition
+of the entry if it cannot be found in the table. ENTER
+indicates that the item should be inserted in the table at an appropriate
+point. FIND indicates that no entry should be made.
+Unsuccessful resolution is indicated by the return of a null pointer.
+.LP
+These functions need not be reentrant. A function that is not required
+to be reentrant is not required to be thread-safe.
+.SH RETURN VALUE
+.LP
+The \fIhcreate\fP() function shall return 0 if it cannot allocate
+sufficient space for the table; otherwise, it shall return
+non-zero.
+.LP
+The \fIhdestroy\fP() function shall not return a value.
+.LP
+The \fIhsearch\fP() function shall return a null pointer if either
+the action is FIND and the item could not be found or the
+action is ENTER and the table is full.
+.SH ERRORS
+.LP
+The \fIhcreate\fP() and \fIhsearch\fP() functions may fail if:
+.TP 7
+.B ENOMEM
+Insufficient storage space is available.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+The following example reads in strings followed by two numbers and
+stores them in a hash table, discarding duplicates. It then
+reads in strings and finds the matching entry in the hash table and
+prints it out.
+.sp
+.RS
+.nf
+
+\fB#include <stdio.h>
+#include <search.h>
+#include <string.h>
+.sp
+
+struct info { /* This is the info stored in the table */
+ int age, room; /* other than the key. */
+};
+.sp
+
+#define NUM_EMPL 5000 /* # of elements in search table. */
+
+.sp
+
+int main(void)
+{
+ char string_space[NUM_EMPL*20]; /* Space to store strings. */
+ struct info info_space[NUM_EMPL]; /* Space to store employee info. */
+ char *str_ptr = string_space; /* Next space in string_space. */
+ struct info *info_ptr = info_space;
+ /* Next space in info_space. */
+ ENTRY item;
+ ENTRY *found_item; /* Name to look for in table. */
+ char name_to_find[30];
+.sp
+
+ int i = 0;
+.sp
+
+ /* Create table; no error checking is performed. */
+ (void) hcreate(NUM_EMPL);
+ while (scanf("%s%d%d", str_ptr, &info_ptr->age,
+ &info_ptr->room) != EOF && i++ < NUM_EMPL) {
+.sp
+
+ /* Put information in structure, and structure in item. */
+ item.key = str_ptr;
+ item.data = info_ptr;
+ str_ptr += strlen(str_ptr) + 1;
+ info_ptr++;
+.sp
+
+ /* Put item into table. */
+ (void) hsearch(item, ENTER);
+ }
+.sp
+
+ /* Access table. */
+ item.key = name_to_find;
+ while (scanf("%s", item.key) != EOF) {
+ if ((found_item = hsearch(item, FIND)) != NULL) {
+.sp
+
+ /* If item is in the table. */
+ (void)printf("found %s, age = %d, room = %d\\n",
+ found_item->key,
+ ((struct info *)found_item->data)->age,
+ ((struct info *)found_item->data)->room);
+ } else
+ (void)printf("no such employee %s\\n", name_to_find);
+ }
+ return 0;
+}
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The \fIhcreate\fP() and \fIhsearch\fP() functions may use \fImalloc\fP()
+to allocate
+space.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIbsearch\fP(), \fIlsearch\fP(), \fImalloc\fP(), \fIstrcmp\fP(),
+\fItsearch\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<search.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/hdestroy.3p b/man-pages-posix-2003/man3p/hdestroy.3p
new file mode 100644
index 0000000..febf985
--- /dev/null
+++ b/man-pages-posix-2003/man3p/hdestroy.3p
@@ -0,0 +1 @@
+.so man3p/hcreate.3p
diff --git a/man-pages-posix-2003/man3p/hsearch.3p b/man-pages-posix-2003/man3p/hsearch.3p
new file mode 100644
index 0000000..febf985
--- /dev/null
+++ b/man-pages-posix-2003/man3p/hsearch.3p
@@ -0,0 +1 @@
+.so man3p/hcreate.3p
diff --git a/man-pages-posix-2003/man3p/htonl.3p b/man-pages-posix-2003/man3p/htonl.3p
new file mode 100644
index 0000000..500e652
--- /dev/null
+++ b/man-pages-posix-2003/man3p/htonl.3p
@@ -0,0 +1,72 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "HTONL" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" htonl
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+htonl, htons, ntohl, ntohs \- convert values between host and network
+byte order
+.SH SYNOPSIS
+.LP
+\fB#include <arpa/inet.h>
+.br
+.sp
+uint32_t htonl(uint32_t\fP \fIhostlong\fP\fB);
+.br
+uint16_t htons(uint16_t\fP \fIhostshort\fP\fB);
+.br
+uint32_t ntohl(uint32_t\fP \fInetlong\fP\fB);
+.br
+uint16_t ntohs(uint16_t\fP \fInetshort\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall convert 16-bit and 32-bit quantities between
+network byte order and host byte order.
+.LP
+On some implementations, these functions are defined as macros.
+.LP
+The \fBuint32_t\fP and \fBuint16_t\fP types are defined in \fI<inttypes.h>\fP.
+.SH RETURN VALUE
+.LP
+The \fIhtonl\fP() and \fIhtons\fP() functions shall return the argument
+value converted from host to network byte order.
+.LP
+The \fIntohl\fP() and \fIntohs\fP() functions shall return the argument
+value converted from network to host byte order.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+These functions are most often used in conjunction with IPv4 addresses
+and ports as returned by \fIgethostent\fP() and \fIgetservent\fP().
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIendhostent\fP(), \fIendservent\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<inttypes.h>\fP, \fI<arpa/inet.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/htons.3p b/man-pages-posix-2003/man3p/htons.3p
new file mode 100644
index 0000000..6bb3f2d
--- /dev/null
+++ b/man-pages-posix-2003/man3p/htons.3p
@@ -0,0 +1 @@
+.so man3p/htonl.3p
diff --git a/man-pages-posix-2003/man3p/hypot.3p b/man-pages-posix-2003/man3p/hypot.3p
new file mode 100644
index 0000000..a7da3f6
--- /dev/null
+++ b/man-pages-posix-2003/man3p/hypot.3p
@@ -0,0 +1,122 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "HYPOT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" hypot
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+hypot, hypotf, hypotl \- Euclidean distance function
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double hypot(double\fP \fIx\fP\fB, double\fP \fIy\fP\fB);
+.br
+float hypotf(float\fP \fIx\fP\fB, float\fP \fIy\fP\fB);
+.br
+long double hypotl(long double\fP \fIx\fP\fB, long double\fP \fIy\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the value of the square root of \fIx\fP**2+
+\fIy\fP**2 without undue overflow or underflow.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the length
+of the hypotenuse of a right-angled triangle with sides of
+length \fIx\fP and \fIy\fP.
+.LP
+If the correct value would cause overflow, a range error shall occur
+and \fIhypot\fP(), \fIhypotf\fP(), and \fIhypotl\fP()
+shall return the value of the macro HUGE_VAL, HUGE_VALF, and HUGE_VALL,
+respectively.
+.LP
+If
+\fIx\fP or \fIy\fP is \(+-Inf, +Inf shall be returned (even if one
+of \fIx\fP or \fIy\fP is NaN).
+.LP
+If \fIx\fP or \fIy\fP is NaN, and the other is not \(+-Inf, a NaN
+shall be returned.
+.LP
+If both arguments are subnormal and the correct result is subnormal,
+a range error may occur and the correct result is returned.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Range\ Error
+The result overflows.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the overflow floating-point exception shall be
+raised.
+.sp
+.LP
+These functions may fail if:
+.TP 7
+Range\ Error
+The result underflows.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the underflow floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+\fIhypot\fP(\fIx\fP,\fIy\fP), \fIhypot\fP(\fIy\fP,\fIx\fP), and \fIhypot\fP(\fIx\fP,
+-\fIy\fP) are equivalent.
+.LP
+\fIhypot\fP(\fIx\fP, \(+-0) is equivalent to \fIfabs\fP(\fIx\fP).
+.LP
+Underflow only happens when both \fIx\fP and \fIy\fP are subnormal
+and the (inexact) result is also subnormal.
+.LP
+These functions take precautions against overflow during intermediate
+steps of the computation.
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIisnan\fP(), \fIsqrt\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment of Error Conditions
+for
+Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/hypotf.3p b/man-pages-posix-2003/man3p/hypotf.3p
new file mode 100644
index 0000000..c650fa0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/hypotf.3p
@@ -0,0 +1 @@
+.so man3p/hypot.3p
diff --git a/man-pages-posix-2003/man3p/hypotl.3p b/man-pages-posix-2003/man3p/hypotl.3p
new file mode 100644
index 0000000..c650fa0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/hypotl.3p
@@ -0,0 +1 @@
+.so man3p/hypot.3p
diff --git a/man-pages-posix-2003/man3p/iconv.3p b/man-pages-posix-2003/man3p/iconv.3p
new file mode 100644
index 0000000..8be0b6a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/iconv.3p
@@ -0,0 +1,172 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ICONV" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" iconv
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+iconv \- codeset conversion function
+.SH SYNOPSIS
+.LP
+\fB#include <iconv.h>
+.br
+.sp
+size_t iconv(iconv_t\fP \fIcd\fP\fB, char **restrict\fP \fIinbuf\fP\fB,
+.br
+\ \ \ \ \ \ size_t *restrict\fP \fIinbytesleft\fP\fB, char **restrict\fP
+\fIoutbuf\fP\fB,
+.br
+\ \ \ \ \ \ size_t *restrict\fP \fIoutbytesleft\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIiconv\fP() function shall convert the sequence of characters
+from one codeset, in the array specified by \fIinbuf\fP,
+into a sequence of corresponding characters in another codeset, in
+the array specified by \fIoutbuf\fP. The codesets are those
+specified in the \fIiconv_open\fP() call that returned the conversion
+descriptor,
+\fIcd\fP. The \fIinbuf\fP argument points to a variable that points
+to the first character in the input buffer and
+\fIinbytesleft\fP indicates the number of bytes to the end of the
+buffer to be converted. The \fIoutbuf\fP argument points to a
+variable that points to the first available byte in the output buffer
+and \fIoutbytesleft\fP indicates the number of the available
+bytes to the end of the buffer.
+.LP
+For state-dependent encodings, the conversion descriptor \fIcd\fP
+is placed into its initial shift state by a call for which
+\fIinbuf\fP is a null pointer, or for which \fIinbuf\fP points to
+a null pointer. When \fIiconv\fP() is called in this way, and
+if \fIoutbuf\fP is not a null pointer or a pointer to a null pointer,
+and \fIoutbytesleft\fP points to a positive value,
+\fIiconv\fP() shall place, into the output buffer, the byte sequence
+to change the output buffer to its initial shift state. If
+the output buffer is not large enough to hold the entire reset sequence,
+\fIiconv\fP() shall fail and set \fIerrno\fP to [E2BIG].
+Subsequent calls with \fIinbuf\fP as other than a null pointer or
+a pointer to a null pointer cause the conversion to take place
+from the current state of the conversion descriptor.
+.LP
+If a sequence of input bytes does not form a valid character in the
+specified codeset, conversion shall stop after the previous
+successfully converted character. If the input buffer ends with an
+incomplete character or shift sequence, conversion shall stop
+after the previous successfully converted bytes. If the output buffer
+is not large enough to hold the entire converted input,
+conversion shall stop just prior to the input bytes that would cause
+the output buffer to overflow. The variable pointed to by
+\fIinbuf\fP shall be updated to point to the byte following the last
+byte successfully used in the conversion. The value pointed
+to by \fIinbytesleft\fP shall be decremented to reflect the number
+of bytes still not converted in the input buffer. The variable
+pointed to by \fIoutbuf\fP shall be updated to point to the byte following
+the last byte of converted output data. The value
+pointed to by \fIoutbytesleft\fP shall be decremented to reflect the
+number of bytes still available in the output buffer. For
+state-dependent encodings, the conversion descriptor shall be updated
+to reflect the shift state in effect at the end of the last
+successfully converted byte sequence.
+.LP
+If \fIiconv\fP() encounters a character in the input buffer that is
+valid, but for which an identical character does not exist
+in the target codeset, \fIiconv\fP() shall perform an implementation-defined
+conversion on this character.
+.SH RETURN VALUE
+.LP
+The \fIiconv\fP() function shall update the variables pointed to by
+the arguments to reflect the extent of the conversion and
+return the number of non-identical conversions performed. If the entire
+string in the input buffer is converted, the value pointed
+to by \fIinbytesleft\fP shall be 0. If the input conversion is stopped
+due to any conditions mentioned above, the value pointed to
+by \fIinbytesleft\fP shall be non-zero and \fIerrno\fP shall be set
+to indicate the condition. If an error occurs, \fIiconv\fP()
+shall return (\fBsize_t\fP)-1 and set \fIerrno\fP to indicate the
+error.
+.SH ERRORS
+.LP
+The \fIiconv\fP() function shall fail if:
+.TP 7
+.B EILSEQ
+Input conversion stopped due to an input byte that does not belong
+to the input codeset.
+.TP 7
+.B E2BIG
+Input conversion stopped due to lack of space in the output buffer.
+.TP 7
+.B EINVAL
+Input conversion stopped due to an incomplete character or shift sequence
+at the end of the input buffer.
+.sp
+.LP
+The \fIiconv\fP() function may fail if:
+.TP 7
+.B EBADF
+The \fIcd\fP argument is not a valid open conversion descriptor.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIinbuf\fP argument indirectly points to the memory area which
+contains the conversion input data. The \fIoutbuf\fP
+argument indirectly points to the memory area which is to contain
+the result of the conversion. The objects indirectly pointed to
+by \fIinbuf\fP and \fIoutbuf\fP are not restricted to containing data
+that is directly representable in the ISO\ C standard
+language \fBchar\fP data type. The type of \fIinbuf\fP and \fIoutbuf\fP,
+\fBchar **\fP, does not imply that the objects pointed
+to are interpreted as null-terminated C strings or arrays of characters.
+Any interpretation of a byte sequence that represents a
+character in a given character set encoding scheme is done internally
+within the codeset converters. For example, the area pointed
+to indirectly by \fIinbuf\fP and/or \fIoutbuf\fP can contain all zero
+octets that are not interpreted as string terminators but
+as coded character data according to the respective codeset encoding
+scheme. The type of the data ( \fBchar\fP, \fBshort\fP,
+\fBlong\fP, and so on) read or stored in the objects is not specified,
+but may be inferred for both the input and output data by
+the converters determined by the \fIfromcode\fP and \fItocode\fP arguments
+of \fIiconv_open\fP().
+.LP
+Regardless of the data type inferred by the converter, the size of
+the remaining space in both input and output objects (the
+\fIintbytesleft\fP and \fIoutbytesleft\fP arguments) is always measured
+in bytes.
+.LP
+For implementations that support the conversion of state-dependent
+encodings, the conversion descriptor must be able to
+accurately reflect the shift-state in effect at the end of the last
+successful conversion. It is not required that the conversion
+descriptor itself be updated, which would require it to be a pointer
+type. Thus, implementations are free to implement the
+descriptor as a handle (other than a pointer type) by which the conversion
+information can be accessed and updated.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIiconv_open\fP(), \fIiconv_close\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<iconv.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/iconv_close.3p b/man-pages-posix-2003/man3p/iconv_close.3p
new file mode 100644
index 0000000..00dba17
--- /dev/null
+++ b/man-pages-posix-2003/man3p/iconv_close.3p
@@ -0,0 +1,66 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ICONV_CLOSE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" iconv_close
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+iconv_close \- codeset conversion deallocation function
+.SH SYNOPSIS
+.LP
+\fB#include <iconv.h>
+.br
+.sp
+int iconv_close(iconv_t\fP \fIcd\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIiconv_close\fP() function shall deallocate the conversion descriptor
+\fIcd\fP and all other associated resources
+allocated by \fIiconv_open\fP().
+.LP
+If a file descriptor is used to implement the type \fBiconv_t\fP,
+that file descriptor shall be closed.
+.SH RETURN VALUE
+.LP
+Upon successful completion, 0 shall be returned; otherwise, -1 shall
+be returned and \fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fIiconv_close\fP() function may fail if:
+.TP 7
+.B EBADF
+The conversion descriptor is invalid.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIiconv\fP(), \fIiconv_open\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<iconv.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/iconv_open.3p b/man-pages-posix-2003/man3p/iconv_open.3p
new file mode 100644
index 0000000..49e392e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/iconv_open.3p
@@ -0,0 +1,100 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ICONV_OPEN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" iconv_open
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+iconv_open \- codeset conversion allocation function
+.SH SYNOPSIS
+.LP
+\fB#include <iconv.h>
+.br
+.sp
+iconv_t iconv_open(const char *\fP\fItocode\fP\fB, const char *\fP\fIfromcode\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIiconv_open\fP() function shall return a conversion descriptor
+that describes a conversion from the codeset specified by
+the string pointed to by the \fIfromcode\fP argument to the codeset
+specified by the string pointed to by the \fItocode\fP
+argument. For state-dependent encodings, the conversion descriptor
+shall be in a codeset-dependent initial shift state, ready for
+immediate use with \fIiconv\fP().
+.LP
+Settings of \fIfromcode\fP and \fItocode\fP and their permitted combinations
+are implementation-defined.
+.LP
+A conversion descriptor shall remain valid until it is closed by \fIiconv_close\fP()
+or an implicit close.
+.LP
+If a file descriptor is used to implement conversion descriptors,
+the FD_CLOEXEC flag shall be set; see \fI<fcntl.h>\fP.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIiconv_open\fP() shall return a conversion
+descriptor for use on subsequent calls to \fIiconv\fP(). Otherwise,
+\fIiconv_open\fP() shall return (\fBiconv_t\fP)-1 and set \fIerrno\fP
+to indicate the error.
+.SH ERRORS
+.LP
+The \fIiconv_open\fP() function may fail if:
+.TP 7
+.B EMFILE
+{OPEN_MAX} file descriptors are currently open in the calling process.
+.TP 7
+.B ENFILE
+Too many files are currently open in the system.
+.TP 7
+.B ENOMEM
+Insufficient storage space is available.
+.TP 7
+.B EINVAL
+The conversion specified by \fIfromcode\fP and \fItocode\fP is not
+supported by the implementation.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Some implementations of \fIiconv_open\fP() use \fImalloc\fP() to allocate
+space for
+internal buffer areas. The \fIiconv_open\fP() function may fail if
+there is insufficient storage space to accommodate these
+buffers.
+.LP
+Conforming applications must assume that conversion descriptors are
+not valid after a call to one of the \fIexec\fP functions.
+.LP
+Application developers should consult the system documentation to
+determine the supported codesets and their naming schemes.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIiconv\fP(), \fIiconv_close\fP(), the Base Definitions volume
+of
+IEEE\ Std\ 1003.1-2001, \fI<fcntl.h>\fP, \fI<iconv.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/if_freenameindex.3p b/man-pages-posix-2003/man3p/if_freenameindex.3p
new file mode 100644
index 0000000..43b9594
--- /dev/null
+++ b/man-pages-posix-2003/man3p/if_freenameindex.3p
@@ -0,0 +1,60 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "IF_FREENAMEINDEX" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" if_freenameindex
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+if_freenameindex \- free memory allocated by if_nameindex
+.SH SYNOPSIS
+.LP
+\fB#include <net/if.h>
+.br
+.sp
+void if_freenameindex(struct if_nameindex *\fP\fIptr\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIif_freenameindex\fP() function shall free the memory allocated
+by \fIif_nameindex\fP(). The \fIptr\fP argument shall be a pointer
+that was returned by \fIif_nameindex\fP(). After \fIif_freenameindex\fP()
+has been called, the application
+shall not use the array of which \fIptr\fP is the address.
+.SH RETURN VALUE
+.LP
+None.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgetsockopt\fP(), \fIif_indextoname\fP(), \fIif_nameindex\fP(),
+\fIif_nametoindex\fP(), \fIsetsockopt\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<net/if.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/if_indextoname.3p b/man-pages-posix-2003/man3p/if_indextoname.3p
new file mode 100644
index 0000000..f7efa4f
--- /dev/null
+++ b/man-pages-posix-2003/man3p/if_indextoname.3p
@@ -0,0 +1,70 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "IF_INDEXTONAME" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" if_indextoname
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+if_indextoname \- map a network interface index to its corresponding
+name
+.SH SYNOPSIS
+.LP
+\fB#include <net/if.h>
+.br
+.sp
+char *if_indextoname(unsigned\fP \fIifindex\fP\fB, char *\fP\fIifname\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIif_indextoname\fP() function shall map an interface index to
+its corresponding name.
+.LP
+When this function is called, \fIifname\fP shall point to a buffer
+of at least {IF_NAMESIZE} bytes. The function shall place in
+this buffer the name of the interface with index \fIifindex\fP.
+.SH RETURN VALUE
+.LP
+If \fIifindex\fP is an interface index, then the function shall return
+the value supplied in \fIifname\fP, which points to a
+buffer now containing the interface name. Otherwise, the function
+shall return a NULL pointer and set \fIerrno\fP to indicate the
+error.
+.SH ERRORS
+.LP
+The \fIif_indextoname\fP() function shall fail if:
+.TP 7
+.B ENXIO
+The interface does not exist.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgetsockopt\fP(), \fIif_freenameindex\fP(), \fIif_nameindex\fP(),
+\fIif_nametoindex\fP(), \fIsetsockopt\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<net/if.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/if_nameindex.3p b/man-pages-posix-2003/man3p/if_nameindex.3p
new file mode 100644
index 0000000..5983f45
--- /dev/null
+++ b/man-pages-posix-2003/man3p/if_nameindex.3p
@@ -0,0 +1,70 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "IF_NAMEINDEX" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" if_nameindex
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+if_nameindex \- return all network interface names and indexes
+.SH SYNOPSIS
+.LP
+\fB#include <net/if.h>
+.br
+.sp
+struct if_nameindex *\fP\fIif_nameindex\fP\fB(void);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIif_nameindex\fP() function shall return an array of \fIif_nameindex\fP
+structures, one structure per interface. The end
+of the array is indicated by a structure with an \fIif_index\fP field
+of zero and an \fIif_name\fP field of NULL.
+.LP
+Applications should call \fIif_freenameindex\fP() to release the memory
+that
+may be dynamically allocated by this function, after they have finished
+using it.
+.SH RETURN VALUE
+.LP
+An array of structures identifying local interfaces. A NULL pointer
+is returned upon an error, with \fIerrno\fP set to indicate
+the error.
+.SH ERRORS
+.LP
+The \fIif_nameindex\fP() function may fail if:
+.TP 7
+.B ENOBUFS
+Insufficient resources are available to complete the function.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgetsockopt\fP(), \fIif_freenameindex\fP(), \fIif_indextoname\fP(),
+\fIif_nametoindex\fP(), \fIsetsockopt\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<net/if.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/if_nametoindex.3p b/man-pages-posix-2003/man3p/if_nametoindex.3p
new file mode 100644
index 0000000..ff44a7a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/if_nametoindex.3p
@@ -0,0 +1,59 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "IF_NAMETOINDEX" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" if_nametoindex
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+if_nametoindex \- map a network interface name to its corresponding
+index
+.SH SYNOPSIS
+.LP
+\fB#include <net/if.h>
+.br
+.sp
+unsigned if_nametoindex(const char *\fP\fIifname\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIif_nametoindex\fP() function shall return the interface index
+corresponding to name \fIifname\fP.
+.SH RETURN VALUE
+.LP
+The corresponding index if \fIifname\fP is the name of an interface;
+otherwise, zero.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgetsockopt\fP(), \fIif_freenameindex\fP(), \fIif_indextoname\fP(),
+\fIif_nameindex\fP(), \fIsetsockopt\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<net/if.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/ilogb.3p b/man-pages-posix-2003/man3p/ilogb.3p
new file mode 100644
index 0000000..14d1269
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ilogb.3p
@@ -0,0 +1,115 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ILOGB" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ilogb
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ilogb, ilogbf, ilogbl \- return an unbiased exponent
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+int ilogb(double\fP \fIx\fP\fB);
+.br
+int ilogbf(float\fP \fIx\fP\fB);
+.br
+int ilogbl(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall return the exponent part of their argument \fIx\fP.
+Formally, the return value is the integral part of
+log_r|x| as a signed integral value, for non-zero \fIx\fP, where \fIr\fP
+is the radix of the machine's floating-point
+arithmetic, which is the value of FLT_RADIX defined in \fI<float.h>\fP.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the exponent
+part of \fIx\fP as a signed integer value. They are
+equivalent to calling the corresponding \fIlogb\fP() function and
+casting the returned value
+to type \fBint\fP.
+.LP
+If \fIx\fP is 0, a domain error shall occur, and
+the value FP_ILOGB0 shall be returned.
+.LP
+If \fIx\fP is \(+-Inf, a domain error shall occur, and
+the value {INT_MAX} shall be returned.
+.LP
+If \fIx\fP is a NaN, a domain error shall occur, and
+the value FP_ILOGBNAN shall be returned.
+.LP
+If the correct value is greater than {INT_MAX}, {INT_MAX} shall be
+returned and a domain error shall occur.
+.LP
+If the correct value is less than {INT_MIN}, {INT_MIN} shall be returned
+and a domain error shall occur.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Domain\ Error
+The \fIx\fP argument is zero, NaN, or \(+-Inf, or the correct value
+is not representable as an integer.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [EDOM]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the invalid floating-point exception shall be raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+The errors come from taking the expected floating-point value and
+converting it to \fBint\fP, which is an invalid operation in
+IEEE\ Std\ 754-1985 (since overflow, infinity, and NaN are not representable
+in a type \fBint\fP), so should be a domain
+error.
+.LP
+There are no known implementations that overflow. For overflow to
+happen, {INT_MAX} must be less than
+LDBL_MAX_EXP*\fIlog2\fP(FLT_RADIX) or {INT_MIN} must be greater than
+LDBL_MIN_EXP*\fIlog2\fP(FLT_RADIX) if subnormals are not
+supported, or {INT_MIN} must be greater than (LDBL_MIN_EXP-LDBL_MANT_DIG)*\fIlog2\fP(FLT_RADIX)
+if subnormals are supported.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIlogb\fP(), \fIscalb\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment of Error Conditions
+for
+Mathematical Functions, \fI<float.h>\fP, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/ilogbf.3p b/man-pages-posix-2003/man3p/ilogbf.3p
new file mode 100644
index 0000000..6e8bd3a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ilogbf.3p
@@ -0,0 +1 @@
+.so man3p/ilogb.3p
diff --git a/man-pages-posix-2003/man3p/ilogbl.3p b/man-pages-posix-2003/man3p/ilogbl.3p
new file mode 100644
index 0000000..6e8bd3a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ilogbl.3p
@@ -0,0 +1 @@
+.so man3p/ilogb.3p
diff --git a/man-pages-posix-2003/man3p/imaxabs.3p b/man-pages-posix-2003/man3p/imaxabs.3p
new file mode 100644
index 0000000..7dfeffc
--- /dev/null
+++ b/man-pages-posix-2003/man3p/imaxabs.3p
@@ -0,0 +1,58 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "IMAXABS" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" imaxabs
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+imaxabs \- return absolute value
+.SH SYNOPSIS
+.LP
+\fB#include <inttypes.h>
+.br
+.sp
+intmax_t imaxabs(intmax_t\fP \fIj\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIimaxabs\fP() function shall compute the absolute value of an
+integer \fIj\fP. If the result cannot be represented, the
+behavior is undefined.
+.SH RETURN VALUE
+.LP
+The \fIimaxabs\fP() function shall return the absolute value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The absolute value of the most negative number cannot be represented
+in two's complement.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIimaxdiv\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<inttypes.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/imaxdiv.3p b/man-pages-posix-2003/man3p/imaxdiv.3p
new file mode 100644
index 0000000..50968dd
--- /dev/null
+++ b/man-pages-posix-2003/man3p/imaxdiv.3p
@@ -0,0 +1,64 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "IMAXDIV" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" imaxdiv
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+imaxdiv \- return quotient and remainder
+.SH SYNOPSIS
+.LP
+\fB#include <inttypes.h>
+.br
+.sp
+imaxdiv_t imaxdiv(intmax_t\fP \fInumer\fP\fB, intmax_t\fP \fIdenom\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIimaxdiv\fP() function shall compute \fInumer\fP\ /\ \fIdenom\fP
+and \fInumer\fP\ %\ \fIdenom\fP in a
+single operation.
+.SH RETURN VALUE
+.LP
+The \fIimaxdiv\fP() function shall return a structure of type \fBimaxdiv_t\fP,
+comprising both the quotient and the remainder.
+The structure shall contain (in either order) the members \fIquot\fP
+(the quotient) and \fIrem\fP (the remainder), each of which
+has type \fBintmax_t\fP.
+.LP
+If either part of the result cannot be represented, the behavior is
+undefined.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIimaxabs\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<inttypes.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/index.3p b/man-pages-posix-2003/man3p/index.3p
new file mode 100644
index 0000000..0b00acb
--- /dev/null
+++ b/man-pages-posix-2003/man3p/index.3p
@@ -0,0 +1,67 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "INDEX" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" index
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+index \- character string operations (\fBLEGACY\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <strings.h>
+.br
+.sp
+char *index(const char *\fP\fIs\fP\fB, int\fP \fIc\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIindex\fP() function shall be equivalent to \fIstrchr\fP().
+.SH RETURN VALUE
+.LP
+See \fIstrchr\fP().
+.SH ERRORS
+.LP
+See \fIstrchr\fP().
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIstrchr\fP() function is preferred over this function.
+.LP
+For maximum portability, it is recommended to replace the function
+call to \fIindex\fP() as follows:
+.sp
+.RS
+.nf
+
+\fB#define index(a,b) strchr((a),(b))
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+This function may be withdrawn in a future version.
+.SH SEE ALSO
+.LP
+\fIstrchr\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<strings.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/inet_addr.3p b/man-pages-posix-2003/man3p/inet_addr.3p
new file mode 100644
index 0000000..adae7f7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/inet_addr.3p
@@ -0,0 +1,110 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "INET_ADDR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" inet_addr
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+inet_addr, inet_ntoa \- IPv4 address manipulation
+.SH SYNOPSIS
+.LP
+\fB#include <arpa/inet.h>
+.br
+.sp
+in_addr_t inet_addr(const char *\fP\fIcp\fP\fB);
+.br
+char *inet_ntoa(struct in_addr\fP \fIin\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIinet_addr\fP() function shall convert the string pointed to
+by \fIcp\fP, in the standard IPv4 dotted decimal notation,
+to an integer value suitable for use as an Internet address.
+.LP
+The \fIinet_ntoa\fP() function shall convert the Internet host address
+specified by \fIin\fP to a string in the Internet
+standard dot notation.
+.LP
+The \fIinet_ntoa\fP() function need not be reentrant. A function that
+is not required to be reentrant is not required to be
+thread-safe.
+.LP
+All Internet addresses shall be returned in network order (bytes ordered
+from left to right).
+.LP
+Values specified using IPv4 dotted decimal notation take one of the
+following forms:
+.TP 7
+\fBa.b.c.d\fP
+When four parts are specified, each shall be interpreted as a byte
+of data and assigned, from left to right, to the four bytes
+of an Internet address.
+.TP 7
+\fBa.b.c\fP
+When a three-part address is specified, the last part shall be interpreted
+as a 16-bit quantity and placed in the rightmost two
+bytes of the network address. This makes the three-part address format
+convenient for specifying Class B network addresses as
+\fB"128.net.host"\fP .
+.TP 7
+\fBa.b\fP
+When a two-part address is supplied, the last part shall be interpreted
+as a 24-bit quantity and placed in the rightmost three
+bytes of the network address. This makes the two-part address format
+convenient for specifying Class A network addresses as
+\fB"net.host"\fP .
+.TP 7
+\fBa\fP
+When only one part is given, the value shall be stored directly in
+the network address without any byte rearrangement.
+.sp
+.LP
+All numbers supplied as parts in IPv4 dotted decimal notation may
+be decimal, octal, or hexadecimal, as specified in the
+ISO\ C standard (that is, a leading 0x or 0X implies hexadecimal;
+otherwise, a leading \fB'0'\fP implies octal; otherwise,
+the number is interpreted as decimal).
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIinet_addr\fP() shall return the Internet
+address. Otherwise, it shall return (
+\fBin_addr_t\fP)(-1).
+.LP
+The \fIinet_ntoa\fP() function shall return a pointer to the network
+address in Internet standard dot notation.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The return value of \fIinet_ntoa\fP() may point to static data that
+may be overwritten by subsequent calls to
+\fIinet_ntoa\fP().
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIendhostent\fP(), \fIendnetent\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<arpa/inet.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/inet_ntoa.3p b/man-pages-posix-2003/man3p/inet_ntoa.3p
new file mode 100644
index 0000000..8d332a5
--- /dev/null
+++ b/man-pages-posix-2003/man3p/inet_ntoa.3p
@@ -0,0 +1 @@
+.so man3p/inet_addr.3p
diff --git a/man-pages-posix-2003/man3p/inet_ntop.3p b/man-pages-posix-2003/man3p/inet_ntop.3p
new file mode 100644
index 0000000..4995f88
--- /dev/null
+++ b/man-pages-posix-2003/man3p/inet_ntop.3p
@@ -0,0 +1,148 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "INET_NTOP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" inet_ntop
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+inet_ntop, inet_pton \- convert IPv4 and IPv6 addresses between binary
+and text form
+.SH SYNOPSIS
+.LP
+\fB#include <arpa/inet.h>
+.br
+.sp
+const char *inet_ntop(int\fP \fIaf\fP\fB, const void *restrict\fP
+\fIsrc\fP\fB,
+.br
+\ \ \ \ \ \ char *restrict\fP \fIdst\fP\fB, socklen_t\fP \fIsize\fP\fB);
+.br
+int inet_pton(int\fP \fIaf\fP\fB, const char *restrict\fP \fIsrc\fP\fB,
+void *restrict\fP \fIdst\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIinet_ntop\fP() function shall convert a numeric address into
+a text string suitable for presentation. The \fIaf\fP
+argument shall specify the family of the address. This can be AF_INET
+\ or AF_INET6. The \fIsrc\fP argument points to a buffer holding
+an IPv4 address if the \fIaf\fP argument is AF_INET,
+\ or an IPv6 address if the \fIaf\fP argument is AF_INET6; the
+address must be in network byte order. The \fIdst\fP argument points
+to a buffer where the function stores the resulting text
+string; it shall not be NULL. The \fIsize\fP argument specifies the
+size of this buffer, which shall be large enough to hold the
+text string (INET_ADDRSTRLEN characters for IPv4, INET6_ADDRSTRLEN
+characters for IPv6).
+.LP
+The \fIinet_pton\fP() function shall convert an address in its standard
+text presentation form into its numeric binary form.
+The \fIaf\fP argument shall specify the family of the address. The
+AF_INET and AF_INET6
+address families shall be supported. The \fIsrc\fP argument points
+to the string being passed in. The \fIdst\fP argument points to a
+buffer into which the function stores the numeric address; this
+shall be large enough to hold the numeric address (32 bits for AF_INET,
+\ 128 bits for AF_INET6).
+.LP
+If the \fIaf\fP argument of \fIinet_pton\fP() is AF_INET, the \fIsrc\fP
+string shall be in the standard IPv4 dotted-decimal
+form:
+.sp
+.RS
+.nf
+
+\fBddd.ddd.ddd.ddd
+\fP
+.fi
+.RE
+.LP
+where \fB"ddd"\fP is a one to three digit decimal number between 0
+and 255 (see \fIinet_addr\fP()). The \fIinet_pton\fP() function does
+not accept other formats (such as the octal
+numbers, hexadecimal numbers, and fewer than four numbers that \fIinet_addr\fP()
+accepts).
+.LP
+If the \fIaf\fP argument of \fIinet_pton\fP() is AF_INET6, the \fIsrc\fP
+string shall be in one of the following standard IPv6
+text forms:
+.IP " 1." 4
+The preferred form is \fB"x:x:x:x:x:x:x:x"\fP, where the \fB'x'\fP
+s are the hexadecimal values of the eight 16-bit
+pieces of the address. Leading zeros in individual fields can be omitted,
+but there shall be at least one numeral in every
+field.
+.LP
+.IP " 2." 4
+A string of contiguous zero fields in the preferred form can be shown
+as \fB"::"\fP . The \fB"::"\fP can only appear once
+in an address. Unspecified addresses ( \fB"0:0:0:0:0:0:0:0"\fP ) may
+be represented simply as \fB"::"\fP .
+.LP
+.IP " 3." 4
+A third form that is sometimes more convenient when dealing with a
+mixed environment of IPv4 and IPv6 nodes is
+\fB"x:x:x:x:x:x:d.d.d.d"\fP, where the \fB'x'\fP s are the hexadecimal
+values of the six high-order 16-bit pieces of the
+address, and the \fB'd'\fP s are the decimal values of the four low-order
+8-bit pieces of the address (standard IPv4
+representation).
+.LP
+.TP 7
+\fBNote:\fP
+A more extensive description of the standard representations of IPv6
+addresses can be found in RFC\ 2373.
+.sp
+.SH RETURN VALUE
+.LP
+The \fIinet_ntop\fP() function shall return a pointer to the buffer
+containing the text string if the conversion succeeds, and
+NULL otherwise, and set \fIerrno\fP to indicate the error.
+.LP
+The \fIinet_pton\fP() function shall return 1 if the conversion succeeds,
+with the address pointed to by \fIdst\fP in network
+byte order. It shall return 0 if the input is not a valid IPv4 dotted-decimal
+string or a valid
+IPv6 address string, or -1 with \fIerrno\fP set to [EAFNOSUPPORT]
+if the \fIaf\fP argument is unknown.
+.SH ERRORS
+.LP
+The \fIinet_ntop\fP() and \fIinet_pton\fP() functions shall fail if:
+.TP 7
+.B EAFNOSUPPORT
+.sp
+The \fIaf\fP argument is invalid.
+.TP 7
+.B ENOSPC
+The size of the \fIinet_ntop\fP() result buffer is inadequate.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<arpa/inet.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/inet_pton.3p b/man-pages-posix-2003/man3p/inet_pton.3p
new file mode 100644
index 0000000..23370ae
--- /dev/null
+++ b/man-pages-posix-2003/man3p/inet_pton.3p
@@ -0,0 +1 @@
+.so man3p/inet_ntop.3p
diff --git a/man-pages-posix-2003/man3p/initstate.3p b/man-pages-posix-2003/man3p/initstate.3p
new file mode 100644
index 0000000..0f22b82
--- /dev/null
+++ b/man-pages-posix-2003/man3p/initstate.3p
@@ -0,0 +1 @@
+.so man3p/random.3p
diff --git a/man-pages-posix-2003/man3p/insque.3p b/man-pages-posix-2003/man3p/insque.3p
new file mode 100644
index 0000000..6075ce3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/insque.3p
@@ -0,0 +1,189 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "INSQUE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" insque
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+insque, remque \- insert or remove an element in a queue
+.SH SYNOPSIS
+.LP
+\fB#include <search.h>
+.br
+.sp
+void insque(void *\fP\fIelement\fP\fB, void *\fP\fIpred\fP\fB);
+.br
+void remque(void *\fP\fIelement\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIinsque\fP() and \fIremque\fP() functions shall manipulate queues
+built from doubly-linked lists. The queue can be
+either circular or linear. An application using \fIinsque\fP() or
+\fIremque\fP() shall ensure it defines a structure in which the
+first two members of the structure are pointers to the same type of
+structure, and any further members are application-specific.
+The first member of the structure is a forward pointer to the next
+entry in the queue. The second member is a backward pointer to
+the previous entry in the queue. If the queue is linear, the queue
+is terminated with null pointers. The names of the structure and
+of the pointer members are not subject to any special restriction.
+.LP
+The \fIinsque\fP() function shall insert the element pointed to by
+\fIelement\fP into a queue immediately after the element
+pointed to by \fIpred\fP.
+.LP
+The \fIremque\fP() function shall remove the element pointed to by
+\fIelement\fP from a queue.
+.LP
+If the queue is to be used as a linear list, invoking \fIinsque\fP(&\fIelement\fP,
+NULL), where \fIelement\fP is the
+initial element of the queue, shall initialize the forward and backward
+pointers of \fIelement\fP to null pointers.
+.LP
+If the queue is to be used as a circular list, the application shall
+ensure it initializes the forward pointer and the backward
+pointer of the initial element of the queue to the element's own address.
+.SH RETURN VALUE
+.LP
+The \fIinsque\fP() and \fIremque\fP() functions do not return a value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Creating a Linear Linked List
+.LP
+The following example creates a linear linked list.
+.sp
+.RS
+.nf
+
+\fB#include <search.h>
+\&...
+struct myque element1;
+struct myque element2;
+.sp
+
+char *data1 = "DATA1";
+char *data2 = "DATA2";
+\&...
+element1.data = data1;
+element2.data = data2;
+.sp
+
+insque (&element1, NULL);
+insque (&element2, &element1);
+\fP
+.fi
+.RE
+.SS Creating a Circular Linked List
+.LP
+The following example creates a circular linked list.
+.sp
+.RS
+.nf
+
+\fB#include <search.h>
+\&...
+struct myque element1;
+struct myque element2;
+.sp
+
+char *data1 = "DATA1";
+char *data2 = "DATA2";
+\&...
+element1.data = data1;
+element2.data = data2;
+.sp
+
+element1.fwd = &element1;
+element1.bck = &element1;
+.sp
+
+insque (&element2, &element1);
+\fP
+.fi
+.RE
+.SS Removing an Element
+.LP
+The following example removes the element pointed to by \fIelement1\fP.
+.sp
+.RS
+.nf
+
+\fB#include <search.h>
+\&...
+struct myque element1;
+\&...
+remque (&element1);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The historical implementations of these functions described the arguments
+as being of type \fBstruct qelem *\fP rather than as
+being of type \fBvoid *\fP as defined here. In those implementations,
+\fBstruct qelem\fP was commonly defined in \fI<search.h>\fP as:
+.sp
+.RS
+.nf
+
+\fBstruct qelem {
+ struct qelem *q_forw;
+ struct qelem *q_back;
+};
+\fP
+.fi
+.RE
+.LP
+Applications using these functions, however, were never able to use
+this structure directly since it provided no room for the
+actual data contained in the elements. Most applications defined structures
+that contained the two pointers as the initial elements
+and also provided space for, or pointers to, the object's data. Applications
+that used these functions to update more than one type
+of table also had the problem of specifying two or more different
+structures with the same name, if they literally used \fBstruct
+qelem\fP as specified.
+.LP
+As described here, the implementations were actually expecting a structure
+type where the first two members were forward and
+backward pointers to structures. With C compilers that didn't provide
+function prototypes, applications used structures as
+specified in the DESCRIPTION above and the compiler did what the application
+expected.
+.LP
+If this method had been carried forward with an ISO\ C standard compiler
+and the historical function prototype, most
+applications would have to be modified to cast pointers to the structures
+actually used to be pointers to \fBstruct qelem\fP to
+avoid compilation warnings. By specifying \fBvoid *\fP as the argument
+type, applications do not need to change (unless they
+specifically referenced \fBstruct qelem\fP and depended on it being
+defined in \fI<search.h>\fP).
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<search.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/ioctl.3p b/man-pages-posix-2003/man3p/ioctl.3p
new file mode 100644
index 0000000..7849a09
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ioctl.3p
@@ -0,0 +1,1063 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "IOCTL" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ioctl
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ioctl \- control a STREAMS device (\fBSTREAMS\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <stropts.h>
+.br
+.sp
+int ioctl(int\fP \fIfildes\fP\fB, int\fP \fIrequest\fP\fB, ... /*
+arg */); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIioctl\fP() function shall perform a variety of control functions
+on STREAMS devices. For non-STREAMS devices, the
+functions performed by this call are unspecified. The \fIrequest\fP
+argument and an optional third argument (with varying type)
+shall be passed to and interpreted by the appropriate part of the
+STREAM associated with \fIfildes\fP.
+.LP
+The \fIfildes\fP argument is an open file descriptor that refers to
+a device.
+.LP
+The \fIrequest\fP argument selects the control function to be performed
+and shall depend on the STREAMS device being
+addressed.
+.LP
+The \fIarg\fP argument represents additional information that is needed
+by this specific STREAMS device to perform the
+requested function. The type of \fIarg\fP depends upon the particular
+control request, but it shall be either an integer or a
+pointer to a device-specific data structure.
+.LP
+The \fIioctl\fP() commands applicable to STREAMS, their arguments,
+and error conditions that apply to each individual command
+are described below.
+.LP
+The following \fIioctl\fP() commands, with error values indicated,
+are applicable to all STREAMS files:
+.TP 7
+I_PUSH
+Pushes the module whose name is pointed to by \fIarg\fP onto the top
+of the current STREAM, just below the STREAM head. It
+then calls the \fIopen\fP() function of the newly-pushed module.
+.LP
+The \fIioctl\fP() function with the I_PUSH command shall fail if:
+.TP 7
+.B EINVAL
+.RS
+Invalid module name.
+.RE
+.TP 7
+.B ENXIO
+.RS
+Open function of new module failed.
+.RE
+.TP 7
+.B ENXIO
+.RS
+Hangup received on \fIfildes\fP.
+.RE
+.sp
+.TP 7
+I_POP
+Removes the module just below the STREAM head of the STREAM pointed
+to by \fIfildes\fP. The \fIarg\fP argument should be 0 in
+an I_POP request.
+.LP
+The \fIioctl\fP() function with the I_POP command shall fail if:
+.TP 7
+.B EINVAL
+.RS
+No module present in the STREAM.
+.RE
+.TP 7
+.B ENXIO
+.RS
+Hangup received on \fIfildes\fP.
+.RE
+.sp
+.TP 7
+I_LOOK
+Retrieves the name of the module just below the STREAM head of the
+STREAM pointed to by \fIfildes\fP, and places it in a
+character string pointed to by \fIarg\fP. The buffer pointed to by
+\fIarg\fP should be at least FMNAMESZ+1 bytes long, where
+FMNAMESZ is defined in \fI<stropts.h>\fP.
+.LP
+The \fIioctl\fP() function with the I_LOOK command shall fail if:
+.TP 7
+.B EINVAL
+.RS
+No module present in the STREAM.
+.RE
+.sp
+.TP 7
+I_FLUSH
+Flushes read and/or write queues, depending on the value of \fIarg\fP.
+Valid \fIarg\fP values are:
+.TP 7
+FLUSHR
+.RS
+Flush all read queues.
+.RE
+.TP 7
+FLUSHW
+.RS
+Flush all write queues.
+.RE
+.TP 7
+FLUSHRW
+.RS
+Flush all read and all write queues.
+.RE
+.sp
+.LP
+The \fIioctl\fP() function with the I_FLUSH command shall fail if:
+.TP 7
+.B EINVAL
+.RS
+Invalid \fIarg\fP value.
+.RE
+.TP 7
+.B EAGAIN \fRor\fP ENOSR
+.RS
+.sp
+Unable to allocate buffers for flush message.
+.RE
+.TP 7
+.B ENXIO
+.RS
+Hangup received on \fIfildes\fP.
+.RE
+.sp
+.TP 7
+I_FLUSHBAND
+Flushes a particular band of messages. The \fIarg\fP argument points
+to a \fBbandinfo\fP structure. The \fIbi_flag\fP member
+may be one of FLUSHR, FLUSHW, or FLUSHRW as described above. The \fIbi_pri\fP
+member determines the priority band to be
+flushed.
+.TP 7
+I_SETSIG
+Requests that the STREAMS implementation send the SIGPOLL signal to
+the calling process when a particular event has occurred on
+the STREAM associated with \fIfildes\fP. I_SETSIG supports an asynchronous
+processing capability in STREAMS. The value of
+\fIarg\fP is a bitmask that specifies the events for which the process
+should be signaled. It is the bitwise-inclusive OR of any
+combination of the following constants:
+.TP 7
+S_RDNORM
+.RS
+A normal (priority band set to 0) message has arrived at the head
+of a STREAM head read queue. A signal shall be generated even
+if the message is of zero length.
+.RE
+.TP 7
+S_RDBAND
+.RS
+A message with a non-zero priority band has arrived at the head of
+a STREAM head read queue. A signal shall be generated even
+if the message is of zero length.
+.RE
+.TP 7
+S_INPUT
+.RS
+A message, other than a high-priority message, has arrived at the
+head of a STREAM head read queue. A signal shall be generated
+even if the message is of zero length.
+.RE
+.TP 7
+S_HIPRI
+.RS
+A high-priority message is present on a STREAM head read queue. A
+signal shall be generated even if the message is of zero
+length.
+.RE
+.TP 7
+S_OUTPUT
+.RS
+The write queue for normal data (priority band 0) just below the STREAM
+head is no longer full. This notifies the process that
+there is room on the queue for sending (or writing) normal data downstream.
+.RE
+.TP 7
+S_WRNORM
+.RS
+Equivalent to S_OUTPUT.
+.RE
+.TP 7
+S_WRBAND
+.RS
+The write queue for a non-zero priority band just below the STREAM
+head is no longer full. This notifies the process that there
+is room on the queue for sending (or writing) priority data downstream.
+.RE
+.TP 7
+S_MSG
+.RS
+A STREAMS signal message that contains the SIGPOLL signal has reached
+the front of the STREAM head read queue.
+.RE
+.TP 7
+S_ERROR
+.RS
+Notification of an error condition has reached the STREAM head.
+.RE
+.TP 7
+S_HANGUP
+.RS
+Notification of a hangup has reached the STREAM head.
+.RE
+.TP 7
+S_BANDURG
+.RS
+When used in conjunction with S_RDBAND, SIGURG is generated instead
+of SIGPOLL when a priority message reaches the front of the
+STREAM head read queue.
+.RE
+.sp
+.LP
+If \fIarg\fP is 0, the calling process shall be unregistered and shall
+not receive further SIGPOLL signals for the stream
+associated with \fIfildes\fP.
+.LP
+Processes that wish to receive SIGPOLL signals shall ensure that they
+explicitly register to receive them using I_SETSIG. If
+several processes register to receive this signal for the same event
+on the same STREAM, each process shall be signaled when the
+event occurs.
+.LP
+The \fIioctl\fP() function with the I_SETSIG command shall fail if:
+.TP 7
+.B EINVAL
+.RS
+The value of \fIarg\fP is invalid.
+.RE
+.TP 7
+.B EINVAL
+.RS
+The value of \fIarg\fP is 0 and the calling process is not registered
+to receive the SIGPOLL signal.
+.RE
+.TP 7
+.B EAGAIN
+.RS
+There were insufficient resources to store the signal request.
+.RE
+.sp
+.TP 7
+I_GETSIG
+Returns the events for which the calling process is currently registered
+to be sent a SIGPOLL signal. The events are returned
+as a bitmask in an \fBint\fP pointed to by \fIarg\fP, where the events
+are those specified in the description of I_SETSIG above.
+.LP
+The \fIioctl\fP() function with the I_GETSIG command shall fail if:
+.TP 7
+.B EINVAL
+.RS
+Process is not registered to receive the SIGPOLL signal.
+.RE
+.sp
+.TP 7
+I_FIND
+Compares the names of all modules currently present in the STREAM
+to the name pointed to by \fIarg\fP, and returns 1 if the
+named module is present in the STREAM, or returns 0 if the named module
+is not present.
+.LP
+The \fIioctl\fP() function with the I_FIND command shall fail if:
+.TP 7
+.B EINVAL
+.RS
+\fIarg\fP does not contain a valid module name.
+.RE
+.sp
+.TP 7
+I_PEEK
+Retrieves the information in the first message on the STREAM head
+read queue without taking the message off the queue. It is
+analogous to \fIgetmsg\fP() except that this command does not remove
+the message from the
+queue. The \fIarg\fP argument points to a \fBstrpeek\fP structure.
+.LP
+The application shall ensure that the \fImaxlen\fP member in the \fBctlbuf\fP
+and \fBdatabuf strbuf\fP structures is set to
+the number of bytes of control information and/or data information,
+respectively, to retrieve. The \fIflags\fP member may be
+marked RS_HIPRI or 0, as described by \fIgetmsg\fP(). If the process
+sets \fIflags\fP to
+RS_HIPRI, for example, I_PEEK shall only look for a high-priority
+message on the STREAM head read queue.
+.LP
+I_PEEK returns 1 if a message was retrieved, and returns 0 if no message
+was found on the STREAM head read queue, or if the
+RS_HIPRI flag was set in \fIflags\fP and a high-priority message was
+not present on the STREAM head read queue. It does not wait
+for a message to arrive. On return, \fBctlbuf\fP specifies information
+in the control buffer, \fBdatabuf\fP specifies information
+in the data buffer, and \fIflags\fP contains the value RS_HIPRI or
+0.
+.TP 7
+I_SRDOPT
+Sets the read mode using the value of the argument \fIarg\fP. Read
+modes are described in \fIread\fP(). Valid \fIarg\fP flags are:
+.TP 7
+RNORM
+.RS
+Byte-stream mode, the default.
+.RE
+.TP 7
+RMSGD
+.RS
+Message-discard mode.
+.RE
+.TP 7
+RMSGN
+.RS
+Message-nondiscard mode.
+.RE
+.sp
+.LP
+The bitwise-inclusive OR of RMSGD and RMSGN shall return [EINVAL].
+The bitwise-inclusive OR of RNORM and either RMSGD or RMSGN
+shall result in the other flag overriding RNORM which is the default.
+.LP
+In addition, treatment of control messages by the STREAM head may
+be changed by setting any of the following flags in
+\fIarg\fP:
+.TP 7
+RPROTNORM
+.RS
+Fail \fIread\fP() with [EBADMSG] if a message containing a control
+part is at the front
+of the STREAM head read queue.
+.RE
+.TP 7
+RPROTDAT
+.RS
+Deliver the control part of a message as data when a process issues
+a \fIread\fP().
+.RE
+.TP 7
+RPROTDIS
+.RS
+Discard the control part of a message, delivering any data portion,
+when a process issues a \fIread\fP().
+.RE
+.sp
+.LP
+The \fIioctl\fP() function with the I_SRDOPT command shall fail if:
+.TP 7
+.B EINVAL
+.RS
+The \fIarg\fP argument is not valid.
+.RE
+.sp
+.TP 7
+I_GRDOPT
+Returns the current read mode setting, as described above, in an \fBint\fP
+pointed to by the argument \fIarg\fP. Read modes
+are described in \fIread\fP().
+.TP 7
+I_NREAD
+Counts the number of data bytes in the data part of the first message
+on the STREAM head read queue and places this value in
+the \fBint\fP pointed to by \fIarg\fP. The return value for the command
+shall be the number of messages on the STREAM head read
+queue. For example, if 0 is returned in \fIarg\fP, but the \fIioctl\fP()
+return value is greater than 0, this indicates that a
+zero-length message is next on the queue.
+.TP 7
+I_FDINSERT
+Creates a message from specified buffer(s), adds information about
+another STREAM, and sends the message downstream. The
+message contains a control part and an optional data part. The data
+and control parts to be sent are distinguished by placement in
+separate buffers, as described below. The \fIarg\fP argument points
+to a \fBstrfdinsert\fP structure.
+.LP
+The application shall ensure that the \fIlen\fP member in the \fBctlbuf
+strbuf\fP structure is set to the size of a
+\fBt_uscalar_t\fP plus the number of bytes of control information
+to be sent with the message. The \fIfildes\fP member specifies
+the file descriptor of the other STREAM, and the \fIoffset\fP member,
+which must be suitably aligned for use as a
+\fBt_uscalar_t\fP, specifies the offset from the start of the control
+buffer where I_FDINSERT shall store a \fBt_uscalar_t\fP
+whose interpretation is specific to the STREAM end. The application
+shall ensure that the \fIlen\fP member in the \fBdatabuf
+strbuf\fP structure is set to the number of bytes of data information
+to be sent with the message, or to 0 if no data part is to
+be sent.
+.LP
+The \fIflags\fP member specifies the type of message to be created.
+A normal message is created if \fIflags\fP is set to 0,
+and a high-priority message is created if \fIflags\fP is set to RS_HIPRI.
+For non-priority messages, I_FDINSERT shall block if the
+STREAM write queue is full due to internal flow control conditions.
+For priority messages, I_FDINSERT does not block on this
+condition. For non-priority messages, I_FDINSERT does not block when
+the write queue is full and O_NONBLOCK is set. Instead, it
+fails and sets \fIerrno\fP to [EAGAIN].
+.LP
+I_FDINSERT also blocks, unless prevented by lack of internal resources,
+waiting for the availability of message blocks in the
+STREAM, regardless of priority or whether O_NONBLOCK has been specified.
+No partial message is sent.
+.LP
+The \fIioctl\fP() function with the I_FDINSERT command shall fail
+if:
+.TP 7
+.B EAGAIN
+.RS
+A non-priority message is specified, the O_NONBLOCK flag is set, and
+the STREAM write queue is full due to internal flow
+control conditions.
+.RE
+.TP 7
+.B EAGAIN \fRor\fP ENOSR
+.RS
+.sp
+Buffers cannot be allocated for the message that is to be created.
+.RE
+.TP 7
+.B EINVAL
+.RS
+One of the following:
+.RS
+.IP " *" 3
+The \fIfildes\fP member of the \fBstrfdinsert\fP structure is not
+a valid, open STREAM file descriptor.
+.LP
+.IP " *" 3
+The size of a \fBt_uscalar_t\fP plus \fIoffset\fP is greater than
+the \fIlen\fP member for the buffer specified through
+\fBctlbuf\fP.
+.LP
+.IP " *" 3
+The \fIoffset\fP member does not specify a properly-aligned location
+in the data buffer.
+.LP
+.IP " *" 3
+An undefined value is stored in \fIflags\fP.
+.LP
+.RE
+.RE
+.TP 7
+.B ENXIO
+.RS
+Hangup received on the STREAM identified by either the \fIfildes\fP
+argument or the \fIfildes\fP member of the
+\fBstrfdinsert\fP structure.
+.RE
+.TP 7
+.B ERANGE
+.RS
+The \fIlen\fP member for the buffer specified through \fBdatabuf\fP
+does not fall within the range specified by the maximum
+and minimum packet sizes of the topmost STREAM module; or the \fIlen\fP
+member for the buffer specified through \fBdatabuf\fP is
+larger than the maximum configured size of the data part of a message;
+or the \fIlen\fP member for the buffer specified through
+\fBctlbuf\fP is larger than the maximum configured size of the control
+part of a message.
+.RE
+.sp
+.TP 7
+I_STR
+Constructs an internal STREAMS \fIioctl\fP() message from the data
+pointed to by \fIarg\fP, and sends that message
+downstream.
+.LP
+This mechanism is provided to send \fIioctl\fP() requests to downstream
+modules and drivers. It allows information to be sent
+with \fIioctl\fP(), and returns to the process any information sent
+upstream by the downstream recipient. I_STR shall block until
+the system responds with either a positive or negative acknowledgement
+message, or until the request times out after some period of
+time. If the request times out, it shall fail with \fIerrno\fP set
+to [ETIME].
+.LP
+At most, one I_STR can be active on a STREAM. Further I_STR calls
+shall block until the active I_STR completes at the STREAM
+head. The default timeout interval for these requests is 15 seconds.
+The O_NONBLOCK flag has no effect on this call.
+.LP
+To send requests downstream, the application shall ensure that \fIarg\fP
+points to a \fBstrioctl\fP structure.
+.LP
+The \fIic_cmd\fP member is the internal \fIioctl\fP() command intended
+for a downstream module or driver and \fIic_timout\fP
+is the number of seconds (-1=infinite, 0=use implementation-defined
+timeout interval, >0=as specified) an I_STR request shall
+wait for acknowledgement before timing out. \fIic_len\fP is the number
+of bytes in the data argument, and \fIic_dp\fP is a
+pointer to the data argument. The \fIic_len\fP member has two uses:
+on input, it contains the length of the data argument passed
+in, and on return from the command, it contains the number of bytes
+being returned to the process (the buffer pointed to by
+\fIic_dp\fP should be large enough to contain the maximum amount of
+data that any module or the driver in the STREAM can
+return).
+.LP
+The STREAM head shall convert the information pointed to by the \fBstrioctl\fP
+structure to an internal \fIioctl\fP() command
+message and send it downstream.
+.LP
+The \fIioctl\fP() function with the I_STR command shall fail if:
+.TP 7
+.B EAGAIN \fRor\fP ENOSR
+.RS
+.sp
+Unable to allocate buffers for the \fIioctl\fP() message.
+.RE
+.TP 7
+.B EINVAL
+.RS
+The \fIic_len\fP member is less than 0 or larger than the maximum
+configured size of the data part of a message, or
+\fIic_timout\fP is less than -1.
+.RE
+.TP 7
+.B ENXIO
+.RS
+Hangup received on \fIfildes\fP.
+.RE
+.TP 7
+.B ETIME
+.RS
+A downstream \fIioctl\fP() timed out before acknowledgement was received.
+.RE
+.sp
+.LP
+An I_STR can also fail while waiting for an acknowledgement if a message
+indicating an error or a hangup is received at the
+STREAM head. In addition, an error code can be returned in the positive
+or negative acknowledgement message, in the event the
+\fIioctl\fP() command sent downstream fails. For these cases, I_STR
+shall fail with \fIerrno\fP set to the value in the
+message.
+.TP 7
+I_SWROPT
+Sets the write mode using the value of the argument \fIarg\fP. Valid
+bit settings for \fIarg\fP are:
+.TP 7
+SNDZERO
+.RS
+Send a zero-length message downstream when a \fIwrite\fP() of 0 bytes
+occurs. To not
+send a zero-length message when a \fIwrite\fP() of 0 bytes occurs,
+the application shall
+ensure that this bit is not set in \fIarg\fP (for example, \fIarg\fP
+would be set to 0).
+.RE
+.sp
+.LP
+The \fIioctl\fP() function with the I_SWROPT command shall fail if:
+.TP 7
+.B EINVAL
+.RS
+\fIarg\fP is not the above value.
+.RE
+.sp
+.TP 7
+I_GWROPT
+Returns the current write mode setting, as described above, in the
+\fBint\fP that is pointed to by the argument
+\fIarg\fP.
+.TP 7
+I_SENDFD
+Creates a new reference to the open file description associated with
+the file descriptor \fIarg\fP, and writes a message on
+the STREAMS-based pipe \fIfildes\fP containing this reference, together
+with the user ID and group ID of the calling process.
+.LP
+The \fIioctl\fP() function with the I_SENDFD command shall fail if:
+.TP 7
+.B EAGAIN
+.RS
+The sending STREAM is unable to allocate a message block to contain
+the file pointer; or the read queue of the receiving STREAM
+head is full and cannot accept the message sent by I_SENDFD.
+.RE
+.TP 7
+.B EBADF
+.RS
+The \fIarg\fP argument is not a valid, open file descriptor.
+.RE
+.TP 7
+.B EINVAL
+.RS
+The \fIfildes\fP argument is not connected to a STREAM pipe.
+.RE
+.TP 7
+.B ENXIO
+.RS
+Hangup received on \fIfildes\fP.
+.RE
+.sp
+.TP 7
+I_RECVFD
+Retrieves the reference to an open file description from a message
+written to a STREAMS-based pipe using the I_SENDFD command,
+and allocates a new file descriptor in the calling process that refers
+to this open file description. The \fIarg\fP argument is a
+pointer to a \fBstrrecvfd\fP data structure as defined in \fI<stropts.h>\fP.
+.LP
+The \fIfd\fP member is a file descriptor. The \fIuid\fP and \fIgid\fP
+members are the effective user ID and effective group
+ID, respectively, of the sending process.
+.LP
+If O_NONBLOCK is not set, I_RECVFD shall block until a message is
+present at the STREAM head. If O_NONBLOCK is set, I_RECVFD
+shall fail with \fIerrno\fP set to [EAGAIN] if no message is present
+at the STREAM head.
+.LP
+If the message at the STREAM head is a message sent by an I_SENDFD,
+a new file descriptor shall be allocated for the open file
+descriptor referenced in the message. The new file descriptor is placed
+in the \fIfd\fP member of the \fBstrrecvfd\fP structure
+pointed to by \fIarg\fP.
+.LP
+The \fIioctl\fP() function with the I_RECVFD command shall fail if:
+.TP 7
+.B EAGAIN
+.RS
+A message is not present at the STREAM head read queue and the O_NONBLOCK
+flag is set.
+.RE
+.TP 7
+.B EBADMSG
+.RS
+The message at the STREAM head read queue is not a message containing
+a passed file descriptor.
+.RE
+.TP 7
+.B EMFILE
+.RS
+The process has the maximum number of file descriptors currently open
+that it is allowed.
+.RE
+.TP 7
+.B ENXIO
+.RS
+Hangup received on \fIfildes\fP.
+.RE
+.sp
+.TP 7
+I_LIST
+Allows the process to list all the module names on the STREAM, up
+to and including the topmost driver name. If \fIarg\fP is a
+null pointer, the return value shall be the number of modules, including
+the driver, that are on the STREAM pointed to by
+\fIfildes\fP. This lets the process allocate enough space for the
+module names. Otherwise, it should point to a \fBstr_list\fP
+structure.
+.LP
+The \fIsl_nmods\fP member indicates the number of entries the process
+has allocated in the array. Upon return, the
+\fIsl_modlist\fP member of the \fBstr_list\fP structure shall contain
+the list of module names, and the number of entries that
+have been filled into the \fIsl_modlist\fP array is found in the \fIsl_nmods\fP
+member (the number includes the number of modules
+including the driver). The return value from \fIioctl\fP() shall be
+0. The entries are filled in starting at the top of the STREAM
+and continuing downstream until either the end of the STREAM is reached,
+or the number of requested modules ( \fIsl_nmods\fP) is
+satisfied.
+.LP
+The \fIioctl\fP() function with the I_LIST command shall fail if:
+.TP 7
+.B EINVAL
+.RS
+The \fIsl_nmods\fP member is less than 1.
+.RE
+.TP 7
+.B EAGAIN \fRor\fP ENOSR
+.RS
+.sp
+Unable to allocate buffers.
+.RE
+.sp
+.TP 7
+I_ATMARK
+Allows the process to see if the message at the head of the STREAM
+head read queue is marked by some module downstream. The
+\fIarg\fP argument determines how the checking is done when there
+may be multiple marked messages on the STREAM head read queue.
+It may take on the following values:
+.TP 7
+ANYMARK
+.RS
+Check if the message is marked.
+.RE
+.TP 7
+LASTMARK
+.RS
+Check if the message is the last one marked on the queue.
+.RE
+.sp
+.LP
+The bitwise-inclusive OR of the flags ANYMARK and LASTMARK is permitted.
+.LP
+The return value shall be 1 if the mark condition is satisfied; otherwise,
+the value shall be 0.
+.LP
+The \fIioctl\fP() function with the I_ATMARK command shall fail if:
+.TP 7
+.B EINVAL
+.RS
+Invalid \fIarg\fP value.
+.RE
+.sp
+.TP 7
+I_CKBAND
+Checks if the message of a given priority band exists on the STREAM
+head read queue. This shall return 1 if a message of the
+given priority exists, 0 if no such message exists, or -1 on error.
+\fIarg\fP should be of type \fBint\fP.
+.LP
+The \fIioctl\fP() function with the I_CKBAND command shall fail if:
+.TP 7
+.B EINVAL
+.RS
+Invalid \fIarg\fP value.
+.RE
+.sp
+.TP 7
+I_GETBAND
+Returns the priority band of the first message on the STREAM head
+read queue in the integer referenced by \fIarg\fP.
+.LP
+The \fIioctl\fP() function with the I_GETBAND command shall fail if:
+.TP 7
+.B ENODATA
+.RS
+No message on the STREAM head read queue.
+.RE
+.sp
+.TP 7
+I_CANPUT
+Checks if a certain band is writable. \fIarg\fP is set to the priority
+band in question. The return value shall be 0 if the
+band is flow-controlled, 1 if the band is writable, or -1 on error.
+.LP
+The \fIioctl\fP() function with the I_CANPUT command shall fail if:
+.TP 7
+.B EINVAL
+.RS
+Invalid \fIarg\fP value.
+.RE
+.sp
+.TP 7
+I_SETCLTIME
+This request allows the process to set the time the STREAM head shall
+delay when a STREAM is closing and there is data on the
+write queues. Before closing each module or driver, if there is data
+on its write queue, the STREAM head shall delay for the
+specified amount of time to allow the data to drain. If, after the
+delay, data is still present, it shall be flushed. The
+\fIarg\fP argument is a pointer to an integer specifying the number
+of milliseconds to delay, rounded up to the nearest valid
+value. If I_SETCLTIME is not performed on a STREAM, an implementation-defined
+default timeout interval is used.
+.LP
+The \fIioctl\fP() function with the I_SETCLTIME command shall fail
+if:
+.TP 7
+.B EINVAL
+.RS
+Invalid \fIarg\fP value.
+.RE
+.sp
+.TP 7
+I_GETCLTIME
+Returns the close time delay in the integer pointed to by \fIarg\fP.
+.sp
+.SS Multiplexed STREAMS Configurations
+.LP
+The following commands are used for connecting and disconnecting multiplexed
+STREAMS configurations. These commands use an
+implementation-defined default timeout interval.
+.TP 7
+I_LINK
+Connects two STREAMs, where \fIfildes\fP is the file descriptor of
+the STREAM connected to the multiplexing driver, and
+\fIarg\fP is the file descriptor of the STREAM connected to another
+driver. The STREAM designated by \fIarg\fP is connected below
+the multiplexing driver. I_LINK requires the multiplexing driver to
+send an acknowledgement message to the STREAM head regarding
+the connection. This call shall return a multiplexer ID number (an
+identifier used to disconnect the multiplexer; see I_UNLINK) on
+success, and -1 on failure.
+.LP
+The \fIioctl\fP() function with the I_LINK command shall fail if:
+.TP 7
+.B ENXIO
+.RS
+Hangup received on \fIfildes\fP.
+.RE
+.TP 7
+.B ETIME
+.RS
+Timeout before acknowledgement message was received at STREAM head.
+.RE
+.TP 7
+.B EAGAIN \fRor\fP ENOSR
+.RS
+.sp
+Unable to allocate STREAMS storage to perform the I_LINK.
+.RE
+.TP 7
+.B EBADF
+.RS
+The \fIarg\fP argument is not a valid, open file descriptor.
+.RE
+.TP 7
+.B EINVAL
+.RS
+The \fIfildes\fP argument does not support multiplexing; or \fIarg\fP
+is not a STREAM or is already connected downstream from
+a multiplexer; or the specified I_LINK operation would connect the
+STREAM head in more than one place in the multiplexed
+STREAM.
+.RE
+.sp
+.LP
+An I_LINK can also fail while waiting for the multiplexing driver
+to acknowledge the request, if a message indicating an error
+or a hangup is received at the STREAM head of \fIfildes\fP. In addition,
+an error code can be returned in the positive or negative
+acknowledgement message. For these cases, I_LINK fails with \fIerrno\fP
+set to the value in the message.
+.TP 7
+I_UNLINK
+Disconnects the two STREAMs specified by \fIfildes\fP and \fIarg\fP.
+\fIfildes\fP is the file descriptor of the STREAM
+connected to the multiplexing driver. The \fIarg\fP argument is the
+multiplexer ID number that was returned by the I_LINK
+\fIioctl\fP() command when a STREAM was connected downstream from
+the multiplexing driver. If \fIarg\fP is MUXID_ALL, then all
+STREAMs that were connected to \fIfildes\fP shall be disconnected.
+As in I_LINK, this command requires acknowledgement.
+.LP
+The \fIioctl\fP() function with the I_UNLINK command shall fail if:
+.TP 7
+.B ENXIO
+.RS
+Hangup received on \fIfildes\fP.
+.RE
+.TP 7
+.B ETIME
+.RS
+Timeout before acknowledgement message was received at STREAM head.
+.RE
+.TP 7
+.B EAGAIN \fRor\fP ENOSR
+.RS
+.sp
+Unable to allocate buffers for the acknowledgement message.
+.RE
+.TP 7
+.B EINVAL
+.RS
+Invalid multiplexer ID number.
+.RE
+.sp
+.LP
+An I_UNLINK can also fail while waiting for the multiplexing driver
+to acknowledge the request if a message indicating an error
+or a hangup is received at the STREAM head of \fIfildes\fP. In addition,
+an error code can be returned in the positive or negative
+acknowledgement message. For these cases, I_UNLINK shall fail with
+\fIerrno\fP set to the value in the message.
+.TP 7
+I_PLINK
+Creates a \fIpersistent connection\fP between two STREAMs, where \fIfildes\fP
+is the file descriptor of the STREAM connected
+to the multiplexing driver, and \fIarg\fP is the file descriptor of
+the STREAM connected to another driver. This call shall create
+a persistent connection which can exist even if the file descriptor
+\fIfildes\fP associated with the upper STREAM to the
+multiplexing driver is closed. The STREAM designated by \fIarg\fP
+gets connected via a persistent connection below the
+multiplexing driver. I_PLINK requires the multiplexing driver to send
+an acknowledgement message to the STREAM head. This call
+shall return a multiplexer ID number (an identifier that may be used
+to disconnect the multiplexer; see I_PUNLINK) on success, and
+-1 on failure.
+.LP
+The \fIioctl\fP() function with the I_PLINK command shall fail if:
+.TP 7
+.B ENXIO
+.RS
+Hangup received on \fIfildes\fP.
+.RE
+.TP 7
+.B ETIME
+.RS
+Timeout before acknowledgement message was received at STREAM head.
+.RE
+.TP 7
+.B EAGAIN \fRor\fP ENOSR
+.RS
+.sp
+Unable to allocate STREAMS storage to perform the I_PLINK.
+.RE
+.TP 7
+.B EBADF
+.RS
+The \fIarg\fP argument is not a valid, open file descriptor.
+.RE
+.TP 7
+.B EINVAL
+.RS
+The \fIfildes\fP argument does not support multiplexing; or \fIarg\fP
+is not a STREAM or is already connected downstream from
+a multiplexer; or the specified I_PLINK operation would connect the
+STREAM head in more than one place in the multiplexed
+STREAM.
+.RE
+.sp
+.LP
+An I_PLINK can also fail while waiting for the multiplexing driver
+to acknowledge the request, if a message indicating an error
+or a hangup is received at the STREAM head of \fIfildes\fP. In addition,
+an error code can be returned in the positive or negative
+acknowledgement message. For these cases, I_PLINK shall fail with
+\fIerrno\fP set to the value in the message.
+.TP 7
+I_PUNLINK
+Disconnects the two STREAMs specified by \fIfildes\fP and \fIarg\fP
+from a persistent connection. The \fIfildes\fP argument
+is the file descriptor of the STREAM connected to the multiplexing
+driver. The \fIarg\fP argument is the multiplexer ID number
+that was returned by the I_PLINK \fIioctl\fP() command when a STREAM
+was connected downstream from the multiplexing driver. If
+\fIarg\fP is MUXID_ALL, then all STREAMs which are persistent connections
+to \fIfildes\fP shall be disconnected. As in I_PLINK,
+this command requires the multiplexing driver to acknowledge the request.
+.LP
+The \fIioctl\fP() function with the I_PUNLINK command shall fail if:
+.TP 7
+.B ENXIO
+.RS
+Hangup received on \fIfildes\fP.
+.RE
+.TP 7
+.B ETIME
+.RS
+Timeout before acknowledgement message was received at STREAM head.
+.RE
+.TP 7
+.B EAGAIN \fRor\fP ENOSR
+.RS
+.sp
+Unable to allocate buffers for the acknowledgement message.
+.RE
+.TP 7
+.B EINVAL
+.RS
+Invalid multiplexer ID number.
+.RE
+.sp
+.LP
+An I_PUNLINK can also fail while waiting for the multiplexing driver
+to acknowledge the request if a message indicating an error
+or a hangup is received at the STREAM head of \fIfildes\fP. In addition,
+an error code can be returned in the positive or negative
+acknowledgement message. For these cases, I_PUNLINK shall fail with
+\fIerrno\fP set to the value in the message.
+.sp
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIioctl\fP() shall return a value other
+than -1 that depends upon the STREAMS device control
+function. Otherwise, it shall return -1 and set \fIerrno\fP to indicate
+the error.
+.SH ERRORS
+.LP
+Under the following general conditions, \fIioctl\fP() shall fail if:
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not a valid open file descriptor.
+.TP 7
+.B EINTR
+A signal was caught during the \fIioctl\fP() operation.
+.TP 7
+.B EINVAL
+The STREAM or multiplexer referenced by \fIfildes\fP is linked (directly
+or indirectly) downstream from a multiplexer.
+.sp
+.LP
+If an underlying device driver detects an error, then \fIioctl\fP()
+shall fail if:
+.TP 7
+.B EINVAL
+The \fIrequest\fP or \fIarg\fP argument is not valid for this device.
+.TP 7
+.B EIO
+Some physical I/O error has occurred.
+.TP 7
+.B ENOTTY
+The \fIfildes\fP argument is not associated with a STREAMS device
+that accepts control functions.
+.TP 7
+.B ENXIO
+The \fIrequest\fP and \fIarg\fP arguments are valid for this device
+driver, but the service requested cannot be performed on
+this particular sub-device.
+.TP 7
+.B ENODEV
+The \fIfildes\fP argument refers to a valid STREAMS device, but the
+corresponding device driver does not support the
+\fIioctl\fP() function.
+.sp
+.LP
+If a STREAM is connected downstream from a multiplexer, any \fIioctl\fP()
+command except I_UNLINK and I_PUNLINK shall set
+\fIerrno\fP to [EINVAL].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The implementation-defined timeout interval for STREAMS has historically
+been 15 seconds.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fISTREAMS\fP, \fIclose\fP(), \fIfcntl\fP(), \fIgetmsg\fP(), \fIopen\fP(),
+\fIpipe\fP(), \fIpoll\fP(), \fIputmsg\fP(), \fIread\fP(), \fIsigaction\fP(),
+\fIwrite\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<stropts.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/isalnum.3p b/man-pages-posix-2003/man3p/isalnum.3p
new file mode 100644
index 0000000..9902fe1
--- /dev/null
+++ b/man-pages-posix-2003/man3p/isalnum.3p
@@ -0,0 +1,71 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISALNUM" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" isalnum
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+isalnum \- test for an alphanumeric character
+.SH SYNOPSIS
+.LP
+\fB#include <ctype.h>
+.br
+.sp
+int isalnum(int\fP \fIc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIisalnum\fP() function shall test whether \fIc\fP is a character
+of class \fBalpha\fP or \fBdigit\fP in the program's
+current locale; see the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 7,
+Locale.
+.LP
+The \fIc\fP argument is an \fBint\fP, the value of which the application
+shall ensure is representable as an \fBunsigned
+char\fP or equal to the value of the macro EOF. If the argument has
+any other value, the behavior is undefined.
+.SH RETURN VALUE
+.LP
+The \fIisalnum\fP() function shall return non-zero if \fIc\fP is an
+alphanumeric character; otherwise, it shall return 0.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+To ensure applications portability, especially across natural languages,
+only this function and those listed in the SEE ALSO
+section should be used for character classification.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIisalpha\fP(), \fIiscntrl\fP(), \fIisdigit\fP(), \fIisgraph\fP(),
+\fIislower\fP(),
+\fIisprint\fP(), \fIispunct\fP(), \fIisspace\fP(), \fIisupper\fP(),
+\fIisxdigit\fP(),
+\fIsetlocale\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 7, Locale, \fI<ctype.h>\fP, \fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/isalpha.3p b/man-pages-posix-2003/man3p/isalpha.3p
new file mode 100644
index 0000000..5cf8516
--- /dev/null
+++ b/man-pages-posix-2003/man3p/isalpha.3p
@@ -0,0 +1,70 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISALPHA" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" isalpha
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+isalpha \- test for an alphabetic character
+.SH SYNOPSIS
+.LP
+\fB#include <ctype.h>
+.br
+.sp
+int isalpha(int\fP \fIc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIisalpha\fP() function shall test whether \fIc\fP is a character
+of class \fBalpha\fP in the program's current locale;
+see the Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter
+7, Locale.
+.LP
+The \fIc\fP argument is an \fBint\fP, the value of which the application
+shall ensure is representable as an \fBunsigned
+char\fP or equal to the value of the macro EOF. If the argument has
+any other value, the behavior is undefined.
+.SH RETURN VALUE
+.LP
+The \fIisalpha\fP() function shall return non-zero if \fIc\fP is an
+alphabetic character; otherwise, it shall return 0.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+To ensure applications portability, especially across natural languages,
+only this function and those listed in the SEE ALSO
+section should be used for character classification.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIisalnum\fP(), \fIiscntrl\fP(), \fIisdigit\fP(), \fIisgraph\fP(),
+\fIislower\fP(),
+\fIisprint\fP(), \fIispunct\fP(), \fIisspace\fP(), \fIisupper\fP(),
+\fIisxdigit\fP(),
+\fIsetlocale\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 7, Locale, \fI<ctype.h>\fP, \fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/isascii.3p b/man-pages-posix-2003/man3p/isascii.3p
new file mode 100644
index 0000000..036c344
--- /dev/null
+++ b/man-pages-posix-2003/man3p/isascii.3p
@@ -0,0 +1,60 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISASCII" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" isascii
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+isascii \- test for a 7-bit US-ASCII character
+.SH SYNOPSIS
+.LP
+\fB#include <ctype.h>
+.br
+.sp
+int isascii(int\fP \fIc\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIisascii\fP() function shall test whether \fIc\fP is a 7-bit
+US-ASCII character code.
+.LP
+The \fIisascii\fP() function is defined on all integer values.
+.SH RETURN VALUE
+.LP
+The \fIisascii\fP() function shall return non-zero if \fIc\fP is a
+7-bit US-ASCII character code between 0 and octal 0177
+inclusive; otherwise, it shall return 0.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<ctype.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/isastream.3p b/man-pages-posix-2003/man3p/isastream.3p
new file mode 100644
index 0000000..2bfb721
--- /dev/null
+++ b/man-pages-posix-2003/man3p/isastream.3p
@@ -0,0 +1,64 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISASTREAM" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" isastream
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+isastream \- test a file descriptor (\fBSTREAMS\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <stropts.h>
+.br
+.sp
+int isastream(int\fP \fIfildes\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIisastream\fP() function shall test whether \fIfildes\fP, an
+open file descriptor, is associated with a STREAMS-based
+file.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIisastream\fP() shall return 1 if \fIfildes\fP
+refers to a STREAMS-based file and 0 if not.
+Otherwise, \fIisastream\fP() shall return -1 and set \fIerrno\fP to
+indicate the error.
+.SH ERRORS
+.LP
+The \fIisastream\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not a valid open file descriptor.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<stropts.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/isatty.3p b/man-pages-posix-2003/man3p/isatty.3p
new file mode 100644
index 0000000..cca32f3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/isatty.3p
@@ -0,0 +1,68 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISATTY" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" isatty
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+isatty \- test for a terminal device
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+int isatty(int\fP \fIfildes\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIisatty\fP() function shall test whether \fIfildes\fP, an open
+file descriptor, is associated with a terminal
+device.
+.SH RETURN VALUE
+.LP
+The \fIisatty\fP() function shall return 1 if \fIfildes\fP is associated
+with a terminal; otherwise, it shall return 0 and may
+set \fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fIisatty\fP() function may fail if:
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not a valid open file descriptor.
+.TP 7
+.B ENOTTY
+The \fIfildes\fP argument is not associated with a terminal.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIisatty\fP() function does not necessarily indicate that a human
+being is available for interaction via \fIfildes\fP. It
+is quite possible that non-terminal devices are connected to the communications
+line.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/isblank.3p b/man-pages-posix-2003/man3p/isblank.3p
new file mode 100644
index 0000000..ebc4ca6
--- /dev/null
+++ b/man-pages-posix-2003/man3p/isblank.3p
@@ -0,0 +1,71 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISBLANK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" isblank
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+isblank \- test for a blank character
+.SH SYNOPSIS
+.LP
+\fB#include <ctype.h>
+.br
+.sp
+int isblank(int\fP \fIc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIisblank\fP() function shall test whether \fIc\fP is a character
+of class \fBblank\fP in the program's current locale;
+see the Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter
+7, Locale.
+.LP
+The \fIc\fP argument is a type \fBint\fP, the value of which the application
+shall ensure is a character representable as an
+\fBunsigned char\fP or equal to the value of the macro EOF. If the
+argument has any other value, the behavior is undefined.
+.SH RETURN VALUE
+.LP
+The \fIisblank\fP() function shall return non-zero if \fIc\fP is a
+<blank>; otherwise, it shall return 0.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+To ensure applications portability, especially across natural languages,
+only this function and those listed in the SEE ALSO
+section should be used for character classification.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIisalnum\fP(), \fIisalpha\fP(), \fIiscntrl\fP(), \fIisdigit\fP(),
+\fIisgraph\fP(),
+\fIislower\fP(), \fIisprint\fP(), \fIispunct\fP(), \fIisspace\fP(),
+\fIisupper\fP(),
+\fIisxdigit\fP(), \fIsetlocale\fP(), the Base Definitions volume
+of
+IEEE\ Std\ 1003.1-2001, Chapter 7, Locale, \fI<ctype.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/iscntrl.3p b/man-pages-posix-2003/man3p/iscntrl.3p
new file mode 100644
index 0000000..2a0f013
--- /dev/null
+++ b/man-pages-posix-2003/man3p/iscntrl.3p
@@ -0,0 +1,70 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISCNTRL" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" iscntrl
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+iscntrl \- test for a control character
+.SH SYNOPSIS
+.LP
+\fB#include <ctype.h>
+.br
+.sp
+int iscntrl(int\fP \fIc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIiscntrl\fP() function shall test whether \fIc\fP is a character
+of class \fBcntrl\fP in the program's current locale;
+see the Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter
+7, Locale.
+.LP
+The \fIc\fP argument is a type \fBint\fP, the value of which the application
+shall ensure is a character representable as an
+\fBunsigned char\fP or equal to the value of the macro EOF. If the
+argument has any other value, the behavior is undefined.
+.SH RETURN VALUE
+.LP
+The \fIiscntrl\fP() function shall return non-zero if \fIc\fP is a
+control character; otherwise, it shall return 0.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+To ensure applications portability, especially across natural languages,
+only this function and those listed in the SEE ALSO
+section should be used for character classification.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIisalnum\fP(), \fIisalpha\fP(), \fIisdigit\fP(), \fIisgraph\fP(),
+\fIislower\fP(),
+\fIisprint\fP(), \fIispunct\fP(), \fIisspace\fP(), \fIisupper\fP(),
+\fIisxdigit\fP(),
+\fIsetlocale\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 7, Locale, \fI<ctype.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/isdigit.3p b/man-pages-posix-2003/man3p/isdigit.3p
new file mode 100644
index 0000000..46d4700
--- /dev/null
+++ b/man-pages-posix-2003/man3p/isdigit.3p
@@ -0,0 +1,70 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISDIGIT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" isdigit
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+isdigit \- test for a decimal digit
+.SH SYNOPSIS
+.LP
+\fB#include <ctype.h>
+.br
+.sp
+int isdigit(int\fP \fIc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIisdigit\fP() function shall test whether \fIc\fP is a character
+of class \fBdigit\fP in the program's current locale;
+see the Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter
+7, Locale.
+.LP
+The \fIc\fP argument is an \fBint\fP, the value of which the application
+shall ensure is a character representable as an
+\fBunsigned char\fP or equal to the value of the macro EOF. If the
+argument has any other value, the behavior is undefined.
+.SH RETURN VALUE
+.LP
+The \fIisdigit\fP() function shall return non-zero if \fIc\fP is a
+decimal digit; otherwise, it shall return 0.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+To ensure applications portability, especially across natural languages,
+only this function and those listed in the SEE ALSO
+section should be used for character classification.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIisalnum\fP(), \fIisalpha\fP(), \fIiscntrl\fP(), \fIisgraph\fP(),
+\fIislower\fP(),
+\fIisprint\fP(), \fIispunct\fP(), \fIisspace\fP(), \fIisupper\fP(),
+\fIisxdigit\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 7,
+Locale, \fI<ctype.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/isfinite.3p b/man-pages-posix-2003/man3p/isfinite.3p
new file mode 100644
index 0000000..e8eacd0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/isfinite.3p
@@ -0,0 +1,61 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISFINITE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" isfinite
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+isfinite \- test for finite value
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+int isfinite(real-floating\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIisfinite\fP() macro shall determine whether its argument has
+a finite value (zero, subnormal, or normal, and not
+infinite or NaN). First, an argument represented in a format wider
+than its semantic type is converted to its semantic type. Then
+determination is based on the type of the argument.
+.SH RETURN VALUE
+.LP
+The \fIisfinite\fP() macro shall return a non-zero value if and only
+if its argument has a finite value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfpclassify\fP(), \fIisinf\fP(), \fIisnan\fP(), \fIisnormal\fP(),
+\fIsignbit\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001 \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/isgraph.3p b/man-pages-posix-2003/man3p/isgraph.3p
new file mode 100644
index 0000000..db0772e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/isgraph.3p
@@ -0,0 +1,71 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISGRAPH" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" isgraph
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+isgraph \- test for a visible character
+.SH SYNOPSIS
+.LP
+\fB#include <ctype.h>
+.br
+.sp
+int isgraph(int\fP \fIc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIisgraph\fP() function shall test whether \fIc\fP is a character
+of class \fBgraph\fP in the program's current locale;
+see the Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter
+7, Locale.
+.LP
+The \fIc\fP argument is an \fBint\fP, the value of which the application
+shall ensure is a character representable as an
+\fBunsigned char\fP or equal to the value of the macro EOF. If the
+argument has any other value, the behavior is undefined.
+.SH RETURN VALUE
+.LP
+The \fIisgraph\fP() function shall return non-zero if \fIc\fP is a
+character with a visible representation; otherwise, it
+shall return 0.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+To ensure applications portability, especially across natural languages,
+only this function and those listed in the SEE ALSO
+section should be used for character classification.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIisalnum\fP(), \fIisalpha\fP(), \fIiscntrl\fP(), \fIisdigit\fP(),
+\fIislower\fP(),
+\fIisprint\fP(), \fIispunct\fP(), \fIisspace\fP(), \fIisupper\fP(),
+\fIisxdigit\fP(),
+\fIsetlocale\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 7, Locale, \fI<ctype.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/isgreater.3p b/man-pages-posix-2003/man3p/isgreater.3p
new file mode 100644
index 0000000..0608507
--- /dev/null
+++ b/man-pages-posix-2003/man3p/isgreater.3p
@@ -0,0 +1,76 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISGREATER" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" isgreater
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+isgreater \- test if x greater than y
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+int isgreater(real-floating\fP \fIx\fP\fB, real-floating\fP \fIy\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIisgreater\fP() macro shall determine whether its first argument
+is greater than its second argument. The value of
+\fIisgreater\fP( \fIx\fP, \fIy\fP) shall be equal to (\fIx\fP)\ >\ (\fIy\fP);
+however, unlike
+(\fIx\fP)\ >\ (\fIy\fP), \fIisgreater\fP( \fIx\fP, \fIy\fP) shall
+not raise the invalid floating-point exception
+when \fIx\fP and \fIy\fP are unordered.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIisgreater\fP() macro shall return
+the value of (\fIx\fP)\ >\ (\fIy\fP).
+.LP
+If \fIx\fP or \fIy\fP is NaN, 0 shall be returned.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The relational and equality operators support the usual mathematical
+relationships between numeric values. For any ordered pair
+of numeric values, exactly one of the relationships (less, greater,
+and equal) is true. Relational operators may raise the invalid
+floating-point exception when argument values are NaNs. For a NaN
+and a numeric value, or for two NaNs, just the unordered
+relationship is true. This macro is a quiet (non-floating-point exception
+raising) version of a relational operator. It facilitates
+writing efficient code that accounts for NaNs without suffering the
+invalid floating-point exception. In the SYNOPSIS section,
+\fBreal-floating\fP indicates that the argument shall be an expression
+of \fBreal-floating\fP type.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIisgreaterequal\fP(), \fIisless\fP(), \fIislessequal\fP(), \fIislessgreater\fP(),
+\fIisunordered\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001
+\fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/isgreaterequal.3p b/man-pages-posix-2003/man3p/isgreaterequal.3p
new file mode 100644
index 0000000..bb3edee
--- /dev/null
+++ b/man-pages-posix-2003/man3p/isgreaterequal.3p
@@ -0,0 +1,77 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISGREATEREQUAL" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" isgreaterequal
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+isgreaterequal \- test if x is greater than or equal to y
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+int isgreaterequal(real-floating\fP \fIx\fP\fB, real-floating\fP \fIy\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIisgreaterequal\fP() macro shall determine whether its first
+argument is greater than or equal to its second argument.
+The value of \fIisgreaterequal\fP( \fIx\fP, \fIy\fP) shall be equal
+to (\fIx\fP)\ >=\ (\fIy\fP); however, unlike
+(\fIx\fP)\ >=\ (\fIy\fP), \fIisgreaterequal\fP( \fIx\fP, \fIy\fP)
+shall not raise the invalid floating-point
+exception when \fIx\fP and \fIy\fP are unordered.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIisgreaterequal\fP() macro shall
+return the value of
+(\fIx\fP)\ >=\ (\fIy\fP).
+.LP
+If \fIx\fP or \fIy\fP is NaN, 0 shall be returned.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The relational and equality operators support the usual mathematical
+relationships between numeric values. For any ordered pair
+of numeric values, exactly one of the relationships (less, greater,
+and equal) is true. Relational operators may raise the invalid
+floating-point exception when argument values are NaNs. For a NaN
+and a numeric value, or for two NaNs, just the unordered
+relationship is true. This macro is a quiet (non-floating-point exception
+raising) version of a relational operator. It facilitates
+writing efficient code that accounts for NaNs without suffering the
+invalid floating-point exception. In the SYNOPSIS section,
+\fBreal-floating\fP indicates that the argument shall be an expression
+of \fBreal-floating\fP type.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIisgreater\fP(), \fIisless\fP(), \fIislessequal\fP(), \fIislessgreater\fP(),
+\fIisunordered\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001
+\fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/isinf.3p b/man-pages-posix-2003/man3p/isinf.3p
new file mode 100644
index 0000000..193adab
--- /dev/null
+++ b/man-pages-posix-2003/man3p/isinf.3p
@@ -0,0 +1,61 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISINF" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" isinf
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+isinf \- test for infinity
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+int isinf(real-floating\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIisinf\fP() macro shall determine whether its argument value
+is an infinity (positive or negative). First, an argument
+represented in a format wider than its semantic type is converted
+to its semantic type. Then determination is based on the type of
+the argument.
+.SH RETURN VALUE
+.LP
+The \fIisinf\fP() macro shall return a non-zero value if and only
+if its argument has an infinite value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfpclassify\fP(), \fIisfinite\fP(), \fIisnan\fP(), \fIisnormal\fP(),
+\fIsignbit\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001 \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/isless.3p b/man-pages-posix-2003/man3p/isless.3p
new file mode 100644
index 0000000..1d9203a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/isless.3p
@@ -0,0 +1,76 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISLESS" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" isless
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+isless \- test if x is less than y
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+int isless(real-floating\fP \fIx\fP\fB, real-floating\fP \fIy\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIisless\fP() macro shall determine whether its first argument
+is less than its second argument. The value of
+\fIisless\fP( \fIx\fP, \fIy\fP) shall be equal to (\fIx\fP)\ <\ (\fIy\fP);
+however, unlike
+(\fIx\fP)\ <\ (\fIy\fP), \fIisless\fP( \fIx\fP, \fIy\fP) shall not
+raise the invalid floating-point exception when
+\fIx\fP and \fIy\fP are unordered.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIisless\fP() macro shall return
+the value of (\fIx\fP)\ <\ (\fIy\fP).
+.LP
+If \fIx\fP or \fIy\fP is NaN, 0 shall be returned.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The relational and equality operators support the usual mathematical
+relationships between numeric values. For any ordered pair
+of numeric values, exactly one of the relationships (less, greater,
+and equal) is true. Relational operators may raise the invalid
+floating-point exception when argument values are NaNs. For a NaN
+and a numeric value, or for two NaNs, just the unordered
+relationship is true. This macro is a quiet (non-floating-point exception
+raising) version of a relational operator. It facilitates
+writing efficient code that accounts for NaNs without suffering the
+invalid floating-point exception. In the SYNOPSIS section,
+\fBreal-floating\fP indicates that the argument shall be an expression
+of \fBreal-floating\fP type.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIisgreater\fP(), \fIisgreaterequal\fP(), \fIislessequal\fP(),
+\fIislessgreater\fP(), \fIisunordered\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/islessequal.3p b/man-pages-posix-2003/man3p/islessequal.3p
new file mode 100644
index 0000000..bcbf474
--- /dev/null
+++ b/man-pages-posix-2003/man3p/islessequal.3p
@@ -0,0 +1,76 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISLESSEQUAL" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" islessequal
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+islessequal \- test if x is less than or equal to y
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+int islessequal(real-floating\fP \fIx\fP\fB, real-floating\fP \fIy\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIislessequal\fP() macro shall determine whether its first argument
+is less than or equal to its second argument. The
+value of \fIislessequal\fP( \fIx\fP, \fIy\fP) shall be equal to (\fIx\fP)\ <=\ (\fIy\fP);
+however, unlike
+(\fIx\fP)\ <=\ (\fIy\fP), \fIislessequal\fP( \fIx\fP, \fIy\fP) shall
+not raise the invalid floating-point exception
+when \fIx\fP and \fIy\fP are unordered.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIislessequal\fP() macro shall return
+the value of (\fIx\fP)\ <=\ (\fIy\fP).
+.LP
+If \fIx\fP or \fIy\fP is NaN, 0 shall be returned.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The relational and equality operators support the usual mathematical
+relationships between numeric values. For any ordered pair
+of numeric values, exactly one of the relationships (less, greater,
+and equal) is true. Relational operators may raise the invalid
+floating-point exception when argument values are NaNs. For a NaN
+and a numeric value, or for two NaNs, just the unordered
+relationship is true. This macro is a quiet (non-floating-point exception
+raising) version of a relational operator. It facilitates
+writing efficient code that accounts for NaNs without suffering the
+invalid floating-point exception. In the SYNOPSIS section,
+\fBreal-floating\fP indicates that the argument shall be an expression
+of \fBreal-floating\fP type.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIisgreater\fP(), \fIisgreaterequal\fP(), \fIisless\fP(), \fIislessgreater\fP(),
+\fIisunordered\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001
+\fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/islessgreater.3p b/man-pages-posix-2003/man3p/islessgreater.3p
new file mode 100644
index 0000000..ad89db7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/islessgreater.3p
@@ -0,0 +1,78 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISLESSGREATER" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" islessgreater
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+islessgreater \- test if x is less than or greater than y
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+int islessgreater(real-floating\fP \fIx\fP\fB, real-floating\fP \fIy\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIislessgreater\fP() macro shall determine whether its first
+argument is less than or greater than its second argument.
+The \fIislessgreater\fP( \fIx\fP, \fIy\fP) macro is similar to
+(\fIx\fP)\ <\ (\fIy\fP)\ ||\ (\fIx\fP)\ >\ (\fIy\fP); however, \fIislessgreater\fP(
+\fIx\fP,
+\fIy\fP) shall not raise the invalid floating-point exception when
+\fIx\fP and \fIy\fP are unordered (nor shall it evaluate
+\fIx\fP and \fIy\fP twice).
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIislessgreater\fP() macro shall
+return the value of
+(\fIx\fP)\ <\ (\fIy\fP)\ ||\ (\fIx\fP)\ >\ (\fIy\fP).
+.LP
+If \fIx\fP or \fIy\fP is NaN, 0 shall be returned.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The relational and equality operators support the usual mathematical
+relationships between numeric values. For any ordered pair
+of numeric values, exactly one of the relationships (less, greater,
+and equal) is true. Relational operators may raise the invalid
+floating-point exception when argument values are NaNs. For a NaN
+and a numeric value, or for two NaNs, just the unordered
+relationship is true. This macro is a quiet (non-floating-point exception
+raising) version of a relational operator. It facilitates
+writing efficient code that accounts for NaNs without suffering the
+invalid floating-point exception. In the SYNOPSIS section,
+\fBreal-floating\fP indicates that the argument shall be an expression
+of \fBreal-floating\fP type.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIisgreater\fP(), \fIisgreaterequal\fP(), \fIisless\fP(), \fIislessequal\fP(),
+\fIisunordered\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001
+\fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/islower.3p b/man-pages-posix-2003/man3p/islower.3p
new file mode 100644
index 0000000..ad39985
--- /dev/null
+++ b/man-pages-posix-2003/man3p/islower.3p
@@ -0,0 +1,98 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISLOWER" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" islower
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+islower \- test for a lowercase letter
+.SH SYNOPSIS
+.LP
+\fB#include <ctype.h>
+.br
+.sp
+int islower(int\fP \fIc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIislower\fP() function shall test whether \fIc\fP is a character
+of class \fBlower\fP in the program's current locale;
+see the Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter
+7, Locale.
+.LP
+The \fIc\fP argument is an \fBint\fP, the value of which the application
+shall ensure is a character representable as an
+\fBunsigned char\fP or equal to the value of the macro EOF. If the
+argument has any other value, the behavior is undefined.
+.SH RETURN VALUE
+.LP
+The \fIislower\fP() function shall return non-zero if \fIc\fP is a
+lowercase letter; otherwise, it shall return 0.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Testing for a Lowercase Letter
+.LP
+The following example tests whether the value is a lowercase letter,
+based on the locale of the user, then uses it as part of a
+key value.
+.sp
+.RS
+.nf
+
+\fB#include <ctype.h>
+#include <stdlib.h>
+#include <locale.h>
+\&...
+char *keystr;
+int elementlen, len;
+char c;
+\&...
+setlocale(LC_ALL, "");
+\&...
+len = 0;
+while (len < elementlen) {
+ c = (char) (rand() % 256);
+\&...
+ if (islower(c))
+ keystr[len++] = c;
+ }
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+To ensure applications portability, especially across natural languages,
+only this function and those listed in the SEE ALSO
+section should be used for character classification.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIisalnum\fP(), \fIisalpha\fP(), \fIiscntrl\fP(), \fIisdigit\fP(),
+\fIisgraph\fP(),
+\fIisprint\fP(), \fIispunct\fP(), \fIisspace\fP(), \fIisupper\fP(),
+\fIisxdigit\fP(),
+\fIsetlocale\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 7, Locale, \fI<ctype.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/isnan.3p b/man-pages-posix-2003/man3p/isnan.3p
new file mode 100644
index 0000000..13c0ea9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/isnan.3p
@@ -0,0 +1,60 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISNAN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" isnan
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+isnan \- test for a NaN
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+int isnan(real-floating\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIisnan\fP() macro shall determine whether its argument value
+is a NaN. First, an argument represented in a format wider
+than its semantic type is converted to its semantic type. Then determination
+is based on the type of the argument.
+.SH RETURN VALUE
+.LP
+The \fIisnan\fP() macro shall return a non-zero value if and only
+if its argument has a NaN value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfpclassify\fP(), \fIisfinite\fP(), \fIisinf\fP(), \fIisnormal\fP(),
+\fIsignbit\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/isnormal.3p b/man-pages-posix-2003/man3p/isnormal.3p
new file mode 100644
index 0000000..8283bad
--- /dev/null
+++ b/man-pages-posix-2003/man3p/isnormal.3p
@@ -0,0 +1,61 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISNORMAL" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" isnormal
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+isnormal \- test for a normal value
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+int isnormal(real-floating\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIisnormal\fP() macro shall determine whether its argument value
+is normal (neither zero, subnormal, infinite, nor NaN).
+First, an argument represented in a format wider than its semantic
+type is converted to its semantic type. Then determination is
+based on the type of the argument.
+.SH RETURN VALUE
+.LP
+The \fIisnormal\fP() macro shall return a non-zero value if and only
+if its argument has a normal value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfpclassify\fP(), \fIisfinite\fP(), \fIisinf\fP(), \fIisnan\fP(),
+\fIsignbit\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/isprint.3p b/man-pages-posix-2003/man3p/isprint.3p
new file mode 100644
index 0000000..9b7fadf
--- /dev/null
+++ b/man-pages-posix-2003/man3p/isprint.3p
@@ -0,0 +1,70 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISPRINT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" isprint
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+isprint \- test for a printable character
+.SH SYNOPSIS
+.LP
+\fB#include <ctype.h>
+.br
+.sp
+int isprint(int\fP \fIc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIisprint\fP() function shall test whether \fIc\fP is a character
+of class \fBprint\fP in the program's current locale;
+see the Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter
+7, Locale.
+.LP
+The \fIc\fP argument is an \fBint\fP, the value of which the application
+shall ensure is a character representable as an
+\fBunsigned char\fP or equal to the value of the macro EOF. If the
+argument has any other value, the behavior is undefined.
+.SH RETURN VALUE
+.LP
+The \fIisprint\fP() function shall return non-zero if \fIc\fP is a
+printable character; otherwise, it shall return 0.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+To ensure applications portability, especially across natural languages,
+only this function and those listed in the SEE ALSO
+section should be used for character classification.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIisalnum\fP(), \fIisalpha\fP(), \fIiscntrl\fP(), \fIisdigit\fP(),
+\fIisgraph\fP(),
+\fIislower\fP(), \fIispunct\fP(), \fIisspace\fP(), \fIisupper\fP(),
+\fIisxdigit\fP(),
+\fIsetlocale\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 7, Locale, \fI<ctype.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/ispunct.3p b/man-pages-posix-2003/man3p/ispunct.3p
new file mode 100644
index 0000000..696e43a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ispunct.3p
@@ -0,0 +1,70 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISPUNCT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ispunct
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ispunct \- test for a punctuation character
+.SH SYNOPSIS
+.LP
+\fB#include <ctype.h>
+.br
+.sp
+int ispunct(int\fP \fIc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIispunct\fP() function shall test whether \fIc\fP is a character
+of class \fBpunct\fP in the program's current locale;
+see the Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter
+7, Locale.
+.LP
+The \fIc\fP argument is an \fBint\fP, the value of which the application
+shall ensure is a character representable as an
+\fBunsigned char\fP or equal to the value of the macro EOF. If the
+argument has any other value, the behavior is undefined.
+.SH RETURN VALUE
+.LP
+The \fIispunct\fP() function shall return non-zero if \fIc\fP is a
+punctuation character; otherwise, it shall return 0.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+To ensure applications portability, especially across natural languages,
+only this function and those listed in the SEE ALSO
+section should be used for character classification.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIisalnum\fP(), \fIisalpha\fP(), \fIiscntrl\fP(), \fIisdigit\fP(),
+\fIisgraph\fP(),
+\fIislower\fP(), \fIisprint\fP(), \fIisspace\fP(), \fIisupper\fP(),
+\fIisxdigit\fP(),
+\fIsetlocale\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 7, Locale, \fI<ctype.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/isspace.3p b/man-pages-posix-2003/man3p/isspace.3p
new file mode 100644
index 0000000..86b6478
--- /dev/null
+++ b/man-pages-posix-2003/man3p/isspace.3p
@@ -0,0 +1,70 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISSPACE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" isspace
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+isspace \- test for a white-space character
+.SH SYNOPSIS
+.LP
+\fB#include <ctype.h>
+.br
+.sp
+int isspace(int\fP \fIc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIisspace\fP() function shall test whether \fIc\fP is a character
+of class \fBspace\fP in the program's current locale;
+see the Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter
+7, Locale.
+.LP
+The \fIc\fP argument is an \fBint\fP, the value of which the application
+shall ensure is a character representable as an
+\fBunsigned char\fP or equal to the value of the macro EOF. If the
+argument has any other value, the behavior is undefined.
+.SH RETURN VALUE
+.LP
+The \fIisspace\fP() function shall return non-zero if \fIc\fP is a
+white-space character; otherwise, it shall return 0.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+To ensure applications portability, especially across natural languages,
+only this function and those listed in the SEE ALSO
+section should be used for character classification.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIisalnum\fP(), \fIisalpha\fP(), \fIiscntrl\fP(), \fIisdigit\fP(),
+\fIisgraph\fP(),
+\fIislower\fP(), \fIisprint\fP(), \fIispunct\fP(), \fIisupper\fP(),
+\fIisxdigit\fP(),
+\fIsetlocale\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 7, Locale, \fI<ctype.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/isunordered.3p b/man-pages-posix-2003/man3p/isunordered.3p
new file mode 100644
index 0000000..1745d0e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/isunordered.3p
@@ -0,0 +1,71 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISUNORDERED" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" isunordered
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+isunordered \- test if arguments are unordered
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+int isunordered(real-floating\fP \fIx\fP\fB, real-floating\fP \fIy\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIisunordered\fP() macro shall determine whether its arguments
+are unordered.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIisunordered\fP() macro shall return
+1 if its arguments are unordered, and 0 otherwise.
+.LP
+If \fIx\fP or \fIy\fP is NaN, 0 shall be returned.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The relational and equality operators support the usual mathematical
+relationships between numeric values. For any ordered pair
+of numeric values, exactly one of the relationships (less, greater,
+and equal) is true. Relational operators may raise the invalid
+floating-point exception when argument values are NaNs. For a NaN
+and a numeric value, or for two NaNs, just the unordered
+relationship is true. This macro is a quiet (non-floating-point exception
+raising) version of a relational operator. It facilitates
+writing efficient code that accounts for NaNs without suffering the
+invalid floating-point exception. In the SYNOPSIS section,
+\fBreal-floating\fP indicates that the argument shall be an expression
+of \fBreal-floating\fP type.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIisgreater\fP(), \fIisgreaterequal\fP(), \fIisless\fP(), \fIislessequal\fP(),
+\fIislessgreater\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/isupper.3p b/man-pages-posix-2003/man3p/isupper.3p
new file mode 100644
index 0000000..6ae15c0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/isupper.3p
@@ -0,0 +1,70 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISUPPER" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" isupper
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+isupper \- test for an uppercase letter
+.SH SYNOPSIS
+.LP
+\fB#include <ctype.h>
+.br
+.sp
+int isupper(int\fP \fIc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIisupper\fP() function shall test whether \fIc\fP is a character
+of class \fBupper\fP in the program's current locale;
+see the Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter
+7, Locale.
+.LP
+The \fIc\fP argument is an \fBint\fP, the value of which the application
+shall ensure is a character representable as an
+\fBunsigned char\fP or equal to the value of the macro EOF. If the
+argument has any other value, the behavior is undefined.
+.SH RETURN VALUE
+.LP
+The \fIisupper\fP() function shall return non-zero if \fIc\fP is an
+uppercase letter; otherwise, it shall return 0.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+To ensure applications portability, especially across natural languages,
+only this function and those listed in the SEE ALSO
+section should be used for character classification.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIisalnum\fP(), \fIisalpha\fP(), \fIiscntrl\fP(), \fIisdigit\fP(),
+\fIisgraph\fP(),
+\fIislower\fP(), \fIisprint\fP(), \fIispunct\fP(), \fIisspace\fP(),
+\fIisxdigit\fP(),
+\fIsetlocale\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 7, Locale, \fI<ctype.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/iswalnum.3p b/man-pages-posix-2003/man3p/iswalnum.3p
new file mode 100644
index 0000000..acfee8b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/iswalnum.3p
@@ -0,0 +1,72 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISWALNUM" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" iswalnum
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+iswalnum \- test for an alphanumeric wide-character code
+.SH SYNOPSIS
+.LP
+\fB#include <wctype.h>
+.br
+.sp
+int iswalnum(wint_t\fP \fIwc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIiswalnum\fP() function shall test whether \fIwc\fP is a wide-character
+code representing a character of class
+\fBalpha\fP or \fBdigit\fP in the program's current locale; see the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 7, Locale.
+.LP
+The \fIwc\fP argument is a \fBwint_t\fP, the value of which the application
+shall ensure is a wide-character code
+corresponding to a valid character in the current locale, or equal
+to the value of the macro WEOF. If the argument has any other
+value, the behavior is undefined.
+.SH RETURN VALUE
+.LP
+The \fIiswalnum\fP() function shall return non-zero if \fIwc\fP is
+an alphanumeric wide-character code; otherwise, it shall
+return 0.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+To ensure applications portability, especially across natural languages,
+only this function and those listed in the SEE ALSO
+section should be used for classification of wide-character codes.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIiswalpha\fP(), \fIiswcntrl\fP(), \fIiswctype\fP(), \fIiswdigit\fP(),
+\fIiswgraph\fP(), \fIiswlower\fP(), \fIiswprint\fP(), \fIiswpunct\fP(),
+\fIiswspace\fP(), \fIiswupper\fP(), \fIiswxdigit\fP(), \fIsetlocale\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 7, Locale, \fI<stdio.h>\fP, \fI<wchar.h>\fP,
+\fI<wctype.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/iswalpha.3p b/man-pages-posix-2003/man3p/iswalpha.3p
new file mode 100644
index 0000000..95f5c3d
--- /dev/null
+++ b/man-pages-posix-2003/man3p/iswalpha.3p
@@ -0,0 +1,72 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISWALPHA" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" iswalpha
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+iswalpha \- test for an alphabetic wide-character code
+.SH SYNOPSIS
+.LP
+\fB#include <wctype.h>
+.br
+.sp
+int iswalpha(wint_t\fP \fIwc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIiswalpha\fP() function shall test whether \fIwc\fP is a wide-character
+code representing a character of class
+\fBalpha\fP in the program's current locale; see the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 7, Locale.
+.LP
+The \fIwc\fP argument is a \fBwint_t\fP, the value of which the application
+shall ensure is a wide-character code
+corresponding to a valid character in the current locale, or equal
+to the value of the macro WEOF. If the argument has any other
+value, the behavior is undefined.
+.SH RETURN VALUE
+.LP
+The \fIiswalpha\fP() function shall return non-zero if \fIwc\fP is
+an alphabetic wide-character code; otherwise, it shall
+return 0.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+To ensure applications portability, especially across natural languages,
+only this function and those listed in the SEE ALSO
+section should be used for classification of wide-character codes.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIiswalnum\fP(), \fIiswcntrl\fP(), \fIiswctype\fP(), \fIiswdigit\fP(),
+\fIiswgraph\fP(), \fIiswlower\fP(), \fIiswprint\fP(), \fIiswpunct\fP(),
+\fIiswspace\fP(), \fIiswupper\fP(), \fIiswxdigit\fP(), \fIsetlocale\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 7, Locale, \fI<stdio.h>\fP, \fI<wchar.h>\fP,
+\fI<wctype.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/iswblank.3p b/man-pages-posix-2003/man3p/iswblank.3p
new file mode 100644
index 0000000..a5a7ef3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/iswblank.3p
@@ -0,0 +1,71 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISWBLANK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" iswblank
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+iswblank \- test for a blank wide-character code
+.SH SYNOPSIS
+.LP
+\fB#include <wctype.h>
+.br
+.sp
+int iswblank(wint_t\fP \fIwc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIiswblank\fP() function shall test whether \fIwc\fP is a wide-character
+code representing a character of class
+\fBblank\fP in the program's current locale; see the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 7, Locale.
+.LP
+The \fIwc\fP argument is a \fBwint_t\fP, the value of which the application
+shall ensure is a wide-character code
+corresponding to a valid character in the current locale, or equal
+to the value of the macro WEOF. If the argument has any other
+value, the behavior is undefined.
+.SH RETURN VALUE
+.LP
+The \fIiswblank\fP() function shall return non-zero if \fIwc\fP is
+a blank wide-character code; otherwise, it shall return
+0.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+To ensure applications portability, especially across natural languages,
+only this function and those listed in the SEE ALSO
+section should be used for classification of wide-character codes.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIiswalnum\fP(), \fIiswalpha\fP(), \fIiswcntrl\fP(), \fIiswctype\fP(),
+\fIiswdigit\fP(), \fIiswgraph\fP(), \fIiswlower\fP(), \fIiswprint\fP(),
+\fIiswpunct\fP(), \fIiswspace\fP(), \fIiswupper\fP(), \fIiswxdigit\fP(),
+\fIsetlocale\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 7, Locale, \fI<stdio.h>\fP, \fI<wchar.h>\fP, \fI<wctype.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/iswcntrl.3p b/man-pages-posix-2003/man3p/iswcntrl.3p
new file mode 100644
index 0000000..a6dfe6d
--- /dev/null
+++ b/man-pages-posix-2003/man3p/iswcntrl.3p
@@ -0,0 +1,71 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISWCNTRL" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" iswcntrl
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+iswcntrl \- test for a control wide-character code
+.SH SYNOPSIS
+.LP
+\fB#include <wctype.h>
+.br
+.sp
+int iswcntrl(wint_t\fP \fIwc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIiswcntrl\fP() function shall test whether \fIwc\fP is a wide-character
+code representing a character of class
+\fBcntrl\fP in the program's current locale; see the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 7, Locale.
+.LP
+The \fIwc\fP argument is a \fBwint_t\fP, the value of which the application
+shall ensure is a wide-character code
+corresponding to a valid character in the current locale, or equal
+to the value of the macro WEOF. If the argument has any other
+value, the behavior is undefined.
+.SH RETURN VALUE
+.LP
+The \fIiswcntrl\fP() function shall return non-zero if \fIwc\fP is
+a control wide-character code; otherwise, it shall return
+0.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+To ensure applications portability, especially across natural languages,
+only this function and those listed in the SEE ALSO
+section should be used for classification of wide-character codes.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIiswalnum\fP(), \fIiswalpha\fP(), \fIiswctype\fP(), \fIiswdigit\fP(),
+\fIiswgraph\fP(), \fIiswlower\fP(), \fIiswprint\fP(), \fIiswpunct\fP(),
+\fIiswspace\fP(), \fIiswupper\fP(), \fIiswxdigit\fP(), \fIsetlocale\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 7, Locale, \fI<wchar.h>\fP, \fI<wctype.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/iswctype.3p b/man-pages-posix-2003/man3p/iswctype.3p
new file mode 100644
index 0000000..b0775a9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/iswctype.3p
@@ -0,0 +1,110 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISWCTYPE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" iswctype
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+iswctype \- test character for a specified class
+.SH SYNOPSIS
+.LP
+\fB#include <wctype.h>
+.br
+.sp
+int iswctype(wint_t\fP \fIwc\fP\fB, wctype_t\fP \fIcharclass\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIiswctype\fP() function shall determine whether the wide-character
+code \fIwc\fP has the character class
+\fIcharclass\fP, returning true or false. The \fIiswctype\fP() function
+is defined on WEOF and wide-character codes corresponding
+to the valid character encodings in the current locale. If the \fIwc\fP
+argument is not in the domain of the function, the result
+is undefined. If the value of \fIcharclass\fP is invalid (that is,
+not obtained by a call to \fIwctype\fP() or \fIcharclass\fP is invalidated
+by a subsequent call to \fIsetlocale\fP() that has affected category
+\fILC_CTYPE )\fP the result is unspecified.
+.SH RETURN VALUE
+.LP
+The \fIiswctype\fP() function shall return non-zero (true) if and
+only if \fIwc\fP has the property described by
+\fIcharclass\fP. If \fIcharclass\fP is 0, \fIiswctype\fP() shall
+return 0.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Testing for a Valid Character
+.sp
+.RS
+.nf
+
+\fB#include <wctype.h>
+\&...
+int yes_or_no;
+wint_t wc;
+wctype_t valid_class;
+\&...
+if ((valid_class=wctype("vowel")) == (wctype_t)0)
+ /* Invalid character class. */
+yes_or_no=iswctype(wc,valid_class);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The twelve strings \fB"alnum"\fP, \fB"alpha"\fP, \fB"blank"\fP,
+\fB"cntrl"\fP, \fB"digit"\fP,
+\fB"graph"\fP, \fB"lower"\fP, \fB"print"\fP, \fB"punct"\fP, \fB"space"\fP,
+\fB"upper"\fP, and
+\fB"xdigit"\fP are reserved for the standard character classes. In
+the table below, the functions in the left column are
+equivalent to the functions in the right column.
+.sp
+.RS
+.nf
+
+\fBiswalnum(\fP\fIwc\fP\fB) iswctype(\fP\fIwc\fP\fB, wctype("alnum"))
+iswalpha(\fP\fIwc\fP\fB) iswctype(\fP\fIwc\fP\fB, wctype("alpha"))
+iswblank(\fP\fIwc\fP\fB) iswctype(\fP\fIwc\fP\fB, wctype("blank"))
+iswcntrl(\fP\fIwc\fP\fB) iswctype(\fP\fIwc\fP\fB, wctype("cntrl"))
+iswdigit(\fP\fIwc\fP\fB) iswctype(\fP\fIwc\fP\fB, wctype("digit"))
+iswgraph(\fP\fIwc\fP\fB) iswctype(\fP\fIwc\fP\fB, wctype("graph"))
+iswlower(\fP\fIwc\fP\fB) iswctype(\fP\fIwc\fP\fB, wctype("lower"))
+iswprint(\fP\fIwc\fP\fB) iswctype(\fP\fIwc\fP\fB, wctype("print"))
+iswpunct(\fP\fIwc\fP\fB) iswctype(\fP\fIwc\fP\fB, wctype("punct"))
+iswspace(\fP\fIwc\fP\fB) iswctype(\fP\fIwc\fP\fB, wctype("space"))
+iswupper(\fP\fIwc\fP\fB) iswctype(\fP\fIwc\fP\fB, wctype("upper"))
+iswxdigit(\fP\fIwc\fP\fB) iswctype(\fP\fIwc\fP\fB, wctype("xdigit"))
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIiswalnum\fP(), \fIiswalpha\fP(), \fIiswcntrl\fP(), \fIiswdigit\fP(),
+\fIiswgraph\fP(), \fIiswlower\fP(), \fIiswprint\fP(), \fIiswpunct\fP(),
+\fIiswspace\fP(), \fIiswupper\fP(), \fIiswxdigit\fP(), \fIsetlocale\fP(),
+\fIwctype\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<wchar.h>\fP, \fI<wctype.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/iswdigit.3p b/man-pages-posix-2003/man3p/iswdigit.3p
new file mode 100644
index 0000000..79b11b6
--- /dev/null
+++ b/man-pages-posix-2003/man3p/iswdigit.3p
@@ -0,0 +1,71 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISWDIGIT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" iswdigit
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+iswdigit \- test for a decimal digit wide-character code
+.SH SYNOPSIS
+.LP
+\fB#include <wctype.h>
+.br
+.sp
+int iswdigit(wint_t\fP \fIwc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIiswdigit\fP() function shall test whether \fIwc\fP is a wide-character
+code representing a character of class
+\fBdigit\fP in the program's current locale; see the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 7, Locale.
+.LP
+The \fIwc\fP argument is a \fBwint_t\fP, the value of which the application
+shall ensure is a wide-character code
+corresponding to a valid character in the current locale, or equal
+to the value of the macro WEOF. If the argument has any other
+value, the behavior is undefined.
+.SH RETURN VALUE
+.LP
+The \fIiswdigit\fP() function shall return non-zero if \fIwc\fP is
+a decimal digit wide-character code; otherwise, it shall
+return 0.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+To ensure applications portability, especially across natural languages,
+only this function and those listed in the SEE ALSO
+section should be used for classification of wide-character codes.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIiswalnum\fP(), \fIiswalpha\fP(), \fIiswcntrl\fP(), \fIiswctype\fP(),
+\fIiswgraph\fP(), \fIiswlower\fP(), \fIiswprint\fP(), \fIiswpunct\fP(),
+\fIiswspace\fP(), \fIiswupper\fP(), \fIiswxdigit\fP(), \fIsetlocale\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 7, Locale, \fI<wchar.h>\fP, \fI<wctype.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/iswgraph.3p b/man-pages-posix-2003/man3p/iswgraph.3p
new file mode 100644
index 0000000..9ab7231
--- /dev/null
+++ b/man-pages-posix-2003/man3p/iswgraph.3p
@@ -0,0 +1,71 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISWGRAPH" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" iswgraph
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+iswgraph \- test for a visible wide-character code
+.SH SYNOPSIS
+.LP
+\fB#include <wctype.h>
+.br
+.sp
+int iswgraph(wint_t\fP \fIwc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIiswgraph\fP() function shall test whether \fIwc\fP is a wide-character
+code representing a character of class
+\fBgraph\fP in the program's current locale; see the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 7, Locale.
+.LP
+The \fIwc\fP argument is a \fBwint_t\fP, the value of which the application
+shall ensure is a wide-character code
+corresponding to a valid character in the current locale, or equal
+to the value of the macro WEOF. If the argument has any other
+value, the behavior is undefined.
+.SH RETURN VALUE
+.LP
+The \fIiswgraph\fP() function shall return non-zero if \fIwc\fP is
+a wide-character code with a visible representation;
+otherwise, it shall return 0.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+To ensure applications portability, especially across natural languages,
+only this function and those listed in the SEE ALSO
+section should be used for classification of wide-character codes.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIiswalnum\fP(), \fIiswalpha\fP(), \fIiswcntrl\fP(), \fIiswctype\fP(),
+\fIiswdigit\fP(), \fIiswlower\fP(), \fIiswprint\fP(), \fIiswpunct\fP(),
+\fIiswspace\fP(), \fIiswupper\fP(), \fIiswxdigit\fP(), \fIsetlocale\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 7, Locale, \fI<wchar.h>\fP, \fI<wctype.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/iswlower.3p b/man-pages-posix-2003/man3p/iswlower.3p
new file mode 100644
index 0000000..85a7d35
--- /dev/null
+++ b/man-pages-posix-2003/man3p/iswlower.3p
@@ -0,0 +1,71 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISWLOWER" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" iswlower
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+iswlower \- test for a lowercase letter wide-character code
+.SH SYNOPSIS
+.LP
+\fB#include <wctype.h>
+.br
+.sp
+int iswlower(wint_t\fP \fIwc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIiswlower\fP() function shall test whether \fIwc\fP is a wide-character
+code representing a character of class
+\fBlower\fP in the program's current locale; see the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 7, Locale.
+.LP
+The \fIwc\fP argument is a \fBwint_t\fP, the value of which the application
+shall ensure is a wide-character code
+corresponding to a valid character in the current locale, or equal
+to the value of the macro WEOF. If the argument has any other
+value, the behavior is undefined.
+.SH RETURN VALUE
+.LP
+The \fIiswlower\fP() function shall return non-zero if \fIwc\fP is
+a lowercase letter wide-character code; otherwise, it shall
+return 0.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+To ensure applications portability, especially across natural languages,
+only this function and those listed in the SEE ALSO
+section should be used for classification of wide-character codes.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIiswalnum\fP(), \fIiswalpha\fP(), \fIiswcntrl\fP(), \fIiswctype\fP(),
+\fIiswdigit\fP(), \fIiswgraph\fP(), \fIiswprint\fP(), \fIiswpunct\fP(),
+\fIiswspace\fP(), \fIiswupper\fP(), \fIiswxdigit\fP(), \fIsetlocale\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 7, Locale, \fI<wchar.h>\fP, \fI<wctype.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/iswprint.3p b/man-pages-posix-2003/man3p/iswprint.3p
new file mode 100644
index 0000000..3f4a4db
--- /dev/null
+++ b/man-pages-posix-2003/man3p/iswprint.3p
@@ -0,0 +1,71 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISWPRINT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" iswprint
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+iswprint \- test for a printable wide-character code
+.SH SYNOPSIS
+.LP
+\fB#include <wctype.h>
+.br
+.sp
+int iswprint(wint_t\fP \fIwc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIiswprint\fP() function shall test whether \fIwc\fP is a wide-character
+code representing a character of class
+\fBprint\fP in the program's current locale; see the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 7, Locale.
+.LP
+The \fIwc\fP argument is a \fBwint_t\fP, the value of which the application
+shall ensure is a wide-character code
+corresponding to a valid character in the current locale, or equal
+to the value of the macro WEOF. If the argument has any other
+value, the behavior is undefined.
+.SH RETURN VALUE
+.LP
+The \fIiswprint\fP() function shall return non-zero if \fIwc\fP is
+a printable wide-character code; otherwise, it shall return
+0.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+To ensure applications portability, especially across natural languages,
+only this function and those listed in the SEE ALSO
+section should be used for classification of wide-character codes.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIiswalnum\fP(), \fIiswalpha\fP(), \fIiswcntrl\fP(), \fIiswctype\fP(),
+\fIiswdigit\fP(), \fIiswgraph\fP(), \fIiswlower\fP(), \fIiswpunct\fP(),
+\fIiswspace\fP(), \fIiswupper\fP(), \fIiswxdigit\fP(), \fIsetlocale\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 7, Locale, \fI<wchar.h>\fP, \fI<wctype.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/iswpunct.3p b/man-pages-posix-2003/man3p/iswpunct.3p
new file mode 100644
index 0000000..fbc3de3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/iswpunct.3p
@@ -0,0 +1,71 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISWPUNCT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" iswpunct
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+iswpunct \- test for a punctuation wide-character code
+.SH SYNOPSIS
+.LP
+\fB#include <wctype.h>
+.br
+.sp
+int iswpunct(wint_t\fP \fIwc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIiswpunct\fP() function shall test whether \fIwc\fP is a wide-character
+code representing a character of class
+\fBpunct\fP in the program's current locale; see the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 7, Locale.
+.LP
+The \fIwc\fP argument is a \fBwint_t\fP, the value of which the application
+shall ensure is a wide-character code
+corresponding to a valid character in the current locale, or equal
+to the value of the macro WEOF. If the argument has any other
+value, the behavior is undefined.
+.SH RETURN VALUE
+.LP
+The \fIiswpunct\fP() function shall return non-zero if \fIwc\fP is
+a punctuation wide-character code; otherwise, it shall
+return 0.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+To ensure applications portability, especially across natural languages,
+only this function and those listed in the SEE ALSO
+section should be used for classification of wide-character codes.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIiswalnum\fP(), \fIiswalpha\fP(), \fIiswcntrl\fP(), \fIiswctype\fP(),
+\fIiswdigit\fP(), \fIiswgraph\fP(), \fIiswlower\fP(), \fIiswprint\fP(),
+\fIiswspace\fP(), \fIiswupper\fP(), \fIiswxdigit\fP(), \fIsetlocale\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 7, Locale, \fI<wchar.h>\fP, \fI<wctype.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/iswspace.3p b/man-pages-posix-2003/man3p/iswspace.3p
new file mode 100644
index 0000000..391688b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/iswspace.3p
@@ -0,0 +1,71 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISWSPACE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" iswspace
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+iswspace \- test for a white-space wide-character code
+.SH SYNOPSIS
+.LP
+\fB#include <wctype.h>
+.br
+.sp
+int iswspace(wint_t\fP \fIwc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIiswspace\fP() function shall test whether \fIwc\fP is a wide-character
+code representing a character of class
+\fBspace\fP in the program's current locale; see the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 7, Locale.
+.LP
+The \fIwc\fP argument is a \fBwint_t\fP, the value of which the application
+shall ensure is a wide-character code
+corresponding to a valid character in the current locale, or equal
+to the value of the macro WEOF. If the argument has any other
+value, the behavior is undefined.
+.SH RETURN VALUE
+.LP
+The \fIiswspace\fP() function shall return non-zero if \fIwc\fP is
+a white-space wide-character code; otherwise, it shall
+return 0.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+To ensure applications portability, especially across natural languages,
+only this function and those listed in the SEE ALSO
+section should be used for classification of wide-character codes.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIiswalnum\fP(), \fIiswalpha\fP(), \fIiswcntrl\fP(), \fIiswctype\fP(),
+\fIiswdigit\fP(), \fIiswgraph\fP(), \fIiswlower\fP(), \fIiswprint\fP(),
+\fIiswpunct\fP(), \fIiswupper\fP(), \fIiswxdigit\fP(), \fIsetlocale\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 7, Locale, \fI<wchar.h>\fP, \fI<wctype.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/iswupper.3p b/man-pages-posix-2003/man3p/iswupper.3p
new file mode 100644
index 0000000..f3c2634
--- /dev/null
+++ b/man-pages-posix-2003/man3p/iswupper.3p
@@ -0,0 +1,71 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISWUPPER" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" iswupper
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+iswupper \- test for an uppercase letter wide-character code
+.SH SYNOPSIS
+.LP
+\fB#include <wctype.h>
+.br
+.sp
+int iswupper(wint_t\fP \fIwc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIiswupper\fP() function shall test whether \fIwc\fP is a wide-character
+code representing a character of class
+\fBupper\fP in the program's current locale; see the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 7, Locale.
+.LP
+The \fIwc\fP argument is a \fBwint_t\fP, the value of which the application
+shall ensure is a wide-character code
+corresponding to a valid character in the current locale, or equal
+to the value of the macro WEOF. If the argument has any other
+value, the behavior is undefined.
+.SH RETURN VALUE
+.LP
+The \fIiswupper\fP() function shall return non-zero if \fIwc\fP is
+an uppercase letter wide-character code; otherwise, it
+shall return 0.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+To ensure applications portability, especially across natural languages,
+only this function and those listed in the SEE ALSO
+section should be used for classification of wide-character codes.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIiswalnum\fP(), \fIiswalpha\fP(), \fIiswcntrl\fP(), \fIiswctype\fP(),
+\fIiswdigit\fP(), \fIiswgraph\fP(), \fIiswlower\fP(), \fIiswprint\fP(),
+\fIiswpunct\fP(), \fIiswspace\fP(), \fIiswxdigit\fP(), \fIsetlocale\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 7, Locale, \fI<wchar.h>\fP, \fI<wctype.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/iswxdigit.3p b/man-pages-posix-2003/man3p/iswxdigit.3p
new file mode 100644
index 0000000..0cb4d56
--- /dev/null
+++ b/man-pages-posix-2003/man3p/iswxdigit.3p
@@ -0,0 +1,71 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISWXDIGIT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" iswxdigit
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+iswxdigit \- test for a hexadecimal digit wide-character code
+.SH SYNOPSIS
+.LP
+\fB#include <wctype.h>
+.br
+.sp
+int iswxdigit(wint_t\fP \fIwc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIiswxdigit\fP() function shall test whether \fIwc\fP is a wide-character
+code representing a character of class
+\fBxdigit\fP in the program's current locale; see the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 7, Locale.
+.LP
+The \fIwc\fP argument is a \fBwint_t\fP, the value of which the application
+shall ensure is a wide-character code
+corresponding to a valid character in the current locale, or equal
+to the value of the macro WEOF. If the argument has any other
+value, the behavior is undefined.
+.SH RETURN VALUE
+.LP
+The \fIiswxdigit\fP() function shall return non-zero if \fIwc\fP is
+a hexadecimal digit wide-character code; otherwise, it
+shall return 0.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+To ensure applications portability, especially across natural languages,
+only this function and those listed in the SEE ALSO
+section should be used for classification of wide-character codes.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIiswalnum\fP(), \fIiswalpha\fP(), \fIiswcntrl\fP(), \fIiswctype\fP(),
+\fIiswdigit\fP(), \fIiswgraph\fP(), \fIiswlower\fP(), \fIiswprint\fP(),
+\fIiswpunct\fP(), \fIiswspace\fP(), \fIiswupper\fP(), \fIsetlocale\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 7, Locale, \fI<wchar.h>\fP, \fI<wctype.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/isxdigit.3p b/man-pages-posix-2003/man3p/isxdigit.3p
new file mode 100644
index 0000000..398b9f7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/isxdigit.3p
@@ -0,0 +1,71 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISXDIGIT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" isxdigit
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+isxdigit \- test for a hexadecimal digit
+.SH SYNOPSIS
+.LP
+\fB#include <ctype.h>
+.br
+.sp
+int isxdigit(int\fP \fIc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIisxdigit\fP() function shall test whether \fIc\fP is a character
+of class \fBxdigit\fP in the program's current
+locale; see the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 7,
+Locale.
+.LP
+The \fIc\fP argument is an \fBint\fP, the value of which the application
+shall ensure is a character representable as an
+\fBunsigned char\fP or equal to the value of the macro EOF. If the
+argument has any other value, the behavior is undefined.
+.SH RETURN VALUE
+.LP
+The \fIisxdigit\fP() function shall return non-zero if \fIc\fP is
+a hexadecimal digit; otherwise, it shall return 0.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+To ensure applications portability, especially across natural languages,
+only this function and those listed in the SEE ALSO
+section should be used for character classification.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIisalnum\fP(), \fIisalpha\fP(), \fIiscntrl\fP(), \fIisdigit\fP(),
+\fIisgraph\fP(),
+\fIislower\fP(), \fIisprint\fP(), \fIispunct\fP(), \fIisspace\fP(),
+\fIisupper\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 7,
+Locale, \fI<ctype.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/j0.3p b/man-pages-posix-2003/man3p/j0.3p
new file mode 100644
index 0000000..2d7143f
--- /dev/null
+++ b/man-pages-posix-2003/man3p/j0.3p
@@ -0,0 +1,93 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "J0" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" j0
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+j0, j1, jn \- Bessel functions of the first kind
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double j0(double\fP \fIx\fP\fB);
+.br
+double j1(double\fP \fIx\fP\fB);
+.br
+double jn(int\fP \fIn\fP\fB, double\fP \fIx\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIj0\fP(), \fIj1\fP(), and \fIjn\fP() functions shall compute
+Bessel functions of \fIx\fP of the first kind of orders
+0, 1, and \fIn\fP, respectively.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the relevant
+Bessel value of \fIx\fP of the first kind.
+.LP
+If the \fIx\fP argument is too large in magnitude, or the correct
+result would cause underflow, 0 shall be returned and a range
+error may occur.
+.LP
+If \fIx\fP is NaN, a NaN shall be returned.
+.SH ERRORS
+.LP
+These functions may fail if:
+.TP 7
+Range\ Error
+The value of \fIx\fP was too large in magnitude, or an underflow occurred.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the underflow floating-point exception shall be
+raised.
+.sp
+.LP
+No other errors shall occur.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIisnan\fP(), \fIy0\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment of Error Conditions
+for
+Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/j1.3p b/man-pages-posix-2003/man3p/j1.3p
new file mode 100644
index 0000000..dec50d0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/j1.3p
@@ -0,0 +1 @@
+.so man3p/j0.3p
diff --git a/man-pages-posix-2003/man3p/jn.3p b/man-pages-posix-2003/man3p/jn.3p
new file mode 100644
index 0000000..dec50d0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/jn.3p
@@ -0,0 +1 @@
+.so man3p/j0.3p
diff --git a/man-pages-posix-2003/man3p/jrand48.3p b/man-pages-posix-2003/man3p/jrand48.3p
new file mode 100644
index 0000000..a71d5ed
--- /dev/null
+++ b/man-pages-posix-2003/man3p/jrand48.3p
@@ -0,0 +1 @@
+.so man3p/drand48.3p
diff --git a/man-pages-posix-2003/man3p/kill.3p b/man-pages-posix-2003/man3p/kill.3p
new file mode 100644
index 0000000..0e16a38
--- /dev/null
+++ b/man-pages-posix-2003/man3p/kill.3p
@@ -0,0 +1,211 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "KILL" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" kill
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+kill \- send a signal to a process or a group of processes
+.SH SYNOPSIS
+.LP
+\fB#include <signal.h>
+.br
+.sp
+int kill(pid_t\fP \fIpid\fP\fB, int\fP \fIsig\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIkill\fP() function shall send a signal to a process or a group
+of processes specified by \fIpid\fP. The signal to be
+sent is specified by \fIsig\fP and is either one from the list given
+in \fI<signal.h>\fP or 0. If \fIsig\fP is 0 (the null signal), error
+checking is performed but
+no signal is actually sent. The null signal can be used to check the
+validity of \fIpid\fP.
+.LP
+For a process to have permission to send a signal to a process designated
+by \fIpid\fP, unless the sending process has
+appropriate privileges, the real or effective user ID of the sending
+process shall match the real or saved set-user-ID of the
+receiving process.
+.LP
+If \fIpid\fP is greater than 0, \fIsig\fP shall be sent to the process
+whose process ID is equal to \fIpid\fP.
+.LP
+If \fIpid\fP is 0, \fIsig\fP shall be sent to all processes (excluding
+an unspecified set of system processes) whose process
+group ID is equal to the process group ID of the sender, and for which
+the process has permission to send a signal.
+.LP
+If \fIpid\fP is -1, \fIsig\fP shall be sent to all processes (excluding
+an unspecified set of system processes) for which the
+process has permission to send that signal.
+.LP
+If \fIpid\fP is negative, but not -1, \fIsig\fP shall be sent to all
+processes (excluding an unspecified set of system
+processes) whose process group ID is equal to the absolute value of
+\fIpid\fP, and for which the process has permission to send a
+signal.
+.LP
+If the value of \fIpid\fP causes \fIsig\fP to be generated for the
+sending process, and if \fIsig\fP is not blocked for the
+calling thread and if no other thread has \fIsig\fP unblocked or is
+waiting in a \fIsigwait\fP() function for \fIsig\fP, either \fIsig\fP
+or at least one pending unblocked
+signal shall be delivered to the sending thread before \fIkill\fP()
+returns.
+.LP
+The user ID tests described above shall not be applied when sending
+SIGCONT to a process that is a member of the same session as
+the sending process.
+.LP
+An implementation that provides extended security controls may impose
+further implementation-defined restrictions on the sending
+of signals, including the null signal. In particular, the system may
+deny the existence of some or all of the processes specified
+by \fIpid\fP.
+.LP
+The \fIkill\fP() function is successful if the process has permission
+to send \fIsig\fP to any of the processes specified by
+\fIpid\fP. If \fIkill\fP() fails, no signal shall be sent.
+.SH RETURN VALUE
+.LP
+Upon successful completion, 0 shall be returned. Otherwise, -1 shall
+be returned and \fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fIkill\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The value of the \fIsig\fP argument is an invalid or unsupported signal
+number.
+.TP 7
+.B EPERM
+The process does not have permission to send the signal to any receiving
+process.
+.TP 7
+.B ESRCH
+No process or process group can be found corresponding to that specified
+by \fIpid\fP.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The semantics for permission checking for \fIkill\fP() differed between
+System V and most other implementations, such as
+Version 7 or 4.3 BSD. The semantics chosen for this volume of IEEE\ Std\ 1003.1-2001
+agree with System V. Specifically, a
+set-user-ID process cannot protect itself against signals (or at least
+not against SIGKILL) unless it changes its real user ID.
+This choice allows the user who starts an application to send it signals
+even if it changes its effective user ID. The other
+semantics give more power to an application that wants to protect
+itself from the user who ran it.
+.LP
+Some implementations provide semantic extensions to the \fIkill\fP()
+function when the absolute value of \fIpid\fP is greater
+than some maximum, or otherwise special, value. Negative values are
+a flag to \fIkill\fP(). Since most implementations return
+[ESRCH] in this case, this behavior is not included in this volume
+of IEEE\ Std\ 1003.1-2001, although a conforming
+implementation could provide such an extension.
+.LP
+The implementation-defined processes to which a signal cannot be sent
+may include the scheduler or \fIinit\fP.
+.LP
+There was initially strong sentiment to specify that, if \fIpid\fP
+specifies that a signal be sent to the calling process and
+that signal is not blocked, that signal would be delivered before
+\fIkill\fP() returns. This would permit a process to call
+\fIkill\fP() and be guaranteed that the call never return. However,
+historical implementations that provide only the \fIsignal\fP() function
+make only the weaker guarantee in this volume of
+IEEE\ Std\ 1003.1-2001, because they only deliver one signal each
+time a process enters the kernel. Modifications to such
+implementations to support the \fIsigaction\fP() function generally
+require entry to the
+kernel following return from a signal-catching function, in order
+to restore the signal mask. Such modifications have the effect of
+satisfying the stronger requirement, at least when \fIsigaction\fP()
+is used, but not
+necessarily when \fIsignal\fP() is used. The developers of this volume
+of
+IEEE\ Std\ 1003.1-2001 considered making the stronger requirement
+except when \fIsignal\fP() is used, but felt this would be unnecessarily
+complex. Implementors are encouraged
+to meet the stronger requirement whenever possible. In practice, the
+weaker requirement is the same, except in the rare case when
+two signals arrive during a very short window. This reasoning also
+applies to a similar requirement for \fIsigprocmask\fP().
+.LP
+In 4.2 BSD, the SIGCONT signal can be sent to any descendant process
+regardless of user-ID security checks. This allows a job
+control shell to continue a job even if processes in the job have
+altered their user IDs (as in the \fIsu\fP command). In keeping
+with the addition of the concept of sessions, similar functionality
+is provided by allowing the SIGCONT signal to be sent to any
+process in the same session regardless of user ID security checks.
+This is less restrictive than BSD in the sense that ancestor
+processes (in the same session) can now be the recipient. It is more
+restrictive than BSD in the sense that descendant processes
+that form new sessions are now subject to the user ID checks. A similar
+relaxation of security is not necessary for the other job
+control signals since those signals are typically sent by the terminal
+driver in recognition of special characters being typed; the
+terminal driver bypasses all security checks.
+.LP
+In secure implementations, a process may be restricted from sending
+a signal to a process having a different security label. In
+order to prevent the existence or nonexistence of a process from being
+used as a covert channel, such processes should appear
+nonexistent to the sender; that is, [ESRCH] should be returned, rather
+than [EPERM], if \fIpid\fP refers only to such
+processes.
+.LP
+Existing implementations vary on the result of a \fIkill\fP() with
+\fIpid\fP indicating an inactive process (a terminated
+process that has not been waited for by its parent). Some indicate
+success on such a call (subject to permission checking), while
+others give an error of [ESRCH]. Since the definition of process lifetime
+in this volume of IEEE\ Std\ 1003.1-2001 covers
+inactive processes, the [ESRCH] error as described is inappropriate
+in this case. In particular, this means that an application
+cannot have a parent process check for termination of a particular
+child with \fIkill\fP(). (Usually this is done with the null
+signal; this can be done reliably with \fIwaitpid\fP().)
+.LP
+There is some belief that the name \fIkill\fP() is misleading, since
+the function is not always intended to cause process
+termination. However, the name is common to all historical implementations,
+and any change would be in conflict with the goal of
+minimal changes to existing application code.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgetpid\fP(), \fIraise\fP(), \fIsetsid\fP(),
+\fIsigaction\fP(), \fIsigqueue\fP(), the Base Definitions volume
+of
+IEEE\ Std\ 1003.1-2001, \fI<signal.h>\fP, \fI<sys/types.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/killpg.3p b/man-pages-posix-2003/man3p/killpg.3p
new file mode 100644
index 0000000..fe8a1d3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/killpg.3p
@@ -0,0 +1,64 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "KILLPG" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" killpg
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+killpg \- send a signal to a process group
+.SH SYNOPSIS
+.LP
+\fB#include <signal.h>
+.br
+.sp
+int killpg(pid_t\fP \fIpgrp\fP\fB, int\fP \fIsig\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIkillpg\fP() function shall send the signal specified by \fIsig\fP
+to the process group specified by \fIpgrp\fP.
+.LP
+If \fIpgrp\fP is greater than 1, \fIkillpg\fP(\fIpgrp\fP,\ \fIsig\fP)
+shall be equivalent to
+\fIkill\fP(-\fIpgrp\fP,\ \fIsig\fP). If \fIpgrp\fP is less than or
+equal to 1, the behavior of \fIkillpg\fP() is
+undefined.
+.SH RETURN VALUE
+.LP
+Refer to \fIkill\fP().
+.SH ERRORS
+.LP
+Refer to \fIkill\fP().
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgetpgid\fP(), \fIgetpid\fP(), \fIkill\fP(),
+\fIraise\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<signal.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/l64a.3p b/man-pages-posix-2003/man3p/l64a.3p
new file mode 100644
index 0000000..282d4e0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/l64a.3p
@@ -0,0 +1 @@
+.so man3p/a64l.3p
diff --git a/man-pages-posix-2003/man3p/labs.3p b/man-pages-posix-2003/man3p/labs.3p
new file mode 100644
index 0000000..4fd8dc0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/labs.3p
@@ -0,0 +1,63 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "LABS" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" labs
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+labs, llabs \- return a long integer absolute value
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+long labs(long\fP \fIi\fP\fB);
+.br
+long long llabs(long long\fP \fIi\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIlabs\fP() function shall compute the absolute value of the
+\fBlong\fP integer operand \fIi\fP. The \fIllabs\fP()
+function shall compute the absolute value of the \fBlong long\fP integer
+operand \fIi\fP. If the result cannot be represented,
+the behavior is undefined.
+.SH RETURN VALUE
+.LP
+The \fIlabs\fP() function shall return the absolute value of the \fBlong\fP
+integer operand. The \fIlabs\fP() function shall
+return the absolute value of the \fBlong long\fP integer operand.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIabs\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/lchown.3p b/man-pages-posix-2003/man3p/lchown.3p
new file mode 100644
index 0000000..335e9b0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/lchown.3p
@@ -0,0 +1,145 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "LCHOWN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" lchown
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+lchown \- change the owner and group of a symbolic link
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+int lchown(const char *\fP\fIpath\fP\fB, uid_t\fP \fIowner\fP\fB,
+gid_t\fP \fIgroup\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIlchown\fP() function shall be equivalent to \fIchown\fP(),
+except in the case
+where the named file is a symbolic link. In this case, \fIlchown\fP()
+shall change the ownership of the symbolic link file itself,
+while \fIchown\fP() changes the ownership of the file or directory
+to which the symbolic
+link refers.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIlchown\fP() shall return 0. Otherwise,
+it shall return -1 and set \fIerrno\fP to indicate an
+error.
+.SH ERRORS
+.LP
+The \fIlchown\fP() function shall fail if:
+.TP 7
+.B EACCES
+Search permission is denied on a component of the path prefix of \fIpath\fP.
+.TP 7
+.B EINVAL
+The owner or group ID is not a value supported by the implementation.
+.TP 7
+.B ELOOP
+A loop exists in symbolic links encountered during resolution of the
+\fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+The length of a pathname exceeds {PATH_MAX} or a pathname component
+is longer than {NAME_MAX}.
+.TP 7
+.B ENOENT
+A component of \fIpath\fP does not name an existing file or \fIpath\fP
+is an empty string.
+.TP 7
+.B ENOTDIR
+A component of the path prefix of \fIpath\fP is not a directory.
+.TP 7
+.B EOPNOTSUPP
+The \fIpath\fP argument names a symbolic link and the implementation
+does not support setting the owner or group of a symbolic
+link.
+.TP 7
+.B EPERM
+The effective user ID does not match the owner of the file and the
+process does not have appropriate privileges.
+.TP 7
+.B EROFS
+The file resides on a read-only file system.
+.sp
+.LP
+The \fIlchown\fP() function may fail if:
+.TP 7
+.B EIO
+An I/O error occurred while reading or writing to the file system.
+.TP 7
+.B EINTR
+A signal was caught during execution of the function.
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the \fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+Pathname resolution of a symbolic link produced an intermediate result
+whose length exceeds {PATH_MAX}.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Changing the Current Owner of a File
+.LP
+The following example shows how to change the ownership of the symbolic
+link named \fB/modules/pass1\fP to the user ID
+associated with "jones" and the group ID associated with "cnd".
+.LP
+The numeric value for the user ID is obtained by using the \fIgetpwnam\fP()
+function.
+The numeric value for the group ID is obtained by using the \fIgetgrnam\fP()
+function.
+.sp
+.RS
+.nf
+
+\fB#include <sys/types.h>
+#include <unistd.h>
+#include <pwd.h>
+#include <grp.h>
+.sp
+
+struct passwd *pwd;
+struct group *grp;
+char *path = "/modules/pass1";
+\&...
+pwd = getpwnam("jones");
+grp = getgrnam("cnd");
+lchown(path, pwd->pw_uid, grp->gr_gid);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+On implementations which support symbolic links as directory entries
+rather than files, \fIlchown\fP() may fail.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIchown\fP(), \fIsymlink\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/lcong48.3p b/man-pages-posix-2003/man3p/lcong48.3p
new file mode 100644
index 0000000..a71d5ed
--- /dev/null
+++ b/man-pages-posix-2003/man3p/lcong48.3p
@@ -0,0 +1 @@
+.so man3p/drand48.3p
diff --git a/man-pages-posix-2003/man3p/ldexp.3p b/man-pages-posix-2003/man3p/ldexp.3p
new file mode 100644
index 0000000..dc5f780
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ldexp.3p
@@ -0,0 +1,115 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "LDEXP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ldexp
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ldexp, ldexpf, ldexpl \- load exponent of a floating-point number
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double ldexp(double\fP \fIx\fP\fB, int\fP \fIexp\fP\fB);
+.br
+float ldexpf(float\fP \fIx\fP\fB, int\fP \fIexp\fP\fB);
+.br
+long double ldexpl(long double\fP \fIx\fP\fB, int\fP \fIexp\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the quantity \fIx\fP\ *\ 2**\fIexp\fP.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return \fIx\fP multiplied
+by 2, raised to the power \fIexp\fP.
+.LP
+If these functions would cause overflow, a range error shall occur
+and \fIldexp\fP(), \fIldexpf\fP(), and \fIldexpl\fP()
+shall return \(+-HUGE_VAL, \(+-HUGE_VALF, and \(+-HUGE_VALL (according
+to the sign of \fIx\fP), respectively.
+.LP
+If the correct value would cause underflow, and is not representable,
+a range error may occur, and either 0.0 (if
+supported), or an implementation-defined value shall be
+returned.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is \(+-0 or \(+-Inf, \fIx\fP shall be returned.
+.LP
+If \fIexp\fP is 0, \fIx\fP shall be returned.
+.LP
+If the correct value would cause underflow, and is representable,
+a range error may occur and the correct value shall be
+returned.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Range\ Error
+The result overflows.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the overflow floating-point exception shall be
+raised.
+.sp
+.LP
+These functions may fail if:
+.TP 7
+Range\ Error
+The result underflows.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the underflow floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIfrexp\fP(), \fIisnan\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment of Error Conditions
+for
+Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/ldexpf.3p b/man-pages-posix-2003/man3p/ldexpf.3p
new file mode 100644
index 0000000..0596e2c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ldexpf.3p
@@ -0,0 +1 @@
+.so man3p/ldexp.3p
diff --git a/man-pages-posix-2003/man3p/ldexpl.3p b/man-pages-posix-2003/man3p/ldexpl.3p
new file mode 100644
index 0000000..0596e2c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ldexpl.3p
@@ -0,0 +1 @@
+.so man3p/ldexp.3p
diff --git a/man-pages-posix-2003/man3p/ldiv.3p b/man-pages-posix-2003/man3p/ldiv.3p
new file mode 100644
index 0000000..53f79a5
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ldiv.3p
@@ -0,0 +1,89 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "LDIV" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ldiv
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ldiv, lldiv \- compute quotient and remainder of a long division
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+ldiv_t ldiv(long\fP \fInumer\fP\fB, long\fP \fIdenom\fP\fB);
+.br
+lldiv_t lldiv(long long\fP \fInumer\fP\fB, long long\fP \fIdenom\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the quotient and remainder of the division
+of the numerator \fInumer\fP by the denominator
+\fIdenom\fP. If the division is inexact, the resulting quotient is
+the \fBlong\fP integer (for the \fIldiv\fP() function) or
+\fBlong long\fP integer (for the \fIlldiv\fP() function) of lesser
+magnitude that is the nearest to the algebraic quotient. If
+the result cannot be represented, the behavior is undefined; otherwise,
+\fIquot\fP\ *\ \fIdenom\fP+\fIrem\fP shall equal
+\fInumer\fP.
+.SH RETURN VALUE
+.LP
+The \fIldiv\fP() function shall return a structure of type \fBldiv_t\fP,
+comprising both the quotient and the remainder. The
+structure shall include the following members, in any order:
+.sp
+.RS
+.nf
+
+\fBlong quot; /* Quotient */
+long rem; /* Remainder */
+\fP
+.fi
+.RE
+.LP
+The \fIlldiv\fP() function shall return a structure of type \fBlldiv_t\fP,
+comprising both the quotient and the remainder. The
+structure shall include the following members, in any order:
+.sp
+.RS
+.nf
+
+\fBlong long quot; /* Quotient */
+long long rem; /* Remainder */
+\fP
+.fi
+.RE
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIdiv\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/lfind.3p b/man-pages-posix-2003/man3p/lfind.3p
new file mode 100644
index 0000000..0ee9f84
--- /dev/null
+++ b/man-pages-posix-2003/man3p/lfind.3p
@@ -0,0 +1 @@
+.so man3p/lsearch.3p
diff --git a/man-pages-posix-2003/man3p/lgamma.3p b/man-pages-posix-2003/man3p/lgamma.3p
new file mode 100644
index 0000000..ca80e03
--- /dev/null
+++ b/man-pages-posix-2003/man3p/lgamma.3p
@@ -0,0 +1,123 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "LGAMMA" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" lgamma
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+lgamma, lgammaf, lgammal \- log gamma function
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double lgamma(double\fP \fIx\fP\fB);
+.br
+float lgammaf(float\fP \fIx\fP\fB);
+.br
+long double lgammal(long double\fP \fIx\fP\fB);
+.br
+\fP
+.LP
+\fBextern int signgam; \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute
+.sp
+.sp
+The argument \fIx\fP need not be a non-positive integer (Gamma(x)
+is defined over the reals,
+except the non-positive integers).
+.LP
+The sign of Gamma(x) is returned in the external integer \fIsigngam\fP.
+.LP
+These functions need not be reentrant. A function that is not required
+to be reentrant is not required to be thread-safe.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the logarithmic
+gamma of \fIx\fP.
+.LP
+If \fIx\fP is a non-positive integer, a pole error shall occur and
+\fIlgamma\fP(), \fIlgammaf\fP(), and \fIlgammal\fP()
+shall return +HUGE_VAL, +HUGE_VALF, and +HUGE_VALL, respectively.
+.LP
+If the correct value would cause overflow, a range error shall occur
+and \fIlgamma\fP(), \fIlgammaf\fP(), and \fIlgammal\fP()
+shall return \(+-HUGE_VAL, \(+-HUGE_VALF, and \(+-HUGE_VALL (having
+the same sign as the correct value),
+respectively.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is 1 or 2, +0 shall be returned.
+.LP
+If \fIx\fP is \(+-Inf, +Inf shall be returned.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Pole\ Error
+The \fIx\fP argument is a negative integer or zero.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the divide-by-zero floating-point exception shall be
+raised.
+.TP 7
+Range\ Error
+The result overflows.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the overflow floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexp\fP(), \fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIisnan\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment of Error Conditions
+for
+Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/lgammaf.3p b/man-pages-posix-2003/man3p/lgammaf.3p
new file mode 100644
index 0000000..b17905e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/lgammaf.3p
@@ -0,0 +1 @@
+.so man3p/lgamma.3p
diff --git a/man-pages-posix-2003/man3p/lgammal.3p b/man-pages-posix-2003/man3p/lgammal.3p
new file mode 100644
index 0000000..b17905e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/lgammal.3p
@@ -0,0 +1 @@
+.so man3p/lgamma.3p
diff --git a/man-pages-posix-2003/man3p/link.3p b/man-pages-posix-2003/man3p/link.3p
new file mode 100644
index 0000000..360dd17
--- /dev/null
+++ b/man-pages-posix-2003/man3p/link.3p
@@ -0,0 +1,207 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "LINK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" link
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+link \- link to a file
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+int link(const char *\fP\fIpath1\fP\fB, const char *\fP\fIpath2\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIlink\fP() function shall create a new link (directory entry)
+for the existing file, \fIpath1\fP.
+.LP
+The \fIpath1\fP argument points to a pathname naming an existing file.
+The \fIpath2\fP argument points to a pathname naming
+the new directory entry to be created. The \fIlink\fP() function shall
+atomically create a new link for the existing file and the
+link count of the file shall be incremented by one.
+.LP
+If \fIpath1\fP names a directory, \fIlink\fP() shall fail unless the
+process has appropriate privileges and the implementation
+supports using \fIlink\fP() on directories.
+.LP
+Upon successful completion, \fIlink\fP() shall mark for update the
+\fIst_ctime\fP field of the file. Also, the \fIst_ctime\fP
+and \fIst_mtime\fP fields of the directory that contains the new entry
+shall be marked for update.
+.LP
+If \fIlink\fP() fails, no link shall be created and the link count
+of the file shall remain unchanged.
+.LP
+The implementation may require that the calling process has permission
+to access the existing file.
+.SH RETURN VALUE
+.LP
+Upon successful completion, 0 shall be returned. Otherwise, -1 shall
+be returned and \fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fIlink\fP() function shall fail if:
+.TP 7
+.B EACCES
+A component of either path prefix denies search permission, or the
+requested link requires writing in a directory that denies
+write permission, or the calling process does not have permission
+to access the existing file and this is required by the
+implementation.
+.TP 7
+.B EEXIST
+The \fIpath2\fP argument resolves to an existing file or refers to
+a symbolic link.
+.TP 7
+.B ELOOP
+A loop exists in symbolic links encountered during resolution of the
+\fIpath1\fP or \fIpath2\fP argument.
+.TP 7
+.B EMLINK
+The number of links to the file named by \fIpath1\fP would exceed
+{LINK_MAX}.
+.TP 7
+.B ENAMETOOLONG
+The length of the \fIpath1\fP or \fIpath2\fP argument exceeds {PATH_MAX}
+or a pathname component is longer than {NAME_MAX}.
+.TP 7
+.B ENOENT
+A component of either path prefix does not exist; the file named by
+\fIpath1\fP does not exist; or \fIpath1\fP or
+\fIpath2\fP points to an empty string.
+.TP 7
+.B ENOSPC
+The directory to contain the link cannot be extended.
+.TP 7
+.B ENOTDIR
+A component of either path prefix is not a directory.
+.TP 7
+.B EPERM
+The file named by \fIpath1\fP is a directory and either the calling
+process does not have appropriate privileges or the
+implementation prohibits using \fIlink\fP() on directories.
+.TP 7
+.B EROFS
+The requested link requires writing in a directory on a read-only
+file system.
+.TP 7
+.B EXDEV
+The link named by \fIpath2\fP and the file named by \fIpath1\fP are
+on different file systems and the implementation does not
+support links between file systems.
+.TP 7
+.B EXDEV
+\fIpath1\fP refers to a named STREAM.
+.sp
+.LP
+The \fIlink\fP() function may fail if:
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the \fIpath1\fP or \fIpath2\fP argument.
+.TP 7
+.B ENAMETOOLONG
+As a result of encountering a symbolic link in resolution of the \fIpath1\fP
+or \fIpath2\fP argument, the length of the
+substituted pathname string exceeded {PATH_MAX}.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Creating a Link to a File
+.LP
+The following example shows how to create a link to a file named \fB/home/cnd/mod1\fP
+by creating a new directory entry named
+\fB/modules/pass1\fP.
+.sp
+.RS
+.nf
+
+\fB#include <unistd.h>
+.sp
+
+char *path1 = "/home/cnd/mod1";
+char *path2 = "/modules/pass1";
+int status;
+\&...
+status = link (path1, path2);
+\fP
+.fi
+.RE
+.SS Creating a Link to a File Within a Program
+.LP
+In the following program example, the \fIlink\fP() function links
+the \fB/etc/passwd\fP file (defined as \fBPASSWDFILE\fP) to
+a file named \fB/etc/opasswd\fP (defined as \fBSAVEFILE\fP), which
+is used to save the current password file. Then, after
+removing the current password file (defined as \fBPASSWDFILE\fP),
+the new password file is saved as the current password file
+using the \fIlink\fP() function again.
+.sp
+.RS
+.nf
+
+\fB#include <unistd.h>
+.sp
+
+#define LOCKFILE "/etc/ptmp"
+#define PASSWDFILE "/etc/passwd"
+#define SAVEFILE "/etc/opasswd"
+\&...
+/* Save current password file */
+link (PASSWDFILE, SAVEFILE);
+.sp
+
+/* Remove current password file. */
+unlink (PASSWDFILE);
+.sp
+
+/* Save new password file as current password file. */
+link (LOCKFILE,PASSWDFILE);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+Some implementations do allow links between file systems.
+.SH RATIONALE
+.LP
+Linking to a directory is restricted to the superuser in most historical
+implementations because this capability may produce
+loops in the file hierarchy or otherwise corrupt the file system.
+This volume of IEEE\ Std\ 1003.1-2001 continues that
+philosophy by prohibiting \fIlink\fP() and \fIunlink\fP() from doing
+this. Other functions
+could do it if the implementor designed such an extension.
+.LP
+Some historical implementations allow linking of files on different
+file systems. Wording was added to explicitly allow this
+optional behavior.
+.LP
+The exception for cross-file system links is intended to apply only
+to links that are programmatically indistinguishable from
+"hard" links.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsymlink\fP(), \fIunlink\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/lio_listio.3p b/man-pages-posix-2003/man3p/lio_listio.3p
new file mode 100644
index 0000000..688f2b6
--- /dev/null
+++ b/man-pages-posix-2003/man3p/lio_listio.3p
@@ -0,0 +1,230 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "LIO_LISTIO" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" lio_listio
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+lio_listio \- list directed I/O (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <aio.h>
+.br
+.sp
+int lio_listio(int\fP \fImode\fP\fB, struct aiocb *restrict const\fP
+\fIlist\fP\fB[restrict],
+.br
+\ \ \ \ \ \ int\fP \fInent\fP\fB, struct sigevent *restrict\fP \fIsig\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIlio_listio\fP() function shall initiate a list of I/O requests
+with a single function call.
+.LP
+The \fImode\fP argument takes one of the values LIO_WAIT or LIO_NOWAIT
+declared in \fI<aio.h>\fP and determines whether the function returns
+when the I/O operations have been
+completed, or as soon as the operations have been queued. If the \fImode\fP
+argument is LIO_WAIT, the function shall wait until
+all I/O is complete and the \fIsig\fP argument shall be ignored.
+.LP
+If the \fImode\fP argument is LIO_NOWAIT, the function shall return
+immediately, and asynchronous notification shall occur,
+according to the \fIsig\fP argument, when all the I/O operations complete.
+If \fIsig\fP is NULL, then no asynchronous
+notification shall occur. If \fIsig\fP is not NULL, asynchronous notification
+occurs as specified in \fISignal Generation and Delivery\fP when all
+the requests in \fIlist\fP have
+completed.
+.LP
+The I/O requests enumerated by \fIlist\fP are submitted in an unspecified
+order.
+.LP
+The \fIlist\fP argument is an array of pointers to \fBaiocb\fP structures.
+The array contains \fInent\fP elements. The array
+may contain NULL elements, which shall be ignored.
+.LP
+The \fIaio_lio_opcode\fP field of each \fBaiocb\fP structure specifies
+the operation to be performed. The supported operations
+are LIO_READ, LIO_WRITE, and LIO_NOP; these symbols are defined in
+\fI<aio.h>\fP. The
+LIO_NOP operation causes the list entry to be ignored. If the \fIaio_lio_opcode\fP
+element is equal to LIO_READ, then an I/O
+operation is submitted as if by a call to \fIaio_read\fP() with the
+\fIaiocbp\fP equal
+to the address of the \fBaiocb\fP structure. If the \fIaio_lio_opcode\fP
+element is equal to LIO_WRITE, then an I/O operation is
+submitted as if by a call to \fIaio_write\fP() with the \fIaiocbp\fP
+equal to the
+address of the \fBaiocb\fP structure.
+.LP
+The \fIaio_fildes\fP member specifies the file descriptor on which
+the operation is to be performed.
+.LP
+The \fIaio_buf\fP member specifies the address of the buffer to or
+from which the data is transferred.
+.LP
+The \fIaio_nbytes\fP member specifies the number of bytes of data
+to be transferred.
+.LP
+The members of the \fBaiocb\fP structure further describe the I/O
+operation to be performed, in a manner identical to that of
+the corresponding \fBaiocb\fP structure when used by the \fIaio_read\fP()
+and \fIaio_write\fP() functions.
+.LP
+The \fInent\fP argument specifies how many elements are members of
+the list; that is, the length of the array.
+.LP
+The behavior of this function is altered according to the definitions
+of synchronized I/O data integrity completion and
+synchronized I/O file integrity completion if synchronized I/O is
+enabled on the file associated with \fIaio_fildes\fP.
+.LP
+For regular files, no data transfer shall occur past the offset maximum
+established in the open file description associated with
+\fIaiocbp\fP->\fIaio_fildes\fP.
+.SH RETURN VALUE
+.LP
+If the \fImode\fP argument has the value LIO_NOWAIT, the \fIlio_listio\fP()
+function shall return the value zero if the I/O
+operations are successfully queued; otherwise, the function shall
+return the value -1 and set \fIerrno\fP to indicate the
+error.
+.LP
+If the \fImode\fP argument has the value LIO_WAIT, the \fIlio_listio\fP()
+function shall return the value zero when all the
+indicated I/O has completed successfully. Otherwise, \fIlio_listio\fP()
+shall return a value of -1 and set \fIerrno\fP to
+indicate the error.
+.LP
+In either case, the return value only indicates the success or failure
+of the \fIlio_listio\fP() call itself, not the status of
+the individual I/O requests. In some cases one or more of the I/O
+requests contained in the list may fail. Failure of an individual
+request does not prevent completion of any other individual request.
+To determine the outcome of each I/O request, the application
+shall examine the error status associated with each \fBaiocb\fP control
+block. The error statuses so returned are identical to
+those returned as the result of an \fIaio_read\fP() or \fIaio_write\fP()
+function.
+.SH ERRORS
+.LP
+The \fIlio_listio\fP() function shall fail if:
+.TP 7
+.B EAGAIN
+The resources necessary to queue all the I/O requests were not available.
+The application may check the error status for each
+\fBaiocb\fP to determine the individual request(s) that failed.
+.TP 7
+.B EAGAIN
+The number of entries indicated by \fInent\fP would cause the system-wide
+limit {AIO_MAX} to be exceeded.
+.TP 7
+.B EINVAL
+The \fImode\fP argument is not a proper value, or the value of \fInent\fP
+was greater than {AIO_LISTIO_MAX}.
+.TP 7
+.B EINTR
+A signal was delivered while waiting for all I/O requests to complete
+during an LIO_WAIT operation. Note that, since each I/O
+operation invoked by \fIlio_listio\fP() may possibly provoke a signal
+when it completes, this error return may be caused by the
+completion of one (or more) of the very I/O operations being awaited.
+Outstanding I/O requests are not canceled, and the
+application shall examine each list element to determine whether the
+request was initiated, canceled, or completed.
+.TP 7
+.B EIO
+One or more of the individual I/O operations failed. The application
+may check the error status for each \fBaiocb\fP structure
+to determine the individual request(s) that failed.
+.sp
+.LP
+In addition to the errors returned by the \fIlio_listio\fP() function,
+if the \fIlio_listio\fP() function succeeds or fails
+with errors of [EAGAIN], [EINTR], or [EIO], then some of the I/O specified
+by the list may have been initiated. If the
+\fIlio_listio\fP() function fails with an error code other than [EAGAIN],
+[EINTR], or [EIO], no operations from the list shall
+have been initiated. The I/O operation indicated by each list element
+can encounter errors specific to the individual read or write
+function being performed. In this event, the error status for each
+\fBaiocb\fP control block contains the associated error code.
+The error codes that can be set are the same as would be set by a
+\fIread\fP() or \fIwrite\fP() function, with the following additional
+error codes possible:
+.TP 7
+.B EAGAIN
+The requested I/O operation was not queued due to resource limitations.
+.TP 7
+.B ECANCELED
+The requested I/O was canceled before the I/O completed due to an
+explicit \fIaio_cancel\fP() request.
+.TP 7
+.B EFBIG
+The \fIaiocbp\fP->\fIaio_lio_opcode\fP is LIO_WRITE, the file is a
+regular file, \fIaiocbp\fP->\fIaio_nbytes\fP is
+greater than 0, and the \fIaiocbp\fP->\fIaio_offset\fP is greater
+than or equal to the offset maximum in the open file
+description associated with \fIaiocbp\fP->\fIaio_fildes\fP.
+.TP 7
+.B EINPROGRESS
+The requested I/O is in progress.
+.TP 7
+.B EOVERFLOW
+The \fIaiocbp\fP->\fIaio_lio_opcode\fP is LIO_READ, the file is a
+regular file, \fIaiocbp\fP->\fIaio_nbytes\fP is
+greater than 0, and the \fIaiocbp\fP->\fIaio_offset\fP is before the
+end-of-file and is greater than or equal to the offset
+maximum in the open file description associated with \fIaiocbp\fP->\fIaio_fildes\fP.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+Although it may appear that there are inconsistencies in the specified
+circumstances for error codes, the [EIO] error condition
+applies when any circumstance relating to an individual operation
+makes that operation fail. This might be due to a badly
+formulated request (for example, the \fIaio_lio_opcode\fP field is
+invalid, and \fIaio_error\fP() returns [EINVAL]) or might arise from
+application behavior (for example, the
+file descriptor is closed before the operation is initiated, and \fIaio_error\fP()
+returns [EBADF]).
+.LP
+The limitation on the set of error codes returned when operations
+from the list shall have been initiated enables applications
+to know when operations have been started and whether \fIaio_error\fP()
+is valid for a
+specific operation.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIaio_read\fP(), \fIaio_write\fP(), \fIaio_error\fP(), \fIaio_return\fP(),
+\fIaio_cancel\fP(), \fIclose\fP(), \fIexec\fP(), \fIexit\fP(),
+\fIfork\fP(), \fIlseek\fP(), \fIread\fP(), the Base Definitions
+volume of
+IEEE\ Std\ 1003.1-2001, \fI<aio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/listen.3p b/man-pages-posix-2003/man3p/listen.3p
new file mode 100644
index 0000000..840c74c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/listen.3p
@@ -0,0 +1,120 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "LISTEN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" listen
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+listen \- listen for socket connections and limit the queue of incoming
+connections
+.SH SYNOPSIS
+.LP
+\fB#include <sys/socket.h>
+.br
+.sp
+int listen(int\fP \fIsocket\fP\fB, int\fP \fIbacklog\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIlisten\fP() function shall mark a connection-mode socket, specified
+by the \fIsocket\fP argument, as accepting
+connections.
+.LP
+The \fIbacklog\fP argument provides a hint to the implementation which
+the implementation shall use to limit the number of
+outstanding connections in the socket's listen queue. Implementations
+may impose a limit on \fIbacklog\fP and silently reduce the
+specified value. Normally, a larger \fIbacklog\fP argument value shall
+result in a larger or equal length of the listen queue.
+Implementations shall support values of \fIbacklog\fP up to SOMAXCONN,
+defined in \fI<sys/socket.h>\fP.
+.LP
+The implementation may include incomplete connections in its listen
+queue. The limits on the number of incomplete connections
+and completed connections queued may be different.
+.LP
+The implementation may have an upper limit on the length of the listen
+queue-either global or per accepting socket. If
+\fIbacklog\fP exceeds this limit, the length of the listen queue is
+set to the limit.
+.LP
+If \fIlisten\fP() is called with a \fIbacklog\fP argument value that
+is less than 0, the function behaves as if it had been
+called with a \fIbacklog\fP argument value of 0.
+.LP
+A \fIbacklog\fP argument of 0 may allow the socket to accept connections,
+in which case the length of the listen queue may be
+set to an implementation-defined minimum value.
+.LP
+The socket in use may require the process to have appropriate privileges
+to use the \fIlisten\fP() function.
+.SH RETURN VALUE
+.LP
+Upon successful completions, \fIlisten\fP() shall return 0; otherwise,
+-1 shall be returned and \fIerrno\fP set to indicate
+the error.
+.SH ERRORS
+.LP
+The \fIlisten\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fIsocket\fP argument is not a valid file descriptor.
+.TP 7
+.B EDESTADDRREQ
+.sp
+The socket is not bound to a local address, and the protocol does
+not support listening on an unbound socket.
+.TP 7
+.B EINVAL
+The \fIsocket\fP is already connected.
+.TP 7
+.B ENOTSOCK
+The \fIsocket\fP argument does not refer to a socket.
+.TP 7
+.B EOPNOTSUPP
+The socket protocol does not support \fIlisten\fP().
+.sp
+.LP
+The \fIlisten\fP() function may fail if:
+.TP 7
+.B EACCES
+The calling process does not have the appropriate privileges.
+.TP 7
+.B EINVAL
+The \fIsocket\fP has been shut down.
+.TP 7
+.B ENOBUFS
+Insufficient resources are available in the system to complete the
+call.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIaccept\fP(), \fIconnect\fP(), \fIsocket\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<sys/socket.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/llabs.3p b/man-pages-posix-2003/man3p/llabs.3p
new file mode 100644
index 0000000..dfcca07
--- /dev/null
+++ b/man-pages-posix-2003/man3p/llabs.3p
@@ -0,0 +1 @@
+.so man3p/labs.3p
diff --git a/man-pages-posix-2003/man3p/lldiv.3p b/man-pages-posix-2003/man3p/lldiv.3p
new file mode 100644
index 0000000..ee66ba2
--- /dev/null
+++ b/man-pages-posix-2003/man3p/lldiv.3p
@@ -0,0 +1 @@
+.so man3p/ldiv.3p
diff --git a/man-pages-posix-2003/man3p/llrint.3p b/man-pages-posix-2003/man3p/llrint.3p
new file mode 100644
index 0000000..341b44c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/llrint.3p
@@ -0,0 +1,107 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "LLRINT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" llrint
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+llrint, llrintf, llrintl \- round to the nearest integer value using
+current rounding direction
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+long long llrint(double\fP \fIx\fP\fB);
+.br
+long long llrintf(float\fP \fIx\fP\fB);
+.br
+long long llrintl(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall round their argument to the nearest integer
+value, rounding according to the current rounding
+direction.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the rounded
+integer value.
+.LP
+If
+\fIx\fP is NaN, a domain error shall occur, and an unspecified value
+is returned.
+.LP
+If \fIx\fP is +Inf, a domain error shall occur and an unspecified
+value is returned.
+.LP
+If \fIx\fP is -Inf, a domain error shall occur and an unspecified
+value is returned.
+.LP
+If the correct value is positive and too large to represent as a \fBlong
+long\fP, a domain error shall occur and an unspecified
+value is returned.
+.LP
+If the correct value is negative and too large to represent as a \fBlong
+long\fP, a domain error shall occur and an unspecified
+value is returned.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Domain\ Error
+The \fIx\fP argument is NaN or \(+-Inf, or the correct value is not
+representable as an integer.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [EDOM]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the invalid floating-point exception shall be raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+These functions provide floating-to-integer conversions. They round
+according to the current rounding direction. If the rounded
+value is outside the range of the return type, the numeric result
+is unspecified and the invalid floating-point exception is
+raised. When they raise no other floating-point exception and the
+result differs from the argument, they raise the inexact
+floating-point exception.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIlrint\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment
+of Error Conditions for Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/llrintf.3p b/man-pages-posix-2003/man3p/llrintf.3p
new file mode 100644
index 0000000..8ae956f
--- /dev/null
+++ b/man-pages-posix-2003/man3p/llrintf.3p
@@ -0,0 +1 @@
+.so man3p/llrint.3p
diff --git a/man-pages-posix-2003/man3p/llrintl.3p b/man-pages-posix-2003/man3p/llrintl.3p
new file mode 100644
index 0000000..8ae956f
--- /dev/null
+++ b/man-pages-posix-2003/man3p/llrintl.3p
@@ -0,0 +1 @@
+.so man3p/llrint.3p
diff --git a/man-pages-posix-2003/man3p/llround.3p b/man-pages-posix-2003/man3p/llround.3p
new file mode 100644
index 0000000..5797737
--- /dev/null
+++ b/man-pages-posix-2003/man3p/llround.3p
@@ -0,0 +1,105 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "LLROUND" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" llround
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+llround, llroundf, llroundl \- round to nearest integer value
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+long long llround(double\fP \fIx\fP\fB);
+.br
+long long llroundf(float\fP \fIx\fP\fB);
+.br
+long long llroundl(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall round their argument to the nearest integer
+value, rounding halfway cases away from zero, regardless of
+the current rounding direction.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the rounded
+integer value.
+.LP
+If
+\fIx\fP is NaN, a domain error shall occur, and an unspecified value
+is returned.
+.LP
+If \fIx\fP is +Inf, a domain error shall occur and an unspecified
+value is returned.
+.LP
+If \fIx\fP is -Inf, a domain error shall occur and an unspecified
+value is returned.
+.LP
+If the correct value is positive and too large to represent as a \fBlong
+long\fP, a domain error shall occur and an unspecified
+value is returned.
+.LP
+If the correct value is negative and too large to represent as a \fBlong
+long\fP, a domain error shall occur and an unspecified
+value is returned.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Domain\ Error
+The \fIx\fP argument is NaN or \(+-Inf, or the correct value is not
+representable as an integer.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [EDOM]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the invalid floating-point exception shall be raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+These functions differ from the \fIllrint\fP() functions in that the
+default rounding
+direction for the \fIllround\fP() functions round halfway cases away
+from zero and need not raise the inexact floating-point
+exception for non-integer arguments that round to within the range
+of the return type.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIlround\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment
+of Error Conditions for Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/llroundf.3p b/man-pages-posix-2003/man3p/llroundf.3p
new file mode 100644
index 0000000..75555ac
--- /dev/null
+++ b/man-pages-posix-2003/man3p/llroundf.3p
@@ -0,0 +1 @@
+.so man3p/llround.3p
diff --git a/man-pages-posix-2003/man3p/llroundl.3p b/man-pages-posix-2003/man3p/llroundl.3p
new file mode 100644
index 0000000..75555ac
--- /dev/null
+++ b/man-pages-posix-2003/man3p/llroundl.3p
@@ -0,0 +1 @@
+.so man3p/llround.3p
diff --git a/man-pages-posix-2003/man3p/localeconv.3p b/man-pages-posix-2003/man3p/localeconv.3p
new file mode 100644
index 0000000..b72d5b6
--- /dev/null
+++ b/man-pages-posix-2003/man3p/localeconv.3p
@@ -0,0 +1,322 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "LOCALECONV" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" localeconv
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+localeconv \- return locale-specific information
+.SH SYNOPSIS
+.LP
+\fB#include <locale.h>
+.br
+.sp
+struct lconv *localeconv(void);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIlocaleconv\fP() function shall set the components of an object
+with the type \fBstruct lconv\fP with the values
+appropriate for the formatting of numeric quantities (monetary and
+otherwise) according to the rules of the current locale.
+.LP
+The members of the structure with type \fBchar *\fP are pointers to
+strings, any of which (except \fBdecimal_point\fP) can
+point to \fB""\fP, to indicate that the value is not available in
+the current locale or is of zero length. The members with
+type \fBchar\fP are non-negative numbers, any of which can be {CHAR_MAX}
+to indicate that the value is not available in the
+current locale.
+.LP
+The members include the following:
+.TP 7
+\fBchar\ *decimal_point\fP
+.sp
+The radix character used to format non-monetary quantities.
+.TP 7
+\fBchar\ *thousands_sep\fP
+.sp
+The character used to separate groups of digits before the decimal-point
+character in formatted non-monetary quantities.
+.TP 7
+\fBchar\ *grouping\fP
+.sp
+A string whose elements taken as one-byte integer values indicate
+the size of each group of digits in formatted non-monetary
+quantities.
+.TP 7
+\fBchar\ *int_curr_symbol\fP
+.sp
+The international currency symbol applicable to the current locale.
+The first three characters contain the alphabetic international
+currency symbol in accordance with those specified in the ISO\ 4217:1995
+standard. The fourth character (immediately preceding
+the null byte) is the character used to separate the international
+currency symbol from the monetary quantity.
+.TP 7
+\fBchar\ *currency_symbol\fP
+.sp
+The local currency symbol applicable to the current locale.
+.TP 7
+\fBchar\ *mon_decimal_point\fP
+.sp
+The radix character used to format monetary quantities.
+.TP 7
+\fBchar\ *mon_thousands_sep\fP
+.sp
+The separator for groups of digits before the decimal-point in formatted
+monetary quantities.
+.TP 7
+\fBchar\ *mon_grouping\fP
+.sp
+A string whose elements taken as one-byte integer values indicate
+the size of each group of digits in formatted monetary
+quantities.
+.TP 7
+\fBchar\ *positive_sign\fP
+.sp
+The string used to indicate a non-negative valued formatted monetary
+quantity.
+.TP 7
+\fBchar\ *negative_sign\fP
+.sp
+The string used to indicate a negative valued formatted monetary quantity.
+.TP 7
+\fBchar\ int_frac_digits\fP
+.sp
+The number of fractional digits (those after the decimal-point) to
+be displayed in an internationally formatted monetary
+quantity.
+.TP 7
+\fBchar\ frac_digits\fP
+.sp
+The number of fractional digits (those after the decimal-point) to
+be displayed in a formatted monetary quantity.
+.TP 7
+\fBchar\ p_cs_precedes\fP
+.sp
+Set to 1 if the \fBcurrency_symbol\fP precedes the value for a non-negative
+formatted monetary quantity. Set to 0 if the symbol
+succeeds the value.
+.TP 7
+\fBchar\ p_sep_by_space\fP
+.sp
+Set to a value indicating the separation of the \fBcurrency_symbol\fP,
+the sign string, and the value for a non-negative formatted
+monetary quantity.
+.TP 7
+\fBchar\ n_cs_precedes\fP
+.sp
+Set to 1 if the \fBcurrency_symbol\fP precedes the value for a negative
+formatted monetary quantity. Set to 0 if the symbol
+succeeds the value.
+.TP 7
+\fBchar\ n_sep_by_space\fP
+.sp
+Set to a value indicating the separation of the \fBcurrency_symbol\fP,
+the sign string, and the value for a negative formatted
+monetary quantity.
+.TP 7
+\fBchar\ p_sign_posn\fP
+.sp
+Set to a value indicating the positioning of the \fBpositive_sign\fP
+for a non-negative formatted monetary quantity.
+.TP 7
+\fBchar\ n_sign_posn\fP
+.sp
+Set to a value indicating the positioning of the \fBnegative_sign\fP
+for a negative formatted monetary quantity.
+.TP 7
+\fBchar\ int_p_cs_precedes\fP
+.sp
+Set to 1 or 0 if the \fBint_curr_symbol\fP respectively precedes or
+succeeds the value for a non-negative internationally
+formatted monetary quantity.
+.TP 7
+\fBchar\ int_n_cs_precedes\fP
+.sp
+Set to 1 or 0 if the \fBint_curr_symbol\fP respectively precedes or
+succeeds the value for a negative internationally formatted
+monetary quantity.
+.TP 7
+\fBchar\ int_p_sep_by_space\fP
+.sp
+Set to a value indicating the separation of the \fBint_curr_symbol\fP,
+the sign string, and the value for a non-negative
+internationally formatted monetary quantity.
+.TP 7
+\fBchar\ int_n_sep_by_space\fP
+.sp
+Set to a value indicating the separation of the \fBint_curr_symbol\fP,
+the sign string, and the value for a negative
+internationally formatted monetary quantity.
+.TP 7
+\fBchar\ int_p_sign_posn\fP
+.sp
+Set to a value indicating the positioning of the \fBpositive_sign\fP
+for a non-negative internationally formatted monetary
+quantity.
+.TP 7
+\fBchar\ int_n_sign_posn\fP
+.sp
+Set to a value indicating the positioning of the \fBnegative_sign\fP
+for a negative internationally formatted monetary
+quantity.
+.sp
+.LP
+The elements of \fBgrouping\fP and \fBmon_grouping\fP are interpreted
+according to the following:
+.TP 7
+{CHAR_MAX}
+No further grouping is to be performed.
+.TP 7
+0
+The previous element is to be repeatedly used for the remainder of
+the digits.
+.TP 7
+\fIother\fP
+The integer value is the number of digits that comprise the current
+group. The next element is examined to determine the size
+of the next group of digits before the current group.
+.sp
+.LP
+The values of \fBp_sep_by_space\fP, \fBn_sep_by_space\fP, \fBint_p_sep_by_space\fP,
+and \fBint_n_sep_by_space\fP are
+interpreted according to the following:
+.TP 7
+0
+No space separates the currency symbol and value.
+.TP 7
+1
+If the currency symbol and sign string are adjacent, a space separates
+them from the value; otherwise, a space separates the
+currency symbol from the value.
+.TP 7
+2
+If the currency symbol and sign string are adjacent, a space separates
+them; otherwise, a space separates the sign string from
+the value.
+.sp
+.LP
+For \fBint_p_sep_by_space\fP and \fBint_n_sep_by_space\fP, the fourth
+character of \fBint_curr_symbol\fP is used instead of a
+space.
+.LP
+The values of \fBp_sign_posn\fP, \fBn_sign_posn\fP, \fBint_p_sign_posn\fP,
+and \fBint_n_sign_posn\fP are interpreted
+according to the following:
+.TP 7
+0
+Parentheses surround the quantity and \fBcurrency_symbol\fP or \fBint_curr_symbol\fP.
+.TP 7
+1
+The sign string precedes the quantity and \fBcurrency_symbol\fP or
+\fBint_curr_symbol\fP.
+.TP 7
+2
+The sign string succeeds the quantity and \fBcurrency_symbol\fP or
+\fBint_curr_symbol\fP.
+.TP 7
+3
+The sign string immediately precedes the \fBcurrency_symbol\fP or
+\fBint_curr_symbol\fP.
+.TP 7
+4
+The sign string immediately succeeds the \fBcurrency_symbol\fP or
+\fBint_curr_symbol\fP.
+.sp
+.LP
+The implementation shall behave as if no function in this volume of
+IEEE\ Std\ 1003.1-2001 calls
+\fIlocaleconv\fP().
+.LP
+The
+\fIlocaleconv\fP() function need not be reentrant. A function that
+is not required to be reentrant is not required to be
+thread-safe.
+.SH RETURN VALUE
+.LP
+The \fIlocaleconv\fP() function shall return a pointer to the filled-in
+object. The application shall not modify the structure
+pointed to by the return value which may be overwritten by a subsequent
+call to \fIlocaleconv\fP(). In addition, calls to \fIsetlocale\fP()
+with the categories \fILC_ALL\fP, \fILC_MONETARY\fP, or \fILC_NUMERIC\fP
+may overwrite the contents of the structure.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The following table illustrates the rules which may be used by four
+countries to format monetary quantities.
+.TS C
+center; l1 l1 l1 l.
+\fBCountry\fP \fBPositive Format\fP \fBNegative Format\fP \fBInternational Format\fP
+Italy L.1.230 -L.1.230 ITL.1.230
+Netherlands F 1.234,56 F -1.234,56 NLG 1.234,56
+Norway kr1.234,56 kr1.234,56- NOK 1.234,56
+Switzerland SFrs.1,234.56 SFrs.1,234.56C CHF 1,234.56
+.TE
+.LP
+For these four countries, the respective values for the monetary members
+of the structure returned by \fIlocaleconv\fP()
+are:
+.TS C
+center; l2 l2 l2 l2 l.
+\fB\ \fP \fBItaly\fP \fBNetherlands\fP \fBNorway\fP \fBSwitzerland\fP
+\fBint_curr_symbol\fP "ITL." "NLG " "NOK " "CHF "
+\fBcurrency_symbol\fP "L." "F" "kr" "SFrs."
+\fBmon_decimal_point\fP "" "," "," "."
+\fBmon_thousands_sep\fP "." "." "." ","
+\fBmon_grouping\fP "\\3" "\\3" "\\3" "\\3"
+\fBpositive_sign\fP "" "" "" ""
+\fBnegative_sign\fP "-" "-" "-" "C"
+\fBint_frac_digits\fP 0 2 2 2
+\fBfrac_digits\fP 0 2 2 2
+\fBp_cs_precedes\fP 1 1 1 1
+\fBp_sep_by_space\fP 0 1 0 0
+\fBn_cs_precedes\fP 1 1 1 1
+\fBn_sep_by_space\fP 0 1 0 0
+\fBp_sign_posn\fP 1 1 1 1
+\fBn_sign_posn\fP 1 4 2 2
+\fBint_p_cs_precedes\fP 1 1 1 1
+\fBint_n_cs_precedes\fP 1 1 1 1
+\fBint_p_sep_by_space\fP 0 0 0 0
+\fBint_n_sep_by_space\fP 0 0 0 0
+\fBint_p_sign_posn\fP 1 1 1 1
+\fBint_n_sign_posn\fP 1 4 4 2
+.TE
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIisalpha\fP(), \fIisascii\fP(), \fInl_langinfo\fP(), \fIprintf\fP(),
+\fIscanf\fP(),
+\fIsetlocale\fP(), \fIstrcat\fP(), \fIstrchr\fP(), \fIstrcmp\fP(),
+\fIstrcoll\fP(), \fIstrcpy\fP(), \fIstrftime\fP(), \fIstrlen\fP(),
+\fIstrpbrk\fP(), \fIstrspn\fP(), \fIstrtok\fP(), \fIstrxfrm\fP(),
+\fIstrtod\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<langinfo.h>\fP,
+\fI<locale.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/localtime.3p b/man-pages-posix-2003/man3p/localtime.3p
new file mode 100644
index 0000000..8f4f1a6
--- /dev/null
+++ b/man-pages-posix-2003/man3p/localtime.3p
@@ -0,0 +1,205 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "LOCALTIME" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" localtime
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+localtime, localtime_r \- convert a time value to a broken-down local
+time
+.SH SYNOPSIS
+.LP
+\fB#include <time.h>
+.br
+.sp
+struct tm *localtime(const time_t *\fP\fItimer\fP\fB);
+.br
+\fP
+.LP
+\fBstruct tm *localtime_r(const time_t *restrict\fP \fItimer\fP\fB,
+.br
+\ \ \ \ \ \ struct tm *restrict\fP \fIresult\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+For \fIlocaltime\fP(): The functionality described on this reference
+page is aligned with the ISO\ C standard. Any
+conflict between the requirements described here and the ISO\ C standard
+is unintentional. This volume of
+IEEE\ Std\ 1003.1-2001 defers to the ISO\ C standard.
+.LP
+The \fIlocaltime\fP() function shall convert the time in seconds since
+the Epoch pointed to by \fItimer\fP into a broken-down
+time, expressed as a local time. The function corrects for the timezone
+and any seasonal time adjustments. Local timezone
+information is used as though \fIlocaltime\fP() calls \fItzset\fP().
+.LP
+The relationship between a time in seconds since the Epoch used as
+an argument to \fIlocaltime\fP() and the \fBtm\fP structure
+(defined in the \fI<time.h>\fP header) is that the result shall be
+as specified in the
+expression given in the definition of seconds since the Epoch (see
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Section 4.14, Seconds Since the Epoch) corrected for timezone and
+any seasonal
+time adjustments, where the names in the structure and in the expression
+correspond.
+.LP
+The same relationship shall apply for \fIlocaltime_r\fP().
+.LP
+The
+\fIlocaltime\fP() function need not be reentrant. A function that
+is not required to be reentrant is not required to be
+thread-safe.
+.LP
+The \fIasctime\fP(), \fIctime\fP(), \fIgmtime\fP(), and \fIlocaltime\fP()
+functions shall return values in one of two static objects:
+a broken-down time structure and an array of type \fBchar\fP. Execution
+of any of the functions may overwrite the information
+returned in either of these objects by any of the other functions.
+.LP
+The \fIlocaltime_r\fP() function shall convert the time in seconds
+since the Epoch pointed to by \fItimer\fP into a broken-down
+time stored in the structure to which \fIresult\fP points. The \fIlocaltime_r\fP()
+function shall also return a pointer to that
+same structure.
+.LP
+Unlike \fIlocaltime\fP(), the reentrant version is not required to
+set \fItzname\fP.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIlocaltime\fP() function shall return
+a pointer to the broken-down time structure. If an
+error is detected, \fIlocaltime\fP() shall return a null pointer
+\ and set \fIerrno\fP to indicate the error.
+.LP
+Upon successful completion, \fIlocaltime_r\fP() shall return a pointer
+to the structure pointed to by the argument \fIresult\fP.
+.SH ERRORS
+.LP
+The \fIlocaltime\fP() function shall fail if:
+.TP 7
+.B EOVERFLOW
+The result cannot be represented.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Getting the Local Date and Time
+.LP
+The following example uses the \fItime\fP() function to calculate
+the time elapsed, in
+seconds, since January 1, 1970 0:00 UTC (the Epoch), \fIlocaltime\fP()
+to convert that value to a broken-down time, and \fIasctime\fP() to
+convert the broken-down time values into a printable string.
+.sp
+.RS
+.nf
+
+\fB#include <stdio.h>
+#include <time.h>
+.sp
+
+int main(void)
+{
+ time_t result;
+.sp
+
+ result = time(NULL);
+ printf("%s%ju secs since the Epoch\\n",
+ asctime(localtime(&result)),
+ (uintmax_t)result);
+ return(0);
+}
+\fP
+.fi
+.RE
+.LP
+This example writes the current time to \fIstdout\fP in a form like
+this:
+.sp
+.RS
+.nf
+
+\fBWed Jun 26 10:32:15 1996
+835810335 secs since the Epoch
+\fP
+.fi
+.RE
+.SS Getting the Modification Time for a File
+.LP
+The following example gets the modification time for a file. The \fIlocaltime\fP()
+function converts the \fBtime_t\fP value of
+the last modification date, obtained by a previous call to \fIstat\fP(),
+into a \fBtm\fP
+structure that contains the year, month, day, and so on.
+.sp
+.RS
+.nf
+
+\fB#include <time.h>
+\&...
+struct stat statbuf;
+\&...
+tm = localtime(&statbuf.st_mtime);
+\&...
+\fP
+.fi
+.RE
+.SS Timing an Event
+.LP
+The following example gets the current time, converts it to a string
+using \fIlocaltime\fP() and \fIasctime\fP(), and prints it to standard
+output using \fIfputs\fP(). It then prints the number of minutes to
+an event being timed.
+.sp
+.RS
+.nf
+
+\fB#include <time.h>
+#include <stdio.h>
+\&...
+time_t now;
+int minutes_to_event;
+\&...
+time(&now);
+printf("The time is ");
+fputs(asctime(localtime(&now)), stdout);
+printf("There are still %d minutes to the event.\\n",
+ minutes_to_event);
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The \fIlocaltime_r\fP() function is thread-safe and returns values
+in a user-supplied buffer instead of possibly using a static
+data area that may be overwritten by each call.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIasctime\fP(), \fIclock\fP(), \fIctime\fP(),
+\fIdifftime\fP(), \fIgetdate\fP(), \fIgmtime\fP(), \fImktime\fP(),
+\fIstrftime\fP(), \fIstrptime\fP(), \fItime\fP(), \fIutime\fP(),
+the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<time.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/localtime_r.3p b/man-pages-posix-2003/man3p/localtime_r.3p
new file mode 100644
index 0000000..a8ccf45
--- /dev/null
+++ b/man-pages-posix-2003/man3p/localtime_r.3p
@@ -0,0 +1 @@
+.so man3p/localtime.3p
diff --git a/man-pages-posix-2003/man3p/lockf.3p b/man-pages-posix-2003/man3p/lockf.3p
new file mode 100644
index 0000000..6aa1ead
--- /dev/null
+++ b/man-pages-posix-2003/man3p/lockf.3p
@@ -0,0 +1,229 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "LOCKF" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" lockf
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+lockf \- record locking on files
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+int lockf(int\fP \fIfildes\fP\fB, int\fP \fIfunction\fP\fB, off_t\fP
+\fIsize\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIlockf\fP() function shall lock sections of a file with advisory-mode
+locks. Calls to \fIlockf\fP() from other threads
+which attempt to lock the locked file section shall either return
+an error value or block until the section becomes unlocked. All
+the locks for a process are removed when the process terminates. Record
+locking with \fIlockf\fP() shall be supported for regular
+files and may be supported for other files.
+.LP
+The \fIfildes\fP argument is an open file descriptor. To establish
+a lock with this function, the file descriptor shall be
+opened with write-only permission (O_WRONLY) or with read/write permission
+(O_RDWR).
+.LP
+The \fIfunction\fP argument is a control value which specifies the
+action to be taken. The permissible values for
+\fIfunction\fP are defined in \fI<unistd.h>\fP as follows:
+.TS C
+center; l2 l.
+\fBFunction\fP \fBDescription\fP
+F_ULOCK Unlock locked sections.
+F_LOCK Lock a section for exclusive use.
+F_TLOCK Test and lock a section for exclusive use.
+F_TEST Test a section for locks by other processes.
+.TE
+.LP
+F_TEST shall detect if a lock by another process is present on the
+specified section.
+.LP
+F_LOCK and F_TLOCK shall both lock a section of a file if the section
+is available.
+.LP
+F_ULOCK shall remove locks from a section of the file.
+.LP
+The \fIsize\fP argument is the number of contiguous bytes to be locked
+or unlocked. The section to be locked or unlocked starts
+at the current offset in the file and extends forward for a positive
+size or backward for a negative size (the preceding bytes up
+to but not including the current offset). If \fIsize\fP is 0, the
+section from the current offset through the largest possible
+file offset shall be locked (that is, from the current offset through
+the present or any future end-of-file). An area need not be
+allocated to the file to be locked because locks may exist past the
+end-of-file.
+.LP
+The sections locked with F_LOCK or F_TLOCK may, in whole or in part,
+contain or be contained by a previously locked section for
+the same process. When this occurs, or if adjacent locked sections
+would occur, the sections shall be combined into a single locked
+section. If the request would cause the number of locks to exceed
+a system-imposed limit, the request shall fail.
+.LP
+F_LOCK and F_TLOCK requests differ only by the action taken if the
+section is not available. F_LOCK shall block the calling
+thread until the section is available. F_TLOCK shall cause the function
+to fail if the section is already locked by another
+process.
+.LP
+File locks shall be released on first close by the locking process
+of any file descriptor for the file.
+.LP
+F_ULOCK requests may release (wholly or in part) one or more locked
+sections controlled by the process. Locked sections shall be
+unlocked starting at the current file offset through \fIsize\fP bytes
+or to the end-of-file if \fIsize\fP is (\fBoff_t\fP)0.
+When all of a locked section is not released (that is, when the beginning
+or end of the area to be unlocked falls within a locked
+section), the remaining portions of that section shall remain locked
+by the process. Releasing the center portion of a locked
+section shall cause the remaining locked beginning and end portions
+to become two separate locked sections. If the request would
+cause the number of locks in the system to exceed a system-imposed
+limit, the request shall fail.
+.LP
+A potential for deadlock occurs if the threads of a process controlling
+a locked section are blocked by accessing another
+process' locked section. If the system detects that deadlock would
+occur, \fIlockf\fP() shall fail with an [EDEADLK] error.
+.LP
+The interaction between \fIfcntl\fP() and \fIlockf\fP() locks is unspecified.
+.LP
+Blocking on a section shall be interrupted by any signal.
+.LP
+An F_ULOCK request in which \fIsize\fP is non-zero and the offset
+of the last byte of the requested section is the maximum
+value for an object of type \fBoff_t\fP, when the process has an existing
+lock in which \fIsize\fP is 0 and which includes the
+last byte of the requested section, shall be treated as a request
+to unlock from the start of the requested section with a size
+equal to 0. Otherwise, an F_ULOCK request shall attempt to unlock
+only the requested section.
+.LP
+Attempting to lock a section of a file that is associated with a buffered
+stream produces unspecified results.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIlockf\fP() shall return 0. Otherwise,
+it shall return -1, set \fIerrno\fP to indicate an error,
+and existing locks shall not be changed.
+.SH ERRORS
+.LP
+The \fIlockf\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not a valid open file descriptor; or
+\fIfunction\fP is F_LOCK or F_TLOCK and \fIfildes\fP is
+not a valid file descriptor open for writing.
+.TP 7
+.B EACCES \fRor\fP EAGAIN
+.sp
+The \fIfunction\fP argument is F_TLOCK or F_TEST and the section is
+already locked by another process.
+.TP 7
+.B EDEADLK
+The \fIfunction\fP argument is F_LOCK and a deadlock is detected.
+.TP 7
+.B EINTR
+A signal was caught during execution of the function.
+.TP 7
+.B EINVAL
+The \fIfunction\fP argument is not one of F_LOCK, F_TLOCK, F_TEST,
+or F_ULOCK; or \fIsize\fP plus the current file offset is
+less than 0.
+.TP 7
+.B EOVERFLOW
+The offset of the first, or if \fIsize\fP is not 0 then the last,
+byte in the requested section cannot be represented
+correctly in an object of type \fBoff_t\fP.
+.sp
+.LP
+The \fIlockf\fP() function may fail if:
+.TP 7
+.B EAGAIN
+The \fIfunction\fP argument is F_LOCK or F_TLOCK and the file is mapped
+with \fImmap\fP().
+.TP 7
+.B EDEADLK \fRor\fP ENOLCK
+.sp
+The \fIfunction\fP argument is F_LOCK, F_TLOCK, or F_ULOCK, and the
+request would cause the number of locks to exceed a
+system-imposed limit.
+.TP 7
+.B EOPNOTSUPP \fRor\fP EINVAL
+.sp
+The implementation does not support the locking of files of the type
+indicated by the \fIfildes\fP argument.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Locking a Portion of a File
+.LP
+In the following example, a file named \fB/home/cnd/mod1\fP is being
+modified. Other processes that use locking are prevented
+from changing it during this process. Only the first 10000 bytes are
+locked, and the lock call fails if another process has any
+part of this area locked already.
+.sp
+.RS
+.nf
+
+\fB#include <fcntl.h>
+#include <unistd.h>
+.sp
+
+int fildes;
+int status;
+\&...
+fildes = open("/home/cnd/mod1", O_RDWR);
+status = lockf(fildes, F_TLOCK, (off_t)10000);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+Record-locking should not be used in combination with the \fIfopen\fP(),
+\fIfread\fP(), \fIfwrite\fP(), and other \fIstdio\fP
+functions. Instead, the more primitive, non-buffered functions (such
+as \fIopen\fP()) should
+be used. Unexpected results may occur in processes that do buffering
+in the user address space. The process may later read/write
+data which is/was locked. The \fIstdio\fP functions are the most common
+source of unexpected buffering.
+.LP
+The \fIalarm\fP() function may be used to provide a timeout facility
+in applications
+requiring it.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIalarm\fP(), \fIchmod\fP(), \fIclose\fP(), \fIcreat\fP(), \fIfcntl\fP(),
+\fIfopen\fP(), \fImmap\fP(), \fIopen\fP(), \fIread\fP(), \fIwrite\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/log.3p b/man-pages-posix-2003/man3p/log.3p
new file mode 100644
index 0000000..26804bd
--- /dev/null
+++ b/man-pages-posix-2003/man3p/log.3p
@@ -0,0 +1,108 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "LOG" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" log
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+log, logf, logl \- natural logarithm function
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double log(double\fP \fIx\fP\fB);
+.br
+float logf(float\fP \fIx\fP\fB);
+.br
+long double logl(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the natural logarithm of their argument
+\fIx\fP,
+log_\fIe\fP(\fIx\fP).
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the natural
+logarithm of \fIx\fP.
+.LP
+If \fIx\fP is \(+-0, a pole error shall occur and \fIlog\fP(), \fIlogf\fP(),
+and \fIlogl\fP() shall return -HUGE_VAL,
+-HUGE_VALF, and -HUGE_VALL, respectively.
+.LP
+For finite values of \fIx\fP that are less than 0, or if \fIx\fP
+is -Inf, a domain error shall occur, and either a NaN (if supported),
+or an implementation-defined value shall be returned.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is 1, +0 shall be returned.
+.LP
+If \fIx\fP is +Inf, \fIx\fP shall be returned.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Domain\ Error
+The finite value of \fIx\fP is negative, or \fIx\fP is -Inf.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [EDOM]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the invalid floating-point exception shall be
+raised.
+.TP 7
+Pole\ Error
+The value of \fIx\fP is zero.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the divide-by-zero floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexp\fP(), \fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIisnan\fP(),
+\fIlog10\fP(),
+\fIlog1p\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Section 4.18, Treatment of Error Conditions for Mathematical Functions,
+\fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/log10.3p b/man-pages-posix-2003/man3p/log10.3p
new file mode 100644
index 0000000..0afc15e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/log10.3p
@@ -0,0 +1,106 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "LOG10" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" log10
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+log10, log10f, log10l \- base 10 logarithm function
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double log10(double\fP \fIx\fP\fB);
+.br
+float log10f(float\fP \fIx\fP\fB);
+.br
+long double log10l(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the base 10 logarithm of their argument
+\fIx\fP, log_10(\fIx\fP).
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the base
+10 logarithm of \fIx\fP.
+.LP
+If \fIx\fP is \(+-0, a pole error shall occur and \fIlog10\fP(), \fIlog10f\fP(),
+and \fIlog10l\fP() shall return
+-HUGE_VAL, -HUGE_VALF, and -HUGE_VALL, respectively.
+.LP
+For finite values of \fIx\fP that are less than 0, or if \fIx\fP
+is -Inf, a domain error shall occur, and either a NaN (if supported),
+or an implementation-defined value shall be returned.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is 1, +0 shall be returned.
+.LP
+If \fIx\fP is +Inf, +Inf shall be returned.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Domain\ Error
+The finite value of \fIx\fP is negative, or \fIx\fP is -Inf.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [EDOM]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the invalid floating-point exception shall be
+raised.
+.TP 7
+Pole\ Error
+The value of \fIx\fP is zero.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the divide-by-zero floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIisnan\fP(), \fIlog\fP(),
+\fIpow\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment of Error
+Conditions for Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/log10f.3p b/man-pages-posix-2003/man3p/log10f.3p
new file mode 100644
index 0000000..815b492
--- /dev/null
+++ b/man-pages-posix-2003/man3p/log10f.3p
@@ -0,0 +1 @@
+.so man3p/log10.3p
diff --git a/man-pages-posix-2003/man3p/log10l.3p b/man-pages-posix-2003/man3p/log10l.3p
new file mode 100644
index 0000000..815b492
--- /dev/null
+++ b/man-pages-posix-2003/man3p/log10l.3p
@@ -0,0 +1 @@
+.so man3p/log10.3p
diff --git a/man-pages-posix-2003/man3p/log1p.3p b/man-pages-posix-2003/man3p/log1p.3p
new file mode 100644
index 0000000..76f4e48
--- /dev/null
+++ b/man-pages-posix-2003/man3p/log1p.3p
@@ -0,0 +1,117 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "LOG1P" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" log1p
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+log1p, log1pf, log1pl \- compute a natural logarithm
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double log1p(double\fP \fIx\fP\fB);
+.br
+float log1pf(float\fP \fIx\fP\fB);
+.br
+long double log1pl(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute log_e(1.0 + \fIx\fP).
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the natural
+logarithm of 1.0 + \fIx\fP.
+.LP
+If \fIx\fP is -1, a pole error shall occur and \fIlog1p\fP(), \fIlog1pf\fP(),
+and \fIlog1pl\fP() shall return -HUGE_VAL,
+-HUGE_VALF, and -HUGE_VALL, respectively.
+.LP
+For finite values of \fIx\fP that are less than -1, or if \fIx\fP
+is -Inf, a domain error shall occur, and either a NaN (if supported),
+or an implementation-defined value shall be returned.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is \(+-0, or +Inf, \fIx\fP shall be returned.
+.LP
+If \fIx\fP is subnormal, a range error may occur and \fIx\fP should
+be returned.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Domain\ Error
+The finite value of \fIx\fP is less than -1, or \fIx\fP is -Inf.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [EDOM]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the invalid floating-point exception shall be
+raised.
+.TP 7
+Pole\ Error
+The value of \fIx\fP is -1.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the divide-by-zero floating-point exception shall be
+raised.
+.sp
+.LP
+These functions may fail if:
+.TP 7
+Range\ Error
+The value of \fIx\fP is subnormal.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the underflow floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIlog\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment
+of Error Conditions for Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/log1pf.3p b/man-pages-posix-2003/man3p/log1pf.3p
new file mode 100644
index 0000000..94f881c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/log1pf.3p
@@ -0,0 +1 @@
+.so man3p/log1p.3p
diff --git a/man-pages-posix-2003/man3p/log1pl.3p b/man-pages-posix-2003/man3p/log1pl.3p
new file mode 100644
index 0000000..94f881c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/log1pl.3p
@@ -0,0 +1 @@
+.so man3p/log1p.3p
diff --git a/man-pages-posix-2003/man3p/log2.3p b/man-pages-posix-2003/man3p/log2.3p
new file mode 100644
index 0000000..d9f2284
--- /dev/null
+++ b/man-pages-posix-2003/man3p/log2.3p
@@ -0,0 +1,105 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "LOG2" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" log2
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+log2, log2f, log2l \- compute base 2 logarithm functions
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double log2(double\fP \fIx\fP\fB);
+.br
+float log2f(float\fP \fIx\fP\fB);
+.br
+long double log2l(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the base 2 logarithm of their argument
+\fIx\fP, log_2(\fIx\fP).
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the base
+2 logarithm of \fIx\fP.
+.LP
+If \fIx\fP is \(+-0, a pole error shall occur and \fIlog2\fP(), \fIlog2f\fP(),
+and \fIlog2l\fP() shall return -HUGE_VAL,
+-HUGE_VALF, and -HUGE_VALL, respectively.
+.LP
+For finite values of \fIx\fP that are less than 0, or if \fIx\fP
+is -Inf, a domain error shall occur, and either a NaN (if supported),
+or an implementation-defined value shall be returned.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is 1, +0 shall be returned.
+.LP
+If \fIx\fP is +Inf, \fIx\fP shall be returned.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Domain\ Error
+The finite value of \fIx\fP is less than zero, or \fIx\fP is -Inf.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [EDOM]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the invalid floating-point exception shall be
+raised.
+.TP 7
+Pole\ Error
+The value of \fIx\fP is zero.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the divide-by-zero floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIlog\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment
+of Error Conditions for Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/log2f.3p b/man-pages-posix-2003/man3p/log2f.3p
new file mode 100644
index 0000000..2399a10
--- /dev/null
+++ b/man-pages-posix-2003/man3p/log2f.3p
@@ -0,0 +1 @@
+.so man3p/log2.3p
diff --git a/man-pages-posix-2003/man3p/log2l.3p b/man-pages-posix-2003/man3p/log2l.3p
new file mode 100644
index 0000000..2399a10
--- /dev/null
+++ b/man-pages-posix-2003/man3p/log2l.3p
@@ -0,0 +1 @@
+.so man3p/log2.3p
diff --git a/man-pages-posix-2003/man3p/logb.3p b/man-pages-posix-2003/man3p/logb.3p
new file mode 100644
index 0000000..c9a2370
--- /dev/null
+++ b/man-pages-posix-2003/man3p/logb.3p
@@ -0,0 +1,107 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "LOGB" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" logb
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+logb, logbf, logbl \- radix-independent exponent
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double logb(double\fP \fIx\fP\fB);
+.br
+float logbf(float\fP \fIx\fP\fB);
+.br
+long double logbl(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the exponent of \fIx\fP, which is the
+integral part of log\fI_r\fP
+|\fIx\fP|, as a signed floating-point value, for non-zero \fIx\fP,
+where \fIr\fP is the radix of the machine's floating-point
+arithmetic, which is the value of FLT_RADIX defined in the \fI<float.h>\fP
+header.
+.LP
+If \fIx\fP is subnormal it is treated as though it were normalized;
+thus for finite positive \fIx\fP:
+.sp
+.RS
+.nf
+
+\fB1 <=\fP \fIx\fP \fB* FLT_RADIX**-logb(x) < FLT_RADIX
+\fP
+.fi
+.RE
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the exponent
+of \fIx\fP.
+.LP
+If \fIx\fP is \(+-0, a pole error shall occur and \fIlogb\fP(), \fIlogbf\fP(),
+and \fIlogbl\fP() shall return -HUGE_VAL,
+-HUGE_VALF, and -HUGE_VALL, respectively.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is \(+-Inf, +Inf shall be returned.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Pole\ Error
+The value of \fIx\fP is \(+-0.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the divide-by-zero floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIilogb\fP(), \fIscalb\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment of Error Conditions
+for
+Mathematical Functions, \fI<float.h>\fP, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/logbf.3p b/man-pages-posix-2003/man3p/logbf.3p
new file mode 100644
index 0000000..fcb44d7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/logbf.3p
@@ -0,0 +1 @@
+.so man3p/logb.3p
diff --git a/man-pages-posix-2003/man3p/logbl.3p b/man-pages-posix-2003/man3p/logbl.3p
new file mode 100644
index 0000000..fcb44d7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/logbl.3p
@@ -0,0 +1 @@
+.so man3p/logb.3p
diff --git a/man-pages-posix-2003/man3p/logf.3p b/man-pages-posix-2003/man3p/logf.3p
new file mode 100644
index 0000000..3a026a7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/logf.3p
@@ -0,0 +1 @@
+.so man3p/log.3p
diff --git a/man-pages-posix-2003/man3p/logl.3p b/man-pages-posix-2003/man3p/logl.3p
new file mode 100644
index 0000000..3a026a7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/logl.3p
@@ -0,0 +1 @@
+.so man3p/log.3p
diff --git a/man-pages-posix-2003/man3p/longjmp.3p b/man-pages-posix-2003/man3p/longjmp.3p
new file mode 100644
index 0000000..ed33a80
--- /dev/null
+++ b/man-pages-posix-2003/man3p/longjmp.3p
@@ -0,0 +1,105 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "LONGJMP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" longjmp
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+longjmp \- non-local goto
+.SH SYNOPSIS
+.LP
+\fB#include <setjmp.h>
+.br
+.sp
+void longjmp(jmp_buf\fP \fIenv\fP\fB, int\fP \fIval\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIlongjmp\fP() function shall restore the environment saved by
+the most recent invocation of \fIsetjmp\fP() in the same thread, with
+the corresponding \fBjmp_buf\fP argument. If there is no
+such invocation, or if the function containing the invocation of \fIsetjmp\fP()
+has
+terminated execution in the interim, or if the invocation of \fIsetjmp\fP()
+was within the
+scope of an identifier with variably modified type and execution has
+left that scope in the interim, the behavior is undefined.
+\ It is unspecified whether \fIlongjmp\fP() restores the signal mask,
+leaves the signal mask unchanged, or restores it to its
+value at the time \fIsetjmp\fP() was called.
+.LP
+All accessible objects have values, and all other components of the
+abstract machine have state (for example, floating-point
+status flags and open files), as of the time \fIlongjmp\fP() was called,
+except that the values of objects of automatic storage
+duration are unspecified if they meet all the following conditions:
+.IP " *" 3
+They are local to the function containing the corresponding \fIsetjmp\fP()
+invocation.
+.LP
+.IP " *" 3
+They do not have volatile-qualified type.
+.LP
+.IP " *" 3
+They are changed between the \fIsetjmp\fP() invocation and \fIlongjmp\fP()
+call.
+.LP
+.LP
+As
+it bypasses the usual function call and return mechanisms, \fIlongjmp\fP()
+shall execute correctly in contexts of interrupts,
+signals, and any of their associated functions. However, if \fIlongjmp\fP()
+is invoked from a nested signal handler (that is, from
+a function invoked as a result of a signal raised during the handling
+of another signal), the behavior is undefined.
+.LP
+The effect of a call to \fIlongjmp\fP() where initialization of the
+\fBjmp_buf\fP structure was not performed in the calling
+thread is undefined.
+.SH RETURN VALUE
+.LP
+After \fIlongjmp\fP() is completed, program execution continues as
+if the corresponding invocation of \fIsetjmp\fP() had just returned
+the value specified by \fIval\fP. The \fIlongjmp\fP() function
+shall not cause \fIsetjmp\fP() to return 0; if \fIval\fP is 0, \fIsetjmp\fP()
+shall return 1.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Applications whose behavior depends on the value of the signal mask
+should not use \fIlongjmp\fP() and \fIsetjmp\fP(), since their effect
+on the signal mask is unspecified, but should instead use the \fIsiglongjmp\fP()
+and \fIsigsetjmp\fP()
+functions (which can save and restore the signal mask under application
+control).
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsetjmp\fP(), \fIsigaction\fP(), \fIsiglongjmp\fP(), \fIsigsetjmp\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<setjmp.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/lrand48.3p b/man-pages-posix-2003/man3p/lrand48.3p
new file mode 100644
index 0000000..a71d5ed
--- /dev/null
+++ b/man-pages-posix-2003/man3p/lrand48.3p
@@ -0,0 +1 @@
+.so man3p/drand48.3p
diff --git a/man-pages-posix-2003/man3p/lrint.3p b/man-pages-posix-2003/man3p/lrint.3p
new file mode 100644
index 0000000..0b3f3d9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/lrint.3p
@@ -0,0 +1,107 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "LRINT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" lrint
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+lrint, lrintf, lrintl \- round to nearest integer value using current
+rounding direction
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+long lrint(double\fP \fIx\fP\fB);
+.br
+long lrintf(float\fP \fIx\fP\fB);
+.br
+long lrintl(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall round their argument to the nearest integer
+value, rounding according to the current rounding
+direction.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the rounded
+integer value.
+.LP
+If
+\fIx\fP is NaN, a domain error shall occur and an unspecified value
+is returned.
+.LP
+If \fIx\fP is +Inf, a domain error shall occur and an unspecified
+value is returned.
+.LP
+If \fIx\fP is -Inf, a domain error shall occur and an unspecified
+value is returned.
+.LP
+If the correct value is positive and too large to represent as a \fBlong\fP,
+a domain error shall occur and an unspecified
+value is returned.
+.LP
+If the correct value is negative and too large to represent as a \fBlong\fP,
+a domain error shall occur and an unspecified
+value is returned.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Domain\ Error
+The \fIx\fP argument is NaN or \(+-Inf, or the correct value is not
+representable as an integer.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [EDOM]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the invalid floating-point exception shall be raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+These functions provide floating-to-integer conversions. They round
+according to the current rounding direction. If the rounded
+value is outside the range of the return type, the numeric result
+is unspecified and the invalid floating-point exception is
+raised. When they raise no other floating-point exception and the
+result differs from the argument, they raise the inexact
+floating-point exception.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIllrint\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment
+of Error Conditions for Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/lrintf.3p b/man-pages-posix-2003/man3p/lrintf.3p
new file mode 100644
index 0000000..523041a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/lrintf.3p
@@ -0,0 +1 @@
+.so man3p/lrint.3p
diff --git a/man-pages-posix-2003/man3p/lrintl.3p b/man-pages-posix-2003/man3p/lrintl.3p
new file mode 100644
index 0000000..523041a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/lrintl.3p
@@ -0,0 +1 @@
+.so man3p/lrint.3p
diff --git a/man-pages-posix-2003/man3p/lround.3p b/man-pages-posix-2003/man3p/lround.3p
new file mode 100644
index 0000000..b6b2f3c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/lround.3p
@@ -0,0 +1,105 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "LROUND" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" lround
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+lround, lroundf, lroundl \- round to nearest integer value
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+long lround(double\fP \fIx\fP\fB);
+.br
+long lroundf(float\fP \fIx\fP\fB);
+.br
+long lroundl(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall round their argument to the nearest integer
+value, rounding halfway cases away from zero, regardless of
+the current rounding direction.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the rounded
+integer value.
+.LP
+If
+\fIx\fP is NaN, a domain error shall occur and an unspecified value
+is returned.
+.LP
+If \fIx\fP is +Inf, a domain error shall occur and an unspecified
+value is returned.
+.LP
+If \fIx\fP is -Inf, a domain error shall occur and an unspecified
+value is returned.
+.LP
+If the correct value is positive and too large to represent as a \fBlong\fP,
+a domain error shall occur and an unspecified
+value is returned.
+.LP
+If the correct value is negative and too large to represent as a \fBlong\fP,
+a domain error shall occur and an unspecified
+value is returned.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Domain\ Error
+The \fIx\fP argument is NaN or \(+-Inf, or the correct value is not
+representable as an integer.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [EDOM]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the invalid floating-point exception shall be raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+These functions differ from the \fIlrint\fP() functions in the default
+rounding
+direction, with the \fIlround\fP() functions rounding halfway cases
+away from zero and needing not to raise the inexact
+floating-point exception for non-integer arguments that round to within
+the range of the return type.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIllround\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment
+of Error Conditions for Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/lroundf.3p b/man-pages-posix-2003/man3p/lroundf.3p
new file mode 100644
index 0000000..69c83b3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/lroundf.3p
@@ -0,0 +1 @@
+.so man3p/lround.3p
diff --git a/man-pages-posix-2003/man3p/lroundl.3p b/man-pages-posix-2003/man3p/lroundl.3p
new file mode 100644
index 0000000..69c83b3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/lroundl.3p
@@ -0,0 +1 @@
+.so man3p/lround.3p
diff --git a/man-pages-posix-2003/man3p/lsearch.3p b/man-pages-posix-2003/man3p/lsearch.3p
new file mode 100644
index 0000000..bee6144
--- /dev/null
+++ b/man-pages-posix-2003/man3p/lsearch.3p
@@ -0,0 +1,146 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "LSEARCH" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" lsearch
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+lsearch, lfind \- linear search and update
+.SH SYNOPSIS
+.LP
+\fB#include <search.h>
+.br
+.sp
+void *lsearch(const void *\fP\fIkey\fP\fB, void *\fP\fIbase\fP\fB,
+size_t *\fP\fInelp\fP\fB, size_t\fP
+\fIwidth\fP\fB,
+.br
+\ \ \ \ \ \ int (*\fP\fIcompar\fP\fB)(const void *, const void *));
+.br
+void *lfind(const void *\fP\fIkey\fP\fB, const void *\fP\fIbase\fP\fB,
+size_t *\fP\fInelp\fP\fB,
+.br
+\ \ \ \ \ \ size_t width, int (*\fP\fIcompar\fP\fB)(const void *,
+const void *)); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIlsearch\fP() function shall linearly search the table and return
+a pointer into the table for the matching entry. If the
+entry does not occur, it shall be added at the end of the table. The
+\fIkey\fP argument points to the entry to be sought in the
+table. The \fIbase\fP argument points to the first element in the
+table. The \fIwidth\fP argument is the size of an element in
+bytes. The \fInelp\fP argument points to an integer containing the
+current number of elements in the table. The integer to which
+\fInelp\fP points shall be incremented if the entry is added to the
+table. The \fIcompar\fP argument points to a comparison
+function which the application shall supply (for example, \fIstrcmp\fP()).
+It is called
+with two arguments that point to the elements being compared. The
+application shall ensure that the function returns 0 if the
+elements are equal, and non-zero otherwise.
+.LP
+The \fIlfind\fP() function shall be equivalent to \fIlsearch\fP(),
+except that if the entry is not found, it is not added to
+the table. Instead, a null pointer is returned.
+.SH RETURN VALUE
+.LP
+If the searched for entry is found, both \fIlsearch\fP() and \fIlfind\fP()
+shall return a pointer to it. Otherwise,
+\fIlfind\fP() shall return a null pointer and \fIlsearch\fP() shall
+return a pointer to the newly added element.
+.LP
+Both functions shall return a null pointer in case of error.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Storing Strings in a Table
+.LP
+This fragment reads in less than or equal to TABSIZE strings of length
+less than or equal to ELSIZE and stores them in a table,
+eliminating duplicates.
+.sp
+.RS
+.nf
+
+\fB#include <stdio.h>
+#include <string.h>
+#include <search.h>
+.sp
+
+#define TABSIZE 50
+#define ELSIZE 120
+.sp
+
+\&...
+ char line[ELSIZE], tab[TABSIZE][ELSIZE];
+ size_t nel = 0;
+ ...
+ while (fgets(line, ELSIZE, stdin) != NULL && nel < TABSIZE)
+ (void) lsearch(line, tab, &nel,
+ ELSIZE, (int (*)(const void *, const void *)) strcmp);
+ ...
+\fP
+.fi
+.RE
+.SS Finding a Matching Entry
+.LP
+The following example finds any line that reads \fB"This is a test."\fP
+\&.
+.sp
+.RS
+.nf
+
+\fB#include <search.h>
+#include <string.h>
+\&...
+char line[ELSIZE], tab[TABSIZE][ELSIZE];
+size_t nel = 0;
+char *findline;
+void *entry;
+.sp
+
+findline = "This is a test.\\n";
+.sp
+
+entry = lfind(findline, tab, &nel, ELSIZE, (
+ int (*)(const void *, const void *)) strcmp);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The comparison function need not compare every byte, so arbitrary
+data may be contained in the elements in addition to the
+values being compared.
+.LP
+Undefined results can occur if there is not enough room in the table
+to add a new item.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIhcreate\fP(), \fItsearch\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<search.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/lseek.3p b/man-pages-posix-2003/man3p/lseek.3p
new file mode 100644
index 0000000..0de2a0a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/lseek.3p
@@ -0,0 +1,138 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "LSEEK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" lseek
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+lseek \- move the read/write file offset
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+off_t lseek(int\fP \fIfildes\fP\fB, off_t\fP \fIoffset\fP\fB, int\fP
+\fIwhence\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIlseek\fP() function shall set the file offset for the open
+file description associated with the file descriptor
+\fIfildes,\fP as follows:
+.IP " *" 3
+If \fIwhence\fP is SEEK_SET, the file offset shall be set to \fIoffset\fP
+bytes.
+.LP
+.IP " *" 3
+If \fIwhence\fP is SEEK_CUR, the file offset shall be set to its current
+location plus \fIoffset\fP.
+.LP
+.IP " *" 3
+If \fIwhence\fP is SEEK_END, the file offset shall be set to the size
+of the file plus \fIoffset\fP.
+.LP
+.LP
+The symbolic constants SEEK_SET, SEEK_CUR, and SEEK_END are defined
+in \fI<unistd.h>\fP.
+.LP
+The behavior of \fIlseek\fP() on devices which are incapable of seeking
+is implementation-defined. The value of the file offset
+associated with such a device is undefined.
+.LP
+The \fIlseek\fP() function shall allow the file offset to be set beyond
+the end of the existing data in the file. If data is
+later written at this point, subsequent reads of data in the gap shall
+return bytes with the value 0 until data is actually written
+into the gap.
+.LP
+The \fIlseek\fP() function shall not, by itself, extend the size of
+a file.
+.LP
+If \fIfildes\fP refers to a shared memory object, the result of the
+\fIlseek\fP() function is unspecified.
+.LP
+If \fIfildes\fP refers to a typed memory object, the result of the
+\fIlseek\fP() function is unspecified.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the resulting offset, as measured in bytes
+from the beginning of the file, shall be returned.
+Otherwise, (\fBoff_t\fP)-1 shall be returned, \fIerrno\fP shall be
+set to indicate the error, and the file offset shall remain
+unchanged.
+.SH ERRORS
+.LP
+The \fIlseek\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not an open file descriptor.
+.TP 7
+.B EINVAL
+The \fIwhence\fP argument is not a proper value, or the resulting
+file offset would be negative for a regular file, block
+special file, or directory.
+.TP 7
+.B EOVERFLOW
+The resulting file offset would be a value which cannot be represented
+correctly in an object of type \fBoff_t\fP.
+.TP 7
+.B ESPIPE
+The \fIfildes\fP argument is associated with a pipe, FIFO, or socket.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The ISO\ C standard includes the functions \fIfgetpos\fP() and \fIfsetpos\fP(),
+which work on very large files by use of a special positioning type.
+.LP
+Although \fIlseek\fP() may position the file offset beyond the end
+of the file, this function does not itself extend the size
+of the file. While the only function in IEEE\ Std\ 1003.1-2001 that
+may directly extend the size of the file is \fIwrite\fP(), \fItruncate\fP(),
+and \fIftruncate\fP(), several functions originally derived from the
+ISO\ C standard, such as \fIfwrite\fP(), \fIfprintf\fP(), and so on,
+may do so
+(by causing calls on \fIwrite\fP()).
+.LP
+An invalid file offset that would cause [EINVAL] to be returned may
+be both implementation-defined and device-dependent (for
+example, memory may have few invalid values). A negative file offset
+may be valid for some devices in some implementations.
+.LP
+The POSIX.1-1990 standard did not specifically prohibit \fIlseek\fP()
+from returning a negative offset. Therefore, an
+application was required to clear \fIerrno\fP prior to the call and
+check \fIerrno\fP upon return to determine whether a return
+value of ( \fBoff_t\fP)-1 is a negative offset or an indication of
+an error condition. The standard developers did not wish to
+require this action on the part of a conforming application, and chose
+to require that \fIerrno\fP be set to [EINVAL] when the
+resulting file offset would be negative for a regular file, block
+special file, or directory.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIopen\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<sys/types.h>\fP, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/lstat.3p b/man-pages-posix-2003/man3p/lstat.3p
new file mode 100644
index 0000000..a8ba086
--- /dev/null
+++ b/man-pages-posix-2003/man3p/lstat.3p
@@ -0,0 +1,142 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "LSTAT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" lstat
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+lstat \- get symbolic link status
+.SH SYNOPSIS
+.LP
+\fB#include <sys/stat.h>
+.br
+.sp
+int lstat(const char *restrict\fP \fIpath\fP\fB, struct stat *restrict\fP
+\fIbuf\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIlstat\fP() function shall be equivalent to \fIstat\fP(), except
+when \fIpath\fP
+refers to a symbolic link. In that case \fIlstat\fP() shall return
+information about the link, while \fIstat\fP() shall return information
+about the file the link references.
+.LP
+For symbolic links, the \fIst_mode\fP member shall contain meaningful
+information when used with the file type macros, and the
+\fIst_size\fP member shall contain the length of the pathname contained
+in the symbolic link. File mode bits and the contents of
+the remaining members of the \fBstat\fP structure are unspecified.
+The value returned in the \fIst_size\fP member is the length
+of the contents of the symbolic link, and does not count any trailing
+null.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIlstat\fP() shall return 0. Otherwise,
+it shall return -1 and set \fIerrno\fP to indicate the
+error.
+.SH ERRORS
+.LP
+The \fIlstat\fP() function shall fail if:
+.TP 7
+.B EACCES
+A component of the path prefix denies search permission.
+.TP 7
+.B EIO
+An error occurred while reading from the file system.
+.TP 7
+.B ELOOP
+A loop exists in symbolic links encountered during resolution of the
+\fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+The length of a pathname exceeds {PATH_MAX} or a pathname component
+is longer than {NAME_MAX}.
+.TP 7
+.B ENOTDIR
+A component of the path prefix is not a directory.
+.TP 7
+.B ENOENT
+A component of \fIpath\fP does not name an existing file or \fIpath\fP
+is an empty string.
+.TP 7
+.B EOVERFLOW
+The file size in bytes or the number of blocks allocated to the file
+or the file serial number cannot be represented correctly
+in the structure pointed to by \fIbuf\fP.
+.sp
+.LP
+The \fIlstat\fP() function may fail if:
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the \fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+As a result of encountering a symbolic link in resolution of the \fIpath\fP
+argument, the length of the substituted pathname
+string exceeded {PATH_MAX}.
+.TP 7
+.B EOVERFLOW
+One of the members is too large to store into the structure pointed
+to by the \fIbuf\fP argument.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Obtaining Symbolic Link Status Information
+.LP
+The following example shows how to obtain status information for a
+symbolic link named \fB/modules/pass1\fP. The structure
+variable \fIbuffer\fP is defined for the \fBstat\fP structure. If
+the \fIpath\fP argument specified the filename for the file
+pointed to by the symbolic link ( \fB/home/cnd/mod1\fP), the results
+of calling the function would be the same as those returned
+by a call to the \fIstat\fP() function.
+.sp
+.RS
+.nf
+
+\fB#include <sys/stat.h>
+.sp
+
+struct stat buffer;
+int status;
+\&...
+status = lstat("/modules/pass1", &buffer);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIlstat\fP() function is not required to update the time-related
+fields if the named file is not a symbolic link. While
+the \fIst_uid\fP, \fIst_gid\fP, \fIst_atime\fP, \fIst_mtime\fP, and
+\fIst_ctime\fP members of the \fBstat\fP structure may
+apply to a symbolic link, they are not required to do so. No functions
+in IEEE\ Std\ 1003.1-2001 are required to maintain
+any of these time fields.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfstat\fP(), \fIreadlink\fP(), \fIstat\fP(),
+\fIsymlink\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<sys/stat.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/makecontext.3p b/man-pages-posix-2003/man3p/makecontext.3p
new file mode 100644
index 0000000..82069fb
--- /dev/null
+++ b/man-pages-posix-2003/man3p/makecontext.3p
@@ -0,0 +1,147 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MAKECONTEXT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" makecontext
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+makecontext, swapcontext \- manipulate user contexts
+.SH SYNOPSIS
+.LP
+\fB#include <ucontext.h>
+.br
+.sp
+void makecontext(ucontext_t *\fP\fIucp\fP\fB, void (*\fP\fIfunc\fP\fB)(void),
+.br
+\ \ \ \ \ \ int\fP \fIargc\fP\fB, ...);
+.br
+int swapcontext(ucontext_t *restrict\fP \fIoucp\fP\fB,
+.br
+\ \ \ \ \ \ const ucontext_t *restrict\fP \fIucp\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fImakecontext\fP() function shall modify the context specified
+by \fIucp\fP, which has been initialized using \fIgetcontext\fP().
+When this context is resumed using \fIswapcontext\fP() or \fIsetcontext\fP(),
+program execution shall continue by calling \fIfunc\fP, passing it
+the
+arguments that follow \fIargc\fP in the \fImakecontext\fP() call.
+.LP
+Before a call is made to \fImakecontext\fP(), the application shall
+ensure that the context being modified has a stack
+allocated for it. The application shall ensure that the value of \fIargc\fP
+matches the number of arguments of type \fBint\fP
+passed to \fIfunc\fP; otherwise, the behavior is undefined.
+.LP
+The \fIuc_link\fP member is used to determine the context that shall
+be resumed when the context being modified by
+\fImakecontext\fP() returns. The application shall ensure that the
+\fIuc_link\fP member is initialized prior to the call to
+\fImakecontext\fP().
+.LP
+The \fIswapcontext\fP() function shall save the current context in
+the context structure pointed to by \fIoucp\fP and shall
+set the context to the context structure pointed to by \fIucp\fP.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIswapcontext\fP() shall return 0. Otherwise,
+-1 shall be returned and \fIerrno\fP set to
+indicate the error.
+.SH ERRORS
+.LP
+The \fIswapcontext\fP() function shall fail if:
+.TP 7
+.B ENOMEM
+The \fIucp\fP argument does not have enough stack left to complete
+the operation.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+The following example illustrates the use of \fImakecontext\fP():
+.sp
+.RS
+.nf
+
+\fB#include <stdio.h>
+#include <ucontext.h>
+.sp
+
+static ucontext_t ctx[3];
+.sp
+
+static void
+f1 (void)
+{
+ puts("start f1");
+ swapcontext(&ctx[1], &ctx[2]);
+ puts("finish f1");
+}
+.sp
+
+static void
+f2 (void)
+{
+ puts("start f2");
+ swapcontext(&ctx[2], &ctx[1]);
+ puts("finish f2");
+}
+.sp
+
+int
+main (void)
+{
+ char st1[8192];
+ char st2[8192];
+.sp
+
+ getcontext(&ctx[1]);
+ ctx[1].uc_stack.ss_sp = st1;
+ ctx[1].uc_stack.ss_size = sizeof st1;
+ ctx[1].uc_link = &ctx[0];
+ makecontext(&ctx[1], f1, 0);
+.sp
+
+ getcontext(&ctx[2]);
+ ctx[2].uc_stack.ss_sp = st2;
+ ctx[2].uc_stack.ss_size = sizeof st2;
+ ctx[2].uc_link = &ctx[1];
+ makecontext(&ctx[2], f2, 0);
+.sp
+
+ swapcontext(&ctx[0], &ctx[2]);
+ return 0;
+}
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexit\fP(), \fIgetcontext\fP(), \fIsigaction\fP(), \fIsigprocmask\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<ucontext.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/malloc.3p b/man-pages-posix-2003/man3p/malloc.3p
new file mode 100644
index 0000000..5c54faf
--- /dev/null
+++ b/man-pages-posix-2003/man3p/malloc.3p
@@ -0,0 +1,79 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MALLOC" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" malloc
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+malloc \- a memory allocator
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+void *malloc(size_t\fP \fIsize\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fImalloc\fP() function shall allocate unused space for an object
+whose size in bytes is specified by \fIsize\fP and whose
+value is unspecified.
+.LP
+The order and contiguity of storage allocated by successive calls
+to \fImalloc\fP() is unspecified. The pointer returned if the
+allocation succeeds shall be suitably aligned so that it may be assigned
+to a pointer to any type of object and then used to access
+such an object in the space allocated (until the space is explicitly
+freed or reallocated). Each such allocation shall yield a
+pointer to an object disjoint from any other object. The pointer returned
+points to the start (lowest byte address) of the
+allocated space. If the space cannot be allocated, a null pointer
+shall be returned. If the size of the space requested is 0, the
+behavior is implementation-defined: the value returned shall be either
+a null pointer or a unique pointer.
+.SH RETURN VALUE
+.LP
+Upon successful completion with \fIsize\fP not equal to 0, \fImalloc\fP()
+shall return a pointer to the allocated space. If
+\fIsize\fP is 0, either a null pointer or a unique pointer that can
+be successfully passed to \fIfree\fP() shall be returned. Otherwise,
+it shall return a null pointer and set
+\fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fImalloc\fP() function shall fail if:
+.TP 7
+.B ENOMEM
+Insufficient storage space is available.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcalloc\fP(), \fIfree\fP(), \fIrealloc\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/mblen.3p b/man-pages-posix-2003/man3p/mblen.3p
new file mode 100644
index 0000000..3a6282a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/mblen.3p
@@ -0,0 +1,99 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MBLEN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" mblen
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+mblen \- get number of bytes in a character
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+int mblen(const char *\fP\fIs\fP\fB, size_t\fP \fIn\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+If \fIs\fP is not a null pointer, \fImblen\fP() shall determine the
+number of bytes constituting the character pointed to by
+\fIs\fP. Except that the shift state of \fImbtowc\fP() is not affected,
+it shall be
+equivalent to:
+.sp
+.RS
+.nf
+
+\fBmbtowc((wchar_t *)0,\fP \fIs\fP\fB,\fP \fIn\fP\fB);
+\fP
+.fi
+.RE
+.LP
+The implementation shall behave as if no function defined in this
+volume of IEEE\ Std\ 1003.1-2001 calls
+\fImblen\fP().
+.LP
+The behavior of this function is affected by the \fILC_CTYPE\fP category
+of the current locale. For a state-dependent encoding,
+this function shall be placed into its initial state by a call for
+which its character pointer argument, \fIs\fP, is a null
+pointer. Subsequent calls with \fIs\fP as other than a null pointer
+shall cause the internal state of the function to be altered
+as necessary. A call with \fIs\fP as a null pointer shall cause this
+function to return a non-zero value if encodings have state
+dependency, and 0 otherwise. If the implementation employs special
+bytes to change the shift state, these bytes shall not produce
+separate wide-character codes, but shall be grouped with an adjacent
+character. Changing the \fILC_CTYPE\fP category causes the
+shift state of this function to be unspecified.
+.SH RETURN VALUE
+.LP
+If \fIs\fP is a null pointer, \fImblen\fP() shall return a non-zero
+or 0 value, if character encodings, respectively, do or do
+not have state-dependent encodings. If \fIs\fP is not a null pointer,
+\fImblen\fP() shall either return 0 (if \fIs\fP points to
+the null byte), or return the number of bytes that constitute the
+character (if the next \fIn\fP or fewer bytes form a valid
+character), or return -1 (if they do not form a valid character)
+\ and may set \fIerrno\fP to indicate the error. In no case shall
+the value returned be greater than \fIn\fP or the value of
+the {MB_CUR_MAX} macro.
+.SH ERRORS
+.LP
+The \fImblen\fP() function may fail if:
+.TP 7
+.B EILSEQ
+Invalid character sequence is detected.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fImbtowc\fP(), \fImbstowcs\fP(), \fIwctomb\fP(), \fIwcstombs\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/mbrlen.3p b/man-pages-posix-2003/man3p/mbrlen.3p
new file mode 100644
index 0000000..7bed8ff
--- /dev/null
+++ b/man-pages-posix-2003/man3p/mbrlen.3p
@@ -0,0 +1,112 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MBRLEN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" mbrlen
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+mbrlen \- get number of bytes in a character (restartable)
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+size_t mbrlen(const char *restrict\fP \fIs\fP\fB, size_t\fP \fIn\fP\fB,
+.br
+\ \ \ \ \ \ mbstate_t *restrict\fP \fIps\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+If \fIs\fP is not a null pointer, \fImbrlen\fP() shall determine the
+number of bytes constituting the character pointed to by
+\fIs\fP. It shall be equivalent to:
+.sp
+.RS
+.nf
+
+\fBmbstate_t internal;
+mbrtowc(NULL, s, n, ps != NULL ? ps : &internal);
+\fP
+.fi
+.RE
+.LP
+If \fIps\fP is a null pointer, the \fImbrlen\fP() function shall use
+its own internal \fBmbstate_t\fP object, which is
+initialized at program start-up to the initial conversion state. Otherwise,
+the \fBmbstate_t\fP object pointed to by \fIps\fP
+shall be used to completely describe the current conversion state
+of the associated character sequence. The implementation shall
+behave as if no function defined in this volume of IEEE\ Std\ 1003.1-2001
+calls \fImbrlen\fP().
+.LP
+The behavior of this function is affected by the \fILC_CTYPE\fP category
+of the current locale.
+.SH RETURN VALUE
+.LP
+The \fImbrlen\fP() function shall return the first of the following
+that applies:
+.TP 7
+0
+If the next \fIn\fP or fewer bytes complete the character that corresponds
+to the null wide character.
+.TP 7
+\fIpositive\fP
+If the next \fIn\fP or fewer bytes complete a valid character; the
+value returned shall be the number of bytes that complete
+the character.
+.TP 7
+(\fBsize_t\fP)-2
+If the next \fIn\fP bytes contribute to an incomplete but potentially
+valid character, and all \fIn\fP bytes have been
+processed. When \fIn\fP has at least the value of the {MB_CUR_MAX}
+macro, this case can only occur if \fIs\fP points at a
+sequence of redundant shift sequences (for implementations with state-dependent
+encodings).
+.TP 7
+(\fBsize_t\fP)-1
+If an encoding error occurs, in which case the next \fIn\fP or fewer
+bytes do not contribute to a complete and valid
+character. In this case, [EILSEQ] shall be stored in \fIerrno\fP and
+the conversion state is undefined.
+.sp
+.SH ERRORS
+.LP
+The \fImbrlen\fP() function may fail if:
+.TP 7
+.B EINVAL
+\fIps\fP points to an object that contains an invalid conversion state.
+.TP 7
+.B EILSEQ
+Invalid character sequence is detected.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fImbsinit\fP(), \fImbrtowc\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/mbrtowc.3p b/man-pages-posix-2003/man3p/mbrtowc.3p
new file mode 100644
index 0000000..2b8532b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/mbrtowc.3p
@@ -0,0 +1,127 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MBRTOWC" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" mbrtowc
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+mbrtowc \- convert a character to a wide-character code (restartable)
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+size_t mbrtowc(wchar_t *restrict\fP \fIpwc\fP\fB, const char *restrict\fP
+\fIs\fP\fB,
+.br
+\ \ \ \ \ \ size_t\fP \fIn\fP\fB, mbstate_t *restrict\fP \fIps\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+If \fIs\fP is a null pointer, the \fImbrtowc\fP() function shall be
+equivalent to the call:
+.sp
+.RS
+.nf
+
+\fBmbrtowc(NULL, "", 1, ps)
+\fP
+.fi
+.RE
+.LP
+In this case, the values of the arguments \fIpwc\fP and \fIn\fP are
+ignored.
+.LP
+If \fIs\fP is not a null pointer, the \fImbrtowc\fP() function shall
+inspect at most \fIn\fP bytes beginning at the byte
+pointed to by \fIs\fP to determine the number of bytes needed to complete
+the next character (including any shift sequences). If
+the function determines that the next character is completed, it shall
+determine the value of the corresponding wide character and
+then, if \fIpwc\fP is not a null pointer, shall store that value in
+the object pointed to by \fIpwc\fP. If the corresponding wide
+character is the null wide character, the resulting state described
+shall be the initial conversion state.
+.LP
+If \fIps\fP is a null pointer, the \fImbrtowc\fP() function shall
+use its own internal \fBmbstate_t\fP object, which shall be
+initialized at program start-up to the initial conversion state. Otherwise,
+the \fBmbstate_t\fP object pointed to by \fIps\fP
+shall be used to completely describe the current conversion state
+of the associated character sequence. The implementation shall
+behave as if no function defined in this volume of IEEE\ Std\ 1003.1-2001
+calls \fImbrtowc\fP().
+.LP
+The behavior of this function is affected by the \fILC_CTYPE\fP category
+of the current locale.
+.SH RETURN VALUE
+.LP
+The \fImbrtowc\fP() function shall return the first of the following
+that applies:
+.TP 7
+0
+If the next \fIn\fP or fewer bytes complete the character that corresponds
+to the null wide character (which is the value
+stored).
+.TP 7
+between 1 and \fIn\fP inclusive
+.sp
+If the next \fIn\fP or fewer bytes complete a valid character (which
+is the value stored); the value returned shall be the number
+of bytes that complete the character.
+.TP 7
+(\fBsize_t\fP)-2
+If the next \fIn\fP bytes contribute to an incomplete but potentially
+valid character, and all \fIn\fP bytes have been
+processed (no value is stored). When \fIn\fP has at least the value
+of the {MB_CUR_MAX} macro, this case can only occur if
+\fIs\fP points at a sequence of redundant shift sequences (for implementations
+with state-dependent encodings).
+.TP 7
+(\fBsize_t\fP)-1
+If an encoding error occurs, in which case the next \fIn\fP or fewer
+bytes do not contribute to a complete and valid character
+(no value is stored). In this case, [EILSEQ] shall be stored in \fIerrno\fP
+and the conversion state is undefined.
+.sp
+.SH ERRORS
+.LP
+The \fImbrtowc\fP() function may fail if:
+.TP 7
+.B EINVAL
+\fIps\fP points to an object that contains an invalid conversion state.
+.TP 7
+.B EILSEQ
+Invalid character sequence is detected.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fImbsinit\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/mbsinit.3p b/man-pages-posix-2003/man3p/mbsinit.3p
new file mode 100644
index 0000000..0b140b7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/mbsinit.3p
@@ -0,0 +1,78 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MBSINIT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" mbsinit
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+mbsinit \- determine conversion object status
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+int mbsinit(const mbstate_t *\fP\fIps\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+If \fIps\fP is not a null pointer, the \fImbsinit\fP() function shall
+determine whether the object pointed to by \fIps\fP
+describes an initial conversion state.
+.SH RETURN VALUE
+.LP
+The \fImbsinit\fP() function shall return non-zero if \fIps\fP is
+a null pointer, or if the pointed-to object describes an
+initial conversion state; otherwise, it shall return zero.
+.LP
+If an \fBmbstate_t\fP object is altered by any of the functions described
+as "restartable", and is then used with a different
+character sequence, or in the other conversion direction, or with
+a different \fILC_CTYPE\fP category setting than on earlier
+function calls, the behavior is undefined.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fBmbstate_t\fP object is used to describe the current conversion
+state from a particular character sequence to a
+wide-character sequence (or \fIvice versa\fP) under the rules of a
+particular setting of the \fILC_CTYPE\fP category of the
+current locale.
+.LP
+The initial conversion state corresponds, for a conversion in either
+direction, to the beginning of a new character sequence in
+the initial shift state. A zero valued \fBmbstate_t\fP object is at
+least one way to describe an initial conversion state. A zero
+valued \fBmbstate_t\fP object can be used to initiate conversion involving
+any character sequence, in any \fILC_CTYPE\fP category
+setting.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fImbrlen\fP(), \fImbrtowc\fP(), \fIwcrtomb\fP(), \fImbsrtowcs\fP(),
+\fIwcsrtombs\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/mbsrtowcs.3p b/man-pages-posix-2003/man3p/mbsrtowcs.3p
new file mode 100644
index 0000000..021f699
--- /dev/null
+++ b/man-pages-posix-2003/man3p/mbsrtowcs.3p
@@ -0,0 +1,110 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MBSRTOWCS" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" mbsrtowcs
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+mbsrtowcs \- convert a character string to a wide-character string
+(restartable)
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+size_t mbsrtowcs(wchar_t *restrict\fP \fIdst\fP\fB, const char **restrict\fP
+\fIsrc\fP\fB,
+.br
+\ \ \ \ \ \ size_t\fP \fIlen\fP\fB, mbstate_t *restrict\fP \fIps\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fImbsrtowcs\fP() function shall convert a sequence of characters,
+beginning in the conversion state described by the
+object pointed to by \fIps\fP, from the array indirectly pointed to
+by \fIsrc\fP into a sequence of corresponding wide
+characters. If \fIdst\fP is not a null pointer, the converted characters
+shall be stored into the array pointed to by \fIdst\fP.
+Conversion continues up to and including a terminating null character,
+which shall also be stored. Conversion shall stop early in
+either of the following cases:
+.IP " *" 3
+A sequence of bytes is encountered that does not form a valid character.
+.LP
+.IP " *" 3
+\fIlen\fP codes have been stored into the array pointed to by \fIdst\fP
+(and \fIdst\fP is not a null pointer).
+.LP
+.LP
+Each conversion shall take place as if by a call to the \fImbrtowc\fP()
+function.
+.LP
+If \fIdst\fP is not a null pointer, the pointer object pointed to
+by \fIsrc\fP shall be assigned either a null pointer (if
+conversion stopped due to reaching a terminating null character) or
+the address just past the last character converted (if any). If
+conversion stopped due to reaching a terminating null character, and
+if \fIdst\fP is not a null pointer, the resulting state
+described shall be the initial conversion state.
+.LP
+If \fIps\fP is a null pointer, the \fImbsrtowcs\fP() function shall
+use its own internal \fBmbstate_t\fP object, which is
+initialized at program start-up to the initial conversion state. Otherwise,
+the \fBmbstate_t\fP object pointed to by \fIps\fP
+shall be used to completely describe the current conversion state
+of the associated character sequence. The implementation behaves
+as if no function defined in this volume of IEEE\ Std\ 1003.1-2001
+calls \fImbsrtowcs\fP().
+.LP
+The behavior of this function shall be affected by the \fILC_CTYPE\fP
+category of the current locale.
+.SH RETURN VALUE
+.LP
+If the input conversion encounters a sequence of bytes that do not
+form a valid character, an encoding error occurs. In this
+case, the \fImbsrtowcs\fP() function stores the value of the macro
+[EILSEQ] in \fIerrno\fP and shall return (\fBsize_t\fP)-1;
+the conversion state is undefined. Otherwise, it shall return the
+number of characters successfully converted, not including the
+terminating null (if any).
+.SH ERRORS
+.LP
+The \fImbsrtowcs\fP() function may fail if:
+.TP 7
+.B EINVAL
+\fIps\fP points to an object that contains an invalid conversion state.
+.TP 7
+.B EILSEQ
+Invalid character sequence is detected.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fImbsinit\fP(), \fImbrtowc\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/mbstowcs.3p b/man-pages-posix-2003/man3p/mbstowcs.3p
new file mode 100644
index 0000000..b761c21
--- /dev/null
+++ b/man-pages-posix-2003/man3p/mbstowcs.3p
@@ -0,0 +1,89 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MBSTOWCS" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" mbstowcs
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+mbstowcs \- convert a character string to a wide-character string
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+size_t mbstowcs(wchar_t *restrict\fP \fIpwcs\fP\fB, const char *restrict\fP
+\fIs\fP\fB,
+.br
+\ \ \ \ \ \ size_t\fP \fIn\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fImbstowcs\fP() function shall convert a sequence of characters
+that begins in the initial shift state from the array
+pointed to by \fIs\fP into a sequence of corresponding wide-character
+codes and shall store not more than \fIn\fP wide-character
+codes into the array pointed to by \fIpwcs\fP. No characters that
+follow a null byte (which is converted into a wide-character
+code with value 0) shall be examined or converted. Each character
+shall be converted as if by a call to \fImbtowc\fP(), except that
+the shift state of \fImbtowc\fP() is not affected.
+.LP
+No more than \fIn\fP elements shall be modified in the array pointed
+to by \fIpwcs\fP. If copying takes place between objects
+that overlap, the behavior is undefined.
+.LP
+The behavior of this function shall be affected by the \fILC_CTYPE\fP
+category of the current locale. If
+\fIpwcs\fP is a null pointer, \fImbstowcs\fP() shall return the length
+required to convert the entire array regardless of the
+value of \fIn\fP, but no values are stored.
+.SH RETURN VALUE
+.LP
+If an invalid character is encountered, \fImbstowcs\fP() shall return
+(\fBsize_t\fP)-1 and may set
+\fIerrno\fP to indicate the error.
+.LP
+Otherwise, \fImbstowcs\fP() shall return the number of the array elements
+modified (or required
+if \fIpwcs\fP is null), not including a terminating 0 code, if
+any. The array shall not be zero-terminated if the value returned
+is \fIn\fP.
+.SH ERRORS
+.LP
+The \fImbstowcs\fP() function may fail if:
+.TP 7
+.B EILSEQ
+Invalid byte sequence is detected.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fImblen\fP(), \fImbtowc\fP(), \fIwctomb\fP(),
+\fIwcstombs\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/mbtowc.3p b/man-pages-posix-2003/man3p/mbtowc.3p
new file mode 100644
index 0000000..33bbd58
--- /dev/null
+++ b/man-pages-posix-2003/man3p/mbtowc.3p
@@ -0,0 +1,97 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MBTOWC" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" mbtowc
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+mbtowc \- convert a character to a wide-character code
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+int mbtowc(wchar_t *restrict\fP \fIpwc\fP\fB, const char *restrict\fP
+\fIs\fP\fB, size_t\fP \fIn\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+If \fIs\fP is not a null pointer, \fImbtowc\fP() shall determine the
+number of bytes that constitute the character pointed to
+by \fIs\fP. It shall then determine the wide-character code for the
+value of type \fBwchar_t\fP that corresponds to that
+character. (The value of the wide-character code corresponding to
+the null byte is 0.) If the character is valid and \fIpwc\fP is
+not a null pointer, \fImbtowc\fP() shall store the wide-character
+code in the object pointed to by \fIpwc\fP.
+.LP
+The behavior of this function is affected by the \fILC_CTYPE\fP category
+of the current locale. For a state-dependent encoding,
+this function is placed into its initial state by a call for which
+its character pointer argument, \fIs\fP, is a null pointer.
+Subsequent calls with \fIs\fP as other than a null pointer shall cause
+the internal state of the function to be altered as
+necessary. A call with \fIs\fP as a null pointer shall cause this
+function to return a non-zero value if encodings have state
+dependency, and 0 otherwise. If the implementation employs special
+bytes to change the shift state, these bytes shall not produce
+separate wide-character codes, but shall be grouped with an adjacent
+character. Changing the \fILC_CTYPE\fP category causes the
+shift state of this function to be unspecified. At most \fIn\fP bytes
+of the array pointed to by \fIs\fP shall be examined.
+.LP
+The implementation shall behave as if no function defined in this
+volume of IEEE\ Std\ 1003.1-2001 calls
+\fImbtowc\fP().
+.SH RETURN VALUE
+.LP
+If \fIs\fP is a null pointer, \fImbtowc\fP() shall return a non-zero
+or 0 value, if character encodings, respectively, do or
+do not have state-dependent encodings. If \fIs\fP is not a null pointer,
+\fImbtowc\fP() shall either return 0 (if \fIs\fP points
+to the null byte), or return the number of bytes that constitute the
+converted character (if the next \fIn\fP or fewer bytes form
+a valid character), or return -1 and may set \fIerrno\fP to indicate
+the error (if they do not form a valid character).
+.LP
+In no case shall the value returned be greater than \fIn\fP or the
+value of the {MB_CUR_MAX} macro.
+.SH ERRORS
+.LP
+The \fImbtowc\fP() function may fail if:
+.TP 7
+.B EILSEQ
+Invalid character sequence is detected.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fImblen\fP(), \fImbstowcs\fP(), \fIwctomb\fP(), \fIwcstombs\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/memccpy.3p b/man-pages-posix-2003/man3p/memccpy.3p
new file mode 100644
index 0000000..2d38b4c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/memccpy.3p
@@ -0,0 +1,66 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MEMCCPY" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" memccpy
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+memccpy \- copy bytes in memory
+.SH SYNOPSIS
+.LP
+\fB#include <string.h>
+.br
+.sp
+void *memccpy(void *restrict\fP \fIs1\fP\fB, const void *restrict\fP
+\fIs2\fP\fB,
+.br
+\ \ \ \ \ \ int\fP \fIc\fP\fB, size_t\fP \fIn\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fImemccpy\fP() function shall copy bytes from memory area \fIs2\fP
+into \fIs1\fP, stopping after the first occurrence of
+byte \fIc\fP (converted to an \fBunsigned char\fP) is copied, or after
+\fIn\fP bytes are copied, whichever comes first. If
+copying takes place between objects that overlap, the behavior is
+undefined.
+.SH RETURN VALUE
+.LP
+The \fImemccpy\fP() function shall return a pointer to the byte after
+the copy of \fIc\fP in \fIs1\fP, or a null pointer if
+\fIc\fP was not found in the first \fIn\fP bytes of \fIs2\fP.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fImemccpy\fP() function does not check for the overflow of the
+receiving memory area.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<string.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/memchr.3p b/man-pages-posix-2003/man3p/memchr.3p
new file mode 100644
index 0000000..51f6d88
--- /dev/null
+++ b/man-pages-posix-2003/man3p/memchr.3p
@@ -0,0 +1,60 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MEMCHR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" memchr
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+memchr \- find byte in memory
+.SH SYNOPSIS
+.LP
+\fB#include <string.h>
+.br
+.sp
+void *memchr(const void *\fP\fIs\fP\fB, int\fP \fIc\fP\fB, size_t\fP
+\fIn\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fImemchr\fP() function shall locate the first occurrence of \fIc\fP
+(converted to an \fBunsigned char\fP) in the initial
+\fIn\fP bytes (each interpreted as \fBunsigned char\fP) of the object
+pointed to by \fIs\fP.
+.SH RETURN VALUE
+.LP
+The \fImemchr\fP() function shall return a pointer to the located
+byte, or a null pointer if the byte does not occur in the
+object.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<string.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/memcmp.3p b/man-pages-posix-2003/man3p/memcmp.3p
new file mode 100644
index 0000000..e0c0a41
--- /dev/null
+++ b/man-pages-posix-2003/man3p/memcmp.3p
@@ -0,0 +1,66 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MEMCMP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" memcmp
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+memcmp \- compare bytes in memory
+.SH SYNOPSIS
+.LP
+\fB#include <string.h>
+.br
+.sp
+int memcmp(const void *\fP\fIs1\fP\fB, const void *\fP\fIs2\fP\fB,
+size_t\fP \fIn\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fImemcmp\fP() function shall compare the first \fIn\fP bytes
+(each interpreted as \fBunsigned char\fP) of the object
+pointed to by \fIs1\fP to the first \fIn\fP bytes of the object pointed
+to by \fIs2\fP.
+.LP
+The sign of a non-zero return value shall be determined by the sign
+of the difference between the values of the first pair of
+bytes (both interpreted as type \fBunsigned char\fP) that differ in
+the objects being compared.
+.SH RETURN VALUE
+.LP
+The \fImemcmp\fP() function shall return an integer greater than,
+equal to, or less than 0, if the object pointed to by
+\fIs1\fP is greater than, equal to, or less than the object pointed
+to by \fIs2\fP, respectively.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<string.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/memcpy.3p b/man-pages-posix-2003/man3p/memcpy.3p
new file mode 100644
index 0000000..6a1e165
--- /dev/null
+++ b/man-pages-posix-2003/man3p/memcpy.3p
@@ -0,0 +1,60 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MEMCPY" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" memcpy
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+memcpy \- copy bytes in memory
+.SH SYNOPSIS
+.LP
+\fB#include <string.h>
+.br
+.sp
+void *memcpy(void *restrict\fP \fIs1\fP\fB, const void *restrict\fP
+\fIs2\fP\fB, size_t\fP \fIn\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fImemcpy\fP() function shall copy \fIn\fP bytes from the object
+pointed to by \fIs2\fP into the object pointed to by
+\fIs1\fP. If copying takes place between objects that overlap, the
+behavior is undefined.
+.SH RETURN VALUE
+.LP
+The \fImemcpy\fP() function shall return \fIs1\fP; no return value
+is reserved to indicate an error.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fImemcpy\fP() function does not check for the overflow of the
+receiving memory area.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<string.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/memmove.3p b/man-pages-posix-2003/man3p/memmove.3p
new file mode 100644
index 0000000..c544392
--- /dev/null
+++ b/man-pages-posix-2003/man3p/memmove.3p
@@ -0,0 +1,62 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MEMMOVE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" memmove
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+memmove \- copy bytes in memory with overlapping areas
+.SH SYNOPSIS
+.LP
+\fB#include <string.h>
+.br
+.sp
+void *memmove(void *\fP\fIs1\fP\fB, const void *\fP\fIs2\fP\fB, size_t\fP
+\fIn\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fImemmove\fP() function shall copy \fIn\fP bytes from the object
+pointed to by \fIs2\fP into the object pointed to by
+\fIs1\fP. Copying takes place as if the \fIn\fP bytes from the object
+pointed to by \fIs2\fP are first copied into a temporary
+array of \fIn\fP bytes that does not overlap the objects pointed to
+by \fIs1\fP and \fIs2\fP, and then the \fIn\fP bytes from
+the temporary array are copied into the object pointed to by \fIs1\fP.
+.SH RETURN VALUE
+.LP
+The \fImemmove\fP() function shall return \fIs1\fP; no return value
+is reserved to indicate an error.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<string.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/memset.3p b/man-pages-posix-2003/man3p/memset.3p
new file mode 100644
index 0000000..cfdbddb
--- /dev/null
+++ b/man-pages-posix-2003/man3p/memset.3p
@@ -0,0 +1,57 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MEMSET" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" memset
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+memset \- set bytes in memory
+.SH SYNOPSIS
+.LP
+\fB#include <string.h>
+.br
+.sp
+void *memset(void *\fP\fIs\fP\fB, int\fP \fIc\fP\fB, size_t\fP \fIn\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fImemset\fP() function shall copy \fIc\fP (converted to an \fBunsigned
+char\fP) into each of the first \fIn\fP bytes of
+the object pointed to by \fIs\fP.
+.SH RETURN VALUE
+.LP
+The \fImemset\fP() function shall return \fIs\fP; no return value
+is reserved to indicate an error.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<string.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/mkdir.3p b/man-pages-posix-2003/man3p/mkdir.3p
new file mode 100644
index 0000000..e4d5a9a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/mkdir.3p
@@ -0,0 +1,166 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MKDIR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" mkdir
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+mkdir \- make a directory
+.SH SYNOPSIS
+.LP
+\fB#include <sys/stat.h>
+.br
+.sp
+int mkdir(const char *\fP\fIpath\fP\fB, mode_t\fP \fImode\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fImkdir\fP() function shall create a new directory with name
+\fIpath\fP. The file permission bits of the new directory
+shall be initialized from \fImode\fP. These file permission bits of
+the \fImode\fP argument shall be modified by the process'
+file creation mask.
+.LP
+When bits in \fImode\fP other than the file permission bits are set,
+the meaning of these additional bits is
+implementation-defined.
+.LP
+The directory's user ID shall be set to the process' effective user
+ID. The directory's group ID shall be set to the group ID of
+the parent directory or to the effective group ID of the process.
+Implementations shall provide a way to initialize the directory's
+group ID to the group ID of the parent directory. Implementations
+may, but need not, provide an implementation-defined way to
+initialize the directory's group ID to the effective group ID of the
+calling process.
+.LP
+The newly created directory shall be an empty directory.
+.LP
+If \fIpath\fP names a symbolic link, \fImkdir\fP() shall fail and
+set \fIerrno\fP to [EEXIST].
+.LP
+Upon successful completion, \fImkdir\fP() shall mark for update the
+\fIst_atime\fP, \fIst_ctime\fP, and \fIst_mtime\fP
+fields of the directory. Also, the \fIst_ctime\fP and \fIst_mtime\fP
+fields of the directory that contains the new entry shall be
+marked for update.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fImkdir\fP() shall return 0. Otherwise,
+-1 shall be returned, no directory shall be created, and
+\fIerrno\fP shall be set to indicate the error.
+.SH ERRORS
+.LP
+The \fImkdir\fP() function shall fail if:
+.TP 7
+.B EACCES
+Search permission is denied on a component of the path prefix, or
+write permission is denied on the parent directory of the
+directory to be created.
+.TP 7
+.B EEXIST
+The named file exists.
+.TP 7
+.B ELOOP
+A loop exists in symbolic links encountered during resolution of the
+\fIpath\fP argument.
+.TP 7
+.B EMLINK
+The link count of the parent directory would exceed {LINK_MAX}.
+.TP 7
+.B ENAMETOOLONG
+The length of the \fIpath\fP argument exceeds {PATH_MAX} or a pathname
+component is longer than {NAME_MAX}.
+.TP 7
+.B ENOENT
+A component of the path prefix specified by \fIpath\fP does not name
+an existing directory or \fIpath\fP is an empty
+string.
+.TP 7
+.B ENOSPC
+The file system does not contain enough space to hold the contents
+of the new directory or to extend the parent directory of
+the new directory.
+.TP 7
+.B ENOTDIR
+A component of the path prefix is not a directory.
+.TP 7
+.B EROFS
+The parent directory resides on a read-only file system.
+.sp
+.LP
+The \fImkdir\fP() function may fail if:
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the \fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+As a result of encountering a symbolic link in resolution of the \fIpath\fP
+argument, the length of the substituted pathname
+string exceeded {PATH_MAX}.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Creating a Directory
+.LP
+The following example shows how to create a directory named \fB/home/cnd/mod1\fP,
+with read/write/search permissions for owner
+and group, and with read/search permissions for others.
+.sp
+.RS
+.nf
+
+\fB#include <sys/types.h>
+#include <sys/stat.h>
+.sp
+
+int status;
+\&...
+status = mkdir("/home/cnd/mod1", S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fImkdir\fP() function originated in 4.2 BSD and was added to
+System V in Release 3.0.
+.LP
+4.3 BSD detects [ENAMETOOLONG].
+.LP
+The POSIX.1-1990 standard required that the group ID of a newly created
+directory be set to the group ID of its parent directory
+or to the effective group ID of the creating process. FIPS 151-2 required
+that implementations provide a way to have the group ID
+be set to the group ID of the containing directory, but did not prohibit
+implementations also supporting a way to set the group ID
+to the effective group ID of the creating process. Conforming applications
+should not assume which group ID will be used. If it
+matters, an application can use \fIchown\fP() to set the group ID
+after the directory is
+created, or determine under what conditions the implementation will
+set the desired group ID.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIumask\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<sys/stat.h>\fP, \fI<sys/types.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/mkfifo.3p b/man-pages-posix-2003/man3p/mkfifo.3p
new file mode 100644
index 0000000..fdcad71
--- /dev/null
+++ b/man-pages-posix-2003/man3p/mkfifo.3p
@@ -0,0 +1,165 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MKFIFO" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" mkfifo
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+mkfifo \- make a FIFO special file
+.SH SYNOPSIS
+.LP
+\fB#include <sys/stat.h>
+.br
+.sp
+int mkfifo(const char *\fP\fIpath\fP\fB, mode_t\fP \fImode\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fImkfifo\fP() function shall create a new FIFO special file named
+by the pathname pointed to by \fIpath\fP. The file
+permission bits of the new FIFO shall be initialized from \fImode\fP.
+The file permission bits of the \fImode\fP argument shall
+be modified by the process' file creation mask.
+.LP
+When bits in \fImode\fP other than the file permission bits are set,
+the effect is implementation-defined.
+.LP
+If \fIpath\fP names a symbolic link, \fImkfifo\fP() shall fail and
+set \fIerrno\fP to [EEXIST].
+.LP
+The FIFO's user ID shall be set to the process' effective user ID.
+The FIFO's group ID shall be set to the group ID of the
+parent directory or to the effective group ID of the process. Implementations
+shall provide a way to initialize the FIFO's group ID
+to the group ID of the parent directory. Implementations may, but
+need not, provide an implementation-defined way to initialize the
+FIFO's group ID to the effective group ID of the calling process.
+.LP
+Upon successful completion, \fImkfifo\fP() shall mark for update the
+\fIst_atime\fP, \fIst_ctime\fP, and \fIst_mtime\fP
+fields of the file. Also, the \fIst_ctime\fP and \fIst_mtime\fP fields
+of the directory that contains the new entry shall be
+marked for update.
+.SH RETURN VALUE
+.LP
+Upon successful completion, 0 shall be returned. Otherwise, -1 shall
+be returned, no FIFO shall be created, and \fIerrno\fP
+shall be set to indicate the error.
+.SH ERRORS
+.LP
+The \fImkfifo\fP() function shall fail if:
+.TP 7
+.B EACCES
+A component of the path prefix denies search permission, or write
+permission is denied on the parent directory of the FIFO to
+be created.
+.TP 7
+.B EEXIST
+The named file already exists.
+.TP 7
+.B ELOOP
+A loop exists in symbolic links encountered during resolution of the
+\fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+The length of the \fIpath\fP argument exceeds {PATH_MAX} or a pathname
+component is longer than {NAME_MAX}.
+.TP 7
+.B ENOENT
+A component of the path prefix specified by \fIpath\fP does not name
+an existing directory or \fIpath\fP is an empty
+string.
+.TP 7
+.B ENOSPC
+The directory that would contain the new file cannot be extended or
+the file system is out of file-allocation resources.
+.TP 7
+.B ENOTDIR
+A component of the path prefix is not a directory.
+.TP 7
+.B EROFS
+The named file resides on a read-only file system.
+.sp
+.LP
+The \fImkfifo\fP() function may fail if:
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the \fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+As a result of encountering a symbolic link in resolution of the \fIpath\fP
+argument, the length of the substituted pathname
+string exceeded {PATH_MAX}.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Creating a FIFO File
+.LP
+The following example shows how to create a FIFO file named \fB/home/cnd/mod_done\fP,
+with read/write permissions for owner,
+and with read permissions for group and others.
+.sp
+.RS
+.nf
+
+\fB#include <sys/types.h>
+#include <sys/stat.h>
+.sp
+
+int status;
+\&...
+status = mkfifo("/home/cnd/mod_done", S_IWUSR | S_IRUSR |
+ S_IRGRP | S_IROTH);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The syntax of this function is intended to maintain compatibility
+with historical implementations of \fImknod\fP(). The latter function
+was included in the 1984 /usr/group standard but only for use in
+creating FIFO special files. The \fImknod\fP() function was originally
+excluded from the
+POSIX.1-1988 standard as implementation-defined and replaced by \fImkdir\fP()
+and
+\fImkfifo\fP(). The \fImknod\fP() function is now included for alignment
+with the Single
+UNIX Specification.
+.LP
+The POSIX.1-1990 standard required that the group ID of a newly created
+FIFO be set to the group ID of its parent directory or
+to the effective group ID of the creating process. FIPS 151-2 required
+that implementations provide a way to have the group ID be
+set to the group ID of the containing directory, but did not prohibit
+implementations also supporting a way to set the group ID to
+the effective group ID of the creating process. Conforming applications
+should not assume which group ID will be used. If it
+matters, an application can use \fIchown\fP() to set the group ID
+after the FIFO is created,
+or determine under what conditions the implementation will set the
+desired group ID.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIumask\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<sys/stat.h>\fP, \fI<sys/types.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/mknod.3p b/man-pages-posix-2003/man3p/mknod.3p
new file mode 100644
index 0000000..8b49b9e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/mknod.3p
@@ -0,0 +1,212 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MKNOD" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" mknod
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+mknod \- make a directory, a special file, or a regular file
+.SH SYNOPSIS
+.LP
+\fB#include <sys/stat.h>
+.br
+.sp
+int mknod(const char *\fP\fIpath\fP\fB, mode_t\fP \fImode\fP\fB, dev_t\fP
+\fIdev\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fImknod\fP() function shall create a new file named by the pathname
+to which the argument \fIpath\fP points.
+.LP
+The file type for \fIpath\fP is OR'ed into the \fImode\fP argument,
+and the application shall select one of the following
+symbolic constants:
+.TS C
+center; l l.
+\fBName\fP \fBDescription\fP
+S_IFIFO FIFO-special
+S_IFCHR Character-special (non-portable)
+S_IFDIR Directory (non-portable)
+S_IFBLK Block-special (non-portable)
+S_IFREG Regular (non-portable)
+.TE
+.LP
+The only portable use of \fImknod\fP() is to create a FIFO-special
+file. If \fImode\fP is not S_IFIFO or \fIdev\fP is not 0,
+the behavior of \fImknod\fP() is unspecified.
+.LP
+The permissions for the new file are OR'ed into the \fImode\fP argument,
+and may be selected from any combination of the
+following symbolic constants:
+.TS C
+center; l2 l.
+\fBName\fP \fBDescription\fP
+S_ISUID Set user ID on execution.
+S_ISGID Set group ID on execution.
+S_IRWXU Read, write, or execute (search) by owner.
+S_IRUSR Read by owner.
+S_IWUSR Write by owner.
+S_IXUSR Execute (search) by owner.
+S_IRWXG Read, write, or execute (search) by group.
+S_IRGRP Read by group.
+S_IWGRP Write by group.
+S_IXGRP Execute (search) by group.
+S_IRWXO Read, write, or execute (search) by others.
+S_IROTH Read by others.
+S_IWOTH Write by others.
+S_IXOTH Execute (search) by others.
+S_ISVTX On directories, restricted deletion flag.
+.TE
+.LP
+The user ID of the file shall be initialized to the effective user
+ID of the process. The group ID of the file shall be
+initialized to either the effective group ID of the process or the
+group ID of the parent directory. Implementations shall provide
+a way to initialize the file's group ID to the group ID of the parent
+directory. Implementations may, but need not, provide an
+implementation-defined way to initialize the file's group ID to the
+effective group ID of the calling process. The owner, group,
+and other permission bits of \fImode\fP shall be modified by the file
+mode creation mask of the process. The \fImknod\fP()
+function shall clear each bit whose corresponding bit in the file
+mode creation mask of the process is set.
+.LP
+If \fIpath\fP names a symbolic link, \fImknod\fP() shall fail and
+set \fIerrno\fP to [EEXIST].
+.LP
+Upon successful completion, \fImknod\fP() shall mark for update the
+\fIst_atime\fP, \fIst_ctime\fP, and \fIst_mtime\fP
+fields of the file. Also, the \fIst_ctime\fP and \fIst_mtime\fP fields
+of the directory that contains the new entry shall be
+marked for update.
+.LP
+Only a process with appropriate privileges may invoke \fImknod\fP()
+for file types other than FIFO-special.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fImknod\fP() shall return 0. Otherwise,
+it shall return -1, the new file shall not be created, and
+\fIerrno\fP shall be set to indicate the error.
+.SH ERRORS
+.LP
+The \fImknod\fP() function shall fail if:
+.TP 7
+.B EACCES
+A component of the path prefix denies search permission, or write
+permission is denied on the parent directory.
+.TP 7
+.B EEXIST
+The named file exists.
+.TP 7
+.B EINVAL
+An invalid argument exists.
+.TP 7
+.B EIO
+An I/O error occurred while accessing the file system.
+.TP 7
+.B ELOOP
+A loop exists in symbolic links encountered during resolution of the
+\fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+The length of a pathname exceeds {PATH_MAX} or a pathname component
+is longer than {NAME_MAX}.
+.TP 7
+.B ENOENT
+A component of the path prefix specified by \fIpath\fP does not name
+an existing directory or \fIpath\fP is an empty
+string.
+.TP 7
+.B ENOSPC
+The directory that would contain the new file cannot be extended or
+the file system is out of file allocation resources.
+.TP 7
+.B ENOTDIR
+A component of the path prefix is not a directory.
+.TP 7
+.B EPERM
+The invoking process does not have appropriate privileges and the
+file type is not FIFO-special.
+.TP 7
+.B EROFS
+The directory in which the file is to be created is located on a read-only
+file system.
+.sp
+.LP
+The \fImknod\fP() function may fail if:
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the \fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+Pathname resolution of a symbolic link produced an intermediate result
+whose length exceeds {PATH_MAX}.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Creating a FIFO Special File
+.LP
+The following example shows how to create a FIFO special file named
+\fB/home/cnd/mod_done\fP, with read/write permissions for
+owner, and with read permissions for group and others.
+.sp
+.RS
+.nf
+
+\fB#include <sys/types.h>
+#include <sys/stat.h>
+.sp
+
+dev_t dev;
+int status;
+\&...
+status = mknod("/home/cnd/mod_done", S_IFIFO | S_IWUSR |
+ S_IRUSR | S_IRGRP | S_IROTH, dev);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The \fImkfifo\fP() function is preferred over this function for making
+FIFO special
+files.
+.SH RATIONALE
+.LP
+The POSIX.1-1990 standard required that the group ID of a newly created
+file be set to the group ID of its parent directory or
+to the effective group ID of the creating process. FIPS 151-2 required
+that implementations provide a way to have the group ID be
+set to the group ID of the containing directory, but did not prohibit
+implementations also supporting a way to set the group ID to
+the effective group ID of the creating process. Conforming applications
+should not assume which group ID will be used. If it
+matters, an application can use \fIchown\fP() to set the group ID
+after the file is created,
+or determine under what conditions the implementation will set the
+desired group ID.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIchmod\fP(), \fIcreat\fP(), \fIexec\fP(), \fImkdir\fP(), \fImkfifo\fP()
+,
+\fIopen\fP(), \fIstat\fP(), \fIumask\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<sys/stat.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/mkstemp.3p b/man-pages-posix-2003/man3p/mkstemp.3p
new file mode 100644
index 0000000..43aec64
--- /dev/null
+++ b/man-pages-posix-2003/man3p/mkstemp.3p
@@ -0,0 +1,91 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MKSTEMP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" mkstemp
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+mkstemp \- make a unique filename
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+int mkstemp(char *\fP\fItemplate\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fImkstemp\fP() function shall replace the contents of the string
+pointed to by \fItemplate\fP by a unique filename, and
+return a file descriptor for the file open for reading and writing.
+The function thus prevents any possible race condition between
+testing whether the file exists and opening it for use. The string
+in \fItemplate\fP should look like a filename with six trailing
+\fB'X'\fP s; \fImkstemp\fP() replaces each \fB'X'\fP with a character
+from the portable filename character set. The
+characters are chosen such that the resulting name does not duplicate
+the name of an existing file at the time of a call to
+\fImkstemp\fP().
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fImkstemp\fP() shall return an open file
+descriptor. Otherwise, -1 shall be returned if no
+suitable file could be created.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Generating a Filename
+.LP
+The following example creates a file with a 10-character name beginning
+with the characters \fB"file"\fP and opens the file
+for reading and writing. The value returned as the value of \fIfd\fP
+is a file descriptor that identifies the file.
+.sp
+.RS
+.nf
+
+\fB#include <stdlib.h>
+\&...
+char template[] = "/tmp/fileXXXXXX";
+int fd;
+.sp
+
+fd = mkstemp(template);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+It is possible to run out of letters.
+.LP
+The \fImkstemp\fP() function need not check to determine whether the
+filename part of \fItemplate\fP exceeds the maximum
+allowable filename length.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgetpid\fP(), \fIopen\fP(), \fItmpfile\fP(),
+\fItmpnam\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/mktemp.3p b/man-pages-posix-2003/man3p/mktemp.3p
new file mode 100644
index 0000000..ce1437a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/mktemp.3p
@@ -0,0 +1,85 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MKTEMP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" mktemp
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+mktemp \- make a unique filename (\fBLEGACY\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+char *mktemp(char *\fP\fItemplate\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fImktemp\fP() function shall replace the contents of the string
+pointed to by \fItemplate\fP by a unique filename and
+return \fItemplate\fP. The application shall initialize \fItemplate\fP
+to be a filename with six trailing \fB'X'\fP s;
+\fImktemp\fP() shall replace each \fB'X'\fP with a single byte character
+from the portable filename character set.
+.SH RETURN VALUE
+.LP
+The \fImktemp\fP() function shall return the pointer \fItemplate\fP.
+If a unique name cannot be created, \fItemplate\fP shall
+point to a null string.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Generating a Filename
+.LP
+The following example replaces the contents of the \fB"template"\fP
+string with a 10-character filename beginning with the
+characters \fB"file"\fP and returns a pointer to the \fB"template"\fP
+string that contains the new filename.
+.sp
+.RS
+.nf
+
+\fB#include <stdlib.h>
+\&...
+char *template = "/tmp/fileXXXXXX";
+char *ptr;
+.sp
+
+ptr = mktemp(template);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+Between the time a pathname is created and the file opened, it is
+possible for some other process to create a file with the same
+name. The \fImkstemp\fP() function avoids this problem and is preferred
+over this
+function.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+This function may be withdrawn in a future version.
+.SH SEE ALSO
+.LP
+\fImkstemp\fP(), \fItmpfile\fP(), \fItmpnam\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/mktime.3p b/man-pages-posix-2003/man3p/mktime.3p
new file mode 100644
index 0000000..79e93fd
--- /dev/null
+++ b/man-pages-posix-2003/man3p/mktime.3p
@@ -0,0 +1,128 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MKTIME" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" mktime
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+mktime \- convert broken-down time into time since the Epoch
+.SH SYNOPSIS
+.LP
+\fB#include <time.h>
+.br
+.sp
+time_t mktime(struct tm *\fP\fItimeptr\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fImktime\fP() function shall convert the broken-down time, expressed
+as local time, in the structure pointed to by
+\fItimeptr\fP, into a time since the Epoch value with the same encoding
+as that of the values returned by \fItime\fP(). The original values
+of the \fItm_wday\fP and \fItm_yday\fP components of the
+structure are ignored, and the original values of the other components
+are not restricted to the ranges described in \fI<time.h>\fP.
+.LP
+A
+positive or 0 value for \fItm_isdst\fP shall cause \fImktime\fP()
+to presume initially that Daylight Savings Time, respectively,
+is or is not in effect for the specified time. A negative value for
+\fItm_isdst\fP shall cause \fImktime\fP() to attempt to
+determine whether Daylight Savings Time is in effect for the specified
+time.
+.LP
+Local timezone information shall be set as though \fImktime\fP() called
+\fItzset\fP().
+.LP
+The relationship between the \fBtm\fP structure (defined in the \fI<time.h>\fP
+header) and the time in seconds since the Epoch is that the result
+shall be as specified in the expression given in the definition
+of seconds since the Epoch (see the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Section 4.14, Seconds Since the Epoch) corrected for timezone and
+any seasonal time
+adjustments, where the names in the structure and in the expression
+correspond.
+.LP
+Upon successful completion, the values of the \fItm_wday\fP and \fItm_yday\fP
+components of the structure shall be set
+appropriately, and the other components are set to represent the specified
+time since the Epoch, but with their values forced to
+the ranges indicated in the \fI<time.h>\fP entry; the final value
+of \fItm_mday\fP
+shall not be set until \fItm_mon\fP and \fItm_year\fP are determined.
+.SH RETURN VALUE
+.LP
+The \fImktime\fP() function shall return the specified time since
+the Epoch encoded as a value of type \fBtime_t\fP. If the
+time since the Epoch cannot be represented, the function shall return
+the value (\fBtime_t\fP)-1.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+What day of the week is July 4, 2001?
+.sp
+.RS
+.nf
+
+\fB#include <stdio.h>
+#include <time.h>
+.sp
+
+struct tm time_str;
+.sp
+
+char daybuf[20];
+.sp
+
+int main(void)
+{
+ time_str.tm_year = 2001 - 1900;
+ time_str.tm_mon = 7 - 1;
+ time_str.tm_mday = 4;
+ time_str.tm_hour = 0;
+ time_str.tm_min = 0;
+ time_str.tm_sec = 1;
+ time_str.tm_isdst = -1;
+ if (mktime(&time_str) == -1)
+ (void)puts("-unknown-");
+ else {
+ (void)strftime(daybuf, sizeof(daybuf), "%A", &time_str);
+ (void)puts(daybuf);
+ }
+ return 0;
+}
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIasctime\fP(), \fIclock\fP(), \fIctime\fP(),
+\fIdifftime\fP(), \fIgmtime\fP(), \fIlocaltime\fP(), \fIstrftime\fP(),
+\fIstrptime\fP(), \fItime\fP(), \fIutime\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<time.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/mlock.3p b/man-pages-posix-2003/man3p/mlock.3p
new file mode 100644
index 0000000..4252cd3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/mlock.3p
@@ -0,0 +1,127 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MLOCK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" mlock
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+mlock, munlock \- lock or unlock a range of process address space (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <sys/mman.h>
+.br
+.sp
+int mlock(const void *\fP\fIaddr\fP\fB, size_t\fP \fIlen\fP\fB);
+.br
+int munlock(const void *\fP\fIaddr\fP\fB, size_t\fP \fIlen\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fImlock\fP() function shall cause those whole pages containing
+any part of the address space of the process starting at
+address \fIaddr\fP and continuing for \fIlen\fP bytes to be memory-resident
+until unlocked or until the process exits or \fIexec\fPs another process
+image. The implementation may require that \fIaddr\fP be a multiple
+of
+{PAGESIZE}.
+.LP
+The \fImunlock\fP() function shall unlock those whole pages containing
+any part of the address space of the process starting at
+address \fIaddr\fP and continuing for \fIlen\fP bytes, regardless
+of how many times \fImlock\fP() has been called by the process
+for any of the pages in the specified range. The implementation may
+require that \fIaddr\fP be a multiple of {PAGESIZE}.
+.LP
+If any of the pages in the range specified to a call to \fImunlock\fP()
+are also mapped into the address spaces of other
+processes, any locks established on those pages by another process
+are unaffected by the call of this process to \fImunlock\fP().
+If any of the pages in the range specified by a call to \fImunlock\fP()
+are also mapped into other portions of the address space
+of the calling process outside the range specified, any locks established
+on those pages via the other mappings are also unaffected
+by this call.
+.LP
+Upon successful return from \fImlock\fP(), pages in the specified
+range shall be locked and memory-resident. Upon successful
+return from \fImunlock\fP(), pages in the specified range shall be
+unlocked with respect to the address space of the process.
+Memory residency of unlocked pages is unspecified.
+.LP
+The appropriate privilege is required to lock process memory with
+\fImlock\fP().
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fImlock\fP() and \fImunlock\fP()
+functions shall return a value of zero. Otherwise, no change
+is made to any locks in the address space of the process, and the
+function shall return a value of -1 and set \fIerrno\fP to
+indicate the error.
+.SH ERRORS
+.LP
+The \fImlock\fP() and \fImunlock\fP() functions shall fail if:
+.TP 7
+.B ENOMEM
+Some or all of the address range specified by the \fIaddr\fP and \fIlen\fP
+arguments does not correspond to valid mapped
+pages in the address space of the process.
+.sp
+.LP
+The \fImlock\fP() function shall fail if:
+.TP 7
+.B EAGAIN
+Some or all of the memory identified by the operation could not be
+locked when the call was made.
+.sp
+.LP
+The \fImlock\fP() and \fImunlock\fP() functions may fail if:
+.TP 7
+.B EINVAL
+The \fIaddr\fP argument is not a multiple of {PAGESIZE}.
+.sp
+.LP
+The \fImlock\fP() function may fail if:
+.TP 7
+.B ENOMEM
+Locking the pages mapped by the specified range would exceed an implementation-defined
+limit on the amount of memory that the
+process may lock.
+.TP 7
+.B EPERM
+The calling process does not have the appropriate privilege to perform
+the requested operation.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexec\fP(), \fIexit\fP(), \fIfork\fP(), \fImlockall\fP(), \fImunmap\fP(),
+the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<sys/mman.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/mlockall.3p b/man-pages-posix-2003/man3p/mlockall.3p
new file mode 100644
index 0000000..8aec666
--- /dev/null
+++ b/man-pages-posix-2003/man3p/mlockall.3p
@@ -0,0 +1,138 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MLOCKALL" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" mlockall
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+mlockall, munlockall \- lock/unlock the address space of a process
+(\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <sys/mman.h>
+.br
+.sp
+int mlockall(int\fP \fIflags\fP\fB);
+.br
+int munlockall(void); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fImlockall\fP() function shall cause all of the pages mapped
+by the address space of a process to be memory-resident until
+unlocked or until the process exits or \fIexec\fPs another process
+image. The \fIflags\fP
+argument determines whether the pages to be locked are those currently
+mapped by the address space of the process, those that are
+mapped in the future, or both. The \fIflags\fP argument is constructed
+from the bitwise-inclusive OR of one or more of the
+following symbolic constants, defined in \fI<sys/mman.h>\fP:
+.TP 7
+MCL_CURRENT
+Lock all of the pages currently mapped into the address space of the
+process.
+.TP 7
+MCL_FUTURE
+Lock all of the pages that become mapped into the address space of
+the process in the future, when those mappings are
+established.
+.sp
+.LP
+If MCL_FUTURE is specified, and the automatic locking of future mappings
+eventually causes the amount of locked memory to exceed
+the amount of available physical memory or any other implementation-defined
+limit, the behavior is implementation-defined. The
+manner in which the implementation informs the application of these
+situations is also implementation-defined.
+.LP
+The \fImunlockall\fP() function shall unlock all currently mapped
+pages of the address space of the process. Any pages that
+become mapped into the address space of the process after a call to
+\fImunlockall\fP() shall not be locked, unless there is an
+intervening call to \fImlockall\fP() specifying MCL_FUTURE or a subsequent
+call to \fImlockall\fP() specifying MCL_CURRENT. If
+pages mapped into the address space of the process are also mapped
+into the address spaces of other processes and are locked by
+those processes, the locks established by the other processes shall
+be unaffected by a call by this process to
+\fImunlockall\fP().
+.LP
+Upon successful return from the \fImlockall\fP() function that specifies
+MCL_CURRENT, all currently mapped pages of the
+process' address space shall be memory-resident and locked. Upon return
+from the \fImunlockall\fP() function, all currently mapped
+pages of the process' address space shall be unlocked with respect
+to the process' address space. The memory residency of unlocked
+pages is unspecified.
+.LP
+The appropriate privilege is required to lock process memory with
+\fImlockall\fP().
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fImlockall\fP() function shall return
+a value of zero. Otherwise, no additional memory shall
+be locked, and the function shall return a value of -1 and set \fIerrno\fP
+to indicate the error. The effect of failure of
+\fImlockall\fP() on previously existing locks in the address space
+is unspecified.
+.LP
+If it is supported by the implementation, the \fImunlockall\fP() function
+shall always return a value of zero. Otherwise, the
+function shall return a value of -1 and set \fIerrno\fP to indicate
+the error.
+.SH ERRORS
+.LP
+The \fImlockall\fP() function shall fail if:
+.TP 7
+.B EAGAIN
+Some or all of the memory identified by the operation could not be
+locked when the call was made.
+.TP 7
+.B EINVAL
+The \fIflags\fP argument is zero, or includes unimplemented flags.
+.sp
+.LP
+The \fImlockall\fP() function may fail if:
+.TP 7
+.B ENOMEM
+Locking all of the pages currently mapped into the address space of
+the process would exceed an implementation-defined limit on
+the amount of memory that the process may lock.
+.TP 7
+.B EPERM
+The calling process does not have the appropriate privilege to perform
+the requested operation.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexec\fP(), \fIexit\fP(), \fIfork\fP(), \fImlock\fP(), \fImunmap\fP(),
+the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<sys/mman.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/mmap.3p b/man-pages-posix-2003/man3p/mmap.3p
new file mode 100644
index 0000000..cd51795
--- /dev/null
+++ b/man-pages-posix-2003/man3p/mmap.3p
@@ -0,0 +1,515 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MMAP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" mmap
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+mmap \- map pages of memory
+.SH SYNOPSIS
+.LP
+\fB#include <sys/mman.h>
+.br
+.sp
+void *mmap(void *\fP\fIaddr\fP\fB, size_t\fP \fIlen\fP\fB, int\fP
+\fIprot\fP\fB, int\fP \fIflags\fP\fB,
+.br
+\ \ \ \ \ \ int\fP \fIfildes\fP\fB, off_t\fP \fIoff\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fImmap\fP() function shall establish a mapping between a process'
+address space and a file, shared memory object, or
+\ typed memory object. The format of the call is as
+follows:
+.sp
+.RS
+.nf
+
+\fIpa\fP\fB=\fP\fImmap\fP\fB(\fP\fIaddr\fP\fB,\fP \fIlen\fP\fB,\fP \fIprot\fP\fB,\fP \fIflags\fP\fB,\fP \fIfildes\fP\fB,\fP \fIoff\fP\fB);
+\fP
+.fi
+.RE
+.LP
+The \fImmap\fP() function shall establish a mapping between the address
+space of the process at an address \fIpa\fP for
+\fIlen\fP bytes to the memory object represented by the file descriptor
+\fIfildes\fP at offset \fIoff\fP for \fIlen\fP bytes.
+The value of \fIpa\fP is an implementation-defined function of the
+parameter \fIaddr\fP and the values of \fIflags\fP, further
+described below. A successful \fImmap\fP() call shall return \fIpa\fP
+as its result. The address range starting at \fIpa\fP and
+continuing for \fIlen\fP bytes shall be legitimate for the possible
+(not necessarily current) address space of the process. The
+range of bytes starting at \fIoff\fP and continuing for \fIlen\fP
+bytes shall be legitimate for the possible (not necessarily
+current) offsets in the file, shared memory object, or typed memory
+object represented by \fIfildes\fP.
+.LP
+If \fIfildes\fP represents a typed memory object opened with either
+the POSIX_TYPED_MEM_ALLOCATE flag or the
+POSIX_TYPED_MEM_ALLOCATE_CONTIG flag, the memory object to be mapped
+shall be that portion of the typed memory object allocated by
+the implementation as specified below. In this case, if \fIoff\fP
+is non-zero, the behavior of \fImmap\fP() is undefined. If
+\fIfildes\fP refers to a valid typed memory object that is not accessible
+from the calling process, \fImmap\fP() shall fail.
+.LP
+The mapping established by \fImmap\fP() shall replace any previous
+mappings for those whole pages containing any part of the
+address space of the process starting at \fIpa\fP and continuing for
+\fIlen\fP bytes.
+.LP
+If the size of the mapped file changes after the call to \fImmap\fP()
+as a result of some other operation on the mapped file,
+the effect of references to portions of the mapped region that correspond
+to added or removed portions of the file is
+unspecified.
+.LP
+The \fImmap\fP() function shall be supported for regular files, shared
+memory objects, and typed memory
+objects. Support for any other type of file is unspecified.
+.LP
+The parameter \fIprot\fP determines whether read, write, execute,
+or some combination of accesses are permitted to the data
+being mapped. The \fIprot\fP shall be either PROT_NONE or the bitwise-inclusive
+OR of one or more of the other flags in the
+following table, defined in the \fI<sys/mman.h>\fP header.
+.TS C
+center; l l.
+\fBSymbolic Constant\fP \fBDescription\fP
+PROT_READ Data can be read.
+PROT_WRITE Data can be written.
+PROT_EXEC Data can be executed.
+PROT_NONE Data cannot be accessed.
+.TE
+.LP
+If an implementation cannot support the combination of access types
+specified by \fIprot\fP, the call to \fImmap\fP() shall
+fail.
+.LP
+An implementation may permit accesses other than those specified by
+\fIprot\fP; however, if
+the Memory Protection option is supported, the implementation shall
+not permit a write to succeed where PROT_WRITE has not been set
+or shall not permit any access where PROT_NONE alone has been set.
+The implementation shall support at least the following values
+of \fIprot\fP: PROT_NONE, PROT_READ, PROT_WRITE, and the bitwise-inclusive
+OR of PROT_READ and PROT_WRITE. If the Memory Protection option is
+not supported, the result of any access
+that conflicts with the specified protection is undefined. The file
+descriptor \fIfildes\fP shall have been opened with read
+permission, regardless of the protection options specified. If PROT_WRITE
+is specified, the application shall ensure that it has
+opened the file descriptor \fIfildes\fP with write permission unless
+MAP_PRIVATE is specified in the \fIflags\fP parameter as
+described below.
+.LP
+The parameter \fIflags\fP provides other information about the handling
+of the mapped data. The value of \fIflags\fP is the
+bitwise-inclusive OR of these options, defined in \fI<sys/mman.h>\fP:
+.TS C
+center; l l.
+\fBSymbolic Constant\fP \fBDescription\fP
+MAP_SHARED Changes are shared.
+MAP_PRIVATE Changes are private.
+MAP_FIXED Interpret \fIaddr\fP exactly.
+.TE
+.LP
+Implementations that do not support the Memory Mapped Files option
+are not required to support MAP_PRIVATE.
+.LP
+It is implementation-defined whether MAP_FIXED shall be supported.
+\ MAP_FIXED shall be supported on XSI-conformant systems.
+.LP
+MAP_SHARED and MAP_PRIVATE describe the disposition of write references
+to the memory object. If MAP_SHARED is specified, write
+references shall change the underlying object. If MAP_PRIVATE is specified,
+modifications to the mapped data by the calling process
+shall be visible only to the calling process and shall not change
+the underlying object. It is unspecified whether modifications to
+the underlying object done after the MAP_PRIVATE mapping is established
+are visible through the MAP_PRIVATE mapping. Either
+MAP_SHARED or MAP_PRIVATE can be specified, but not both. The mapping
+type is retained across \fIfork\fP().
+.LP
+When \fIfildes\fP represents a typed memory object opened with either
+the POSIX_TYPED_MEM_ALLOCATE flag or the
+POSIX_TYPED_MEM_ALLOCATE_CONTIG flag, \fImmap\fP() shall, if there
+are enough resources available, map \fIlen\fP bytes allocated
+from the corresponding typed memory object which were not previously
+allocated to any process in any processor that may access that
+typed memory object. If there are not enough resources available,
+the function shall fail. If \fIfildes\fP represents a typed
+memory object opened with the POSIX_TYPED_MEM_ALLOCATE_CONTIG flag,
+these allocated bytes shall be contiguous within the typed
+memory object. If \fIfildes\fP represents a typed memory object opened
+with the POSIX_TYPED_MEM_ALLOCATE flag, these allocated
+bytes may be composed of non-contiguous fragments within the typed
+memory object. If \fIfildes\fP represents a typed memory object
+opened with neither the POSIX_TYPED_MEM_ALLOCATE_CONTIG flag nor the
+POSIX_TYPED_MEM_ALLOCATE flag, \fIlen\fP bytes starting at
+offset \fIoff\fP within the typed memory object are mapped, exactly
+as when mapping a file or shared memory object. In this case,
+if two processes map an area of typed memory using the same \fIoff\fP
+and \fIlen\fP values and using file descriptors that refer
+to the same memory pool (either from the same port or from a different
+port), both processes shall map the same region of storage.
+.LP
+When MAP_FIXED is set in the \fIflags\fP argument, the implementation
+is informed that the value of \fIpa\fP shall be
+\fIaddr\fP, exactly. If MAP_FIXED is set, \fImmap\fP() may return
+MAP_FAILED and set \fIerrno\fP to [EINVAL]. If a MAP_FIXED
+request is successful, the mapping established by \fImmap\fP() replaces
+any previous mappings for the process' pages in the range
+[\fIpa\fP,\fIpa\fP+\fIlen\fP).
+.LP
+When MAP_FIXED is not set, the implementation uses \fIaddr\fP in an
+implementation-defined manner to arrive at \fIpa\fP. The
+\fIpa\fP so chosen shall be an area of the address space that the
+implementation deems suitable for a mapping of \fIlen\fP bytes
+to the file. All implementations interpret an \fIaddr\fP value of
+0 as granting the implementation complete freedom in selecting
+\fIpa\fP, subject to constraints described below. A non-zero value
+of \fIaddr\fP is taken to be a suggestion of a process address
+near which the mapping should be placed. When the implementation selects
+a value for \fIpa\fP, it never places a mapping at
+address 0, nor does it replace any extant mapping.
+.LP
+The \fIoff\fP argument is constrained to be aligned and sized according
+to the value returned by \fIsysconf\fP() when passed _SC_PAGESIZE
+or _SC_PAGE_SIZE. When MAP_FIXED is specified, the
+application shall ensure that the argument \fIaddr\fP also meets these
+constraints. The implementation performs mapping operations
+over whole pages. Thus, while the argument \fIlen\fP need not meet
+a size or alignment constraint, the implementation shall
+include, in any mapping operation, any partial page specified by the
+range [\fIpa\fP,\fIpa\fP+\fIlen\fP).
+.LP
+The system shall always zero-fill any partial page at the end of an
+object. Further, the system shall never write out any
+modified portions of the last page of an object which are beyond its
+end. References
+within the address range starting at \fIpa\fP and continuing for \fIlen\fP
+bytes to whole pages following the end of an object
+shall result in delivery of a SIGBUS signal.
+.LP
+An implementation may generate SIGBUS signals when a reference would
+cause an error in the mapped object, such as out-of-space
+condition.
+.LP
+The \fImmap\fP() function shall add an extra reference to the file
+associated with the file descriptor \fIfildes\fP which is
+not removed by a subsequent \fIclose\fP() on that file descriptor.
+This reference shall be
+removed when there are no more mappings to the file.
+.LP
+The \fIst_atime\fP field of the mapped file may be marked for update
+at any time between the \fImmap\fP() call and the
+corresponding \fImunmap\fP() call. The initial read or write reference
+to a mapped region
+shall cause the file's \fIst_atime\fP field to be marked for update
+if it has not already been marked for update.
+.LP
+The \fIst_ctime\fP and \fIst_mtime\fP fields of a file that is mapped
+with MAP_SHARED and PROT_WRITE shall be marked for
+update at some point in the interval between a write reference to
+the mapped region and the next call to \fImsync\fP() with MS_ASYNC
+or MS_SYNC for that portion of the file by any process. If there is
+no
+such call and if the underlying file is modified as a result of a
+write reference, then these fields shall be marked for update at
+some time after the write reference.
+.LP
+There may be implementation-defined limits on the number of memory
+regions that can be mapped (per process or per system).
+.LP
+If such a limit is imposed, whether the number of memory regions that
+can be mapped by a process is decreased by the use of \fIshmat\fP()
+is implementation-defined.
+.LP
+If \fImmap\fP() fails for reasons other than [EBADF], [EINVAL], or
+[ENOTSUP], some of the mappings in the address range
+starting at \fIaddr\fP and continuing for \fIlen\fP bytes may have
+been unmapped.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fImmap\fP() function shall return
+the address at which the mapping was placed ( \fIpa\fP);
+otherwise, it shall return a value of MAP_FAILED and set \fIerrno\fP
+to indicate the error. The symbol MAP_FAILED is defined in
+the \fI<sys/mman.h>\fP header. No successful return from \fImmap\fP()
+shall
+return the value MAP_FAILED.
+.SH ERRORS
+.LP
+The \fImmap\fP() function shall fail if:
+.TP 7
+.B EACCES
+The \fIfildes\fP argument is not open for read, regardless of the
+protection specified, or \fIfildes\fP is not open for write
+and PROT_WRITE was specified for a MAP_SHARED type mapping.
+.TP 7
+.B EAGAIN
+The mapping could not be locked in memory, if required by \fImlockall\fP(),
+due to a lack
+of resources.
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not a valid open file descriptor.
+.TP 7
+.B EINVAL
+The \fIaddr\fP argument (if MAP_FIXED was specified) or \fIoff\fP
+is not a multiple of the page size as returned by \fIsysconf\fP(),
+or is considered invalid by the implementation.
+.TP 7
+.B EINVAL
+The value of \fIflags\fP is invalid (neither MAP_PRIVATE nor MAP_SHARED
+is set).
+.TP 7
+.B EMFILE
+The number of mapped regions would exceed an implementation-defined
+limit (per process or per system).
+.TP 7
+.B ENODEV
+The \fIfildes\fP argument refers to a file whose type is not supported
+by \fImmap\fP().
+.TP 7
+.B ENOMEM
+MAP_FIXED was specified, and the range [\fIaddr\fP,\fIaddr\fP+\fIlen\fP)
+exceeds that allowed for the address space of a
+process; or, if MAP_FIXED was not specified and there is insufficient
+room in the address space to effect the mapping.
+.TP 7
+.B ENOMEM
+The mapping could not be locked in memory, if required by \fImlockall\fP(),
+because it
+would require more space than the system is able to supply.
+.TP 7
+.B ENOMEM
+Not enough unallocated memory resources remain in the typed memory
+object designated by \fIfildes\fP to allocate \fIlen\fP bytes.
+.TP 7
+.B ENOTSUP
+MAP_FIXED or MAP_PRIVATE was specified in the \fIflags\fP argument
+and the implementation does not support this functionality.
+.LP
+The implementation does not support the combination of accesses requested
+in the \fIprot\fP argument.
+.TP 7
+.B ENXIO
+Addresses in the range [\fIoff\fP,\fIoff\fP+\fIlen\fP) are invalid
+for the object specified by \fIfildes\fP.
+.TP 7
+.B ENXIO
+MAP_FIXED was specified in \fIflags\fP and the combination of \fIaddr\fP,
+\fIlen\fP, and \fIoff\fP is invalid for the
+object specified by \fIfildes\fP.
+.TP 7
+.B ENXIO
+The \fIfildes\fP argument refers to a typed memory object that is
+not accessible from the calling process.
+.TP 7
+.B EOVERFLOW
+The file is a regular file and the value of \fIoff\fP plus \fIlen\fP
+exceeds the offset maximum established in the open file
+description associated with \fIfildes\fP.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Use of \fImmap\fP() may reduce the amount of memory available to other
+memory allocation functions.
+.LP
+Use of MAP_FIXED may result in unspecified behavior in further use
+of \fImalloc\fP() and
+\fIshmat\fP(). The use of MAP_FIXED is discouraged, as it may prevent
+an implementation from
+making the most effective use of resources.
+.LP
+The application must ensure correct synchronization when using \fImmap\fP()
+in conjunction with any other file access method,
+such as \fIread\fP() and \fIwrite\fP(), standard
+input/output, and \fIshmat\fP().
+.LP
+The \fImmap\fP() function allows access to resources via address space
+manipulations, instead of \fIread\fP()/ \fIwrite\fP(). Once a file
+is mapped, all a
+process has to do to access it is use the data at the address to which
+the file was mapped. So, using pseudo-code to illustrate the
+way in which an existing program might be changed to use \fImmap\fP(),
+the following:
+.sp
+.RS
+.nf
+
+\fBfildes = open(...)
+lseek(fildes, some_offset)
+read(fildes, buf, len)
+/* Use data in buf. */
+\fP
+.fi
+.RE
+.LP
+becomes:
+.sp
+.RS
+.nf
+
+\fBfildes = open(...)
+address = mmap(0, len, PROT_READ, MAP_PRIVATE, fildes, some_offset)
+/* Use data at address. */
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+After considering several other alternatives, it was decided to adopt
+the \fImmap\fP() definition found in SVR4 for mapping
+memory objects into process address spaces. The SVR4 definition is
+minimal, in that it describes only what has been built, and what
+appears to be necessary for a general and portable mapping facility.
+.LP
+Note that while \fImmap\fP() was first designed for mapping files,
+it is actually a general-purpose mapping facility. It can be
+used to map any appropriate object, such as memory, files, devices,
+and so on, into the address space of a process.
+.LP
+When a mapping is established, it is possible that the implementation
+may need to map more than is requested into the address
+space of the process because of hardware requirements. An application,
+however, cannot count on this behavior. Implementations that
+do not use a paged architecture may simply allocate a common memory
+region and return the address of it; such implementations
+probably do not allocate any more than is necessary. References past
+the end of the requested area are unspecified.
+.LP
+If an application requests a mapping that would overlay existing mappings
+in the process, it might be desirable that an
+implementation detect this and inform the application. However, the
+default, portable (not MAP_FIXED) operation does not overlay
+existing mappings. On the other hand, if the program specifies a fixed
+address mapping (which requires some implementation
+knowledge to determine a suitable address, if the function is supported
+at all), then the program is presumed to be successfully
+managing its own address space and should be trusted when it asks
+to map over existing data structures. Furthermore, it is also
+desirable to make as few system calls as possible, and it might be
+considered onerous to require an \fImunmap\fP() before an \fImmap\fP()
+to the same address range. This volume of
+IEEE\ Std\ 1003.1-2001 specifies that the new mappings replace any
+existing mappings, following existing practice in this
+regard.
+.LP
+It is not expected, when the Memory Protection option is supported,
+that all hardware implementations are able to support all
+combinations of permissions at all addresses. When this option is
+supported, implementations are required to disallow write access
+to mappings without write permission and to disallow access to mappings
+without any access permission. Other than these
+restrictions, implementations may allow access types other than those
+requested by the application. For example, if the application
+requests only PROT_WRITE, the implementation may also allow read access.
+A call to \fImmap\fP() fails if the implementation cannot
+support allowing all the access requested by the application. For
+example, some implementations cannot support a request for both
+write access and execute access simultaneously. All implementations
+supporting the Memory Protection option must support requests
+for no access, read access, write access, and both read and write
+access. Strictly conforming code must only rely on the required
+checks. These restrictions allow for portability across a wide range
+of hardware.
+.LP
+The MAP_FIXED address treatment is likely to fail for non-page-aligned
+values and for certain architecture-dependent address
+ranges. Conforming implementations cannot count on being able to choose
+address values for MAP_FIXED without utilizing
+non-portable, implementation-defined knowledge. Nonetheless, MAP_FIXED
+is provided as a standard interface conforming to existing
+practice for utilizing such knowledge when it is available.
+.LP
+Similarly, in order to allow implementations that do not support virtual
+addresses, support for directly specifying any mapping
+addresses via MAP_FIXED is not required and thus a conforming application
+may not count on it.
+.LP
+The MAP_PRIVATE function can be implemented efficiently when memory
+protection hardware is available. When such hardware is not
+available, implementations can implement such "mappings" by simply
+making a real copy of the relevant data into process private
+memory, though this tends to behave similarly to \fIread\fP().
+.LP
+The function has been defined to allow for many different models of
+using shared memory. However, all uses are not equally
+portable across all machine architectures. In particular, the \fImmap\fP()
+function allows the system as well as the application
+to specify the address at which to map a specific region of a memory
+object. The most portable way to use the function is always to
+let the system choose the address, specifying NULL as the value for
+the argument \fIaddr\fP and not to specify MAP_FIXED.
+.LP
+If it is intended that a particular region of a memory object be mapped
+at the same address in a group of processes (on machines
+where this is even possible), then MAP_FIXED can be used to pass in
+the desired mapping address. The system can still be used to
+choose the desired address if the first such mapping is made without
+specifying MAP_FIXED, and then the resulting mapping address
+can be passed to subsequent processes for them to pass in via MAP_FIXED.
+The availability of a specific address range cannot be
+guaranteed, in general.
+.LP
+The \fImmap\fP() function can be used to map a region of memory that
+is larger than the current size of the object. Memory
+access within the mapping but beyond the current end of the underlying
+objects may result in SIGBUS signals being sent to the
+process. The reason for this is that the size of the object can be
+manipulated by other processes and can change at any moment. The
+implementation should tell the application that a memory reference
+is outside the object where this can be detected; otherwise,
+written data may be lost and read data may not reflect actual data
+in the object.
+.LP
+Note that references beyond the end of the object do not extend the
+object as the new end cannot be determined precisely by most
+virtual memory hardware. Instead, the size can be directly manipulated
+by \fIftruncate\fP().
+.LP
+Process memory locking does apply to shared memory regions, and the
+MEMLOCK_FUTURE argument to \fImlockall\fP() can be relied upon to
+cause new shared memory regions to be automatically
+locked.
+.LP
+Existing implementations of \fImmap\fP() return the value -1 when
+unsuccessful. Since the casting of this value to type \fBvoid
+*\fP cannot be guaranteed by the ISO\ C standard to be distinct from
+a successful value, this volume of
+IEEE\ Std\ 1003.1-2001 defines the symbol MAP_FAILED, which a conforming
+implementation does not return as the result of a
+successful call.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexec\fP(), \fIfcntl\fP(), \fIfork\fP(), \fIlockf\fP(), \fImsync\fP(),
+\fImunmap\fP(), \fImprotect\fP(), \fIposix_typed_mem_open\fP(),
+\fIshmat\fP(), \fIsysconf\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<sys/mman.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/modf.3p b/man-pages-posix-2003/man3p/modf.3p
new file mode 100644
index 0000000..4fe2721
--- /dev/null
+++ b/man-pages-posix-2003/man3p/modf.3p
@@ -0,0 +1,84 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MODF" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" modf
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+modf, modff, modfl \- decompose a floating-point number
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double modf(double\fP \fIx\fP\fB, double *\fP\fIiptr\fP\fB);
+.br
+float modff(float\fP \fIvalue\fP\fB, float *\fP\fIiptr\fP\fB);
+.br
+long double modfl(long double\fP \fIvalue\fP\fB, long double *\fP\fIiptr\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall break the argument \fIx\fP into integral and
+fractional parts, each of which has the same sign as the
+argument. It stores the integral part as a \fBdouble\fP (for the \fImodf\fP()
+function), a \fBfloat\fP (for the \fImodff\fP()
+function), or a \fBlong double\fP (for the \fImodfl\fP() function),
+in the object pointed to by \fIiptr\fP.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the signed
+fractional part of \fIx\fP.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned, and *\fIiptr\fP shall be
+set to a NaN.
+.LP
+If \fIx\fP is \(+-Inf, \(+-0 shall be returned, and *\fIiptr\fP shall
+be set to \(+-Inf.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fImodf\fP() function computes the function result and *\fIiptr\fP
+such that:
+.sp
+.RS
+.nf
+
+\fBa = modf(x, iptr) ;
+x == a+*iptr ;
+\fP
+.fi
+.RE
+.LP
+allowing for the usual floating-point inaccuracies.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfrexp\fP(), \fIisnan\fP(), \fIldexp\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/modff.3p b/man-pages-posix-2003/man3p/modff.3p
new file mode 100644
index 0000000..e3e8879
--- /dev/null
+++ b/man-pages-posix-2003/man3p/modff.3p
@@ -0,0 +1 @@
+.so man3p/modf.3p
diff --git a/man-pages-posix-2003/man3p/modfl.3p b/man-pages-posix-2003/man3p/modfl.3p
new file mode 100644
index 0000000..e3e8879
--- /dev/null
+++ b/man-pages-posix-2003/man3p/modfl.3p
@@ -0,0 +1 @@
+.so man3p/modf.3p
diff --git a/man-pages-posix-2003/man3p/mprotect.3p b/man-pages-posix-2003/man3p/mprotect.3p
new file mode 100644
index 0000000..4deb5a8
--- /dev/null
+++ b/man-pages-posix-2003/man3p/mprotect.3p
@@ -0,0 +1,123 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MPROTECT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" mprotect
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+mprotect \- set protection of memory mapping
+.SH SYNOPSIS
+.LP
+\fB#include <sys/mman.h>
+.br
+.sp
+int mprotect(void *\fP\fIaddr\fP\fB, size_t\fP \fIlen\fP\fB, int\fP
+\fIprot\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fImprotect\fP() function shall change the access protections
+to be that specified by \fIprot\fP for those whole pages
+containing any part of the address space of the process starting at
+address \fIaddr\fP and continuing for \fIlen\fP bytes. The
+parameter \fIprot\fP determines whether read, write, execute, or some
+combination of accesses are permitted to the data being
+mapped. The \fIprot\fP argument should be either PROT_NONE or the
+bitwise-inclusive OR of one or more of PROT_READ, PROT_WRITE,
+and PROT_EXEC.
+.LP
+If an implementation cannot support the combination of access types
+specified by \fIprot\fP, the call to \fImprotect\fP()
+shall fail.
+.LP
+An implementation may permit accesses other than those specified by
+\fIprot\fP; however, no implementation shall permit a write
+to succeed where PROT_WRITE has not been set or shall permit any access
+where PROT_NONE alone has been set. Implementations shall
+support at least the following values of \fIprot\fP: PROT_NONE, PROT_READ,
+PROT_WRITE, and the bitwise-inclusive OR of PROT_READ
+and PROT_WRITE. If PROT_WRITE is specified, the application shall
+ensure that it has opened the mapped objects in the specified
+address range with write permission, unless MAP_PRIVATE was specified
+in the original mapping, regardless of whether the file
+descriptors used to map the objects have since been closed.
+.LP
+The implementation shall require that \fIaddr\fP be a multiple of
+the page size as returned by \fIsysconf\fP().
+.LP
+The behavior of this function is unspecified if the mapping was not
+established by a call to \fImmap\fP().
+.LP
+When \fImprotect\fP() fails for reasons other than [EINVAL], the protections
+on some of the pages in the range
+[\fIaddr\fP,\fIaddr\fP+\fIlen\fP) may have been changed.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fImprotect\fP() shall return 0; otherwise,
+it shall return -1 and set \fIerrno\fP to indicate the
+error.
+.SH ERRORS
+.LP
+The \fImprotect\fP() function shall fail if:
+.TP 7
+.B EACCES
+The \fIprot\fP argument specifies a protection that violates the access
+permission the process has to the underlying memory
+object.
+.TP 7
+.B EAGAIN
+The \fIprot\fP argument specifies PROT_WRITE over a MAP_PRIVATE mapping
+and there are insufficient memory resources to reserve
+for locking the private page.
+.TP 7
+.B EINVAL
+The \fIaddr\fP argument is not a multiple of the page size as returned
+by \fIsysconf\fP().
+.TP 7
+.B ENOMEM
+Addresses in the range [\fIaddr\fP,\fIaddr\fP+\fIlen\fP) are invalid
+for the address space of a process, or specify one or
+more pages which are not mapped.
+.TP 7
+.B ENOMEM
+The \fIprot\fP argument specifies PROT_WRITE on a MAP_PRIVATE mapping,
+and it would require more space than the system is able
+to supply for locking the private pages, if required.
+.TP 7
+.B ENOTSUP
+The implementation does not support the combination of accesses requested
+in the \fIprot\fP argument.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The [EINVAL] error above is marked EX because it is defined as an
+optional error in the POSIX Realtime Extension.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fImmap\fP(), \fIsysconf\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<sys/mman.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/mq_close.3p b/man-pages-posix-2003/man3p/mq_close.3p
new file mode 100644
index 0000000..9db3ebd
--- /dev/null
+++ b/man-pages-posix-2003/man3p/mq_close.3p
@@ -0,0 +1,73 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MQ_CLOSE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" mq_close
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+mq_close \- close a message queue (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <mqueue.h>
+.br
+.sp
+int mq_close(mqd_t\fP \fImqdes\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fImq_close\fP() function shall remove the association between
+the message queue descriptor, \fImqdes\fP, and its message
+queue. The results of using this message queue descriptor after successful
+return from this \fImq_close\fP(), and until the return
+of this message queue descriptor from a subsequent \fImq_open\fP(),
+are undefined.
+.LP
+If the process has successfully attached a notification request to
+the message queue via this \fImqdes\fP, this attachment
+shall be removed, and the message queue is available for another process
+to attach for notification.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fImq_close\fP() function shall return
+a value of zero; otherwise, the function shall return a
+value of -1 and set \fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fImq_close\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fImqdes\fP argument is not a valid message queue descriptor.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fImq_open\fP(), \fImq_unlink\fP(), \fImsgctl\fP(), \fImsgget\fP(),
+\fImsgrcv\fP(), \fImsgsnd\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<mqueue.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/mq_getattr.3p b/man-pages-posix-2003/man3p/mq_getattr.3p
new file mode 100644
index 0000000..61f5987
--- /dev/null
+++ b/man-pages-posix-2003/man3p/mq_getattr.3p
@@ -0,0 +1,89 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MQ_GETATTR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" mq_getattr
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+mq_getattr \- get message queue attributes (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <mqueue.h>
+.br
+.sp
+int mq_getattr(mqd_t\fP \fImqdes\fP\fB, struct mq_attr *\fP\fImqstat\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fImq_getattr\fP() function shall obtain status information and
+attributes of the message queue and the open message queue
+description associated with the message queue descriptor.
+.LP
+The \fImqdes\fP argument specifies a message queue descriptor.
+.LP
+The results shall be returned in the \fBmq_attr\fP structure referenced
+by the \fImqstat\fP argument.
+.LP
+Upon return, the following members shall have the values associated
+with the open message queue description as set when the
+message queue was opened and as modified by subsequent \fImq_setattr\fP()
+calls:
+\fImq_flags\fP.
+.LP
+The following attributes of the message queue shall be returned as
+set at message queue creation: \fImq_maxmsg\fP,
+\fImq_msgsize\fP.
+.LP
+Upon return, the following members within the \fBmq_attr\fP structure
+referenced by the \fImqstat\fP argument shall be set to
+the current state of the message queue:
+.TP 7
+\fImq_curmsgs\fP
+The number of messages currently on the queue.
+.sp
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fImq_getattr\fP() function shall
+return zero. Otherwise, the function shall return -1 and set
+\fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fImq_getattr\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fImqdes\fP argument is not a valid message queue descriptor.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fImq_open\fP(), \fImq_send\fP(), \fImq_setattr\fP(), \fImq_timedsend\fP(),
+\fImsgctl\fP(), \fImsgget\fP(), \fImsgrcv\fP(), \fImsgsnd\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<mqueue.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/mq_notify.3p b/man-pages-posix-2003/man3p/mq_notify.3p
new file mode 100644
index 0000000..72c0625
--- /dev/null
+++ b/man-pages-posix-2003/man3p/mq_notify.3p
@@ -0,0 +1,93 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MQ_NOTIFY" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" mq_notify
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+mq_notify \- notify process that a message is available (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <mqueue.h>
+.br
+.sp
+int mq_notify(mqd_t\fP \fImqdes\fP\fB, const struct sigevent *\fP\fInotification\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+If the argument \fInotification\fP is not NULL, this function shall
+register the calling process to be notified of message
+arrival at an empty message queue associated with the specified message
+queue descriptor, \fImqdes\fP. The notification specified
+by the \fInotification\fP argument shall be sent to the process when
+the message queue transitions from empty to non-empty. At any
+time, only one process may be registered for notification by a message
+queue. If the calling process or any other process has
+already registered for notification of message arrival at the specified
+message queue, subsequent attempts to register for that
+message queue shall fail.
+.LP
+If \fInotification\fP is NULL and the process is currently registered
+for notification by the specified message queue, the
+existing registration shall be removed.
+.LP
+When the notification is sent to the registered process, its registration
+shall be removed. The message queue shall then be
+available for registration.
+.LP
+If a process has registered for notification of message arrival at
+a message queue and some thread is blocked in \fImq_receive\fP() waiting
+to receive a message when a message arrives at the queue, the
+arriving message shall satisfy the appropriate \fImq_receive\fP().
+The resulting
+behavior is as if the message queue remains empty, and no notification
+shall be sent.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fImq_notify\fP() function shall return
+a value of zero; otherwise, the function shall return a
+value of -1 and set \fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fImq_notify\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fImqdes\fP argument is not a valid message queue descriptor.
+.TP 7
+.B EBUSY
+A process is already registered for notification by the message queue.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fImq_open\fP(), \fImq_send\fP(), \fImq_timedsend\fP(), \fImsgctl\fP(),
+\fImsgget\fP(), \fImsgrcv\fP(), \fImsgsnd\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<mqueue.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/mq_open.3p b/man-pages-posix-2003/man3p/mq_open.3p
new file mode 100644
index 0000000..89b7404
--- /dev/null
+++ b/man-pages-posix-2003/man3p/mq_open.3p
@@ -0,0 +1,200 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MQ_OPEN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" mq_open
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+mq_open \- open a message queue (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <mqueue.h>
+.br
+.sp
+mqd_t mq_open(const char *\fP\fIname\fP\fB, int\fP \fIoflag\fP\fB,
+\&...); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fImq_open\fP() function shall establish the connection between
+a process and a message queue with a message queue
+descriptor. It shall create an open message queue description that
+refers to the message queue, and a message queue descriptor that
+refers to that open message queue description. The message queue descriptor
+is used by other functions to refer to that message
+queue. The \fIname\fP argument points to a string naming a message
+queue. It is unspecified whether the name appears in the file
+system and is visible to other functions that take pathnames as arguments.
+The \fIname\fP argument shall conform to the
+construction rules for a pathname. If \fIname\fP begins with the slash
+character, then processes calling \fImq_open\fP() with the
+same value of \fIname\fP shall refer to the same message queue object,
+as long as that name has not been removed. If \fIname\fP
+does not begin with the slash character, the effect is implementation-defined.
+The interpretation of slash characters other than
+the leading slash character in \fIname\fP is implementation-defined.
+If the \fIname\fP argument is not the name of an existing
+message queue and creation is not requested, \fImq_open\fP() shall
+fail and return an error.
+.LP
+A message queue descriptor may be implemented using a file descriptor,
+in which case applications can open up to at least
+{OPEN_MAX} file and message queues.
+.LP
+The \fIoflag\fP argument requests the desired receive and/or send
+access to the message queue. The requested access permission
+to receive messages or send messages shall be granted if the calling
+process would be granted read or write access, respectively,
+to an equivalently protected file.
+.LP
+The value of \fIoflag\fP is the bitwise-inclusive OR of values from
+the following list. Applications shall specify exactly one
+of the first three values (access modes) below in the value of \fIoflag\fP:
+.TP 7
+O_RDONLY
+Open the message queue for receiving messages. The process can use
+the returned message queue descriptor with \fImq_receive\fP(), but
+not \fImq_send\fP(). A message
+queue may be open multiple times in the same or different processes
+for receiving messages.
+.TP 7
+O_WRONLY
+Open the queue for sending messages. The process can use the returned
+message queue descriptor with \fImq_send\fP() but not \fImq_receive\fP().
+A message
+queue may be open multiple times in the same or different processes
+for sending messages.
+.TP 7
+O_RDWR
+Open the queue for both receiving and sending messages. The process
+can use any of the functions allowed for O_RDONLY and
+O_WRONLY. A message queue may be open multiple times in the same or
+different processes for sending messages.
+.sp
+.LP
+Any combination of the remaining flags may be specified in the value
+of \fIoflag\fP:
+.TP 7
+O_CREAT
+Create a message queue. It requires two additional arguments: \fImode\fP,
+which shall be of type \fBmode_t\fP, and
+\fIattr\fP, which shall be a pointer to an \fBmq_attr\fP structure.
+If the pathname \fIname\fP has already been used to create a
+message queue that still exists, then this flag shall have no effect,
+except as noted under O_EXCL. Otherwise, a message queue
+shall be created without any messages in it. The user ID of the message
+queue shall be set to the effective user ID of the process,
+and the group ID of the message queue shall be set to the effective
+group ID of the process. The file permission bits shall be set
+to the value of \fImode\fP. When bits in \fImode\fP other than file
+permission bits are set, the effect is
+implementation-defined. If \fIattr\fP is NULL, the message queue shall
+be created with implementation-defined default message
+queue attributes. If \fIattr\fP is non-NULL and the calling process
+has the appropriate privilege on \fIname\fP, the message
+queue \fImq_maxmsg\fP and \fImq_msgsize\fP attributes shall be set
+to the values of the corresponding members in the
+\fBmq_attr\fP structure referred to by \fIattr\fP. If \fIattr\fP is
+non-NULL, but the calling process does not have the
+appropriate privilege on \fIname\fP, the \fImq_open\fP() function
+shall fail and return an error without creating the message
+queue.
+.TP 7
+O_EXCL
+If O_EXCL and O_CREAT are set, \fImq_open\fP() shall fail if the message
+queue \fIname\fP exists. The check for the existence
+of the message queue and the creation of the message queue if it does
+not exist shall be atomic with respect to other threads
+executing \fImq_open\fP() naming the same \fIname\fP with O_EXCL and
+O_CREAT set. If O_EXCL is set and O_CREAT is not set, the
+result is undefined.
+.TP 7
+O_NONBLOCK
+Determines whether an \fImq_send\fP() or \fImq_receive\fP() waits
+for resources or messages that are not currently available, or fails
+with \fIerrno\fP set to [EAGAIN]; see \fImq_send\fP() and \fImq_receive\fP()
+for details.
+.sp
+.LP
+The \fImq_open\fP() function does not add or remove messages from
+the queue.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the function shall return a message queue
+descriptor; otherwise, the function shall return
+(\fBmqd_t\fP)-1 and set \fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fImq_open\fP() function shall fail if:
+.TP 7
+.B EACCES
+The message queue exists and the permissions specified by \fIoflag\fP
+are denied, or the message queue does not exist and
+permission to create the message queue is denied.
+.TP 7
+.B EEXIST
+O_CREAT and O_EXCL are set and the named message queue already exists.
+.TP 7
+.B EINTR
+The \fImq_open\fP() function was interrupted by a signal.
+.TP 7
+.B EINVAL
+The \fImq_open\fP() function is not supported for the given name.
+.TP 7
+.B EINVAL
+O_CREAT was specified in \fIoflag\fP, the value of \fIattr\fP is not
+NULL, and either \fImq_maxmsg\fP or \fImq_msgsize\fP
+was less than or equal to zero.
+.TP 7
+.B EMFILE
+Too many message queue descriptors or file descriptors are currently
+in use by this process.
+.TP 7
+.B ENAMETOOLONG
+The length of the \fIname\fP argument exceeds {PATH_MAX} or a pathname
+component is longer than {NAME_MAX}.
+.TP 7
+.B ENFILE
+Too many message queues are currently open in the system.
+.TP 7
+.B ENOENT
+O_CREAT is not set and the named message queue does not exist.
+.TP 7
+.B ENOSPC
+There is insufficient space for the creation of the new message queue.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fImq_close\fP(), \fImq_getattr\fP(), \fImq_receive\fP(), \fImq_send\fP(),
+\fImq_setattr\fP(), \fImq_timedreceive\fP(), \fImq_timedsend\fP(),
+\fImq_unlink\fP(), \fImsgctl\fP(), \fImsgget\fP(), \fImsgrcv\fP(),
+\fImsgsnd\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<mqueue.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/mq_receive.3p b/man-pages-posix-2003/man3p/mq_receive.3p
new file mode 100644
index 0000000..5149111
--- /dev/null
+++ b/man-pages-posix-2003/man3p/mq_receive.3p
@@ -0,0 +1,181 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MQ_RECEIVE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" mq_receive
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+mq_receive, mq_timedreceive \- receive a message from a message queue
+(\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <mqueue.h>
+.br
+.sp
+ssize_t mq_receive(mqd_t\fP \fImqdes\fP\fB, char *\fP\fImsg_ptr\fP\fB,
+size_t\fP \fImsg_len\fP\fB,
+.br
+\ \ \ \ \ \ unsigned *\fP\fImsg_prio\fP\fB); \fP
+\fB
+.br
+.sp
+\fP
+.LP
+\fB
+.br
+#include <mqueue.h>
+.br
+#include <time.h>
+.br
+ssize_t mq_timedreceive(mqd_t\fP \fImqdes\fP\fB, char *restrict\fP
+\fImsg_ptr\fP\fB,
+.br
+\ \ \ \ \ \ size_t\fP \fImsg_len\fP\fB, unsigned *restrict\fP \fImsg_prio\fP\fB,
+.br
+\ \ \ \ \ \ const struct timespec *restrict\fP \fIabs_timeout\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fImq_receive\fP() function shall receive the oldest of the highest
+priority message(s) from the message queue specified by
+\fImqdes\fP. If the size of the buffer in bytes, specified by the
+\fImsg_len\fP argument, is less than the \fImq_msgsize\fP
+attribute of the message queue, the function shall fail and return
+an error. Otherwise, the selected message shall be removed from
+the queue and copied to the buffer pointed to by the \fImsg_ptr\fP
+argument.
+.LP
+If the value of \fImsg_len\fP is greater than {SSIZE_MAX}, the result
+is implementation-defined.
+.LP
+If the argument \fImsg_prio\fP is not NULL, the priority of the selected
+message shall be stored in the location referenced by
+\fImsg_prio\fP.
+.LP
+If the specified message queue is empty and O_NONBLOCK is not set
+in the message queue description associated with \fImqdes\fP,
+\fImq_receive\fP() shall block until a message is enqueued on the
+message queue or until \fImq_receive\fP() is interrupted by a
+signal. If more than one thread is waiting to receive a message when
+a message arrives at an empty queue and the Priority
+Scheduling option is supported, then the thread of highest priority
+that has been waiting the longest shall be selected to receive
+the message. Otherwise, it is unspecified which waiting thread receives
+the message. If the specified message queue is empty and
+O_NONBLOCK is set in the message queue description associated with
+\fImqdes\fP, no message shall be removed from the queue, and
+\fImq_receive\fP() shall return an error.
+.LP
+The \fImq_timedreceive\fP() function shall receive the oldest of the
+highest priority messages from the message queue specified by
+\fImqdes\fP as described for the \fImq_receive\fP() function. However,
+if O_NONBLOCK was not specified when the message queue was
+opened via the \fImq_open\fP() function, and no message exists on
+the queue to satisfy the
+receive, the wait for such a message shall be terminated when the
+specified timeout expires. If O_NONBLOCK is set, this function is
+equivalent to \fImq_receive\fP().
+.LP
+The timeout expires when the absolute time specified by \fIabs_timeout\fP
+passes, as measured by the clock on which timeouts
+are based (that is, when the value of that clock equals or exceeds
+\fIabs_timeout\fP), or if the absolute time specified by
+\fIabs_timeout\fP has already been passed at the time of the call.
+.LP
+If the Timers option is supported, the timeout shall be based on the
+CLOCK_REALTIME clock; if the Timers option is not
+supported, the timeout shall be based on the system clock as returned
+by the \fItime\fP()
+function.
+.LP
+The resolution of the timeout shall be the resolution of the clock
+on which it is based. The \fItimespec\fP argument is defined in
+the \fI<time.h>\fP header.
+.LP
+Under no circumstance shall the operation fail with a timeout if a
+message can be removed from the message queue immediately.
+The validity of the \fIabs_timeout\fP parameter need not be checked
+if a message can be removed from the message queue
+immediately.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fImq_receive\fP() and \fImq_timedreceive\fP()
+functions shall return the length of the selected message in bytes
+and the message shall be removed from
+the queue. Otherwise, no message shall be removed from the queue,
+the functions shall return a value of -1, and set \fIerrno\fP to
+indicate the error.
+.SH ERRORS
+.LP
+The \fImq_receive\fP() and \fImq_timedreceive\fP()
+functions shall fail if:
+.TP 7
+.B EAGAIN
+O_NONBLOCK was set in the message description associated with \fImqdes\fP,
+and the specified message queue is empty.
+.TP 7
+.B EBADF
+The \fImqdes\fP argument is not a valid message queue descriptor open
+for reading.
+.TP 7
+.B EMSGSIZE
+The specified message buffer size, \fImsg_len\fP, is less than the
+message size attribute of the message queue.
+.TP 7
+.B EINTR
+The \fImq_receive\fP() or \fImq_timedreceive\fP()
+operation was interrupted by a signal.
+.TP 7
+.B EINVAL
+The process or thread would have blocked, and the \fIabs_timeout\fP
+parameter specified a nanoseconds field value less than zero
+or greater than or equal to 1000 million.
+.TP 7
+.B ETIMEDOUT
+The O_NONBLOCK flag was not set when the message queue was opened,
+but no message arrived on the queue before the specified timeout
+expired.
+.sp
+.LP
+The \fImq_receive\fP() and \fImq_timedreceive\fP()
+functions may fail if:
+.TP 7
+.B EBADMSG
+The implementation has detected a data corruption problem with the
+message.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fImq_open\fP(), \fImq_send\fP(), \fImq_timedsend\fP(), \fImsgctl\fP(),
+\fImsgget\fP(), \fImsgrcv\fP(), \fImsgsnd\fP(), \fItime\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<mqueue.h>\fP,
+\fI<time.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/mq_send.3p b/man-pages-posix-2003/man3p/mq_send.3p
new file mode 100644
index 0000000..532239a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/mq_send.3p
@@ -0,0 +1,171 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MQ_SEND" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" mq_send
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+mq_send, mq_timedsend \- send a message to a message queue (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <mqueue.h>
+.br
+.sp
+int mq_send(mqd_t\fP \fImqdes\fP\fB, const char *\fP\fImsg_ptr\fP\fB,
+size_t\fP \fImsg_len\fP\fB,
+.br
+\ \ \ \ \ \ unsigned\fP \fImsg_prio\fP\fB); \fP
+\fB
+.br
+.sp
+\fP
+.LP
+\fB
+.br
+#include <mqueue.h>
+.br
+#include <time.h>
+.br
+int mq_timedsend(mqd_t\fP \fImqdes\fP\fB, const char *\fP\fImsg_ptr\fP\fB,
+size_t\fP \fImsg_len\fP\fB,
+.br
+\ \ \ \ \ \ unsigned\fP \fImsg_prio\fP\fB, const struct timespec
+*\fP\fIabs_timeout\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fImq_send\fP() function shall add the message pointed to by the
+argument \fImsg_ptr\fP to the message queue specified by
+\fImqdes\fP. The \fImsg_len\fP argument specifies the length of the
+message, in bytes, pointed to by \fImsg_ptr\fP. The value of
+\fImsg_len\fP shall be less than or equal to the \fImq_msgsize\fP
+attribute of the message queue, or \fImq_send\fP() shall
+fail.
+.LP
+If the specified message queue is not full, \fImq_send\fP() shall
+behave as if the message is inserted into the message queue
+at the position indicated by the \fImsg_prio\fP argument. A message
+with a larger numeric value of \fImsg_prio\fP shall be
+inserted before messages with lower values of \fImsg_prio\fP. A message
+shall be inserted after other messages in the queue, if
+any, with equal \fImsg_prio\fP. The value of \fImsg_prio\fP shall
+be less than {MQ_PRIO_MAX}.
+.LP
+If the specified message queue is full and O_NONBLOCK is not set in
+the message queue description associated with \fImqdes\fP,
+\fImq_send\fP() shall block until space becomes available to enqueue
+the message, or until \fImq_send\fP() is interrupted by a
+signal. If more than one thread is waiting to send when space becomes
+available in the message queue and the Priority Scheduling
+option is supported, then the thread of the highest priority that
+has been waiting the longest shall be unblocked to send its
+message. Otherwise, it is unspecified which waiting thread is unblocked.
+If the specified message queue is full and O_NONBLOCK is
+set in the message queue description associated with \fImqdes\fP,
+the message shall not be queued and \fImq_send\fP() shall
+return an error.
+.LP
+The \fImq_timedsend\fP() function shall add a message to the message
+queue specified by \fImqdes\fP in the manner defined for the
+\fImq_send\fP() function. However, if the specified message queue
+is full and O_NONBLOCK is not set in the message queue
+description associated with \fImqdes\fP, the wait for sufficient room
+in the queue shall be terminated when the specified timeout
+expires. If O_NONBLOCK is set in the message queue description, this
+function shall be equivalent to \fImq_send\fP().
+.LP
+The timeout shall expire when the absolute time specified by \fIabs_timeout\fP
+passes, as measured by the clock on which
+timeouts are based (that is, when the value of that clock equals or
+exceeds \fIabs_timeout\fP), or if the absolute time specified
+by \fIabs_timeout\fP has already been passed at the time of the call.
+.LP
+If the Timers option is supported, the timeout shall be based on the
+CLOCK_REALTIME clock; if the Timers option is not
+supported, the timeout shall be based on the system clock as returned
+by the \fItime\fP()
+function.
+.LP
+The resolution of the timeout shall be the resolution of the clock
+on which it is based. The \fItimespec\fP argument is defined in
+the \fI<time.h>\fP header.
+.LP
+Under no circumstance shall the operation fail with a timeout if there
+is sufficient room in the queue to add the message
+immediately. The validity of the \fIabs_timeout\fP parameter need
+not be checked when there is sufficient room in the queue.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fImq_send\fP() and \fImq_timedsend\fP()
+functions shall return a value of zero. Otherwise, no message shall
+be enqueued, the functions shall
+return -1, and \fIerrno\fP shall be set to indicate the error.
+.SH ERRORS
+.LP
+The \fImq_send\fP() and \fImq_timedsend\fP()
+functions shall fail if:
+.TP 7
+.B EAGAIN
+The O_NONBLOCK flag is set in the message queue description associated
+with \fImqdes\fP, and the specified message queue is
+full.
+.TP 7
+.B EBADF
+The \fImqdes\fP argument is not a valid message queue descriptor open
+for writing.
+.TP 7
+.B EINTR
+A signal interrupted the call to \fImq_send\fP() or \fImq_timedsend\fP().
+.TP 7
+.B EINVAL
+The value of \fImsg_prio\fP was outside the valid range.
+.TP 7
+.B EINVAL
+The process or thread would have blocked, and the \fIabs_timeout\fP
+parameter specified a nanoseconds field value less than zero
+or greater than or equal to 1000 million.
+.TP 7
+.B EMSGSIZE
+The specified message length, \fImsg_len\fP, exceeds the message size
+attribute of the message queue.
+.TP 7
+.B ETIMEDOUT
+The O_NONBLOCK flag was not set when the message queue was opened,
+but the timeout expired before the message could be added to the
+queue.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The value of the symbol {MQ_PRIO_MAX} limits the number of priority
+levels supported by the application. Message priorities
+range from 0 to {MQ_PRIO_MAX}-1.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fImq_open\fP(), \fImq_receive\fP(), \fImq_setattr\fP(), \fImq_timedreceive\fP(),
+\fItime\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<mqueue.h>\fP, \fI<time.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/mq_setattr.3p b/man-pages-posix-2003/man3p/mq_setattr.3p
new file mode 100644
index 0000000..c617def
--- /dev/null
+++ b/man-pages-posix-2003/man3p/mq_setattr.3p
@@ -0,0 +1,91 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MQ_SETATTR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" mq_setattr
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+mq_setattr \- set message queue attributes (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <mqueue.h>
+.br
+.sp
+int mq_setattr(mqd_t\fP \fImqdes\fP\fB, const struct mq_attr *restrict\fP
+\fImqstat\fP\fB,
+.br
+\ \ \ \ \ \ struct mq_attr *restrict\fP \fIomqstat\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fImq_setattr\fP() function shall set attributes associated with
+the open message queue description referenced by the
+message queue descriptor specified by \fImqdes\fP.
+.LP
+The message queue attributes corresponding to the following members
+defined in the \fBmq_attr\fP structure shall be set to the
+specified values upon successful completion of \fImq_setattr\fP():
+.TP 7
+\fImq_flags\fP
+The value of this member is the bitwise-logical OR of zero or more
+of O_NONBLOCK and any implementation-defined flags.
+.sp
+.LP
+The values of the \fImq_maxmsg\fP, \fImq_msgsize\fP, and \fImq_curmsgs\fP
+members of the \fBmq_attr\fP structure shall be
+ignored by \fImq_setattr\fP().
+.LP
+If \fIomqstat\fP is non-NULL, the \fImq_setattr\fP() function shall
+store, in the location referenced by \fIomqstat\fP, the
+previous message queue attributes and the current queue status. These
+values shall be the same as would be returned by a call to \fImq_getattr\fP()
+at that point.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the function shall return a value of zero
+and the attributes of the message queue shall have been
+changed as specified.
+.LP
+Otherwise, the message queue attributes shall be unchanged, and the
+function shall return a value of -1 and set \fIerrno\fP to
+indicate the error.
+.SH ERRORS
+.LP
+The \fImq_setattr\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fImqdes\fP argument is not a valid message queue descriptor.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fImq_open\fP(), \fImq_send\fP(), \fImq_timedsend\fP(), \fImsgctl\fP(),
+\fImsgget\fP(), \fImsgrcv\fP(), \fImsgsnd\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<mqueue.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/mq_timedreceive.3p b/man-pages-posix-2003/man3p/mq_timedreceive.3p
new file mode 100644
index 0000000..ac36486
--- /dev/null
+++ b/man-pages-posix-2003/man3p/mq_timedreceive.3p
@@ -0,0 +1 @@
+.so man3p/mq_receive.3p
diff --git a/man-pages-posix-2003/man3p/mq_timedsend.3p b/man-pages-posix-2003/man3p/mq_timedsend.3p
new file mode 100644
index 0000000..d0bfb70
--- /dev/null
+++ b/man-pages-posix-2003/man3p/mq_timedsend.3p
@@ -0,0 +1 @@
+.so man3p/mq_send.3p
diff --git a/man-pages-posix-2003/man3p/mq_unlink.3p b/man-pages-posix-2003/man3p/mq_unlink.3p
new file mode 100644
index 0000000..a1d092d
--- /dev/null
+++ b/man-pages-posix-2003/man3p/mq_unlink.3p
@@ -0,0 +1,84 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MQ_UNLINK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" mq_unlink
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+mq_unlink \- remove a message queue (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <mqueue.h>
+.br
+.sp
+int mq_unlink(const char *\fP\fIname\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fImq_unlink\fP() function shall remove the message queue named
+by the pathname \fIname\fP. After a successful call to
+\fImq_unlink\fP() with \fIname\fP, a call to \fImq_open\fP() with
+\fIname\fP shall fail
+if the flag O_CREAT is not set in \fIflags\fP. If one or more processes
+have the message queue open when \fImq_unlink\fP() is
+called, destruction of the message queue shall be postponed until
+all references to the message queue have been closed.
+.LP
+Calls to \fImq_open\fP() to recreate the message queue may fail until
+the message queue
+is actually removed. However, the \fImq_unlink\fP() call need not
+block until all references have been closed; it may return
+immediately.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the function shall return a value of zero.
+Otherwise, the named message queue shall be unchanged by
+this function call, and the function shall return a value of -1 and
+set \fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fImq_unlink\fP() function shall fail if:
+.TP 7
+.B EACCES
+Permission is denied to unlink the named message queue.
+.TP 7
+.B ENAMETOOLONG
+The length of the \fIname\fP argument exceeds {PATH_MAX} or a pathname
+component is longer than {NAME_MAX}.
+.TP 7
+.B ENOENT
+The named message queue does not exist.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fImq_close\fP(), \fImq_open\fP(), \fImsgctl\fP(), \fImsgget\fP(),
+\fImsgrcv\fP(), \fImsgsnd\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<mqueue.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/mrand48.3p b/man-pages-posix-2003/man3p/mrand48.3p
new file mode 100644
index 0000000..a71d5ed
--- /dev/null
+++ b/man-pages-posix-2003/man3p/mrand48.3p
@@ -0,0 +1 @@
+.so man3p/drand48.3p
diff --git a/man-pages-posix-2003/man3p/msgctl.3p b/man-pages-posix-2003/man3p/msgctl.3p
new file mode 100644
index 0000000..fbe43f2
--- /dev/null
+++ b/man-pages-posix-2003/man3p/msgctl.3p
@@ -0,0 +1,135 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MSGCTL" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" msgctl
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+msgctl \- XSI message control operations
+.SH SYNOPSIS
+.LP
+\fB#include <sys/msg.h>
+.br
+.sp
+int msgctl(int\fP \fImsqid\fP\fB, int\fP \fIcmd\fP\fB, struct msqid_ds
+*\fP\fIbuf\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fImsgctl\fP() function operates on XSI message queues (see the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Section 3.224, Message Queue). It is unspecified whether this function
+interoperates with the realtime interprocess communication facilities
+defined in \fIRealtime\fP .
+.LP
+The \fImsgctl\fP() function shall provide message control operations
+as specified by \fIcmd\fP. The following values for
+\fIcmd\fP, and the message control operations they specify, are:
+.TP 7
+IPC_STAT
+Place the current value of each member of the \fBmsqid_ds\fP data
+structure associated with \fImsqid\fP into the structure
+pointed to by \fIbuf\fP. The contents of this structure are defined
+in \fI<sys/msg.h>\fP.
+.TP 7
+IPC_SET
+Set the value of the following members of the \fBmsqid_ds\fP data
+structure associated with \fImsqid\fP to the corresponding
+value found in the structure pointed to by \fIbuf\fP:
+.sp
+.RS
+.nf
+
+\fBmsg_perm.uid
+msg_perm.gid
+msg_perm.mode
+msg_qbytes
+\fP
+.fi
+.RE
+.LP
+IPC_SET can only be executed by a process with appropriate privileges
+or that has an effective user ID equal to the value of
+\fBmsg_perm.cuid\fP or \fBmsg_perm.uid\fP in the \fBmsqid_ds\fP data
+structure associated with \fImsqid\fP. Only a process with
+appropriate privileges can raise the value of \fBmsg_qbytes\fP.
+.TP 7
+IPC_RMID
+Remove the message queue identifier specified by \fImsqid\fP from
+the system and destroy the message queue and \fBmsqid_ds\fP
+data structure associated with it. IPC_RMD can only be executed by
+a process with appropriate privileges or one that has an
+effective user ID equal to the value of \fBmsg_perm.cuid\fP or \fBmsg_perm.uid\fP
+in the \fBmsqid_ds\fP data structure
+associated with \fImsqid\fP.
+.sp
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fImsgctl\fP() shall return 0; otherwise,
+it shall return -1 and set \fIerrno\fP to indicate the
+error.
+.SH ERRORS
+.LP
+The \fImsgctl\fP() function shall fail if:
+.TP 7
+.B EACCES
+The argument \fIcmd\fP is IPC_STAT and the calling process does not
+have read permission; see \fIXSI Interprocess Communication\fP .
+.TP 7
+.B EINVAL
+The value of \fImsqid\fP is not a valid message queue identifier;
+or the value of \fIcmd\fP is not a valid command.
+.TP 7
+.B EPERM
+The argument \fIcmd\fP is IPC_RMID or IPC_SET and the effective user
+ID of the calling process is not equal to that of a
+process with appropriate privileges and it is not equal to the value
+of \fBmsg_perm.cuid\fP or \fBmsg_perm.uid\fP in the data
+structure associated with \fImsqid\fP.
+.TP 7
+.B EPERM
+The argument \fIcmd\fP is IPC_SET, an attempt is being made to increase
+to the value of \fBmsg_qbytes\fP, and the effective
+user ID of the calling process does not have appropriate privileges.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The POSIX Realtime Extension defines alternative interfaces for interprocess
+communication (IPC). Application developers who
+need to use IPC should design their applications so that modules using
+the IPC routines described in \fIXSI Interprocess Communication\fP
+can be easily modified to use the alternative
+interfaces.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIXSI Interprocess Communication\fP, \fIRealtime\fP, \fImq_close\fP(),
+\fImq_getattr\fP(), \fImq_notify\fP(), \fImq_open\fP(), \fImq_receive\fP(),
+\fImq_send\fP(), \fImq_setattr\fP(), \fImq_unlink\fP(), \fImsgget\fP(),
+\fImsgrcv\fP(),
+\fImsgsnd\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<sys/msg.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/msgget.3p b/man-pages-posix-2003/man3p/msgget.3p
new file mode 100644
index 0000000..593eadd
--- /dev/null
+++ b/man-pages-posix-2003/man3p/msgget.3p
@@ -0,0 +1,130 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MSGGET" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" msgget
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+msgget \- get the XSI message queue identifier
+.SH SYNOPSIS
+.LP
+\fB#include <sys/msg.h>
+.br
+.sp
+int msgget(key_t\fP \fIkey\fP\fB, int\fP \fImsgflg\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fImsgget\fP() function operates on XSI message queues (see the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Section 3.224, Message Queue). It is unspecified whether this function
+interoperates with the realtime interprocess communication facilities
+defined in \fIRealtime\fP .
+.LP
+The \fImsgget\fP() function shall return the message queue identifier
+associated with the argument \fIkey\fP.
+.LP
+A message queue identifier, associated message queue, and data structure
+(see \fI<sys/msg.h>\fP), shall be created for the argument \fIkey\fP
+if one of the following is
+true:
+.IP " *" 3
+The argument \fIkey\fP is equal to IPC_PRIVATE.
+.LP
+.IP " *" 3
+The argument \fIkey\fP does not already have a message queue identifier
+associated with it, and (\fImsgflg\fP & IPC_CREAT)
+is non-zero.
+.LP
+.LP
+Upon creation, the data structure associated with the new message
+queue identifier shall be initialized as follows:
+.IP " *" 3
+\fBmsg_perm.cuid\fP, \fBmsg_perm.uid\fP, \fBmsg_perm.cgid\fP, and
+\fBmsg_perm.gid\fP shall be set equal to the effective
+user ID and effective group ID, respectively, of the calling process.
+.LP
+.IP " *" 3
+The low-order 9 bits of \fBmsg_perm.mode\fP shall be set equal to
+the low-order 9 bits of \fImsgflg\fP.
+.LP
+.IP " *" 3
+\fBmsg_qnum\fP, \fBmsg_lspid\fP, \fBmsg_lrpid\fP, \fBmsg_stime\fP,
+and \fBmsg_rtime\fP shall be set equal to 0.
+.LP
+.IP " *" 3
+\fBmsg_ctime\fP shall be set equal to the current time.
+.LP
+.IP " *" 3
+\fBmsg_qbytes\fP shall be set equal to the system limit.
+.LP
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fImsgget\fP() shall return a non-negative
+integer, namely a message queue identifier. Otherwise,
+it shall return -1 and set \fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fImsgget\fP() function shall fail if:
+.TP 7
+.B EACCES
+A message queue identifier exists for the argument \fIkey\fP, but
+operation permission as specified by the low-order 9 bits of
+\fImsgflg\fP would not be granted; see \fIXSI Interprocess Communication\fP
+\&.
+.TP 7
+.B EEXIST
+A message queue identifier exists for the argument \fIkey\fP but ((\fImsgflg\fP
+& IPC_CREAT) && (\fImsgflg\fP
+& IPC_EXCL)) is non-zero.
+.TP 7
+.B ENOENT
+A message queue identifier does not exist for the argument \fIkey\fP
+and (\fImsgflg\fP & IPC_CREAT) is 0.
+.TP 7
+.B ENOSPC
+A message queue identifier is to be created but the system-imposed
+limit on the maximum number of allowed message queue
+identifiers system-wide would be exceeded.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The POSIX Realtime Extension defines alternative interfaces for interprocess
+communication (IPC). Application developers who
+need to use IPC should design their applications so that modules using
+the IPC routines described in \fIXSI Interprocess Communication\fP
+can be easily modified to use the alternative
+interfaces.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIXSI Interprocess Communication\fP, \fIRealtime\fP, \fImq_close\fP(),
+\fImq_getattr\fP(), \fImq_notify\fP(), \fImq_open\fP(), \fImq_receive\fP(),
+\fImq_send\fP(), \fImq_setattr\fP(), \fImq_unlink\fP(), \fImsgctl\fP(),
+\fImsgrcv\fP(),
+\fImsgsnd\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<sys/msg.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/msgrcv.3p b/man-pages-posix-2003/man3p/msgrcv.3p
new file mode 100644
index 0000000..a50c29f
--- /dev/null
+++ b/man-pages-posix-2003/man3p/msgrcv.3p
@@ -0,0 +1,219 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MSGRCV" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" msgrcv
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+msgrcv \- XSI message receive operation
+.SH SYNOPSIS
+.LP
+\fB#include <sys/msg.h>
+.br
+.sp
+ssize_t msgrcv(int\fP \fImsqid\fP\fB, void *\fP\fImsgp\fP\fB, size_t\fP
+\fImsgsz\fP\fB, long\fP
+\fImsgtyp\fP\fB,
+.br
+\ \ \ \ \ \ int\fP \fImsgflg\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fImsgrcv\fP() function operates on XSI message queues (see the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Section 3.224, Message Queue). It is unspecified whether this function
+interoperates with the realtime interprocess communication facilities
+defined in \fIRealtime\fP .
+.LP
+The \fImsgrcv\fP() function shall read a message from the queue associated
+with the message queue identifier specified by
+\fImsqid\fP and place it in the user-defined buffer pointed to by
+\fImsgp\fP.
+.LP
+The application shall ensure that the argument \fImsgp\fP points to
+a user-defined buffer that contains first a field of type
+\fBlong\fP specifying the type of the message, and then a data portion
+that holds the data bytes of the message. The structure
+below is an example of what this user-defined buffer might look like:
+.sp
+.RS
+.nf
+
+\fBstruct mymsg {
+ long mtype; /* Message type. */
+ char mtext[1]; /* Message text. */
+}
+\fP
+.fi
+.RE
+.LP
+The structure member \fImtype\fP is the received message's type as
+specified by the sending process.
+.LP
+The structure member \fImtext\fP is the text of the message.
+.LP
+The argument \fImsgsz\fP specifies the size in bytes of \fImtext\fP.
+The received message shall be truncated to \fImsgsz\fP
+bytes if it is larger than \fImsgsz\fP and (\fImsgflg\fP & MSG_NOERROR)
+is non-zero. The truncated part of the message shall
+be lost and no indication of the truncation shall be given to the
+calling process.
+.LP
+If the value of \fImsgsz\fP is greater than {SSIZE_MAX}, the result
+is implementation-defined.
+.LP
+The argument \fImsgtyp\fP specifies the type of message requested
+as follows:
+.IP " *" 3
+If \fImsgtyp\fP is 0, the first message on the queue shall be received.
+.LP
+.IP " *" 3
+If \fImsgtyp\fP is greater than 0, the first message of type \fImsgtyp\fP
+shall be received.
+.LP
+.IP " *" 3
+If \fImsgtyp\fP is less than 0, the first message of the lowest type
+that is less than or equal to the absolute value of
+\fImsgtyp\fP shall be received.
+.LP
+.LP
+The argument \fImsgflg\fP specifies the action to be taken if a message
+of the desired type is not on the queue. These are as
+follows:
+.IP " *" 3
+If (\fImsgflg\fP & IPC_NOWAIT) is non-zero, the calling thread shall
+return immediately with a return value of -1 and
+\fIerrno\fP set to [ENOMSG].
+.LP
+.IP " *" 3
+If (\fImsgflg\fP & IPC_NOWAIT) is 0, the calling thread shall suspend
+execution until one of the following occurs:
+.RS
+.IP " *" 3
+A message of the desired type is placed on the queue.
+.LP
+.IP " *" 3
+The message queue identifier \fImsqid\fP is removed from the system;
+when this occurs, \fIerrno\fP shall be set equal to
+[EIDRM] and -1 shall be returned.
+.LP
+.IP " *" 3
+The calling thread receives a signal that is to be caught; in this
+case a message is not received and the calling thread resumes
+execution in the manner prescribed in \fIsigaction\fP().
+.LP
+.RE
+.LP
+.LP
+Upon successful completion, the following actions are taken with respect
+to the data structure associated with \fImsqid\fP:
+.IP " *" 3
+\fBmsg_qnum\fP shall be decremented by 1.
+.LP
+.IP " *" 3
+\fBmsg_lrpid\fP shall be set equal to the process ID of the calling
+process.
+.LP
+.IP " *" 3
+\fBmsg_rtime\fP shall be set equal to the current time.
+.LP
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fImsgrcv\fP() shall return a value equal
+to the number of bytes actually placed into the buffer
+\fImtext\fP. Otherwise, no message shall be received, \fImsgrcv\fP()
+shall return (\fBssize_t\fP)-1, and \fIerrno\fP shall be
+set to indicate the error.
+.SH ERRORS
+.LP
+The \fImsgrcv\fP() function shall fail if:
+.TP 7
+.B E2BIG
+The value of \fImtext\fP is greater than \fImsgsz\fP and (\fImsgflg\fP
+& MSG_NOERROR) is 0.
+.TP 7
+.B EACCES
+Operation permission is denied to the calling process; see \fIXSI
+Interprocess
+Communication\fP .
+.TP 7
+.B EIDRM
+The message queue identifier \fImsqid\fP is removed from the system.
+.TP 7
+.B EINTR
+The \fImsgrcv\fP() function was interrupted by a signal.
+.TP 7
+.B EINVAL
+\fImsqid\fP is not a valid message queue identifier.
+.TP 7
+.B ENOMSG
+The queue does not contain a message of the desired type and (\fImsgflg\fP
+& IPC_NOWAIT) is non-zero.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Receiving a Message
+.LP
+The following example receives the first message on the queue (based
+on the value of the \fImsgtyp\fP argument, 0). The queue
+is identified by the \fImsqid\fP argument (assuming that the value
+has previously been set). This call specifies that an error
+should be reported if no message is available, but not if the message
+is too large. The message size is calculated directly using
+the \fIsizeof\fP operator.
+.sp
+.RS
+.nf
+
+\fB#include <sys/msg.h>
+\&...
+int result;
+int msqid;
+struct message {
+ long type;
+ char text[20];
+} msg;
+long msgtyp = 0;
+\&...
+result = msgrcv(msqid, (void *) &msg, sizeof(msg.text),
+ msgtyp, MSG_NOERROR | IPC_NOWAIT);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The POSIX Realtime Extension defines alternative interfaces for interprocess
+communication (IPC). Application developers who
+need to use IPC should design their applications so that modules using
+the IPC routines described in \fIXSI Interprocess Communication\fP
+can be easily modified to use the alternative
+interfaces.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIXSI Interprocess Communication\fP, \fIRealtime\fP, \fImq_close\fP(),
+\fImq_getattr\fP(), \fImq_notify\fP(), \fImq_open\fP(), \fImq_receive\fP(),
+\fImq_send\fP(), \fImq_setattr\fP(), \fImq_unlink\fP(), \fImsgctl\fP(),
+\fImsgget\fP(),
+\fImsgsnd\fP(), \fIsigaction\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<sys/msg.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/msgsnd.3p b/man-pages-posix-2003/man3p/msgsnd.3p
new file mode 100644
index 0000000..684fc73
--- /dev/null
+++ b/man-pages-posix-2003/man3p/msgsnd.3p
@@ -0,0 +1,201 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MSGSND" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" msgsnd
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+msgsnd \- XSI message send operation
+.SH SYNOPSIS
+.LP
+\fB#include <sys/msg.h>
+.br
+.sp
+int msgsnd(int\fP \fImsqid\fP\fB, const void *\fP\fImsgp\fP\fB, size_t\fP
+\fImsgsz\fP\fB, int\fP \fImsgflg\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fImsgsnd\fP() function operates on XSI message queues (see the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Section 3.224, Message Queue). It is unspecified whether this function
+interoperates with the realtime interprocess communication facilities
+defined in \fIRealtime\fP .
+.LP
+The \fImsgsnd\fP() function shall send a message to the queue associated
+with the message queue identifier specified by
+\fImsqid\fP.
+.LP
+The application shall ensure that the argument \fImsgp\fP points to
+a user-defined buffer that contains first a field of type
+\fBlong\fP specifying the type of the message, and then a data portion
+that holds the data bytes of the message. The structure
+below is an example of what this user-defined buffer might look like:
+.sp
+.RS
+.nf
+
+\fBstruct mymsg {
+ long mtype; /* Message type. */
+ char mtext[1]; /* Message text. */
+}
+\fP
+.fi
+.RE
+.LP
+The structure member \fImtype\fP is a non-zero positive type \fBlong\fP
+that can be used by the receiving process for message
+selection.
+.LP
+The structure member \fImtext\fP is any text of length \fImsgsz\fP
+bytes. The argument \fImsgsz\fP can range from 0 to a
+system-imposed maximum.
+.LP
+The argument \fImsgflg\fP specifies the action to be taken if one
+or more of the following is true:
+.IP " *" 3
+The number of bytes already on the queue is equal to \fBmsg_qbytes\fP;
+see \fI<sys/msg.h>\fP.
+.LP
+.IP " *" 3
+The total number of messages on all queues system-wide is equal to
+the system-imposed limit.
+.LP
+.LP
+These actions are as follows:
+.IP " *" 3
+If (\fImsgflg\fP & IPC_NOWAIT) is non-zero, the message shall not
+be sent and the calling thread shall return
+immediately.
+.LP
+.IP " *" 3
+If (\fImsgflg\fP & IPC_NOWAIT) is 0, the calling thread shall suspend
+execution until one of the following occurs:
+.RS
+.IP " *" 3
+The condition responsible for the suspension no longer exists, in
+which case the message is sent.
+.LP
+.IP " *" 3
+The message queue identifier \fImsqid\fP is removed from the system;
+when this occurs, \fIerrno\fP shall be set equal to
+[EIDRM] and -1 shall be returned.
+.LP
+.IP " *" 3
+The calling thread receives a signal that is to be caught; in this
+case the message is not sent and the calling thread resumes
+execution in the manner prescribed in \fIsigaction\fP().
+.LP
+.RE
+.LP
+.LP
+Upon successful completion, the following actions are taken with respect
+to the data structure associated with \fImsqid\fP; see
+\fI<sys/msg.h>\fP:
+.IP " *" 3
+\fBmsg_qnum\fP shall be incremented by 1.
+.LP
+.IP " *" 3
+\fBmsg_lspid\fP shall be set equal to the process ID of the calling
+process.
+.LP
+.IP " *" 3
+\fBmsg_stime\fP shall be set equal to the current time.
+.LP
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fImsgsnd\fP() shall return 0; otherwise,
+no message shall be sent, \fImsgsnd\fP() shall return
+-1, and \fIerrno\fP shall be set to indicate the error.
+.SH ERRORS
+.LP
+The \fImsgsnd\fP() function shall fail if:
+.TP 7
+.B EACCES
+Operation permission is denied to the calling process; see \fIXSI
+Interprocess
+Communication\fP .
+.TP 7
+.B EAGAIN
+The message cannot be sent for one of the reasons cited above and
+(\fImsgflg\fP & IPC_NOWAIT) is non-zero.
+.TP 7
+.B EIDRM
+The message queue identifier \fImsqid\fP is removed from the system.
+.TP 7
+.B EINTR
+The \fImsgsnd\fP() function was interrupted by a signal.
+.TP 7
+.B EINVAL
+The value of \fImsqid\fP is not a valid message queue identifier,
+or the value of \fImtype\fP is less than 1; or the value of
+\fImsgsz\fP is less than 0 or greater than the system-imposed limit.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Sending a Message
+.LP
+The following example sends a message to the queue identified by the
+\fImsqid\fP argument (assuming that value has previously
+been set). This call specifies that an error should be reported if
+no message is available. The message size is calculated directly
+using the \fIsizeof\fP operator.
+.sp
+.RS
+.nf
+
+\fB#include <sys/msg.h>
+\&...
+int result;
+int msqid;
+struct message {
+ long type;
+ char text[20];
+} msg;
+.sp
+
+msg.type = 1;
+strcpy(msg.text, "This is message 1");
+\&...
+result = msgsnd(msqid, (void *) &msg, sizeof(msg.text), IPC_NOWAIT);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The POSIX Realtime Extension defines alternative interfaces for interprocess
+communication (IPC). Application developers who
+need to use IPC should design their applications so that modules using
+the IPC routines described in \fIXSI Interprocess Communication\fP
+can be easily modified to use the alternative
+interfaces.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIXSI Interprocess Communication\fP, \fIRealtime\fP, \fImq_close\fP(),
+\fImq_getattr\fP(), \fImq_notify\fP(), \fImq_open\fP(), \fImq_receive\fP(),
+\fImq_send\fP(), \fImq_setattr\fP(), \fImq_unlink\fP(), \fImsgctl\fP(),
+\fImsgget\fP(),
+\fImsgrcv\fP(), \fIsigaction\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<sys/msg.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/msync.3p b/man-pages-posix-2003/man3p/msync.3p
new file mode 100644
index 0000000..f00eb91
--- /dev/null
+++ b/man-pages-posix-2003/man3p/msync.3p
@@ -0,0 +1,144 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MSYNC" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" msync
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+msync \- synchronize memory with physical storage
+.SH SYNOPSIS
+.LP
+\fB#include <sys/mman.h>
+.br
+.sp
+int msync(void *\fP\fIaddr\fP\fB, size_t\fP \fIlen\fP\fB, int\fP \fIflags\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fImsync\fP() function shall write all modified data to permanent
+storage locations, if any, in those whole pages
+containing any part of the address space of the process starting at
+address \fIaddr\fP and continuing for \fIlen\fP bytes. If no
+such storage exists, \fImsync\fP() need not have any effect. If requested,
+the \fImsync\fP() function shall then invalidate
+cached copies of data.
+.LP
+The implementation shall require that \fIaddr\fP be a multiple of
+the page size as returned by \fIsysconf\fP().
+.LP
+For mappings to files, the \fImsync\fP() function shall ensure that
+all write operations are completed as defined for
+synchronized I/O data integrity completion. It is unspecified whether
+the implementation also writes out other file attributes.
+When the \fImsync\fP() function is called on MAP_PRIVATE mappings,
+any modified data shall not be written to the underlying object
+and shall not cause such data to be made visible to other processes.
+It is unspecified whether data in MAP_PRIVATE mappings has any
+permanent storage locations. The effect of \fImsync\fP() on a
+shared memory object or a typed memory object is unspecified.
+The behavior of this function is unspecified if the mapping was not
+established by a call to \fImmap\fP().
+.LP
+The \fIflags\fP argument is constructed from the bitwise-inclusive
+OR of one or more of the following flags defined in the \fI<sys/mman.h>\fP
+header:
+.TS C
+center; l2 l.
+\fBSymbolic Constant\fP \fBDescription\fP
+MS_ASYNC Perform asynchronous writes.
+MS_SYNC Perform synchronous writes.
+MS_INVALIDATE Invalidate cached data.
+.TE
+.LP
+When MS_ASYNC is specified, \fImsync\fP() shall return immediately
+once all the write operations are initiated or queued for
+servicing; when MS_SYNC is specified, \fImsync\fP() shall not return
+until all write operations are completed as defined for
+synchronized I/O data integrity completion. Either MS_ASYNC or MS_SYNC
+is specified, but not both.
+.LP
+When MS_INVALIDATE is specified, \fImsync\fP() shall invalidate all
+cached copies of mapped data that are inconsistent with the
+permanent storage locations such that subsequent references shall
+obtain data that was consistent with the permanent storage
+locations sometime between the call to \fImsync\fP() and the first
+subsequent memory reference to the data.
+.LP
+If \fImsync\fP() causes any write to a file, the file's \fIst_ctime\fP
+and \fIst_mtime\fP fields shall be marked for
+update.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fImsync\fP() shall return 0; otherwise,
+it shall return -1 and set \fIerrno\fP to indicate the
+error.
+.SH ERRORS
+.LP
+The \fImsync\fP() function shall fail if:
+.TP 7
+.B EBUSY
+Some or all of the addresses in the range starting at \fIaddr\fP and
+continuing for \fIlen\fP bytes are locked, and
+MS_INVALIDATE is specified.
+.TP 7
+.B EINVAL
+The value of \fIflags\fP is invalid.
+.TP 7
+.B EINVAL
+The value of \fIaddr\fP is not a multiple of the page size {PAGESIZE}.
+.TP 7
+.B ENOMEM
+The addresses in the range starting at \fIaddr\fP and continuing for
+\fIlen\fP bytes are outside the range allowed for the
+address space of a process or specify one or more pages that are not
+mapped.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fImsync\fP() function is only supported if the Memory Mapped
+Files option and the Synchronized Input and Output option are
+supported, and thus need not be available on all implementations.
+.LP
+The \fImsync\fP() function should be used by programs that require
+a memory object to be in a known state; for example, in
+building transaction facilities.
+.LP
+Normal system activity can cause pages to be written to disk. Therefore,
+there are no guarantees that \fImsync\fP() is the only
+control over when pages are or are not written to disk.
+.SH RATIONALE
+.LP
+The \fImsync\fP() function writes out data in a mapped region to the
+permanent storage for the underlying object. The call to
+\fImsync\fP() ensures data integrity of the file.
+.LP
+After the data is written out, any cached data may be invalidated
+if the MS_INVALIDATE flag was specified. This is useful on
+systems that do not support read/write consistency.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fImmap\fP(), \fIsysconf\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<sys/mman.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/munlock.3p b/man-pages-posix-2003/man3p/munlock.3p
new file mode 100644
index 0000000..1760608
--- /dev/null
+++ b/man-pages-posix-2003/man3p/munlock.3p
@@ -0,0 +1 @@
+.so man3p/mlock.3p
diff --git a/man-pages-posix-2003/man3p/munlockall.3p b/man-pages-posix-2003/man3p/munlockall.3p
new file mode 100644
index 0000000..0189121
--- /dev/null
+++ b/man-pages-posix-2003/man3p/munlockall.3p
@@ -0,0 +1 @@
+.so man3p/mlockall.3p
diff --git a/man-pages-posix-2003/man3p/munmap.3p b/man-pages-posix-2003/man3p/munmap.3p
new file mode 100644
index 0000000..96872e3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/munmap.3p
@@ -0,0 +1,113 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "MUNMAP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" munmap
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+munmap \- unmap pages of memory
+.SH SYNOPSIS
+.LP
+\fB#include <sys/mman.h>
+.br
+.sp
+int munmap(void *\fP\fIaddr\fP\fB, size_t\fP \fIlen\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fImunmap\fP() function shall remove any mappings for those entire
+pages containing any part of the address space of the
+process starting at \fIaddr\fP and continuing for \fIlen\fP bytes.
+Further references to these pages shall result in the
+generation of a SIGSEGV signal to the process. If there are no mappings
+in the specified address range, then \fImunmap\fP() has no
+effect.
+.LP
+The implementation shall require that \fIaddr\fP be a multiple of
+the page size {PAGESIZE}.
+.LP
+If a mapping to be removed was private, any modifications made in
+this address range shall be discarded.
+.LP
+Any memory locks (see \fImlock\fP() and \fImlockall\fP()) associated
+with
+this address range shall be removed, as if by an appropriate call
+to \fImunlock\fP().
+.LP
+If a mapping removed from a typed memory object causes the corresponding
+address range of the memory pool to be inaccessible by any
+process in the system except through allocatable mappings (that is,
+mappings of typed memory objects opened with the
+POSIX_TYPED_MEM_MAP_ALLOCATABLE flag), then that range of the memory
+pool shall become deallocated and may become available to
+satisfy future typed memory allocation requests.
+.LP
+A mapping removed from a typed memory object opened with the POSIX_TYPED_MEM_MAP_ALLOCATABLE
+flag shall not affect in any way
+the availability of that typed memory for allocation.
+.LP
+The behavior of this function is unspecified if the mapping was not
+established by a call to \fImmap\fP().
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fImunmap\fP() shall return 0; otherwise,
+it shall return -1 and set \fIerrno\fP to indicate the
+error.
+.SH ERRORS
+.LP
+The \fImunmap\fP() function shall fail if:
+.TP 7
+.B EINVAL
+Addresses in the range [\fIaddr\fP,\fIaddr\fP+\fIlen\fP) are outside
+the valid range for the address space of a
+process.
+.TP 7
+.B EINVAL
+The \fIlen\fP argument is 0.
+.TP 7
+.B EINVAL
+The \fIaddr\fP argument is not a multiple of the page size as returned
+by \fIsysconf\fP().
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fImunmap\fP() function is only supported if the Memory Mapped
+Files option or the Shared Memory Objects option is
+supported.
+.SH RATIONALE
+.LP
+The \fImunmap\fP() function corresponds to SVR4, just as the \fImmap\fP()
+function
+does.
+.LP
+It is possible that an application has applied process memory locking
+to a region that contains shared memory. If this has
+occurred, the \fImunmap\fP() call ignores those locks and, if necessary,
+causes those locks to be removed.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fImlock\fP(), \fImlockall\fP(), \fImmap\fP(),
+\fIposix_typed_mem_open\fP(), \fIsysconf\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<signal.h>\fP, \fI<sys/mman.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/nan.3p b/man-pages-posix-2003/man3p/nan.3p
new file mode 100644
index 0000000..9cf5463
--- /dev/null
+++ b/man-pages-posix-2003/man3p/nan.3p
@@ -0,0 +1,97 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "NAN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" nan
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+nan, nanf, nanl \- return quiet NaN
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double nan(const char *\fP\fItagp\fP\fB);
+.br
+float nanf(const char *\fP\fItagp\fP\fB);
+.br
+long double nanl(const char *\fP\fItagp\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The function call \fInan\fP("\fIn-char-sequence\fP") shall be equivalent
+to:
+.sp
+.RS
+.nf
+
+\fBstrtod("NAN(\fP\fIn-char-sequence\fP\fB)", (char **) NULL);
+\fP
+.fi
+.RE
+.LP
+The function call \fInan\fP("") shall be equivalent to:
+.sp
+.RS
+.nf
+
+\fBstrtod("NAN()", (char **) NULL)
+\fP
+.fi
+.RE
+.LP
+If \fItagp\fP does not point to an \fIn\fP- \fBchar\fP sequence or
+an empty string, the function call shall be equivalent
+to:
+.sp
+.RS
+.nf
+
+\fBstrtod("NAN", (char **) NULL)
+\fP
+.fi
+.RE
+.LP
+Function calls to \fInanf\fP() and \fInanl\fP() are equivalent to
+the corresponding function calls to \fIstrtof\fP() and \fIstrtold\fP().
+.SH RETURN VALUE
+.LP
+These functions shall return a quiet NaN, if available, with content
+indicated through \fItagp\fP.
+.LP
+If the implementation does not support quiet NaNs, these functions
+shall return zero.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIstrtod\fP(), \fIstrtold\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/nanf.3p b/man-pages-posix-2003/man3p/nanf.3p
new file mode 100644
index 0000000..5f97c4c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/nanf.3p
@@ -0,0 +1 @@
+.so man3p/nan.3p
diff --git a/man-pages-posix-2003/man3p/nanl.3p b/man-pages-posix-2003/man3p/nanl.3p
new file mode 100644
index 0000000..5f97c4c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/nanl.3p
@@ -0,0 +1 @@
+.so man3p/nan.3p
diff --git a/man-pages-posix-2003/man3p/nanosleep.3p b/man-pages-posix-2003/man3p/nanosleep.3p
new file mode 100644
index 0000000..0afc3d8
--- /dev/null
+++ b/man-pages-posix-2003/man3p/nanosleep.3p
@@ -0,0 +1,113 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "NANOSLEEP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" nanosleep
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+nanosleep \- high resolution sleep (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <time.h>
+.br
+.sp
+int nanosleep(const struct timespec *\fP\fIrqtp\fP\fB, struct timespec
+*\fP\fIrmtp\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fInanosleep\fP() function shall cause the current thread to be
+suspended from execution until either the time interval
+specified by the \fIrqtp\fP argument has elapsed or a signal is delivered
+to the calling thread, and its action is to invoke a
+signal-catching function or to terminate the process. The suspension
+time may be longer than requested because the argument value
+is rounded up to an integer multiple of the sleep resolution or because
+of the scheduling of other activity by the system. But,
+except for the case of being interrupted by a signal, the suspension
+time shall not be less than the time specified by \fIrqtp\fP,
+as measured by the system clock CLOCK_REALTIME.
+.LP
+The use of the \fInanosleep\fP() function has no effect on the action
+or blockage of any signal.
+.SH RETURN VALUE
+.LP
+If the \fInanosleep\fP() function returns because the requested time
+has elapsed, its return value shall be zero.
+.LP
+If the \fInanosleep\fP() function returns because it has been interrupted
+by a signal, it shall return a value of -1 and set
+\fIerrno\fP to indicate the interruption. If the \fIrmtp\fP argument
+is non-NULL, the \fBtimespec\fP structure referenced by it
+is updated to contain the amount of time remaining in the interval
+(the requested time minus the time actually slept). If the
+\fIrmtp\fP argument is NULL, the remaining time is not returned.
+.LP
+If \fInanosleep\fP() fails, it shall return a value of -1 and set
+\fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fInanosleep\fP() function shall fail if:
+.TP 7
+.B EINTR
+The \fInanosleep\fP() function was interrupted by a signal.
+.TP 7
+.B EINVAL
+The \fIrqtp\fP argument specified a nanosecond value less than zero
+or greater than or equal to 1000 million.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+It is common to suspend execution of a process for an interval in
+order to poll the status of a non-interrupting function. A
+large number of actual needs can be met with a simple extension to
+\fIsleep\fP() that
+provides finer resolution.
+.LP
+In the POSIX.1-1990 standard and SVR4, it is possible to implement
+such a routine, but the frequency of wakeup is limited by the
+resolution of the \fIalarm\fP() and \fIsleep\fP()
+functions. In 4.3 BSD, it is possible to write such a routine using
+no static storage and reserving no system facilities. Although
+it is possible to write a function with similar functionality to \fIsleep\fP()
+using the
+remainder of the \fItimer_*\fP() functions, such a function requires
+the use of signals
+and the reservation of some signal number. This volume of IEEE\ Std\ 1003.1-2001
+requires that \fInanosleep\fP() be
+non-intrusive of the signals function.
+.LP
+The \fInanosleep\fP() function shall return a value of 0 on success
+and -1 on failure or if interrupted. This latter case is
+different from \fIsleep\fP(). This was done because the remaining
+time is returned via an
+argument structure pointer, \fIrmtp\fP, instead of as the return value.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsleep\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<time.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/nearbyint.3p b/man-pages-posix-2003/man3p/nearbyint.3p
new file mode 100644
index 0000000..14700bf
--- /dev/null
+++ b/man-pages-posix-2003/man3p/nearbyint.3p
@@ -0,0 +1,95 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "NEARBYINT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" nearbyint
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+nearbyint, nearbyintf, nearbyintl \- floating-point rounding functions
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double nearbyint(double\fP \fIx\fP\fB);
+.br
+float nearbyintf(float\fP \fIx\fP\fB);
+.br
+long double nearbyintl(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall round their argument to an integer value in
+floating-point format, using the current rounding direction
+and without raising the inexact floating-point exception.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the rounded
+integer value.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is \(+-0, \(+-0 shall be returned.
+.LP
+If \fIx\fP is \(+-Inf, \fIx\fP shall be returned.
+.LP
+If the correct value would cause overflow, a range error shall occur
+and \fInearbyint\fP(), \fInearbyintf\fP(), and
+\fInearbyintl\fP() shall return the value of the macro \(+-HUGE_VAL,
+\(+-HUGE_VALF, and \(+-HUGE_VALL (with the same
+sign as \fIx\fP), respectively.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Range\ Error
+The result would cause an overflow.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the overflow floating-point exception shall be raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeclearexcept\fP(), \fIfetestexcept\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment
+of
+Error Conditions for Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/nearbyintf.3p b/man-pages-posix-2003/man3p/nearbyintf.3p
new file mode 100644
index 0000000..a6ae113
--- /dev/null
+++ b/man-pages-posix-2003/man3p/nearbyintf.3p
@@ -0,0 +1 @@
+.so man3p/nearbyint.3p
diff --git a/man-pages-posix-2003/man3p/nearbyintl.3p b/man-pages-posix-2003/man3p/nearbyintl.3p
new file mode 100644
index 0000000..a6ae113
--- /dev/null
+++ b/man-pages-posix-2003/man3p/nearbyintl.3p
@@ -0,0 +1 @@
+.so man3p/nearbyint.3p
diff --git a/man-pages-posix-2003/man3p/nextafter.3p b/man-pages-posix-2003/man3p/nextafter.3p
new file mode 100644
index 0000000..073454c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/nextafter.3p
@@ -0,0 +1,128 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "NEXTAFTER" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" nextafter
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+nextafter, nextafterf, nextafterl, nexttoward, nexttowardf, nexttowardl
+\- next representable floating-point
+number
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double nextafter(double\fP \fIx\fP\fB, double\fP \fIy\fP\fB);
+.br
+float nextafterf(float\fP \fIx\fP\fB, float\fP \fIy\fP\fB);
+.br
+long double nextafterl(long double\fP \fIx\fP\fB, long double\fP \fIy\fP\fB);
+.br
+double nexttoward(double\fP \fIx\fP\fB, long double\fP \fIy\fP\fB);
+.br
+float nexttowardf(float\fP \fIx\fP\fB, long double\fP \fIy\fP\fB);
+.br
+long double nexttowardl(long double\fP \fIx\fP\fB, long double\fP
+\fIy\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fInextafter\fP(), \fInextafterf\fP(), and \fInextafterl\fP()
+functions shall compute the next representable
+floating-point value following \fIx\fP in the direction of \fIy\fP.
+Thus, if \fIy\fP is less than \fIx\fP, \fInextafter\fP()
+shall return the largest representable floating-point number less
+than \fIx\fP. The \fInextafter\fP(), \fInextafterf\fP(), and
+\fInextafterl\fP() functions shall return \fIy\fP if \fIx\fP equals
+\fIy\fP.
+.LP
+The \fInexttoward\fP(), \fInexttowardf\fP(), and \fInexttowardl\fP()
+functions shall be equivalent to the corresponding
+\fInextafter\fP() functions, except that the second parameter shall
+have type \fBlong double\fP and the functions shall return
+\fIy\fP converted to the type of the function if \fIx\fP equals \fIy\fP.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the next
+representable floating-point value following \fIx\fP in the
+direction of \fIy\fP.
+.LP
+If \fIx\fP== \fIy\fP, \fIy\fP (of the type \fIx\fP) shall be returned.
+.LP
+If \fIx\fP is finite and the correct function value would overflow,
+a range error shall occur and \(+-HUGE_VAL,
+\(+-HUGE_VALF, and \(+-HUGE_VALL (with the same sign as \fIx\fP) shall
+be returned as appropriate for the return type of
+the function.
+.LP
+If
+\fIx\fP or \fIy\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP!= \fIy\fP and the correct function value is subnormal,
+zero, or underflows, a range error shall occur, and either
+the correct function value (if representable) or 0.0 shall be returned.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Range\ Error
+The correct value overflows.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the overflow floating-point exception shall be
+raised.
+.TP 7
+Range\ Error
+The correct value is subnormal or underflows.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the underflow floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeclearexcept\fP(), \fIfetestexcept\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment
+of
+Error Conditions for Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/nextafterf.3p b/man-pages-posix-2003/man3p/nextafterf.3p
new file mode 100644
index 0000000..2c0c1d7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/nextafterf.3p
@@ -0,0 +1 @@
+.so man3p/nextafter.3p
diff --git a/man-pages-posix-2003/man3p/nextafterl.3p b/man-pages-posix-2003/man3p/nextafterl.3p
new file mode 100644
index 0000000..2c0c1d7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/nextafterl.3p
@@ -0,0 +1 @@
+.so man3p/nextafter.3p
diff --git a/man-pages-posix-2003/man3p/nexttoward.3p b/man-pages-posix-2003/man3p/nexttoward.3p
new file mode 100644
index 0000000..2c0c1d7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/nexttoward.3p
@@ -0,0 +1 @@
+.so man3p/nextafter.3p
diff --git a/man-pages-posix-2003/man3p/nexttowardf.3p b/man-pages-posix-2003/man3p/nexttowardf.3p
new file mode 100644
index 0000000..2c0c1d7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/nexttowardf.3p
@@ -0,0 +1 @@
+.so man3p/nextafter.3p
diff --git a/man-pages-posix-2003/man3p/nexttowardl.3p b/man-pages-posix-2003/man3p/nexttowardl.3p
new file mode 100644
index 0000000..2c0c1d7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/nexttowardl.3p
@@ -0,0 +1 @@
+.so man3p/nextafter.3p
diff --git a/man-pages-posix-2003/man3p/nftw.3p b/man-pages-posix-2003/man3p/nftw.3p
new file mode 100644
index 0000000..7ec2408
--- /dev/null
+++ b/man-pages-posix-2003/man3p/nftw.3p
@@ -0,0 +1,258 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "NFTW" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" nftw
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+nftw \- walk a file tree
+.SH SYNOPSIS
+.LP
+\fB#include <ftw.h>
+.br
+.sp
+int nftw(const char *\fP\fIpath\fP\fB, int (*\fP\fIfn\fP\fB)(const
+char *,
+.br
+\ \ \ \ \ \ const struct stat *, int, struct FTW *), int\fP \fIdepth\fP\fB,
+int\fP
+\fIflags\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fInftw\fP() function shall recursively descend the directory
+hierarchy rooted in \fIpath\fP. The \fInftw\fP() function
+has a similar effect to \fIftw\fP() except that it takes an additional
+argument \fIflags\fP,
+which is a bitwise-inclusive OR of zero or more of the following flags:
+.TP 7
+FTW_CHDIR
+If set, \fInftw\fP() shall change the current working directory to
+each directory as it reports files in that directory. If
+clear, \fInftw\fP() shall not change the current working directory.
+.TP 7
+FTW_DEPTH
+If set, \fInftw\fP() shall report all files in a directory before
+reporting the directory itself. If clear, \fInftw\fP()
+shall report any directory before reporting the files in that directory.
+.TP 7
+FTW_MOUNT
+If set, \fInftw\fP() shall only report files in the same file system
+as \fIpath\fP. If clear, \fInftw\fP() shall report all
+files encountered during the walk.
+.TP 7
+FTW_PHYS
+If set, \fInftw\fP() shall perform a physical walk and shall not follow
+symbolic links.
+.sp
+.LP
+If FTW_PHYS is clear and FTW_DEPTH is set, \fInftw\fP() shall follow
+links instead of reporting them, but shall not report any
+directory that would be a descendant of itself. If FTW_PHYS is clear
+and FTW_DEPTH is clear, \fInftw\fP() shall follow links
+instead of reporting them, but shall not report the contents of any
+directory that would be a descendant of itself.
+.LP
+At each file it encounters, \fInftw\fP() shall call the user-supplied
+function \fIfn\fP with four arguments:
+.IP " *" 3
+The first argument is the pathname of the object.
+.LP
+.IP " *" 3
+The second argument is a pointer to the \fBstat\fP buffer containing
+information on the object.
+.LP
+.IP " *" 3
+The third argument is an integer giving additional information. Its
+value is one of the following:
+.TP 7
+FTW_F
+.RS
+The object is a file.
+.RE
+.TP 7
+FTW_D
+.RS
+The object is a directory.
+.RE
+.TP 7
+FTW_DP
+.RS
+The object is a directory and subdirectories have been visited. (This
+condition shall only occur if the FTW_DEPTH flag is
+included in \fIflags\fP.)
+.RE
+.TP 7
+FTW_SL
+.RS
+The object is a symbolic link. (This condition shall only occur if
+the FTW_PHYS flag is included in \fIflags\fP.)
+.RE
+.TP 7
+FTW_SLN
+.RS
+The object is a symbolic link that does not name an existing file.
+(This condition shall only occur if the FTW_PHYS flag is not
+included in \fIflags\fP.)
+.RE
+.TP 7
+FTW_DNR
+.RS
+The object is a directory that cannot be read. The \fIfn\fP function
+shall not be called for any of its descendants.
+.RE
+.TP 7
+FTW_NS
+.RS
+The \fIstat\fP() function failed on the object because of lack of
+appropriate permission.
+The \fBstat\fP buffer passed to \fIfn\fP is undefined. Failure of
+\fIstat\fP() for any
+other reason is considered an error and \fInftw\fP() shall return
+-1.
+.RE
+.sp
+.LP
+.IP " *" 3
+The fourth argument is a pointer to an \fBFTW\fP structure. The value
+of \fBbase\fP is the offset of the object's filename in
+the pathname passed as the first argument to \fIfn\fP. The value of
+\fBlevel\fP indicates depth relative to the root of the walk,
+where the root level is 0.
+.LP
+.LP
+The results are unspecified if the application-supplied \fIfn\fP function
+does not preserve the current working directory.
+.LP
+The argument \fIdepth\fP sets the maximum number of file descriptors
+that shall be used by \fInftw\fP() while traversing the
+file tree. At most one file descriptor shall be used for each directory
+level.
+.LP
+The \fInftw\fP() function need not be reentrant. A function that is
+not required to be reentrant is not required to be
+thread-safe.
+.SH RETURN VALUE
+.LP
+The \fInftw\fP() function shall continue until the first of the following
+conditions occurs:
+.IP " *" 3
+An invocation of \fIfn\fP shall return a non-zero value, in which
+case \fInftw\fP() shall return that value.
+.LP
+.IP " *" 3
+The \fInftw\fP() function detects an error other than [EACCES] (see
+FTW_DNR and FTW_NS above), in which case \fInftw\fP()
+shall return -1 and set \fIerrno\fP to indicate the error.
+.LP
+.IP " *" 3
+The tree is exhausted, in which case \fInftw\fP() shall return 0.
+.LP
+.SH ERRORS
+.LP
+The \fInftw\fP() function shall fail if:
+.TP 7
+.B EACCES
+Search permission is denied for any component of \fIpath\fP or read
+permission is denied for \fIpath\fP, or \fIfn\fP returns
+-1 and does not reset \fIerrno\fP.
+.TP 7
+.B ELOOP
+A loop exists in symbolic links encountered during resolution of the
+\fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+The length of the \fIpath\fP argument exceeds {PATH_MAX} or a pathname
+component is longer than {NAME_MAX}.
+.TP 7
+.B ENOENT
+A component of \fIpath\fP does not name an existing file or \fIpath\fP
+is an empty string.
+.TP 7
+.B ENOTDIR
+A component of \fIpath\fP is not a directory.
+.TP 7
+.B EOVERFLOW
+A field in the \fBstat\fP structure cannot be represented correctly
+in the current programming environment for one or more
+files found in the file hierarchy.
+.sp
+.LP
+The \fInftw\fP() function may fail if:
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the \fIpath\fP argument.
+.TP 7
+.B EMFILE
+{OPEN_MAX} file descriptors are currently open in the calling process.
+.TP 7
+.B ENAMETOOLONG
+Pathname resolution of a symbolic link produced an intermediate result
+whose length exceeds {PATH_MAX}.
+.TP 7
+.B ENFILE
+Too many files are currently open in the system.
+.sp
+.LP
+In addition, \fIerrno\fP may be set if the function pointed to by
+\fIfn\fP causes \fIerrno\fP to be set.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+The following example walks the \fB/tmp\fP directory and its subdirectories,
+calling the \fInftw\fP() function for every
+directory entry, to a maximum of 5 levels deep.
+.sp
+.RS
+.nf
+
+\fB#include <ftw.h>
+\&...
+int nftwfunc(const char *, const struct stat *, int, struct FTW *);
+.sp
+
+int nftwfunc(const char *filename, const struct stat *statptr,
+ int fileflags, struct FTW *pfwt)
+{
+ return 0;
+}
+\&...
+char *startpath = "/tmp";
+int depth = 5;
+int flags = FTW_CHDIR | FTW_DEPTH | FTW_MOUNT;
+int ret;
+.sp
+
+ret = nftw(startpath, nftwfunc, depth, flags);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIlstat\fP(), \fIopendir\fP(), \fIreaddir\fP(), \fIstat\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<ftw.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/nice.3p b/man-pages-posix-2003/man3p/nice.3p
new file mode 100644
index 0000000..2fe455b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/nice.3p
@@ -0,0 +1,102 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "NICE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" nice
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+nice \- change the nice value of a process
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+int nice(int\fP \fIincr\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fInice\fP() function shall add the value of \fIincr\fP to the
+nice value of the calling process. A process' nice value is
+a non-negative number for which a more positive value shall result
+in less favorable scheduling.
+.LP
+A maximum nice value of 2*{NZERO}-1 and a minimum nice value of 0
+shall be imposed by the system. Requests for values above or
+below these limits shall result in the nice value being set to the
+corresponding limit. Only a process with appropriate privileges
+can lower the nice value.
+.LP
+Calling the \fInice\fP() function has no effect on the priority of
+processes or threads with policy SCHED_FIFO or SCHED_RR. The
+effect on processes or threads with other scheduling policies is implementation-defined.
+.LP
+The nice value set with \fInice\fP() shall be applied to the process.
+If the process is multi-threaded, the nice value shall
+affect all system scope threads in the process.
+.LP
+As -1 is a permissible return value in a successful situation, an
+application wishing to check for error situations should set
+\fIerrno\fP to 0, then call \fInice\fP(), and if it returns -1, check
+to see whether \fIerrno\fP is non-zero.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fInice\fP() shall return the new nice
+value -{NZERO}. Otherwise, -1 shall be returned, the
+process' nice value shall not be changed, and \fIerrno\fP shall be
+set to indicate the error.
+.SH ERRORS
+.LP
+The \fInice\fP() function shall fail if:
+.TP 7
+.B EPERM
+The \fIincr\fP argument is negative and the calling process does not
+have appropriate privileges.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Changing the Nice Value
+.LP
+The following example adds the value of the \fIincr\fP argument, -20,
+to the nice value of the calling process.
+.sp
+.RS
+.nf
+
+\fB#include <unistd.h>
+\&...
+int incr = -20;
+int ret;
+.sp
+
+ret = nice(incr);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgetpriority\fP(), \fIsetpriority\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<limits.h>\fP, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/nl_langinfo.3p b/man-pages-posix-2003/man3p/nl_langinfo.3p
new file mode 100644
index 0000000..12b8b17
--- /dev/null
+++ b/man-pages-posix-2003/man3p/nl_langinfo.3p
@@ -0,0 +1,107 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "NL_LANGINFO" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" nl_langinfo
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+nl_langinfo \- language information
+.SH SYNOPSIS
+.LP
+\fB#include <langinfo.h>
+.br
+.sp
+char *nl_langinfo(nl_item\fP \fIitem\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fInl_langinfo\fP() function shall return a pointer to a string
+containing information relevant to the particular language
+or cultural area defined in the program's locale (see \fI<langinfo.h>\fP).
+The
+manifest constant names and values of \fIitem\fP are defined in \fI<langinfo.h>\fP.
+For example:
+.sp
+.RS
+.nf
+
+\fBnl_langinfo(ABDAY_1)
+\fP
+.fi
+.RE
+.LP
+would return a pointer to the string \fB"Dom"\fP if the identified
+language was Portuguese, and \fB"Sun"\fP if the
+identified language was English.
+.LP
+Calls to \fIsetlocale\fP() with a category corresponding to the category
+of
+\fIitem\fP (see \fI<langinfo.h>\fP), or to the category \fILC_ALL
+,\fP may
+overwrite the array pointed to by the return value.
+.LP
+The \fInl_langinfo\fP() function need not be reentrant. A function
+that is not required to be reentrant is not required to be
+thread-safe.
+.SH RETURN VALUE
+.LP
+In a locale where \fIlanginfo\fP data is not defined, \fInl_langinfo\fP()
+shall return a pointer to the corresponding string
+in the POSIX locale. In all locales, \fInl_langinfo\fP() shall return
+a pointer to an empty string if \fIitem\fP contains an
+invalid setting.
+.LP
+This pointer may point to static data that may be overwritten on the
+next call.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Getting Date and Time Formatting Information
+.LP
+The following example returns a pointer to a string containing date
+and time formatting information, as defined in the
+\fILC_TIME\fP category of the current locale.
+.sp
+.RS
+.nf
+
+\fB#include <time.h>
+#include <langinfo.h>
+\&...
+strftime(datestring, sizeof(datestring), nl_langinfo(D_T_FMT), tm);
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The array pointed to by the return value should not be modified by
+the program, but may be modified by further calls to
+\fInl_langinfo\fP().
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsetlocale\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 7, Locale, \fI<langinfo.h>\fP, \fI<nl_types.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/nrand48.3p b/man-pages-posix-2003/man3p/nrand48.3p
new file mode 100644
index 0000000..a71d5ed
--- /dev/null
+++ b/man-pages-posix-2003/man3p/nrand48.3p
@@ -0,0 +1 @@
+.so man3p/drand48.3p
diff --git a/man-pages-posix-2003/man3p/ntohl.3p b/man-pages-posix-2003/man3p/ntohl.3p
new file mode 100644
index 0000000..6bb3f2d
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ntohl.3p
@@ -0,0 +1 @@
+.so man3p/htonl.3p
diff --git a/man-pages-posix-2003/man3p/ntohs.3p b/man-pages-posix-2003/man3p/ntohs.3p
new file mode 100644
index 0000000..6bb3f2d
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ntohs.3p
@@ -0,0 +1 @@
+.so man3p/htonl.3p
diff --git a/man-pages-posix-2003/man3p/open.3p b/man-pages-posix-2003/man3p/open.3p
new file mode 100644
index 0000000..853c434
--- /dev/null
+++ b/man-pages-posix-2003/man3p/open.3p
@@ -0,0 +1,499 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "OPEN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" open
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+open \- open a file
+.SH SYNOPSIS
+.LP
+\fB#include <sys/stat.h> \fP
+\fB
+.br
+#include <fcntl.h>
+.br
+.sp
+int open(const char *\fP\fIpath\fP\fB, int\fP \fIoflag\fP\fB, ...
+);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIopen\fP() function shall establish the connection between a
+file and a file descriptor. It shall create an open file
+description that refers to a file and a file descriptor that refers
+to that open file description. The file descriptor is used by
+other I/O functions to refer to that file. The \fIpath\fP argument
+points to a pathname naming the file.
+.LP
+The \fIopen\fP() function shall return a file descriptor for the named
+file that is the lowest file descriptor not currently
+open for that process. The open file description is new, and therefore
+the file descriptor shall not share it with any other
+process in the system. The FD_CLOEXEC file descriptor flag associated
+with the new file descriptor shall be cleared.
+.LP
+The file offset used to mark the current position within the file
+shall be set to the beginning of the file.
+.LP
+The file status flags and file access modes of the open file description
+shall be set according to the value of
+\fIoflag\fP.
+.LP
+Values for \fIoflag\fP are constructed by a bitwise-inclusive OR of
+flags from the following list, defined in \fI<fcntl.h>\fP. Applications
+shall specify exactly one of the first three values (file
+access modes) below in the value of \fIoflag\fP:
+.TP 7
+O_RDONLY
+Open for reading only.
+.TP 7
+O_WRONLY
+Open for writing only.
+.TP 7
+O_RDWR
+Open for reading and writing. The result is undefined if this flag
+is applied to a FIFO.
+.sp
+.LP
+Any combination of the following may be used:
+.TP 7
+O_APPEND
+If set, the file offset shall be set to the end of the file prior
+to each write.
+.TP 7
+O_CREAT
+If the file exists, this flag has no effect except as noted under
+O_EXCL below. Otherwise, the file shall be created; the user
+ID of the file shall be set to the effective user ID of the process;
+the group ID of the file shall be set to the group ID of the
+file's parent directory or to the effective group ID of the process;
+and the access permission bits (see \fI<sys/stat.h>\fP) of the file
+mode shall be set to the value of the third argument taken
+as type \fBmode_t\fP modified as follows: a bitwise AND is performed
+on the file-mode bits and the corresponding bits in the
+complement of the process' file mode creation mask. Thus, all bits
+in the file mode whose corresponding bit in the file mode
+creation mask is set are cleared. When bits other than the file permission
+bits are set, the effect is unspecified. The third
+argument does not affect whether the file is open for reading, writing,
+or for both. Implementations shall provide a way to
+initialize the file's group ID to the group ID of the parent directory.
+Implementations may, but need not, provide an
+implementation-defined way to initialize the file's group ID to the
+effective group ID of the calling process.
+.TP 7
+O_DSYNC
+Write I/O operations on the file descriptor shall complete as defined
+by synchronized I/O data integrity completion.
+.TP 7
+O_EXCL
+If O_CREAT and O_EXCL are set, \fIopen\fP() shall fail if the file
+exists. The check for the existence of the file and the
+creation of the file if it does not exist shall be atomic with respect
+to other threads executing \fIopen\fP() naming the same
+filename in the same directory with O_EXCL and O_CREAT set. If O_EXCL
+and O_CREAT are set, and \fIpath\fP names a symbolic link,
+\fIopen\fP() shall fail and set \fIerrno\fP to [EEXIST], regardless
+of the contents of the symbolic link. If O_EXCL is set and
+O_CREAT is not set, the result is undefined.
+.TP 7
+O_NOCTTY
+If set and \fIpath\fP identifies a terminal device, \fIopen\fP() shall
+not cause the terminal device to become the
+controlling terminal for the process.
+.TP 7
+O_NONBLOCK
+When opening a FIFO with O_RDONLY or O_WRONLY set:
+.RS
+.IP " *" 3
+If O_NONBLOCK is set, an \fIopen\fP() for reading-only shall return
+without delay. An \fIopen\fP() for writing-only shall
+return an error if no process currently has the file open for reading.
+.LP
+.IP " *" 3
+If O_NONBLOCK is clear, an \fIopen\fP() for reading-only shall block
+the calling thread until a thread opens the file for
+writing. An \fIopen\fP() for writing-only shall block the calling
+thread until a thread opens the file for reading.
+.LP
+.RE
+.LP
+When opening a block special or character special file that supports
+non-blocking opens:
+.RS
+.IP " *" 3
+If O_NONBLOCK is set, the \fIopen\fP() function shall return without
+blocking for the device to be ready or available.
+Subsequent behavior of the device is device-specific.
+.LP
+.IP " *" 3
+If O_NONBLOCK is clear, the \fIopen\fP() function shall block the
+calling thread until the device is ready or available before
+returning.
+.LP
+.RE
+.LP
+Otherwise, the behavior of O_NONBLOCK is unspecified.
+.TP 7
+O_RSYNC
+Read I/O operations on the file descriptor shall complete at the same
+level of integrity as specified by the O_DSYNC and O_SYNC
+flags. If both O_DSYNC and O_RSYNC are set in \fIoflag\fP, all I/O
+operations on the file descriptor shall complete as defined by
+synchronized I/O data integrity completion. If both O_SYNC and O_RSYNC
+are set in flags, all I/O operations on the file descriptor
+shall complete as defined by synchronized I/O file integrity completion.
+.TP 7
+O_SYNC
+Write I/O operations on the file descriptor shall complete as defined
+by synchronized I/O file integrity completion.
+.TP 7
+O_TRUNC
+If the file exists and is a regular file, and the file is successfully
+opened O_RDWR or O_WRONLY, its length shall be truncated
+to 0, and the mode and owner shall be unchanged. It shall have no
+effect on FIFO special files or terminal device files. Its effect
+on other file types is implementation-defined. The result of using
+O_TRUNC with O_RDONLY is undefined.
+.sp
+.LP
+If O_CREAT is set and the file did not previously exist, upon successful
+completion, \fIopen\fP() shall mark for update the
+\fIst_atime,\fP \fIst_ctime\fP, and \fIst_mtime\fP fields of the file
+and the \fIst_ctime\fP and \fIst_mtime\fP fields of the
+parent directory.
+.LP
+If O_TRUNC is set and the file did previously exist, upon successful
+completion, \fIopen\fP() shall mark for update the
+\fIst_ctime\fP and \fIst_mtime\fP fields of the file.
+.LP
+If both the O_SYNC and O_DSYNC flags are set, the effect is as if
+only the O_SYNC flag was set.
+.LP
+If \fIpath\fP refers to a STREAMS file, \fIoflag\fP may be constructed
+from O_NONBLOCK OR'ed with either O_RDONLY, O_WRONLY, or
+O_RDWR. Other flag values are not applicable to STREAMS devices and
+shall have no effect on them. The value O_NONBLOCK affects the
+operation of STREAMS drivers and certain functions applied to file
+descriptors associated with STREAMS files. For STREAMS drivers,
+the implementation of O_NONBLOCK is device-specific.
+.LP
+If \fIpath\fP names the master side of a pseudo-terminal device, then
+it is unspecified whether \fIopen\fP() locks the slave side
+so that it cannot be opened. Conforming applications shall call \fIunlockpt\fP()
+before
+opening the slave side.
+.LP
+The largest value that can be represented correctly in an object of
+type \fBoff_t\fP shall be established as the offset maximum
+in the open file description.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the function shall open the file and return
+a non-negative integer representing the lowest numbered
+unused file descriptor. Otherwise, -1 shall be returned and \fIerrno\fP
+set to indicate the error. No files shall be created or
+modified if the function returns -1.
+.SH ERRORS
+.LP
+The \fIopen\fP() function shall fail if:
+.TP 7
+.B EACCES
+Search permission is denied on a component of the path prefix, or
+the file exists and the permissions specified by \fIoflag\fP
+are denied, or the file does not exist and write permission is denied
+for the parent directory of the file to be created, or
+O_TRUNC is specified and write permission is denied.
+.TP 7
+.B EEXIST
+O_CREAT and O_EXCL are set, and the named file exists.
+.TP 7
+.B EINTR
+A signal was caught during \fIopen\fP().
+.TP 7
+.B EINVAL
+The implementation does not support synchronized I/O for this file.
+.TP 7
+.B EIO
+The \fIpath\fP argument names a STREAMS file and a hangup or error
+occurred during the \fIopen\fP().
+.TP 7
+.B EISDIR
+The named file is a directory and \fIoflag\fP includes O_WRONLY or
+O_RDWR.
+.TP 7
+.B ELOOP
+A loop exists in symbolic links encountered during resolution of the
+\fIpath\fP argument.
+.TP 7
+.B EMFILE
+{OPEN_MAX} file descriptors are currently open in the calling process.
+.TP 7
+.B ENAMETOOLONG
+The length of the \fIpath\fP argument exceeds {PATH_MAX} or a pathname
+component is longer than {NAME_MAX}.
+.TP 7
+.B ENFILE
+The maximum allowable number of files is currently open in the system.
+.TP 7
+.B ENOENT
+O_CREAT is not set and the named file does not exist; or O_CREAT is
+set and either the path prefix does not exist or the
+\fIpath\fP argument points to an empty string.
+.TP 7
+.B ENOSR
+The \fIpath\fP argument names a STREAMS-based file and the system
+is unable to allocate a STREAM.
+.TP 7
+.B ENOSPC
+The directory or file system that would contain the new file cannot
+be expanded, the file does not exist, and O_CREAT is
+specified.
+.TP 7
+.B ENOTDIR
+A component of the path prefix is not a directory.
+.TP 7
+.B ENXIO
+O_NONBLOCK is set, the named file is a FIFO, O_WRONLY is set, and
+no process has the file open for reading.
+.TP 7
+.B ENXIO
+The named file is a character special or block special file, and the
+device associated with this special file does not
+exist.
+.TP 7
+.B EOVERFLOW
+The named file is a regular file and the size of the file cannot be
+represented correctly in an object of type
+\fBoff_t\fP.
+.TP 7
+.B EROFS
+The named file resides on a read-only file system and either O_WRONLY,
+O_RDWR, O_CREAT (if the file does not exist), or O_TRUNC
+is set in the \fIoflag\fP argument.
+.sp
+.LP
+The \fIopen\fP() function may fail if:
+.TP 7
+.B EAGAIN
+The \fIpath\fP argument names the slave side of a pseudo-terminal
+device that is locked.
+.TP 7
+.B EINVAL
+The value of the \fIoflag\fP argument is not valid.
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the \fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+As a result of encountering a symbolic link in resolution of the \fIpath\fP
+argument, the length of the substituted pathname
+string exceeded {PATH_MAX}.
+.TP 7
+.B ENOMEM
+The \fIpath\fP argument names a STREAMS file and the system is unable
+to allocate resources.
+.TP 7
+.B ETXTBSY
+The file is a pure procedure (shared text) file that is being executed
+and \fIoflag\fP is O_WRONLY or O_RDWR.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Opening a File for Writing by the Owner
+.LP
+The following example opens the file \fB/tmp/file\fP, either by creating
+it (if it does not already exist), or by truncating
+its length to 0 (if it does exist). In the former case, if the call
+creates a new file, the access permission bits in the file mode
+of the file are set to permit reading and writing by the owner, and
+to permit reading only by group members and others.
+.LP
+If the call to \fIopen\fP() is successful, the file is opened for
+writing.
+.sp
+.RS
+.nf
+
+\fB#include <fcntl.h>
+\&...
+int fd;
+mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH;
+char *filename = "/tmp/file";
+\&...
+fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, mode);
+\&...
+\fP
+.fi
+.RE
+.SS Opening a File Using an Existence Check
+.LP
+The following example uses the \fIopen\fP() function to try to create
+the \fBLOCKFILE\fP file and open it for writing. Since
+the \fIopen\fP() function specifies the O_EXCL flag, the call fails
+if the file already exists. In that case, the program assumes
+that someone else is updating the password file and exits.
+.sp
+.RS
+.nf
+
+\fB#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+.sp
+
+#define LOCKFILE "/etc/ptmp"
+\&...
+int pfd; /* Integer for file descriptor returned by open() call. */
+\&...
+if ((pfd = open(LOCKFILE, O_WRONLY | O_CREAT | O_EXCL,
+ S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) == -1)
+{
+ fprintf(stderr, "Cannot open /etc/ptmp. Try again later.\\n");
+ exit(1);
+}
+\&...
+\fP
+.fi
+.RE
+.SS Opening a File for Writing
+.LP
+The following example opens a file for writing, creating the file
+if it does not already exist. If the file does exist, the
+system truncates the file to zero bytes.
+.sp
+.RS
+.nf
+
+\fB#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+.sp
+
+#define LOCKFILE "/etc/ptmp"
+\&...
+int pfd;
+char filename[PATH_MAX+1];
+\&...
+if ((pfd = open(filename, O_WRONLY | O_CREAT | O_TRUNC,
+ S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) == -1)
+{
+ perror("Cannot open output file\\n"); exit(1);
+}
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+Except as specified in this volume of IEEE\ Std\ 1003.1-2001, the
+flags allowed in \fIoflag\fP are not
+mutually-exclusive and any number of them may be used simultaneously.
+.LP
+Some implementations permit opening FIFOs with O_RDWR. Since FIFOs
+could be implemented in other ways, and since two file
+descriptors can be used to the same effect, this possibility is left
+as undefined.
+.LP
+See \fIgetgroups\fP() about the group of a newly created file.
+.LP
+The use of \fIopen\fP() to create a regular file is preferable to
+the use of \fIcreat\fP(), because the latter is redundant and included
+only for historical reasons.
+.LP
+The use of the O_TRUNC flag on FIFOs and directories (pipes cannot
+be \fIopen\fP()-ed) must be permissible without unexpected
+side effects (for example, \fIcreat\fP() on a FIFO must not remove
+data). Since terminal
+special files might have type-ahead data stored in the buffer, O_TRUNC
+should not affect their content, particularly if a program
+that normally opens a regular file should open the current controlling
+terminal instead. Other file types, particularly
+implementation-defined ones, are left implementation-defined.
+.LP
+IEEE\ Std\ 1003.1-2001 permits [EACCES] to be returned for conditions
+other than those explicitly listed.
+.LP
+The O_NOCTTY flag was added to allow applications to avoid unintentionally
+acquiring a controlling terminal as a side effect of
+opening a terminal file. This volume of IEEE\ Std\ 1003.1-2001 does
+not specify how a controlling terminal is acquired, but
+it allows an implementation to provide this on \fIopen\fP() if the
+O_NOCTTY flag is not set and other conditions specified in the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 11, General
+Terminal Interface are met. The O_NOCTTY flag is an effective no-op
+if the file being opened is not a terminal device.
+.LP
+In historical implementations the value of O_RDONLY is zero. Because
+of that, it is not possible to detect the presence of
+O_RDONLY and another option. Future implementations should encode
+O_RDONLY and O_WRONLY as bit flags so that:
+.sp
+.RS
+.nf
+
+\fBO_RDONLY | O_WRONLY == O_RDWR
+\fP
+.fi
+.RE
+.LP
+In general, the \fIopen\fP() function follows the symbolic link if
+\fIpath\fP names a symbolic link. However, the
+\fIopen\fP() function, when called with O_CREAT and O_EXCL, is required
+to fail with [EEXIST] if \fIpath\fP names an existing
+symbolic link, even if the symbolic link refers to a nonexistent file.
+This behavior is required so that privileged applications
+can create a new file in a known location without the possibility
+that a symbolic link might cause the file to be created in a
+different location.
+.LP
+For example, a privileged application that must create a file with
+a predictable name in a user-writable directory, such as the
+user's home directory, could be compromised if the user creates a
+symbolic link with that name that refers to a nonexistent file in
+a system directory. If the user can influence the contents of a file,
+the user could compromise the system by creating a new system
+configuration or spool file that would then be interpreted by the
+system. The test for a symbolic link which refers to a
+nonexisting file must be atomic with the creation of a new file.
+.LP
+The POSIX.1-1990 standard required that the group ID of a newly created
+file be set to the group ID of its parent directory or
+to the effective group ID of the creating process. FIPS 151-2 required
+that implementations provide a way to have the group ID be
+set to the group ID of the containing directory, but did not prohibit
+implementations also supporting a way to set the group ID to
+the effective group ID of the creating process. Conforming applications
+should not assume which group ID will be used. If it
+matters, an application can use \fIchown\fP() to set the group ID
+after the file is created,
+or determine under what conditions the implementation will set the
+desired group ID.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIchmod\fP(), \fIclose\fP(), \fIcreat\fP(), \fIdup\fP(), \fIfcntl\fP(),
+\fIlseek\fP(), \fIread\fP(), \fIumask\fP(), \fIunlockpt\fP(),
+\fIwrite\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<fcntl.h>\fP, \fI<sys/stat.h>\fP, \fI<sys/types.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/opendir.3p b/man-pages-posix-2003/man3p/opendir.3p
new file mode 100644
index 0000000..fddea80
--- /dev/null
+++ b/man-pages-posix-2003/man3p/opendir.3p
@@ -0,0 +1,162 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "OPENDIR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" opendir
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+opendir \- open a directory
+.SH SYNOPSIS
+.LP
+\fB#include <dirent.h>
+.br
+.sp
+DIR *opendir(const char *\fP\fIdirname\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIopendir\fP() function shall open a directory stream corresponding
+to the directory named by the \fIdirname\fP argument.
+The directory stream is positioned at the first entry. If the type
+\fBDIR\fP is implemented using a file descriptor, applications
+shall only be able to open up to a total of {OPEN_MAX} files and directories.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIopendir\fP() shall return a pointer
+to an object of type \fBDIR\fP. Otherwise, a null pointer
+shall be returned and \fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fIopendir\fP() function shall fail if:
+.TP 7
+.B EACCES
+Search permission is denied for the component of the path prefix of
+\fIdirname\fP or read permission is denied for
+\fIdirname\fP.
+.TP 7
+.B ELOOP
+A loop exists in symbolic links encountered during resolution of the
+\fIdirname\fP argument.
+.TP 7
+.B ENAMETOOLONG
+The length of the \fIdirname\fP argument exceeds {PATH_MAX} or a pathname
+component is longer than {NAME_MAX}.
+.TP 7
+.B ENOENT
+A component of \fIdirname\fP does not name an existing directory or
+\fIdirname\fP is an empty string.
+.TP 7
+.B ENOTDIR
+A component of \fIdirname\fP is not a directory.
+.sp
+.LP
+The \fIopendir\fP() function may fail if:
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the \fIdirname\fP argument.
+.TP 7
+.B EMFILE
+{OPEN_MAX} file descriptors are currently open in the calling process.
+.TP 7
+.B ENAMETOOLONG
+As a result of encountering a symbolic link in resolution of the \fIdirname\fP
+argument, the length of the substituted pathname
+string exceeded {PATH_MAX}.
+.TP 7
+.B ENFILE
+Too many files are currently open in the system.
+.sp
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Open a Directory Stream
+.LP
+The following program fragment demonstrates how the \fIopendir\fP()
+function is used.
+.sp
+.RS
+.nf
+
+\fB#include <sys/types.h>
+#include <dirent.h>
+#include <libgen.h>
+\&...
+ DIR *dir;
+ struct dirent *dp;
+\&...
+ if ((dir = opendir (".")) == NULL) {
+ perror ("Cannot open .");
+ exit (1);
+ }
+.sp
+
+ while ((dp = readdir (dir)) != NULL) {
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The \fIopendir\fP() function should be used in conjunction with \fIreaddir\fP(),
+\fIclosedir\fP(), and \fIrewinddir\fP() to
+examine the contents of the directory (see the EXAMPLES section in
+\fIreaddir\fP()). This method is
+recommended for portability.
+.SH RATIONALE
+.LP
+Based on historical implementations, the rules about file descriptors
+apply to directory streams as well. However, this volume
+of IEEE\ Std\ 1003.1-2001 does not mandate that the directory stream
+be implemented using file descriptors. The description
+of \fIclosedir\fP() clarifies that if a file descriptor is used for
+the directory stream,
+it is mandatory that \fIclosedir\fP() deallocate the file descriptor.
+When a file
+descriptor is used to implement the directory stream, it behaves as
+if the FD_CLOEXEC had been set for the file descriptor.
+.LP
+The directory entries for dot and dot-dot are optional. This volume
+of IEEE\ Std\ 1003.1-2001 does not provide a way to
+test \fIa priori\fP for their existence because an application that
+is portable must be written to look for (and usually ignore)
+those entries. Writing code that presumes that they are the first
+two entries does not always work, as many implementations permit
+them to be other than the first two entries, with a "normal" entry
+preceding them. There is negligible value in providing a way
+to determine what the implementation does because the code to deal
+with dot and dot-dot must be written in any case and because
+such a flag would add to the list of those flags (which has proven
+in itself to be objectionable) and might be abused.
+.LP
+Since the structure and buffer allocation, if any, for directory operations
+are defined by the implementation, this volume of
+IEEE\ Std\ 1003.1-2001 imposes no portability requirements for erroneous
+program constructs, erroneous data, or the use of
+unspecified values such as the use or referencing of a \fIdirp\fP
+value or a \fBdirent\fP structure value after a directory
+stream has been closed or after a \fIfork\fP() or one of the \fIexec\fP
+function calls.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIclosedir\fP(), \fIlstat\fP(), \fIreaddir\fP(), \fIrewinddir\fP(),
+\fIsymlink\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<dirent.h>\fP,
+\fI<limits.h>\fP, \fI<sys/types.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/openlog.3p b/man-pages-posix-2003/man3p/openlog.3p
new file mode 100644
index 0000000..904d7e9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/openlog.3p
@@ -0,0 +1 @@
+.so man3p/syslog.3p
diff --git a/man-pages-posix-2003/man3p/optarg.3p b/man-pages-posix-2003/man3p/optarg.3p
new file mode 100644
index 0000000..ca30d06
--- /dev/null
+++ b/man-pages-posix-2003/man3p/optarg.3p
@@ -0,0 +1 @@
+.so man3p/getopt.3p
diff --git a/man-pages-posix-2003/man3p/opterr.3p b/man-pages-posix-2003/man3p/opterr.3p
new file mode 100644
index 0000000..ca30d06
--- /dev/null
+++ b/man-pages-posix-2003/man3p/opterr.3p
@@ -0,0 +1 @@
+.so man3p/getopt.3p
diff --git a/man-pages-posix-2003/man3p/optind.3p b/man-pages-posix-2003/man3p/optind.3p
new file mode 100644
index 0000000..ca30d06
--- /dev/null
+++ b/man-pages-posix-2003/man3p/optind.3p
@@ -0,0 +1 @@
+.so man3p/getopt.3p
diff --git a/man-pages-posix-2003/man3p/optopt.3p b/man-pages-posix-2003/man3p/optopt.3p
new file mode 100644
index 0000000..ca30d06
--- /dev/null
+++ b/man-pages-posix-2003/man3p/optopt.3p
@@ -0,0 +1 @@
+.so man3p/getopt.3p
diff --git a/man-pages-posix-2003/man3p/pathconf.3p b/man-pages-posix-2003/man3p/pathconf.3p
new file mode 100644
index 0000000..c7b91d7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pathconf.3p
@@ -0,0 +1,287 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FPATHCONF" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fpathconf
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fpathconf, pathconf \- get configurable pathname variables
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+long fpathconf(int\fP \fIfildes\fP\fB, int\fP \fIname\fP\fB);
+.br
+long pathconf(const char *\fP\fIpath\fP\fB, int\fP \fIname\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfpathconf\fP() and \fIpathconf\fP() functions shall determine
+the current value of a configurable limit or option
+(\fIvariable\fP) that is associated with a file or directory.
+.LP
+For \fIpathconf\fP(), the \fIpath\fP argument points to the pathname
+of a file or directory.
+.LP
+For \fIfpathconf\fP(), the \fIfildes\fP argument is an open file descriptor.
+.LP
+The \fIname\fP argument represents the variable to be queried relative
+to that file or directory. Implementations shall support
+all of the variables listed in the following table and may support
+others. The variables in the following table come from \fI<limits.h>\fP
+or \fI<unistd.h>\fP and the
+symbolic constants, defined in \fI<unistd.h>\fP, are the corresponding
+values used
+for \fIname\fP.
+.TS C
+center; l2 l2 l.
+\fBVariable\fP \fBValue of \fIname\fP\fP \fBRequirements\fP
+{FILESIZEBITS} _PC_FILESIZEBITS 3,4
+{LINK_MAX} _PC_LINK_MAX 1
+{MAX_CANON} _PC_MAX_CANON 2
+{MAX_INPUT} _PC_MAX_INPUT 2
+{NAME_MAX} _PC_NAME_MAX 3,4
+{PATH_MAX} _PC_PATH_MAX 4,5
+{PIPE_BUF} _PC_PIPE_BUF 6
+{POSIX_ALLOC_SIZE_MIN} _PC_ALLOC_SIZE_MIN \
+{POSIX_REC_INCR_XFER_SIZE} _PC_REC_INCR_XFER_SIZE \
+{POSIX_REC_MAX_XFER_SIZE} _PC_REC_MAX_XFER_SIZE \
+{POSIX_REC_MIN_XFER_SIZE} _PC_REC_MIN_XFER_SIZE \
+{POSIX_REC_XFER_ALIGN} _PC_REC_XFER_ALIGN \
+{SYMLINK_MAX} _PC_SYMLINK_MAX 4,9
+_POSIX_CHOWN_RESTRICTED _PC_CHOWN_RESTRICTED 7
+_POSIX_NO_TRUNC _PC_NO_TRUNC 3,4
+_POSIX_VDISABLE _PC_VDISABLE 2
+_POSIX_ASYNC_IO _PC_ASYNC_IO 8
+_POSIX_PRIO_IO _PC_PRIO_IO 8
+_POSIX_SYNC_IO _PC_SYNC_IO 8
+.TE
+.SS Requirements
+.IP " 1." 4
+If \fIpath\fP or \fIfildes\fP refers to a directory, the value returned
+shall apply to the directory itself.
+.LP
+.IP " 2." 4
+If \fIpath\fP or \fIfildes\fP does not refer to a terminal file, it
+is unspecified whether an implementation supports an
+association of the variable name with the specified file.
+.LP
+.IP " 3." 4
+If \fIpath\fP or \fIfildes\fP refers to a directory, the value returned
+shall apply to filenames within the directory.
+.LP
+.IP " 4." 4
+If \fIpath\fP or \fIfildes\fP does not refer to a directory, it is
+unspecified whether an implementation supports an
+association of the variable name with the specified file.
+.LP
+.IP " 5." 4
+If \fIpath\fP or \fIfildes\fP refers to a directory, the value returned
+shall be the maximum length of a relative pathname
+when the specified directory is the working directory.
+.LP
+.IP " 6." 4
+If \fIpath\fP refers to a FIFO, or \fIfildes\fP refers to a pipe or
+FIFO, the value returned shall apply to the referenced
+object. If \fIpath\fP or \fIfildes\fP refers to a directory, the value
+returned shall apply to any FIFO that exists or can be
+created within the directory. If \fIpath\fP or \fIfildes\fP refers
+to any other type of file, it is unspecified whether an
+implementation supports an association of the variable name with the
+specified file.
+.LP
+.IP " 7." 4
+If \fIpath\fP or \fIfildes\fP refers to a directory, the value returned
+shall apply to any files, other than directories, that
+exist or can be created within the directory.
+.LP
+.IP " 8." 4
+If \fIpath\fP or \fIfildes\fP refers to a directory, it is unspecified
+whether an implementation supports an association of
+the variable name with the specified file.
+.LP
+.IP " 9." 4
+If \fIpath\fP or \fIfildes\fP refers to a directory, the value returned
+shall be the maximum length of the string that a
+symbolic link in that directory can contain.
+.LP
+.SH RETURN VALUE
+.LP
+If \fIname\fP is an invalid value, both \fIpathconf\fP() and \fIfpathconf\fP()
+shall return -1 and set \fIerrno\fP to
+indicate the error.
+.LP
+If the variable corresponding to \fIname\fP has no limit for the \fIpath\fP
+or file descriptor, both \fIpathconf\fP() and
+\fIfpathconf\fP() shall return -1 without changing \fIerrno\fP. If
+the implementation needs to use \fIpath\fP to determine the
+value of \fIname\fP and the implementation does not support the association
+of \fIname\fP with the file specified by \fIpath\fP,
+or if the process did not have appropriate privileges to query the
+file specified by \fIpath\fP, or \fIpath\fP does not exist,
+\fIpathconf\fP() shall return -1 and set \fIerrno\fP to indicate the
+error.
+.LP
+If the implementation needs to use \fIfildes\fP to determine the value
+of \fIname\fP and the implementation does not support
+the association of \fIname\fP with the file specified by \fIfildes\fP,
+or if \fIfildes\fP is an invalid file descriptor,
+\fIfpathconf\fP() shall return -1 and set \fIerrno\fP to indicate
+the error.
+.LP
+Otherwise, \fIpathconf\fP() or \fIfpathconf\fP() shall return the
+current variable value for the file or directory without
+changing \fIerrno\fP. The value returned shall not be more restrictive
+than the corresponding value available to the application
+when it was compiled with the implementation's \fI<limits.h>\fP or
+\fI<unistd.h>\fP.
+.SH ERRORS
+.LP
+The \fIpathconf\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The value of \fIname\fP is not valid.
+.TP 7
+.B ELOOP
+A loop exists in symbolic links encountered during resolution of the
+\fIpath\fP argument.
+.sp
+.LP
+The \fIpathconf\fP() function may fail if:
+.TP 7
+.B EACCES
+Search permission is denied for a component of the path prefix.
+.TP 7
+.B EINVAL
+The implementation does not support an association of the variable
+\fIname\fP with the specified file.
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the \fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+The length of the \fIpath\fP argument exceeds {PATH_MAX} or a pathname
+component is longer than {NAME_MAX}.
+.TP 7
+.B ENAMETOOLONG
+As a result of encountering a symbolic link in resolution of the \fIpath\fP
+argument, the length of the substituted pathname
+string exceeded {PATH_MAX}.
+.TP 7
+.B ENOENT
+A component of \fIpath\fP does not name an existing file or \fIpath\fP
+is an empty string.
+.TP 7
+.B ENOTDIR
+A component of the path prefix is not a directory.
+.sp
+.LP
+The \fIfpathconf\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The value of \fIname\fP is not valid.
+.sp
+.LP
+The \fIfpathconf\fP() function may fail if:
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not a valid file descriptor.
+.TP 7
+.B EINVAL
+The implementation does not support an association of the variable
+\fIname\fP with the specified file.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIpathconf\fP() function was proposed immediately after the \fIsysconf\fP()
+function when it was realized that some configurable values may differ
+across file system, directory, or device boundaries.
+.LP
+For example, {NAME_MAX} frequently changes between System V and BSD-based
+file systems; System V uses a maximum of 14, BSD 255.
+On an implementation that provides both types of file systems, an
+application would be forced to limit all pathname components to
+14 bytes, as this would be the value specified in \fI<limits.h>\fP
+on such a
+system.
+.LP
+Therefore, various useful values can be queried on any pathname or
+file descriptor, assuming that the appropriate permissions
+are in place.
+.LP
+The value returned for the variable {PATH_MAX} indicates the longest
+relative pathname that could be given if the specified
+directory is the process' current working directory. A process may
+not always be able to generate a name that long and use it if a
+subdirectory in the pathname crosses into a more restrictive file
+system.
+.LP
+The value returned for the variable _POSIX_CHOWN_RESTRICTED also applies
+to directories that do not have file systems mounted on
+them. The value may change when crossing a mount point, so applications
+that need to know should check for each directory. (An even
+easier check is to try the \fIchown\fP() function and look for an
+error in case it
+happens.)
+.LP
+Unlike the values returned by \fIsysconf\fP(), the pathname-oriented
+variables are
+potentially more volatile and are not guaranteed to remain constant
+throughout the process' lifetime. For example, in between two
+calls to \fIpathconf\fP(), the file system in question may have been
+unmounted and remounted with different characteristics.
+.LP
+Also note that most of the errors are optional. If one of the variables
+always has the same value on an implementation, the
+implementation need not look at \fIpath\fP or \fIfildes\fP to return
+that value and is, therefore, not required to detect any of
+the errors except the meaning of [EINVAL] that indicates that the
+value of \fIname\fP is not valid for that variable.
+.LP
+If the value of any of the limits is unspecified (logically infinite),
+they will not be defined in \fI<limits.h>\fP and the \fIpathconf\fP()
+and \fIfpathconf\fP() functions return -1
+without changing \fIerrno\fP. This can be distinguished from the case
+of giving an unrecognized \fIname\fP argument because
+\fIerrno\fP is set to [EINVAL] in this case.
+.LP
+Since -1 is a valid return value for the \fIpathconf\fP() and \fIfpathconf\fP()
+functions, applications should set
+\fIerrno\fP to zero before calling them and check \fIerrno\fP only
+if the return value is -1.
+.LP
+For the case of {SYMLINK_MAX}, since both \fIpathconf\fP() and \fIopen\fP()
+follow
+symbolic links, there is no way that \fIpath\fP or \fIfildes\fP could
+refer to a symbolic link.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIconfstr\fP(), \fIsysconf\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<limits.h>\fP, \fI<unistd.h>\fP, the Shell
+and Utilities volume of IEEE\ Std\ 1003.1-2001
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pause.3p b/man-pages-posix-2003/man3p/pause.3p
new file mode 100644
index 0000000..f1a9381
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pause.3p
@@ -0,0 +1,77 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PAUSE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pause
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pause \- suspend the thread until a signal is received
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+int pause(void);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpause\fP() function shall suspend the calling thread until
+delivery of a signal whose action is either to execute a
+signal-catching function or to terminate the process.
+.LP
+If the action is to terminate the process, \fIpause\fP() shall not
+return.
+.LP
+If the action is to execute a signal-catching function, \fIpause\fP()
+shall return after the signal-catching function
+returns.
+.SH RETURN VALUE
+.LP
+Since \fIpause\fP() suspends thread execution indefinitely unless
+interrupted by a signal, there is no successful completion
+return value. A value of -1 shall be returned and \fIerrno\fP set
+to indicate the error.
+.SH ERRORS
+.LP
+The \fIpause\fP() function shall fail if:
+.TP 7
+.B EINTR
+A signal is caught by the calling process and control is returned
+from the signal-catching function.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Many common uses of \fIpause\fP() have timing windows. The scenario
+involves checking a condition related to a signal and, if
+the signal has not occurred, calling \fIpause\fP(). When the signal
+occurs between the check and the call to \fIpause\fP(), the
+process often blocks indefinitely. The \fIsigprocmask\fP() and \fIsigsuspend\fP()
+functions can be used to avoid this type of problem.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsigsuspend\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pclose.3p b/man-pages-posix-2003/man3p/pclose.3p
new file mode 100644
index 0000000..23c719d
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pclose.3p
@@ -0,0 +1,173 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PCLOSE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pclose
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pclose \- close a pipe stream to or from a process
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+int pclose(FILE *\fP\fIstream\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpclose\fP() function shall close a stream that was opened by
+\fIpopen\fP(), wait
+for the command to terminate, and return the termination status of
+the process that was running the command language interpreter.
+However, if a call caused the termination status to be unavailable
+to \fIpclose\fP(), then \fIpclose\fP() shall return -1 with
+\fIerrno\fP set to [ECHILD] to report this situation. This can happen
+if the application calls one of the following functions:
+.IP " *" 3
+\fIwait\fP()
+.LP
+.IP " *" 3
+\fIwaitpid\fP() with a \fIpid\fP argument less than or equal to 0
+or equal to the
+process ID of the command line interpreter
+.LP
+.IP " *" 3
+Any other function not defined in this volume of IEEE\ Std\ 1003.1-2001
+that could do one of the above
+.LP
+.LP
+In any case, \fIpclose\fP() shall not return before the child process
+created by \fIpopen\fP() has terminated.
+.LP
+If the command language interpreter cannot be executed, the child
+termination status returned by \fIpclose\fP() shall be as if
+the command language interpreter terminated using \fIexit\fP(127)
+or \fI_exit\fP(127).
+.LP
+The \fIpclose\fP() function shall not affect the termination status
+of any child of the calling process other than the one
+created by \fIpopen\fP() for the associated stream.
+.LP
+If the argument \fIstream\fP to \fIpclose\fP() is not a pointer to
+a stream created by \fIpopen\fP(), the result of \fIpclose\fP() is
+undefined.
+.SH RETURN VALUE
+.LP
+Upon successful return, \fIpclose\fP() shall return the termination
+status of the command language interpreter. Otherwise,
+\fIpclose\fP() shall return -1 and set \fIerrno\fP to indicate the
+error.
+.SH ERRORS
+.LP
+The \fIpclose\fP() function shall fail if:
+.TP 7
+.B ECHILD
+The status of the child process could not be obtained, as described
+above.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+There is a requirement that \fIpclose\fP() not return before the child
+process terminates. This is intended to disallow
+implementations that return [EINTR] if a signal is received while
+waiting. If \fIpclose\fP() returned before the child terminated,
+there would be no way for the application to discover which child
+used to be associated with the stream, and it could not do the
+cleanup itself.
+.LP
+If the stream pointed to by \fIstream\fP was not created by \fIpopen\fP(),
+historical
+implementations of \fIpclose\fP() return -1 without setting \fIerrno\fP.
+To avoid requiring \fIpclose\fP() to set \fIerrno\fP
+in this case, IEEE\ Std\ 1003.1-2001 makes the behavior unspecified.
+An application should not use \fIpclose\fP() to close
+any stream that was not created by \fIpopen\fP().
+.LP
+Some historical implementations of \fIpclose\fP() either block or
+ignore the signals SIGINT, SIGQUIT, and SIGHUP while waiting
+for the child process to terminate. Since this behavior is not described
+for the \fIpclose\fP() function in
+IEEE\ Std\ 1003.1-2001, such implementations are not conforming. Also,
+some historical implementations return [EINTR] if a
+signal is received, even though the child process has not terminated.
+Such implementations are also considered non-conforming.
+.LP
+Consider, for example, an application that uses:
+.sp
+.RS
+.nf
+
+\fBpopen("command", "r")
+\fP
+.fi
+.RE
+.LP
+to start \fIcommand\fP, which is part of the same application. The
+parent writes a prompt to its standard output (presumably
+the terminal) and then reads from the \fIpopen\fP()ed stream. The
+child reads the response
+from the user, does some transformation on the response (pathname
+expansion, perhaps) and writes the result to its standard output.
+The parent process reads the result from the pipe, does something
+with it, and prints another prompt. The cycle repeats. Assuming
+that both processes do appropriate buffer flushing, this would be
+expected to work.
+.LP
+To conform to IEEE\ Std\ 1003.1-2001, \fIpclose\fP() must use \fIwaitpid\fP(),
+or some similar function, instead of \fIwait\fP().
+.LP
+The code sample below illustrates how the \fIpclose\fP() function
+might be implemented on a system conforming to
+IEEE\ Std\ 1003.1-2001.
+.sp
+.RS
+.nf
+
+\fBint pclose(FILE *stream)
+{
+ int stat;
+ pid_t pid;
+.sp
+
+ pid = <pid for process created for stream by popen()>
+ (void) fclose(stream);
+ while (waitpid(pid, &stat, 0) == -1) {
+ if (errno != EINTR){
+ stat = -1;
+ break;
+ }
+ }
+ return(stat);
+}
+\fP
+.fi
+.RE
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfork\fP(), \fIpopen\fP(), \fIwaitpid\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/perror.3p b/man-pages-posix-2003/man3p/perror.3p
new file mode 100644
index 0000000..acd02e2
--- /dev/null
+++ b/man-pages-posix-2003/man3p/perror.3p
@@ -0,0 +1,98 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PERROR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" perror
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+perror \- write error messages to standard error
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+void perror(const char *\fP\fIs\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIperror\fP() function shall map the error number accessed through
+the symbol \fIerrno\fP to a language-dependent error
+message, which shall be written to the standard error stream as follows:
+.IP " *" 3
+First (if \fIs\fP is not a null pointer and the character pointed
+to by \fIs\fP is not the null byte), the string pointed to
+by \fIs\fP followed by a colon and a <space>.
+.LP
+.IP " *" 3
+Then an error message string followed by a <newline>.
+.LP
+.LP
+The contents of the error message strings shall be the same as those
+returned by \fIstrerror\fP() with argument \fIerrno\fP.
+.LP
+The
+\fIperror\fP() function shall mark the file associated with the standard
+error stream as having been written (\fIst_ctime\fP,
+\fIst_mtime\fP marked for update) at some time between its successful
+completion and \fIexit\fP(), \fIabort\fP(), or the completion of \fIfflush\fP()
+or \fIfclose\fP() on \fIstderr\fP.
+.LP
+The \fIperror\fP() function shall not change the orientation of the
+standard error stream.
+.SH RETURN VALUE
+.LP
+The \fIperror\fP() function shall not return a value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Printing an Error Message for a Function
+.LP
+The following example replaces \fIbufptr\fP with a buffer that is
+the necessary size. If an error occurs, the \fIperror\fP()
+function prints a message and the program exits.
+.sp
+.RS
+.nf
+
+\fB#include <stdio.h>
+#include <stdlib.h>
+\&...
+char *bufptr;
+size_t szbuf;
+\&...
+if ((bufptr = malloc(szbuf)) == NULL) {
+ perror("malloc"); exit(2);
+}
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIstrerror\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pipe.3p b/man-pages-posix-2003/man3p/pipe.3p
new file mode 100644
index 0000000..190a5bc
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pipe.3p
@@ -0,0 +1,90 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PIPE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pipe
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pipe \- create an interprocess channel
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+int pipe(int\fP \fIfildes\fP\fB[2]);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpipe\fP() function shall create a pipe and place two file descriptors,
+one each into the arguments \fIfildes\fP[0] and
+\fIfildes\fP[1], that refer to the open file descriptions for the
+read and write ends of the pipe. Their integer values shall be
+the two lowest available at the time of the \fIpipe\fP() call. The
+O_NONBLOCK and FD_CLOEXEC flags shall be clear on both file
+descriptors. (The \fIfcntl\fP() function can be used to set both these
+flags.)
+.LP
+Data can be written to the file descriptor \fIfildes\fP[1] and read
+from the file descriptor \fIfildes\fP[0]. A read on the
+file descriptor \fIfildes\fP[0] shall access data written to the file
+descriptor \fIfildes\fP[1] on a first-in-first-out basis.
+It is unspecified whether \fIfildes\fP[0] is also open for writing
+and whether \fIfildes\fP[1] is also open for reading.
+.LP
+A process has the pipe open for reading (correspondingly writing)
+if it has a file descriptor open that refers to the read end,
+\fIfildes\fP[0] (write end, \fIfildes\fP[1]).
+.LP
+Upon successful completion, \fIpipe\fP() shall mark for update the
+\fIst_atime\fP, \fIst_ctime\fP, and \fIst_mtime\fP fields
+of the pipe.
+.SH RETURN VALUE
+.LP
+Upon successful completion, 0 shall be returned; otherwise, -1 shall
+be returned and \fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fIpipe\fP() function shall fail if:
+.TP 7
+.B EMFILE
+More than {OPEN_MAX} minus two file descriptors are already in use
+by this process.
+.TP 7
+.B ENFILE
+The number of simultaneously open files in the system would exceed
+a system-imposed limit.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The wording carefully avoids using the verb "to open" in order to
+avoid any implication of use of \fIopen\fP(); see also \fIwrite\fP()
+\&.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfcntl\fP(), \fIread\fP(), \fIwrite\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<fcntl.h>\fP,
+\fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/poll.3p b/man-pages-posix-2003/man3p/poll.3p
new file mode 100644
index 0000000..3965002
--- /dev/null
+++ b/man-pages-posix-2003/man3p/poll.3p
@@ -0,0 +1,291 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POLL" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" poll
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+poll \- input/output multiplexing
+.SH SYNOPSIS
+.LP
+\fB#include <poll.h>
+.br
+.sp
+int poll(struct pollfd\fP \fIfds\fP\fB[], nfds_t\fP \fInfds\fP\fB,
+int\fP \fItimeout\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpoll\fP() function provides applications with a mechanism for
+multiplexing input/output over a set of file descriptors.
+For each member of the array pointed to by \fIfds\fP, \fIpoll\fP()
+shall examine the given file descriptor for the event(s)
+specified in \fIevents\fP. The number of \fBpollfd\fP structures in
+the \fIfds\fP array is specified by \fInfds\fP. The
+\fIpoll\fP() function shall identify those file descriptors on which
+an application can read or write data, or on which certain
+events have occurred.
+.LP
+The \fIfds\fP argument specifies the file descriptors to be examined
+and the events of interest for each file descriptor. It is
+a pointer to an array with one member for each open file descriptor
+of interest. The array's members are \fBpollfd\fP structures
+within which \fIfd\fP specifies an open file descriptor and \fIevents\fP
+and \fIrevents\fP are bitmasks constructed by OR'ing a
+combination of the following event flags:
+.TP 7
+POLLIN
+Data other than high-priority data may be read without blocking.
+.LP
+For STREAMS, this flag is set in \fIrevents\fP even if the message
+is of zero length. This flag shall be equivalent to POLLRDNORM
+| POLLRDBAND.
+.TP 7
+POLLRDNORM
+Normal data may be read without blocking.
+.LP
+For STREAMS, data on priority band 0 may be read without blocking.
+This flag is set in \fIrevents\fP even if the message is of
+zero length.
+.TP 7
+POLLRDBAND
+Priority data may be read without blocking.
+.LP
+For STREAMS, data on priority bands greater than 0 may be read without
+blocking. This flag is set in \fIrevents\fP even if the
+message is of zero length.
+.TP 7
+POLLPRI
+High-priority data may be read without blocking.
+.LP
+For STREAMS, this flag is set in \fIrevents\fP even if the message
+is of zero length.
+.TP 7
+POLLOUT
+Normal data may be written without blocking.
+.LP
+For STREAMS, data on priority band 0 may be written without blocking.
+.TP 7
+POLLWRNORM
+Equivalent to POLLOUT.
+.TP 7
+POLLWRBAND
+Priority data may be written.
+.LP
+For STREAMS, data on priority bands greater than 0 may be written
+without blocking. If any priority band has been written to on
+this STREAM, this event only examines bands that have been written
+to at least once.
+.TP 7
+POLLERR
+An error has occurred on the device or stream. This flag is only valid
+in the \fIrevents\fP bitmask; it shall be ignored in
+the \fIevents\fP member.
+.TP 7
+POLLHUP
+The device has been disconnected. This event and POLLOUT are mutually-exclusive;
+a stream can never be writable if a hangup has
+occurred. However, this event and POLLIN, POLLRDNORM, POLLRDBAND,
+or POLLPRI are not mutually-exclusive. This flag is only valid in
+the \fIrevents\fP bitmask; it shall be ignored in the \fIevents\fP
+member.
+.TP 7
+POLLNVAL
+The specified \fIfd\fP value is invalid. This flag is only valid in
+the \fIrevents\fP member; it shall ignored in the
+\fIevents\fP member.
+.sp
+.LP
+The significance and semantics of normal, priority, and high-priority
+data are file and device-specific.
+.LP
+If the value of \fIfd\fP is less than 0, \fIevents\fP shall be ignored,
+and \fIrevents\fP shall be set to 0 in that entry on
+return from \fIpoll\fP().
+.LP
+In each \fBpollfd\fP structure, \fIpoll\fP() shall clear the \fIrevents\fP
+member, except that where the application
+requested a report on a condition by setting one of the bits of \fIevents\fP
+listed above, \fIpoll\fP() shall set the
+corresponding bit in \fIrevents\fP if the requested condition is true.
+In addition, \fIpoll\fP() shall set the POLLHUP, POLLERR,
+and POLLNVAL flag in \fIrevents\fP if the condition is true, even
+if the application did not set the corresponding bit in
+\fIevents\fP.
+.LP
+If none of the defined events have occurred on any selected file descriptor,
+\fIpoll\fP() shall wait at least \fItimeout\fP
+milliseconds for an event to occur on any of the selected file descriptors.
+If the value of \fItimeout\fP is 0, \fIpoll\fP()
+shall return immediately. If the value of \fItimeout\fP is -1, \fIpoll\fP()
+shall block until a requested event occurs or until
+the call is interrupted.
+.LP
+Implementations may place limitations on the granularity of timeout
+intervals. If the requested timeout interval requires a
+finer granularity than the implementation supports, the actual timeout
+interval shall be rounded up to the next supported
+value.
+.LP
+The \fIpoll\fP() function shall not be affected by the O_NONBLOCK
+flag.
+.LP
+The \fIpoll\fP() function shall support regular files, terminal and
+pseudo-terminal devices, FIFOs, pipes, sockets and
+\ STREAMS-based files. The behavior of \fIpoll\fP() on
+elements of \fIfds\fP that refer to other types of file is unspecified.
+.LP
+Regular files shall always poll TRUE for reading and writing.
+.LP
+A file descriptor for a socket that is listening for connections shall
+indicate that it is ready for reading, once connections
+are available. A file descriptor for a socket that is connecting asynchronously
+shall indicate that it is ready for writing, once a
+connection has been established.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIpoll\fP() shall return a non-negative
+value. A positive value indicates the total number of file
+descriptors that have been selected (that is, file descriptors for
+which the \fIrevents\fP member is non-zero). A value of 0
+indicates that the call timed out and no file descriptors have been
+selected. Upon failure, \fIpoll\fP() shall return -1 and set
+\fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fIpoll\fP() function shall fail if:
+.TP 7
+.B EAGAIN
+The allocation of internal data structures failed but a subsequent
+request may succeed.
+.TP 7
+.B EINTR
+A signal was caught during \fIpoll\fP().
+.TP 7
+.B EINVAL
+The \fInfds\fP argument is greater than {OPEN_MAX}, or one of
+the \fIfd\fP members refers to a STREAM or multiplexer
+that is linked (directly or indirectly) downstream from a multiplexer.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Checking for Events on a Stream
+.LP
+The following example opens a pair of STREAMS devices and then waits
+for either one to become writable. This example proceeds as
+follows:
+.IP " 1." 4
+Sets the \fItimeout\fP parameter to 500 milliseconds.
+.LP
+.IP " 2." 4
+Opens the STREAMS devices \fB/dev/dev0\fP and \fB/dev/dev1\fP, and
+then polls them, specifying POLLOUT and POLLWRBAND as the
+events of interest.
+.LP
+The STREAMS device names \fB/dev/dev0\fP and \fB/dev/dev1\fP are only
+examples of how STREAMS devices can be named; STREAMS
+naming conventions may vary among systems conforming to the IEEE\ Std\ 1003.1-2001.
+.LP
+.IP " 3." 4
+Uses the \fIret\fP variable to determine whether an event has occurred
+on either of the two STREAMS. The \fIpoll\fP() function
+is given 500 milliseconds to wait for an event to occur (if it has
+not occurred prior to the \fIpoll\fP() call).
+.LP
+.IP " 4." 4
+Checks the returned value of \fIret\fP. If a positive value is returned,
+one of the following can be done:
+.RS
+.IP " a." 4
+Priority data can be written to the open STREAM on priority bands
+greater than 0, because the POLLWRBAND event occurred on the
+open STREAM ( \fIfds\fP[0] or \fIfds\fP[1]).
+.LP
+.IP " b." 4
+Data can be written to the open STREAM on priority-band 0, because
+the POLLOUT event occurred on the open STREAM ( \fIfds\fP[0]
+or \fIfds\fP[1]).
+.LP
+.RE
+.LP
+.IP " 5." 4
+If the returned value is not a positive value, permission to write
+data to the open STREAM (on any priority band) is denied.
+.LP
+.IP " 6." 4
+If the POLLHUP event occurs on the open STREAM ( \fIfds\fP[0] or \fIfds\fP[1]),
+the device on the open STREAM has
+disconnected.
+.LP
+.sp
+.RS
+.nf
+
+\fB#include <stropts.h>
+#include <poll.h>
+\&...
+struct pollfd fds[2];
+int timeout_msecs = 500;
+int ret;
+ int i;
+.sp
+
+/* Open STREAMS device. */
+fds[0].fd = open("/dev/dev0", ...);
+fds[1].fd = open("/dev/dev1", ...);
+ fds[0].events = POLLOUT | POLLWRBAND;
+ fds[1].events = POLLOUT | POLLWRBAND;
+.sp
+
+ret = poll(fds, 2, timeout_msecs);
+.sp
+
+if (ret > 0) {
+ /* An event on one of the fds has occurred. */
+ for (i=0; i<2; i++) {
+ if (fds[i].revents & POLLWRBAND) {
+ /* Priority data may be written on device number i. */
+\&...
+ }
+ if (fds[i].revents & POLLOUT) {
+ /* Data may be written on device number i. */
+\&...
+ }
+ if (fds[i].revents & POLLHUP) {
+ /* A hangup has occurred on device number i. */
+\&...
+ }
+ }
+}
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fISTREAMS\fP, \fIgetmsg\fP(), \fIputmsg\fP(), \fIread\fP(), \fIselect\fP(),
+\fIwrite\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<poll.h>\fP, \fI<stropts.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/popen.3p b/man-pages-posix-2003/man3p/popen.3p
new file mode 100644
index 0000000..2651f05
--- /dev/null
+++ b/man-pages-posix-2003/man3p/popen.3p
@@ -0,0 +1,174 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POPEN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" popen
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+popen \- initiate pipe streams to or from a process
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+FILE *popen(const char *\fP\fIcommand\fP\fB, const char *\fP\fImode\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpopen\fP() function shall execute the command specified by
+the string \fIcommand\fP. It shall create a pipe between the
+calling program and the executed command, and shall return a pointer
+to a stream that can be used to either read from or write to
+the pipe.
+.LP
+The environment of the executed command shall be as if a child process
+were created within the \fIpopen\fP() call using the \fIfork\fP()
+function, and the child invoked the \fIsh\fP
+utility using the call:
+.sp
+.RS
+.nf
+
+\fBexecl(\fP\fIshell path\fP\fB, "sh", "-c",\fP \fIcommand\fP\fB, (char *)0);
+\fP
+.fi
+.RE
+.LP
+where \fIshell path\fP is an unspecified pathname for the \fIsh\fP
+utility.
+.LP
+The \fIpopen\fP() function shall ensure that any streams from previous
+\fIpopen\fP() calls that remain open in the parent
+process are closed in the new child process.
+.LP
+The \fImode\fP argument to \fIpopen\fP() is a string that specifies
+I/O mode:
+.IP " 1." 4
+If \fImode\fP is \fIr\fP, when the child process is started, its file
+descriptor STDOUT_FILENO shall be the writable end of
+the pipe, and the file descriptor \fIfileno\fP(\fIstream\fP) in the
+calling process, where \fIstream\fP is the stream pointer
+returned by \fIpopen\fP(), shall be the readable end of the pipe.
+.LP
+.IP " 2." 4
+If \fImode\fP is \fIw\fP, when the child process is started its file
+descriptor STDIN_FILENO shall be the readable end of the
+pipe, and the file descriptor \fIfileno\fP(\fIstream\fP) in the calling
+process, where \fIstream\fP is the stream pointer
+returned by \fIpopen\fP(), shall be the writable end of the pipe.
+.LP
+.IP " 3." 4
+If \fImode\fP is any other value, the result is undefined.
+.LP
+.LP
+After \fIpopen\fP(), both the parent and the child process shall be
+capable of executing independently before either
+terminates.
+.LP
+Pipe streams are byte-oriented.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIpopen\fP() shall return a pointer to
+an open stream that can be used to read or write to the
+pipe. Otherwise, it shall return a null pointer and may set \fIerrno\fP
+to indicate the error.
+.SH ERRORS
+.LP
+The \fIpopen\fP() function may fail if:
+.TP 7
+.B EMFILE
+{FOPEN_MAX} or {STREAM_MAX} streams are currently open in the calling
+process.
+.TP 7
+.B EINVAL
+The \fImode\fP argument is invalid.
+.sp
+.LP
+The \fIpopen\fP() function may also set \fIerrno\fP values as described
+by \fIfork\fP() or \fIpipe\fP().
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Since open files are shared, a mode \fIr\fP command can be used as
+an input filter and a mode \fIw\fP command as an output
+filter.
+.LP
+Buffered reading before opening an input filter may leave the standard
+input of that filter mispositioned. Similar problems with
+an output filter may be prevented by careful buffer flushing; for
+example, with \fIfflush\fP().
+.LP
+A stream opened by \fIpopen\fP() should be closed by \fIpclose\fP().
+.LP
+The behavior of \fIpopen\fP() is specified for values of \fImode\fP
+of \fIr\fP and \fIw\fP. Other modes such as \fIrb\fP
+and \fIwb\fP might be supported by specific implementations, but these
+would not be portable features. Note that historical
+implementations of \fIpopen\fP() only check to see if the first character
+of \fImode\fP is \fIr\fP. Thus, a \fImode\fP of
+\fIrobert the robot\fP would be treated as \fImode\fP \fIr\fP, and
+a \fImode\fP of \fIanything else\fP would be treated as
+\fImode\fP \fIw\fP.
+.LP
+If the application calls \fIwaitpid\fP() or \fIwaitid\fP() with a
+\fIpid\fP argument greater than 0, and it still has a stream that
+was called
+with \fIpopen\fP() open, it must ensure that \fIpid\fP does not refer
+to the process started by \fIpopen\fP().
+.LP
+To determine whether or not the environment specified in the Shell
+and Utilities volume of IEEE\ Std\ 1003.1-2001 is
+present, use the function call:
+.sp
+.RS
+.nf
+
+\fBsysconf(_SC_2_VERSION)
+\fP
+.fi
+.RE
+.LP
+(See \fIsysconf\fP()).
+.SH RATIONALE
+.LP
+The \fIpopen\fP() function should not be used by programs that have
+set user (or group) ID privileges. The \fIfork\fP() and \fIexec\fP
+family of functions (except \fIexeclp\fP() and \fIexecvp\fP()), should
+be used
+instead. This prevents any unforeseen manipulation of the environment
+of the user that could cause execution of commands not
+anticipated by the calling program.
+.LP
+If the original and \fIpopen\fP()ed processes both intend to read
+or write or read and write a common file, and either will be
+using FILE-type C functions ( \fIfread\fP(), \fIfwrite\fP(), and so
+on), the rules for sharing file handles must be observed (see \fIInteraction
+of File Descriptors and Standard I/O Streams\fP ).
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpclose\fP(), \fIpipe\fP(), \fIsysconf\fP(),
+\fIsystem\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<stdio.h>\fP, the Shell and Utilities volume of IEEE\ Std\ 1003.1-2001,
+\fIsh\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/posix_fadvise.3p b/man-pages-posix-2003/man3p/posix_fadvise.3p
new file mode 100644
index 0000000..acdea74
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_fadvise.3p
@@ -0,0 +1,119 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POSIX_FADVISE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" posix_fadvise
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+posix_fadvise \- file advisory information (\fBADVANCED REALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <fcntl.h>
+.br
+.sp
+int posix_fadvise(int\fP \fIfd\fP\fB, off_t\fP \fIoffset\fP\fB, size_t\fP
+\fIlen\fP\fB, int\fP \fIadvice\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIposix_fadvise\fP() function shall advise the implementation
+on the expected behavior of the application with respect to
+the data in the file associated with the open file descriptor, \fIfd\fP,
+starting at \fIoffset\fP and continuing for \fIlen\fP
+bytes. The specified range need not currently exist in the file. If
+\fIlen\fP is zero, all data following \fIoffset\fP is
+specified. The implementation may use this information to optimize
+handling of the specified data. The \fIposix_fadvise\fP()
+function shall have no effect on the semantics of other operations
+on the specified data, although it may affect the performance of
+other operations.
+.LP
+The advice to be applied to the data is specified by the \fIadvice\fP
+parameter and may be one of the following values:
+.TP 7
+POSIX_FADV_NORMAL
+.sp
+Specifies that the application has no advice to give on its behavior
+with respect to the specified data. It is the default
+characteristic if no advice is given for an open file.
+.TP 7
+POSIX_FADV_SEQUENTIAL
+.sp
+Specifies that the application expects to access the specified data
+sequentially from lower offsets to higher offsets.
+.TP 7
+POSIX_FADV_RANDOM
+.sp
+Specifies that the application expects to access the specified data
+in a random order.
+.TP 7
+POSIX_FADV_WILLNEED
+.sp
+Specifies that the application expects to access the specified data
+in the near future.
+.TP 7
+POSIX_FADV_DONTNEED
+.sp
+Specifies that the application expects that it will not access the
+specified data in the near future.
+.TP 7
+POSIX_FADV_NOREUSE
+.sp
+Specifies that the application expects to access the specified data
+once and then not reuse it thereafter.
+.sp
+.LP
+These values are defined in \fI<fcntl.h>\fP.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIposix_fadvise\fP() shall return zero;
+otherwise, an error number shall be returned to indicate
+the error.
+.SH ERRORS
+.LP
+The \fIposix_fadvise\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fIfd\fP argument is not a valid file descriptor.
+.TP 7
+.B EINVAL
+The value of \fIadvice\fP is invalid.
+.TP 7
+.B ESPIPE
+The \fIfd\fP argument is associated with a pipe or FIFO.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIposix_fadvise\fP() function is part of the Advisory Information
+option and need not be provided on all
+implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIposix_madvise\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<fcntl.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/posix_fallocate.3p b/man-pages-posix-2003/man3p/posix_fallocate.3p
new file mode 100644
index 0000000..7882426
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_fallocate.3p
@@ -0,0 +1,114 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POSIX_FALLOCATE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" posix_fallocate
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+posix_fallocate \- file space control (\fBADVANCED REALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <fcntl.h>
+.br
+.sp
+int posix_fallocate(int\fP \fIfd\fP\fB, off_t\fP \fIoffset\fP\fB,
+size_t\fP \fIlen\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIposix_fallocate\fP() function shall ensure that any required
+storage for regular file data starting at \fIoffset\fP and
+continuing for \fIlen\fP bytes is allocated on the file system storage
+media. If \fIposix_fallocate\fP() returns successfully,
+subsequent writes to the specified file data shall not fail due to
+the lack of free space on the file system storage media.
+.LP
+If the \fIoffset\fP+ \fIlen\fP is beyond the current file size, then
+\fIposix_fallocate\fP() shall adjust the file size to
+\fIoffset\fP+ \fIlen\fP. Otherwise, the file size shall not be changed.
+.LP
+It is implementation-defined whether a previous \fIposix_fadvise\fP()
+call
+influences allocation strategy.
+.LP
+Space allocated via \fIposix_fallocate\fP() shall be freed by a successful
+call to \fIcreat\fP() or \fIopen\fP() that truncates the size of the
+file. Space allocated via \fIposix_fallocate\fP() may be freed by
+a successful call to \fIftruncate\fP() that reduces the file size
+to a size smaller than \fIoffset\fP+
+\fIlen\fP.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIposix_fallocate\fP() shall return zero;
+otherwise, an error number shall be returned to indicate
+the error.
+.SH ERRORS
+.LP
+The \fIposix_fallocate\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fIfd\fP argument is not a valid file descriptor.
+.TP 7
+.B EBADF
+The \fIfd\fP argument references a file that was opened without write
+permission.
+.TP 7
+.B EFBIG
+The value of \fIoffset\fP+ \fIlen\fP is greater than the maximum file
+size.
+.TP 7
+.B EINTR
+A signal was caught during execution.
+.TP 7
+.B EINVAL
+The \fIlen\fP argument was zero or the \fIoffset\fP argument was less
+than zero.
+.TP 7
+.B EIO
+An I/O error occurred while reading from or writing to a file system.
+.TP 7
+.B ENODEV
+The \fIfd\fP argument does not refer to a regular file.
+.TP 7
+.B ENOSPC
+There is insufficient free space remaining on the file system storage
+media.
+.TP 7
+.B ESPIPE
+The \fIfd\fP argument is associated with a pipe or FIFO.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIposix_fallocate\fP() function is part of the Advisory Information
+option and need not be provided on all
+implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcreat\fP(), \fIftruncate\fP(), \fIopen\fP(), \fIunlink\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<fcntl.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/posix_madvise.3p b/man-pages-posix-2003/man3p/posix_madvise.3p
new file mode 100644
index 0000000..a7b5fb6
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_madvise.3p
@@ -0,0 +1,130 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POSIX_MADVISE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" posix_madvise
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+posix_madvise \- memory advisory information and alignment control
+(\fBADVANCED REALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <sys/mman.h>
+.br
+.sp
+int posix_madvise(void *\fP\fIaddr\fP\fB, size_t\fP \fIlen\fP\fB,
+int\fP \fIadvice\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIposix_madvise\fP() function need only be supported if either
+the Memory Mapped Files or the Shared Memory Objects options
+are supported.
+.LP
+The \fIposix_madvise\fP() function shall advise the implementation
+on the expected behavior of the application with respect to
+the data in the memory starting at address \fIaddr\fP, and continuing
+for \fIlen\fP bytes. The implementation may use this
+information to optimize handling of the specified data. The \fIposix_madvise\fP()
+function shall have no effect on the semantics
+of access to memory in the specified range, although it may affect
+the performance of access.
+.LP
+The implementation may require that \fIaddr\fP be a multiple of the
+page size, which is the value returned by \fIsysconf\fP() when the
+name value _SC_PAGESIZE is used.
+.LP
+The advice to be applied to the memory range is specified by the \fIadvice\fP
+parameter and may be one of the following
+values:
+.TP 7
+POSIX_MADV_NORMAL
+.sp
+Specifies that the application has no advice to give on its behavior
+with respect to the specified range. It is the default
+characteristic if no advice is given for a range of memory.
+.TP 7
+POSIX_MADV_SEQUENTIAL
+.sp
+Specifies that the application expects to access the specified range
+sequentially from lower addresses to higher addresses.
+.TP 7
+POSIX_MADV_RANDOM
+.sp
+Specifies that the application expects to access the specified range
+in a random order.
+.TP 7
+POSIX_MADV_WILLNEED
+.sp
+Specifies that the application expects to access the specified range
+in the near future.
+.TP 7
+POSIX_MADV_DONTNEED
+.sp
+Specifies that the application expects that it will not access the
+specified range in the near future.
+.sp
+.LP
+These values are defined in the \fI<sys/mman.h>\fP header.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIposix_madvise\fP() shall return zero;
+otherwise, an error number shall be returned to indicate
+the error.
+.SH ERRORS
+.LP
+The \fIposix_madvise\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The value of \fIadvice\fP is invalid.
+.TP 7
+.B ENOMEM
+Addresses in the range starting at \fIaddr\fP and continuing for \fIlen\fP
+bytes are partly or completely outside the range
+allowed for the address space of the calling process.
+.sp
+.LP
+The \fIposix_madvise\fP() function may fail if:
+.TP 7
+.B EINVAL
+The value of \fIaddr\fP is not a multiple of the value returned by
+\fIsysconf\fP()
+when the name value _SC_PAGESIZE is used.
+.TP 7
+.B EINVAL
+The value of \fIlen\fP is zero.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIposix_madvise\fP() function is part of the Advisory Information
+option and need not be provided on all
+implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fImmap\fP(), \fIposix_fadvise\fP(), \fIsysconf\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<sys/mman.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/posix_mem_offset.3p b/man-pages-posix-2003/man3p/posix_mem_offset.3p
new file mode 100644
index 0000000..8592521
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_mem_offset.3p
@@ -0,0 +1,102 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POSIX_MEM_OFFSET" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" posix_mem_offset
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+posix_mem_offset \- find offset and length of a mapped typed memory
+block (\fBADVANCED REALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <sys/mman.h>
+.br
+.sp
+int posix_mem_offset(const void *restrict\fP \fIaddr\fP\fB, size_t\fP
+\fIlen\fP\fB,
+.br
+\ \ \ \ \ \ off_t *restrict\fP \fIoff\fP\fB, size_t *restrict\fP
+\fIcontig_len\fP\fB,
+.br
+\ \ \ \ \ \ int *restrict\fP \fIfildes\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIposix_mem_offset\fP() function shall return in the variable
+pointed to by \fIoff\fP a value that identifies the offset
+(or location), within a memory object, of the memory block currently
+mapped at \fIaddr\fP. The function shall return in the
+variable pointed to by \fIfildes\fP, the descriptor used (via \fImmap\fP())
+to establish the
+mapping which contains \fIaddr\fP. If that descriptor was closed since
+the mapping was established, the returned value of
+\fIfildes\fP shall be -1. The \fIlen\fP argument specifies the length
+of the block of the memory object the user wishes the
+offset for; upon return, the value pointed to by \fIcontig_len\fP
+shall equal either \fIlen\fP, or the length of the largest
+contiguous block of the memory object that is currently mapped to
+the calling process starting at \fIaddr\fP, whichever is
+smaller.
+.LP
+If the memory object mapped at \fIaddr\fP is a typed memory object,
+then if the \fIoff\fP and \fIcontig_len\fP values
+obtained by calling \fIposix_mem_offset\fP() are used in a call to
+\fImmap\fP() with a file
+descriptor that refers to the same memory pool as \fIfildes\fP (either
+through the same port or through a different port), and
+that was opened with neither the POSIX_TYPED_MEM_ALLOCATE nor the
+POSIX_TYPED_MEM_ALLOCATE_CONTIG flag, the typed memory area that
+is mapped shall be exactly the same area that was mapped at \fIaddr\fP
+in the address space of the process that called
+\fIposix_mem_offset\fP().
+.LP
+If the memory object specified by \fIfildes\fP is not a typed memory
+object, then the behavior of this function is
+implementation-defined.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIposix_mem_offset\fP() function
+shall return zero; otherwise, the corresponding error status
+value shall be returned.
+.SH ERRORS
+.LP
+The \fIposix_mem_offset\fP() function shall fail if:
+.TP 7
+.B EACCES
+The process has not mapped a memory object supported by this function
+at the given address \fIaddr\fP.
+.sp
+.LP
+This function shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fImmap\fP(), \fIposix_typed_mem_open\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<sys/mman.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/posix_memalign.3p b/man-pages-posix-2003/man3p/posix_memalign.3p
new file mode 100644
index 0000000..07325a0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_memalign.3p
@@ -0,0 +1,80 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POSIX_MEMALIGN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" posix_memalign
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+posix_memalign \- aligned memory allocation (\fBADVANCED REALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+int posix_memalign(void **\fP\fImemptr\fP\fB, size_t\fP \fIalignment\fP\fB,
+size_t\fP \fIsize\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIposix_memalign\fP() function shall allocate \fIsize\fP bytes
+aligned on a boundary specified by \fIalignment\fP, and
+shall return a pointer to the allocated memory in \fImemptr\fP. The
+value of \fIalignment\fP shall be a multiple of
+\fIsizeof\fP( \fBvoid *\fP), that is also a power of two. Upon successful
+completion, the value pointed to by \fImemptr\fP shall
+be a multiple of \fIalignment\fP.
+.LP
+The
+\fIfree\fP() function shall deallocate memory that has previously
+been allocated by
+\fIposix_memalign\fP().
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIposix_memalign\fP() shall return zero;
+otherwise, an error number shall be returned to indicate
+the error.
+.SH ERRORS
+.LP
+The \fIposix_memalign\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The value of the alignment parameter is not a power of two multiple
+of \fIsizeof\fP( \fBvoid *\fP).
+.TP 7
+.B ENOMEM
+There is insufficient memory available with the requested alignment.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIposix_memalign\fP() function is part of the Advisory Information
+option and need not be provided on all
+implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfree\fP(), \fImalloc\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/posix_openpt.3p b/man-pages-posix-2003/man3p/posix_openpt.3p
new file mode 100644
index 0000000..c636f09
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_openpt.3p
@@ -0,0 +1,156 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POSIX_OPENPT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" posix_openpt
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+posix_openpt \- open a pseudo-terminal device
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+#include <fcntl.h>
+.br
+.sp
+int posix_openpt(int\fP \fIoflag\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIposix_openpt\fP() function shall establish a connection between
+a master device for a pseudo-terminal and a file
+descriptor. The file descriptor is used by other I/O functions that
+refer to that pseudo-terminal.
+.LP
+The file status flags and file access modes of the open file description
+shall be set according to the value of
+\fIoflag\fP.
+.LP
+Values for \fIoflag\fP are constructed by a bitwise-inclusive OR of
+flags from the following list, defined in \fI<fcntl.h>\fP:
+.TP 7
+O_RDWR
+Open for reading and writing.
+.TP 7
+O_NOCTTY
+If set \fIposix_openpt\fP() shall not cause the terminal device to
+become the controlling terminal for the process.
+.sp
+.LP
+The behavior of other values for the \fIoflag\fP argument is unspecified.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIposix_openpt\fP() function shall
+open a master pseudo-terminal device and return a
+non-negative integer representing the lowest numbered unused file
+descriptor. Otherwise, -1 shall be returned and \fIerrno\fP set
+to indicate the error.
+.SH ERRORS
+.LP
+The \fIposix_openpt\fP() function shall fail if:
+.TP 7
+.B EMFILE
+{OPEN_MAX} file descriptors are currently open in the calling process.
+.TP 7
+.B ENFILE
+The maximum allowable number of files is currently open in the system.
+.sp
+.LP
+The \fIposix_openpt\fP() function may fail if:
+.TP 7
+.B EINVAL
+The value of \fIoflag\fP is not valid.
+.TP 7
+.B EAGAIN
+Out of pseudo-terminal resources.
+.TP 7
+.B ENOSR
+Out of STREAMS resources.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Opening a Pseudo-Terminal and Returning the Name of the Slave
+Device and a File Descriptor
+.sp
+.RS
+.nf
+
+\fB#include <fcntl.h>
+#include <stdio.h>
+.sp
+
+int masterfd, slavefd;
+char *slavedevice;
+.sp
+
+masterfd = posix_openpt(O_RDWR|O_NOCTTY);
+.sp
+
+if (masterfd == -1
+ || grantpt (masterfd) == -1
+ || unlockpt (masterfd) == -1
+ || (slavedevice = ptsname (masterfd)) == NULL)
+ return -1;
+.sp
+
+printf("slave device is: %s\\n", slavedevice);
+.sp
+
+slavefd = open(slave, O_RDWR|O_NOCTTY);
+if (slavefd < 0)
+ return -1;
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+This function is a method for portably obtaining a file descriptor
+of a master terminal device for a pseudo-terminal. The \fIgrantpt\fP()
+and \fIptsname\fP() functions can be
+used to manipulate mode and ownership permissions, and to obtain the
+name of the slave device, respectively.
+.SH RATIONALE
+.LP
+The standard developers considered the matter of adding a special
+device for cloning master pseudo-terminals: the
+\fB/dev/ptmx\fP device. However, consensus could not be reached, and
+it was felt that adding a new function would permit other
+implementations. The \fIposix_openpt\fP() function is designed to
+complement the \fIgrantpt\fP(), \fIptsname\fP(), and \fIunlockpt\fP()
+functions.
+.LP
+On implementations supporting the \fB/dev/ptmx\fP clone device, opening
+the master device of a pseudo-terminal is simply:
+.sp
+.RS
+.nf
+
+\fBmfdp = open("/dev/ptmx", oflag );
+if (mfdp < 0)
+ return -1;
+\fP
+.fi
+.RE
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgrantpt\fP(), \fIopen\fP(), \fIptsname\fP(), \fIunlockpt\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<fcntl.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/posix_spawn.3p b/man-pages-posix-2003/man3p/posix_spawn.3p
new file mode 100644
index 0000000..8b1a86d
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_spawn.3p
@@ -0,0 +1,636 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POSIX_SPAWN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" posix_spawn
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+posix_spawn, posix_spawnp \- spawn a process (\fBADVANCED REALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <spawn.h>
+.br
+.sp
+int posix_spawn(pid_t *restrict\fP \fIpid\fP\fB, const char *restrict\fP
+\fIpath\fP\fB,
+.br
+\ \ \ \ \ \ const posix_spawn_file_actions_t *\fP\fIfile_actions\fP\fB,
+.br
+\ \ \ \ \ \ const posix_spawnattr_t *restrict\fP \fIattrp\fP\fB,
+.br
+\ \ \ \ \ \ char *const\fP \fIargv\fP\fB[restrict], char *const\fP
+\fIenvp\fP\fB[restrict]);
+.br
+int posix_spawnp(pid_t *restrict\fP \fIpid\fP\fB, const char *restrict\fP
+\fIfile\fP\fB,
+.br
+\ \ \ \ \ \ const posix_spawn_file_actions_t *\fP\fIfile_actions\fP\fB,
+.br
+\ \ \ \ \ \ const posix_spawnattr_t *restrict\fP \fIattrp\fP\fB,
+.br
+\ \ \ \ \ \ char *const\fP \fIargv\fP\fB[restrict], char * const\fP
+\fIenvp\fP\fB[restrict]);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIposix_spawn\fP() and \fIposix_spawnp\fP() functions shall create
+a new process (child process) from the specified
+process image. The new process image shall be constructed from a regular
+executable file called the new process image file.
+.LP
+When a C program is executed as the result of this call, it shall
+be entered as a C-language function call as follows:
+.sp
+.RS
+.nf
+
+\fBint main(int\fP \fIargc\fP\fB, char *\fP\fIargv\fP\fB[]);
+\fP
+.fi
+.RE
+.LP
+where \fIargc\fP is the argument count and \fIargv\fP is an array
+of character pointers to the arguments themselves. In
+addition, the following variable:
+.sp
+.RS
+.nf
+
+\fBextern char **environ;
+\fP
+.fi
+.RE
+.LP
+shall be initialized as a pointer to an array of character pointers
+to the environment strings.
+.LP
+The argument \fIargv\fP is an array of character pointers to null-terminated
+strings. The last member of this array shall be a
+null pointer and is not counted in \fIargc\fP. These strings constitute
+the argument list available to the new process image. The
+value in \fIargv\fP[0] should point to a filename that is associated
+with the process image being started by the
+\fIposix_spawn\fP() or \fIposix_spawnp\fP() function.
+.LP
+The argument \fIenvp\fP is an array of character pointers to null-terminated
+strings. These strings constitute the environment
+for the new process image. The environment array is terminated by
+a null pointer.
+.LP
+The number of bytes available for the child process' combined argument
+and environment lists is {ARG_MAX}. The implementation
+shall specify in the system documentation (see the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 2, Conformance) whether
+any list overhead, such as length words, null terminators,
+pointers, or alignment bytes, is included in this total.
+.LP
+The \fIpath\fP argument to \fIposix_spawn\fP() is a pathname that
+identifies the new process image file to execute.
+.LP
+The \fIfile\fP parameter to \fIposix_spawnp\fP() shall be used to
+construct a pathname that identifies the new process image
+file. If the \fIfile\fP parameter contains a slash character, the
+\fIfile\fP parameter shall be used as the pathname for the new
+process image file. Otherwise, the path prefix for this file shall
+be obtained by a search of the directories passed as the
+environment variable \fIPATH\fP (see the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 8, Environment Variables). If this
+environment variable is not defined, the results of
+the search are implementation-defined.
+.LP
+If \fIfile_actions\fP is a null pointer, then file descriptors open
+in the calling process shall remain open in the child
+process, except for those whose close-on- \fIexec\fP flag FD_CLOEXEC
+is set (see \fIfcntl\fP()). For those file descriptors that remain
+open, all attributes of the corresponding open file
+descriptions, including file locks (see \fIfcntl\fP()), shall remain
+unchanged.
+.LP
+If \fIfile_actions\fP is not NULL, then the file descriptors open
+in the child process shall be those open in the calling
+process as modified by the spawn file actions object pointed to by
+\fIfile_actions\fP and the FD_CLOEXEC flag of each remaining
+open file descriptor after the spawn file actions have been processed.
+The effective order of processing the spawn file actions
+shall be:
+.IP " 1." 4
+The set of open file descriptors for the child process shall initially
+be the same set as is open for the calling process. All
+attributes of the corresponding open file descriptions, including
+file locks (see \fIfcntl\fP()), shall
+remain unchanged.
+.LP
+.IP " 2." 4
+The signal mask, signal default actions, and the effective user and
+group IDs for the child process shall be changed as
+specified in the attributes object referenced by \fIattrp\fP.
+.LP
+.IP " 3." 4
+The file actions specified by the spawn file actions object shall
+be performed in the order in which they were added to the
+spawn file actions object.
+.LP
+.IP " 4." 4
+Any file descriptor that has its FD_CLOEXEC flag set (see \fIfcntl\fP()
+) shall be closed.
+.LP
+.LP
+The \fBposix_spawnattr_t\fP spawn attributes object type is defined
+in \fI<spawn.h>\fP. It shall contain at least the attributes defined
+below.
+.LP
+If the POSIX_SPAWN_SETPGROUP flag is set in the \fIspawn-flags\fP
+attribute of the object referenced by \fIattrp\fP, and the
+\fIspawn-pgroup\fP attribute of the same object is non-zero, then
+the child's process group shall be as specified in the
+\fIspawn-pgroup\fP attribute of the object referenced by \fIattrp\fP.
+.LP
+As a special case, if the POSIX_SPAWN_SETPGROUP flag is set in the
+\fIspawn-flags\fP attribute of the object referenced by
+\fIattrp\fP, and the \fIspawn-pgroup\fP attribute of the same object
+is set to zero, then the child shall be in a new process
+group with a process group ID equal to its process ID.
+.LP
+If the POSIX_SPAWN_SETPGROUP flag is not set in the \fIspawn-flags\fP
+attribute of the object referenced by \fIattrp\fP, the
+new child process shall inherit the parent's process group.
+.LP
+If
+the POSIX_SPAWN_SETSCHEDPARAM flag is set in the \fIspawn-flags\fP
+attribute of the object referenced by \fIattrp\fP, but
+POSIX_SPAWN_SETSCHEDULER is not set, the new process image shall initially
+have the scheduling policy of the calling process with
+the scheduling parameters specified in the \fIspawn-schedparam\fP
+attribute of the object referenced by \fIattrp\fP.
+.LP
+If the POSIX_SPAWN_SETSCHEDULER flag is set in the \fIspawn-flags\fP
+attribute of the object referenced by \fIattrp\fP
+(regardless of the setting of the POSIX_SPAWN_SETSCHEDPARAM flag),
+the new process image shall initially have the scheduling policy
+specified in the \fIspawn-schedpolicy\fP attribute of the object referenced
+by \fIattrp\fP and the scheduling parameters
+specified in the \fIspawn-schedparam\fP attribute of the same object.
+.LP
+The POSIX_SPAWN_RESETIDS flag in the \fIspawn-flags\fP attribute of
+the object referenced by \fIattrp\fP governs the effective
+user ID of the child process. If this flag is not set, the child process
+shall inherit the parent process' effective user ID. If
+this flag is set, the child process' effective user ID shall be reset
+to the parent's real user ID. In either case, if the
+set-user-ID mode bit of the new process image file is set, the effective
+user ID of the child process shall become that file's
+owner ID before the new process image begins execution.
+.LP
+The POSIX_SPAWN_RESETIDS flag in the \fIspawn-flags\fP attribute of
+the object referenced by \fIattrp\fP also governs the
+effective group ID of the child process. If this flag is not set,
+the child process shall inherit the parent process' effective
+group ID. If this flag is set, the child process' effective group
+ID shall be reset to the parent's real group ID. In either case,
+if the set-group-ID mode bit of the new process image file is set,
+the effective group ID of the child process shall become that
+file's group ID before the new process image begins execution.
+.LP
+If the POSIX_SPAWN_SETSIGMASK flag is set in the \fIspawn-flags\fP
+attribute of the object referenced by \fIattrp\fP, the
+child process shall initially have the signal mask specified in the
+\fIspawn-sigmask\fP attribute of the object referenced by
+\fIattrp\fP.
+.LP
+If the POSIX_SPAWN_SETSIGDEF flag is set in the \fIspawn-flags\fP
+attribute of the object referenced by \fIattrp\fP, the
+signals specified in the \fIspawn-sigdefault\fP attribute of the same
+object shall be set to their default actions in the child
+process. Signals set to the default action in the parent process shall
+be set to the default action in the child process.
+.LP
+Signals set to be caught by the calling process shall be set to the
+default action in the child process.
+.LP
+Except for SIGCHLD, signals set to be ignored by the calling process
+image shall be set to be ignored by the child process,
+unless otherwise specified by the POSIX_SPAWN_SETSIGDEF flag being
+set in the \fIspawn-flags\fP attribute of the object referenced
+by \fIattrp\fP and the signals being indicated in the \fIspawn-sigdefault\fP
+attribute of the object referenced by
+\fIattrp\fP.
+.LP
+If the SIGCHLD signal is set to be ignored by the calling process,
+it is unspecified whether the SIGCHLD signal is set to be
+ignored or to the default action in the child process, unless otherwise
+specified by the POSIX_SPAWN_SETSIGDEF flag being set in
+the \fIspawn_flags\fP attribute of the object referenced by \fIattrp\fP
+and the SIGCHLD signal being indicated in the
+\fIspawn_sigdefault\fP attribute of the object referenced by \fIattrp\fP.
+.LP
+If the value of the \fIattrp\fP pointer is NULL, then the default
+values are used.
+.LP
+All process attributes, other than those influenced by the attributes
+set in the object referenced by \fIattrp\fP as specified
+above or by the file descriptor manipulations specified in \fIfile_actions\fP,
+shall appear in the new process image as though \fIfork\fP() had been
+called to create a child process and then a member of the \fIexec\fP
+family of functions had been called by the child process to execute
+the new process
+image.
+.LP
+It is implementation-defined whether the fork handlers are run when
+\fIposix_spawn\fP() or \fIposix_spawnp\fP() is called.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIposix_spawn\fP() and \fIposix_spawnp\fP()
+shall return the process ID of the child process to
+the parent process, in the variable pointed to by a non-NULL \fIpid\fP
+argument, and shall return zero as the function return
+value. Otherwise, no child process shall be created, the value stored
+into the variable pointed to by a non-NULL \fIpid\fP is
+unspecified, and an error number shall be returned as the function
+return value to indicate the error. If the \fIpid\fP argument
+is a null pointer, the process ID of the child is not returned to
+the caller.
+.SH ERRORS
+.LP
+The \fIposix_spawn\fP() and \fIposix_spawnp\fP() functions may fail
+if:
+.TP 7
+.B EINVAL
+The value specified by \fIfile_actions\fP or \fIattrp\fP is invalid.
+.sp
+.LP
+If this error occurs after the calling process successfully returns
+from the \fIposix_spawn\fP() or \fIposix_spawnp\fP()
+function, the child process may exit with exit status 127.
+.LP
+If \fIposix_spawn\fP() or \fIposix_spawnp\fP() fail for any of the
+reasons that would cause \fIfork\fP() or one of the \fIexec\fP family
+of functions to
+fail, an error value shall be returned as described by \fIfork\fP()
+and \fIexec\fP, respectively (or, if the error occurs after the calling
+process successfully returns, the
+child process shall exit with exit status 127).
+.LP
+If POSIX_SPAWN_SETPGROUP is set in the \fIspawn-flags\fP attribute
+of the object referenced by \fIattrp\fP, and
+\fIposix_spawn\fP() or \fIposix_spawnp\fP() fails while changing the
+child's process group, an error value shall be returned as
+described by \fIsetpgid\fP() (or, if the error occurs after the calling
+process
+successfully returns, the child process shall exit with exit status
+127).
+.LP
+If
+POSIX_SPAWN_SETSCHEDPARAM is set and POSIX_SPAWN_SETSCHEDULER is not
+set in the \fIspawn-flags\fP attribute of the object
+referenced by \fIattrp\fP, then if \fIposix_spawn\fP() or \fIposix_spawnp\fP()
+fails for any of the reasons that would cause \fIsched_setparam\fP()
+to fail, an error value shall be returned as described by \fIsched_setparam\fP()
+(or, if the error occurs after the calling process successfully
+returns, the child process shall exit with exit status 127).
+.LP
+If POSIX_SPAWN_SETSCHEDULER is set in the \fIspawn-flags\fP attribute
+of the object referenced by \fIattrp\fP, and if
+\fIposix_spawn\fP() or \fIposix_spawnp\fP() fails for any of the reasons
+that would cause \fIsched_setscheduler\fP() to fail, an error value
+shall be returned as described by \fIsched_setscheduler\fP() (or,
+if the error occurs after the calling process
+successfully returns, the child process shall exit with exit status
+127).
+.LP
+If the \fIfile_actions\fP argument is not NULL, and specifies any
+\fIclose\fP, \fIdup2\fP, or \fIopen\fP actions to be
+performed, and if \fIposix_spawn\fP() or \fIposix_spawnp\fP() fails
+for any of the reasons that would cause \fIclose\fP(), \fIdup2\fP(),
+or \fIopen\fP() to fail, an error value shall be returned as described
+by \fIclose\fP(), \fIdup2\fP(), and \fIopen\fP(), respectively (or,
+if the error occurs after the calling process successfully returns,
+the child process shall exit with exit status 127). An open file action
+may, by itself, result in any of the errors described by \fIclose\fP()
+or \fIdup2\fP(), in addition to those
+described by \fIopen\fP().
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+These functions are part of the Spawn option and need not be provided
+on all implementations.
+.SH RATIONALE
+.LP
+The \fIposix_spawn\fP() function and its close relation \fIposix_spawnp\fP()
+have been introduced to overcome the following
+perceived difficulties with \fIfork\fP(): the \fIfork\fP() function
+is difficult or impossible to implement without swapping or dynamic
+address
+translation.
+.IP " *" 3
+Swapping is generally too slow for a realtime environment.
+.LP
+.IP " *" 3
+Dynamic address translation is not available everywhere that POSIX
+might be useful.
+.LP
+.IP " *" 3
+Processes are too useful to simply option out of POSIX whenever it
+must run without address translation or other MMU
+services.
+.LP
+.LP
+Thus, POSIX needs process creation and file execution primitives that
+can be efficiently implemented without address translation
+or other MMU services.
+.LP
+The \fIposix_spawn\fP() function is implementable as a library routine,
+but both \fIposix_spawn\fP() and \fIposix_spawnp\fP()
+are designed as kernel operations. Also, although they may be an efficient
+replacement for many \fIfork\fP()/ \fIexec\fP pairs, their goal is
+to provide useful
+process creation primitives for systems that have difficulty with
+\fIfork\fP(), not to
+provide drop-in replacements for \fIfork\fP()/ \fIexec\fP.
+.LP
+This view of the role of \fIposix_spawn\fP() and \fIposix_spawnp\fP()
+influenced the design of their API. It does not attempt
+to provide the full functionality of \fIfork\fP()/ \fIexec\fP in which
+arbitrary user-specified operations of any sort are permitted between
+the creation
+of the child process and the execution of the new process image; any
+attempt to reach that level would need to provide a
+programming language as parameters. Instead, \fIposix_spawn\fP() and
+\fIposix_spawnp\fP() are process creation primitives like
+the \fIStart_Process\fP and \fIStart_Process_Search\fP Ada language
+bindings package \fIPOSIX_Process_Primitives\fP and also
+like those in many operating systems that are not UNIX systems, but
+with some POSIX-specific additions.
+.LP
+To achieve its coverage goals, \fIposix_spawn\fP() and \fIposix_spawnp\fP()
+have control of six types of inheritance: file
+descriptors, process group ID, user and group ID, signal mask, scheduling,
+and whether each signal ignored in the parent will
+remain ignored in the child, or be reset to its default action in
+the child.
+.LP
+Control of file descriptors is required to allow an independently
+written child process image to access data streams opened by
+and even generated or read by the parent process without being specifically
+coded to know which parent files and file descriptors
+are to be used. Control of the process group ID is required to control
+how the child process' job control relates to that of the
+parent.
+.LP
+Control of the signal mask and signal defaulting is sufficient to
+support the implementation of \fIsystem\fP(). Although support for
+\fIsystem\fP() is not
+explicitly one of the goals for \fIposix_spawn\fP() and \fIposix_spawnp\fP(),
+it is covered under the "at least 50%" coverage
+goal.
+.LP
+The intention is that the normal file descriptor inheritance across
+\fIfork\fP(), the
+subsequent effect of the specified spawn file actions, and the normal
+file descriptor inheritance across one of the \fIexec\fP family of
+functions should fully specify open file inheritance. The implementation
+need make
+no decisions regarding the set of open file descriptors when the child
+process image begins execution, those decisions having
+already been made by the caller and expressed as the set of open file
+descriptors and their FD_CLOEXEC flags at the time of the
+call and the spawn file actions object specified in the call. We have
+been assured that in cases where the POSIX
+\fIStart_Process\fP Ada primitives have been implemented in a library,
+this method of controlling file descriptor inheritance may
+be implemented very easily.
+.LP
+We can identify several problems with \fIposix_spawn\fP() and \fIposix_spawnp\fP(),
+but there does not appear to be a solution
+that introduces fewer problems. Environment modification for child
+process attributes not specifiable via the \fIattrp\fP or
+\fIfile_actions\fP arguments must be done in the parent process, and
+since the parent generally wants to save its context, it is
+more costly than similar functionality with \fIfork\fP()/ \fIexec\fP.
+It is also complicated to modify the environment of a multi-threaded
+process temporarily,
+since all threads must agree when it is safe for the environment to
+be changed. However, this cost is only borne by those
+invocations of \fIposix_spawn\fP() and \fIposix_spawnp\fP() that use
+the additional functionality. Since extensive modifications
+are not the usual case, and are particularly unlikely in time-critical
+code, keeping much of the environment control out of
+\fIposix_spawn\fP() and \fIposix_spawnp\fP() is appropriate design.
+.LP
+The \fIposix_spawn\fP() and \fIposix_spawnp\fP() functions do not
+have all the power of \fIfork\fP()/ \fIexec\fP. This is to be expected.
+The \fIfork\fP() function is a wonderfully powerful operation. We
+do not expect to duplicate its
+functionality in a simple, fast function with no special hardware
+requirements. It is worth noting that \fIposix_spawn\fP() and
+\fIposix_spawnp\fP() are very similar to the process creation operations
+on many operating systems that are not UNIX systems.
+.SS Requirements
+.LP
+The requirements for \fIposix_spawn\fP() and \fIposix_spawnp\fP()
+are:
+.IP " *" 3
+They must be implementable without an MMU or unusual hardware.
+.LP
+.IP " *" 3
+They must be compatible with existing POSIX standards.
+.LP
+.LP
+Additional goals are:
+.IP " *" 3
+They should be efficiently implementable.
+.LP
+.IP " *" 3
+They should be able to replace at least 50% of typical executions
+of \fIfork\fP().
+.LP
+.IP " *" 3
+A system with \fIposix_spawn\fP() and \fIposix_spawnp\fP() and without
+\fIfork\fP()
+should be useful, at least for realtime applications.
+.LP
+.IP " *" 3
+A system with \fIfork\fP() and the \fIexec\fP family
+should be able to implement \fIposix_spawn\fP() and \fIposix_spawnp\fP()
+as library routines.
+.LP
+.SS Two-Syntax
+.LP
+POSIX \fIexec\fP has several calling sequences with approximately
+the same functionality.
+These appear to be required for compatibility with existing practice.
+Since the existing practice for the \fIposix_spawn*\fP() functions
+is otherwise substantially unlike POSIX, we feel that
+simplicity outweighs compatibility. There are, therefore, only two
+names for the \fIposix_spawn*\fP() functions.
+.LP
+The parameter list does not differ between \fIposix_spawn\fP() and
+\fIposix_spawnp\fP(); \fIposix_spawnp\fP() interprets the
+second parameter more elaborately than \fIposix_spawn\fP().
+.SS Compatibility with POSIX.5 (Ada)
+.LP
+The \fIStart_Process\fP and \fIStart_Process_Search\fP procedures
+from the \fIPOSIX_Process_Primitives\fP package from the
+Ada language binding to POSIX.1 encapsulate \fIfork\fP() and \fIexec\fP
+functionality in a manner similar to that of \fIposix_spawn\fP() and
+\fIposix_spawnp\fP().
+Originally, in keeping with our simplicity goal, the standard developers
+had limited the capabilities of \fIposix_spawn\fP() and
+\fIposix_spawnp\fP() to a subset of the capabilities of \fIStart_Process\fP
+and \fIStart_Process_Search\fP; certain non-default
+capabilities were not supported. However, based on suggestions by
+the ballot group to improve file descriptor mapping or drop it,
+and on the advice of an Ada Language Bindings working group member,
+the standard developers decided that \fIposix_spawn\fP() and
+\fIposix_spawnp\fP() should be sufficiently powerful to implement
+\fIStart_Process\fP and \fIStart_Process_Search\fP. The
+rationale is that if the Ada language binding to such a primitive
+had already been approved as an IEEE standard, there can be
+little justification for not approving the functionally-equivalent
+parts of a C binding. The only three capabilities provided by
+\fIposix_spawn\fP() and \fIposix_spawnp\fP() that are not provided
+by \fIStart_Process\fP and \fIStart_Process_Search\fP are
+optionally specifying the child's process group ID, the set of signals
+to be reset to default signal handling in the child process,
+and the child's scheduling policy and parameters.
+.LP
+For the Ada language binding for \fIStart_Process\fP to be implemented
+with \fIposix_spawn\fP(), that binding would need to
+explicitly pass an empty signal mask and the parent's environment
+to \fIposix_spawn\fP() whenever the caller of
+\fIStart_Process\fP allowed these arguments to default, since \fIposix_spawn\fP()
+does not provide such defaults. The ability of
+\fIStart_Process\fP to mask user-specified signals during its execution
+is functionally unique to the Ada language binding and
+must be dealt with in the binding separately from the call to \fIposix_spawn\fP().
+.SS Process Group
+.LP
+The process group inheritance field can be used to join the child
+process with an existing process group. By assigning a value
+of zero to the \fIspawn-pgroup\fP attribute of the object referenced
+by \fIattrp\fP, the \fIsetpgid\fP() mechanism will place the child
+process in a new process group.
+.SS Threads
+.LP
+Without the \fIposix_spawn\fP() and \fIposix_spawnp\fP() functions,
+systems without address translation can still use threads
+to give an abstraction of concurrency. In many cases, thread creation
+suffices, but it is not always a good substitute. The
+\fIposix_spawn\fP() and \fIposix_spawnp\fP() functions are considerably
+"heavier" than thread creation. Processes have several
+important attributes that threads do not. Even without address translation,
+a process may have base-and-bound memory protection.
+Each process has a process environment including security attributes
+and file capabilities, and powerful scheduling attributes.
+Processes abstract the behavior of non-uniform-memory-architecture
+multi-processors better than threads, and they are more
+convenient to use for activities that are not closely linked.
+.LP
+The \fIposix_spawn\fP() and \fIposix_spawnp\fP() functions may not
+bring support for multiple processes to every
+configuration. Process creation is not the only piece of operating
+system support required to support multiple processes. The total
+cost of support for multiple processes may be quite high in some circumstances.
+Existing practice shows that support for multiple
+processes is uncommon and threads are common among "tiny kernels".
+There should, therefore, probably continue to be AEPs for
+operating systems with only one process.
+.SS Asynchronous Error Notification
+.LP
+A library implementation of \fIposix_spawn\fP() or \fIposix_spawnp\fP()
+may not be able to detect all possible errors before
+it forks the child process. IEEE\ Std\ 1003.1-2001 provides for an
+error indication returned from a child process which
+could not successfully complete the spawn operation via a special
+exit status which may be detected using the status value returned
+by \fIwait\fP() and \fIwaitpid\fP().
+.LP
+The \fIstat_val\fP interface and the macros used to interpret it are
+not well suited to the purpose of returning API errors,
+but they are the only path available to a library implementation.
+Thus, an implementation may cause the child process to exit with
+exit status 127 for any error detected during the spawn process after
+the \fIposix_spawn\fP() or \fIposix_spawnp\fP() function
+has successfully returned.
+.LP
+The standard developers had proposed using two additional macros to
+interpret \fIstat_val\fP. The first, WIFSPAWNFAIL, would
+have detected a status that indicated that the child exited because
+of an error detected during the \fIposix_spawn\fP() or
+\fIposix_spawnp\fP() operations rather than during actual execution
+of the child process image; the second, WSPAWNERRNO, would
+have extracted the error value if WIFSPAWNFAIL indicated a failure.
+Unfortunately, the ballot group strongly opposed this because
+it would make a library implementation of \fIposix_spawn\fP() or \fIposix_spawnp\fP()
+dependent on kernel modifications to \fIwaitpid\fP() to be able to
+embed special information in \fIstat_val\fP to indicate a
+spawn failure.
+.LP
+The 8 bits of child process exit status that are guaranteed by IEEE\ Std\ 1003.1-2001
+to be accessible to the waiting
+parent process are insufficient to disambiguate a spawn error from
+any other kind of error that may be returned by an arbitrary
+process image. No other bits of the exit status are required to be
+visible in \fIstat_val\fP, so these macros could not be
+strictly implemented at the library level. Reserving an exit status
+of 127 for such spawn errors is consistent with the use of this
+value by \fIsystem\fP() and \fIpopen\fP() to signal
+failures in these operations that occur after the function has returned
+but before a shell is able to execute. The exit status of
+127 does not uniquely identify this class of error, nor does it provide
+any detailed information on the nature of the failure. Note
+that a kernel implementation of \fIposix_spawn\fP() or \fIposix_spawnp\fP()
+is permitted (and encouraged) to return any possible
+error as the function value, thus providing more detailed failure
+information to the parent process.
+.LP
+Thus, no special macros are available to isolate asynchronous \fIposix_spawn\fP()
+or \fIposix_spawnp\fP() errors. Instead,
+errors detected by the \fIposix_spawn\fP() or \fIposix_spawnp\fP()
+operations in the context of the child process before the new
+process image executes are reported by setting the child's exit status
+to 127. The calling process may use the WIFEXITED and
+WEXITSTATUS macros on the \fIstat_val\fP stored by the \fIwait\fP()
+or \fIwaitpid\fP() functions to detect spawn failures to the extent
+that other status values with
+which the child process image may exit (before the parent can conclusively
+determine that the child process image has begun
+execution) are distinct from exit status 127.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIalarm\fP(), \fIchmod\fP(), \fIclose\fP(), \fIdup\fP(), \fIexec\fP(),
+\fIexit\fP(), \fIfcntl\fP(), \fIfork\fP(), \fIkill\fP(), \fIopen\fP(),
+\fIposix_spawn_file_actions_addclose\fP(), \fIposix_spawn_file_actions_adddup2\fP(),
+\fIposix_spawn_file_actions_addopen\fP(), \fIposix_spawn_file_actions_destroy\fP(),
+\fIposix_spawnattr_destroy\fP(), \fIposix_spawnattr_init\fP(),
+\fIposix_spawnattr_getsigdefault\fP(), \fIposix_spawnattr_getflags\fP(),
+\fIposix_spawnattr_getpgroup\fP(), \fIposix_spawnattr_getschedparam\fP(),
+\fIposix_spawnattr_getschedpolicy\fP(), \fIposix_spawnattr_getsigmask\fP(),
+\fIposix_spawnattr_setsigdefault\fP(), \fIposix_spawnattr_setflags\fP(),
+\fIposix_spawnattr_setpgroup\fP(), \fIposix_spawnattr_setschedparam\fP(),
+\fIposix_spawnattr_setschedpolicy\fP(), \fIposix_spawnattr_setsigmask\fP(),
+\fIsched_setparam\fP(), \fIsched_setscheduler\fP(), \fIsetpgid\fP(),
+\fIsetuid\fP(), \fIstat\fP(), \fItimes\fP(), \fIwait\fP(), the
+Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<spawn.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/posix_spawn_file_actions_addclose.3p b/man-pages-posix-2003/man3p/posix_spawn_file_actions_addclose.3p
new file mode 100644
index 0000000..68e164b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_spawn_file_actions_addclose.3p
@@ -0,0 +1 @@
+.so man3p/posix_spawn_file_actions_addopen.3p
diff --git a/man-pages-posix-2003/man3p/posix_spawn_file_actions_adddup2.3p b/man-pages-posix-2003/man3p/posix_spawn_file_actions_adddup2.3p
new file mode 100644
index 0000000..6901002
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_spawn_file_actions_adddup2.3p
@@ -0,0 +1,98 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POSIX_SPAWN_FILE_ACTIONS_ADDDUP2" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" posix_spawn_file_actions_adddup2
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+posix_spawn_file_actions_adddup2 \- add dup2 action to spawn file actions
+object (\fBADVANCED REALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <spawn.h>
+.br
+.sp
+int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *
+.br
+\ \ \ \ \ \ \fP \fIfile_actions\fP\fB, int\fP \fIfildes\fP\fB, int\fP
+\fInewfildes\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIposix_spawn_file_actions_adddup2\fP() function shall add a
+\fIdup2\fP() action to
+the object referenced by \fIfile_actions\fP that shall cause the file
+descriptor \fIfildes\fP to be duplicated as
+\fInewfildes\fP (as if \fIdup2\fP( \fIfildes\fP, \fInewfildes\fP)
+had been called) when a new process is spawned using this
+file actions object.
+.LP
+A spawn file actions object is as defined in \fIposix_spawn_file_actions_addclose\fP()
+\&.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIposix_spawn_file_actions_adddup2\fP()
+function shall return zero; otherwise, an error number
+shall be returned to indicate the error.
+.SH ERRORS
+.LP
+The \fIposix_spawn_file_actions_adddup2\fP() function shall fail if:
+.TP 7
+.B EBADF
+The value specified by \fIfildes\fP or \fInewfildes\fP is negative
+or greater than or equal to {OPEN_MAX}.
+.TP 7
+.B ENOMEM
+Insufficient memory exists to add to the spawn file actions object.
+.sp
+.LP
+The \fIposix_spawn_file_actions_adddup2\fP() function may fail if:
+.TP 7
+.B EINVAL
+The value specified by \fIfile_actions\fP is invalid.
+.sp
+.LP
+It shall not be considered an error for the \fIfildes\fP argument
+passed to the \fIposix_spawn_file_actions_adddup2\fP()
+function to specify a file descriptor for which the specified operation
+could not be performed at the time of the call. Any such
+error will be detected when the associated file actions object is
+later used during a \fIposix_spawn\fP() or \fIposix_spawnp\fP()
+operation.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIposix_spawn_file_actions_adddup2\fP() function is part of the
+Spawn option and need not be provided on all
+implementations.
+.SH RATIONALE
+.LP
+Refer to the RATIONALE in \fIposix_spawn_file_actions_addclose\fP()
+\&.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIdup\fP(), \fIposix_spawn\fP(), \fIposix_spawn_file_actions_addclose\fP(),
+\fIposix_spawn_file_actions_destroy\fP(), \fIposix_spawnp\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<spawn.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/posix_spawn_file_actions_addopen.3p b/man-pages-posix-2003/man3p/posix_spawn_file_actions_addopen.3p
new file mode 100644
index 0000000..f4aec27
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_spawn_file_actions_addopen.3p
@@ -0,0 +1,223 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" posix_spawn_file_actions_addclose
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+posix_spawn_file_actions_addclose, posix_spawn_file_actions_addopen
+\- add close or open action to spawn file actions
+object (\fBADVANCED REALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <spawn.h>
+.br
+.sp
+int posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *
+.br
+\ \ \ \ \ \ \fP \fIfile_actions\fP\fB, int\fP \fIfildes\fP\fB);
+.br
+int posix_spawn_file_actions_addopen(posix_spawn_file_actions_t *
+.br
+\ \ \ \ \ \ restrict\fP \fIfile_actions\fP\fB, int\fP \fIfildes\fP\fB,
+.br
+\ \ \ \ \ \ const char *restrict\fP \fIpath\fP\fB, int\fP \fIoflag\fP\fB,
+mode_t\fP
+\fImode\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall add or delete a close or open action to a spawn
+file actions object.
+.LP
+A spawn file actions object is of type \fBposix_spawn_file_actions_t\fP
+(defined in \fI<spawn.h>\fP) and is used to specify a series of actions
+to be performed by a \fIposix_spawn\fP() or \fIposix_spawnp\fP()
+operation in order to arrive at the set of open file descriptors for
+the child process given the set of open file descriptors of
+the parent. IEEE\ Std\ 1003.1-2001 does not define comparison or assignment
+operators for the type
+\fBposix_spawn_file_actions_t\fP.
+.LP
+A spawn file actions object, when passed to \fIposix_spawn\fP() or
+\fIposix_spawnp\fP(), shall specify how the set of open file descriptors
+in the calling
+process is transformed into a set of potentially open file descriptors
+for the spawned process. This transformation shall be as if
+the specified sequence of actions was performed exactly once, in the
+context of the spawned process (prior to execution of the new
+process image), in the order in which the actions were added to the
+object; additionally, when the new process image is executed,
+any file descriptor (from this new set) which has its FD_CLOEXEC flag
+set shall be closed (see \fIposix_spawn\fP()).
+.LP
+The \fIposix_spawn_file_actions_addclose\fP() function shall add a
+\fIclose\fP action to the object referenced by
+\fIfile_actions\fP that shall cause the file descriptor \fIfildes\fP
+to be closed (as if \fIclose\fP( \fIfildes\fP) had been
+called) when a new process is spawned using this file actions object.
+.LP
+The \fIposix_spawn_file_actions_addopen\fP() function shall add an
+\fIopen\fP action to the object referenced by
+\fIfile_actions\fP that shall cause the file named by \fIpath\fP to
+be opened (as if \fIopen\fP( \fIpath\fP, \fIoflag\fP,
+\fImode\fP) had been called, and the returned file descriptor, if
+not \fIfildes\fP, had been changed to \fIfildes\fP) when a new
+process is spawned using this file actions object. If \fIfildes\fP
+was already an open file descriptor, it shall be closed before
+the new file is opened.
+.LP
+The string described by \fIpath\fP shall be copied by the \fIposix_spawn_file_actions_addopen\fP()
+function.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return zero; otherwise,
+an error number shall be returned to indicate the
+error.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+.B EBADF
+The value specified by \fIfildes\fP is negative or greater than or
+equal to {OPEN_MAX}.
+.sp
+.LP
+These functions may fail if:
+.TP 7
+.B EINVAL
+The value specified by \fIfile_actions\fP is invalid.
+.TP 7
+.B ENOMEM
+Insufficient memory exists to add to the spawn file actions object.
+.sp
+.LP
+It shall not be considered an error for the \fIfildes\fP argument
+passed to these functions to specify a file descriptor for
+which the specified operation could not be performed at the time of
+the call. Any such error will be detected when the associated
+file actions object is later used during a \fIposix_spawn\fP() or
+\fIposix_spawnp\fP() operation.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+These functions are part of the Spawn option and need not be provided
+on all implementations.
+.SH RATIONALE
+.LP
+A spawn file actions object may be initialized to contain an ordered
+sequence of \fIclose\fP(), \fIdup2\fP(), and \fIopen\fP() operations
+to be used by \fIposix_spawn\fP() or \fIposix_spawnp\fP() to
+arrive at the set of open file descriptors inherited by the spawned
+process from the set of open file descriptors in the parent at
+the time of the \fIposix_spawn\fP() or \fIposix_spawnp\fP() call.
+It had been suggested that the \fIclose\fP() and \fIdup2\fP() operations
+alone are sufficient
+to rearrange file descriptors, and that files which need to be opened
+for use by the spawned process can be handled either by
+having the calling process open them before the \fIposix_spawn\fP()
+or \fIposix_spawnp\fP() call (and close them after), or by passing
+filenames to the spawned
+process (in \fIargv\fP) so that it may open them itself. The standard
+developers recommend that applications use one of these two
+methods when practical, since detailed error status on a failed open
+operation is always available to the application this way.
+However, the standard developers feel that allowing a spawn file actions
+object to specify open operations is still appropriate
+because:
+.IP " 1." 4
+It is consistent with equivalent POSIX.5 (Ada) functionality.
+.LP
+.IP " 2." 4
+It supports the I/O redirection paradigm commonly employed by POSIX
+programs designed to be invoked from a shell. When such a
+program is the child process, it may not be designed to open files
+on its own.
+.LP
+.IP " 3." 4
+It allows file opens that might otherwise fail or violate file ownership/access
+rights if executed by the parent process.
+.LP
+.LP
+Regarding 2. above, note that the spawn open file action provides
+to \fIposix_spawn\fP() and \fIposix_spawnp\fP() the
+same capability that the shell redirection operators provide to \fIsystem\fP(),
+only
+without the intervening execution of a shell; for example:
+.sp
+.RS
+.nf
+
+\fBsystem ("myprog <file1 3<file2");
+\fP
+.fi
+.RE
+.LP
+Regarding 3. above, note that if the calling process needs to open
+one or more files for access by the spawned process, but has
+insufficient spare file descriptors, then the open action is necessary
+to allow the \fIopen\fP() to occur in the context of the child process
+after other file descriptors have been
+closed (that must remain open in the parent).
+.LP
+Additionally, if a parent is executed from a file having a "set-user-id"
+mode bit set and the POSIX_SPAWN_RESETIDS flag is set
+in the spawn attributes, a file created within the parent process
+will (possibly incorrectly) have the parent's effective user ID
+as its owner, whereas a file created via an \fIopen\fP() action during
+\fIposix_spawn\fP() or \fIposix_spawnp\fP() will
+have the parent's real ID as its owner; and an open by the parent
+process may successfully open a file to which the real user
+should not have access or fail to open a file to which the real user
+should have access.
+.SS File Descriptor Mapping
+.LP
+The standard developers had originally proposed using an array which
+specified the mapping of child file descriptors back to
+those of the parent. It was pointed out by the ballot group that it
+is not possible to reshuffle file descriptors arbitrarily in a
+library implementation of \fIposix_spawn\fP() or \fIposix_spawnp\fP()
+without provision for one or more spare file descriptor entries (which
+simply may not be available). Such an array requires that an implementation
+develop a complex strategy to achieve the desired
+mapping without inadvertently closing the wrong file descriptor at
+the wrong time.
+.LP
+It was noted by a member of the Ada Language Bindings working group
+that the approved Ada Language \fIStart_Process\fP family
+of POSIX process primitives use a caller-specified set of file actions
+to alter the normal \fIfork\fP()/ \fIexec\fP semantics for inheritance
+of file
+descriptors in a very flexible way, yet no such problems exist because
+the burden of determining how to achieve the final file
+descriptor mapping is completely on the application. Furthermore,
+although the file actions interface appears frightening at first
+glance, it is actually quite simple to implement in either a library
+or the kernel.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIclose\fP(), \fIdup\fP(), \fIopen\fP(), \fIposix_spawn\fP(),
+\fIposix_spawn_file_actions_adddup2\fP(), \fIposix_spawn_file_actions_destroy\fP(),
+\fIposix_spawnp\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<spawn.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/posix_spawn_file_actions_destroy.3p b/man-pages-posix-2003/man3p/posix_spawn_file_actions_destroy.3p
new file mode 100644
index 0000000..17a7bd7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_spawn_file_actions_destroy.3p
@@ -0,0 +1 @@
+.so man3p/posix_spawn_file_actions_init.3p
diff --git a/man-pages-posix-2003/man3p/posix_spawn_file_actions_init.3p b/man-pages-posix-2003/man3p/posix_spawn_file_actions_init.3p
new file mode 100644
index 0000000..b90d41b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_spawn_file_actions_init.3p
@@ -0,0 +1,96 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POSIX_SPAWN_FILE_ACTIONS_DESTROY" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" posix_spawn_file_actions_destroy
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+posix_spawn_file_actions_destroy, posix_spawn_file_actions_init \-
+destroy and initialize spawn file actions object
+(\fBADVANCED REALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <spawn.h>
+.br
+.sp
+int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *
+.br
+\ \ \ \ \ \ \fP \fIfile_actions\fP\fB);
+.br
+int posix_spawn_file_actions_init(posix_spawn_file_actions_t *
+.br
+\ \ \ \ \ \ \fP \fIfile_actions\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIposix_spawn_file_actions_destroy\fP() function shall destroy
+the object referenced by \fIfile_actions\fP; the object
+becomes, in effect, uninitialized. An implementation may cause \fIposix_spawn_file_actions_destroy\fP()
+to set the object
+referenced by \fIfile_actions\fP to an invalid value. A destroyed
+spawn file actions object can be reinitialized using
+\fIposix_spawn_file_actions_init\fP(); the results of otherwise referencing
+the object after it has been destroyed are
+undefined.
+.LP
+The \fIposix_spawn_file_actions_init\fP() function shall initialize
+the object referenced by \fIfile_actions\fP to contain no
+file actions for \fIposix_spawn\fP() or \fIposix_spawnp\fP() to perform.
+.LP
+A spawn file actions object is as defined in \fIposix_spawn_file_actions_addclose\fP()
+\&.
+.LP
+The effect of initializing an already initialized spawn file actions
+object is undefined.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return zero; otherwise,
+an error number shall be returned to indicate the
+error.
+.SH ERRORS
+.LP
+The \fIposix_spawn_file_actions_init\fP() function shall fail if:
+.TP 7
+.B ENOMEM
+Insufficient memory exists to initialize the spawn file actions object.
+.sp
+.LP
+The \fIposix_spawn_file_actions_destroy\fP() function may fail if:
+.TP 7
+.B EINVAL
+The value specified by \fIfile_actions\fP is invalid.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+These functions are part of the Spawn option and need not be provided
+on all implementations.
+.SH RATIONALE
+.LP
+Refer to the RATIONALE in \fIposix_spawn_file_actions_addclose\fP()
+\&.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIposix_spawn\fP(), \fIposix_spawnp\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<spawn.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/posix_spawnattr_destroy.3p b/man-pages-posix-2003/man3p/posix_spawnattr_destroy.3p
new file mode 100644
index 0000000..8e7f069
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_spawnattr_destroy.3p
@@ -0,0 +1 @@
+.so man3p/posix_spawnattr_init.3p
diff --git a/man-pages-posix-2003/man3p/posix_spawnattr_getflags.3p b/man-pages-posix-2003/man3p/posix_spawnattr_getflags.3p
new file mode 100644
index 0000000..3459a9e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_spawnattr_getflags.3p
@@ -0,0 +1,121 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POSIX_SPAWNATTR_GETFLAGS" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" posix_spawnattr_getflags
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+posix_spawnattr_getflags, posix_spawnattr_setflags \- get and set the
+spawn\-flags attribute of a spawn attributes object
+(\fBADVANCED REALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <spawn.h>
+.br
+.sp
+int posix_spawnattr_getflags(const posix_spawnattr_t *restrict\fP
+\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ short *restrict\fP \fIflags\fP\fB);
+.br
+int posix_spawnattr_setflags(posix_spawnattr_t *\fP\fIattr\fP\fB,
+short\fP \fIflags\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIposix_spawnattr_getflags\fP() function shall obtain the value
+of the \fIspawn-flags\fP attribute from the attributes
+object referenced by \fIattr\fP.
+.LP
+The \fIposix_spawnattr_setflags\fP() function shall set the \fIspawn-flags\fP
+attribute in an initialized attributes object
+referenced by \fIattr\fP.
+.LP
+The \fIspawn-flags\fP attribute is used to indicate which process
+attributes are to be changed in the new process image when
+invoking \fIposix_spawn\fP() or \fIposix_spawnp\fP(). It is the bitwise-inclusive
+OR of zero or more of the following
+flags:
+.LP
+.sp
+POSIX_SPAWN_RESETIDS
+.br
+POSIX_SPAWN_SETPGROUP
+.br
+POSIX_SPAWN_SETSIGDEF
+.br
+POSIX_SPAWN_SETSIGMASK
+.br
+.sp
+POSIX_SPAWN_SETSCHEDPARAM
+.br
+POSIX_SPAWN_SETSCHEDULER
+.br
+.sp
+.LP
+These flags are defined in \fI<spawn.h>\fP. The default value of this
+attribute
+shall be as if no flags were set.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIposix_spawnattr_getflags\fP() shall
+return zero and store the value of the \fIspawn-flags\fP
+attribute of \fIattr\fP into the object referenced by the \fIflags\fP
+parameter; otherwise, an error number shall be returned to
+indicate the error.
+.LP
+Upon successful completion, \fIposix_spawnattr_setflags\fP() shall
+return zero; otherwise, an error number shall be returned to
+indicate the error.
+.SH ERRORS
+.LP
+These functions may fail if:
+.TP 7
+.B EINVAL
+The value specified by \fIattr\fP is invalid.
+.sp
+.LP
+The \fIposix_spawnattr_setflags\fP() function may fail if:
+.TP 7
+.B EINVAL
+The value of the attribute being set is not valid.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+These functions are part of the Spawn option and need not be provided
+on all implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIposix_spawn\fP(), \fIposix_spawnattr_destroy\fP(), \fIposix_spawnattr_init\fP(),
+\fIposix_spawnattr_getsigdefault\fP(), \fIposix_spawnattr_getpgroup\fP(),
+\fIposix_spawnattr_getschedparam\fP(), \fIposix_spawnattr_getschedpolicy\fP(),
+\fIposix_spawnattr_getsigmask\fP(), \fIposix_spawnattr_setsigdefault\fP(),
+\fIposix_spawnattr_setpgroup\fP(), \fIposix_spawnattr_setschedparam\fP(),
+\fIposix_spawnattr_setschedpolicy\fP(), \fIposix_spawnattr_setsigmask\fP(),
+\fIposix_spawnp\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<spawn.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/posix_spawnattr_getpgroup.3p b/man-pages-posix-2003/man3p/posix_spawnattr_getpgroup.3p
new file mode 100644
index 0000000..8408c0a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_spawnattr_getpgroup.3p
@@ -0,0 +1,100 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POSIX_SPAWNATTR_GETPGROUP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" posix_spawnattr_getpgroup
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+posix_spawnattr_getpgroup, posix_spawnattr_setpgroup \- get and set
+the spawn\-pgroup attribute of a spawn attributes
+object (\fBADVANCED REALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <spawn.h>
+.br
+.sp
+int posix_spawnattr_getpgroup(const posix_spawnattr_t *restrict\fP
+\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ pid_t *restrict\fP \fIpgroup\fP\fB);
+.br
+int posix_spawnattr_setpgroup(posix_spawnattr_t *\fP\fIattr\fP\fB,
+pid_t\fP \fIpgroup\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIposix_spawnattr_getpgroup\fP() function shall obtain the value
+of the \fIspawn-pgroup\fP attribute from the attributes
+object referenced by \fIattr\fP.
+.LP
+The \fIposix_spawnattr_setpgroup\fP() function shall set the \fIspawn-pgroup\fP
+attribute in an initialized attributes object
+referenced by \fIattr\fP.
+.LP
+The \fIspawn-pgroup\fP attribute represents the process group to be
+joined by the new process image in a spawn operation (if
+POSIX_SPAWN_SETPGROUP is set in the \fIspawn-flags\fP attribute).
+The default value of this attribute shall be zero.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIposix_spawnattr_getpgroup\fP() shall
+return zero and store the value of the \fIspawn-pgroup\fP
+attribute of \fIattr\fP into the object referenced by the \fIpgroup\fP
+parameter; otherwise, an error number shall be returned to
+indicate the error.
+.LP
+Upon successful completion, \fIposix_spawnattr_setpgroup\fP() shall
+return zero; otherwise, an error number shall be returned
+to indicate the error.
+.SH ERRORS
+.LP
+These functions may fail if:
+.TP 7
+.B EINVAL
+The value specified by \fIattr\fP is invalid.
+.sp
+.LP
+The \fIposix_spawnattr_setpgroup\fP() function may fail if:
+.TP 7
+.B EINVAL
+The value of the attribute being set is not valid.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+These functions are part of the Spawn option and need not be provided
+on all implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIposix_spawn\fP(), \fIposix_spawnattr_destroy\fP(), \fIposix_spawnattr_init\fP(),
+\fIposix_spawnattr_getsigdefault\fP(), \fIposix_spawnattr_getflags\fP(),
+\fIposix_spawnattr_getschedparam\fP(), \fIposix_spawnattr_getschedpolicy\fP(),
+\fIposix_spawnattr_getsigmask\fP(), \fIposix_spawnattr_setsigdefault\fP(),
+\fIposix_spawnattr_setflags\fP(), \fIposix_spawnattr_setschedparam\fP(),
+\fIposix_spawnattr_setschedpolicy\fP(), \fIposix_spawnattr_setsigmask\fP(),
+\fIposix_spawnp\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<spawn.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/posix_spawnattr_getschedparam.3p b/man-pages-posix-2003/man3p/posix_spawnattr_getschedparam.3p
new file mode 100644
index 0000000..69d6caf
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_spawnattr_getschedparam.3p
@@ -0,0 +1,106 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POSIX_SPAWNATTR_GETSCHEDPARAM" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" posix_spawnattr_getschedparam
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+posix_spawnattr_getschedparam, posix_spawnattr_setschedparam \- get
+and set the spawn\-schedparam attribute of a spawn
+attributes object (\fBADVANCED REALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <spawn.h>
+.br
+#include <sched.h>
+.br
+.sp
+int posix_spawnattr_getschedparam(const posix_spawnattr_t *
+.br
+\ \ \ \ \ \ restrict\fP \fIattr\fP\fB, struct sched_param *restrict\fP
+\fIschedparam\fP\fB);
+.br
+int posix_spawnattr_setschedparam(posix_spawnattr_t *restrict\fP \fIattr\fP\fB,
+.br
+\ \ \ \ \ \ const struct sched_param *restrict\fP \fIschedparam\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIposix_spawnattr_getschedparam\fP() function shall obtain the
+value of the \fIspawn-schedparam\fP attribute from the
+attributes object referenced by \fIattr\fP.
+.LP
+The \fIposix_spawnattr_setschedparam\fP() function shall set the \fIspawn-schedparam\fP
+attribute in an initialized attributes
+object referenced by \fIattr\fP.
+.LP
+The \fIspawn-schedparam\fP attribute represents the scheduling parameters
+to be assigned to the new process image in a spawn
+operation (if POSIX_SPAWN_SETSCHEDULER or POSIX_SPAWN_SETSCHEDPARAM
+is set in the \fIspawn-flags\fP attribute). The default value
+of this attribute is unspecified.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIposix_spawnattr_getschedparam\fP()
+shall return zero and store the value of the
+\fIspawn-schedparam\fP attribute of \fIattr\fP into the object referenced
+by the \fIschedparam\fP parameter; otherwise, an error
+number shall be returned to indicate the error.
+.LP
+Upon successful completion, \fIposix_spawnattr_setschedparam\fP()
+shall return zero; otherwise, an error number shall be
+returned to indicate the error.
+.SH ERRORS
+.LP
+These functions may fail if:
+.TP 7
+.B EINVAL
+The value specified by \fIattr\fP is invalid.
+.sp
+.LP
+The \fIposix_spawnattr_setschedparam\fP() function may fail if:
+.TP 7
+.B EINVAL
+The value of the attribute being set is not valid.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+These functions are part of the Spawn and Process Scheduling options
+and need not be provided on all implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIposix_spawn\fP(), \fIposix_spawnattr_destroy\fP(), \fIposix_spawnattr_init\fP(),
+\fIposix_spawnattr_getsigdefault\fP(), \fIposix_spawnattr_getflags\fP(),
+\fIposix_spawnattr_getpgroup\fP(), \fIposix_spawnattr_getschedpolicy\fP(),
+\fIposix_spawnattr_getsigmask\fP(), \fIposix_spawnattr_setsigdefault\fP(),
+\fIposix_spawnattr_setflags\fP(), \fIposix_spawnattr_setpgroup\fP(),
+\fIposix_spawnattr_setschedpolicy\fP(), \fIposix_spawnattr_setsigmask\fP(),
+\fIposix_spawnp\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<sched.h>\fP,
+\fI<spawn.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/posix_spawnattr_getschedpolicy.3p b/man-pages-posix-2003/man3p/posix_spawnattr_getschedpolicy.3p
new file mode 100644
index 0000000..5b683bc
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_spawnattr_getschedpolicy.3p
@@ -0,0 +1,104 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POSIX_SPAWNATTR_GETSCHEDPOLICY" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" posix_spawnattr_getschedpolicy
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+posix_spawnattr_getschedpolicy, posix_spawnattr_setschedpolicy \- get
+and set the spawn\-schedpolicy attribute of a spawn
+attributes object (\fBADVANCED REALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <spawn.h>
+.br
+#include <sched.h>
+.br
+.sp
+int posix_spawnattr_getschedpolicy(const posix_spawnattr_t *
+.br
+\ \ \ \ \ \ restrict\fP \fIattr\fP\fB, int *restrict\fP \fIschedpolicy\fP\fB);
+.br
+int posix_spawnattr_setschedpolicy(posix_spawnattr_t *\fP\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ int\fP \fIschedpolicy\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIposix_spawnattr_getschedpolicy\fP() function shall obtain the
+value of the \fIspawn-schedpolicy\fP attribute from the
+attributes object referenced by \fIattr\fP.
+.LP
+The \fIposix_spawnattr_setschedpolicy\fP() function shall set the
+\fIspawn-schedpolicy\fP attribute in an initialized
+attributes object referenced by \fIattr\fP.
+.LP
+The \fIspawn-schedpolicy\fP attribute represents the scheduling policy
+to be assigned to the new process image in a spawn
+operation (if POSIX_SPAWN_SETSCHEDULER is set in the \fIspawn-flags\fP
+attribute). The default value of this attribute is
+unspecified.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIposix_spawnattr_getschedpolicy\fP()
+shall return zero and store the value of the
+\fIspawn-schedpolicy\fP attribute of \fIattr\fP into the object referenced
+by the \fIschedpolicy\fP parameter; otherwise, an
+error number shall be returned to indicate the error.
+.LP
+Upon successful completion, \fIposix_spawnattr_setschedpolicy\fP()
+shall return zero; otherwise, an error number shall be
+returned to indicate the error.
+.SH ERRORS
+.LP
+These functions may fail if:
+.TP 7
+.B EINVAL
+The value specified by \fIattr\fP is invalid.
+.sp
+.LP
+The \fIposix_spawnattr_setschedpolicy\fP() function may fail if:
+.TP 7
+.B EINVAL
+The value of the attribute being set is not valid.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+These functions are part of the Spawn and Process Scheduling options
+and need not be provided on all implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIposix_spawn\fP(), \fIposix_spawnattr_destroy\fP(), \fIposix_spawnattr_init\fP(),
+\fIposix_spawnattr_getsigdefault\fP(), \fIposix_spawnattr_getflags\fP(),
+\fIposix_spawnattr_getpgroup\fP(), \fIposix_spawnattr_getschedparam\fP(),
+\fIposix_spawnattr_getsigmask\fP(), \fIposix_spawnattr_setsigdefault\fP(),
+\fIposix_spawnattr_setflags\fP(), \fIposix_spawnattr_setpgroup\fP(),
+\fIposix_spawnattr_setschedparam\fP(), \fIposix_spawnattr_setsigmask\fP(),
+\fIposix_spawnp\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<sched.h>\fP,
+\fI<spawn.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/posix_spawnattr_getsigdefault.3p b/man-pages-posix-2003/man3p/posix_spawnattr_getsigdefault.3p
new file mode 100644
index 0000000..a5e4c61
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_spawnattr_getsigdefault.3p
@@ -0,0 +1,104 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POSIX_SPAWNATTR_GETSIGDEFAULT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" posix_spawnattr_getsigdefault
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+posix_spawnattr_getsigdefault, posix_spawnattr_setsigdefault \- get
+and set the spawn\-sigdefault attribute of a spawn
+attributes object (\fBADVANCED REALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <signal.h>
+.br
+#include <spawn.h>
+.br
+.sp
+int posix_spawnattr_getsigdefault(const posix_spawnattr_t *
+.br
+\ \ \ \ \ \ restrict\fP \fIattr\fP\fB, sigset_t *restrict\fP \fIsigdefault\fP\fB);
+.br
+int posix_spawnattr_setsigdefault(posix_spawnattr_t *restrict\fP \fIattr\fP\fB,
+.br
+\ \ \ \ \ \ const sigset_t *restrict\fP \fIsigdefault\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIposix_spawnattr_getsigdefault\fP() function shall obtain the
+value of the \fIspawn-sigdefault\fP attribute from the
+attributes object referenced by \fIattr\fP.
+.LP
+The \fIposix_spawnattr_setsigdefault\fP() function shall set the \fIspawn-sigdefault\fP
+attribute in an initialized attributes
+object referenced by \fIattr\fP.
+.LP
+The \fIspawn-sigdefault\fP attribute represents the set of signals
+to be forced to default signal handling in the new process
+image (if POSIX_SPAWN_SETSIGDEF is set in the \fIspawn-flags\fP attribute)
+by a spawn operation. The default value of this
+attribute shall be an empty signal set.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIposix_spawnattr_getsigdefault\fP()
+shall return zero and store the value of the
+\fIspawn-sigdefault\fP attribute of \fIattr\fP into the object referenced
+by the \fIsigdefault\fP parameter; otherwise, an error
+number shall be returned to indicate the error.
+.LP
+Upon successful completion, \fIposix_spawnattr_setsigdefault\fP()
+shall return zero; otherwise, an error number shall be
+returned to indicate the error.
+.SH ERRORS
+.LP
+These functions may fail if:
+.TP 7
+.B EINVAL
+The value specified by \fIattr\fP is invalid.
+.sp
+.LP
+The \fIposix_spawnattr_setsigdefault\fP() function may fail if:
+.TP 7
+.B EINVAL
+The value of the attribute being set is not valid.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+These functions are part of the Spawn option and need not be provided
+on all implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIposix_spawn\fP(), \fIposix_spawnattr_destroy\fP(), \fIposix_spawnattr_init\fP(),
+\fIposix_spawnattr_getflags\fP(), \fIposix_spawnattr_getpgroup\fP(),
+\fIposix_spawnattr_getschedparam\fP(), \fIposix_spawnattr_getschedpolicy\fP(),
+\fIposix_spawnattr_getsigmask\fP(), \fIposix_spawnattr_setflags\fP(),
+\fIposix_spawnattr_setpgroup\fP(), \fIposix_spawnattr_setschedparam\fP(),
+\fIposix_spawnattr_setschedpolicy\fP(), \fIposix_spawnattr_setsigmask\fP(),
+\fIposix_spawnp\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<signal.h>\fP,
+\fI<spawn.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/posix_spawnattr_getsigmask.3p b/man-pages-posix-2003/man3p/posix_spawnattr_getsigmask.3p
new file mode 100644
index 0000000..12048ba
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_spawnattr_getsigmask.3p
@@ -0,0 +1,103 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POSIX_SPAWNATTR_GETSIGMASK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" posix_spawnattr_getsigmask
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+posix_spawnattr_getsigmask, posix_spawnattr_setsigmask \- get and set
+the spawn\-sigmask attribute of a spawn attributes
+object (\fBADVANCED REALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <signal.h>
+.br
+#include <spawn.h>
+.br
+.sp
+int posix_spawnattr_getsigmask(const posix_spawnattr_t *restrict\fP
+\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ sigset_t *restrict\fP \fIsigmask\fP\fB);
+.br
+int posix_spawnattr_setsigmask(posix_spawnattr_t *restrict\fP \fIattr\fP\fB,
+.br
+\ \ \ \ \ \ const sigset_t *restrict\fP \fIsigmask\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIposix_spawnattr_getsigmask\fP() function shall obtain the value
+of the \fIspawn-sigmask\fP attribute from the
+attributes object referenced by \fIattr\fP.
+.LP
+The \fIposix_spawnattr_setsigmask\fP() function shall set the \fIspawn-sigmask\fP
+attribute in an initialized attributes
+object referenced by \fIattr\fP.
+.LP
+The \fIspawn-sigmask\fP attribute represents the signal mask in effect
+in the new process image of a spawn operation (if
+POSIX_SPAWN_SETSIGMASK is set in the \fIspawn-flags\fP attribute).
+The default value of this attribute is unspecified.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIposix_spawnattr_getsigmask\fP() shall
+return zero and store the value of the
+\fIspawn-sigmask\fP attribute of \fIattr\fP into the object referenced
+by the \fIsigmask\fP parameter; otherwise, an error
+number shall be returned to indicate the error.
+.LP
+Upon successful completion, \fIposix_spawnattr_setsigmask\fP() shall
+return zero; otherwise, an error number shall be returned
+to indicate the error.
+.SH ERRORS
+.LP
+These functions may fail if:
+.TP 7
+.B EINVAL
+The value specified by \fIattr\fP is invalid.
+.sp
+.LP
+The \fIposix_spawnattr_setsigmask\fP() function may fail if:
+.TP 7
+.B EINVAL
+The value of the attribute being set is not valid.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+These functions are part of the Spawn option and need not be provided
+on all implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIposix_spawn\fP(), \fIposix_spawnattr_destroy\fP(), \fIposix_spawnattr_init\fP(),
+\fIposix_spawnattr_getsigdefault\fP(), \fIposix_spawnattr_getflags\fP(),
+\fIposix_spawnattr_getpgroup\fP(), \fIposix_spawnattr_getschedparam\fP(),
+\fIposix_spawnattr_getschedpolicy\fP(), \fIposix_spawnattr_setsigdefault\fP(),
+\fIposix_spawnattr_setflags\fP(), \fIposix_spawnattr_setpgroup\fP(),
+\fIposix_spawnattr_setschedparam\fP(), \fIposix_spawnattr_setschedpolicy\fP(),
+\fIposix_spawnp\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<signal.h>\fP, \fI<spawn.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/posix_spawnattr_init.3p b/man-pages-posix-2003/man3p/posix_spawnattr_init.3p
new file mode 100644
index 0000000..de8f76f
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_spawnattr_init.3p
@@ -0,0 +1,127 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POSIX_SPAWNATTR_DESTROY" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" posix_spawnattr_destroy
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+posix_spawnattr_destroy, posix_spawnattr_init \- destroy and initialize
+spawn attributes object (\fBADVANCED
+REALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <spawn.h>
+.br
+.sp
+int posix_spawnattr_destroy(posix_spawnattr_t *\fP\fIattr\fP\fB);
+.br
+int posix_spawnattr_init(posix_spawnattr_t *\fP\fIattr\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIposix_spawnattr_destroy\fP() function shall destroy a spawn
+attributes object. A destroyed \fIattr\fP attributes object
+can be reinitialized using \fIposix_spawnattr_init\fP(); the results
+of otherwise referencing the object after it has been
+destroyed are undefined. An implementation may cause \fIposix_spawnattr_destroy\fP()
+to set the object referenced by \fIattr\fP
+to an invalid value.
+.LP
+The \fIposix_spawnattr_init\fP() function shall initialize a spawn
+attributes object \fIattr\fP with the default value for all
+of the individual attributes used by the implementation. Results are
+undefined if \fIposix_spawnattr_init\fP() is called
+specifying an already initialized \fIattr\fP attributes object.
+.LP
+A spawn attributes object is of type \fBposix_spawnattr_t\fP (defined
+in \fI<spawn.h>\fP) and is used to specify the inheritance of process
+attributes across a spawn
+operation. IEEE\ Std\ 1003.1-2001 does not define comparison or assignment
+operators for the type
+\fBposix_spawnattr_t\fP.
+.LP
+Each implementation shall document the individual attributes it uses
+and their default values unless these values are defined by
+IEEE\ Std\ 1003.1-2001. Attributes not defined by IEEE\ Std\ 1003.1-2001,
+their default values, and the names of
+the associated functions to get and set those attribute values are
+implementation-defined.
+.LP
+The resulting spawn attributes object (possibly modified by setting
+individual attribute values), is used to modify the behavior
+of \fIposix_spawn\fP() or \fIposix_spawnp\fP(). After a spawn attributes
+object has been used to spawn a process by a
+call to a \fIposix_spawn\fP() or \fIposix_spawnp\fP(), any function
+affecting the attributes object (including destruction)
+shall not affect any process that has been spawned in this way.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIposix_spawnattr_destroy\fP() and \fIposix_spawnattr_init\fP()
+shall return zero; otherwise, an
+error number shall be returned to indicate the error.
+.SH ERRORS
+.LP
+The \fIposix_spawnattr_init\fP() function shall fail if:
+.TP 7
+.B ENOMEM
+Insufficient memory exists to initialize the spawn attributes object.
+.sp
+.LP
+The \fIposix_spawnattr_destroy\fP() function may fail if:
+.TP 7
+.B EINVAL
+The value specified by attr is invalid.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+These functions are part of the Spawn option and need not be provided
+on all implementations.
+.SH RATIONALE
+.LP
+The original spawn interface proposed in IEEE\ Std\ 1003.1-2001 defined
+the attributes that specify the inheritance of
+process attributes across a spawn operation as a structure. In order
+to be able to separate optional individual attributes under
+their appropriate options (that is, the \fIspawn-schedparam\fP and
+\fIspawn-schedpolicy\fP attributes depending upon the Process
+Scheduling option), and also for extensibility and consistency with
+the newer POSIX interfaces, the attributes interface has been
+changed to an opaque data type. This interface now consists of the
+type \fBposix_spawnattr_t\fP, representing a spawn attributes
+object, together with associated functions to initialize or destroy
+the attributes object, and to set or get each individual
+attribute. Although the new object-oriented interface is more verbose
+than the original structure, it is simple to use, more
+extensible, and easy to implement.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIposix_spawn\fP(), \fIposix_spawnattr_getsigdefault\fP(), \fIposix_spawnattr_getflags\fP(),
+\fIposix_spawnattr_getpgroup\fP(), \fIposix_spawnattr_getschedparam\fP(),
+\fIposix_spawnattr_getschedpolicy\fP(), \fIposix_spawnattr_getsigmask\fP(),
+\fIposix_spawnattr_setsigdefault\fP(), \fIposix_spawnattr_setflags\fP(),
+\fIposix_spawnattr_setpgroup\fP(), \fIposix_spawnattr_setsigmask\fP(),
+\fIposix_spawnattr_setschedpolicy\fP(), \fIposix_spawnattr_setschedparam\fP(),
+\fIposix_spawnp\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<spawn.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/posix_spawnattr_setflags.3p b/man-pages-posix-2003/man3p/posix_spawnattr_setflags.3p
new file mode 100644
index 0000000..782ea52
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_spawnattr_setflags.3p
@@ -0,0 +1 @@
+.so man3p/posix_spawnattr_getflags.3p
diff --git a/man-pages-posix-2003/man3p/posix_spawnattr_setpgroup.3p b/man-pages-posix-2003/man3p/posix_spawnattr_setpgroup.3p
new file mode 100644
index 0000000..921fe12
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_spawnattr_setpgroup.3p
@@ -0,0 +1 @@
+.so man3p/posix_spawnattr_getpgroup.3p
diff --git a/man-pages-posix-2003/man3p/posix_spawnattr_setschedparam.3p b/man-pages-posix-2003/man3p/posix_spawnattr_setschedparam.3p
new file mode 100644
index 0000000..f55abc0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_spawnattr_setschedparam.3p
@@ -0,0 +1 @@
+.so man3p/posix_spawnattr_getschedparam.3p
diff --git a/man-pages-posix-2003/man3p/posix_spawnattr_setschedpolicy.3p b/man-pages-posix-2003/man3p/posix_spawnattr_setschedpolicy.3p
new file mode 100644
index 0000000..05d8768
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_spawnattr_setschedpolicy.3p
@@ -0,0 +1 @@
+.so man3p/posix_spawnattr_getschedpolicy.3p
diff --git a/man-pages-posix-2003/man3p/posix_spawnattr_setsigdefault.3p b/man-pages-posix-2003/man3p/posix_spawnattr_setsigdefault.3p
new file mode 100644
index 0000000..b779038
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_spawnattr_setsigdefault.3p
@@ -0,0 +1 @@
+.so man3p/posix_spawnattr_getsigdefault.3p
diff --git a/man-pages-posix-2003/man3p/posix_spawnattr_setsigmask.3p b/man-pages-posix-2003/man3p/posix_spawnattr_setsigmask.3p
new file mode 100644
index 0000000..1bb1865
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_spawnattr_setsigmask.3p
@@ -0,0 +1 @@
+.so man3p/posix_spawnattr_getsigmask.3p
diff --git a/man-pages-posix-2003/man3p/posix_spawnp.3p b/man-pages-posix-2003/man3p/posix_spawnp.3p
new file mode 100644
index 0000000..2ad975d
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_spawnp.3p
@@ -0,0 +1 @@
+.so man3p/posix_spawn.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_attr_destroy.3p b/man-pages-posix-2003/man3p/posix_trace_attr_destroy.3p
new file mode 100644
index 0000000..e94a3c0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_attr_destroy.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_attr_init.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_attr_getclockres.3p b/man-pages-posix-2003/man3p/posix_trace_attr_getclockres.3p
new file mode 100644
index 0000000..b26bc73
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_attr_getclockres.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_attr_getname.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_attr_getcreatetime.3p b/man-pages-posix-2003/man3p/posix_trace_attr_getcreatetime.3p
new file mode 100644
index 0000000..b26bc73
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_attr_getcreatetime.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_attr_getname.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_attr_getgenversion.3p b/man-pages-posix-2003/man3p/posix_trace_attr_getgenversion.3p
new file mode 100644
index 0000000..b26bc73
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_attr_getgenversion.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_attr_getname.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_attr_getinherited.3p b/man-pages-posix-2003/man3p/posix_trace_attr_getinherited.3p
new file mode 100644
index 0000000..fc73dea
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_attr_getinherited.3p
@@ -0,0 +1,233 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POSIX_TRACE_ATTR_GETINHERITED" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" posix_trace_attr_getinherited
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+posix_trace_attr_getinherited, posix_trace_attr_getlogfullpolicy,
+posix_trace_attr_getstreamfullpolicy,
+posix_trace_attr_setinherited, posix_trace_attr_setlogfullpolicy,
+posix_trace_attr_setstreamfullpolicy \- retrieve and set the
+behavior of a trace stream (\fBTRACING\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <trace.h>
+.br
+.sp
+\fP
+.LP
+\fBint posix_trace_attr_getinherited(const trace_attr_t *restrict\fP
+\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ int *restrict\fP \fIinheritancepolicy\fP\fB);
+.br
+\fP
+.LP
+\fBint posix_trace_attr_getlogfullpolicy(const trace_attr_t *restrict\fP
+\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ int *restrict\fP \fIlogpolicy\fP\fB);
+.br
+\fP
+.LP
+\fBint posix_trace_attr_getstreamfullpolicy(const trace_attr_t *\fP\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ int *\fP\fIstreampolicy\fP\fB);
+.br
+\fP
+.LP
+\fBint posix_trace_attr_setinherited(trace_attr_t *\fP\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ int\fP \fIinheritancepolicy\fP\fB);
+.br
+\fP
+.LP
+\fBint posix_trace_attr_setlogfullpolicy(trace_attr_t *\fP\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ int\fP \fIlogpolicy\fP\fB);
+.br
+\fP
+.LP
+\fBint posix_trace_attr_setstreamfullpolicy(trace_attr_t *\fP\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ int\fP \fIstreampolicy\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIposix_trace_attr_getinherited\fP() and \fIposix_trace_attr_setinherited\fP()
+functions, respectively, shall get and set
+the inheritance policy stored in the \fIinheritance\fP attribute for
+traced processes across the \fIfork\fP() and \fIspawn\fP() operations.
+The \fIinheritance\fP attribute of the attributes object
+pointed to by the \fIattr\fP argument shall be set to one of the following
+values defined by manifest constants in the \fI<trace.h>\fP header:
+.TP 7
+POSIX_TRACE_CLOSE_FOR_CHILD
+.sp
+After a \fIfork\fP() or \fIspawn\fP() operation, the child shall not
+be traced, and tracing
+of the parent shall continue.
+.TP 7
+POSIX_TRACE_INHERITED
+.sp
+After a \fIfork\fP() or \fIspawn\fP() operation, if the parent is
+being traced, its child
+shall be concurrently traced using the same trace stream.
+.sp
+.LP
+The default value for the \fIinheritance\fP attribute is POSIX_TRACE_CLOSE_FOR_CHILD.
+.LP
+The \fIposix_trace_attr_getlogfullpolicy\fP() and \fIposix_trace_attr_setlogfullpolicy\fP()
+functions, respectively, shall get
+and set the trace log full policy stored in the \fIlog-full-policy\fP
+attribute of the attributes object pointed to by the
+\fIattr\fP argument.
+.LP
+The \fIlog-full-policy\fP attribute shall be set to one of the following
+values defined by manifest constants in the \fI<trace.h>\fP header:
+.TP 7
+POSIX_TRACE_LOOP
+.sp
+The trace log shall loop until the associated trace stream is stopped.
+This policy means that when the trace log gets full, the
+file system shall reuse the resources allocated to the oldest trace
+events that were recorded. In this way, the trace log will
+always contain the most recent trace events flushed.
+.TP 7
+POSIX_TRACE_UNTIL_FULL
+.sp
+The trace stream shall be flushed to the trace log until the trace
+log is full. This condition can be deduced from the
+\fIposix_log_full_status\fP member status (see the \fBposix_trace_status_info\fP
+structure defined in \fI<trace.h>\fP). The last recorded trace event
+shall be the POSIX_TRACE_STOP trace
+event.
+.TP 7
+POSIX_TRACE_APPEND
+.sp
+The associated trace stream shall be flushed to the trace log without
+log size limitation. If the application specifies
+POSIX_TRACE_APPEND, the implementation shall ignore the \fIlog-max-size\fP
+attribute.
+.sp
+.LP
+The default value for the \fIlog-full-policy\fP attribute is POSIX_TRACE_LOOP.
+.LP
+The \fIposix_trace_attr_getstreamfullpolicy\fP() and \fIposix_trace_attr_setstreamfullpolicy\fP()
+functions, respectively,
+shall get and set the trace stream full policy stored in the \fIstream-full-policy\fP
+attribute of the attributes object pointed
+to by the \fIattr\fP argument.
+.LP
+The \fIstream-full-policy\fP attribute shall be set to one of the
+following values defined by manifest constants in the \fI<trace.h>\fP
+header:
+.TP 7
+POSIX_TRACE_LOOP
+.sp
+The trace stream shall loop until explicitly stopped by the \fIposix_trace_stop\fP()
+function. This policy means that when the trace stream is full,
+the trace system shall reuse the resources allocated to the oldest
+trace events recorded. In this way, the trace stream will always
+contain the most recent trace events recorded.
+.TP 7
+POSIX_TRACE_UNTIL_FULL
+.sp
+The trace stream will run until the trace stream resources are exhausted.
+Then the trace stream will stop. This condition can be
+deduced from \fIposix_stream_status\fP and \fIposix_stream_full_status\fP
+(see the \fBposix_trace_status_info\fP structure
+defined in \fI<trace.h>\fP). When this trace stream is read, a POSIX_TRACE_STOP
+trace
+event shall be reported after reporting the last recorded trace event.
+The trace system shall reuse the resources allocated to any
+trace events already reported-see the \fIposix_trace_getnext_event\fP(),
+\fIposix_trace_trygetnext_event\fP(), and \fIposix_trace_timedgetnext_event\fP()
+functions-or already flushed for an
+active trace stream with log if the Trace Log option is supported;
+see the \fIposix_trace_flush\fP() function. The trace system shall
+restart the trace stream when
+it is empty and may restart it sooner. A POSIX_TRACE_START trace event
+shall be reported before reporting the next recorded trace
+event.
+.TP 7
+POSIX_TRACE_FLUSH
+.sp
+If the Trace Log option is supported, this policy is identical to
+the POSIX_TRACE_UNTIL_FULL trace stream full policy except that
+the trace stream shall be flushed regularly as if \fIposix_trace_flush\fP()
+had
+been explicitly called. Defining this policy for an active trace stream
+without log shall be invalid.
+.sp
+.LP
+The default value for the \fIstream-full-policy\fP attribute shall
+be POSIX_TRACE_LOOP for an active trace stream without
+log.
+.LP
+If the Trace Log option is supported, the default value for the \fIstream-full-policy\fP
+attribute shall be POSIX_TRACE_FLUSH for
+an active trace stream with log.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return a value of
+zero. Otherwise, they shall return the corresponding error
+number.
+.LP
+If successful, the \fIposix_trace_attr_getinherited\fP() function
+shall store the \fIinheritance\fP attribute value in the object
+pointed to by \fIinheritancepolicy\fP. Otherwise, the content of this
+object is undefined.
+.LP
+If successful, the \fIposix_trace_attr_getlogfullpolicy\fP() function
+shall store the \fIlog-full-policy\fP attribute value in
+the object pointed to by \fIlogpolicy\fP. Otherwise, the content of
+this object is undefined.
+.LP
+If successful, the \fIposix_trace_attr_getstreamfullpolicy\fP() function
+shall store the \fIstream-full-policy\fP attribute
+value in the object pointed to by \fIstreampolicy\fP. Otherwise, the
+content of this object is undefined.
+.SH ERRORS
+.LP
+These functions may fail if:
+.TP 7
+.B EINVAL
+The value specified by at least one of the arguments is invalid.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfork\fP(), \fIposix_trace_attr_init\fP(), \fIposix_trace_create\fP(),
+\fIposix_trace_flush\fP(), \fIposix_trace_get_attr\fP(), \fIposix_trace_getnext_event\fP(),
+\fIposix_trace_start\fP(), \fIposix_trace_timedgetnext_event\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<trace.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/posix_trace_attr_getlogfullpolicy.3p b/man-pages-posix-2003/man3p/posix_trace_attr_getlogfullpolicy.3p
new file mode 100644
index 0000000..9d41263
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_attr_getlogfullpolicy.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_attr_getinherited.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_attr_getlogsize.3p b/man-pages-posix-2003/man3p/posix_trace_attr_getlogsize.3p
new file mode 100644
index 0000000..016bf4b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_attr_getlogsize.3p
@@ -0,0 +1,212 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POSIX_TRACE_ATTR_GETLOGSIZE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" posix_trace_attr_getlogsize
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+posix_trace_attr_getlogsize, posix_trace_attr_getmaxdatasize, posix_trace_attr_getmaxsystemeventsize,
+posix_trace_attr_getmaxusereventsize, posix_trace_attr_getstreamsize,
+posix_trace_attr_setlogsize, posix_trace_attr_setmaxdatasize,
+posix_trace_attr_setstreamsize \- retrieve and set trace stream size
+attributes (\fBTRACING\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <sys/types.h>
+.br
+#include <trace.h>
+.br
+.sp
+\fP
+.LP
+\fBint posix_trace_attr_getlogsize(const trace_attr_t *restrict\fP
+\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ size_t *restrict\fP \fIlogsize\fP\fB);
+.br
+\fP
+.LP
+\fBint posix_trace_attr_getmaxdatasize(const trace_attr_t *restrict\fP
+\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ size_t *restrict\fP \fImaxdatasize\fP\fB);
+.br
+int posix_trace_attr_getmaxsystemeventsize(
+.br
+\ \ \ \ \ \ const trace_attr_t *restrict\fP \fIattr\fP\fB,
+.br
+\ \ \ \ \ \ size_t *restrict\fP \fIeventsize\fP\fB);
+.br
+int posix_trace_attr_getmaxusereventsize(
+.br
+\ \ \ \ \ \ const trace_attr_t *restrict\fP \fIattr\fP\fB,
+.br
+\ \ \ \ \ \ size_t\fP \fIdata_len\fP\fB, size_t *restrict\fP \fIeventsize\fP\fB);
+.br
+int posix_trace_attr_getstreamsize(const trace_attr_t *restrict\fP
+\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ size_t *restrict\fP \fIstreamsize\fP\fB);
+.br
+\fP
+.LP
+\fBint posix_trace_attr_setlogsize(trace_attr_t *\fP\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ size_t\fP \fIlogsize\fP\fB);
+.br
+\fP
+.LP
+\fBint posix_trace_attr_setmaxdatasize(trace_attr_t *\fP\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ size_t\fP \fImaxdatasize\fP\fB);
+.br
+int posix_trace_attr_setstreamsize(trace_attr_t *\fP\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ size_t\fP \fIstreamsize\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIposix_trace_attr_getlogsize\fP() function shall copy the log
+size, in bytes, from the \fIlog-max-size\fP attribute of the
+attributes object pointed to by the \fIattr\fP argument into the variable
+pointed to by the \fIlogsize\fP argument. This log size
+is the maximum total of bytes that shall be allocated for system and
+user trace events in the trace log. The default value for the
+\fIlog-max-size\fP attribute is implementation-defined.
+.LP
+The \fIposix_trace_attr_setlogsize\fP() function shall set the maximum
+allowed size, in bytes, in the \fIlog-max-size\fP
+attribute of the attributes object pointed to by the \fIattr\fP argument,
+using the size value supplied by the \fIlogsize\fP
+argument.
+.LP
+The trace log size shall be used if the \fIlog-full-policy\fP attribute
+is set to POSIX_TRACE_LOOP or POSIX_TRACE_UNTIL_FULL.
+If the \fIlog-full-policy\fP attribute is set to POSIX_TRACE_APPEND,
+the implementation shall ignore the \fIlog-max-size\fP
+attribute.
+.LP
+The \fIposix_trace_attr_getmaxdatasize\fP() function shall copy the
+maximum user trace event data size, in bytes, from the
+\fImax-data-size\fP attribute of the attributes object pointed to
+by the \fIattr\fP argument into the variable pointed to by the
+\fImaxdatasize\fP argument. The default value for the \fImax-data-size\fP
+attribute is implementation-defined.
+.LP
+The \fIposix_trace_attr_getmaxsystemeventsize\fP() function shall
+calculate the maximum memory size, in bytes, required to
+store a single system trace event. This value is calculated for the
+trace stream attributes object pointed to by the \fIattr\fP
+argument and is returned in the variable pointed to by the \fIeventsize\fP
+argument.
+.LP
+The values returned as the maximum memory sizes of the user and system
+trace events shall be such that if the sum of the maximum
+memory sizes of a set of the trace events that may be recorded in
+a trace stream is less than or equal to the
+\fIstream-min-size\fP attribute of that trace stream, the system provides
+the necessary resources for recording all those trace
+events, without loss.
+.LP
+The \fIposix_trace_attr_getmaxusereventsize\fP() function shall calculate
+the maximum memory size, in bytes, required to store
+a single user trace event generated by a call to \fIposix_trace_event\fP()
+with
+a \fIdata_len\fP parameter equal to the \fIdata_len\fP value specified
+in this call. This value is calculated for the trace
+stream attributes object pointed to by the \fIattr\fP argument and
+is returned in the variable pointed to by the \fIeventsize\fP
+argument.
+.LP
+The \fIposix_trace_attr_getstreamsize\fP() function shall copy the
+stream size, in bytes, from the \fIstream-min-size\fP
+attribute of the attributes object pointed to by the \fIattr\fP argument
+into the variable pointed to by the \fIstreamsize\fP
+argument.
+.LP
+This stream size is the current total memory size reserved for system
+and user trace events in the trace stream. The default
+value for the \fIstream-min-size\fP attribute is implementation-defined.
+The stream size refers to memory used to store trace
+event records. Other stream data (for example, trace attribute values)
+shall not be included in this size.
+.LP
+The \fIposix_trace_attr_setmaxdatasize\fP() function shall set the
+maximum allowed size, in bytes, in the \fImax-data-size\fP
+attribute of the attributes object pointed to by the \fIattr\fP argument,
+using the size value supplied by the \fImaxdatasize\fP
+argument. This maximum size is the maximum allowed size for the user
+data argument which may be passed to \fIposix_trace_event\fP(). The
+implementation shall be allowed to truncate data passed
+to \fItrace_user_event\fP which is longer than \fImaxdatasize\fP.
+.LP
+The \fIposix_trace_attr_setstreamsize\fP() function shall set the
+minimum allowed size, in bytes, in the \fIstream-min-size\fP
+attribute of the attributes object pointed to by the \fIattr\fP argument,
+using the size value supplied by the \fIstreamsize\fP
+argument.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return a value of
+zero. Otherwise, they shall return the corresponding error
+number.
+.LP
+The \fIposix_trace_attr_getlogsize\fP() function stores the maximum
+trace log allowed size in the object pointed to by
+\fIlogsize\fP, if successful.
+.LP
+The \fIposix_trace_attr_getmaxdatasize\fP() function stores the maximum
+trace event record memory size in the object pointed to
+by \fImaxdatasize\fP, if successful.
+.LP
+The \fIposix_trace_attr_getmaxsystemeventsize\fP() function stores
+the maximum memory size to store a single system trace event
+in the object pointed to by \fIeventsize\fP, if successful.
+.LP
+The \fIposix_trace_attr_getmaxusereventsize\fP() function stores the
+maximum memory size to store a single user trace event in
+the object pointed to by \fIeventsize\fP, if successful.
+.LP
+The \fIposix_trace_attr_getstreamsize\fP() function stores the maximum
+trace stream allowed size in the object pointed to by
+\fIstreamsize\fP, if successful.
+.SH ERRORS
+.LP
+These functions may fail if:
+.TP 7
+.B EINVAL
+The value specified by one of the arguments is invalid.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIposix_trace_attr_init\fP(), \fIposix_trace_create\fP(), \fIposix_trace_event\fP(),
+\fIposix_trace_get_attr\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<sys/types.h>\fP, \fI<trace.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/posix_trace_attr_getmaxdatasize.3p b/man-pages-posix-2003/man3p/posix_trace_attr_getmaxdatasize.3p
new file mode 100644
index 0000000..bac62e2
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_attr_getmaxdatasize.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_attr_getlogsize.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_attr_getmaxsystemeventsize.3p b/man-pages-posix-2003/man3p/posix_trace_attr_getmaxsystemeventsize.3p
new file mode 100644
index 0000000..bac62e2
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_attr_getmaxsystemeventsize.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_attr_getlogsize.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_attr_getmaxusereventsize.3p b/man-pages-posix-2003/man3p/posix_trace_attr_getmaxusereventsize.3p
new file mode 100644
index 0000000..bac62e2
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_attr_getmaxusereventsize.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_attr_getlogsize.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_attr_getname.3p b/man-pages-posix-2003/man3p/posix_trace_attr_getname.3p
new file mode 100644
index 0000000..dde0b40
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_attr_getname.3p
@@ -0,0 +1,146 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POSIX_TRACE_ATTR_GETCLOCKRES" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" posix_trace_attr_getclockres
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+posix_trace_attr_getclockres, posix_trace_attr_getcreatetime, posix_trace_attr_getgenversion,
+posix_trace_attr_getname,
+posix_trace_attr_setname \- retrieve and set information about a trace
+stream (\fBTRACING\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <time.h>
+.br
+#include <trace.h>
+.br
+.sp
+int posix_trace_attr_getclockres(const trace_attr_t *\fP\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ struct timespec *\fP\fIresolution\fP\fB);
+.br
+int posix_trace_attr_getcreatetime(const trace_attr_t *\fP\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ struct timespec *\fP\fIcreatetime\fP\fB);
+.br
+.sp
+.sp
+#include <trace.h>
+.br
+int posix_trace_attr_getgenversion(const trace_attr_t *\fP\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ char *\fP\fIgenversion\fP\fB);
+.br
+int posix_trace_attr_getname(const trace_attr_t *\fP\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ char *\fP\fItracename\fP\fB);
+.br
+int posix_trace_attr_setname(trace_attr_t *\fP\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ const char *\fP\fItracename\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIposix_trace_attr_getclockres\fP() function shall copy the clock
+resolution of the clock used to generate timestamps from
+the \fIclock-resolution\fP attribute of the attributes object pointed
+to by the \fIattr\fP argument into the structure pointed to
+by the \fIresolution\fP argument.
+.LP
+The \fIposix_trace_attr_getcreatetime\fP() function shall copy the
+trace stream creation time from the \fIcreation-time\fP
+attribute of the attributes object pointed to by the \fIattr\fP argument
+into the structure pointed to by the \fIcreatetime\fP
+argument. The \fIcreation-time\fP attribute shall represent the time
+of creation of the trace stream.
+.LP
+The \fIposix_trace_attr_getgenversion\fP() function shall copy the
+string containing version information from the
+\fIgeneration-version\fP attribute of the attributes object pointed
+to by the \fIattr\fP argument into the string pointed to by
+the \fIgenversion\fP argument. The \fIgenversion\fP argument shall
+be the address of a character array which can store at least
+{TRACE_NAME_MAX} characters.
+.LP
+The \fIposix_trace_attr_getname\fP() function shall copy the string
+containing the trace name from the \fItrace-name\fP
+attribute of the attributes object pointed to by the \fIattr\fP argument
+into the string pointed to by the \fItracename\fP
+argument. The \fItracename\fP argument shall be the address of a character
+array which can store at least {TRACE_NAME_MAX}
+characters.
+.LP
+The \fIposix_trace_attr_setname\fP() function shall set the name in
+the \fItrace-name\fP attribute of the attributes object
+pointed to by the \fIattr\fP argument, using the trace name string
+supplied by the \fItracename\fP argument. If the supplied
+string contains more than {TRACE_NAME_MAX} characters, the name copied
+into the \fItrace-name\fP attribute may be truncated to one
+less than the length of {TRACE_NAME_MAX} characters. The default value
+is a null string.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return a value of
+zero. Otherwise, they shall return the corresponding error
+number.
+.LP
+If successful, the \fIposix_trace_attr_getclockres\fP() function stores
+the \fIclock-resolution\fP attribute value in the
+object pointed to by \fIresolution\fP. Otherwise, the content of this
+object is unspecified.
+.LP
+If successful, the \fIposix_trace_attr_getcreatetime\fP() function
+stores the trace stream creation time in the object pointed
+to by \fIcreatetime\fP. Otherwise, the content of this object is unspecified.
+.LP
+If successful, the \fIposix_trace_attr_getgenversion\fP() function
+stores the trace version information in the string pointed
+to by \fIgenversion\fP. Otherwise, the content of this string is unspecified.
+.LP
+If successful, the \fIposix_trace_attr_getname\fP() function stores
+the trace name in the string pointed to by
+\fItracename\fP. Otherwise, the content of this string is unspecified.
+.SH ERRORS
+.LP
+The \fIposix_trace_attr_getclockres\fP(), \fIposix_trace_attr_getcreatetime\fP(),
+\fIposix_trace_attr_getgenversion\fP(), and
+\fIposix_trace_attr_getname\fP() functions may fail if:
+.TP 7
+.B EINVAL
+The value specified by one of the arguments is invalid.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIposix_trace_attr_init\fP(), \fIposix_trace_create\fP(), \fIposix_trace_get_attr\fP()
+,
+\fIuname\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<time.h>\fP, \fI<trace.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/posix_trace_attr_getstreamfullpolicy.3p b/man-pages-posix-2003/man3p/posix_trace_attr_getstreamfullpolicy.3p
new file mode 100644
index 0000000..9d41263
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_attr_getstreamfullpolicy.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_attr_getinherited.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_attr_getstreamsize.3p b/man-pages-posix-2003/man3p/posix_trace_attr_getstreamsize.3p
new file mode 100644
index 0000000..bac62e2
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_attr_getstreamsize.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_attr_getlogsize.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_attr_init.3p b/man-pages-posix-2003/man3p/posix_trace_attr_init.3p
new file mode 100644
index 0000000..87b2496
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_attr_init.3p
@@ -0,0 +1,104 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POSIX_TRACE_ATTR_DESTROY" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" posix_trace_attr_destroy
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+posix_trace_attr_destroy, posix_trace_attr_init \- destroy and initialize
+the trace stream attributes object
+(\fBTRACING\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <trace.h>
+.br
+.sp
+int posix_trace_attr_destroy(trace_attr_t *\fP\fIattr\fP\fB);
+.br
+int posix_trace_attr_init(trace_attr_t *\fP\fIattr\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIposix_trace_attr_destroy\fP() function shall destroy an initialized
+trace attributes object. A destroyed \fIattr\fP
+attributes object can be reinitialized using \fIposix_trace_attr_init\fP();
+the results of otherwise referencing the object after
+it has been destroyed are undefined.
+.LP
+The \fIposix_trace_attr_init\fP() function shall initialize a trace
+attributes object \fIattr\fP with the default value for
+all of the individual attributes used by a given implementation. The
+read-only \fIgeneration-version\fP and
+\fIclock-resolution\fP attributes of the newly initialized trace attributes
+object shall be set to their appropriate values (see
+\fITrace Stream Attributes\fP ).
+.LP
+Results are undefined if \fIposix_trace_attr_init\fP() is called specifying
+an already initialized \fIattr\fP attributes
+object.
+.LP
+Implementations may add extensions to the trace attributes object
+structure as permitted in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 2, Conformance.
+.LP
+The resulting attributes object (possibly modified by setting individual
+attributes values), when used by \fIposix_trace_create\fP(), defines
+the attributes of the trace stream created. A
+single attributes object can be used in multiple calls to \fIposix_trace_create\fP().
+After one or more trace streams have been created using an
+attributes object, any function affecting that attributes object,
+including destruction, shall not affect any trace stream
+previously created. An initialized attributes object also serves to
+receive the attributes of an existing trace stream or trace log
+when calling the \fIposix_trace_get_attr\fP() function.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return a value of
+zero. Otherwise, they shall return the corresponding error
+number.
+.SH ERRORS
+.LP
+The \fIposix_trace_attr_destroy\fP() function may fail if:
+.TP 7
+.B EINVAL
+The value of \fIattr\fP is invalid.
+.sp
+.LP
+The \fIposix_trace_attr_init\fP() function shall fail if:
+.TP 7
+.B ENOMEM
+Insufficient memory exists to initialize the trace attributes object.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIposix_trace_create\fP(), \fIposix_trace_get_attr\fP(), \fIuname\fP(),
+the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<trace.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/posix_trace_attr_setinherited.3p b/man-pages-posix-2003/man3p/posix_trace_attr_setinherited.3p
new file mode 100644
index 0000000..9d41263
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_attr_setinherited.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_attr_getinherited.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_attr_setlogfullpolicy.3p b/man-pages-posix-2003/man3p/posix_trace_attr_setlogfullpolicy.3p
new file mode 100644
index 0000000..9d41263
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_attr_setlogfullpolicy.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_attr_getinherited.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_attr_setlogsize.3p b/man-pages-posix-2003/man3p/posix_trace_attr_setlogsize.3p
new file mode 100644
index 0000000..bac62e2
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_attr_setlogsize.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_attr_getlogsize.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_attr_setmaxdatasize.3p b/man-pages-posix-2003/man3p/posix_trace_attr_setmaxdatasize.3p
new file mode 100644
index 0000000..bac62e2
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_attr_setmaxdatasize.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_attr_getlogsize.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_attr_setname.3p b/man-pages-posix-2003/man3p/posix_trace_attr_setname.3p
new file mode 100644
index 0000000..b26bc73
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_attr_setname.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_attr_getname.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_attr_setstreamfullpolicy.3p b/man-pages-posix-2003/man3p/posix_trace_attr_setstreamfullpolicy.3p
new file mode 100644
index 0000000..9d41263
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_attr_setstreamfullpolicy.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_attr_getinherited.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_attr_setstreamsize.3p b/man-pages-posix-2003/man3p/posix_trace_attr_setstreamsize.3p
new file mode 100644
index 0000000..bac62e2
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_attr_setstreamsize.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_attr_getlogsize.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_clear.3p b/man-pages-posix-2003/man3p/posix_trace_clear.3p
new file mode 100644
index 0000000..3b8ba33
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_clear.3p
@@ -0,0 +1,103 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POSIX_TRACE_CLEAR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" posix_trace_clear
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+posix_trace_clear \- clear trace stream and trace log (\fBTRACING\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <sys/types.h>
+.br
+#include <trace.h>
+.br
+.sp
+int posix_trace_clear(trace_id_t\fP \fItrid\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIposix_trace_clear\fP() function shall reinitialize the trace
+stream identified by the argument \fItrid\fP as if it were
+returning from the \fIposix_trace_create\fP() function, except that
+the same
+allocated resources shall be reused, the mapping of trace event type
+identifiers to trace event names shall be unchanged, and the
+trace stream status shall remain unchanged (that is, if it was running,
+it remains running and if it was suspended, it remains
+suspended).
+.LP
+All trace events in the trace stream recorded before the call to \fIposix_trace_clear\fP()
+shall be lost. The
+\fIposix_stream_full_status\fP status shall be set to POSIX_TRACE_NOT_FULL.
+There is no guarantee that all trace events that
+occurred during the \fIposix_trace_clear\fP() call are recorded; the
+behavior with respect to trace points that may occur during
+this call is unspecified.
+.LP
+If the Trace Log option is supported and the trace stream has been
+created with a log, the \fIposix_trace_clear\fP() function
+shall reinitialize the trace stream with the same behavior as if the
+trace stream was created without the log, plus it shall
+reinitialize the trace log associated with the trace stream identified
+by the argument \fItrid\fP as if it were returning from the
+\fIposix_trace_create_withlog\fP() function, except that the same
+allocated resources, for the trace log, may be reused and the associated
+trace stream status remains unchanged. The first trace
+event recorded in the trace log after the call to \fIposix_trace_clear\fP()
+shall be the same as the first trace event recorded in
+the active trace stream after the call to \fIposix_trace_clear\fP().
+The \fIposix_log_full_status\fP status shall be set to
+POSIX_TRACE_NOT_FULL. There is no guarantee that all trace events
+that occurred during the \fIposix_trace_clear\fP() call are
+recorded in the trace log; the behavior with respect to trace points
+that may occur during this call is unspecified. If the log
+full policy is POSIX_TRACE_APPEND, the effect of a call to this function
+is unspecified for the trace log associated with the trace
+stream identified by the \fItrid\fP argument.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIposix_trace_clear\fP() function
+shall return a value of zero. Otherwise, it shall return the
+corresponding error number.
+.SH ERRORS
+.LP
+The \fIposix_trace_clear\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The value of the \fItrid\fP argument does not correspond to an active
+trace stream.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIposix_trace_attr_init\fP(), \fIposix_trace_create\fP(), \fIposix_trace_flush\fP(),
+\fIposix_trace_get_attr\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<sys/types.h>\fP, \fI<trace.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/posix_trace_close.3p b/man-pages-posix-2003/man3p/posix_trace_close.3p
new file mode 100644
index 0000000..a42c3ab
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_close.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_open.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_create.3p b/man-pages-posix-2003/man3p/posix_trace_create.3p
new file mode 100644
index 0000000..ebcd8b6
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_create.3p
@@ -0,0 +1,386 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POSIX_TRACE_CREATE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" posix_trace_create
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+posix_trace_create, posix_trace_create_withlog, posix_trace_flush,
+posix_trace_shutdown \- trace stream initialization,
+flush, and shutdown from a process (\fBTRACING\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <sys/types.h>
+.br
+#include <trace.h>
+.br
+.sp
+int posix_trace_create(pid_t\fP \fIpid\fP\fB,
+.br
+\ \ \ \ \ \ const trace_attr_t *restrict\fP \fIattr\fP\fB,
+.br
+\ \ \ \ \ \ trace_id_t *restrict\fP \fItrid\fP\fB);
+.br
+\fP
+.LP
+\fBint posix_trace_create_withlog(pid_t\fP \fIpid\fP\fB,
+.br
+\ \ \ \ \ \ const trace_attr_t *restrict\fP \fIattr\fP\fB, int\fP
+\fIfile_desc\fP\fB,
+.br
+\ \ \ \ \ \ trace_id_t *restrict\fP \fItrid\fP\fB);
+.br
+int posix_trace_flush(trace_id_t\fP \fItrid\fP\fB);
+.br
+\fP
+.LP
+\fBint posix_trace_shutdown(trace_id_t\fP \fItrid\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIposix_trace_create\fP() function shall create an active trace
+stream. It allocates all the resources needed by the trace
+stream being created for tracing the process specified by \fIpid\fP
+in accordance with the \fIattr\fP argument. The \fIattr\fP
+argument represents the initial attributes of the trace stream and
+shall have been initialized by the function \fIposix_trace_attr_init\fP()
+prior to the \fIposix_trace_create\fP() call. If the
+argument \fIattr\fP is NULL, the default attributes shall be used.
+The \fIattr\fP attributes object shall be manipulated through
+a set of functions described in the \fIposix_trace_attr\fP family
+of functions. If the attributes of the object pointed to by
+\fIattr\fP are modified later, the attributes of the trace stream
+shall not be affected. The \fIcreation-time\fP attribute of the
+newly created trace stream shall be set to the value of the system
+clock, if the Timers option is not supported, or to the value of
+the CLOCK_REALTIME clock, if the Timers option is supported.
+.LP
+The \fIpid\fP argument represents the target process to be traced.
+If the process executing this function does not have
+appropriate privileges to trace the process identified by \fIpid\fP,
+an error shall be returned. If the \fIpid\fP argument is
+zero, the calling process shall be traced.
+.LP
+The \fIposix_trace_create\fP() function shall store the trace stream
+identifier of the new trace stream in the object pointed
+to by the \fItrid\fP argument. This trace stream identifier shall
+be used in subsequent calls to control tracing. The \fItrid\fP
+argument may only be used by the following functions:
+.TS C
+center; lw(39) lw(39).
+T{
+.br
+\fIposix_trace_clear\fP()
+.br
+\fIposix_trace_eventid_equal\fP()
+.br
+\fIposix_trace_eventid_get_name\fP()
+.br
+\fIposix_trace_eventtypelist_getnext_id\fP()
+.br
+\fIposix_trace_eventtypelist_rewind\fP()
+.br
+\fIposix_trace_get_attr\fP()
+.br
+\fIposix_trace_get_status\fP()
+.br
+\
+T} T{
+.br
+\fIposix_trace_getnext_event\fP()
+.br
+\fIposix_trace_shutdown\fP()
+.br
+\fIposix_trace_start\fP()
+.br
+\fIposix_trace_stop\fP()
+.br
+\fIposix_trace_timedgetnext_event\fP()
+.br
+\fIposix_trace_trid_eventid_open\fP()
+.br
+\fIposix_trace_trygetnext_event\fP()
+.br
+\
+T}
+.TE
+.LP
+If the Trace Event Filter option is supported, the following additional
+functions may use the \fItrid\fP argument:
+.TS C
+center; l2 l.
+\fIposix_trace_get_filter\fP() \ \fIposix_trace_set_filter\fP() \
+.TE
+.LP
+In particular, notice that the operations normally used by a trace
+analyzer process, such as \fIposix_trace_rewind\fP() or \fIposix_trace_close\fP(),
+cannot be invoked using the trace stream identifier returned
+by the \fIposix_trace_create\fP() function.
+.LP
+A trace stream shall be created in a suspended state. If the Trace
+Event Filter option is supported, its trace event
+type filter shall be empty.
+.LP
+The \fIposix_trace_create\fP() function may be called multiple times
+from the same or different processes, with the system-wide
+limit indicated by the runtime invariant value {TRACE_SYS_MAX}, which
+has the minimum value {_POSIX_TRACE_SYS_MAX}.
+.LP
+The trace stream identifier returned by the \fIposix_trace_create\fP()
+function in the argument pointed to by \fItrid\fP is
+valid only in the process that made the function call. If it is used
+from another process, that is a child process, in functions
+defined in IEEE\ Std\ 1003.1-2001, these functions shall return with
+the error [EINVAL].
+.LP
+The \fIposix_trace_create_withlog\fP() function shall be equivalent
+to \fIposix_trace_create\fP(), except that it associates a
+trace log with this stream. The \fIfile_desc\fP argument shall be
+the file descriptor designating the trace log destination. The
+function shall fail if this file descriptor refers to a file with
+a file type that is not compatible with the log policy associated
+with the trace log. The list of the appropriate file types that are
+compatible with each log policy is implementation-defined.
+.LP
+The \fIposix_trace_create_withlog\fP() function shall return in the
+parameter pointed to by \fItrid\fP the trace stream
+identifier, which uniquely identifies the newly created trace stream,
+and shall be used in subsequent calls to control tracing. The
+\fItrid\fP argument may only be used by the following functions:
+.TS C
+center; lw(39) lw(39).
+T{
+.br
+\fIposix_trace_clear\fP()
+.br
+\fIposix_trace_eventid_equal\fP()
+.br
+\fIposix_trace_eventid_get_name\fP()
+.br
+\fIposix_trace_eventtypelist_getnext_id\fP()
+.br
+\fIposix_trace_eventtypelist_rewind\fP()
+.br
+\fIposix_trace_flush\fP()
+.br
+\fIposix_trace_get_attr\fP()
+.br
+\fIposix_trace_get_status\fP()
+.br
+\
+T} T{
+.br
+\fIposix_trace_getnext_event\fP()
+.br
+\fIposix_trace_shutdown\fP()
+.br
+\fIposix_trace_start\fP()
+.br
+\fIposix_trace_stop\fP()
+.br
+\fIposix_trace_timedgetnext_event\fP()
+.br
+\fIposix_trace_trid_eventid_open\fP()
+.br
+\fIposix_trace_trygetnext_event\fP()
+.br
+\
+T}
+.TE
+.LP
+If the Trace Event Filter option is supported, the following additional
+functions may use the \fItrid\fP argument:
+.TS C
+center; l2 l.
+\fIposix_trace_get_filter\fP() \ \fIposix_trace_set_filter\fP() \
+.TE
+.LP
+In particular, notice that the operations normally used by a trace
+analyzer process, such as \fIposix_trace_rewind\fP() or \fIposix_trace_close\fP(),
+cannot be invoked using the trace stream identifier returned
+by the \fIposix_trace_create_withlog\fP() function.
+.LP
+The \fIposix_trace_flush\fP() function shall initiate a flush operation
+which copies the contents of the trace stream
+identified by the argument \fItrid\fP into the trace log associated
+with the trace stream at the creation time. If no trace log
+has been associated with the trace stream pointed to by \fItrid\fP,
+this function shall return an error. The termination of the
+flush operation can be polled by the \fIposix_trace_get_status\fP()
+function. During the flush operation, it shall be possible to trace
+new trace events up to the point when the trace stream becomes
+full. After flushing is completed, the space used by the flushed trace
+events shall be available for tracing new trace events.
+.LP
+If flushing the trace stream causes the resulting trace log to become
+full, the trace log full policy shall be applied. If the
+trace \fIlog-full-policy\fP attribute is set, the following occurs:
+.TP 7
+POSIX_TRACE_UNTIL_FULL
+.sp
+The trace events that have not yet been flushed shall be discarded.
+.TP 7
+POSIX_TRACE_LOOP
+.sp
+The trace events that have not yet been flushed shall be written to
+the beginning of the trace log, overwriting previous trace
+events stored there.
+.TP 7
+POSIX_TRACE_APPEND
+.sp
+The trace events that have not yet been flushed shall be appended
+to the trace log.
+.sp
+.LP
+The \fIposix_trace_shutdown\fP() function shall stop the tracing of
+trace events in the trace stream identified by \fItrid\fP,
+as if \fIposix_trace_stop\fP() had been invoked. The
+\fIposix_trace_shutdown\fP() function shall free all the resources
+associated with the trace stream.
+.LP
+The \fIposix_trace_shutdown\fP() function shall not return until all
+the resources associated with the trace stream have been
+freed. When the \fIposix_trace_shutdown\fP() function returns, the
+\fItrid\fP argument becomes an invalid trace stream
+identifier. A call to this function shall unconditionally deallocate
+the resources regardless of whether all trace events have been
+retrieved by the analyzer process. Any thread blocked on one of the
+\fItrace_getnext_event\fP() functions (which specified this
+\fItrid\fP) before this call is unblocked with the error [EINVAL].
+.LP
+If the process exits, invokes a member of the \fIexec\fP family of
+functions, or is
+terminated, the trace streams that the process had created and that
+have not yet been shut down, shall be automatically shut down
+as if an explicit call were made to the \fIposix_trace_shutdown\fP()
+function.
+.LP
+For an active trace stream with log, when the \fIposix_trace_shutdown\fP()
+function is called, all trace events that have not yet
+been flushed to the trace log shall be flushed, as in the \fIposix_trace_flush\fP()
+function, and the trace log shall be
+closed.
+.LP
+When a trace log is closed, all the information that may be retrieved
+later from the trace log through the trace interface shall
+have been written to the trace log. This information includes the
+trace attributes, the list of trace event types (with the mapping
+between trace event names and trace event type identifiers), and the
+trace status.
+.LP
+In addition, unspecified information shall be written to the trace
+log to allow detection of a valid trace log during the \fIposix_trace_open\fP()
+operation.
+.LP
+The \fIposix_trace_shutdown\fP() function shall not return until all
+trace events have been flushed.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return a value of
+zero. Otherwise, they shall return the corresponding error
+number.
+.LP
+The \fIposix_trace_create\fP() and \fIposix_trace_create_withlog\fP()
+\ functions store the trace stream identifier value in the object
+pointed to by \fItrid\fP, if
+successful.
+.SH ERRORS
+.LP
+The \fIposix_trace_create\fP() and \fIposix_trace_create_withlog\fP()
+\ functions shall fail if:
+.TP 7
+.B EAGAIN
+No more trace streams can be started now. {TRACE_SYS_MAX} has been
+exceeded.
+.TP 7
+.B EINTR
+The operation was interrupted by a signal. No trace stream was created.
+.TP 7
+.B EINVAL
+One or more of the trace parameters specified by the \fIattr\fP parameter
+is invalid.
+.TP 7
+.B ENOMEM
+The implementation does not currently have sufficient memory to create
+the trace stream with the specified parameters.
+.TP 7
+.B EPERM
+The caller does not have appropriate privilege to trace the process
+specified by \fIpid\fP.
+.TP 7
+.B ESRCH
+The \fIpid\fP argument does not refer to an existing process.
+.sp
+.LP
+The \fIposix_trace_create_withlog\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fIfile_desc\fP argument is not a valid file descriptor open for
+writing.
+.TP 7
+.B EINVAL
+The \fIfile_desc\fP argument refers to a file with a file type that
+does not support the log policy associated with the trace
+log.
+.TP 7
+.B ENOSPC
+No space left on device. The device corresponding to the argument
+\fIfile_desc\fP does not contain the space required to
+create this trace log.
+.sp
+.LP
+The \fIposix_trace_flush\fP() and
+\fIposix_trace_shutdown\fP() functions shall fail if:
+.TP 7
+.B EINVAL
+The value of the \fItrid\fP argument does not correspond to an active
+trace stream with log.
+.TP 7
+.B EFBIG
+The trace log file has attempted to exceed an implementation-defined
+maximum file size.
+.TP 7
+.B ENOSPC
+No space left on device.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIclock_getres\fP(), \fIexec\fP(), \fIposix_trace_attr_init\fP(),
+\fIposix_trace_clear\fP(), \fIposix_trace_close\fP(), \fIposix_trace_eventid_equal\fP(),
+\fIposix_trace_eventtypelist_getnext_id\fP(), \fIposix_trace_flush\fP(),
+\fIposix_trace_get_attr\fP(),
+\fIposix_trace_get_filter\fP(), \fIposix_trace_get_status\fP(),
+\fIposix_trace_getnext_event\fP(), \fIposix_trace_open\fP(), \fIposix_trace_set_filter\fP()
+,
+\fIposix_trace_shutdown\fP(), \fIposix_trace_start\fP(), \fIposix_trace_timedgetnext_event\fP(),
+\fIposix_trace_trid_eventid_open\fP(), \fIposix_trace_start\fP(),
+\fItime\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<sys/types.h>\fP, \fI<trace.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/posix_trace_create_withlog.3p b/man-pages-posix-2003/man3p/posix_trace_create_withlog.3p
new file mode 100644
index 0000000..fe471c7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_create_withlog.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_create.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_event.3p b/man-pages-posix-2003/man3p/posix_trace_event.3p
new file mode 100644
index 0000000..46e3147
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_event.3p
@@ -0,0 +1,143 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POSIX_TRACE_EVENT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" posix_trace_event
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+posix_trace_event, posix_trace_eventid_open \- trace functions for
+instrumenting application code
+(\fBTRACING\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <sys/types.h>
+.br
+#include <trace.h>
+.br
+.sp
+void posix_trace_event(trace_event_id_t\fP \fIevent_id\fP\fB,
+.br
+\ \ \ \ \ \ const void *restrict\fP\fIdata_ptr\fP\fB, size_t\fP \fIdata_len\fP\fB);
+.br
+int posix_trace_eventid_open(const char *restrict\fP \fIevent_name\fP\fB,
+.br
+\ \ \ \ \ \ trace_event_id_t *restrict\fP \fIevent_id\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIposix_trace_event\fP() function shall record the \fIevent_id\fP
+and the user data pointed to by \fIdata_ptr\fP in the
+trace stream into which the calling process is being traced and in
+which \fIevent_id\fP is not filtered out. If the total size of
+the user trace event data represented by \fIdata_len\fP is not greater
+than the declared maximum size for user trace event data,
+then the \fItruncation-status\fP attribute of the trace event recorded
+is POSIX_TRACE_NOT_TRUNCATED. Otherwise, the user trace
+event data is truncated to this declared maximum size and the \fItruncation-status\fP
+attribute of the trace event recorded is
+POSIX_TRACE_TRUNCATED_RECORD.
+.LP
+If there is no trace stream created for the process or if the created
+trace stream is not running, or if the trace event
+specified by \fIevent_id\fP is filtered out in the trace stream, the
+\fIposix_trace_event\fP() function shall have no effect.
+.LP
+The \fIposix_trace_eventid_open\fP() function shall associate a user
+trace event name with a trace event type identifier for
+the calling process. The trace event name is the string pointed to
+by the argument \fIevent_name\fP. It shall have a maximum of
+{TRACE_EVENT_NAME_MAX} characters (which has the minimum value {_POSIX_TRACE_EVENT_NAME_MAX}).
+The number of user trace event type
+identifiers that can be defined for any given process is limited by
+the maximum value {TRACE_USER_EVENT_MAX}, which has the minimum
+value {POSIX_TRACE_USER_EVENT_MAX}.
+.LP
+If the Trace Inherit option is not supported, the \fIposix_trace_eventid_open\fP()
+function shall associate the user trace
+event name pointed to by the \fIevent_name\fP argument with a trace
+event type identifier that is unique for the traced process,
+and is returned in the variable pointed to by the \fIevent_id\fP argument.
+If the user trace event name has already been mapped
+for the traced process, then the previously assigned trace event type
+identifier shall be returned. If the per-process user trace
+event name limit represented by {TRACE_USER_EVENT_MAX} has been reached,
+the pre-defined POSIX_TRACE_UNNAMED_USEREVENT (see \fITrace Option:
+User Trace Event\fP ) user trace event shall be returned.
+.LP
+If the Trace Inherit option is supported, the \fIposix_trace_eventid_open\fP()
+function shall associate the user trace event name
+pointed to by the \fIevent_name\fP argument with a trace event type
+identifier that is unique for all the processes being traced
+in this same trace stream, and is returned in the variable pointed
+to by the \fIevent_id\fP argument. If the user trace event name
+has already been mapped for the traced processes, then the previously
+assigned trace event type identifier shall be returned. If
+the per-process user trace event name limit represented by {TRACE_USER_EVENT_MAX}
+has been reached, the pre-defined
+POSIX_TRACE_UNNAMED_USEREVENT ( \fITrace Option: User Trace Event\fP
+) user trace event
+shall be returned.
+.TP 7
+\fBNote:\fP
+The above procedure, together with the fact that multiple processes
+can only be traced into the same trace stream by
+inheritance, ensure that all the processes that are traced into a
+trace stream have the same mapping of trace event names to trace
+event type identifiers.
+.sp
+.LP
+If there is no trace stream created, the \fIposix_trace_eventid_open\fP()
+function shall store this information for future
+trace streams created for this process.
+.SH RETURN VALUE
+.LP
+No return value is defined for the \fIposix_trace_event\fP() function.
+.LP
+Upon successful completion, the \fIposix_trace_eventid_open\fP() function
+shall return a value of zero. Otherwise, it shall
+return the corresponding error number. The \fIposix_trace_eventid_open\fP()
+function stores the trace event type identifier value
+in the object pointed to by \fIevent_id\fP, if successful.
+.SH ERRORS
+.LP
+The \fIposix_trace_eventid_open\fP() function shall fail if:
+.TP 7
+.B ENAMETOOLONG
+The size of the name pointed to by the \fIevent_name\fP argument was
+longer than the implementation-defined value
+{TRACE_EVENT_NAME_MAX}.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fITrace Option: User Trace Event\fP, \fIposix_trace_start\fP(),
+\fIposix_trace_trid_eventid_open\fP(), the Base Definitions volume
+of
+IEEE\ Std\ 1003.1-2001, \fI<sys/types.h>\fP, \fI<trace.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/posix_trace_eventid_equal.3p b/man-pages-posix-2003/man3p/posix_trace_eventid_equal.3p
new file mode 100644
index 0000000..9e4d863
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_eventid_equal.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_eventid_get_name.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_eventid_get_name.3p b/man-pages-posix-2003/man3p/posix_trace_eventid_get_name.3p
new file mode 100644
index 0000000..8b6ef8f
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_eventid_get_name.3p
@@ -0,0 +1,171 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POSIX_TRACE_EVENTID_EQUAL" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" posix_trace_eventid_equal
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+posix_trace_eventid_equal, posix_trace_eventid_get_name, posix_trace_trid_eventid_open
+\- manipulate the trace event
+type identifier (\fBTRACING\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <trace.h>
+.br
+.sp
+int posix_trace_eventid_equal(trace_id_t\fP \fItrid\fP\fB, trace_event_id_t\fP
+\fIevent1\fP\fB,
+.br
+\ \ \ \ \ \ trace_event_id_t\fP \fIevent2\fP\fB);
+.br
+int posix_trace_eventid_get_name(trace_id_t\fP \fItrid\fP\fB,
+.br
+\ \ \ \ \ \ trace_event_id_t\fP \fIevent\fP\fB, char *\fP\fIevent_name\fP\fB);
+.br
+\fP
+.LP
+\fBint posix_trace_trid_eventid_open(trace_id_t\fP \fItrid\fP\fB,
+.br
+\ \ \ \ \ \ const char *restrict\fP \fIevent_name\fP\fB,
+.br
+\ \ \ \ \ \ trace_event_id_t *restrict\fP \fIevent\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIposix_trace_eventid_equal\fP() function shall compare the trace
+event type identifiers \fIevent1\fP and \fIevent2\fP
+from the same trace stream or the same trace log identified by the
+\fItrid\fP argument. If the trace event type identifiers
+\fIevent1\fP and \fIevent2\fP are from different trace streams, the
+return value shall be unspecified.
+.LP
+The \fIposix_trace_eventid_get_name\fP() function shall return, in
+the argument pointed to by \fIevent_name\fP, the trace
+event name associated with the trace event type identifier identified
+by the argument \fIevent\fP, for the trace stream or for the
+trace log identified by the \fItrid\fP argument. The name of the trace
+event shall have a maximum of {TRACE_EVENT_NAME_MAX}
+characters (which has the minimum value {_POSIX_TRACE_EVENT_NAME_MAX}).
+Successive calls to this function with the same trace event
+type identifier and the same trace stream identifier shall return
+the same event name.
+.LP
+The \fIposix_trace_trid_eventid_open\fP() function shall associate
+a user trace event name with a trace event type identifier for
+a given trace stream. The trace stream is identified by the \fItrid\fP
+argument, and it shall be an active trace stream. The trace
+event name is the string pointed to by the argument \fIevent_name\fP.
+It shall have a maximum of {TRACE_EVENT_NAME_MAX} characters
+(which has the minimum value {_POSIX_TRACE_EVENT_NAME_MAX}). The number
+of user trace event type identifiers that can be defined
+for any given process is limited by the maximum value {TRACE_USER_EVENT_MAX},
+which has the minimum value
+{_POSIX_TRACE_USER_EVENT_MAX}.
+.LP
+If the Trace Inherit option is not supported, the \fIposix_trace_trid_eventid_open\fP()
+function shall associate the user trace
+event name pointed to by the \fIevent_name\fP argument with a trace
+event type identifier that is unique for the process being
+traced in the trace stream identified by the \fItrid\fP argument,
+and is returned in the variable pointed to by the \fIevent\fP
+argument. If the user trace event name has already been mapped for
+the traced process, then the previously assigned trace event
+type identifier shall be returned. If the per-process user trace event
+name limit represented by {TRACE_USER_EVENT_MAX} has been
+reached, the pre-defined POSIX_TRACE_UNNAMED_USEREVENT (see \fITrace
+Option: User Trace
+Event\fP ) user trace event shall be returned.
+.LP
+If the Trace Inherit option is supported, the \fIposix_trace_trid_eventid_open\fP()
+function shall associate the user
+trace event name pointed to by the \fIevent_name\fP argument with
+a trace event type identifier that is unique for all the
+processes being traced in the trace stream identified by the \fItrid\fP
+argument, and is returned in the variable pointed to by
+the \fIevent\fP argument. If the user trace event name has already
+been mapped for the traced processes, then the previously
+assigned trace event type identifier shall be returned. If the per-process
+user trace event name limit represented by
+{TRACE_USER_EVENT_MAX} has been reached, the pre-defined POSIX_TRACE_UNNAMED_USEREVENT
+(see \fITrace Option: User Trace Event\fP ) user trace event shall
+be returned.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIposix_trace_eventid_get_name\fP()
+and
+\fIposix_trace_trid_eventid_open\fP() functions shall return a
+value of zero. Otherwise, they shall return the corresponding error
+number.
+.LP
+The \fIposix_trace_eventid_equal\fP() function shall return a non-zero
+value if \fIevent1\fP and \fIevent2\fP are equal;
+otherwise, a value of zero shall be returned. No errors are defined.
+If either \fIevent1\fP or \fIevent2\fP are not valid trace
+event type identifiers for the trace stream specified by \fItrid\fP
+or if the \fItrid\fP is invalid, the behavior shall be
+unspecified.
+.LP
+The \fIposix_trace_eventid_get_name\fP() function stores the trace
+event name value in the object pointed to by
+\fIevent_name\fP, if successful.
+.LP
+The \fIposix_trace_trid_eventid_open\fP() function stores the trace
+event type identifier value in the object pointed to by
+\fIevent\fP, if successful.
+.SH ERRORS
+.LP
+The \fIposix_trace_eventid_get_name\fP() and \fIposix_trace_trid_eventid_open\fP()
+functions shall fail if:
+.TP 7
+.B EINVAL
+The \fItrid\fP argument was not a valid trace stream identifier.
+.sp
+.LP
+The \fIposix_trace_trid_eventid_open\fP() function shall fail if:
+.TP 7
+.B ENAMETOOLONG
+.sp
+The size of the name pointed to by the \fIevent_name\fP argument was
+longer than the implementation-defined value
+{TRACE_EVENT_NAME_MAX}.
+.sp
+.LP
+The \fIposix_trace_eventid_get_name\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The trace event type identifier \fIevent\fP was not associated with
+any name.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fITrace Option: User Trace Event\fP, \fIposix_trace_event\fP(),
+\fIposix_trace_getnext_event\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<trace.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/posix_trace_eventid_open.3p b/man-pages-posix-2003/man3p/posix_trace_eventid_open.3p
new file mode 100644
index 0000000..d0d78a3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_eventid_open.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_event.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_eventset_add.3p b/man-pages-posix-2003/man3p/posix_trace_eventset_add.3p
new file mode 100644
index 0000000..ef19136
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_eventset_add.3p
@@ -0,0 +1,137 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POSIX_TRACE_EVENTSET_ADD" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" posix_trace_eventset_add
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+posix_trace_eventset_add, posix_trace_eventset_del, posix_trace_eventset_empty,
+posix_trace_eventset_fill,
+posix_trace_eventset_ismember \- manipulate trace event type sets (\fBTRACING\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <trace.h>
+.br
+.sp
+int posix_trace_eventset_add(trace_event_id_t\fP \fIevent_id\fP\fB,
+.br
+\ \ \ \ \ \ trace_event_set_t *\fP\fIset\fP\fB);
+.br
+int posix_trace_eventset_del(trace_event_id_t\fP \fIevent_id\fP\fB,
+.br
+\ \ \ \ \ \ trace_event_set_t *\fP\fIset\fP\fB);
+.br
+int posix_trace_eventset_empty(trace_event_set_t *\fP\fIset\fP\fB);
+.br
+int posix_trace_eventset_fill(trace_event_set_t *\fP\fIset\fP\fB,
+int\fP \fIwhat\fP\fB);
+.br
+int posix_trace_eventset_ismember(trace_event_id_t\fP \fIevent_id\fP\fB,
+.br
+\ \ \ \ \ \ const trace_event_set_t *restrict\fP \fIset\fP\fB, int
+*restrict\fP
+\fIismember\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These primitives manipulate sets of trace event types. They operate
+on data objects addressable by the application, not on the
+current trace event filter of any trace stream.
+.LP
+The \fIposix_trace_eventset_add\fP() and \fIposix_trace_eventset_del\fP()
+functions, respectively, shall add or delete the
+individual trace event type specified by the value of the argument
+\fIevent_id\fP to or from the trace event type set pointed to
+by the argument \fIset\fP. Adding a trace event type already in the
+set or deleting a trace event type not in the set shall not be
+considered an error.
+.LP
+The \fIposix_trace_eventset_empty\fP() function shall initialize the
+trace event type set pointed to by the \fIset\fP argument
+such that all trace event types defined, both system and user, shall
+be excluded from the set.
+.LP
+The \fIposix_trace_eventset_fill\fP() function shall initialize the
+trace event type set pointed to by the argument \fIset\fP,
+such that the set of trace event types defined by the argument \fIwhat\fP
+shall be included in the set. The value of the argument
+\fIwhat\fP shall consist of one of the following values, as defined
+in the \fI<trace.h>\fP header:
+.TP 7
+POSIX_TRACE_WOPID_EVENTS
+.sp
+All the process-independent implementation-defined system trace event
+types are included in the set.
+.TP 7
+POSIX_TRACE_SYSTEM_EVENTS
+.sp
+All the implementation-defined system trace event types are included
+in the set, as are those defined in
+IEEE\ Std\ 1003.1-2001.
+.TP 7
+POSIX_TRACE_ALL_EVENTS
+.sp
+All trace event types defined, both system and user, are included
+in the set.
+.sp
+.LP
+Applications shall call either \fIposix_trace_eventset_empty\fP()
+or \fIposix_trace_eventset_fill\fP() at least once for each
+object of type \fBtrace_event_set_t\fP prior to any other use of that
+object. If such an object is not initialized in this way,
+but is nonetheless supplied as an argument to any of the \fIposix_trace_eventset_add\fP(),
+\fIposix_trace_eventset_del\fP(), or
+\fIposix_trace_eventset_ismember\fP() functions, the results are undefined.
+.LP
+The \fIposix_trace_eventset_ismember\fP() function shall test whether
+the trace event type specified by the value of the
+argument \fIevent_id\fP is a member of the set pointed to by the argument
+\fIset\fP. The value returned in the object pointed to
+by \fIismember\fP argument is zero if the trace event type identifier
+is not a member of the set and a value different from zero
+if it is a member of the set.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return a value of
+zero. Otherwise, they shall return the corresponding error
+number.
+.SH ERRORS
+.LP
+These functions may fail if:
+.TP 7
+.B EINVAL
+The value of one of the arguments is invalid.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIposix_trace_set_filter\fP(), \fIposix_trace_trid_eventid_open\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<trace.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/posix_trace_eventset_del.3p b/man-pages-posix-2003/man3p/posix_trace_eventset_del.3p
new file mode 100644
index 0000000..795224b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_eventset_del.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_eventset_add.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_eventset_empty.3p b/man-pages-posix-2003/man3p/posix_trace_eventset_empty.3p
new file mode 100644
index 0000000..795224b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_eventset_empty.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_eventset_add.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_eventset_fill.3p b/man-pages-posix-2003/man3p/posix_trace_eventset_fill.3p
new file mode 100644
index 0000000..795224b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_eventset_fill.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_eventset_add.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_eventset_ismember.3p b/man-pages-posix-2003/man3p/posix_trace_eventset_ismember.3p
new file mode 100644
index 0000000..795224b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_eventset_ismember.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_eventset_add.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_eventtypelist_getnext_id.3p b/man-pages-posix-2003/man3p/posix_trace_eventtypelist_getnext_id.3p
new file mode 100644
index 0000000..3d9c237
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_eventtypelist_getnext_id.3p
@@ -0,0 +1,92 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POSIX_TRACE_EVENTTYPELIST_GETNEXT_ID" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" posix_trace_eventtypelist_getnext_id
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+posix_trace_eventtypelist_getnext_id, posix_trace_eventtypelist_rewind
+\- iterate over a mapping of trace event types
+(\fBTRACING\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <trace.h>
+.br
+.sp
+int posix_trace_eventtypelist_getnext_id(trace_id_t\fP \fItrid\fP\fB,
+.br
+\ \ \ \ \ \ trace_event_id_t *restrict\fP \fIevent\fP\fB, int *restrict\fP
+\fIunavailable\fP\fB);
+.br
+int posix_trace_eventtypelist_rewind(trace_id_t\fP \fItrid\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The first time \fIposix_trace_eventtypelist_getnext_id\fP() is called,
+the function shall return in the variable pointed to by
+\fIevent\fP the first trace event type identifier of the list of trace
+events of the trace stream identified by the \fItrid\fP
+argument. Successive calls to \fIposix_trace_eventtypelist_getnext_id\fP()
+return in the variable pointed to by \fIevent\fP the
+next trace event type identifier in that same list. Each time a trace
+event type identifier is successfully written into the
+variable pointed to by the \fIevent\fP argument, the variable pointed
+to by the \fIunavailable\fP argument shall be set to zero.
+When no more trace event type identifiers are available, and so none
+is returned, the variable pointed to by the \fIunavailable\fP
+argument shall be set to a value different from zero.
+.LP
+The \fIposix_trace_eventtypelist_rewind\fP() function shall reset
+the next trace event type identifier to be read to the first
+trace event type identifier from the list of trace events used in
+the trace stream identified by \fItrid\fP.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return a value of
+zero. Otherwise, they shall return the corresponding error
+number.
+.LP
+The \fIposix_trace_eventtypelist_getnext_id\fP() function stores the
+trace event type identifier value in the object pointed to
+by \fIevent\fP, if successful.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+.B EINVAL
+The \fItrid\fP argument was not a valid trace stream identifier.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIposix_trace_event\fP(), \fIposix_trace_getnext_event\fP(), \fIposix_trace_trid_eventid_open\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<trace.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/posix_trace_eventtypelist_rewind.3p b/man-pages-posix-2003/man3p/posix_trace_eventtypelist_rewind.3p
new file mode 100644
index 0000000..d3114be
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_eventtypelist_rewind.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_eventtypelist_getnext_id.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_flush.3p b/man-pages-posix-2003/man3p/posix_trace_flush.3p
new file mode 100644
index 0000000..fe471c7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_flush.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_create.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_get_attr.3p b/man-pages-posix-2003/man3p/posix_trace_get_attr.3p
new file mode 100644
index 0000000..51dc2d8
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_get_attr.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_get_status.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_get_filter.3p b/man-pages-posix-2003/man3p/posix_trace_get_filter.3p
new file mode 100644
index 0000000..6485c4f
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_get_filter.3p
@@ -0,0 +1,126 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POSIX_TRACE_GET_FILTER" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" posix_trace_get_filter
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+posix_trace_get_filter, posix_trace_set_filter \- retrieve and set
+the filter of an initialized trace stream
+(\fBTRACING\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <trace.h>
+.br
+.sp
+int posix_trace_get_filter(trace_id_t\fP \fItrid\fP\fB, trace_event_set_t
+*\fP\fIset\fP\fB);
+.br
+int posix_trace_set_filter(trace_id_t\fP \fItrid\fP\fB,
+.br
+\ \ \ \ \ \ const trace_event_set_t *\fP\fIset\fP\fB, int\fP \fIhow\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIposix_trace_get_filter\fP() function shall retrieve, into the
+argument pointed to by \fIset\fP, the actual trace event
+filter from the trace stream specified by \fItrid\fP.
+.LP
+The \fIposix_trace_set_filter\fP() function shall change the set of
+filtered trace event types after a trace stream identified
+by the \fItrid\fP argument is created. This function may be called
+prior to starting the trace stream, or while the trace stream
+is active. By default, if no call is made to \fIposix_trace_set_filter\fP(),
+all trace events shall be recorded (that is, none of
+the trace event types are filtered out).
+.LP
+If this function is called while the trace is in progress, a special
+system trace event, POSIX_TRACE_FILTER, shall be recorded
+in the trace indicating both the old and the new sets of filtered
+trace event types (see \fITrace and Trace Event Filter Options: System
+Trace Events\fP and \fITrace, Trace Log, and Trace Event Filter Options:
+System Trace Events\fP ).
+.LP
+If the \fIposix_trace_set_filter\fP() function is interrupted by a
+signal, an error shall be returned and the filter shall not
+be changed. In this case, the state of the trace stream shall not
+be changed.
+.LP
+The value of the argument \fIhow\fP indicates the manner in which
+the set is to be changed and shall have one of the following
+values, as defined in the \fI<trace.h>\fP header:
+.TP 7
+POSIX_TRACE_SET_EVENTSET
+.sp
+The resulting set of trace event types to be filtered shall be the
+trace event type set pointed to by the argument \fIset\fP.
+.TP 7
+POSIX_TRACE_ADD_EVENTSET
+.sp
+The resulting set of trace event types to be filtered shall be the
+union of the current set and the trace event type set pointed to
+by the argument \fIset\fP.
+.TP 7
+POSIX_TRACE_SUB_EVENTSET
+.sp
+The resulting set of trace event types to be filtered shall be all
+trace event types in the current set that are not in the set
+pointed to by the argument \fIset\fP; that is, remove each element
+of the specified set from the current filter.
+.sp
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return a value of
+zero. Otherwise, they shall return the corresponding error
+number.
+.LP
+The \fIposix_trace_get_filter\fP() function stores the set of filtered
+trace event types in \fIset\fP, if successful.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+.B EINVAL
+The value of the \fItrid\fP argument does not correspond to an active
+trace stream or the value of the argument pointed to by
+\fIset\fP is invalid.
+.TP 7
+.B EINTR
+The operation was interrupted by a signal.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fITrace and Trace Event Filter Options: System Trace Events\fP,
+\fITrace, Trace Log, and Trace Event Filter Options: System Trace
+Events\fP, \fIposix_trace_eventset_add\fP(), the Base Definitions
+volume of
+IEEE\ Std\ 1003.1-2001, \fI<trace.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/posix_trace_get_status.3p b/man-pages-posix-2003/man3p/posix_trace_get_status.3p
new file mode 100644
index 0000000..60e9045
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_get_status.3p
@@ -0,0 +1,116 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POSIX_TRACE_GET_ATTR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" posix_trace_get_attr
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+posix_trace_get_attr, posix_trace_get_status \- retrieve the trace
+attributes or trace status
+(\fBTRACING\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <trace.h>
+.br
+.sp
+int posix_trace_get_attr(trace_id_t\fP \fItrid\fP\fB, trace_attr_t
+*\fP\fIattr\fP\fB);
+.br
+int posix_trace_get_status(trace_id_t\fP \fItrid\fP\fB,
+.br
+\ \ \ \ \ \ struct posix_trace_status_info *\fP\fIstatusinfo\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIposix_trace_get_attr\fP() function shall copy the attributes
+of the active trace stream identified by \fItrid\fP into
+the object pointed to by the \fIattr\fP argument. If the Trace Log
+option is supported, \fItrid\fP may represent a
+pre-recorded trace log.
+.LP
+The \fIposix_trace_get_status\fP() function shall return, in the structure
+pointed to by the \fIstatusinfo\fP argument, the
+current trace status for the trace stream identified by the \fItrid\fP
+argument. These status values returned in the structure
+pointed to by \fIstatusinfo\fP shall have been appropriately read
+to ensure that the returned values are consistent. If the
+Trace Log option is supported and the \fItrid\fP argument refers to
+a pre-recorded trace stream, the status shall be the status of
+the completed trace stream.
+.LP
+Each time the \fIposix_trace_get_status\fP() function is used, the
+overrun status of the trace stream shall be reset to
+POSIX_TRACE_NO_OVERRUN immediately after the call completes. If
+the Trace Log option is supported, the
+\fIposix_trace_get_status\fP() function shall behave the same as when
+the option is not supported except for the following
+differences:
+.IP " *" 3
+If the \fItrid\fP argument refers to a trace stream with log, each
+time the \fIposix_trace_get_status\fP() function is used,
+the log overrun status of the trace stream shall be reset to POSIX_TRACE_NO_OVERRUN
+and the \fIflush_error\fP status shall be
+reset to zero immediately after the call completes.
+.LP
+.IP " *" 3
+If the \fItrid\fP argument refers to a pre-recorded trace stream,
+the status returned shall be the status of the completed
+trace stream and the status values of the trace stream shall not be
+reset.
+.LP
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return a value of
+zero. Otherwise, they shall return the corresponding error
+number.
+.LP
+The \fIposix_trace_get_attr\fP() function stores the trace attributes
+in the object pointed to by \fIattr\fP, if
+successful.
+.LP
+The \fIposix_trace_get_status\fP() function stores the trace status
+in the object pointed to by \fIstatusinfo\fP, if
+successful.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+.B EINVAL
+The trace stream argument \fItrid\fP does not correspond to a valid
+active trace stream or a valid trace log.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIposix_trace_attr_destroy\fP(), \fIposix_trace_attr_init\fP(),
+\fIposix_trace_create\fP(),
+\fIposix_trace_open\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<trace.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/posix_trace_getnext_event.3p b/man-pages-posix-2003/man3p/posix_trace_getnext_event.3p
new file mode 100644
index 0000000..e68d320
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_getnext_event.3p
@@ -0,0 +1,227 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POSIX_TRACE_GETNEXT_EVENT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" posix_trace_getnext_event
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+posix_trace_getnext_event, posix_trace_timedgetnext_event, posix_trace_trygetnext_event
+\- retrieve a trace event
+(\fBTRACING\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <sys/types.h>
+.br
+#include <trace.h>
+.br
+.sp
+int posix_trace_getnext_event(trace_id_t\fP \fItrid\fP\fB,
+.br
+\ \ \ \ \ \ struct posix_trace_event_info *restrict\fP \fIevent\fP\fB,
+.br
+\ \ \ \ \ \ void *restrict\fP \fIdata\fP\fB, size_t\fP \fInum_bytes\fP\fB,
+.br
+\ \ \ \ \ \ size_t *restrict\fP \fIdata_len\fP\fB, int *restrict\fP
+\fIunavailable\fP\fB);
+.br
+\fP
+.LP
+\fBint posix_trace_timedgetnext_event(trace_id_t\fP \fItrid\fP\fB,
+.br
+\ \ \ \ \ \ struct posix_trace_event_info *restrict\fP \fIevent\fP\fB,
+.br
+\ \ \ \ \ \ void *restrict\fP \fIdata\fP\fB, size_t\fP \fInum_bytes\fP\fB,
+.br
+\ \ \ \ \ \ size_t *restrict\fP \fIdata_len\fP\fB, int *restrict\fP
+\fIunavailable\fP\fB,
+.br
+\ \ \ \ \ \ const struct timespec *restrict\fP \fIabs_timeout\fP\fB);
+.br
+\fP
+.LP
+\fBint posix_trace_trygetnext_event(trace_id_t\fP \fItrid\fP\fB,
+.br
+\ \ \ \ \ \ struct posix_trace_event_info *restrict\fP \fIevent\fP\fB,
+.br
+\ \ \ \ \ \ void *restrict\fP \fIdata\fP\fB, size_t\fP \fInum_bytes\fP\fB,
+.br
+\ \ \ \ \ \ size_t *restrict\fP \fIdata_len\fP\fB, int *restrict\fP
+\fIunavailable\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIposix_trace_getnext_event\fP() function shall report a recorded
+trace event either from an active trace stream without
+log
+\ or a pre-recorded trace stream identified by the \fItrid\fP argument.
+The \fIposix_trace_trygetnext_event\fP() function shall report a recorded
+trace event from an active trace stream
+without log identified by the \fItrid\fP argument.
+.LP
+The trace event information associated with the recorded trace event
+shall be copied by the function into the structure pointed
+to by the argument \fIevent\fP and the data associated with the trace
+event shall be copied into the buffer pointed to by the
+\fIdata\fP argument.
+.LP
+The \fIposix_trace_getnext_event\fP() function shall block if the
+\fItrid\fP argument identifies an active trace stream and
+there is currently no trace event ready to be retrieved. When returning,
+if a recorded trace event was reported, the variable
+pointed to by the \fIunavailable\fP argument shall be set to zero.
+Otherwise, the variable pointed to by the \fIunavailable\fP
+argument shall be set to a value different from zero.
+.LP
+\ The \fIposix_trace_timedgetnext_event\fP() function shall attempt
+to get another trace event from an active trace stream
+without log, as in the \fIposix_trace_getnext_event\fP() function.
+However, if no trace event is available from the trace stream,
+the implied wait shall be terminated when the timeout specified by
+the argument \fIabs_timeout\fP expires, and the function shall
+return the error [ETIMEDOUT].
+.LP
+The timeout shall expire when the absolute time specified by \fIabs_timeout\fP
+passes, as measured by the clock upon which
+timeouts are based (that is, when the value of that clock equals or
+exceeds \fIabs_timeout\fP), or if the absolute time specified
+by \fIabs_timeout\fP has already passed at the time of the call.
+.LP
+\ If the Timers option is supported, the timeout shall be based on
+the CLOCK_REALTIME clock; if the Timers option
+is not supported, the timeout shall be based on the system clock as
+returned by the \fItime\fP() function. The resolution of the timeout
+shall be the resolution of the clock on which it
+is based. The \fBtimespec\fP data type is defined in the \fI<time.h>\fP
+header.
+.LP
+Under no circumstance shall the function fail with a timeout if a
+trace event is immediately available from the trace stream. The
+validity of the \fIabs_timeout\fP argument need not be checked if
+a trace event is immediately available from the trace
+stream.
+.LP
+The behavior of this function for a pre-recorded trace stream is unspecified.
+.LP
+The \fIposix_trace_trygetnext_event\fP() function shall not block.
+\ This function shall return an error if the \fItrid\fP
+argument identifies a pre-recorded trace stream. If a recorded
+trace event was reported, the variable pointed to by the \fIunavailable\fP
+argument shall be set to zero. Otherwise, if no trace
+event was reported, the variable pointed to by the \fIunavailable\fP
+argument shall be set to a value different from zero.
+.LP
+The argument \fInum_bytes\fP shall be the size of the buffer pointed
+to by the \fIdata\fP argument. The argument
+\fIdata_len\fP reports to the application the length in bytes of the
+data record just transferred. If \fInum_bytes\fP is greater
+than or equal to the size of the data associated with the trace event
+pointed to by the \fIevent\fP argument, all the recorded
+data shall be transferred. In this case, the \fItruncation-status\fP
+member of the trace event structure shall be either
+POSIX_TRACE_NOT_TRUNCATED, if the trace event data was recorded without
+truncation while tracing, or POSIX_TRACE_TRUNCATED_RECORD,
+if the trace event data was truncated when it was recorded. If the
+\fInum_bytes\fP argument is less than the length of recorded
+trace event data, the data transferred shall be truncated to a length
+of \fInum_bytes\fP, the value stored in the variable pointed
+to by \fIdata_len\fP shall be equal to \fInum_bytes\fP, and the \fItruncation-status\fP
+member of the \fIevent\fP structure
+argument shall be set to POSIX_TRACE_TRUNCATED_READ (see the \fBposix_trace_event_info\fP
+structure defined in \fI<trace.h>\fP).
+.LP
+The report of a trace event shall be sequential starting from the
+oldest recorded trace event. Trace events shall be reported in
+the order in which they were generated, up to an implementation-defined
+time resolution that causes the ordering of trace events
+occurring very close to each other to be unknown. Once reported, a
+trace event cannot be reported again from an active trace
+stream. Once a trace event is reported from an active trace stream
+without log, the trace stream shall make the resources
+associated with that trace event available to record future generated
+trace events.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return a value of
+zero. Otherwise, they shall return the corresponding error
+number.
+.LP
+If successful, these functions store:
+.IP " *" 3
+The recorded trace event in the object pointed to by \fIevent\fP
+.LP
+.IP " *" 3
+The trace event information associated with the recorded trace event
+in the object pointed to by \fIdata\fP
+.LP
+.IP " *" 3
+The length of this trace event information in the object pointed to
+by \fIdata_len\fP
+.LP
+.IP " *" 3
+The value of zero in the object pointed to by \fIunavailable\fP
+.LP
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+.B EINVAL
+The trace stream identifier argument \fItrid\fP is invalid.
+.sp
+.LP
+The \fIposix_trace_getnext_event\fP() and \fIposix_trace_timedgetnext_event\fP()
+functions shall fail if:
+.TP 7
+.B EINTR
+The operation was interrupted by a signal, and so the call had no
+effect.
+.sp
+.LP
+The \fIposix_trace_trygetnext_event\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The trace stream identifier argument \fItrid\fP does not correspond
+to an active trace stream.
+.sp
+.LP
+The \fIposix_trace_timedgetnext_event\fP() function shall fail if:
+.TP 7
+.B EINVAL
+There is no trace event immediately available from the trace stream,
+and the \fItimeout\fP argument is invalid.
+.TP 7
+.B ETIMEDOUT
+No trace event was available from the trace stream before the specified
+timeout \fItimeout\fP expired.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIposix_trace_create\fP(), \fIposix_trace_open\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<sys/types.h>\fP, \fI<trace.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/posix_trace_open.3p b/man-pages-posix-2003/man3p/posix_trace_open.3p
new file mode 100644
index 0000000..a72f2b1
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_open.3p
@@ -0,0 +1,144 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POSIX_TRACE_CLOSE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" posix_trace_close
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+posix_trace_close, posix_trace_open, posix_trace_rewind \- trace log
+management (\fBTRACING\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <trace.h>
+.br
+.sp
+int posix_trace_close(trace_id_t\fP \fItrid\fP\fB);
+.br
+int posix_trace_open(int\fP \fIfile_desc\fP\fB, trace_id_t *\fP\fItrid\fP\fB);
+.br
+int posix_trace_rewind(trace_id_t\fP \fItrid\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIposix_trace_close\fP() function shall deallocate the trace
+log identifier indicated by \fItrid\fP, and all of its
+associated resources. If there is no valid trace log pointed to by
+the \fItrid\fP, this function shall fail.
+.LP
+The \fIposix_trace_open\fP() function shall allocate the necessary
+resources and establish the connection between a trace log
+identified by the \fIfile_desc\fP argument and a trace stream identifier
+identified by the object pointed to by the \fItrid\fP
+argument. The \fIfile_desc\fP argument should be a valid open file
+descriptor that corresponds to a trace log. The
+\fIfile_desc\fP argument shall be open for reading. The current trace
+event timestamp, which specifies the timestamp of the trace
+event that will be read by the next call to \fIposix_trace_getnext_event\fP(),
+shall be set to the timestamp of the oldest
+trace event recorded in the trace log identified by \fItrid\fP.
+.LP
+The \fIposix_trace_open\fP() function shall return a trace stream
+identifier in the variable pointed to by the \fItrid\fP
+argument, that may only be used by the following functions:
+.TS C
+center; lw(39) lw(39).
+T{
+.br
+\fIposix_trace_close\fP()
+.br
+\fIposix_trace_eventid_equal\fP()
+.br
+\fIposix_trace_eventid_get_name\fP()
+.br
+\fIposix_trace_eventtypelist_getnext_id\fP()
+.br
+\fIposix_trace_eventtypelist_rewind\fP()
+.br
+\
+T} T{
+.br
+\fIposix_trace_get_attr\fP()
+.br
+\fIposix_trace_get_status\fP()
+.br
+\fIposix_trace_getnext_event\fP()
+.br
+\fIposix_trace_rewind\fP()
+.br
+\
+T}
+.TE
+.LP
+In particular, notice that the operations normally used by a trace
+controller process, such as \fIposix_trace_start\fP(), \fIposix_trace_stop\fP(),
+or \fIposix_trace_shutdown\fP(), cannot be invoked using the trace
+stream identifier
+returned by the \fIposix_trace_open\fP() function.
+.LP
+The \fIposix_trace_rewind\fP() function shall reset the current trace
+event timestamp, which specifies the timestamp of the
+trace event that will be read by the next call to \fIposix_trace_getnext_event\fP(),
+to the timestamp of the oldest trace event
+recorded in the trace log identified by \fItrid\fP.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return a value of
+zero. Otherwise, they shall return the corresponding error
+number.
+.LP
+If successful, the \fIposix_trace_open\fP() function stores the trace
+stream identifier value in the object pointed to by
+\fItrid\fP.
+.SH ERRORS
+.LP
+The \fIposix_trace_open\fP() function shall fail if:
+.TP 7
+.B EINTR
+The operation was interrupted by a signal and thus no trace log was
+opened.
+.TP 7
+.B EINVAL
+The object pointed to by \fIfile_desc\fP does not correspond to a
+valid trace log.
+.sp
+.LP
+The \fIposix_trace_close\fP() and \fIposix_trace_rewind\fP() functions
+may fail if:
+.TP 7
+.B EINVAL
+The object pointed to by \fItrid\fP does not correspond to a valid
+trace log.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIposix_trace_get_attr\fP(), \fIposix_trace_get_filter\fP(), \fIposix_trace_getnext_event\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<trace.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/posix_trace_rewind.3p b/man-pages-posix-2003/man3p/posix_trace_rewind.3p
new file mode 100644
index 0000000..a42c3ab
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_rewind.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_open.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_set_filter.3p b/man-pages-posix-2003/man3p/posix_trace_set_filter.3p
new file mode 100644
index 0000000..0d2f0fd
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_set_filter.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_get_filter.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_shutdown.3p b/man-pages-posix-2003/man3p/posix_trace_shutdown.3p
new file mode 100644
index 0000000..fe471c7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_shutdown.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_create.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_start.3p b/man-pages-posix-2003/man3p/posix_trace_start.3p
new file mode 100644
index 0000000..19770e7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_start.3p
@@ -0,0 +1,92 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POSIX_TRACE_START" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" posix_trace_start
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+posix_trace_start, posix_trace_stop \- trace start and stop (\fBTRACING\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <trace.h>
+.br
+.sp
+int posix_trace_start(trace_id_t\fP \fItrid\fP\fB);
+.br
+int posix_trace_stop (trace_id_t\fP \fItrid\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIposix_trace_start\fP() and \fIposix_trace_stop\fP() functions,
+respectively, shall start and stop the trace stream
+identified by the argument \fItrid\fP.
+.LP
+The effect of calling the \fIposix_trace_start\fP() function shall
+be recorded in the trace stream as the POSIX_TRACE_START
+system trace event and the status of the trace stream shall become
+POSIX_TRACE_RUNNING. If the trace stream is in progress when
+this function is called, the POSIX_TRACE_START system trace event
+shall not be recorded and the trace stream shall continue to run.
+If the trace stream is full, the POSIX_TRACE_START system trace event
+shall not be recorded and the status of the trace stream
+shall not be changed.
+.LP
+The effect of calling the \fIposix_trace_stop\fP() function shall
+be recorded in the trace stream as the POSIX_TRACE_STOP
+system trace event and the status of the trace stream shall become
+POSIX_TRACE_SUSPENDED. If the trace stream is suspended when
+this function is called, the POSIX_TRACE_STOP system trace event shall
+not be recorded and the trace stream shall remain suspended.
+If the trace stream is full, the POSIX_TRACE_STOP system trace event
+shall not be recorded and the status of the trace stream shall
+not be changed.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return a value of
+zero. Otherwise, they shall return the corresponding error
+number.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+.B EINVAL
+The value of the argument \fItrid\fP does not correspond to an active
+trace stream and thus no trace stream was started or
+stopped.
+.TP 7
+.B EINTR
+The operation was interrupted by a signal and thus the trace stream
+was not necessarily started or stopped.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIposix_trace_create\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<trace.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/posix_trace_stop.3p b/man-pages-posix-2003/man3p/posix_trace_stop.3p
new file mode 100644
index 0000000..2a3dc92
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_stop.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_start.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_timedgetnext_event.3p b/man-pages-posix-2003/man3p/posix_trace_timedgetnext_event.3p
new file mode 100644
index 0000000..8daa884
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_timedgetnext_event.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_getnext_event.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_trid_eventid_open.3p b/man-pages-posix-2003/man3p/posix_trace_trid_eventid_open.3p
new file mode 100644
index 0000000..9e4d863
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_trid_eventid_open.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_eventid_get_name.3p
diff --git a/man-pages-posix-2003/man3p/posix_trace_trygetnext_event.3p b/man-pages-posix-2003/man3p/posix_trace_trygetnext_event.3p
new file mode 100644
index 0000000..8daa884
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_trace_trygetnext_event.3p
@@ -0,0 +1 @@
+.so man3p/posix_trace_getnext_event.3p
diff --git a/man-pages-posix-2003/man3p/posix_typed_mem_get_info.3p b/man-pages-posix-2003/man3p/posix_typed_mem_get_info.3p
new file mode 100644
index 0000000..6d3f6f4
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_typed_mem_get_info.3p
@@ -0,0 +1,114 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POSIX_TYPED_MEM_GET_INFO" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" posix_typed_mem_get_info
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+posix_typed_mem_get_info \- query typed memory information (\fBADVANCED
+REALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <sys/mman.h>
+.br
+.sp
+int posix_typed_mem_get_info(int\fP \fIfildes\fP\fB,
+.br
+\ \ \ \ \ \ struct posix_typed_mem_info *\fP\fIinfo\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIposix_typed_mem_get_info\fP() function shall return, in the
+\fIposix_tmi_length\fP field of the
+\fBposix_typed_mem_info\fP structure pointed to by \fIinfo\fP, the
+maximum length which may be successfully allocated by the
+typed memory object designated by \fIfildes\fP. This maximum length
+shall take into account the flag POSIX_TYPED_MEM_ALLOCATE or
+POSIX_TYPED_MEM_ALLOCATE_CONTIG specified when the typed memory object
+represented by \fIfildes\fP was opened. The maximum length
+is dynamic; therefore, the value returned is valid only while the
+current mapping of the corresponding typed memory pool remains
+unchanged.
+.LP
+If \fIfildes\fP represents a typed memory object opened with neither
+the POSIX_TYPED_MEM_ALLOCATE flag nor the
+POSIX_TYPED_MEM_ALLOCATE_CONTIG flag specified, the returned value
+of \fIinfo\fP->\fIposix_tmi_length\fP is unspecified.
+.LP
+The \fIposix_typed_mem_get_info\fP() function may return additional
+implementation-defined information in other fields of the
+\fBposix_typed_mem_info\fP structure pointed to by \fIinfo\fP.
+.LP
+If the memory object specified by \fIfildes\fP is not a typed memory
+object, then the behavior of this function is
+undefined.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIposix_typed_mem_get_info\fP() function
+shall return zero; otherwise, the corresponding error
+status value shall be returned.
+.SH ERRORS
+.LP
+The \fIposix_typed_mem_get_info\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not a valid open file descriptor.
+.TP 7
+.B ENODEV
+The \fIfildes\fP argument is not connected to a memory object supported
+by this function.
+.sp
+.LP
+This function shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+An application that needs to allocate a block of typed memory with
+length dependent upon the amount of memory currently
+available must either query the typed memory object to obtain the
+amount available, or repeatedly invoke \fImmap\fP() attempting to
+guess an appropriate length. While the latter method is existing practice
+with \fImalloc\fP(), it is awkward and imprecise. The \fIposix_typed_mem_get_info\fP()
+function allows an application to immediately determine available
+memory. This is particularly important for typed memory objects
+that may in some cases be scarce resources. Note that when a typed
+memory pool is a shared resource, some form of mutual-exclusion
+or synchronization may be required while typed memory is being queried
+and allocated to prevent race conditions.
+.LP
+The existing \fIfstat\fP() function is not suitable for this purpose.
+We realize that
+implementations may wish to provide other attributes of typed memory
+objects (for example, alignment requirements, page size, and
+so on). The \fIfstat\fP() function returns a structure which is not
+extensible and,
+furthermore, contains substantial information that is inappropriate
+for typed memory objects.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfstat\fP(), \fImmap\fP(), \fIposix_typed_mem_open\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<sys/mman.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/posix_typed_mem_open.3p b/man-pages-posix-2003/man3p/posix_typed_mem_open.3p
new file mode 100644
index 0000000..64f2425
--- /dev/null
+++ b/man-pages-posix-2003/man3p/posix_typed_mem_open.3p
@@ -0,0 +1,190 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POSIX_TYPED_MEM_OPEN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" posix_typed_mem_open
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+posix_typed_mem_open \- open a typed memory object (\fBADVANCED REALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <sys/mman.h>
+.br
+.sp
+int posix_typed_mem_open(const char *\fP\fIname\fP\fB, int\fP \fIoflag\fP\fB,
+int\fP \fItflag\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIposix_typed_mem_open\fP() function shall establish a connection
+between the typed memory object specified by the string
+pointed to by \fIname\fP and a file descriptor. It shall create an
+open file description that refers to the typed memory object
+and a file descriptor that refers to that open file description. The
+file descriptor is used by other functions to refer to that
+typed memory object. It is unspecified whether the name appears in
+the file system and is visible to other functions that take
+pathnames as arguments. The \fIname\fP argument shall conform to the
+construction rules for a pathname. If \fIname\fP begins with
+the slash character, then processes calling \fIposix_typed_mem_open\fP()
+with the same value of \fIname\fP shall refer to the
+same typed memory object. If \fIname\fP does not begin with the slash
+character, the effect is implementation-defined. The
+interpretation of slash characters other than the leading slash character
+in \fIname\fP is implementation-defined.
+.LP
+Each typed memory object supported in a system shall be identified
+by a name which specifies not only its associated typed
+memory pool, but also the path or port by which it is accessed. That
+is, the same typed memory pool accessed via several different
+ports shall have several different corresponding names. The binding
+between names and typed memory objects is established in an
+implementation-defined manner. Unlike shared memory objects, there
+is no way within IEEE\ Std\ 1003.1-2001 for a program to
+create a typed memory object.
+.LP
+The value of \fItflag\fP shall determine how the typed memory object
+behaves when subsequently mapped by calls to \fImmap\fP(). At most,
+one of the following flags defined in \fI<sys/mman.h>\fP may be specified:
+.TP 7
+POSIX_TYPED_MEM_ALLOCATE
+Allocate on \fImmap\fP().
+.TP 7
+POSIX_TYPED_MEM_ALLOCATE_CONTIG
+Allocate contiguously on \fImmap\fP().
+.TP 7
+POSIX_TYPED_MEM_MAP_ALLOCATABLE
+Map on \fImmap\fP(), without affecting allocatability.
+.sp
+.LP
+If \fItflag\fP has the flag POSIX_TYPED_MEM_ALLOCATE specified, any
+subsequent call to \fImmap\fP() using the returned file descriptor
+shall result in allocation and mapping of typed
+memory from the specified typed memory pool. The allocated memory
+may be a contiguous previously unallocated area of the typed
+memory pool or several non-contiguous previously unallocated areas
+(mapped to a contiguous portion of the process address space).
+If \fItflag\fP has the flag POSIX_TYPED_MEM_ALLOCATE_CONTIG specified,
+any subsequent call to \fImmap\fP() using the returned file descriptor
+shall result in allocation and mapping of a single
+contiguous previously unallocated area of the typed memory pool (also
+mapped to a contiguous portion of the process address space).
+If \fItflag\fP has none of the flags POSIX_TYPED_MEM_ALLOCATE or POSIX_TYPED_MEM_ALLOCATE_CONTIG
+specified, any subsequent call to
+\fImmap\fP() using the returned file descriptor shall map an application-chosen
+area from the
+specified typed memory pool such that this mapped area becomes unavailable
+for allocation until unmapped by all processes. If
+\fItflag\fP has the flag POSIX_TYPED_MEM_MAP_ALLOCATABLE specified,
+any subsequent call to \fImmap\fP() using the returned file descriptor
+shall map an application-chosen area from the
+specified typed memory pool without an effect on the availability
+of that area for allocation; that is, mapping such an object
+leaves each byte of the mapped area unallocated if it was unallocated
+prior to the mapping or allocated if it was allocated prior
+to the mapping. The appropriate privilege to specify the POSIX_TYPED_MEM_MAP_ALLOCATABLE
+flag is implementation-defined.
+.LP
+If successful, \fIposix_typed_mem_open\fP() shall return a file descriptor
+for the typed memory object that is the lowest
+numbered file descriptor not currently open for that process. The
+open file description is new, and therefore the file descriptor
+shall not share it with any other processes. It is unspecified whether
+the file offset is set. The FD_CLOEXEC file descriptor flag
+associated with the new file descriptor shall be cleared.
+.LP
+The behavior of \fImsync\fP(), \fIftruncate\fP(), and all file operations
+other than \fImmap\fP(), \fIposix_mem_offset\fP(), \fIposix_typed_mem_get_info\fP(),
+\fIfstat\fP(), \fIdup\fP(), \fIdup2\fP(), and \fIclose\fP(), is unspecified
+when passed a
+file descriptor connected to a typed memory object by this function.
+.LP
+The file status flags of the open file description shall be set according
+to the value of \fIoflag\fP. Applications shall
+specify exactly one of the three access mode values described below
+and defined in the \fI<fcntl.h>\fP header, as the value of \fIoflag\fP.
+.TP 7
+O_RDONLY
+Open for read access only.
+.TP 7
+O_WRONLY
+Open for write access only.
+.TP 7
+O_RDWR
+Open for read or write access.
+.sp
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIposix_typed_mem_open\fP() function
+shall return a non-negative integer representing the
+lowest numbered unused file descriptor. Otherwise, it shall return
+-1 and set \fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fIposix_typed_mem_open\fP() function shall fail if:
+.TP 7
+.B EACCES
+The typed memory object exists and the permissions specified by \fIoflag\fP
+are denied.
+.TP 7
+.B EINTR
+The \fIposix_typed_mem_open\fP() operation was interrupted by a signal.
+.TP 7
+.B EINVAL
+The flags specified in \fItflag\fP are invalid (more than one of POSIX_TYPED_MEM_ALLOCATE,
+POSIX_TYPED_MEM_ALLOCATE_CONTIG, or
+POSIX_TYPED_MEM_MAP_ALLOCATABLE is specified).
+.TP 7
+.B EMFILE
+Too many file descriptors are currently in use by this process.
+.TP 7
+.B ENAMETOOLONG
+The length of the \fIname\fP argument exceeds {PATH_MAX} or a pathname
+component is longer than {NAME_MAX}.
+.TP 7
+.B ENFILE
+Too many file descriptors are currently open in the system.
+.TP 7
+.B ENOENT
+The named typed memory object does not exist.
+.TP 7
+.B EPERM
+The caller lacks the appropriate privilege to specify the flag POSIX_TYPED_MEM_MAP_ALLOCATABLE
+in argument \fItflag\fP.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIclose\fP(), \fIdup\fP(), \fIexec\fP(), \fIfcntl\fP(), \fIfstat\fP()
+,
+\fIftruncate\fP(), \fImmap\fP(), \fImsync\fP(),
+\fIposix_mem_offset\fP(), \fIposix_typed_mem_get_info\fP(), \fIumask\fP(),
+the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<fcntl.h>\fP, \fI<sys/mman.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pow.3p b/man-pages-posix-2003/man3p/pow.3p
new file mode 100644
index 0000000..517cf5a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pow.3p
@@ -0,0 +1,186 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "POW" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pow
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pow, powf, powl \- power function
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double pow(double\fP \fIx\fP\fB, double\fP \fIy\fP\fB);
+.br
+float powf(float\fP \fIx\fP\fB, float\fP \fIy\fP\fB);
+.br
+long double powl(long double\fP \fIx\fP\fB, long double\fP \fIy\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the value of \fIx\fP raised to the power
+\fIy\fP, \fIx**y\fP. If
+\fIx\fP is negative, the application shall ensure that \fIy\fP is
+an integer value.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the value
+of \fIx\fP raised to the power \fIy\fP.
+.LP
+For finite values of \fIx\fP < 0, and finite non-integer values of
+\fIy\fP, a domain error shall occur and either a NaN
+(if representable), or an implementation-defined value shall be
+returned.
+.LP
+If the correct value would cause overflow, a range error shall occur
+and \fIpow\fP(), \fIpowf\fP(), and \fIpowl\fP() shall
+return \(+-HUGE_VAL, \(+-HUGE_VALF, and \(+-HUGE_VALL, respectively,
+with the same sign as the correct value of the
+function.
+.LP
+If the correct value would cause underflow, and is not representable,
+a range error may occur, and either 0.0 (if
+supported), or an implementation-defined value shall be
+returned.
+.LP
+If
+\fIx\fP or \fIy\fP is a NaN, a NaN shall be returned (unless specified
+elsewhere in this description).
+.LP
+For any value of \fIy\fP (including NaN), if \fIx\fP is +1, 1.0 shall
+be returned.
+.LP
+For any value of \fIx\fP (including NaN), if \fIy\fP is \(+-0, 1.0
+shall be returned.
+.LP
+For any odd integer value of \fIy\fP > 0, if \fIx\fP is \(+-0, \(+-0
+shall be returned.
+.LP
+For \fIy\fP > 0 and not an odd integer, if \fIx\fP is \(+-0, +0 shall
+be returned.
+.LP
+If \fIx\fP is -1, and \fIy\fP is \(+-Inf, 1.0 shall be returned.
+.LP
+For |\fIx\fP| < 1, if \fIy\fP is -Inf, +Inf shall be returned.
+.LP
+For |\fIx\fP| > 1, if \fIy\fP is -Inf, +0 shall be returned.
+.LP
+For |\fIx\fP| < 1, if \fIy\fP is +Inf, +0 shall be returned.
+.LP
+For |\fIx\fP| > 1, if \fIy\fP is +Inf, +Inf shall be returned.
+.LP
+For \fIy\fP an odd integer < 0, if \fIx\fP is -Inf, -0 shall be returned.
+.LP
+For \fIy\fP < 0 and not an odd integer, if \fIx\fP is -Inf, +0 shall
+be returned.
+.LP
+For \fIy\fP an odd integer > 0, if \fIx\fP is -Inf, -Inf shall be
+returned.
+.LP
+For \fIy\fP > 0 and not an odd integer, if \fIx\fP is -Inf, +Inf shall
+be returned.
+.LP
+For \fIy\fP < 0, if \fIx\fP is +Inf, +0 shall be returned.
+.LP
+For \fIy\fP > 0, if \fIx\fP is +Inf, +Inf shall be returned.
+.LP
+For \fIy\fP an odd integer < 0, if \fIx\fP is \(+-0, a pole error
+shall occur and \(+-HUGE_VAL, \(+-HUGE_VALF,
+and \(+-HUGE_VALL shall be returned for \fIpow\fP(), \fIpowf\fP(),
+and \fIpowl\fP(), respectively.
+.LP
+For \fIy\fP < 0 and not an odd integer, if \fIx\fP is \(+-0, a pole
+error shall occur and HUGE_VAL, HUGE_VALF, and
+HUGE_VALL shall be returned for \fIpow\fP(), \fIpowf\fP(), and \fIpowl\fP(),
+respectively.
+.LP
+If the correct value would cause underflow, and is representable,
+a range error may occur and the correct value shall be
+returned.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Domain\ Error
+The value of \fIx\fP is negative and \fIy\fP is a finite non-integer.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [EDOM]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the invalid floating-point exception shall be
+raised.
+.TP 7
+Pole\ Error
+The value of \fIx\fP is zero and \fIy\fP is negative.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the divide-by-zero floating-point exception shall be
+raised.
+.TP 7
+Range\ Error
+The result overflows.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the overflow floating-point exception shall be
+raised.
+.sp
+.LP
+These functions may fail if:
+.TP 7
+Range\ Error
+The result underflows.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the underflow floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexp\fP(), \fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIisnan\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment of Error Conditions
+for
+Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/powf.3p b/man-pages-posix-2003/man3p/powf.3p
new file mode 100644
index 0000000..37209b0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/powf.3p
@@ -0,0 +1 @@
+.so man3p/pow.3p
diff --git a/man-pages-posix-2003/man3p/powl.3p b/man-pages-posix-2003/man3p/powl.3p
new file mode 100644
index 0000000..37209b0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/powl.3p
@@ -0,0 +1 @@
+.so man3p/pow.3p
diff --git a/man-pages-posix-2003/man3p/pread.3p b/man-pages-posix-2003/man3p/pread.3p
new file mode 100644
index 0000000..01503bd
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pread.3p
@@ -0,0 +1 @@
+.so man3p/read.3p
diff --git a/man-pages-posix-2003/man3p/printf.3p b/man-pages-posix-2003/man3p/printf.3p
new file mode 100644
index 0000000..f557d72
--- /dev/null
+++ b/man-pages-posix-2003/man3p/printf.3p
@@ -0,0 +1,980 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FPRINTF" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fprintf
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fprintf, printf, snprintf, sprintf \- print formatted output
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+int fprintf(FILE *restrict\fP \fIstream\fP\fB, const char *restrict\fP
+\fIformat\fP\fB, ...);
+.br
+int printf(const char *restrict\fP \fIformat\fP\fB, ...);
+.br
+int snprintf(char *restrict\fP \fIs\fP\fB, size_t\fP \fIn\fP\fB,
+.br
+\ \ \ \ \ \ const char *restrict\fP \fIformat\fP\fB, ...);
+.br
+int sprintf(char *restrict\fP \fIs\fP\fB, const char *restrict\fP
+\fIformat\fP\fB, ...);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfprintf\fP() function shall place output on the named output
+\fIstream\fP. The \fIprintf\fP() function shall place
+output on the standard output stream \fIstdout\fP. The \fIsprintf\fP()
+function shall place output followed by the null byte,
+\fB'\\0'\fP, in consecutive bytes starting at *\fIs\fP; it is the
+user's responsibility to ensure that enough space is
+available.
+.LP
+The \fIsnprintf\fP() function shall be equivalent to \fIsprintf\fP(),
+with the addition of the \fIn\fP argument which states
+the size of the buffer referred to by \fIs\fP. If \fIn\fP is zero,
+nothing shall be written and \fIs\fP may be a null pointer.
+Otherwise, output bytes beyond the \fIn\fP-1st shall be discarded
+instead of being written to the array, and a null byte is
+written at the end of the bytes actually written into the array.
+.LP
+If copying takes place between objects that overlap as a result of
+a call to \fIsprintf\fP() or \fIsnprintf\fP(), the results
+are undefined.
+.LP
+Each of these functions converts, formats, and prints its arguments
+under control of the \fIformat\fP. The \fIformat\fP is a
+character string, beginning and ending in its initial shift state,
+if any. The \fIformat\fP is composed of zero or more
+directives: \fIordinary characters\fP, which are simply copied to
+the output stream, and \fIconversion specifications\fP, each of
+which shall result in the fetching of zero or more arguments. The
+results are undefined if there are insufficient arguments for the
+\fIformat\fP. If the \fIformat\fP is exhausted while arguments remain,
+the excess arguments shall be evaluated but are otherwise
+ignored.
+.LP
+Conversions can be applied to the \fIn\fPth argument after the \fIformat\fP
+in the argument list, rather than to the next unused
+argument. In this case, the conversion specifier character \fB%\fP
+(see below) is replaced by the sequence
+\fB"%\fP\fIn\fP\fB$"\fP, where \fIn\fP is a decimal integer in the
+range [1,{NL_ARGMAX}], giving the position of the
+argument in the argument list. This feature provides for the definition
+of format strings that select arguments in an order
+appropriate to specific languages (see the EXAMPLES section).
+.LP
+The \fIformat\fP can contain either numbered argument conversion specifications
+(that is, \fB"%\fP\fIn\fP\fB$"\fP and
+\fB"*\fP\fIm\fP\fB$"\fP), or unnumbered argument conversion specifications
+(that is, \fB%\fP and \fB*\fP ), but not
+both. The only exception to this is that \fB%%\fP can be mixed with
+the \fB"%\fP\fIn\fP\fB$"\fP form. The results of
+mixing numbered and unnumbered argument specifications in a \fIformat\fP
+string are undefined. When numbered argument
+specifications are used, specifying the \fIN\fPth argument requires
+that all the leading arguments, from the first to the
+(\fIN-1\fP)th, are specified in the format string.
+.LP
+In format strings containing the \fB"%\fP\fIn\fP\fB$"\fP form of conversion
+specification, numbered arguments in the
+argument list can be referenced from the format string as many times
+as required.
+.LP
+In format strings containing the \fB%\fP form of conversion specification,
+each conversion specification uses the first
+unused argument in the argument list.
+.LP
+All
+forms of the \fIfprintf\fP() functions allow for the insertion of
+a language-dependent radix character in the output string. The
+radix character is defined in the program's locale (category \fILC_NUMERIC
+).\fP In the POSIX locale, or in a locale where the
+radix character is not defined, the radix character shall default
+to a period ( \fB'.'\fP ).
+.LP
+Each conversion specification is introduced by the \fB'%'\fP character
+\ or by the
+character sequence \fB"%\fP\fIn\fP\fB$"\fP, after which the
+following appear in sequence:
+.IP " *" 3
+Zero or more \fIflags\fP (in any order), which modify the meaning
+of the conversion specification.
+.LP
+.IP " *" 3
+An optional minimum \fIfield width\fP. If the converted value has
+fewer bytes than the field width, it shall be padded with
+spaces by default on the left; it shall be padded on the right if
+the left-adjustment flag ( \fB'-'\fP ), described below, is
+given to the field width. The field width takes the form of an asterisk
+( \fB'*'\fP ), described below, or a decimal
+integer.
+.LP
+.IP " *" 3
+An optional \fIprecision\fP that gives the minimum number of digits
+to appear for the \fBd\fP, \fBi\fP, \fBo\fP,
+\fBu\fP, \fBx\fP, and \fBX\fP conversion specifiers; the number
+of digits to appear after the radix character for the
+\fBa\fP, \fBA\fP, \fBe\fP, \fBE\fP, \fBf\fP, and \fBF\fP conversion
+specifiers; the maximum number of
+significant digits for the \fBg\fP and \fBG\fP conversion specifiers;
+or the maximum number of bytes to be printed from a
+string in the \fBs\fP and \fBS\fP \ conversion
+specifiers. The precision takes the form of a period ( \fB'.'\fP )
+followed either by an asterisk ( \fB'*'\fP ), described
+below, or an optional decimal digit string, where a null digit string
+is treated as zero. If a precision appears with any other
+conversion specifier, the behavior is undefined.
+.LP
+.IP " *" 3
+An optional length modifier that specifies the size of the argument.
+.LP
+.IP " *" 3
+A \fIconversion specifier\fP character that indicates the type of
+conversion to be applied.
+.LP
+.LP
+A field width, or precision, or both, may be indicated by an asterisk
+( \fB'*'\fP ). In this case an argument of type
+\fBint\fP supplies the field width or precision. Applications shall
+ensure that arguments specifying field width, or precision, or
+both appear in that order before the argument, if any, to be converted.
+A negative field width is taken as a \fB'-'\fP flag
+followed by a positive field width. A negative precision is taken
+as if the precision were omitted. In format
+strings containing the \fB"%\fP\fIn\fP\fB$"\fP form of a conversion
+specification, a field width or precision may be
+indicated by the sequence \fB"*\fP\fIm\fP\fB$"\fP, where \fIm\fP is
+a decimal integer in the range [1,{NL_ARGMAX}] giving
+the position in the argument list (after the \fIformat\fP argument)
+of an integer argument containing the field width or
+precision, for example:
+.sp
+.RS
+.nf
+
+\fBprintf("%1$d:%2$.*3$d:%4$.*3$d\\n", hour, min, precision, sec);
+\fP
+.fi
+.RE
+.LP
+The flag characters and their meanings are:
+.TP 7
+\fB'\fP
+The integer portion of the result of a decimal conversion ( \fB%i\fP,
+\fB%d\fP, \fB%u\fP, \fB%f\fP, \fB%F\fP,
+\fB%g\fP, or \fB%G\fP ) shall be formatted with thousands' grouping
+characters. For other conversions the behavior is
+undefined. The non-monetary grouping character is used.
+.TP 7
+\fB-\fP
+The result of the conversion shall be left-justified within the field.
+The conversion is right-justified if this flag is not
+specified.
+.TP 7
+\fB+\fP
+The result of a signed conversion shall always begin with a sign (
+\fB'+'\fP or \fB'-'\fP ). The conversion shall begin
+with a sign only when a negative value is converted if this flag is
+not specified.
+.TP 7
+<space>
+If the first character of a signed conversion is not a sign or if
+a signed conversion results in no characters, a <space>
+shall be prefixed to the result. This means that if the <space> and
+\fB'+'\fP flags both appear, the <space> flag
+shall be ignored.
+.TP 7
+\fB#\fP
+Specifies that the value is to be converted to an alternative form.
+For \fBo\fP conversion, it increases the precision (if
+necessary) to force the first digit of the result to be zero. For
+\fBx\fP or \fBX\fP conversion specifiers, a non-zero result
+shall have 0x (or 0X) prefixed to it. For \fBa\fP, \fBA\fP, \fBe\fP,
+\fBE\fP, \fBf\fP, \fBF\fP, \fBg\fP,
+and \fBG\fP conversion specifiers, the result shall always contain
+a radix character, even if no digits follow the radix
+character. Without this flag, a radix character appears in the result
+of these conversions only if a digit follows it. For
+\fBg\fP and \fBG\fP conversion specifiers, trailing zeros shall \fInot\fP
+be removed from the result as they normally are.
+For other conversion specifiers, the behavior is undefined.
+.TP 7
+\fB0\fP
+For \fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP, \fBx\fP, \fBX\fP, \fBa\fP,
+\fBA\fP, \fBe\fP,
+\fBE\fP, \fBf\fP, \fBF\fP, \fBg\fP, and \fBG\fP conversion specifiers,
+leading zeros (following any indication
+of sign or base) are used to pad to the field width; no space padding
+is performed. If the \fB'0'\fP and \fB'-'\fP flags both
+appear, the \fB'0'\fP flag is ignored. For \fBd\fP, \fBi\fP, \fBo\fP,
+\fBu\fP, \fBx\fP, and \fBX\fP
+conversion specifiers, if a precision is specified, the \fB'0'\fP
+flag is ignored. If the
+\fB'0'\fP and \fB'"\fP flags both appear, the grouping characters
+are inserted before zero padding. For other conversions,
+the behavior is undefined.
+.sp
+.LP
+The length modifiers and their meanings are:
+.TP 7
+\fBhh\fP
+Specifies that a following \fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP,
+\fBx\fP, or \fBX\fP conversion specifier
+applies to a \fBsigned char\fP or \fBunsigned char\fP argument (the
+argument will have been promoted according to the integer
+promotions, but its value shall be converted to \fBsigned char\fP
+or \fBunsigned char\fP before printing); or that a following
+\fBn\fP conversion specifier applies to a pointer to a \fBsigned char\fP
+argument.
+.TP 7
+\fBh\fP
+Specifies that a following \fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP,
+\fBx\fP, or \fBX\fP conversion specifier
+applies to a \fBshort\fP or \fBunsigned short\fP argument (the argument
+will have been promoted according to the integer
+promotions, but its value shall be converted to \fBshort\fP or \fBunsigned
+short\fP before printing); or that a following
+\fBn\fP conversion specifier applies to a pointer to a \fBshort\fP
+argument.
+.TP 7
+\fBl\fP\ (ell)
+Specifies that a following \fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP,
+\fBx\fP, or \fBX\fP conversion specifier
+applies to a \fBlong\fP or \fBunsigned long\fP argument; that a following
+\fBn\fP conversion specifier applies to a pointer to
+a \fBlong\fP argument; that a following \fBc\fP conversion specifier
+applies to a \fBwint_t\fP argument; that a following
+\fBs\fP conversion specifier applies to a pointer to a \fBwchar_t\fP
+argument; or has no effect on a following \fBa\fP,
+\fBA\fP, \fBe\fP, \fBE\fP, \fBf\fP, \fBF\fP, \fBg\fP, or \fBG\fP
+conversion specifier.
+.TP 7
+\fBll\fP\ (ell-ell)
+.sp
+Specifies that a following \fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP,
+\fBx\fP, or \fBX\fP conversion specifier
+applies to a \fBlong long\fP or \fBunsigned long long\fP argument;
+or that a following \fBn\fP conversion specifier applies to
+a pointer to a \fBlong long\fP argument.
+.TP 7
+\fBj\fP
+Specifies that a following \fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP,
+\fBx\fP, or \fBX\fP conversion specifier
+applies to an \fBintmax_t\fP or \fBuintmax_t\fP argument; or that
+a following \fBn\fP conversion specifier applies to a
+pointer to an \fBintmax_t\fP argument.
+.TP 7
+\fBz\fP
+Specifies that a following \fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP,
+\fBx\fP, or \fBX\fP conversion specifier
+applies to a \fBsize_t\fP or the corresponding signed integer type
+argument; or that a following \fBn\fP conversion specifier
+applies to a pointer to a signed integer type corresponding to a \fBsize_t\fP
+argument.
+.TP 7
+\fBt\fP
+Specifies that a following \fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP,
+\fBx\fP, or \fBX\fP conversion specifier
+applies to a \fBptrdiff_t\fP or the corresponding \fBunsigned\fP type
+argument; or that a following \fBn\fP conversion
+specifier applies to a pointer to a \fBptrdiff_t\fP argument.
+.TP 7
+\fBL\fP
+Specifies that a following \fBa\fP, \fBA\fP, \fBe\fP, \fBE\fP,
+\fBf\fP, \fBF\fP, \fBg\fP, or
+\fBG\fP conversion specifier applies to a \fBlong double\fP argument.
+.sp
+.LP
+If a length modifier appears with any conversion specifier other than
+as specified above, the behavior is undefined.
+.LP
+The conversion specifiers and their meanings are:
+.TP 7
+\fBd\fP,\ \fBi\fP
+The \fBint\fP argument shall be converted to a signed decimal in the
+style \fB"[-]\fP\fIdddd\fP\fB"\fP. The precision
+specifies the minimum number of digits to appear; if the value being
+converted can be represented in fewer digits, it shall be
+expanded with leading zeros. The default precision is 1. The result
+of converting zero with an explicit precision of zero shall be
+no characters.
+.TP 7
+\fBo\fP
+The \fBunsigned\fP argument shall be converted to unsigned octal format
+in the style \fB"\fP\fIdddd\fP\fB"\fP. The
+precision specifies the minimum number of digits to appear; if the
+value being converted can be represented in fewer digits, it
+shall be expanded with leading zeros. The default precision is 1.
+The result of converting zero with an explicit precision of zero
+shall be no characters.
+.TP 7
+\fBu\fP
+The \fBunsigned\fP argument shall be converted to unsigned decimal
+format in the style \fB"\fP\fIdddd\fP\fB"\fP. The
+precision specifies the minimum number of digits to appear; if the
+value being converted can be represented in fewer digits, it
+shall be expanded with leading zeros. The default precision is 1.
+The result of converting zero with an explicit precision of zero
+shall be no characters.
+.TP 7
+\fBx\fP
+The \fBunsigned\fP argument shall be converted to unsigned hexadecimal
+format in the style \fB"\fP\fIdddd\fP\fB"\fP;
+the letters \fB"abcdef"\fP are used. The precision specifies the minimum
+number of digits to appear; if the value being
+converted can be represented in fewer digits, it shall be expanded
+with leading zeros. The default precision is 1. The result of
+converting zero with an explicit precision of zero shall be no characters.
+.TP 7
+\fBX\fP
+Equivalent to the \fBx\fP conversion specifier, except that letters
+\fB"ABCDEF"\fP are used instead of \fB"abcdef"\fP
+\&.
+.TP 7
+\fBf\fP,\ \fBF\fP
+The \fBdouble\fP argument shall be converted to decimal notation in
+the style
+\fB"[-]\fP\fIddd\fP\fB.\fP\fIddd\fP\fB"\fP, where the number of digits
+after the radix character is equal to the
+precision specification. If the precision is missing, it shall be
+taken as 6; if the precision is explicitly zero and no
+\fB'#'\fP flag is present, no radix character shall appear. If a radix
+character appears, at least one digit appears before it.
+The low-order digit shall be rounded in an implementation-defined
+manner.
+.LP
+A \fBdouble\fP argument representing an infinity shall be converted
+in one of the styles \fB"[-]inf"\fP or
+\fB"[-]infinity"\fP ; which style is implementation-defined. A \fBdouble\fP
+argument representing a NaN shall be converted in
+one of the styles \fB"[-]nan(\fP\fIn-char-sequence\fP\fB)"\fP or \fB"[-]nan"\fP
+; which style, and the meaning of any
+\fIn-char-sequence\fP, is implementation-defined. The \fBF\fP conversion
+specifier produces \fB"INF"\fP,
+\fB"INFINITY"\fP, or \fB"NAN"\fP instead of \fB"inf"\fP, \fB"infinity"\fP,
+or \fB"nan"\fP, respectively.
+.TP 7
+\fBe\fP,\ \fBE\fP
+The \fBdouble\fP argument shall be converted in the style
+\fB"[-]\fP\fId\fP\fB.\fP\fIddd\fP\fBe\(+-\fP\fIdd\fP\fB"\fP, where
+there is one digit before the radix character
+(which is non-zero if the argument is non-zero) and the number of
+digits after it is equal to the precision; if the precision is
+missing, it shall be taken as 6; if the precision is zero and no \fB'#'\fP
+flag is present, no radix character shall appear. The
+low-order digit shall be rounded in an implementation-defined manner.
+The \fBE\fP conversion specifier shall produce a number
+with \fB'E'\fP instead of \fB'e'\fP introducing the exponent. The
+exponent shall always contain at least two digits. If the
+value is zero, the exponent shall be zero.
+.LP
+A \fBdouble\fP argument representing an infinity or NaN shall be converted
+in the style of an \fBf\fP or \fBF\fP
+conversion specifier.
+.TP 7
+\fBg\fP,\ \fBG\fP
+The \fBdouble\fP argument shall be converted in the style \fBf\fP
+or \fBe\fP (or in the style \fBF\fP or \fBE\fP
+in the case of a \fBG\fP conversion specifier), with the precision
+specifying the number of significant digits. If an explicit
+precision is zero, it shall be taken as 1. The style used depends
+on the value converted; style \fBe\fP (or \fBE\fP ) shall
+be used only if the exponent resulting from such a conversion is less
+than -4 or greater than or equal to the precision. Trailing
+zeros shall be removed from the fractional portion of the result;
+a radix character shall appear only if it is followed by a digit
+or a \fB'#'\fP flag is present.
+.LP
+A \fBdouble\fP argument representing an infinity or NaN shall be converted
+in the style of an \fBf\fP or \fBF\fP
+conversion specifier.
+.TP 7
+\fBa\fP,\ \fBA\fP
+A \fBdouble\fP argument representing a floating-point number shall
+be converted in the style
+\fB"[-]0x\fP\fIh\fP\fB.\fP\fIhhhh\fP\fBp\(+-\fP\fId\fP\fB"\fP, where
+there is one hexadecimal digit (which shall
+be non-zero if the argument is a normalized floating-point number
+and is otherwise unspecified) before the decimal-point character
+and the number of hexadecimal digits after it is equal to the precision;
+if the precision is missing and FLT_RADIX is a power of 2,
+then the precision shall be sufficient for an exact representation
+of the value; if the precision is missing and FLT_RADIX is not a
+power of 2, then the precision shall be sufficient to distinguish
+values of type \fBdouble\fP, except that trailing zeros may be
+omitted; if the precision is zero and the \fB'#'\fP flag is not specified,
+no decimal-point character shall appear. The letters
+\fB"abcdef"\fP shall be used for \fBa\fP conversion and the letters
+\fB"ABCDEF"\fP for \fBA\fP conversion. The
+\fBA\fP conversion specifier produces a number with \fB'X'\fP and
+\fB'P'\fP instead of \fB'x'\fP and \fB'p'\fP . The
+exponent shall always contain at least one digit, and only as many
+more digits as necessary to represent the decimal exponent of 2.
+If the value is zero, the exponent shall be zero.
+.LP
+A \fBdouble\fP argument representing an infinity or NaN shall be converted
+in the style of an \fBf\fP or \fBF\fP
+conversion specifier.
+.TP 7
+\fBc\fP
+The \fBint\fP argument shall be converted to an \fBunsigned char\fP,
+and the resulting byte shall be written.
+.LP
+If an \fBl\fP (ell) qualifier is present, the \fBwint_t\fP argument
+shall be converted as if by an \fBls\fP conversion
+specification with no precision and an argument that points to a two-element
+array of type \fBwchar_t\fP, the first element of
+which contains the \fBwint_t\fP argument to the \fBls\fP conversion
+specification and the second element contains a null wide
+character.
+.TP 7
+\fBs\fP
+The argument shall be a pointer to an array of \fBchar\fP. Bytes from
+the array shall be written up to (but not including) any
+terminating null byte. If the precision is specified, no more than
+that many bytes shall be written. If the precision is not
+specified or is greater than the size of the array, the application
+shall ensure that the array contains a null byte.
+.LP
+If an \fBl\fP (ell) qualifier is present, the argument shall be a
+pointer to an array of type \fBwchar_t\fP. Wide characters
+from the array shall be converted to characters (each as if by a call
+to the \fIwcrtomb\fP() function, with the conversion state described
+by an \fBmbstate_t\fP object
+initialized to zero before the first wide character is converted)
+up to and including a terminating null wide character. The
+resulting characters shall be written up to (but not including) the
+terminating null character (byte). If no precision is
+specified, the application shall ensure that the array contains a
+null wide character. If a precision is specified, no more than
+that many characters (bytes) shall be written (including shift sequences,
+if any), and the array shall contain a null wide
+character if, to equal the character sequence length given by the
+precision, the function would need to access a wide character one
+past the end of the array. In no case shall a partial character be
+written.
+.TP 7
+\fBp\fP
+The argument shall be a pointer to \fBvoid\fP. The value of the pointer
+is converted to a sequence of printable characters, in
+an implementation-defined manner.
+.TP 7
+\fBn\fP
+The argument shall be a pointer to an integer into which is written
+the number of bytes written to the output so far by this
+call to one of the \fIfprintf\fP() functions. No argument is converted.
+.TP 7
+\fBC\fP
+Equivalent to \fBlc\fP .
+.TP 7
+\fBS\fP
+Equivalent to \fBls\fP .
+.TP 7
+\fB%\fP
+Print a \fB'%'\fP character; no argument is converted. The complete
+conversion specification shall be \fB%%\fP .
+.sp
+.LP
+If a conversion specification does not match one of the above forms,
+the behavior is undefined. If any argument is not the
+correct type for the corresponding conversion specification, the behavior
+is undefined.
+.LP
+In no case shall a nonexistent or small field width cause truncation
+of a field; if the result of a conversion is wider than the
+field width, the field shall be expanded to contain the conversion
+result. Characters generated by \fIfprintf\fP() and
+\fIprintf\fP() are printed as if \fIfputc\fP() had been called.
+.LP
+For the \fBa\fP and \fBA\fP conversion specifiers, if FLT_RADIX is
+a power of 2, the value shall be correctly rounded to a
+hexadecimal floating number with the given precision.
+.LP
+For \fBa\fP and \fBA\fP conversions, if FLT_RADIX is not a power of
+2 and the result is not exactly representable in the
+given precision, the result should be one of the two adjacent numbers
+in hexadecimal floating style with the given precision, with
+the extra stipulation that the error should have a correct sign for
+the current rounding direction.
+.LP
+For the \fBe\fP, \fBE\fP, \fBf\fP, \fBF\fP, \fBg\fP, and \fBG\fP
+conversion specifiers, if the number of
+significant decimal digits is at most DECIMAL_DIG, then the result
+should be correctly rounded. If the number of significant
+decimal digits is more than DECIMAL_DIG but the source value is exactly
+representable with DECIMAL_DIG digits, then the result
+should be an exact representation with trailing zeros. Otherwise,
+the source value is bounded by two adjacent decimal strings
+\fIL\fP < \fIU\fP, both having DECIMAL_DIG significant digits; the
+value of the resultant decimal string \fID\fP should
+satisfy \fIL\fP <= \fID\fP <= \fIU\fP, with the extra stipulation
+that the error should have a correct sign for the
+current rounding direction.
+.LP
+The
+\fIst_ctime\fP and \fIst_mtime\fP fields of the file shall be marked
+for update between the call to a successful execution of
+\fIfprintf\fP() or \fIprintf\fP() and the next successful completion
+of a call to \fIfflush\fP() or \fIfclose\fP() on the same stream or
+a
+call to \fIexit\fP() or \fIabort\fP().
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIfprintf\fP() and \fIprintf\fP()
+functions shall return the number of bytes transmitted.
+.LP
+Upon successful completion, the \fIsprintf\fP() function shall return
+the number of bytes written to \fIs\fP, excluding the
+terminating null byte.
+.LP
+Upon successful completion, the \fIsnprintf\fP() function shall return
+the number of bytes that would be written to \fIs\fP
+had \fIn\fP been sufficiently large excluding the terminating null
+byte.
+.LP
+If an output error was encountered, these functions shall return a
+negative value.
+.LP
+If the value of \fIn\fP is zero on a call to \fIsnprintf\fP(), nothing
+shall be written, the number of bytes that would have
+been written had \fIn\fP been sufficiently large excluding the terminating
+null shall be returned, and \fIs\fP may be a null
+pointer.
+.SH ERRORS
+.LP
+For the conditions under which \fIfprintf\fP() and \fIprintf\fP()
+fail and may fail, refer to \fIfputc\fP() or \fIfputwc\fP().
+.LP
+In addition, all forms of \fIfprintf\fP() may fail if:
+.TP 7
+.B EILSEQ
+A wide-character code that does not correspond to a valid character
+has been detected.
+.TP 7
+.B EINVAL
+There are insufficient arguments.
+.sp
+.LP
+The \fIprintf\fP() and \fIfprintf\fP() functions may fail if:
+.TP 7
+.B ENOMEM
+Insufficient storage space is available.
+.sp
+.LP
+The \fIsnprintf\fP() function shall fail if:
+.TP 7
+.B EOVERFLOW
+The value of \fIn\fP is greater than {INT_MAX} or the number of bytes
+needed to hold the output excluding the terminating null is
+greater than {INT_MAX}.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Printing Language-Independent Date and Time
+.LP
+The following statement can be used to print date and time using a
+language-independent format:
+.sp
+.RS
+.nf
+
+\fBprintf(format, weekday, month, day, hour, min);
+\fP
+.fi
+.RE
+.LP
+For American usage, \fIformat\fP could be a pointer to the following
+string:
+.sp
+.RS
+.nf
+
+\fB"%s, %s %d, %d:%.2d\\n"
+\fP
+.fi
+.RE
+.LP
+This example would produce the following message:
+.sp
+.RS
+.nf
+
+\fBSunday, July 3, 10:02
+\fP
+.fi
+.RE
+.LP
+For German usage, \fIformat\fP could be a pointer to the following
+string:
+.sp
+.RS
+.nf
+
+\fB"%1$s, %3$d. %2$s, %4$d:%5$.2d\\n"
+\fP
+.fi
+.RE
+.LP
+This definition of \fIformat\fP would produce the following message:
+.sp
+.RS
+.nf
+
+\fBSonntag, 3. Juli, 10:02
+\fP
+.fi
+.RE
+.SS Printing File Information
+.LP
+The following example prints information about the type, permissions,
+and number of links of a specific file in a directory.
+.LP
+The first two calls to \fIprintf\fP() use data decoded from a previous
+\fIstat\fP() call.
+The user-defined \fIstrperm\fP() function shall return a string similar
+to the one at the beginning of the output for the
+following command:
+.sp
+.RS
+.nf
+
+\fBls -l
+\fP
+.fi
+.RE
+.LP
+The next call to \fIprintf\fP() outputs the owner's name if it is
+found using \fIgetpwuid\fP(); the \fIgetpwuid\fP() function shall
+return a \fBpasswd\fP structure from which the name of the user is
+extracted. If the user name is not found, the program instead
+prints out the numeric value of the user ID.
+.LP
+The next call prints out the group name if it is found using \fIgetgrgid\fP();
+\fIgetgrgid\fP() is very similar to \fIgetpwuid\fP() except that it
+shall return group information based on the group number. Once
+again, if the group is not found, the program prints the numeric value
+of the group for the entry.
+.LP
+The final call to \fIprintf\fP() prints the size of the file.
+.sp
+.RS
+.nf
+
+\fB#include <stdio.h>
+#include <sys/types.h>
+#include <pwd.h>
+#include <grp.h>
+.sp
+
+char *strperm (mode_t);
+\&...
+struct stat statbuf;
+struct passwd *pwd;
+struct group *grp;
+\&...
+printf("%10.10s", strperm (statbuf.st_mode));
+printf("%4d", statbuf.st_nlink);
+.sp
+
+if ((pwd = getpwuid(statbuf.st_uid)) != NULL)
+ printf(" %-8.8s", pwd->pw_name);
+else
+ printf(" %-8ld", (long) statbuf.st_uid);
+.sp
+
+if ((grp = getgrgid(statbuf.st_gid)) != NULL)
+ printf(" %-8.8s", grp->gr_name);
+else
+ printf(" %-8ld", (long) statbuf.st_gid);
+.sp
+
+printf("%9jd", (intmax_t) statbuf.st_size);
+\&...
+\fP
+.fi
+.RE
+.SS Printing a Localized Date String
+.LP
+The following example gets a localized date string. The \fInl_langinfo\fP()
+function shall return the localized date string, which specifies the
+order and layout of the date. The \fIstrftime\fP() function takes
+this information and, using the \fBtm\fP structure for values,
+places the date and time information into \fIdatestring\fP. The \fIprintf\fP()
+function then outputs \fIdatestring\fP and the
+name of the entry.
+.sp
+.RS
+.nf
+
+\fB#include <stdio.h>
+#include <time.h>
+#include <langinfo.h>
+\&...
+struct dirent *dp;
+struct tm *tm;
+char datestring[256];
+\&...
+strftime(datestring, sizeof(datestring), nl_langinfo (D_T_FMT), tm);
+.sp
+
+printf(" %s %s\\n", datestring, dp->d_name);
+\&...
+\fP
+.fi
+.RE
+.SS Printing Error Information
+.LP
+The following example uses \fIfprintf\fP() to write error information
+to standard error.
+.LP
+In the first group of calls, the program tries to open the password
+lock file named \fBLOCKFILE\fP. If the file already exists,
+this is an error, as indicated by the O_EXCL flag on the \fIopen\fP()
+function. If the call
+fails, the program assumes that someone else is updating the password
+file, and the program exits.
+.LP
+The next group of calls saves a new password file as the current password
+file by creating a link between \fBLOCKFILE\fP and
+the new password file \fBPASSWDFILE\fP.
+.sp
+.RS
+.nf
+
+\fB#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <errno.h>
+.sp
+
+#define LOCKFILE "/etc/ptmp"
+#define PASSWDFILE "/etc/passwd"
+\&...
+int pfd;
+\&...
+if ((pfd = open(LOCKFILE, O_WRONLY | O_CREAT | O_EXCL,
+ S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) == -1)
+{
+ fprintf(stderr, "Cannot open /etc/ptmp. Try again later.\\n");
+ exit(1);
+}
+\&...
+if (link(LOCKFILE,PASSWDFILE) == -1) {
+ fprintf(stderr, "Link error: %s\\n", strerror(errno));
+ exit(1);
+}
+\&...
+\fP
+.fi
+.RE
+.SS Printing Usage Information
+.LP
+The following example checks to make sure the program has the necessary
+arguments, and uses \fIfprintf\fP() to print usage
+information if the expected number of arguments is not present.
+.sp
+.RS
+.nf
+
+\fB#include <stdio.h>
+#include <stdlib.h>
+\&...
+char *Options = "hdbtl";
+\&...
+if (argc < 2) {
+ fprintf(stderr, "Usage: %s -%s <file\\n", argv[0], Options); exit(1);
+}
+\&...
+\fP
+.fi
+.RE
+.SS Formatting a Decimal String
+.LP
+The following example prints a key and data pair on \fIstdout\fP.
+Note use of the \fB'*'\fP (asterisk) in the format string;
+this ensures the correct number of decimal places for the element
+based on the number of elements requested.
+.sp
+.RS
+.nf
+
+\fB#include <stdio.h>
+\&...
+long i;
+char *keystr;
+int elementlen, len;
+\&...
+while (len < elementlen) {
+\&...
+ printf("%s Element%0*ld\\n", keystr, elementlen, i);
+\&...
+}
+\fP
+.fi
+.RE
+.SS Creating a Filename
+.LP
+The following example creates a filename using information from a
+previous \fIgetpwnam\fP() function that returned the HOME directory
+of the user.
+.sp
+.RS
+.nf
+
+\fB#include <stdio.h>
+#include <sys/types.h>
+#include <unistd.h>
+\&...
+char filename[PATH_MAX+1];
+struct passwd *pw;
+\&...
+sprintf(filename, "%s/%d.out", pw->pw_dir, getpid());
+\&...
+\fP
+.fi
+.RE
+.SS Reporting an Event
+.LP
+The following example loops until an event has timed out. The \fIpause\fP()
+function
+waits forever unless it receives a signal. The \fIfprintf\fP() statement
+should never occur due to the possible return values of
+\fIpause\fP().
+.sp
+.RS
+.nf
+
+\fB#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <errno.h>
+\&...
+while (!event_complete) {
+\&...
+ if (pause() != -1 || errno != EINTR)
+ fprintf(stderr, "pause: unknown error: %s\\n", strerror(errno));
+}
+\&...
+\fP
+.fi
+.RE
+.SS Printing Monetary Information
+.LP
+The following example uses \fIstrfmon\fP() to convert a number and
+store it as a
+formatted monetary string named \fIconvbuf\fP. If the first number
+is printed, the program prints the format and the description;
+otherwise, it just prints the number.
+.sp
+.RS
+.nf
+
+\fB#include <monetary.h>
+#include <stdio.h>
+\&...
+struct tblfmt {
+ char *format;
+ char *description;
+};
+.sp
+
+struct tblfmt table[] = {
+ { "%n", "default formatting" },
+ { "%11n", "right align within an 11 character field" },
+ { "%#5n", "aligned columns for values up to 99999" },
+ { "%=*#5n", "specify a fill character" },
+ { "%=0#5n", "fill characters do not use grouping" },
+ { "%^#5n", "disable the grouping separator" },
+ { "%^#5.0n", "round off to whole units" },
+ { "%^#5.4n", "increase the precision" },
+ { "%(#5n", "use an alternative pos/neg style" },
+ { "%!(#5n", "disable the currency symbol" },
+};
+\&...
+float input[3];
+int i, j;
+char convbuf[100];
+\&...
+strfmon(convbuf, sizeof(convbuf), table[i].format, input[j]);
+.sp
+
+if (j == 0) {
+ printf("%s %s %s\\n", table[i].format,
+ convbuf, table[i].description);
+}
+else {
+ printf(" %s\\n", convbuf);
+}
+\&...
+\fP
+.fi
+.RE
+.SS Printing Wide Characters
+.LP
+The following example prints a series of wide characters. Suppose
+that \fB"L`@`"\fP expands to three bytes:
+.sp
+.RS
+.nf
+
+\fBwchar_t wz [3] = L"@@"; // Zero-terminated
+wchar_t wn [3] = L"@@@"; // Unterminated
+.sp
+
+fprintf (stdout,"%ls", wz); // Outputs 6 bytes
+fprintf (stdout,"%ls", wn); // Undefined because wn has no terminator
+fprintf (stdout,"%4ls", wz); // Outputs 3 bytes
+fprintf (stdout,"%4ls", wn); // Outputs 3 bytes; no terminator needed
+fprintf (stdout,"%9ls", wz); // Outputs 6 bytes
+fprintf (stdout,"%9ls", wn); // Outputs 9 bytes; no terminator needed
+fprintf (stdout,"%10ls", wz); // Outputs 6 bytes
+fprintf (stdout,"%10ls", wn); // Undefined because wn has no terminator
+\fP
+.fi
+.RE
+.LP
+In the last line of the example, after processing three characters,
+nine bytes have been output. The fourth character must then
+be examined to determine whether it converts to one byte or more.
+If it converts to more than one byte, the output is only nine
+bytes. Since there is no fourth character in the array, the behavior
+is undefined.
+.SH APPLICATION USAGE
+.LP
+If the application calling \fIfprintf\fP() has any objects of type
+\fBwint_t\fP or \fBwchar_t\fP, it must also include the \fI<wchar.h>\fP
+header to have these objects defined.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfputc\fP(), \fIfscanf\fP(), \fIsetlocale\fP(), \fIstrfmon\fP(),
+\fIwcrtomb\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 7,
+Locale, \fI<stdio.h>\fP, \fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pselect.3p b/man-pages-posix-2003/man3p/pselect.3p
new file mode 100644
index 0000000..24347e4
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pselect.3p
@@ -0,0 +1 @@
+.so man3p/select.3p
diff --git a/man-pages-posix-2003/man3p/pthread_atfork.3p b/man-pages-posix-2003/man3p/pthread_atfork.3p
new file mode 100644
index 0000000..fc60700
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_atfork.3p
@@ -0,0 +1,158 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_ATFORK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_atfork
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_atfork \- register fork handlers
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_atfork(void (*\fP\fIprepare\fP\fB)(void), void (*\fP\fIparent\fP\fB)(void),
+.br
+\ \ \ \ \ \ void (*\fP\fIchild\fP\fB)(void)); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_atfork\fP() function shall declare fork handlers to
+be called before and after \fIfork\fP(), in the context of the thread
+that called \fIfork\fP(). The \fIprepare\fP fork handler shall be
+called before \fIfork\fP() processing commences. The \fIparent\fP
+fork handle shall be called after \fIfork\fP() processing completes
+in the parent process. The \fIchild\fP fork handler shall be
+called after \fIfork\fP() processing completes in the child process.
+If no handling is
+desired at one or more of these three points, the corresponding fork
+handler address(es) may be set to NULL.
+.LP
+The order of calls to \fIpthread_atfork\fP() is significant. The \fIparent\fP
+and \fIchild\fP fork handlers shall be called
+in the order in which they were established by calls to \fIpthread_atfork\fP().
+The \fIprepare\fP fork handlers shall be called
+in the opposite order.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIpthread_atfork\fP() shall return a
+value of zero; otherwise, an error number shall be returned
+to indicate the error.
+.SH ERRORS
+.LP
+The \fIpthread_atfork\fP() function shall fail if:
+.TP 7
+.B ENOMEM
+Insufficient table space exists to record the fork handler addresses.
+.sp
+.LP
+The \fIpthread_atfork\fP() function shall not return an error code
+of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+There are at least two serious problems with the semantics of \fIfork\fP()
+in a
+multi-threaded program. One problem has to do with state (for example,
+memory) covered by mutexes. Consider the case where one
+thread has a mutex locked and the state covered by that mutex is inconsistent
+while another thread calls \fIfork\fP(). In the child, the mutex is
+in the locked state (locked by a nonexistent thread and thus
+can never be unlocked). Having the child simply reinitialize the mutex
+is unsatisfactory since this approach does not resolve the
+question about how to correct or otherwise deal with the inconsistent
+state in the child.
+.LP
+It is suggested that programs that use \fIfork\fP() call an \fIexec\fP
+function very soon afterwards in the child process, thus resetting
+all states. In the
+meantime, only a short list of async-signal-safe library routines
+are promised to be available.
+.LP
+Unfortunately, this solution does not address the needs of multi-threaded
+libraries. Application programs may not be aware that
+a multi-threaded library is in use, and they feel free to call any
+number of library routines between the \fIfork\fP() and \fIexec\fP
+calls, just as they always have.
+Indeed, they may be extant single-threaded programs and cannot, therefore,
+be expected to obey new restrictions imposed by the
+threads library.
+.LP
+On the other hand, the multi-threaded library needs a way to protect
+its internal state during \fIfork\fP() in case it is re-entered later
+in the child process. The problem arises especially in
+multi-threaded I/O libraries, which are almost sure to be invoked
+between the \fIfork\fP()
+and \fIexec\fP calls to effect I/O redirection. The solution may require
+locking mutex
+variables during \fIfork\fP(), or it may entail simply resetting the
+state in the child after
+the \fIfork\fP() processing completes.
+.LP
+The \fIpthread_atfork\fP() function provides multi-threaded libraries
+with a means to protect themselves from innocent
+application programs that call \fIfork\fP(), and it provides multi-threaded
+application
+programs with a standard mechanism for protecting themselves from
+\fIfork\fP() calls in a
+library routine or the application itself.
+.LP
+The expected usage is that the \fIprepare\fP handler acquires all
+mutex locks and the other two fork handlers release them.
+.LP
+For example, an application can supply a \fIprepare\fP routine that
+acquires the necessary mutexes the library maintains and
+supply \fIchild\fP and \fIparent\fP routines that release those mutexes,
+thus ensuring that the child gets a consistent snapshot
+of the state of the library (and that no mutexes are left stranded).
+Alternatively, some libraries might be able to supply just a
+\fIchild\fP routine that reinitializes the mutexes in the library
+and all associated states to some known value (for example, what
+it was when the image was originally executed).
+.LP
+When \fIfork\fP() is called, only the calling thread is duplicated
+in the child process.
+Synchronization variables remain in the same state in the child as
+they were in the parent at the time \fIfork\fP() was called. Thus,
+for example, mutex locks may be held by threads that no longer exist
+in the child process, and any associated states may be inconsistent.
+The parent process may avoid this by explicit code that
+acquires and releases locks critical to the child via \fIpthread_atfork\fP().
+In addition, any critical threads need to be
+recreated and reinitialized to the proper state in the child (also
+via \fIpthread_atfork\fP()).
+.LP
+A higher-level package may acquire locks on its own data structures
+before invoking lower-level packages. Under this scenario,
+the order specified for fork handler calls allows a simple rule of
+initialization for avoiding package deadlock: a package
+initializes all packages on which it depends before it calls the \fIpthread_atfork\fP()
+function for itself.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIatexit\fP(), \fIfork\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<sys/types.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_attr_destroy.3p b/man-pages-posix-2003/man3p/pthread_attr_destroy.3p
new file mode 100644
index 0000000..c453440
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_attr_destroy.3p
@@ -0,0 +1 @@
+.so man3p/pthread_attr_init.3p
diff --git a/man-pages-posix-2003/man3p/pthread_attr_getdetachstate.3p b/man-pages-posix-2003/man3p/pthread_attr_getdetachstate.3p
new file mode 100644
index 0000000..364ca3e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_attr_getdetachstate.3p
@@ -0,0 +1,97 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_ATTR_GETDETACHSTATE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_attr_getdetachstate
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_attr_getdetachstate, pthread_attr_setdetachstate \- get and
+set the detachstate attribute
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_attr_getdetachstate(const pthread_attr_t *\fP\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ int *\fP\fIdetachstate\fP\fB);
+.br
+int pthread_attr_setdetachstate(pthread_attr_t *\fP\fIattr\fP\fB,
+int\fP \fIdetachstate\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIdetachstate\fP attribute controls whether the thread is created
+in a detached state. If the thread is created detached,
+then use of the ID of the newly created thread by the \fIpthread_detach\fP()
+or \fIpthread_join\fP() function is an error.
+.LP
+The \fIpthread_attr_getdetachstate\fP() and \fIpthread_attr_setdetachstate\fP()
+functions, respectively, shall get and set the
+\fIdetachstate\fP attribute in the \fIattr\fP object.
+.LP
+For \fIpthread_attr_getdetachstate\fP(), \fIdetachstate\fP shall be
+set to either PTHREAD_CREATE_DETACHED or
+PTHREAD_CREATE_JOINABLE.
+.LP
+For \fIpthread_attr_setdetachstate\fP(), the application shall set
+\fIdetachstate\fP to either PTHREAD_CREATE_DETACHED or
+PTHREAD_CREATE_JOINABLE.
+.LP
+A value of PTHREAD_CREATE_DETACHED shall cause all threads created
+with \fIattr\fP to be in the detached state, whereas using a
+value of PTHREAD_CREATE_JOINABLE shall cause all threads created with
+\fIattr\fP to be in the joinable state. The default value of
+the \fIdetachstate\fP attribute shall be PTHREAD_CREATE_JOINABLE.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIpthread_attr_getdetachstate\fP() and
+\fIpthread_attr_setdetachstate\fP() shall return a value
+of 0; otherwise, an error number shall be returned to indicate the
+error.
+.LP
+The \fIpthread_attr_getdetachstate\fP() function stores the value
+of the \fIdetachstate\fP attribute in \fIdetachstate\fP if
+successful.
+.SH ERRORS
+.LP
+The \fIpthread_attr_setdetachstate\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The value of \fIdetachstate\fP was not valid
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_attr_destroy\fP(), \fIpthread_attr_getstackaddr\fP(),
+\fIpthread_attr_getstacksize\fP(), \fIpthread_create\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_attr_getguardsize.3p b/man-pages-posix-2003/man3p/pthread_attr_getguardsize.3p
new file mode 100644
index 0000000..ce8200b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_attr_getguardsize.3p
@@ -0,0 +1,127 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_ATTR_GETGUARDSIZE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_attr_getguardsize
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_attr_getguardsize, pthread_attr_setguardsize \- get and set
+the thread guardsize attribute
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_attr_getguardsize(const pthread_attr_t *restrict\fP \fIattr\fP\fB,
+.br
+\ \ \ \ \ \ size_t *restrict\fP \fIguardsize\fP\fB);
+.br
+int pthread_attr_setguardsize(pthread_attr_t\fP \fI*attr\fP\fB,
+.br
+\ \ \ \ \ \ size_t\fP \fIguardsize\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_attr_getguardsize\fP() function shall get the \fIguardsize\fP
+attribute in the \fIattr\fP object. This
+attribute shall be returned in the \fIguardsize\fP parameter.
+.LP
+The \fIpthread_attr_setguardsize\fP() function shall set the \fIguardsize\fP
+attribute in the \fIattr\fP object. The new
+value of this attribute shall be obtained from the \fIguardsize\fP
+parameter. If \fIguardsize\fP is zero, a guard area shall not
+be provided for threads created with \fIattr\fP. If \fIguardsize\fP
+is greater than zero, a guard area of at least size
+\fIguardsize\fP bytes shall be provided for each thread created with
+\fIattr\fP.
+.LP
+The \fIguardsize\fP attribute controls the size of the guard area
+for the created thread's stack. The \fIguardsize\fP
+attribute provides protection against overflow of the stack pointer.
+If a thread's stack is created with guard protection, the
+implementation allocates extra memory at the overflow end of the stack
+as a buffer against stack overflow of the stack pointer. If
+an application overflows into this buffer an error shall result (possibly
+in a SIGSEGV signal being delivered to the thread).
+.LP
+A conforming implementation may round up the value contained in \fIguardsize\fP
+to a multiple of the configurable system
+variable {PAGESIZE} (see \fI<sys/mman.h>\fP). If an implementation
+rounds up the
+value of \fIguardsize\fP to a multiple of {PAGESIZE}, a call to \fIpthread_attr_getguardsize\fP()
+specifying \fIattr\fP shall
+store in the \fIguardsize\fP parameter the guard size specified by
+the previous \fIpthread_attr_setguardsize\fP() function
+call.
+.LP
+The default value of the \fIguardsize\fP attribute is {PAGESIZE} bytes.
+The actual value of {PAGESIZE} is
+implementation-defined.
+.LP
+If the \fIstackaddr\fP or \fIstack\fP attribute has been set (that
+is, the caller is allocating and managing its own thread
+stacks), the \fIguardsize\fP attribute shall be ignored and no protection
+shall be provided by the implementation. It is the
+responsibility of the application to manage stack overflow along with
+stack allocation and management in this case.
+.SH RETURN VALUE
+.LP
+If successful, the \fIpthread_attr_getguardsize\fP() and \fIpthread_attr_setguardsize\fP()
+functions shall return zero;
+otherwise, an error number shall be returned to indicate the error.
+.SH ERRORS
+.LP
+The \fIpthread_attr_getguardsize\fP() and \fIpthread_attr_setguardsize\fP()
+functions shall fail if:
+.TP 7
+.B EINVAL
+The attribute \fIattr\fP is invalid.
+.TP 7
+.B EINVAL
+The parameter \fIguardsize\fP is invalid.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIguardsize\fP attribute is provided to the application for two
+reasons:
+.IP " 1." 4
+Overflow protection can potentially result in wasted system resources.
+An application that creates a large number of threads,
+and which knows its threads never overflow their stack, can save system
+resources by turning off guard areas.
+.LP
+.IP " 2." 4
+When threads allocate large data structures on the stack, large guard
+areas may be needed to detect stack overflow.
+.LP
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP,
+\fI<sys/mman.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_attr_getinheritsched.3p b/man-pages-posix-2003/man3p/pthread_attr_getinheritsched.3p
new file mode 100644
index 0000000..ae03bae
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_attr_getinheritsched.3p
@@ -0,0 +1,108 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_ATTR_GETINHERITSCHED" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_attr_getinheritsched
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_attr_getinheritsched, pthread_attr_setinheritsched \- get and
+set the inheritsched attribute (\fBREALTIME
+THREADS\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_attr_getinheritsched(const pthread_attr_t *restrict\fP
+\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ int *restrict\fP \fIinheritsched\fP\fB);
+.br
+int pthread_attr_setinheritsched(pthread_attr_t *\fP\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ int\fP \fIinheritsched\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_attr_getinheritsched\fP(), and \fIpthread_attr_setinheritsched\fP()
+functions, respectively, shall get and set
+the \fIinheritsched\fP attribute in the \fIattr\fP argument.
+.LP
+When the attributes objects are used by \fIpthread_create\fP(), the
+\fIinheritsched\fP attribute determines how the other scheduling attributes
+of the created thread shall be set.
+.TP 7
+PTHREAD_INHERIT_SCHED
+.sp
+Specifies that the thread scheduling attributes shall be inherited
+from the creating thread, and the scheduling attributes in this
+\fIattr\fP argument shall be ignored.
+.TP 7
+PTHREAD_EXPLICIT_SCHED
+.sp
+Specifies that the thread scheduling attributes shall be set to the
+corresponding values from this attributes object.
+.sp
+.LP
+The symbols PTHREAD_INHERIT_SCHED and PTHREAD_EXPLICIT_SCHED are defined
+in the \fI<pthread.h>\fP header.
+.LP
+The following thread scheduling attributes defined by IEEE\ Std\ 1003.1-2001
+are affected by the \fIinheritsched\fP
+attribute: scheduling policy ( \fIschedpolicy\fP), scheduling parameters
+( \fIschedparam\fP), and scheduling contention scope (
+\fIcontentionscope\fP).
+.SH RETURN VALUE
+.LP
+If successful, the \fIpthread_attr_getinheritsched\fP() and \fIpthread_attr_setinheritsched\fP()
+functions shall return zero;
+otherwise, an error number shall be returned to indicate the error.
+.SH ERRORS
+.LP
+The \fIpthread_attr_setinheritsched\fP() function may fail if:
+.TP 7
+.B EINVAL
+The value of \fIinheritsched\fP is not valid.
+.TP 7
+.B ENOTSUP
+An attempt was made to set the attribute to an unsupported value.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+After these attributes have been set, a thread can be created with
+the specified attributes using \fIpthread_create\fP(). Using these
+routines does not affect the current running
+thread.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_attr_destroy\fP(), \fIpthread_attr_getscope\fP(), \fIpthread_attr_getschedpolicy\fP(),
+\fIpthread_attr_getschedparam\fP(), \fIpthread_create\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP,
+\fI<sched.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_attr_getschedparam.3p b/man-pages-posix-2003/man3p/pthread_attr_getschedparam.3p
new file mode 100644
index 0000000..8782243
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_attr_getschedparam.3p
@@ -0,0 +1,97 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_ATTR_GETSCHEDPARAM" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_attr_getschedparam
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_attr_getschedparam, pthread_attr_setschedparam \- get and set
+the schedparam attribute
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_attr_getschedparam(const pthread_attr_t *restrict\fP \fIattr\fP\fB,
+.br
+\ \ \ \ \ \ struct sched_param *restrict\fP \fIparam\fP\fB);
+.br
+int pthread_attr_setschedparam(pthread_attr_t *restrict\fP \fIattr\fP\fB,
+.br
+\ \ \ \ \ \ const struct sched_param *restrict\fP \fIparam\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_attr_getschedparam\fP(), and \fIpthread_attr_setschedparam\fP()
+functions, respectively, shall get and set the
+scheduling parameter attributes in the \fIattr\fP argument. The contents
+of the \fIparam\fP structure are defined in the \fI<sched.h>\fP header.
+For the SCHED_FIFO and SCHED_RR policies, the only required member
+of
+\fIparam\fP is \fIsched_priority\fP.
+.LP
+For the SCHED_SPORADIC policy, the required members of the \fIparam\fP
+structure are \fIsched_priority\fP,
+\fIsched_ss_low_priority\fP, \fIsched_ss_repl_period\fP, \fIsched_ss_init_budget\fP,
+and \fIsched_ss_max_repl\fP. The specified
+\fIsched_ss_repl_period\fP must be greater than or equal to the specified
+\fIsched_ss_init_budget\fP for the function to succeed;
+if it is not, then the function shall fail. The value of \fIsched_ss_max_repl\fP
+shall be within the inclusive range [1,
+{SS_REPL_MAX}] for the function to succeed; if not, the function shall
+fail.
+.SH RETURN VALUE
+.LP
+If successful, the \fIpthread_attr_getschedparam\fP() and \fIpthread_attr_setschedparam\fP()
+functions shall return zero;
+otherwise, an error number shall be returned to indicate the error.
+.SH ERRORS
+.LP
+The \fIpthread_attr_setschedparam\fP() function may fail if:
+.TP 7
+.B EINVAL
+The value of \fIparam\fP is not valid.
+.TP 7
+.B ENOTSUP
+An attempt was made to set the attribute to an unsupported value.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+After these attributes have been set, a thread can be created with
+the specified attributes using \fIpthread_create\fP(). Using these
+routines does not affect the current running
+thread.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_attr_destroy\fP(), \fIpthread_attr_getscope\fP(), \fIpthread_attr_getinheritsched\fP(),
+\fIpthread_attr_getschedpolicy\fP(), \fIpthread_create\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP,
+\fI<sched.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_attr_getschedpolicy.3p b/man-pages-posix-2003/man3p/pthread_attr_getschedpolicy.3p
new file mode 100644
index 0000000..3dab600
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_attr_getschedpolicy.3p
@@ -0,0 +1,88 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_ATTR_GETSCHEDPOLICY" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_attr_getschedpolicy
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_attr_getschedpolicy, pthread_attr_setschedpolicy \- get and
+set the schedpolicy attribute (\fBREALTIME
+THREADS\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_attr_getschedpolicy(const pthread_attr_t *restrict\fP
+\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ int *restrict\fP \fIpolicy\fP\fB);
+.br
+int pthread_attr_setschedpolicy(pthread_attr_t *\fP\fIattr\fP\fB,
+int\fP \fIpolicy\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_attr_getschedpolicy\fP() and \fIpthread_attr_setschedpolicy\fP()
+functions, respectively, shall get and set the
+\fIschedpolicy\fP attribute in the \fIattr\fP argument.
+.LP
+The supported values of \fIpolicy\fP shall include SCHED_FIFO, SCHED_RR,
+and SCHED_OTHER, which are defined in the \fI<sched.h>\fP header.
+When threads executing with the scheduling policy SCHED_FIFO,
+SCHED_RR, or SCHED_SPORADIC are waiting on a mutex, they
+shall acquire the mutex in priority order when the mutex is unlocked.
+.SH RETURN VALUE
+.LP
+If successful, the \fIpthread_attr_getschedpolicy\fP() and \fIpthread_attr_setschedpolicy\fP()
+functions shall return zero;
+otherwise, an error number shall be returned to indicate the error.
+.SH ERRORS
+.LP
+The \fIpthread_attr_setschedpolicy\fP() function may fail if:
+.TP 7
+.B EINVAL
+The value of \fIpolicy\fP is not valid.
+.TP 7
+.B ENOTSUP
+An attempt was made to set the attribute to an unsupported value.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+After these attributes have been set, a thread can be created with
+the specified attributes using \fIpthread_create\fP(). Using these
+routines does not affect the current running
+thread.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_attr_destroy\fP(), \fIpthread_attr_getscope\fP(), \fIpthread_attr_getinheritsched\fP(),
+\fIpthread_attr_getschedparam\fP(), \fIpthread_create\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP,
+\fI<sched.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_attr_getscope.3p b/man-pages-posix-2003/man3p/pthread_attr_getscope.3p
new file mode 100644
index 0000000..37c9dc1
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_attr_getscope.3p
@@ -0,0 +1,87 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_ATTR_GETSCOPE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_attr_getscope
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_attr_getscope, pthread_attr_setscope \- get and set the contentionscope
+attribute (\fBREALTIME
+THREADS\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_attr_getscope(const pthread_attr_t *restrict\fP \fIattr\fP\fB,
+.br
+\ \ \ \ \ \ int *restrict\fP \fIcontentionscope\fP\fB);
+.br
+int pthread_attr_setscope(pthread_attr_t *\fP\fIattr\fP\fB, int\fP
+\fIcontentionscope\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_attr_getscope\fP() and \fIpthread_attr_setscope\fP()
+functions, respectively, shall get and set the
+\fIcontentionscope\fP attribute in the \fIattr\fP object.
+.LP
+The \fIcontentionscope\fP attribute may have the values PTHREAD_SCOPE_SYSTEM,
+signifying system scheduling contention scope, or
+PTHREAD_SCOPE_PROCESS, signifying process scheduling contention scope.
+The symbols PTHREAD_SCOPE_SYSTEM and PTHREAD_SCOPE_PROCESS
+are defined in the \fI<pthread.h>\fP header.
+.SH RETURN VALUE
+.LP
+If successful, the \fIpthread_attr_getscope\fP() and \fIpthread_attr_setscope\fP()
+functions shall return zero; otherwise, an
+error number shall be returned to indicate the error.
+.SH ERRORS
+.LP
+The \fIpthread_attr_setscope\fP() function may fail if:
+.TP 7
+.B EINVAL
+The value of \fIcontentionscope\fP is not valid.
+.TP 7
+.B ENOTSUP
+An attempt was made to set the attribute to an unsupported value.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+After these attributes have been set, a thread can be created with
+the specified attributes using \fIpthread_create\fP(). Using these
+routines does not affect the current running
+thread.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_attr_destroy\fP(), \fIpthread_attr_getinheritsched\fP(),
+\fIpthread_attr_getschedpolicy\fP(), \fIpthread_attr_getschedparam\fP(),
+\fIpthread_create\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<pthread.h>\fP, \fI<sched.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_attr_getstack.3p b/man-pages-posix-2003/man3p/pthread_attr_getstack.3p
new file mode 100644
index 0000000..c103dff
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_attr_getstack.3p
@@ -0,0 +1,118 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_ATTR_GETSTACK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_attr_getstack
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_attr_getstack, pthread_attr_setstack \- get and set stack attributes
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+\fBint pthread_attr_getstack(const pthread_attr_t *restrict\fP \fIattr\fP\fB,
+.br
+\ \ \ \ \ \ void **restrict\fP \fIstackaddr\fP\fB, size_t *restrict\fP
+\fIstacksize\fP\fB);
+.br
+int pthread_attr_setstack(pthread_attr_t *\fP\fIattr\fP\fB, void *\fP\fIstackaddr\fP\fB,
+.br
+\ \ \ \ \ \ size_t\fP \fIstacksize\fP\fB); \fP
+.sp
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_attr_getstack\fP() and \fIpthread_attr_setstack\fP()
+functions, respectively, shall get and set the thread
+creation stack attributes \fIstackaddr\fP and \fIstacksize\fP in the
+\fIattr\fP object.
+.LP
+The stack attributes specify the area of storage to be used for the
+created thread's stack. The base (lowest addressable byte)
+of the storage shall be \fIstackaddr\fP, and the size of the storage
+shall be \fIstacksize\fP bytes. The \fIstacksize\fP shall
+be at least {PTHREAD_STACK_MIN}. The \fIstackaddr\fP shall be aligned
+appropriately to be used as a stack; for example,
+\fIpthread_attr_setstack\fP() may fail with [EINVAL] if ( \fIstackaddr\fP
+& 0x7) is not 0. All pages within the stack
+described by \fIstackaddr\fP and \fIstacksize\fP shall be both readable
+and writable by the thread.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return a value of
+0; otherwise, an error number shall be returned to indicate
+the error.
+.LP
+The \fIpthread_attr_getstack\fP() function shall store the stack attribute
+values in \fIstackaddr\fP and \fIstacksize\fP if
+successful.
+.SH ERRORS
+.LP
+The \fIpthread_attr_setstack\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The value of \fIstacksize\fP is less than {PTHREAD_STACK_MIN} or exceeds
+an implementation-defined limit.
+.sp
+.LP
+The \fIpthread_attr_setstack\fP() function may fail if:
+.TP 7
+.B EINVAL
+The value of \fIstackaddr\fP does not have proper alignment to be
+used as a stack, or if ( \fIstackaddr\fP +
+\fIstacksize\fP) lacks proper alignment.
+.TP 7
+.B EACCES
+The stack page(s) described by \fIstackaddr\fP and \fIstacksize\fP
+are not both readable and writable by the thread.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+These functions are appropriate for use by applications in an environment
+where the stack for a thread must be placed in some
+particular region of memory.
+.LP
+While it might seem that an application could detect stack overflow
+by providing a protected page outside the specified stack
+region, this cannot be done portably. Implementations are free to
+place the thread's initial stack pointer anywhere within the
+specified region to accommodate the machine's stack pointer behavior
+and allocation requirements. Furthermore, on some
+architectures, such as the IA-64, "overflow" might mean that two separate
+stack pointers allocated within the region will overlap
+somewhere in the middle of the region.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_attr_init\fP(), \fIpthread_attr_setdetachstate\fP(),
+\fIpthread_attr_setstacksize\fP(), \fIpthread_create\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<limits.h>\fP,
+\fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_attr_getstackaddr.3p b/man-pages-posix-2003/man3p/pthread_attr_getstackaddr.3p
new file mode 100644
index 0000000..af25b83
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_attr_getstackaddr.3p
@@ -0,0 +1,98 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_ATTR_GETSTACKADDR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_attr_getstackaddr
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_attr_getstackaddr, pthread_attr_setstackaddr \- get and set
+the stackaddr attribute
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+\fP
+.LP
+\fBint pthread_attr_getstackaddr(const pthread_attr_t *restrict\fP
+\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ void **restrict\fP \fIstackaddr\fP\fB);
+.br
+int pthread_attr_setstackaddr(pthread_attr_t *\fP\fIattr\fP\fB, void
+*\fP\fIstackaddr\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_attr_getstackaddr\fP() and \fIpthread_attr_setstackaddr\fP()
+functions, respectively, shall get and set the
+thread creation \fIstackaddr\fP attribute in the \fIattr\fP object.
+.LP
+The \fIstackaddr\fP attribute specifies the location of storage to
+be used for the created thread's stack. The size of the
+storage shall be at least {PTHREAD_STACK_MIN}.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIpthread_attr_getstackaddr\fP() and
+\fIpthread_attr_setstackaddr\fP() shall return a value of 0;
+otherwise, an error number shall be returned to indicate the error.
+.LP
+The \fIpthread_attr_getstackaddr\fP() function stores the \fIstackaddr\fP
+attribute value in \fIstackaddr\fP if
+successful.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The specification of the \fIstackaddr\fP attribute presents several
+ambiguities that make portable use of these interfaces
+impossible. The description of the single address parameter as a "stack"
+does not specify a particular relationship between the
+address and the "stack" implied by that address. For example, the
+address may be taken as the low memory address of a buffer
+intended for use as a stack, or it may be taken as the address to
+be used as the initial stack pointer register value for the new
+thread. These two are not the same except for a machine on which the
+stack grows "up" from low memory to high, and on which a
+"push" operation first stores the value in memory and then increments
+the stack pointer register. Further, on a machine where the
+stack grows "down" from high memory to low, interpretation of the
+address as the "low memory" address requires a determination
+of the intended size of the stack. IEEE\ Std\ 1003.1-2001 has introduced
+the new interfaces \fIpthread_attr_setstack\fP() and \fIpthread_attr_getstack\fP()
+to resolve these ambiguities.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_attr_destroy\fP(), \fIpthread_attr_getdetachstate\fP(),
+\fIpthread_attr_getstack\fP(), \fIpthread_attr_getstacksize\fP(),
+\fIpthread_attr_setstack\fP(), \fIpthread_create\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<limits.h>\fP,
+\fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_attr_getstacksize.3p b/man-pages-posix-2003/man3p/pthread_attr_getstacksize.3p
new file mode 100644
index 0000000..0f4c9d7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_attr_getstacksize.3p
@@ -0,0 +1,82 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_ATTR_GETSTACKSIZE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_attr_getstacksize
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_attr_getstacksize, pthread_attr_setstacksize \- get and set
+the stacksize attribute
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_attr_getstacksize(const pthread_attr_t *restrict\fP \fIattr\fP\fB,
+.br
+\ \ \ \ \ \ size_t *restrict\fP \fIstacksize\fP\fB);
+.br
+int pthread_attr_setstacksize(pthread_attr_t *\fP\fIattr\fP\fB, size_t\fP
+\fIstacksize\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_attr_getstacksize\fP() and \fIpthread_attr_setstacksize\fP()
+functions, respectively, shall get and set the
+thread creation \fIstacksize\fP attribute in the \fIattr\fP object.
+.LP
+The \fIstacksize\fP attribute shall define the minimum stack size
+(in bytes) allocated for the created threads stack.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIpthread_attr_getstacksize\fP() and
+\fIpthread_attr_setstacksize\fP() shall return a value of 0;
+otherwise, an error number shall be returned to indicate the error.
+.LP
+The \fIpthread_attr_getstacksize\fP() function stores the \fIstacksize\fP
+attribute value in \fIstacksize\fP if
+successful.
+.SH ERRORS
+.LP
+The \fIpthread_attr_setstacksize\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The value of \fIstacksize\fP is less than {PTHREAD_STACK_MIN} or exceeds
+a system-imposed limit.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_attr_destroy\fP(), \fIpthread_attr_getstackaddr\fP(),
+\fIpthread_attr_getdetachstate\fP(), \fIpthread_create\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<limits.h>\fP,
+\fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_attr_init.3p b/man-pages-posix-2003/man3p/pthread_attr_init.3p
new file mode 100644
index 0000000..4fb7c23
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_attr_init.3p
@@ -0,0 +1,190 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_ATTR_DESTROY" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_attr_destroy
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_attr_destroy, pthread_attr_init \- destroy and initialize the
+thread attributes object
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_attr_destroy(pthread_attr_t *\fP\fIattr\fP\fB);
+.br
+int pthread_attr_init(pthread_attr_t *\fP\fIattr\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_attr_destroy\fP() function shall destroy a thread attributes
+object. An implementation may cause
+\fIpthread_attr_destroy\fP() to set \fIattr\fP to an implementation-defined
+invalid value. A destroyed \fIattr\fP attributes
+object can be reinitialized using \fIpthread_attr_init\fP(); the results
+of otherwise referencing the object after it has been
+destroyed are undefined.
+.LP
+The \fIpthread_attr_init\fP() function shall initialize a thread attributes
+object \fIattr\fP with the default value for all
+of the individual attributes used by a given implementation.
+.LP
+The resulting attributes object (possibly modified by setting individual
+attribute values) when used by \fIpthread_create\fP() defines the
+attributes of the thread created. A single attributes
+object can be used in multiple simultaneous calls to \fIpthread_create\fP().
+Results are undefined if \fIpthread_attr_init\fP() is called specifying
+an already initialized \fIattr\fP attributes object.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIpthread_attr_destroy\fP() and \fIpthread_attr_init\fP()
+shall return a value of 0; otherwise,
+an error number shall be returned to indicate the error.
+.SH ERRORS
+.LP
+The \fIpthread_attr_init\fP() function shall fail if:
+.TP 7
+.B ENOMEM
+Insufficient memory exists to initialize the thread attributes object.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+Attributes objects are provided for threads, mutexes, and condition
+variables as a mechanism to support probable future
+standardization in these areas without requiring that the function
+itself be changed.
+.LP
+Attributes objects provide clean isolation of the configurable aspects
+of threads. For example, "stack size" is an important
+attribute of a thread, but it cannot be expressed portably. When porting
+a threaded program, stack sizes often need to be adjusted.
+The use of attributes objects can help by allowing the changes to
+be isolated in a single place, rather than being spread across
+every instance of thread creation.
+.LP
+Attributes objects can be used to set up "classes' of threads with
+similar attributes; for example, "threads with large stacks
+and high priority" or "threads with minimal stacks". These classes
+can be defined in a single place and then referenced wherever
+threads need to be created. Changes to "class" decisions become straightforward,
+and detailed analysis of each \fIpthread_create\fP() call is not required.
+.LP
+The attributes objects are defined as opaque types as an aid to extensibility.
+If these objects had been specified as
+structures, adding new attributes would force recompilation of all
+multi-threaded programs when the attributes objects are
+extended; this might not be possible if different program components
+were supplied by different vendors.
+.LP
+Additionally, opaque attributes objects present opportunities for
+improving performance. Argument validity can be checked once
+when attributes are set, rather than each time a thread is created.
+Implementations often need to cache kernel objects that are
+expensive to create. Opaque attributes objects provide an efficient
+mechanism to detect when cached objects become invalid due to
+attribute changes.
+.LP
+Since assignment is not necessarily defined on a given opaque type,
+implementation-defined default values cannot be defined in a
+portable way. The solution to this problem is to allow attributes
+objects to be initialized dynamically by attributes object
+initialization functions, so that default values can be supplied automatically
+by the implementation.
+.LP
+The following proposal was provided as a suggested alternative to
+the supplied attributes:
+.IP " 1." 4
+Maintain the style of passing a parameter formed by the bitwise-inclusive
+OR of flags to the initialization routines ( \fIpthread_create\fP(),
+\fIpthread_mutex_init\fP(), \fIpthread_cond_init\fP()). The parameter
+containing the flags should be an opaque type
+for extensibility. If no flags are set in the parameter, then the
+objects are created with default characteristics. An
+implementation may specify implementation-defined flag values and
+associated behavior.
+.LP
+.IP " 2." 4
+If further specialization of mutexes and condition variables is necessary,
+implementations may specify additional procedures
+that operate on the \fBpthread_mutex_t\fP and \fBpthread_cond_t\fP
+objects (instead of on attributes objects).
+.LP
+.LP
+The difficulties with this solution are:
+.IP " 1." 4
+A bitmask is not opaque if bits have to be set into bitvector attributes
+objects using explicitly-coded bitwise-inclusive OR
+operations. If the set of options exceeds an \fBint\fP, application
+programmers need to know the location of each bit. If bits are
+set or read by encapsulation (that is, get and set functions), then
+the bitmask is merely an implementation of attributes objects
+as currently defined and should not be exposed to the programmer.
+.LP
+.IP " 2." 4
+Many attributes are not Boolean or very small integral values. For
+example, scheduling policy may be placed in 3-bit or 4-bit,
+but priority requires 5-bit or more, thereby taking up at least 8
+bits out of a possible 16 bits on machines with 16-bit integers.
+Because of this, the bitmask can only reasonably control whether particular
+attributes are set or not, and it cannot serve as the
+repository of the value itself. The value needs to be specified as
+a function parameter (which is non-extensible), or by setting a
+structure field (which is non-opaque), or by get and set functions
+(making the bitmask a redundant addition to the attributes
+objects).
+.LP
+.LP
+Stack size is defined as an optional attribute because the very notion
+of a stack is inherently machine-dependent. Some
+implementations may not be able to change the size of the stack, for
+example, and others may not need to because stack pages may be
+discontiguous and can be allocated and released on demand.
+.LP
+The attribute mechanism has been designed in large measure for extensibility.
+Future extensions to the attribute mechanism or to
+any attributes object defined in this volume of IEEE\ Std\ 1003.1-2001
+has to be done with care so as not to affect
+binary-compatibility.
+.LP
+Attributes objects, even if allocated by means of dynamic allocation
+functions such as \fImalloc\fP(), may have their size fixed at compile
+time. This means, for example, a \fIpthread_create\fP() in an implementation
+with extensions to \fBpthread_attr_t\fP cannot
+look beyond the area that the binary application assumes is valid.
+This suggests that implementations should maintain a size field
+in the attributes object, as well as possibly version information,
+if extensions in different directions (possibly by different
+vendors) are to be accommodated.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_attr_getstackaddr\fP(), \fIpthread_attr_getstacksize\fP(),
+\fIpthread_attr_getdetachstate\fP(), \fIpthread_create\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_attr_setdetachstate.3p b/man-pages-posix-2003/man3p/pthread_attr_setdetachstate.3p
new file mode 100644
index 0000000..99aa09f
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_attr_setdetachstate.3p
@@ -0,0 +1 @@
+.so man3p/pthread_attr_getdetachstate.3p
diff --git a/man-pages-posix-2003/man3p/pthread_attr_setguardsize.3p b/man-pages-posix-2003/man3p/pthread_attr_setguardsize.3p
new file mode 100644
index 0000000..e7cd07f
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_attr_setguardsize.3p
@@ -0,0 +1 @@
+.so man3p/pthread_attr_getguardsize.3p
diff --git a/man-pages-posix-2003/man3p/pthread_attr_setinheritsched.3p b/man-pages-posix-2003/man3p/pthread_attr_setinheritsched.3p
new file mode 100644
index 0000000..11f6f9a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_attr_setinheritsched.3p
@@ -0,0 +1 @@
+.so man3p/pthread_attr_getinheritsched.3p
diff --git a/man-pages-posix-2003/man3p/pthread_attr_setschedparam.3p b/man-pages-posix-2003/man3p/pthread_attr_setschedparam.3p
new file mode 100644
index 0000000..698e338
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_attr_setschedparam.3p
@@ -0,0 +1 @@
+.so man3p/pthread_attr_getschedparam.3p
diff --git a/man-pages-posix-2003/man3p/pthread_attr_setschedpolicy.3p b/man-pages-posix-2003/man3p/pthread_attr_setschedpolicy.3p
new file mode 100644
index 0000000..2f8d6a9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_attr_setschedpolicy.3p
@@ -0,0 +1 @@
+.so man3p/pthread_attr_getschedpolicy.3p
diff --git a/man-pages-posix-2003/man3p/pthread_attr_setscope.3p b/man-pages-posix-2003/man3p/pthread_attr_setscope.3p
new file mode 100644
index 0000000..32c8a3b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_attr_setscope.3p
@@ -0,0 +1 @@
+.so man3p/pthread_attr_getscope.3p
diff --git a/man-pages-posix-2003/man3p/pthread_attr_setstack.3p b/man-pages-posix-2003/man3p/pthread_attr_setstack.3p
new file mode 100644
index 0000000..49621fb
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_attr_setstack.3p
@@ -0,0 +1 @@
+.so man3p/pthread_attr_getstack.3p
diff --git a/man-pages-posix-2003/man3p/pthread_attr_setstackaddr.3p b/man-pages-posix-2003/man3p/pthread_attr_setstackaddr.3p
new file mode 100644
index 0000000..859c233
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_attr_setstackaddr.3p
@@ -0,0 +1 @@
+.so man3p/pthread_attr_getstackaddr.3p
diff --git a/man-pages-posix-2003/man3p/pthread_attr_setstacksize.3p b/man-pages-posix-2003/man3p/pthread_attr_setstacksize.3p
new file mode 100644
index 0000000..fb5936a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_attr_setstacksize.3p
@@ -0,0 +1 @@
+.so man3p/pthread_attr_getstacksize.3p
diff --git a/man-pages-posix-2003/man3p/pthread_barrier_destroy.3p b/man-pages-posix-2003/man3p/pthread_barrier_destroy.3p
new file mode 100644
index 0000000..fece59a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_barrier_destroy.3p
@@ -0,0 +1 @@
+.so man3p/pthread_barrier_init.3p
diff --git a/man-pages-posix-2003/man3p/pthread_barrier_init.3p b/man-pages-posix-2003/man3p/pthread_barrier_init.3p
new file mode 100644
index 0000000..f7c2d7b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_barrier_init.3p
@@ -0,0 +1,137 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_BARRIER_DESTROY" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_barrier_destroy
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_barrier_destroy, pthread_barrier_init \- destroy and initialize
+a barrier object (\fBADVANCED REALTIME
+THREADS\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_barrier_destroy(pthread_barrier_t *\fP\fIbarrier\fP\fB);
+.br
+int pthread_barrier_init(pthread_barrier_t *restrict\fP \fIbarrier\fP\fB,
+.br
+\ \ \ \ \ \ const pthread_barrierattr_t *restrict\fP \fIattr\fP\fB,
+unsigned\fP \fIcount\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_barrier_destroy\fP() function shall destroy the barrier
+referenced by \fIbarrier\fP and release any resources
+used by the barrier. The effect of subsequent use of the barrier is
+undefined until the barrier is reinitialized by another call to
+\fIpthread_barrier_init\fP(). An implementation may use this function
+to set \fIbarrier\fP to an invalid value. The results are
+undefined if \fIpthread_barrier_destroy\fP() is called when any thread
+is blocked on the barrier, or if this function is called
+with an uninitialized barrier.
+.LP
+The \fIpthread_barrier_init\fP() function shall allocate any resources
+required to use the barrier referenced by \fIbarrier\fP
+and shall initialize the barrier with attributes referenced by \fIattr\fP.
+If \fIattr\fP is NULL, the default barrier attributes
+shall be used; the effect is the same as passing the address of a
+default barrier attributes object. The results are undefined if
+\fIpthread_barrier_init\fP() is called when any thread is blocked
+on the barrier (that is, has not returned from the \fIpthread_barrier_wait\fP()
+call). The results are undefined if a barrier is used
+without first being initialized. The results are undefined if \fIpthread_barrier_init\fP()
+is called specifying an already
+initialized barrier.
+.LP
+The \fIcount\fP argument specifies the number of threads that must
+call \fIpthread_barrier_wait\fP() before any of them successfully
+return from the call.
+The value specified by \fIcount\fP must be greater than zero.
+.LP
+If the \fIpthread_barrier_init\fP() function fails, the barrier shall
+not be initialized and the contents of \fIbarrier\fP are
+undefined.
+.LP
+Only the object referenced by \fIbarrier\fP may be used for performing
+synchronization. The result of referring to copies of
+that object in calls to \fIpthread_barrier_destroy\fP() or \fIpthread_barrier_wait\fP()
+is undefined.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return zero; otherwise,
+an error number shall be returned to indicate the
+error.
+.SH ERRORS
+.LP
+The \fIpthread_barrier_destroy\fP() function may fail if:
+.TP 7
+.B EBUSY
+The implementation has detected an attempt to destroy a barrier while
+it is in use (for example, while being used in a \fIpthread_barrier_wait\fP()
+call) by another thread.
+.TP 7
+.B EINVAL
+The value specified by \fIbarrier\fP is invalid.
+.sp
+.LP
+The \fIpthread_barrier_init\fP() function shall fail if:
+.TP 7
+.B EAGAIN
+The system lacks the necessary resources to initialize another barrier.
+.TP 7
+.B EINVAL
+The value specified by \fIcount\fP is equal to zero.
+.TP 7
+.B ENOMEM
+Insufficient memory exists to initialize the barrier.
+.sp
+.LP
+The \fIpthread_barrier_init\fP() function may fail if:
+.TP 7
+.B EBUSY
+The implementation has detected an attempt to reinitialize a barrier
+while it is in use (for example, while being used in a \fIpthread_barrier_wait\fP()
+call) by another thread.
+.TP 7
+.B EINVAL
+The value specified by \fIattr\fP is invalid.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIpthread_barrier_destroy\fP() and \fIpthread_barrier_init\fP()
+functions are part of the Barriers option and need not be
+provided on all implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_barrier_wait\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_barrier_wait.3p b/man-pages-posix-2003/man3p/pthread_barrier_wait.3p
new file mode 100644
index 0000000..872da39
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_barrier_wait.3p
@@ -0,0 +1,109 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_BARRIER_WAIT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_barrier_wait
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_barrier_wait \- synchronize at a barrier (\fBADVANCED REALTIME
+THREADS\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_barrier_wait(pthread_barrier_t *\fP\fIbarrier\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_barrier_wait\fP() function shall synchronize participating
+threads at the barrier referenced by \fIbarrier\fP.
+The calling thread shall block until the required number of threads
+have called \fIpthread_barrier_wait\fP() specifying the
+barrier.
+.LP
+When the required number of threads have called \fIpthread_barrier_wait\fP()
+specifying the barrier, the constant
+PTHREAD_BARRIER_SERIAL_THREAD shall be returned to one unspecified
+thread and zero shall be returned to each of the remaining
+threads. At this point, the barrier shall be reset to the state it
+had as a result of the most recent \fIpthread_barrier_init\fP() function
+that referenced it.
+.LP
+The constant PTHREAD_BARRIER_SERIAL_THREAD is defined in \fI<pthread.h>\fP
+and
+its value shall be distinct from any other value returned by \fIpthread_barrier_wait\fP().
+.LP
+The results are undefined if this function is called with an uninitialized
+barrier.
+.LP
+If a signal is delivered to a thread blocked on a barrier, upon return
+from the signal handler the thread shall resume waiting
+at the barrier if the barrier wait has not completed (that is, if
+the required number of threads have not arrived at the barrier
+during the execution of the signal handler); otherwise, the thread
+shall continue as normal from the completed barrier wait. Until
+the thread in the signal handler returns from it, it is unspecified
+whether other threads may proceed past the barrier once they
+have all reached it.
+.LP
+A thread that has blocked on a barrier shall not prevent any unblocked
+thread that is eligible to use the same processing
+resources from eventually making forward progress in its execution.
+Eligibility for processing resources shall be determined by the
+scheduling policy.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIpthread_barrier_wait\fP() function
+shall return PTHREAD_BARRIER_SERIAL_THREAD for a single
+(arbitrary) thread synchronized at the barrier and zero for each of
+the other threads. Otherwise, an error number shall be returned
+to indicate the error.
+.SH ERRORS
+.LP
+The \fIpthread_barrier_wait\fP() function may fail if:
+.TP 7
+.B EINVAL
+The value specified by \fIbarrier\fP does not refer to an initialized
+barrier object.
+.sp
+.LP
+This function shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Applications using this function may be subject to priority inversion,
+as discussed in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 3.285, Priority Inversion.
+.LP
+The \fIpthread_barrier_wait\fP() function is part of the Barriers
+option and need not be provided on all implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_barrier_destroy\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_barrierattr_destroy.3p b/man-pages-posix-2003/man3p/pthread_barrierattr_destroy.3p
new file mode 100644
index 0000000..3ac0352
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_barrierattr_destroy.3p
@@ -0,0 +1 @@
+.so man3p/pthread_barrierattr_init.3p
diff --git a/man-pages-posix-2003/man3p/pthread_barrierattr_getpshared.3p b/man-pages-posix-2003/man3p/pthread_barrierattr_getpshared.3p
new file mode 100644
index 0000000..ad0898b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_barrierattr_getpshared.3p
@@ -0,0 +1,112 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_BARRIERATTR_GETPSHARED" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_barrierattr_getpshared
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_barrierattr_getpshared, pthread_barrierattr_setpshared \- get
+and set the process\-shared attribute of the
+barrier attributes object (\fBADVANCED REALTIME THREADS\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+\fP
+.LP
+\fBint pthread_barrierattr_getpshared(const pthread_barrierattr_t
+*
+.br
+\ \ \ \ \ \ restrict\fP \fIattr\fP\fB, int *restrict\fP \fIpshared\fP\fB);
+.br
+int pthread_barrierattr_setpshared(pthread_barrierattr_t *\fP\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ int\fP \fIpshared\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_barrierattr_getpshared\fP() function shall obtain the
+value of the \fIprocess-shared\fP attribute from the
+attributes object referenced by \fIattr\fP. The \fIpthread_barrierattr_setpshared\fP()
+function shall set the
+\fIprocess-shared\fP attribute in an initialized attributes object
+referenced by \fIattr\fP.
+.LP
+The \fIprocess-shared\fP attribute is set to PTHREAD_PROCESS_SHARED
+to permit a barrier to be operated upon by any thread that
+has access to the memory where the barrier is allocated. If the \fIprocess-shared\fP
+attribute is PTHREAD_PROCESS_PRIVATE, the
+barrier shall only be operated upon by threads created within the
+same process as the thread that initialized the barrier; if
+threads of different processes attempt to operate on such a barrier,
+the behavior is undefined. The default value of the attribute
+shall be PTHREAD_PROCESS_PRIVATE. Both constants PTHREAD_PROCESS_SHARED
+and PTHREAD_PROCESS_PRIVATE are defined in \fI<pthread.h>\fP.
+.LP
+Additional attributes, their default values, and the names of the
+associated functions to get and set those attribute values are
+implementation-defined.
+.SH RETURN VALUE
+.LP
+If successful, the \fIpthread_barrierattr_getpshared\fP() function
+shall return zero and store the value of the
+\fIprocess-shared\fP attribute of \fIattr\fP into the object referenced
+by the \fIpshared\fP parameter. Otherwise, an error
+number shall be returned to indicate the error.
+.LP
+If successful, the \fIpthread_barrierattr_setpshared\fP() function
+shall return zero; otherwise, an error number shall be
+returned to indicate the error.
+.SH ERRORS
+.LP
+These functions may fail if:
+.TP 7
+.B EINVAL
+The value specified by \fIattr\fP is invalid.
+.sp
+.LP
+The \fIpthread_barrierattr_setpshared\fP() function may fail if:
+.TP 7
+.B EINVAL
+The new value specified for the \fIprocess-shared\fP attribute is
+not one of the legal values PTHREAD_PROCESS_SHARED or
+PTHREAD_PROCESS_PRIVATE.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIpthread_barrierattr_getpshared\fP() and \fIpthread_barrierattr_setpshared\fP()
+functions are part of the Barriers
+option and need not be provided on all implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_barrier_destroy\fP(), \fIpthread_barrierattr_destroy\fP(),
+\fIpthread_barrierattr_init\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_barrierattr_init.3p b/man-pages-posix-2003/man3p/pthread_barrierattr_init.3p
new file mode 100644
index 0000000..4c56f6c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_barrierattr_init.3p
@@ -0,0 +1,97 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_BARRIERATTR_DESTROY" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_barrierattr_destroy
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_barrierattr_destroy, pthread_barrierattr_init \- destroy and
+initialize the barrier attributes object
+(\fBADVANCED REALTIME THREADS\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_barrierattr_destroy(pthread_barrierattr_t *\fP\fIattr\fP\fB);
+.br
+int pthread_barrierattr_init(pthread_barrierattr_t *\fP\fIattr\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_barrierattr_destroy\fP() function shall destroy a barrier
+attributes object. A destroyed \fIattr\fP attributes
+object can be reinitialized using \fIpthread_barrierattr_init\fP();
+the results of otherwise referencing the object after it has
+been destroyed are undefined. An implementation may cause \fIpthread_barrierattr_destroy\fP()
+to set the object referenced by
+\fIattr\fP to an invalid value.
+.LP
+The \fIpthread_barrierattr_init\fP() function shall initialize a barrier
+attributes object \fIattr\fP with the default value
+for all of the attributes defined by the implementation.
+.LP
+Results are undefined if \fIpthread_barrierattr_init\fP() is called
+specifying an already initialized \fIattr\fP attributes
+object.
+.LP
+After a barrier attributes object has been used to initialize one
+or more barriers, any function affecting the attributes object
+(including destruction) shall not affect any previously initialized
+barrier.
+.SH RETURN VALUE
+.LP
+If successful, the \fIpthread_barrierattr_destroy\fP() and \fIpthread_barrierattr_init\fP()
+functions shall return zero;
+otherwise, an error number shall be returned to indicate the error.
+.SH ERRORS
+.LP
+The \fIpthread_barrierattr_destroy\fP() function may fail if:
+.TP 7
+.B EINVAL
+The value specified by \fIattr\fP is invalid.
+.sp
+.LP
+The \fIpthread_barrierattr_init\fP() function shall fail if:
+.TP 7
+.B ENOMEM
+Insufficient memory exists to initialize the barrier attributes object.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIpthread_barrierattr_destroy\fP() and \fIpthread_barrierattr_init\fP()
+functions are part of the Barriers option and
+need not be provided on all implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_barrierattr_getpshared\fP(), \fIpthread_barrierattr_setpshared\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP.
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_barrierattr_setpshared.3p b/man-pages-posix-2003/man3p/pthread_barrierattr_setpshared.3p
new file mode 100644
index 0000000..2cbb2b9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_barrierattr_setpshared.3p
@@ -0,0 +1 @@
+.so man3p/pthread_barrierattr_getpshared.3p
diff --git a/man-pages-posix-2003/man3p/pthread_cancel.3p b/man-pages-posix-2003/man3p/pthread_cancel.3p
new file mode 100644
index 0000000..e700951
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_cancel.3p
@@ -0,0 +1,108 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_CANCEL" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_cancel
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_cancel \- cancel execution of a thread
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_cancel(pthread_t\fP \fIthread\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_cancel\fP() function shall request that \fIthread\fP
+be canceled. The target thread's cancelability state and
+type determines when the cancellation takes effect. When the cancellation
+is acted on, the cancellation cleanup handlers for
+\fIthread\fP shall be called. When the last cancellation cleanup handler
+returns, the thread-specific data destructor functions
+shall be called for \fIthread\fP. When the last destructor function
+returns, \fIthread\fP shall be terminated.
+.LP
+The cancellation processing in the target thread shall run asynchronously
+with respect to the calling thread returning from
+\fIpthread_cancel\fP().
+.SH RETURN VALUE
+.LP
+If successful, the \fIpthread_cancel\fP() function shall return zero;
+otherwise, an error number shall be returned to indicate
+the error.
+.SH ERRORS
+.LP
+The \fIpthread_cancel\fP() function may fail if:
+.TP 7
+.B ESRCH
+No thread could be found corresponding to that specified by the given
+thread ID.
+.sp
+.LP
+The \fIpthread_cancel\fP() function shall not return an error code
+of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+Two alternative functions were considered for sending the cancellation
+notification to a thread. One would be to define a new
+SIGCANCEL signal that had the cancellation semantics when delivered;
+the other was to define the new \fIpthread_cancel\fP()
+function, which would trigger the cancellation semantics.
+.LP
+The advantage of a new signal was that so much of the delivery criteria
+were identical to that used when trying to deliver a
+signal that making cancellation notification a signal was seen as
+consistent. Indeed, many implementations implement cancellation
+using a special signal. On the other hand, there would be no signal
+functions that could be used with this signal except \fIpthread_kill\fP(),
+and the behavior of the delivered cancellation signal would be unlike
+any previously existing defined signal.
+.LP
+The benefits of a special function include the recognition that this
+signal would be defined because of the similar delivery
+criteria and that this is the only common behavior between a cancellation
+request and a signal. In addition, the cancellation
+delivery mechanism does not have to be implemented as a signal. There
+are also strong, if not stronger, parallels with language
+exception mechanisms than with signals that are potentially obscured
+if the delivery mechanism is visibly closer to signals.
+.LP
+In the end, it was considered that as there were so many exceptions
+to the use of the new signal with existing signals functions
+it would be misleading. A special function has resolved this problem.
+This function was carefully defined so that an implementation
+wishing to provide the cancellation functions on top of signals could
+do so. The special function also means that implementations
+are not obliged to implement cancellation with signals.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_exit\fP(), \fIpthread_cond_timedwait\fP(), \fIpthread_join\fP(),
+\fIpthread_setcancelstate\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_cleanup_pop.3p b/man-pages-posix-2003/man3p/pthread_cleanup_pop.3p
new file mode 100644
index 0000000..fc21cf4
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_cleanup_pop.3p
@@ -0,0 +1 @@
+.so man3p/pthread_cleanup_push.3p
diff --git a/man-pages-posix-2003/man3p/pthread_cleanup_push.3p b/man-pages-posix-2003/man3p/pthread_cleanup_push.3p
new file mode 100644
index 0000000..d94ee89
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_cleanup_push.3p
@@ -0,0 +1,300 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_CLEANUP_POP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_cleanup_pop
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_cleanup_pop, pthread_cleanup_push \- establish cancellation
+handlers
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+void pthread_cleanup_pop(int\fP \fIexecute\fP\fB);
+.br
+void pthread_cleanup_push(void (*\fP\fIroutine\fP\fB)(void*), void
+*\fP\fIarg\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_cleanup_pop\fP() function shall remove the routine
+at the top of the calling thread's cancellation cleanup stack
+and optionally invoke it (if \fIexecute\fP is non-zero).
+.LP
+The \fIpthread_cleanup_push\fP() function shall push the specified
+cancellation cleanup handler \fIroutine\fP onto the calling
+thread's cancellation cleanup stack. The cancellation cleanup handler
+shall be popped from the cancellation cleanup stack and
+invoked with the argument \fIarg\fP when:
+.IP " *" 3
+The thread exits (that is, calls \fIpthread_exit\fP()).
+.LP
+.IP " *" 3
+The thread acts upon a cancellation request.
+.LP
+.IP " *" 3
+The thread calls \fIpthread_cleanup_pop\fP() with a non-zero \fIexecute\fP
+argument.
+.LP
+.LP
+These functions may be implemented as macros. The application shall
+ensure that they appear as statements, and in pairs within
+the same lexical scope (that is, the \fIpthread_cleanup_push\fP()
+macro may be thought to expand to a token list whose first token
+is \fB'{'\fP with \fIpthread_cleanup_pop\fP() expanding to a token
+list whose last token is the corresponding \fB'}'\fP
+).
+.LP
+The effect of calling \fIlongjmp\fP() or \fIsiglongjmp\fP() is undefined
+if there have been any calls to \fIpthread_cleanup_push\fP()
+or \fIpthread_cleanup_pop\fP() made without the matching call since
+the jump buffer was filled. The effect of calling \fIlongjmp\fP()
+or \fIsiglongjmp\fP() from inside a
+cancellation cleanup handler is also undefined unless the jump buffer
+was also filled in the cancellation cleanup handler.
+.SH RETURN VALUE
+.LP
+The \fIpthread_cleanup_push\fP() and \fIpthread_cleanup_pop\fP() functions
+shall not return a value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+The following is an example using thread primitives to implement a
+cancelable, writers-priority read-write lock:
+.sp
+.RS
+.nf
+
+\fBtypedef struct {
+ pthread_mutex_t lock;
+ pthread_cond_t rcond,
+ wcond;
+ int lock_count; /* < 0 .. Held by writer. */
+ /* > 0 .. Held by lock_count readers. */
+ /* = 0 .. Held by nobody. */
+ int waiting_writers; /* Count of waiting writers. */
+} rwlock;
+.sp
+
+void
+waiting_reader_cleanup(void *arg)
+{
+ rwlock *l;
+.sp
+
+ l = (rwlock *) arg;
+ pthread_mutex_unlock(&l->lock);
+}
+.sp
+
+void
+lock_for_read(rwlock *l)
+{
+ pthread_mutex_lock(&l->lock);
+ pthread_cleanup_push(waiting_reader_cleanup, l);
+ while ((l->lock_count < 0) && (l->waiting_writers != 0))
+ pthread_cond_wait(&l->rcond, &l->lock);
+ l->lock_count++;
+ /*
+ * Note the pthread_cleanup_pop executes
+ * waiting_reader_cleanup.
+ */
+ pthread_cleanup_pop(1);
+}
+.sp
+
+void
+release_read_lock(rwlock *l)
+{
+ pthread_mutex_lock(&l->lock);
+ if (--l->lock_count == 0)
+ pthread_cond_signal(&l->wcond);
+ pthread_mutex_unlock(l);
+}
+.sp
+
+void
+waiting_writer_cleanup(void *arg)
+{
+ rwlock *l;
+.sp
+
+ l = (rwlock *) arg;
+ if ((--l->waiting_writers == 0) && (l->lock_count >= 0)) {
+ /*
+ * This only happens if we have been canceled.
+ */
+ pthread_cond_broadcast(&l->wcond);
+}
+ pthread_mutex_unlock(&l->lock);
+}
+.sp
+
+void
+lock_for_write(rwlock *l)
+{
+ pthread_mutex_lock(&l->lock);
+ l->waiting_writers++;
+ pthread_cleanup_push(waiting_writer_cleanup, l);
+ while (l->lock_count != 0)
+ pthread_cond_wait(&l->wcond, &l->lock);
+ l->lock_count = -1;
+ /*
+ * Note the pthread_cleanup_pop executes
+ * waiting_writer_cleanup.
+ */
+ pthread_cleanup_pop(1);
+}
+.sp
+
+void
+release_write_lock(rwlock *l)
+{
+ pthread_mutex_lock(&l->lock);
+ l->lock_count = 0;
+ if (l->waiting_writers == 0)
+ pthread_cond_broadcast(&l->rcond)
+ else
+ pthread_cond_signal(&l->wcond);
+ pthread_mutex_unlock(&l->lock);
+}
+.sp
+
+/*
+ * This function is called to initialize the read/write lock.
+ */
+void
+initialize_rwlock(rwlock *l)
+{
+ pthread_mutex_init(&l->lock, pthread_mutexattr_default);
+ pthread_cond_init(&l->wcond, pthread_condattr_default);
+ pthread_cond_init(&l->rcond, pthread_condattr_default);
+ l->lock_count = 0;
+ l->waiting_writers = 0;
+}
+.sp
+
+reader_thread()
+{
+ lock_for_read(&lock);
+ pthread_cleanup_push(release_read_lock, &lock);
+ /*
+ * Thread has read lock.
+ */
+ pthread_cleanup_pop(1);
+}
+.sp
+
+writer_thread()
+{
+ lock_for_write(&lock);
+ pthread_cleanup_push(release_write_lock, &lock);
+ /*
+ * Thread has write lock.
+ */
+pthread_cleanup_pop(1);
+}
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The two routines that push and pop cancellation cleanup handlers,
+\fIpthread_cleanup_push\fP() and
+\fIpthread_cleanup_pop\fP(), can be thought of as left and right parentheses.
+They always need to be matched.
+.SH RATIONALE
+.LP
+The restriction that the two routines that push and pop cancellation
+cleanup handlers, \fIpthread_cleanup_push\fP() and
+\fIpthread_cleanup_pop\fP(), have to appear in the same lexical scope
+allows for efficient macro or compiler implementations and
+efficient storage management. A sample implementation of these routines
+as macros might look like this:
+.sp
+.RS
+.nf
+
+\fB#define pthread_cleanup_push(rtn,arg) { \\
+ struct _pthread_handler_rec __cleanup_handler, **__head; \\
+ __cleanup_handler.rtn = rtn; \\
+ __cleanup_handler.arg = arg; \\
+ (void) pthread_getspecific(_pthread_handler_key, &__head); \\
+ __cleanup_handler.next = *__head; \\
+ *__head = &__cleanup_handler;
+.sp
+
+#define pthread_cleanup_pop(ex) \\
+ *__head = __cleanup_handler.next; \\
+ if (ex) (*__cleanup_handler.rtn)(__cleanup_handler.arg); \\
+}
+\fP
+.fi
+.RE
+.LP
+A more ambitious implementation of these routines might do even better
+by allowing the compiler to note that the cancellation
+cleanup handler is a constant and can be expanded inline.
+.LP
+This volume of IEEE\ Std\ 1003.1-2001 currently leaves unspecified
+the effect of calling \fIlongjmp\fP() from a signal handler executing
+in a POSIX System Interfaces function. If an
+implementation wants to allow this and give the programmer reasonable
+behavior, the \fIlongjmp\fP() function has to call all cancellation
+cleanup handlers that have been pushed but
+not popped since the time \fIsetjmp\fP() was called.
+.LP
+Consider a multi-threaded function called by a thread that uses signals.
+If a signal were delivered to a signal handler during
+the operation of \fIqsort\fP() and that handler were to call \fIlongjmp\fP()
+(which, in turn, did \fInot\fP call the cancellation cleanup handlers)
+the helper
+threads created by the \fIqsort\fP() function would not be canceled.
+Instead, they would
+continue to execute and write into the argument array even though
+the array might have been popped off the stack.
+.LP
+Note that the specified cleanup handling mechanism is especially tied
+to the C language and, while the requirement for a uniform
+mechanism for expressing cleanup is language-independent, the mechanism
+used in other languages may be quite different. In
+addition, this mechanism is really only necessary due to the lack
+of a real exception mechanism in the C language, which would be
+the ideal solution.
+.LP
+There is no notion of a cancellation cleanup-safe function. If an
+application has no cancellation points in its signal handlers,
+blocks any signal whose handler may have cancellation points while
+calling async-unsafe functions, or disables cancellation while
+calling async-unsafe functions, all functions may be safely called
+from cancellation cleanup routines.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_cancel\fP(), \fIpthread_setcancelstate\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_cond_broadcast.3p b/man-pages-posix-2003/man3p/pthread_cond_broadcast.3p
new file mode 100644
index 0000000..47aee25
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_cond_broadcast.3p
@@ -0,0 +1 @@
+.so man3p/pthread_cond_signal.3p
diff --git a/man-pages-posix-2003/man3p/pthread_cond_destroy.3p b/man-pages-posix-2003/man3p/pthread_cond_destroy.3p
new file mode 100644
index 0000000..2a3b2ef
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_cond_destroy.3p
@@ -0,0 +1 @@
+.so man3p/pthread_cond_init.3p
diff --git a/man-pages-posix-2003/man3p/pthread_cond_init.3p b/man-pages-posix-2003/man3p/pthread_cond_init.3p
new file mode 100644
index 0000000..6e2f710
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_cond_init.3p
@@ -0,0 +1,198 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_COND_DESTROY" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_cond_destroy
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_cond_destroy, pthread_cond_init \- destroy and initialize condition
+variables
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_cond_destroy(pthread_cond_t *\fP\fIcond\fP\fB);
+.br
+int pthread_cond_init(pthread_cond_t *restrict\fP \fIcond\fP\fB,
+.br
+\ \ \ \ \ \ const pthread_condattr_t *restrict\fP \fIattr\fP\fB);
+.br
+pthread_cond_t\fP \fIcond\fP \fB= PTHREAD_COND_INITIALIZER; \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_cond_destroy\fP() function shall destroy the given
+condition variable specified by \fIcond\fP; the object
+becomes, in effect, uninitialized. An implementation may cause \fIpthread_cond_destroy\fP()
+to set the object referenced by
+\fIcond\fP to an invalid value. A destroyed condition variable object
+can be reinitialized using \fIpthread_cond_init\fP(); the
+results of otherwise referencing the object after it has been destroyed
+are undefined.
+.LP
+It shall be safe to destroy an initialized condition variable upon
+which no threads are currently blocked. Attempting to destroy
+a condition variable upon which other threads are currently blocked
+results in undefined behavior.
+.LP
+The \fIpthread_cond_init\fP() function shall initialize the condition
+variable referenced by \fIcond\fP with attributes
+referenced by \fIattr\fP. If \fIattr\fP is NULL, the default condition
+variable attributes shall be used; the effect is the same
+as passing the address of a default condition variable attributes
+object. Upon successful initialization, the state of the
+condition variable shall become initialized.
+.LP
+Only \fIcond\fP itself may be used for performing synchronization.
+The result of referring to copies of \fIcond\fP in calls to
+\fIpthread_cond_wait\fP(), \fIpthread_cond_timedwait\fP(), \fIpthread_cond_signal\fP(),
+\fIpthread_cond_broadcast\fP(), and \fIpthread_cond_destroy\fP() is
+undefined.
+.LP
+Attempting to initialize an already initialized condition variable
+results in undefined behavior.
+.LP
+In cases where default condition variable attributes are appropriate,
+the macro PTHREAD_COND_INITIALIZER can be used to
+initialize condition variables that are statically allocated. The
+effect shall be equivalent to dynamic initialization by a call to
+\fIpthread_cond_init\fP() with parameter \fIattr\fP specified as NULL,
+except that no error checks are performed.
+.SH RETURN VALUE
+.LP
+If successful, the \fIpthread_cond_destroy\fP() and \fIpthread_cond_init\fP()
+functions shall return zero; otherwise, an error
+number shall be returned to indicate the error.
+.LP
+The [EBUSY] and [EINVAL] error checks, if implemented, shall act as
+if they were performed immediately at the beginning of
+processing for the function and caused an error return prior to modifying
+the state of the condition variable specified by
+\fIcond\fP.
+.SH ERRORS
+.LP
+The \fIpthread_cond_destroy\fP() function may fail if:
+.TP 7
+.B EBUSY
+The implementation has detected an attempt to destroy the object referenced
+by \fIcond\fP while it is referenced (for example,
+while being used in a \fIpthread_cond_wait\fP() or \fIpthread_cond_timedwait\fP())
+by another thread.
+.TP 7
+.B EINVAL
+The value specified by \fIcond\fP is invalid.
+.sp
+.LP
+The \fIpthread_cond_init\fP() function shall fail if:
+.TP 7
+.B EAGAIN
+The system lacked the necessary resources (other than memory) to initialize
+another condition variable.
+.TP 7
+.B ENOMEM
+Insufficient memory exists to initialize the condition variable.
+.sp
+.LP
+The \fIpthread_cond_init\fP() function may fail if:
+.TP 7
+.B EBUSY
+The implementation has detected an attempt to reinitialize the object
+referenced by \fIcond\fP, a previously initialized, but
+not yet destroyed, condition variable.
+.TP 7
+.B EINVAL
+The value specified by \fIattr\fP is invalid.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+A condition variable can be destroyed immediately after all the threads
+that are blocked on it are awakened. For example,
+consider the following code:
+.sp
+.RS
+.nf
+
+\fBstruct list {
+ pthread_mutex_t lm;
+ ...
+}
+.sp
+
+struct elt {
+ key k;
+ int busy;
+ pthread_cond_t notbusy;
+ ...
+}
+.sp
+
+/* Find a list element and reserve it. */
+struct elt *
+list_find(struct list *lp, key k)
+{
+ struct elt *ep;
+.sp
+
+ pthread_mutex_lock(&lp->lm);
+ while ((ep = find_elt(l, k) != NULL) && ep->busy)
+ pthread_cond_wait(&ep->notbusy, &lp->lm);
+ if (ep != NULL)
+ ep->busy = 1;
+ pthread_mutex_unlock(&lp->lm);
+ return(ep);
+}
+.sp
+
+delete_elt(struct list *lp, struct elt *ep)
+{
+ pthread_mutex_lock(&lp->lm);
+ assert(ep->busy);
+ ... remove ep from list ...
+ ep->busy = 0; /* Paranoid. */
+(A) pthread_cond_broadcast(&ep->notbusy);
+ pthread_mutex_unlock(&lp->lm);
+(B) pthread_cond_destroy(&rp->notbusy);
+ free(ep);
+}
+\fP
+.fi
+.RE
+.LP
+In this example, the condition variable and its list element may be
+freed (line B) immediately after all threads waiting for it
+are awakened (line A), since the mutex and the code ensure that no
+other thread can touch the element to be deleted.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+See \fIpthread_mutex_init\fP(); a similar rationale applies to condition
+variables.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_cond_broadcast\fP(), \fIpthread_cond_signal\fP(), \fIpthread_cond_timedwait\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_cond_signal.3p b/man-pages-posix-2003/man3p/pthread_cond_signal.3p
new file mode 100644
index 0000000..990dd26
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_cond_signal.3p
@@ -0,0 +1,187 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_COND_BROADCAST" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_cond_broadcast
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_cond_broadcast, pthread_cond_signal \- broadcast or signal
+a condition
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_cond_broadcast(pthread_cond_t *\fP\fIcond\fP\fB);
+.br
+int pthread_cond_signal(pthread_cond_t *\fP\fIcond\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall unblock threads blocked on a condition variable.
+.LP
+The \fIpthread_cond_broadcast\fP() function shall unblock all threads
+currently blocked on the specified condition variable
+\fIcond\fP.
+.LP
+The \fIpthread_cond_signal\fP() function shall unblock at least one
+of the threads that are blocked on the specified condition
+variable \fIcond\fP (if any threads are blocked on \fIcond\fP).
+.LP
+If more than one thread is blocked on a condition variable, the scheduling
+policy shall determine the order in which threads are
+unblocked. When each thread unblocked as a result of a \fIpthread_cond_broadcast\fP()
+or \fIpthread_cond_signal\fP() returns from
+its call to \fIpthread_cond_wait\fP() or \fIpthread_cond_timedwait\fP(),
+the thread shall own the mutex with which it called
+\fIpthread_cond_wait\fP() or \fIpthread_cond_timedwait\fP(). The thread(s)
+that are unblocked shall contend for
+the mutex according to the scheduling policy (if applicable), and
+as if each had called \fIpthread_mutex_lock\fP().
+.LP
+The \fIpthread_cond_broadcast\fP() or \fIpthread_cond_signal\fP()
+functions may be called by a thread whether or not it
+currently owns the mutex that threads calling \fIpthread_cond_wait\fP()
+or \fIpthread_cond_timedwait\fP() have associated with the condition
+variable
+during their waits; however, if predictable scheduling behavior is
+required, then that mutex shall be locked by the thread calling
+\fIpthread_cond_broadcast\fP() or \fIpthread_cond_signal\fP().
+.LP
+The \fIpthread_cond_broadcast\fP() and \fIpthread_cond_signal\fP()
+functions shall have no effect if there are no threads
+currently blocked on \fIcond\fP.
+.SH RETURN VALUE
+.LP
+If successful, the \fIpthread_cond_broadcast\fP() and \fIpthread_cond_signal\fP()
+functions shall return zero; otherwise, an
+error number shall be returned to indicate the error.
+.SH ERRORS
+.LP
+The \fIpthread_cond_broadcast\fP() and \fIpthread_cond_signal\fP()
+function may fail if:
+.TP 7
+.B EINVAL
+The value \fIcond\fP does not refer to an initialized condition variable.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIpthread_cond_broadcast\fP() function is used whenever the shared-variable
+state has been changed in a way that more than
+one thread can proceed with its task. Consider a single producer/multiple
+consumer problem, where the producer can insert multiple
+items on a list that is accessed one item at a time by the consumers.
+By calling the \fIpthread_cond_broadcast\fP() function, the
+producer would notify all consumers that might be waiting, and thereby
+the application would receive more throughput on a
+multi-processor. In addition, \fIpthread_cond_broadcast\fP() makes
+it easier to implement a read-write lock. The
+\fIpthread_cond_broadcast\fP() function is needed in order to wake
+up all waiting readers when a writer releases its lock.
+Finally, the two-phase commit algorithm can use this broadcast function
+to notify all clients of an impending transaction
+commit.
+.LP
+It is not safe to use the \fIpthread_cond_signal\fP() function in
+a signal handler that is invoked asynchronously. Even if it
+were safe, there would still be a race between the test of the Boolean
+\fIpthread_cond_wait\fP() that could not be efficiently eliminated.
+.LP
+Mutexes and condition variables are thus not suitable for releasing
+a waiting thread by signaling from code running in a signal
+handler.
+.SH RATIONALE
+.SS Multiple Awakenings by Condition Signal
+.LP
+On a multi-processor, it may be impossible for an implementation of
+\fIpthread_cond_signal\fP() to avoid the unblocking of more
+than one thread blocked on a condition variable. For example, consider
+the following partial implementation of \fIpthread_cond_wait\fP()
+and \fIpthread_cond_signal\fP(), executed by two threads in
+the order given. One thread is trying to wait on the condition variable,
+another is concurrently executing
+\fIpthread_cond_signal\fP(), while a third thread is already waiting.
+.sp
+.RS
+.nf
+
+\fBpthread_cond_wait(mutex, cond):
+ value = cond->value; /* 1 */
+ pthread_mutex_unlock(mutex); /* 2 */
+ pthread_mutex_lock(cond->mutex); /* 10 */
+ if (value == cond->value) { /* 11 */
+ me->next_cond = cond->waiter;
+ cond->waiter = me;
+ pthread_mutex_unlock(cond->mutex);
+ unable_to_run(me);
+ } else
+ pthread_mutex_unlock(cond->mutex); /* 12 */
+ pthread_mutex_lock(mutex); /* 13 */
+.sp
+
+pthread_cond_signal(cond):
+ pthread_mutex_lock(cond->mutex); /* 3 */
+ cond->value++; /* 4 */
+ if (cond->waiter) { /* 5 */
+ sleeper = cond->waiter; /* 6 */
+ cond->waiter = sleeper->next_cond; /* 7 */
+ able_to_run(sleeper); /* 8 */
+ }
+ pthread_mutex_unlock(cond->mutex); /* 9 */
+\fP
+.fi
+.RE
+.LP
+The effect is that more than one thread can return from its call to
+\fIpthread_cond_wait\fP() or \fIpthread_cond_timedwait\fP() as a result
+of one call to
+\fIpthread_cond_signal\fP(). This effect is called "spurious wakeup".
+Note that the situation is self-correcting in that the
+number of threads that are so awakened is finite; for example, the
+next thread to call \fIpthread_cond_wait\fP() after the sequence of
+events above blocks.
+.LP
+While this problem could be resolved, the loss of efficiency for a
+fringe condition that occurs only rarely is unacceptable,
+especially given that one has to check the predicate associated with
+a condition variable anyway. Correcting this problem would
+unnecessarily reduce the degree of concurrency in this basic building
+block for all higher-level synchronization operations.
+.LP
+An added benefit of allowing spurious wakeups is that applications
+are forced to code a predicate-testing-loop around the
+condition wait. This also makes the application tolerate superfluous
+condition broadcasts or signals on the same condition variable
+that may be coded in some other part of the application. The resulting
+applications are thus more robust. Therefore,
+IEEE\ Std\ 1003.1-2001 explicitly documents that spurious wakeups
+may occur.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_cond_destroy\fP(), \fIpthread_cond_timedwait\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_cond_timedwait.3p b/man-pages-posix-2003/man3p/pthread_cond_timedwait.3p
new file mode 100644
index 0000000..801322d
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_cond_timedwait.3p
@@ -0,0 +1 @@
+.so man3p/pthread_cond_wait.3p
diff --git a/man-pages-posix-2003/man3p/pthread_cond_wait.3p b/man-pages-posix-2003/man3p/pthread_cond_wait.3p
new file mode 100644
index 0000000..8d32e16
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_cond_wait.3p
@@ -0,0 +1,340 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_COND_TIMEDWAIT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_cond_timedwait
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_cond_timedwait, pthread_cond_wait \- wait on a condition
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_cond_timedwait(pthread_cond_t *restrict\fP \fIcond\fP\fB,
+.br
+\ \ \ \ \ \ pthread_mutex_t *restrict\fP \fImutex\fP\fB,
+.br
+\ \ \ \ \ \ const struct timespec *restrict\fP \fIabstime\fP\fB);
+.br
+int pthread_cond_wait(pthread_cond_t *restrict\fP \fIcond\fP\fB,
+.br
+\ \ \ \ \ \ pthread_mutex_t *restrict\fP \fImutex\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_cond_timedwait\fP() and \fIpthread_cond_wait\fP() functions
+shall block on a condition variable. They shall be
+called with \fImutex\fP locked by the calling thread or undefined
+behavior results.
+.LP
+These functions atomically release \fImutex\fP and cause the calling
+thread to block on the condition variable \fIcond\fP;
+atomically here means "atomically with respect to access by another
+thread to the mutex and then the condition variable". That
+is, if another thread is able to acquire the mutex after the about-to-block
+thread has released it, then a subsequent call to \fIpthread_cond_broadcast\fP()
+or \fIpthread_cond_signal\fP() in that thread shall behave as if it
+were issued after the
+about-to-block thread has blocked.
+.LP
+Upon successful return, the mutex shall have been locked and shall
+be owned by the calling thread.
+.LP
+When using condition variables there is always a Boolean predicate
+involving shared variables associated with each condition
+wait that is true if the thread should proceed. Spurious wakeups from
+the \fIpthread_cond_timedwait\fP() or
+\fIpthread_cond_wait\fP() functions may occur. Since the return from
+\fIpthread_cond_timedwait\fP() or \fIpthread_cond_wait\fP()
+does not imply anything about the value of this predicate, the predicate
+should be re-evaluated upon such return.
+.LP
+The effect of using more than one mutex for concurrent \fIpthread_cond_timedwait\fP()
+or \fIpthread_cond_wait\fP() operations
+on the same condition variable is undefined; that is, a condition
+variable becomes bound to a unique mutex when a thread waits on
+the condition variable, and this (dynamic) binding shall end when
+the wait returns.
+.LP
+A condition wait (whether timed or not) is a cancellation point. When
+the cancelability enable state of a thread is set to
+PTHREAD_CANCEL_DEFERRED, a side effect of acting upon a cancellation
+request while in a condition wait is that the mutex is (in
+effect) re-acquired before calling the first cancellation cleanup
+handler. The effect is as if the thread were unblocked, allowed
+to execute up to the point of returning from the call to \fIpthread_cond_timedwait\fP()
+or \fIpthread_cond_wait\fP(), but at that
+point notices the cancellation request and instead of returning to
+the caller of \fIpthread_cond_timedwait\fP() or
+\fIpthread_cond_wait\fP(), starts the thread cancellation activities,
+which includes calling cancellation cleanup handlers.
+.LP
+A thread that has been unblocked because it has been canceled while
+blocked in a call to \fIpthread_cond_timedwait\fP() or
+\fIpthread_cond_wait\fP() shall not consume any condition signal that
+may be directed concurrently at the condition variable if
+there are other threads blocked on the condition variable.
+.LP
+The \fIpthread_cond_timedwait\fP() function shall be equivalent to
+\fIpthread_cond_wait\fP(), except that an error is returned
+if the absolute time specified by \fIabstime\fP passes (that is, system
+time equals or exceeds \fIabstime\fP) before the
+condition \fIcond\fP is signaled or broadcasted, or if the absolute
+time specified by \fIabstime\fP has already been passed at
+the time of the call.
+.LP
+If
+the Clock Selection option is supported, the condition variable shall
+have a clock attribute which specifies the clock that shall
+be used to measure the time specified by the \fIabstime\fP argument.
+When such timeouts occur, \fIpthread_cond_timedwait\fP() shall nonetheless
+release and re-acquire the mutex referenced by
+\fImutex\fP. The \fIpthread_cond_timedwait\fP() function is also a
+cancellation point.
+.LP
+If a signal is delivered to a thread waiting for a condition variable,
+upon return from the signal handler the thread resumes
+waiting for the condition variable as if it was not interrupted, or
+it shall return zero due to spurious wakeup.
+.SH RETURN VALUE
+.LP
+Except in the case of [ETIMEDOUT], all these error checks shall act
+as if they were performed immediately at the beginning of
+processing for the function and shall cause an error return, in effect,
+prior to modifying the state of the mutex specified by
+\fImutex\fP or the condition variable specified by \fIcond\fP.
+.LP
+Upon successful completion, a value of zero shall be returned; otherwise,
+an error number shall be returned to indicate the
+error.
+.SH ERRORS
+.LP
+The \fIpthread_cond_timedwait\fP() function shall fail if:
+.TP 7
+.B ETIMEDOUT
+The time specified by \fIabstime\fP to \fIpthread_cond_timedwait\fP()
+has passed.
+.sp
+.LP
+The \fIpthread_cond_timedwait\fP() and \fIpthread_cond_wait\fP() functions
+may fail if:
+.TP 7
+.B EINVAL
+The value specified by \fIcond\fP, \fImutex\fP, or \fIabstime\fP is
+invalid.
+.TP 7
+.B EINVAL
+Different mutexes were supplied for concurrent \fIpthread_cond_timedwait\fP()
+or \fIpthread_cond_wait\fP() operations on the
+same condition variable.
+.TP 7
+.B EPERM
+The mutex was not owned by the current thread at the time of the call.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.SS Condition Wait Semantics
+.LP
+It is important to note that when \fIpthread_cond_wait\fP() and \fIpthread_cond_timedwait\fP()
+return without error, the
+associated predicate may still be false. Similarly, when \fIpthread_cond_timedwait\fP()
+returns with the timeout error, the
+associated predicate may be true due to an unavoidable race between
+the expiration of the timeout and the predicate state
+change.
+.LP
+Some implementations, particularly on a multi-processor, may sometimes
+cause multiple threads to wake up when the condition
+variable is signaled simultaneously on different processors.
+.LP
+In general, whenever a condition wait returns, the thread has to re-evaluate
+the predicate associated with the condition wait to
+determine whether it can safely proceed, should wait again, or should
+declare a timeout. A return from the wait does not imply that
+the associated predicate is either true or false.
+.LP
+It is thus recommended that a condition wait be enclosed in the equivalent
+of a "while loop" that checks the predicate.
+.SS Timed Wait Semantics
+.LP
+An absolute time measure was chosen for specifying the timeout parameter
+for two reasons. First, a relative time measure can be
+easily implemented on top of a function that specifies absolute time,
+but there is a race condition associated with specifying an
+absolute timeout on top of a function that specifies relative timeouts.
+For example, assume that \fIclock_gettime\fP() returns the current
+time and \fIcond_relative_timed_wait\fP() uses
+relative timeouts:
+.sp
+.RS
+.nf
+
+\fBclock_gettime(CLOCK_REALTIME, &now)
+reltime = sleep_til_this_absolute_time -now;
+cond_relative_timed_wait(c, m, &reltime);
+\fP
+.fi
+.RE
+.LP
+If the thread is preempted between the first statement and the last
+statement, the thread blocks for too long. Blocking,
+however, is irrelevant if an absolute timeout is used. An absolute
+timeout also need not be recomputed if it is used multiple times
+in a loop, such as that enclosing a condition wait.
+.LP
+For cases when the system clock is advanced discontinuously by an
+operator, it is expected that implementations process any
+timed wait expiring at an intervening time as if that time had actually
+occurred.
+.SS Cancellation and Condition Wait
+.LP
+A condition wait, whether timed or not, is a cancellation point. That
+is, the functions \fIpthread_cond_wait\fP() or
+\fIpthread_cond_timedwait\fP() are points where a pending (or concurrent)
+cancellation request is noticed. The reason for this is
+that an indefinite wait is possible at these points-whatever event
+is being waited for, even if the program is totally correct,
+might never occur; for example, some input data being awaited might
+never be sent. By making condition wait a cancellation point,
+the thread can be canceled and perform its cancellation cleanup handler
+even though it may be stuck in some indefinite wait.
+.LP
+A side effect of acting on a cancellation request while a thread is
+blocked on a condition variable is to re-acquire the mutex
+before calling any of the cancellation cleanup handlers. This is done
+in order to ensure that the cancellation cleanup handler is
+executed in the same state as the critical code that lies both before
+and after the call to the condition wait function. This rule
+is also required when interfacing to POSIX threads from languages,
+such as Ada or C++, which may choose to map cancellation onto a
+language exception; this rule ensures that each exception handler
+guarding a critical section can always safely depend upon the
+fact that the associated mutex has already been locked regardless
+of exactly where within the critical section the exception was
+raised. Without this rule, there would not be a uniform rule that
+exception handlers could follow regarding the lock, and so coding
+would become very cumbersome.
+.LP
+Therefore, since \fIsome\fP statement has to be made regarding the
+state of the lock when a cancellation is delivered during a
+wait, a definition has been chosen that makes application coding most
+convenient and error free.
+.LP
+When acting on a cancellation request while a thread is blocked on
+a condition variable, the implementation is required to
+ensure that the thread does not consume any condition signals directed
+at that condition variable if there are any other threads
+waiting on that condition variable. This rule is specified in order
+to avoid deadlock conditions that could occur if these two
+independent requests (one acting on a thread and the other acting
+on the condition variable) were not processed independently.
+.SS Performance of Mutexes and Condition Variables
+.LP
+Mutexes are expected to be locked only for a few instructions. This
+practice is almost automatically enforced by the desire of
+programmers to avoid long serial regions of execution (which would
+reduce total effective parallelism).
+.LP
+When using mutexes and condition variables, one tries to ensure that
+the usual case is to lock the mutex, access shared data,
+and unlock the mutex. Waiting on a condition variable should be a
+relatively rare situation. For example, when implementing a
+read-write lock, code that acquires a read-lock typically needs only
+to increment the count of readers (under mutual-exclusion) and
+return. The calling thread would actually wait on the condition variable
+only when there is already an active writer. So the
+efficiency of a synchronization operation is bounded by the cost of
+mutex lock/unlock and not by condition wait. Note that in the
+usual case there is no context switch.
+.LP
+This is not to say that the efficiency of condition waiting is unimportant.
+Since there needs to be at least one context switch
+per Ada rendezvous, the efficiency of waiting on a condition variable
+is important. The cost of waiting on a condition variable
+should be little more than the minimal cost for a context switch plus
+the time to unlock and lock the mutex.
+.SS Features of Mutexes and Condition Variables
+.LP
+It had been suggested that the mutex acquisition and release be decoupled
+from condition wait. This was rejected because it is
+the combined nature of the operation that, in fact, facilitates realtime
+implementations. Those implementations can atomically move
+a high-priority thread between the condition variable and the mutex
+in a manner that is transparent to the caller. This can prevent
+extra context switches and provide more deterministic acquisition
+of a mutex when the waiting thread is signaled. Thus, fairness
+and priority issues can be dealt with directly by the scheduling discipline.
+Furthermore, the current condition wait operation
+matches existing practice.
+.SS Scheduling Behavior of Mutexes and Condition Variables
+.LP
+Synchronization primitives that attempt to interfere with scheduling
+policy by specifying an ordering rule are considered
+undesirable. Threads waiting on mutexes and condition variables are
+selected to proceed in an order dependent upon the scheduling
+policy rather than in some fixed order (for example, FIFO or priority).
+Thus, the scheduling policy determines which thread(s) are
+awakened and allowed to proceed.
+.SS Timed Condition Wait
+.LP
+The \fIpthread_cond_timedwait\fP() function allows an application
+to give up waiting for a particular condition after a given
+amount of time. An example of its use follows:
+.sp
+.RS
+.nf
+
+\fB(void) pthread_mutex_lock(&t.mn);
+ t.waiters++;
+ clock_gettime(CLOCK_REALTIME, &ts);
+ ts.tv_sec += 5;
+ rc = 0;
+ while (! mypredicate(&t) && rc == 0)
+ rc = pthread_cond_timedwait(&t.cond, &t.mn, &ts);
+ t.waiters--;
+ if (rc == 0) setmystate(&t);
+(void) pthread_mutex_unlock(&t.mn);
+\fP
+.fi
+.RE
+.LP
+By making the timeout parameter absolute, it does not need to be recomputed
+each time the program checks its blocking predicate.
+If the timeout was relative, it would have to be recomputed before
+each call. This would be especially difficult since such code
+would need to take into account the possibility of extra wakeups that
+result from extra broadcasts or signals on the condition
+variable that occur before either the predicate is true or the timeout
+is due.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_cond_signal\fP(), \fIpthread_cond_broadcast\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_condattr_destroy.3p b/man-pages-posix-2003/man3p/pthread_condattr_destroy.3p
new file mode 100644
index 0000000..8da0a9c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_condattr_destroy.3p
@@ -0,0 +1 @@
+.so man3p/pthread_condattr_init.3p
diff --git a/man-pages-posix-2003/man3p/pthread_condattr_getclock.3p b/man-pages-posix-2003/man3p/pthread_condattr_getclock.3p
new file mode 100644
index 0000000..eace750
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_condattr_getclock.3p
@@ -0,0 +1,100 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_CONDATTR_GETCLOCK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_condattr_getclock
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_condattr_getclock, pthread_condattr_setclock \- get and set
+the clock selection condition variable attribute
+(\fBADVANCED REALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_condattr_getclock(const pthread_condattr_t *restrict\fP
+\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ clockid_t *restrict\fP \fIclock_id\fP\fB);
+.br
+int pthread_condattr_setclock(pthread_condattr_t *\fP\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ clockid_t\fP \fIclock_id\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_condattr_getclock\fP() function shall obtain the value
+of the \fIclock\fP attribute from the attributes object
+referenced by \fIattr\fP. The \fIpthread_condattr_setclock\fP() function
+shall set the \fIclock\fP attribute in an initialized
+attributes object referenced by \fIattr\fP. If \fIpthread_condattr_setclock\fP()
+is called with a \fIclock_id\fP argument that
+refers to a CPU-time clock, the call shall fail.
+.LP
+The \fIclock\fP attribute is the clock ID of the clock that shall
+be used to measure the timeout service of \fIpthread_cond_timedwait\fP().
+The default value of the \fIclock\fP attribute
+shall refer to the system clock.
+.SH RETURN VALUE
+.LP
+If successful, the \fIpthread_condattr_getclock\fP() function shall
+return zero and store the value of the clock attribute of
+\fIattr\fP into the object referenced by the \fIclock_id\fP argument.
+Otherwise, an error number shall be returned to indicate
+the error.
+.LP
+If successful, the \fIpthread_condattr_setclock\fP() function shall
+return zero; otherwise, an error number shall be returned
+to indicate the error.
+.SH ERRORS
+.LP
+These functions may fail if:
+.TP 7
+.B EINVAL
+The value specified by \fIattr\fP is invalid.
+.sp
+.LP
+The \fIpthread_condattr_setclock\fP() function may fail if:
+.TP 7
+.B EINVAL
+The value specified by \fIclock_id\fP does not refer to a known clock,
+or is a CPU-time clock.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_cond_destroy\fP(), \fIpthread_cond_timedwait\fP(), \fIpthread_condattr_destroy\fP(),
+\fIpthread_condattr_getpshared\fP(), \fIpthread_condattr_init\fP(),
+\fIpthread_condattr_setpshared\fP(), \fIpthread_create\fP(),
+\fIpthread_mutex_init\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_condattr_getpshared.3p b/man-pages-posix-2003/man3p/pthread_condattr_getpshared.3p
new file mode 100644
index 0000000..22ae6f1
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_condattr_getpshared.3p
@@ -0,0 +1,104 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_CONDATTR_GETPSHARED" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_condattr_getpshared
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_condattr_getpshared, pthread_condattr_setpshared \- get and
+set the process\-shared condition variable
+attributes
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_condattr_getpshared(const pthread_condattr_t *restrict\fP
+\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ int *restrict\fP \fIpshared\fP\fB);
+.br
+int pthread_condattr_setpshared(pthread_condattr_t *\fP\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ int\fP \fIpshared\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_condattr_getpshared\fP() function shall obtain the
+value of the \fIprocess-shared\fP attribute from the
+attributes object referenced by \fIattr\fP. The \fIpthread_condattr_setpshared\fP()
+function shall set the \fIprocess-shared\fP
+attribute in an initialized attributes object referenced by \fIattr\fP.
+.LP
+The \fIprocess-shared\fP attribute is set to PTHREAD_PROCESS_SHARED
+to permit a condition variable to be operated upon by any
+thread that has access to the memory where the condition variable
+is allocated, even if the condition variable is allocated in
+memory that is shared by multiple processes. If the \fIprocess-shared\fP
+attribute is PTHREAD_PROCESS_PRIVATE, the condition
+variable shall only be operated upon by threads created within the
+same process as the thread that initialized the condition
+variable; if threads of differing processes attempt to operate on
+such a condition variable, the behavior is undefined. The default
+value of the attribute is PTHREAD_PROCESS_PRIVATE.
+.SH RETURN VALUE
+.LP
+If successful, the \fIpthread_condattr_setpshared\fP() function shall
+return zero; otherwise, an error number shall be returned
+to indicate the error.
+.LP
+If successful, the \fIpthread_condattr_getpshared\fP() function shall
+return zero and store the value of the
+\fIprocess-shared\fP attribute of \fIattr\fP into the object referenced
+by the \fIpshared\fP parameter. Otherwise, an error
+number shall be returned to indicate the error.
+.SH ERRORS
+.LP
+The \fIpthread_condattr_getpshared\fP() and \fIpthread_condattr_setpshared\fP()
+functions may fail if:
+.TP 7
+.B EINVAL
+The value specified by \fIattr\fP is invalid.
+.sp
+.LP
+The \fIpthread_condattr_setpshared\fP() function may fail if:
+.TP 7
+.B EINVAL
+The new value specified for the attribute is outside the range of
+legal values for that attribute.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_create\fP(), \fIpthread_cond_destroy\fP(), \fIpthread_condattr_destroy\fP(),
+\fIpthread_mutex_destroy\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_condattr_init.3p b/man-pages-posix-2003/man3p/pthread_condattr_init.3p
new file mode 100644
index 0000000..6da7d6b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_condattr_init.3p
@@ -0,0 +1,108 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_CONDATTR_DESTROY" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_condattr_destroy
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_condattr_destroy, pthread_condattr_init \- destroy and initialize
+the condition variable attributes
+object
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_condattr_destroy(pthread_condattr_t *\fP\fIattr\fP\fB);
+.br
+int pthread_condattr_init(pthread_condattr_t *\fP\fIattr\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_condattr_destroy\fP() function shall destroy a condition
+variable attributes object; the object becomes, in
+effect, uninitialized. An implementation may cause \fIpthread_condattr_destroy\fP()
+to set the object referenced by \fIattr\fP to
+an invalid value. A destroyed \fIattr\fP attributes object can be
+reinitialized using \fIpthread_condattr_init\fP(); the results
+of otherwise referencing the object after it has been destroyed are
+undefined.
+.LP
+The \fIpthread_condattr_init\fP() function shall initialize a condition
+variable attributes object \fIattr\fP with the default
+value for all of the attributes defined by the implementation.
+.LP
+Results are undefined if \fIpthread_condattr_init\fP() is called specifying
+an already initialized \fIattr\fP attributes
+object.
+.LP
+After a condition variable attributes object has been used to initialize
+one or more condition variables, any function affecting
+the attributes object (including destruction) shall not affect any
+previously initialized condition variables.
+.LP
+This volume of IEEE\ Std\ 1003.1-2001 requires two attributes, the
+\fIclock\fP attribute and the \fIprocess-shared\fP
+attribute.
+.LP
+Additional attributes, their default values, and the names of the
+associated functions to get and set those attribute values are
+implementation-defined.
+.SH RETURN VALUE
+.LP
+If successful, the \fIpthread_condattr_destroy\fP() and \fIpthread_condattr_init\fP()
+functions shall return zero; otherwise,
+an error number shall be returned to indicate the error.
+.SH ERRORS
+.LP
+The \fIpthread_condattr_destroy\fP() function may fail if:
+.TP 7
+.B EINVAL
+The value specified by \fIattr\fP is invalid.
+.sp
+.LP
+The \fIpthread_condattr_init\fP() function shall fail if:
+.TP 7
+.B ENOMEM
+Insufficient memory exists to initialize the condition variable attributes
+object.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+See \fIpthread_attr_init\fP() and \fIpthread_mutex_init\fP().
+.LP
+A \fIprocess-shared\fP attribute has been defined for condition variables
+for the same reason it has been defined for
+mutexes.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_attr_destroy\fP(), \fIpthread_cond_destroy\fP(), \fIpthread_condattr_getpshared\fP(),
+\fIpthread_create\fP(), \fIpthread_mutex_destroy\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_condattr_setclock.3p b/man-pages-posix-2003/man3p/pthread_condattr_setclock.3p
new file mode 100644
index 0000000..518089a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_condattr_setclock.3p
@@ -0,0 +1 @@
+.so man3p/pthread_condattr_getclock.3p
diff --git a/man-pages-posix-2003/man3p/pthread_condattr_setpshared.3p b/man-pages-posix-2003/man3p/pthread_condattr_setpshared.3p
new file mode 100644
index 0000000..2bd028c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_condattr_setpshared.3p
@@ -0,0 +1 @@
+.so man3p/pthread_condattr_getpshared.3p
diff --git a/man-pages-posix-2003/man3p/pthread_create.3p b/man-pages-posix-2003/man3p/pthread_create.3p
new file mode 100644
index 0000000..148f204
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_create.3p
@@ -0,0 +1,196 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_CREATE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_create
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_create \- thread creation
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_create(pthread_t *restrict\fP \fIthread\fP\fB,
+.br
+\ \ \ \ \ \ const pthread_attr_t *restrict\fP \fIattr\fP\fB,
+.br
+\ \ \ \ \ \ void *(*\fP\fIstart_routine\fP\fB)(void*), void *restrict\fP
+\fIarg\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_create\fP() function shall create a new thread, with
+attributes specified by \fIattr\fP, within a process. If
+\fIattr\fP is NULL, the default attributes shall be used. If the attributes
+specified by \fIattr\fP are modified later, the
+thread's attributes shall not be affected. Upon successful completion,
+\fIpthread_create\fP() shall store the ID of the created
+thread in the location referenced by \fIthread\fP.
+.LP
+The thread is created executing \fIstart_routine\fP with \fIarg\fP
+as its sole argument. If the \fIstart_routine\fP returns,
+the effect shall be as if there was an implicit call to \fIpthread_exit\fP()
+using
+the return value of \fIstart_routine\fP as the exit status. Note that
+the thread in which \fImain\fP() was originally invoked
+differs from this. When it returns from \fImain\fP(), the effect shall
+be as if there was an implicit call to \fIexit\fP() using the return
+value of \fImain\fP() as the exit status.
+.LP
+The signal state of the new thread shall be initialized as follows:
+.IP " *" 3
+The signal mask shall be inherited from the creating thread.
+.LP
+.IP " *" 3
+The set of signals pending for the new thread shall be empty.
+.LP
+.LP
+The alternate stack shall not be inherited.
+.LP
+The floating-point environment shall be inherited from the creating
+thread.
+.LP
+If \fIpthread_create\fP() fails, no new thread is created and the
+contents of the location referenced by \fIthread\fP are
+undefined.
+.LP
+If _POSIX_THREAD_CPUTIME is defined, the new thread shall have a CPU-time
+clock accessible, and the initial value of this clock
+shall be set to zero.
+.SH RETURN VALUE
+.LP
+If successful, the \fIpthread_create\fP() function shall return zero;
+otherwise, an error number shall be returned to indicate
+the error.
+.SH ERRORS
+.LP
+The \fIpthread_create\fP() function shall fail if:
+.TP 7
+.B 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.
+.TP 7
+.B EINVAL
+The value specified by \fIattr\fP is invalid.
+.TP 7
+.B EPERM
+The caller does not have appropriate permission to set the required
+scheduling parameters or scheduling policy.
+.sp
+.LP
+The \fIpthread_create\fP() function shall not return an error code
+of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+A suggested alternative to \fIpthread_create\fP() would be to define
+two separate operations: create and start. Some
+applications would find such behavior more natural. Ada, in particular,
+separates the "creation" of a task from its
+"activation".
+.LP
+Splitting the operation was rejected by the standard developers for
+many reasons:
+.IP " *" 3
+The number of calls required to start a thread would increase from
+one to two and thus place an additional burden on
+applications that do not require the additional synchronization. The
+second call, however, could be avoided by the additional
+complication of a start-up state attribute.
+.LP
+.IP " *" 3
+An extra state would be introduced: "created but not started". This
+would require the standard to specify the behavior of the
+thread operations when the target has not yet started executing.
+.LP
+.IP " *" 3
+For those applications that require such behavior, it is possible
+to simulate the two separate steps with the facilities that
+are currently provided. The \fIstart_routine\fP() can synchronize
+by waiting on a condition variable that is signaled by the start
+operation.
+.LP
+.LP
+An Ada implementor can choose to create the thread at either of two
+points in the Ada program: when the task object is created,
+or when the task is activated (generally at a "begin"). If the first
+approach is adopted, the \fIstart_routine\fP() needs to
+wait on a condition variable to receive the order to begin "activation".
+The second approach requires no such condition variable
+or extra synchronization. In either approach, a separate Ada task
+control block would need to be created when the task object is
+created to hold rendezvous queues, and so on.
+.LP
+An extension of the preceding model would be to allow the state of
+the thread to be modified between the create and start. This
+would allow the thread attributes object to be eliminated. This has
+been rejected because:
+.IP " *" 3
+All state in the thread attributes object has to be able to be set
+for the thread. This would require the definition of
+functions to modify thread attributes. There would be no reduction
+in the number of function calls required to set up the thread.
+In fact, for an application that creates all threads using identical
+attributes, the number of function calls required to set up
+the threads would be dramatically increased. Use of a thread attributes
+object permits the application to make one set of attribute
+setting function calls. Otherwise, the set of attribute setting function
+calls needs to be made for each thread creation.
+.LP
+.IP " *" 3
+Depending on the implementation architecture, functions to set thread
+state would require kernel calls, or for other
+implementation reasons would not be able to be implemented as macros,
+thereby increasing the cost of thread creation.
+.LP
+.IP " *" 3
+The ability for applications to segregate threads by class would be
+lost.
+.LP
+.LP
+Another suggested alternative uses a model similar to that for process
+creation, such as "thread fork". The fork semantics
+would provide more flexibility and the "create" function can be implemented
+simply by doing a thread fork followed immediately by
+a call to the desired "start routine" for the thread. This alternative
+has these problems:
+.IP " *" 3
+For many implementations, the entire stack of the calling thread would
+need to be duplicated, since in many architectures there
+is no way to determine the size of the calling frame.
+.LP
+.IP " *" 3
+Efficiency is reduced since at least some part of the stack has to
+be copied, even though in most cases the thread never needs
+the copied context, since it merely calls the desired start routine.
+.LP
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfork\fP(), \fIpthread_exit\fP(), \fIpthread_join\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_detach.3p b/man-pages-posix-2003/man3p/pthread_detach.3p
new file mode 100644
index 0000000..26a9e12
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_detach.3p
@@ -0,0 +1,100 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_DETACH" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_detach
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_detach \- detach a thread
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_detach(pthread_t\fP \fIthread\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_detach\fP() function shall indicate to the implementation
+that storage for the thread \fIthread\fP can be
+reclaimed when that thread terminates. If \fIthread\fP has not terminated,
+\fIpthread_detach\fP() shall not cause it to
+terminate. The effect of multiple \fIpthread_detach\fP() calls on
+the same target thread is unspecified.
+.SH RETURN VALUE
+.LP
+If the call succeeds, \fIpthread_detach\fP() shall return 0; otherwise,
+an error number shall be returned to indicate the
+error.
+.SH ERRORS
+.LP
+The \fIpthread_detach\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The implementation has detected that the value specified by \fIthread\fP
+does not refer to a joinable thread.
+.TP 7
+.B ESRCH
+No thread could be found corresponding to that specified by the given
+thread ID.
+.sp
+.LP
+The \fIpthread_detach\fP() function shall not return an error code
+of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIpthread_join\fP() or \fIpthread_detach\fP() functions should
+eventually be
+called for every thread that is created so that storage associated
+with the thread may be reclaimed.
+.LP
+It has been suggested that a "detach" function is not necessary; the
+\fIdetachstate\fP thread creation attribute is
+sufficient, since a thread need never be dynamically detached. However,
+need arises in at least two cases:
+.IP " 1." 4
+In a cancellation handler for a \fIpthread_join\fP() it is nearly
+essential to
+have a \fIpthread_detach\fP() function in order to detach the thread
+on which \fIpthread_join\fP() was waiting. Without it, it would be
+necessary to have the handler do
+another \fIpthread_join\fP() to attempt to detach the thread, which
+would both delay
+the cancellation processing for an unbounded period and introduce
+a new call to \fIpthread_join\fP(), which might itself need a cancellation
+handler. A dynamic detach is
+nearly essential in this case.
+.LP
+.IP " 2." 4
+In order to detach the "initial thread" (as may be desirable in processes
+that set up server threads).
+.LP
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_join\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_equal.3p b/man-pages-posix-2003/man3p/pthread_equal.3p
new file mode 100644
index 0000000..3695430
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_equal.3p
@@ -0,0 +1,71 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_EQUAL" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_equal
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_equal \- compare thread IDs
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_equal(pthread_t\fP \fIt1\fP\fB, pthread_t\fP \fIt2\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+This function shall compare the thread IDs \fIt1\fP and \fIt2\fP.
+.SH RETURN VALUE
+.LP
+The \fIpthread_equal\fP() function shall return a non-zero value if
+\fIt1\fP and \fIt2\fP are equal; otherwise, zero shall be
+returned.
+.LP
+If either \fIt1\fP or \fIt2\fP are not valid thread IDs, the behavior
+is undefined.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+The \fIpthread_equal\fP() function shall not return an error code
+of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+Implementations may choose to define a thread ID as a structure. This
+allows additional flexibility and robustness over using an
+\fBint\fP. For example, a thread ID could include a sequence number
+that allows detection of "dangling IDs" (copies of a thread
+ID that has been detached). Since the C language does not support
+comparison on structure types, the \fIpthread_equal\fP()
+function is provided to compare thread IDs.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_create\fP(), \fIpthread_self\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_exit.3p b/man-pages-posix-2003/man3p/pthread_exit.3p
new file mode 100644
index 0000000..4b173e4
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_exit.3p
@@ -0,0 +1,109 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_EXIT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_exit
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_exit \- thread termination
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+void pthread_exit(void *\fP\fIvalue_ptr\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_exit\fP() function shall terminate the calling thread
+and make the value \fIvalue_ptr\fP available to any
+successful join with the terminating thread. Any cancellation cleanup
+handlers that have been pushed and not yet popped shall be
+popped in the reverse order that they were pushed and then executed.
+After all cancellation cleanup handlers have been executed, if
+the thread has any thread-specific data, appropriate destructor functions
+shall be 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 any \fIatexit\fP() routines
+that may exist.
+.LP
+An implicit call to \fIpthread_exit\fP() is made when a thread other
+than the thread in which \fImain\fP() was first invoked
+returns from the start routine that was used to create it. The function's
+return value shall serve as the thread's exit status.
+.LP
+The behavior of \fIpthread_exit\fP() is undefined if called from a
+cancellation cleanup handler or destructor function that was
+invoked as a result of either an implicit or explicit call to \fIpthread_exit\fP().
+.LP
+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 \fIpthread_exit\fP()
+\fIvalue_ptr\fP parameter value.
+.LP
+The process shall exit with an exit status of 0 after the last thread
+has been terminated. The behavior shall be as if the
+implementation called \fIexit\fP() with a zero argument at thread
+termination time.
+.SH RETURN VALUE
+.LP
+The \fIpthread_exit\fP() function cannot return to its caller.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The normal mechanism by which a thread terminates is to return from
+the routine that was specified in the \fIpthread_create\fP() call
+that started it. The \fIpthread_exit\fP() function provides
+the capability for a thread to terminate without requiring a return
+from the start routine of that thread, thereby providing a
+function analogous to \fIexit\fP().
+.LP
+Regardless of the method of thread termination, any cancellation cleanup
+handlers that have been pushed and not yet popped are
+executed, and the destructors for any existing thread-specific data
+are executed. This volume of IEEE\ Std\ 1003.1-2001
+requires that cancellation cleanup handlers be popped and called in
+order. After all cancellation cleanup handlers have been
+executed, thread-specific data destructors are called, in an unspecified
+order, for each item of thread-specific data that exists
+in the thread. This ordering is necessary because cancellation cleanup
+handlers may rely on thread-specific data.
+.LP
+As the meaning of the status is determined by the application (except
+when the thread has been canceled, in which case it is
+PTHREAD_CANCELED), the implementation has no idea what an illegal
+status value is, which is why no address error checking is
+done.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexit\fP(), \fIpthread_create\fP(), \fIpthread_join\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_getconcurrency.3p b/man-pages-posix-2003/man3p/pthread_getconcurrency.3p
new file mode 100644
index 0000000..989e8e6
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_getconcurrency.3p
@@ -0,0 +1,115 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_GETCONCURRENCY" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_getconcurrency
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_getconcurrency, pthread_setconcurrency \- get and set the level
+of concurrency
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_getconcurrency(void);
+.br
+int pthread_setconcurrency(int\fP \fInew_level\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+Unbound threads in a process may or may not be required to be simultaneously
+active. By default, the threads implementation
+ensures that a sufficient number of threads are active so that the
+process can continue to make progress. While this conserves
+system resources, it may not produce the most effective level of concurrency.
+.LP
+The \fIpthread_setconcurrency\fP() function allows an application
+to inform the threads implementation of its desired
+concurrency level, \fInew_level\fP. The actual level of concurrency
+provided by the implementation as a result of this function
+call is unspecified.
+.LP
+If \fInew_level\fP is zero, it causes the implementation to maintain
+the concurrency level at its discretion as if
+\fIpthread_setconcurrency\fP() had never been called.
+.LP
+The \fIpthread_getconcurrency\fP() function shall return the value
+set by a previous call to the
+\fIpthread_setconcurrency\fP() function. If the \fIpthread_setconcurrency\fP()
+function was not previously called, this function
+shall return zero to indicate that the implementation is maintaining
+the concurrency level.
+.LP
+A call to \fIpthread_setconcurrency\fP() shall inform the implementation
+of its desired concurrency level. The implementation
+shall use this as a hint, not a requirement.
+.LP
+If an implementation does not support multiplexing of user threads
+on top of several kernel-scheduled entities, the
+\fIpthread_setconcurrency\fP() and \fIpthread_getconcurrency\fP()
+functions are provided for source code compatibility but they
+shall have no effect when called. To maintain the function semantics,
+the \fInew_level\fP parameter is saved when
+\fIpthread_setconcurrency\fP() is called so that a subsequent call
+to \fIpthread_getconcurrency\fP() shall return the same
+value.
+.SH RETURN VALUE
+.LP
+If successful, the \fIpthread_setconcurrency\fP() function shall return
+zero; otherwise, an error number shall be returned to
+indicate the error.
+.LP
+The \fIpthread_getconcurrency\fP() function shall always return the
+concurrency level set by a previous call to
+\fIpthread_setconcurrency\fP(). If the \fIpthread_setconcurrency\fP()
+function has never been called,
+\fIpthread_getconcurrency\fP() shall return zero.
+.SH ERRORS
+.LP
+The \fIpthread_setconcurrency\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The value specified by \fInew_level\fP is negative.
+.TP 7
+.B EAGAIN
+The value specific by \fInew_level\fP would cause a system resource
+to be exceeded.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Use of these functions changes the state of the underlying concurrency
+upon which the application depends. Library developers
+are advised to not use the \fIpthread_getconcurrency\fP() and \fIpthread_setconcurrency\fP()
+functions since their use may
+conflict with an applications use of these functions.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_getcpuclockid.3p b/man-pages-posix-2003/man3p/pthread_getcpuclockid.3p
new file mode 100644
index 0000000..4590524
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_getcpuclockid.3p
@@ -0,0 +1,73 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_GETCPUCLOCKID" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_getcpuclockid
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_getcpuclockid \- access a thread CPU-time clock (\fBADVANCED
+REALTIME THREADS\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+#include <time.h>
+.br
+.sp
+int pthread_getcpuclockid(pthread_t\fP \fIthread_id\fP\fB, clockid_t
+*\fP\fIclock_id\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_getcpuclockid\fP() function shall return in \fIclock_id\fP
+the clock ID of the CPU-time clock of the thread
+specified by \fIthread_id\fP, if the thread specified by \fIthread_id\fP
+exists.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIpthread_getcpuclockid\fP() shall return
+zero; otherwise, an error number shall be returned to
+indicate the error.
+.SH ERRORS
+.LP
+The \fIpthread_getcpuclockid\fP() function may fail if:
+.TP 7
+.B ESRCH
+The value specified by \fIthread_id\fP does not refer to an existing
+thread.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIpthread_getcpuclockid\fP() function is part of the Thread CPU-Time
+Clocks option and need not be provided on all
+implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIclock_getcpuclockid\fP(), \fIclock_getres\fP(), \fItimer_create\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP,
+\fI<time.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_getschedparam.3p b/man-pages-posix-2003/man3p/pthread_getschedparam.3p
new file mode 100644
index 0000000..7730f84
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_getschedparam.3p
@@ -0,0 +1,152 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_GETSCHEDPARAM" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_getschedparam
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_getschedparam, pthread_setschedparam \- dynamic thread scheduling
+parameters access (\fBREALTIME
+THREADS\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_getschedparam(pthread_t\fP \fIthread\fP\fB, int *restrict\fP
+\fIpolicy\fP\fB,
+.br
+\ \ \ \ \ \ struct sched_param *restrict\fP \fIparam\fP\fB);
+.br
+int pthread_setschedparam(pthread_t\fP \fIthread\fP\fB, int\fP \fIpolicy\fP\fB,
+.br
+\ \ \ \ \ \ const struct sched_param *\fP\fIparam\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_getschedparam\fP() and \fIpthread_setschedparam\fP()
+functions shall, respectively, get and set the scheduling
+policy and parameters of individual threads within a multi-threaded
+process to be retrieved and set. For SCHED_FIFO and SCHED_RR,
+the only required member of the \fBsched_param\fP structure is the
+priority \fIsched_priority\fP. For SCHED_OTHER, the affected
+scheduling parameters are implementation-defined.
+.LP
+The \fIpthread_getschedparam\fP() function shall retrieve the scheduling
+policy and scheduling parameters for the thread whose
+thread ID is given by \fIthread\fP and shall store those values in
+\fIpolicy\fP and \fIparam\fP, respectively. The priority
+value returned from \fIpthread_getschedparam\fP() shall be the value
+specified by the most recent \fIpthread_setschedparam\fP(),
+\fIpthread_setschedprio\fP(), or \fIpthread_create\fP() call affecting
+the target thread. It shall not reflect any temporary
+adjustments to its priority as a result of any priority inheritance
+or ceiling functions. The \fIpthread_setschedparam\fP()
+function shall set the scheduling policy and associated scheduling
+parameters for the thread whose thread ID is given by
+\fIthread\fP to the policy and associated parameters provided in \fIpolicy\fP
+and \fIparam\fP, respectively.
+.LP
+The \fIpolicy\fP parameter may have the value SCHED_OTHER, SCHED_FIFO,
+or SCHED_RR. The scheduling parameters for the
+SCHED_OTHER policy are implementation-defined. The SCHED_FIFO and
+SCHED_RR policies shall have a single scheduling parameter,
+\fIpriority\fP.
+.LP
+If _POSIX_THREAD_SPORADIC_SERVER is defined, then the \fIpolicy\fP
+argument may have the value SCHED_SPORADIC, with the exception
+for the \fIpthread_setschedparam\fP() function that if the scheduling
+policy was not SCHED_SPORADIC at the time of the call, it is
+implementation-defined whether the function is supported; in other
+words, the implementation need not allow the application to
+dynamically change the scheduling policy to SCHED_SPORADIC. The sporadic
+server scheduling policy has the associated parameters
+\fIsched_ss_low_priority\fP, \fIsched_ss_repl_period\fP, \fIsched_ss_init_budget\fP,
+\fIsched_priority\fP, and
+\fIsched_ss_max_repl\fP. The specified \fIsched_ss_repl_period\fP
+shall be greater than or equal to the specified
+\fIsched_ss_init_budget\fP for the function to succeed; if it is not,
+then the function shall fail. The value of
+\fIsched_ss_max_repl\fP shall be within the inclusive range [1, {SS_REPL_MAX}]
+for the function to succeed; if not, the function
+shall fail.
+.LP
+If the \fIpthread_setschedparam\fP() function fails, the scheduling
+parameters shall not be changed for the target thread.
+.SH RETURN VALUE
+.LP
+If successful, the \fIpthread_getschedparam\fP() and \fIpthread_setschedparam\fP()
+functions shall return zero; otherwise, an
+error number shall be returned to indicate the error.
+.SH ERRORS
+.LP
+The \fIpthread_getschedparam\fP() function may fail if:
+.TP 7
+.B ESRCH
+The value specified by \fIthread\fP does not refer to an existing
+thread.
+.sp
+.LP
+The \fIpthread_setschedparam\fP() function may fail if:
+.TP 7
+.B EINVAL
+The value specified by \fIpolicy\fP or one of the scheduling parameters
+associated with the scheduling policy \fIpolicy\fP is
+invalid.
+.TP 7
+.B ENOTSUP
+An attempt was made to set the policy or scheduling parameters to
+an unsupported value.
+.TP 7
+.B ENOTSUP
+An attempt was made to dynamically change the scheduling policy to
+SCHED_SPORADIC, and the implementation does not support this
+change.
+.TP 7
+.B EPERM
+The caller does not have the appropriate permission to set either
+the scheduling parameters or the scheduling policy of the
+specified thread.
+.TP 7
+.B EPERM
+The implementation does not allow the application to modify one of
+the parameters to the value specified.
+.TP 7
+.B ESRCH
+The value specified by \fIthread\fP does not refer to a existing thread.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_setschedprio\fP(), \fIsched_getparam\fP(), \fIsched_getscheduler\fP(),
+the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP, \fI<sched.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_getspecific.3p b/man-pages-posix-2003/man3p/pthread_getspecific.3p
new file mode 100644
index 0000000..f340e58
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_getspecific.3p
@@ -0,0 +1,114 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_GETSPECIFIC" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_getspecific
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_getspecific, pthread_setspecific \- thread-specific data management
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+void *pthread_getspecific(pthread_key_t\fP \fIkey\fP\fB);
+.br
+int pthread_setspecific(pthread_key_t\fP \fIkey\fP\fB, const void
+*\fP\fIvalue\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_getspecific\fP() function shall return the value currently
+bound to the specified \fIkey\fP on behalf of the
+calling thread.
+.LP
+The \fIpthread_setspecific\fP() function shall associate a thread-specific
+\fIvalue\fP with a \fIkey\fP obtained via a
+previous call to \fIpthread_key_create\fP(). Different threads may
+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.
+.LP
+The effect of calling \fIpthread_getspecific\fP() or \fIpthread_setspecific\fP()
+with a \fIkey\fP value not obtained from \fIpthread_key_create\fP()
+or after \fIkey\fP has been deleted with \fIpthread_key_delete\fP()
+is undefined.
+.LP
+Both \fIpthread_getspecific\fP() and \fIpthread_setspecific\fP() may
+be called from a thread-specific data destructor
+function. A call to \fIpthread_getspecific\fP() for the thread-specific
+data key being destroyed shall return the value NULL,
+unless the value is changed (after the destructor starts) by a call
+to \fIpthread_setspecific\fP(). Calling
+\fIpthread_setspecific\fP() from a thread-specific data destructor
+routine may result either in lost storage (after at least
+PTHREAD_DESTRUCTOR_ITERATIONS attempts at destruction) or in an infinite
+loop.
+.LP
+Both functions may be implemented as macros.
+.SH RETURN VALUE
+.LP
+The \fIpthread_getspecific\fP() function shall return the thread-specific
+data value associated with the given \fIkey\fP. If
+no thread-specific data value is associated with \fIkey\fP, then the
+value NULL shall be returned.
+.LP
+If successful, the \fIpthread_setspecific\fP() function shall return
+zero; otherwise, an error number shall be returned to
+indicate the error.
+.SH ERRORS
+.LP
+No errors are returned from \fIpthread_getspecific\fP().
+.LP
+The \fIpthread_setspecific\fP() function shall fail if:
+.TP 7
+.B ENOMEM
+Insufficient memory exists to associate the value with the key.
+.sp
+.LP
+The \fIpthread_setspecific\fP() function may fail if:
+.TP 7
+.B EINVAL
+The key value is invalid.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+Performance and ease-of-use of \fIpthread_getspecific\fP() are critical
+for functions that rely on maintaining state in
+thread-specific data. Since no errors are required to be detected
+by it, and since the only error that could be detected is the use
+of an invalid key, the function to \fIpthread_getspecific\fP() has
+been designed to favor speed and simplicity over error
+reporting.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_key_create\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_join.3p b/man-pages-posix-2003/man3p/pthread_join.3p
new file mode 100644
index 0000000..c8b5e52
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_join.3p
@@ -0,0 +1,184 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_JOIN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_join
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_join \- wait for thread termination
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_join(pthread_t\fP \fIthread\fP\fB, void **\fP\fIvalue_ptr\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_join\fP() function shall suspend execution of the calling
+thread until the target \fIthread\fP terminates,
+unless the target \fIthread\fP has already terminated. On return from
+a successful \fIpthread_join\fP() call with a non-NULL
+\fIvalue_ptr\fP argument, the value passed to \fIpthread_exit\fP()
+by the
+terminating thread shall be made available in the location referenced
+by \fIvalue_ptr\fP. When a \fIpthread_join\fP() returns
+successfully, the target thread has been terminated. The results of
+multiple simultaneous calls to \fIpthread_join\fP() specifying
+the same target thread are undefined. If the thread calling \fIpthread_join\fP()
+is canceled, then the target thread shall not be
+detached.
+.LP
+It is unspecified whether a thread that has exited but remains unjoined
+counts against {PTHREAD_THREADS_MAX}.
+.SH RETURN VALUE
+.LP
+If successful, the \fIpthread_join\fP() function shall return zero;
+otherwise, an error number shall be returned to indicate
+the error.
+.SH ERRORS
+.LP
+The \fIpthread_join\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The implementation has detected that the value specified by \fIthread\fP
+does not refer to a joinable thread.
+.TP 7
+.B ESRCH
+No thread could be found corresponding to that specified by the given
+thread ID.
+.sp
+.LP
+The \fIpthread_join\fP() function may fail if:
+.TP 7
+.B EDEADLK
+A deadlock was detected or the value of \fIthread\fP specifies the
+calling thread.
+.sp
+.LP
+The \fIpthread_join\fP() function shall not return an error code of
+[EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+An example of thread creation and deletion follows:
+.sp
+.RS
+.nf
+
+\fBtypedef struct {
+ int *ar;
+ long n;
+} subarray;
+.sp
+
+void *
+incer(void *arg)
+{
+ long i;
+.sp
+
+ for (i = 0; i < ((subarray *)arg)->n; i++)
+ ((subarray *)arg)->ar[i]++;
+}
+.sp
+
+int main(void)
+{
+ int ar[1000000];
+ pthread_t th1, th2;
+ subarray sb1, sb2;
+.sp
+
+ sb1.ar = &ar[0];
+ sb1.n = 500000;
+ (void) pthread_create(&th1, NULL, incer, &sb1);
+.sp
+
+ sb2.ar = &ar[500000];
+ sb2.n = 500000;
+ (void) pthread_create(&th2, NULL, incer, &sb2);
+.sp
+
+ (void) pthread_join(th1, NULL);
+ (void) pthread_join(th2, NULL);
+ return 0;
+}
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIpthread_join\fP() function is a convenience that has proven
+useful in multi-threaded applications. It is true that a
+programmer could simulate this function if it were not provided by
+passing extra state as part of the argument to the
+\fIstart_routine\fP(). The terminating thread would set a flag to
+indicate termination and broadcast a condition that is part of
+that state; a joining thread would wait on that condition variable.
+While such a technique would allow a thread to wait on more
+complex conditions (for example, waiting for multiple threads to terminate),
+waiting on individual thread termination is considered
+widely useful. Also, including the \fIpthread_join\fP() function in
+no way precludes a programmer from coding such complex waits.
+Thus, while not a primitive, including \fIpthread_join\fP() in this
+volume of IEEE\ Std\ 1003.1-2001 was considered
+valuable.
+.LP
+The \fIpthread_join\fP() function provides a simple mechanism allowing
+an application to wait for a thread to terminate. After
+the thread terminates, the application may then choose to clean up
+resources that were used by the thread. For instance, after
+\fIpthread_join\fP() returns, any application-provided stack storage
+could be reclaimed.
+.LP
+The \fIpthread_join\fP() or \fIpthread_detach\fP() function should
+eventually
+be called for every thread that is created with the \fIdetachstate\fP
+attribute set to PTHREAD_CREATE_JOINABLE so that storage
+associated with the thread may be reclaimed.
+.LP
+The interaction between \fIpthread_join\fP() and cancellation is well-defined
+for the following reasons:
+.IP " *" 3
+The \fIpthread_join\fP() function, like all other non-async-cancel-safe
+functions, can only be called with deferred
+cancelability type.
+.LP
+.IP " *" 3
+Cancellation cannot occur in the disabled cancelability state.
+.LP
+.LP
+Thus, only the default cancelability state need be considered. As
+specified, either the \fIpthread_join\fP() call is canceled,
+or it succeeds, but not both. The difference is obvious to the application,
+since either a cancellation handler is run or
+\fIpthread_join\fP() returns. There are no race conditions since \fIpthread_join\fP()
+was called in the deferred cancelability
+state.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_create\fP(), \fIwait\fP(), the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_key_create.3p b/man-pages-posix-2003/man3p/pthread_key_create.3p
new file mode 100644
index 0000000..75e46e5
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_key_create.3p
@@ -0,0 +1,238 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_KEY_CREATE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_key_create
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_key_create \- thread-specific data key creation
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_key_create(pthread_key_t *\fP\fIkey\fP\fB, void (*\fP\fIdestructor\fP\fB)(void*));
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_key_create\fP() function shall create a thread-specific
+data key visible to all threads in the process. Key
+values provided by \fIpthread_key_create\fP() 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 \fIpthread_setspecific\fP()
+are maintained on a per-thread basis and persist for the
+life of the calling thread.
+.LP
+Upon key creation, the value NULL shall be associated with the new
+key in all active threads. Upon thread creation, the value
+NULL shall be associated with all defined keys in the new thread.
+.LP
+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 that
+key, the value of the key is set to NULL, and then the function
+pointed to is called with the previously 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.
+.LP
+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,
+implementations may stop calling destructors, or they may continue
+calling destructors until no non-NULL values with associated
+destructors exist, even though this might result in an infinite loop.
+.SH RETURN VALUE
+.LP
+If successful, the \fIpthread_key_create\fP() function shall store
+the newly created key value at *\fIkey\fP and shall return
+zero. Otherwise, an error number shall be returned to indicate the
+error.
+.SH ERRORS
+.LP
+The \fIpthread_key_create\fP() function shall fail if:
+.TP 7
+.B 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} has been exceeded.
+.TP 7
+.B ENOMEM
+Insufficient memory exists to create the key.
+.sp
+.LP
+The \fIpthread_key_create\fP() function shall not return an error
+code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+The following example demonstrates a function that initializes a thread-specific
+data key when it is first called, and
+associates a thread-specific object with each calling thread, initializing
+this object when necessary.
+.sp
+.RS
+.nf
+
+\fBstatic pthread_key_t key;
+static pthread_once_t key_once = PTHREAD_ONCE_INIT;
+.sp
+
+static void
+make_key()
+{
+ (void) pthread_key_create(&key, NULL);
+}
+.sp
+
+func()
+{
+ void *ptr;
+.sp
+
+ (void) pthread_once(&key_once, make_key);
+ if ((ptr = pthread_getspecific(key)) == NULL) {
+ ptr = malloc(OBJECT_SIZE);
+ ...
+ (void) pthread_setspecific(key, ptr);
+ }
+ ...
+}
+\fP
+.fi
+.RE
+.LP
+Note that the key has to be initialized before \fIpthread_getspecific\fP()
+or \fIpthread_setspecific\fP() can be used. The \fIpthread_key_create\fP()
+call could either be explicitly made in a module initialization routine,
+or it can be done implicitly by the first call to a module
+as in this example. Any attempt to use the key before it is initialized
+is a programming error, making the code below
+incorrect.
+.sp
+.RS
+.nf
+
+\fBstatic pthread_key_t key;
+.sp
+
+func()
+{
+ void *ptr;
+.sp
+
+ /* KEY NOT INITIALIZED!!! THIS WON'T WORK!!! */
+ if ((ptr = pthread_getspecific(key)) == NULL &&
+ pthread_setspecific(key, NULL) != 0) {
+ pthread_key_create(&key, NULL);
+ ...
+ }
+}
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.br
+.SH RATIONALE
+.LP
+.SS Destructor Functions
+.LP
+Normally, the value bound to a key on behalf of a particular thread
+is a pointer to storage allocated dynamically on behalf of
+the calling thread. The destructor functions specified with \fIpthread_key_create\fP()
+are intended to be used to free this
+storage when the thread exits. Thread cancellation cleanup handlers
+cannot be used for this purpose because thread-specific data
+may persist outside the lexical scope in which the cancellation cleanup
+handlers operate.
+.LP
+If the value associated with a key needs to be updated during the
+lifetime of the thread, it may be necessary to release the
+storage associated with the old value before the new value is bound.
+Although the \fIpthread_setspecific\fP() function could do this automatically,
+this feature is not
+needed often enough to justify the added complexity. Instead, the
+programmer is responsible for freeing the stale storage:
+.sp
+.RS
+.nf
+
+\fBpthread_getspecific(key, &old);
+new = allocate();
+destructor(old);
+pthread_setspecific(key, new);
+\fP
+.fi
+.RE
+.TP 7
+\fBNote:\fP
+The above example could leak storage if run with asynchronous cancellation
+enabled. No such problems occur in the default
+cancellation state if no cancellation points occur between the get
+and set.
+.sp
+.LP
+There is no notion of a destructor-safe function. If an application
+does not call \fIpthread_exit\fP() from a signal handler, or if it
+blocks any signal whose handler may call
+\fIpthread_exit\fP() while calling async-unsafe functions, all functions
+may be
+safely called from destructors.
+.SS Non-Idempotent Data Key Creation
+.LP
+There were requests to make \fIpthread_key_create\fP() idempotent
+with respect to a given \fIkey\fP address parameter. This
+would allow applications to call \fIpthread_key_create\fP() multiple
+times for a given \fIkey\fP address and be guaranteed that
+only one key would be created. Doing so would require the key value
+to be previously initialized (possibly at compile time) to a
+known null value and would require that implicit mutual-exclusion
+be performed based on the address and contents of the \fIkey\fP
+parameter in order to guarantee that exactly one key would be created.
+.LP
+Unfortunately, the implicit mutual-exclusion would not be limited
+to only \fIpthread_key_create\fP(). On many implementations,
+implicit mutual-exclusion would also have to be performed by \fIpthread_getspecific\fP()
+and \fIpthread_setspecific\fP() in order to guard against using incompletely
+stored or
+not-yet-visible key values. This could significantly increase the
+cost of important operations, particularly \fIpthread_getspecific\fP().
+.LP
+Thus, this proposal was rejected. The \fIpthread_key_create\fP() function
+performs no implicit synchronization. It is the
+responsibility of the programmer to ensure that it is called exactly
+once per key before use of the key. Several straightforward
+mechanisms can already be used to accomplish this, including calling
+explicit module initialization functions, using mutexes, and
+using \fIpthread_once\fP(). This places no significant burden on the
+programmer,
+introduces no possibly confusing \fIad hoc\fP implicit synchronization
+mechanism, and potentially allows commonly used
+thread-specific data operations to be more efficient.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_getspecific\fP(), \fIpthread_key_delete\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_key_delete.3p b/man-pages-posix-2003/man3p/pthread_key_delete.3p
new file mode 100644
index 0000000..9c03ce5
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_key_delete.3p
@@ -0,0 +1,122 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_KEY_DELETE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_key_delete
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_key_delete \- thread-specific data key deletion
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_key_delete(pthread_key_t\fP \fIkey\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_key_delete\fP() function shall delete a thread-specific
+data key previously returned by \fIpthread_key_create\fP(). The thread-specific
+data values associated with \fIkey\fP
+need not be NULL at the time \fIpthread_key_delete\fP() 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
+\fIpthread_key_delete\fP() is called. Any attempt to use
+\fIkey\fP following the call to \fIpthread_key_delete\fP() results
+in undefined behavior.
+.LP
+The \fIpthread_key_delete\fP() function shall be callable from within
+destructor functions. No destructor functions shall be
+invoked by \fIpthread_key_delete\fP(). Any destructor function that
+may have been associated with \fIkey\fP shall no longer be
+called upon thread exit.
+.SH RETURN VALUE
+.LP
+If successful, the \fIpthread_key_delete\fP() function shall return
+zero; otherwise, an error number shall be returned to
+indicate the error.
+.SH ERRORS
+.LP
+The \fIpthread_key_delete\fP() function may fail if:
+.TP 7
+.B EINVAL
+The \fIkey\fP value is invalid.
+.sp
+.LP
+The \fIpthread_key_delete\fP() function shall not return an error
+code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+A thread-specific data key deletion function has been included in
+order to allow the resources associated with an unused
+thread-specific data key to be freed. Unused thread-specific data
+keys can arise, among other scenarios, when a dynamically loaded
+module that allocated a key is unloaded.
+.LP
+Conforming applications are responsible for performing any cleanup
+actions needed for data structures associated with the key to
+be deleted, including data referenced by thread-specific data values.
+No such cleanup is done by \fIpthread_key_delete\fP(). In
+particular, destructor functions are not called. There are several
+reasons for this division of responsibility:
+.IP " 1." 4
+The associated destructor functions used to free thread-specific data
+at thread exit time are only guaranteed to work correctly
+when called in the thread that allocated the thread-specific data.
+(Destructors themselves may utilize thread-specific data.) Thus,
+they cannot be used to free thread-specific data in other threads
+at key deletion time. Attempting to have them called by other
+threads at key deletion time would require other threads to be asynchronously
+interrupted. But since interrupted threads could be
+in an arbitrary state, including holding locks necessary for the destructor
+to run, this approach would fail. In general, there is
+no safe mechanism whereby an implementation could free thread-specific
+data at key deletion time.
+.LP
+.IP " 2." 4
+Even if there were a means of safely freeing thread-specific data
+associated with keys to be deleted, doing so would require
+that implementations be able to enumerate the threads with non-NULL
+data and potentially keep them from creating more
+thread-specific data while the key deletion is occurring. This special
+case could cause extra synchronization in the normal case,
+which would otherwise be unnecessary.
+.LP
+.LP
+For an application to know that it is safe to delete a key, it has
+to know that all the threads that might potentially ever use
+the key do not attempt to use it again. For example, it could know
+this if all the client threads have called a cleanup procedure
+declaring that they are through with the module that is being shut
+down, perhaps by setting a reference count to zero.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_key_create\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_kill.3p b/man-pages-posix-2003/man3p/pthread_kill.3p
new file mode 100644
index 0000000..d9c4631
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_kill.3p
@@ -0,0 +1,83 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_KILL" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_kill
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_kill \- send a signal to a thread
+.SH SYNOPSIS
+.LP
+\fB#include <signal.h>
+.br
+.sp
+int pthread_kill(pthread_t\fP \fIthread\fP\fB, int\fP \fIsig\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_kill\fP() function shall request that a signal be delivered
+to the specified thread.
+.LP
+As in \fIkill\fP(), if \fIsig\fP is zero, error checking shall be
+performed but no signal
+shall actually be sent.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the function shall return a value of zero.
+Otherwise, the function shall return an error number. If
+the \fIpthread_kill\fP() function fails, no signal shall be sent.
+.SH ERRORS
+.LP
+The \fIpthread_kill\fP() function shall fail if:
+.TP 7
+.B ESRCH
+No thread could be found corresponding to that specified by the given
+thread ID.
+.TP 7
+.B EINVAL
+The value of the \fIsig\fP argument is an invalid or unsupported signal
+number.
+.sp
+.LP
+The \fIpthread_kill\fP() function shall not return an error code of
+[EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIpthread_kill\fP() function provides a mechanism for asynchronously
+directing a signal at a thread in the calling
+process. This could be used, for example, by one thread to affect
+broadcast delivery of a signal to a set of threads.
+.LP
+Note that \fIpthread_kill\fP() only causes the signal to be handled
+in the context of the given thread; the signal action
+(termination or stopping) affects the process as a whole.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIkill\fP(), \fIpthread_self\fP(), \fIraise\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<signal.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_mutex_destroy.3p b/man-pages-posix-2003/man3p/pthread_mutex_destroy.3p
new file mode 100644
index 0000000..c6ceacf
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_mutex_destroy.3p
@@ -0,0 +1 @@
+.so man3p/pthread_mutex_init.3p
diff --git a/man-pages-posix-2003/man3p/pthread_mutex_getprioceiling.3p b/man-pages-posix-2003/man3p/pthread_mutex_getprioceiling.3p
new file mode 100644
index 0000000..79f5812
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_mutex_getprioceiling.3p
@@ -0,0 +1,95 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_MUTEX_GETPRIOCEILING" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_mutex_getprioceiling
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_mutex_getprioceiling, pthread_mutex_setprioceiling \- get and
+set the priority ceiling of a mutex (\fBREALTIME
+THREADS\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_mutex_getprioceiling(const pthread_mutex_t *restrict\fP
+\fImutex\fP\fB,
+.br
+\ \ \ \ \ \ int *restrict\fP \fIprioceiling\fP\fB);
+.br
+int pthread_mutex_setprioceiling(pthread_mutex_t *restrict\fP \fImutex\fP\fB,
+.br
+\ \ \ \ \ \ int\fP \fIprioceiling\fP\fB, int *restrict\fP \fIold_ceiling\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_mutex_getprioceiling\fP() function shall return the
+current priority ceiling of the mutex.
+.LP
+The \fIpthread_mutex_setprioceiling\fP() function shall either lock
+the mutex if it is unlocked, or block until it can
+successfully lock the mutex, then it shall change the mutex's priority
+ceiling and release the mutex. When the change is
+successful, the previous value of the priority ceiling shall be returned
+in \fIold_ceiling\fP. The process of locking the mutex
+need not adhere to the priority protect protocol.
+.LP
+If the \fIpthread_mutex_setprioceiling\fP() function fails, the mutex
+priority ceiling shall not be changed.
+.SH RETURN VALUE
+.LP
+If successful, the \fIpthread_mutex_getprioceiling\fP() and \fIpthread_mutex_setprioceiling\fP()
+functions shall return zero;
+otherwise, an error number shall be returned to indicate the error.
+.SH ERRORS
+.LP
+The \fIpthread_mutex_getprioceiling\fP() and \fIpthread_mutex_setprioceiling\fP()
+functions may fail if:
+.TP 7
+.B EINVAL
+The priority requested by \fIprioceiling\fP is out of range.
+.TP 7
+.B EINVAL
+The value specified by \fImutex\fP does not refer to a currently existing
+mutex.
+.TP 7
+.B EPERM
+The caller does not have the privilege to perform the operation.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_mutex_destroy\fP(), \fIpthread_mutex_lock\fP(), \fIpthread_mutex_timedlock\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_mutex_init.3p b/man-pages-posix-2003/man3p/pthread_mutex_init.3p
new file mode 100644
index 0000000..65cf46c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_mutex_init.3p
@@ -0,0 +1,368 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_MUTEX_DESTROY" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_mutex_destroy
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_mutex_destroy, pthread_mutex_init \- destroy and initialize
+a mutex
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_mutex_destroy(pthread_mutex_t *\fP\fImutex\fP\fB);
+.br
+int pthread_mutex_init(pthread_mutex_t *restrict\fP \fImutex\fP\fB,
+.br
+\ \ \ \ \ \ const pthread_mutexattr_t *restrict\fP \fIattr\fP\fB);
+.br
+pthread_mutex_t\fP \fImutex\fP \fB= PTHREAD_MUTEX_INITIALIZER; \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_mutex_destroy\fP() function shall destroy the mutex
+object referenced by \fImutex\fP; the mutex object becomes,
+in effect, uninitialized. An implementation may cause \fIpthread_mutex_destroy\fP()
+to set the object referenced by \fImutex\fP
+to an invalid value. A destroyed mutex object can be reinitialized
+using \fIpthread_mutex_init\fP(); the results of otherwise
+referencing the object after it has been destroyed are undefined.
+.LP
+It shall be safe to destroy an initialized mutex that is unlocked.
+Attempting to destroy a locked mutex results in undefined
+behavior.
+.LP
+The \fIpthread_mutex_init\fP() function shall initialize the mutex
+referenced by \fImutex\fP with attributes specified by
+\fIattr\fP. If \fIattr\fP is NULL, the default mutex attributes are
+used; the effect shall be the same as passing the address of
+a default mutex attributes object. Upon successful initialization,
+the state of the mutex becomes initialized and unlocked.
+.LP
+Only \fImutex\fP itself may be used for performing synchronization.
+The result of referring to copies of \fImutex\fP in calls
+to \fIpthread_mutex_lock\fP(), \fIpthread_mutex_trylock\fP(), \fIpthread_mutex_unlock\fP(),
+and \fIpthread_mutex_destroy\fP() is undefined.
+.LP
+Attempting to initialize an already initialized mutex results in undefined
+behavior.
+.LP
+In cases where default mutex attributes are appropriate, the macro
+PTHREAD_MUTEX_INITIALIZER can be used to initialize mutexes
+that are statically allocated. The effect shall be equivalent to dynamic
+initialization by a call to \fIpthread_mutex_init\fP()
+with parameter \fIattr\fP specified as NULL, except that no error
+checks are performed.
+.SH RETURN VALUE
+.LP
+If successful, the \fIpthread_mutex_destroy\fP() and \fIpthread_mutex_init\fP()
+functions shall return zero; otherwise, an
+error number shall be returned to indicate the error.
+.LP
+The [EBUSY] and [EINVAL] error checks, if implemented, act as if they
+were performed immediately at the beginning of processing
+for the function and shall cause an error return prior to modifying
+the state of the mutex specified by \fImutex\fP.
+.SH ERRORS
+.LP
+The \fIpthread_mutex_destroy\fP() function may fail if:
+.TP 7
+.B EBUSY
+The implementation has detected an attempt to destroy the object referenced
+by \fImutex\fP while it is locked or referenced
+(for example, while being used in a \fIpthread_cond_timedwait\fP()
+or \fIpthread_cond_wait\fP()) by another thread.
+.TP 7
+.B EINVAL
+The value specified by \fImutex\fP is invalid.
+.sp
+.LP
+The \fIpthread_mutex_init\fP() function shall fail if:
+.TP 7
+.B EAGAIN
+The system lacked the necessary resources (other than memory) to initialize
+another mutex.
+.TP 7
+.B ENOMEM
+Insufficient memory exists to initialize the mutex.
+.TP 7
+.B EPERM
+The caller does not have the privilege to perform the operation.
+.sp
+.LP
+The \fIpthread_mutex_init\fP() function may fail if:
+.TP 7
+.B EBUSY
+The implementation has detected an attempt to reinitialize the object
+referenced by \fImutex\fP, a previously initialized, but
+not yet destroyed, mutex.
+.TP 7
+.B EINVAL
+The value specified by \fIattr\fP is invalid.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.SS Alternate Implementations Possible
+.LP
+This volume of IEEE\ Std\ 1003.1-2001 supports several alternative
+implementations of mutexes. An implementation may
+store the lock directly in the object of type \fBpthread_mutex_t\fP.
+Alternatively, an implementation may store the lock in the
+heap and merely store a pointer, handle, or unique ID in the mutex
+object. Either implementation has advantages or may be required
+on certain hardware configurations. So that portable code can be written
+that is invariant to this choice, this volume of
+IEEE\ Std\ 1003.1-2001 does not define assignment or equality for
+this type, and it uses the term "initialize" to
+reinforce the (more restrictive) notion that the lock may actually
+reside in the mutex object itself.
+.LP
+Note that this precludes an over-specification of the type of the
+mutex or condition variable and motivates the opaqueness of
+the type.
+.LP
+An implementation is permitted, but not required, to have \fIpthread_mutex_destroy\fP()
+store an illegal value into the mutex.
+This may help detect erroneous programs that try to lock (or otherwise
+reference) a mutex that has already been destroyed.
+.SS Tradeoff Between Error Checks and Performance Supported
+.LP
+Many of the error checks were made optional in order to let implementations
+trade off performance \fIversus\fP degree of error
+checking according to the needs of their specific applications and
+execution environment. As a general rule, errors or conditions
+caused by the system (such as insufficient memory) always need to
+be reported, but errors due to an erroneously coded application
+(such as failing to provide adequate synchronization to prevent a
+mutex from being deleted while in use) are made optional.
+.LP
+A wide range of implementations is thus made possible. For example,
+an implementation intended for application debugging may
+implement all of the error checks, but an implementation running a
+single, provably correct application under very tight
+performance constraints in an embedded computer might implement minimal
+checks. An implementation might even be provided in two
+versions, similar to the options that compilers provide: a full-checking,
+but slower version; and a limited-checking, but faster
+version. To forbid this optionality would be a disservice to users.
+.LP
+By carefully limiting the use of "undefined behavior" only to things
+that an erroneous (badly coded) application might do, and
+by defining that resource-not-available errors are mandatory, this
+volume of IEEE\ Std\ 1003.1-2001 ensures that a
+fully-conforming application is portable across the full range of
+implementations, while not forcing all implementations to add
+overhead to check for numerous things that a correct program never
+does.
+.SS Why No Limits are Defined
+.LP
+Defining symbols for the maximum number of mutexes and condition variables
+was considered but rejected because the number of
+these objects may change dynamically. Furthermore, many implementations
+place these objects into application memory; thus, there is
+no explicit maximum.
+.SS Static Initializers for Mutexes and Condition Variables
+.LP
+Providing for static initialization of statically allocated synchronization
+objects allows modules with private static
+synchronization variables to avoid runtime initialization tests and
+overhead. Furthermore, it simplifies the coding of
+self-initializing modules. Such modules are common in C libraries,
+where for various reasons the design calls for
+self-initialization instead of requiring an explicit module initialization
+function to be called. An example use of static
+initialization follows.
+.LP
+Without static initialization, a self-initializing routine \fIfoo\fP()
+might look as follows:
+.sp
+.RS
+.nf
+
+\fBstatic pthread_once_t foo_once = PTHREAD_ONCE_INIT;
+static pthread_mutex_t foo_mutex;
+.sp
+
+void foo_init()
+{
+ pthread_mutex_init(&foo_mutex, NULL);
+}
+.sp
+
+void foo()
+{
+ pthread_once(&foo_once, foo_init);
+ pthread_mutex_lock(&foo_mutex);
+ /* Do work. */
+ pthread_mutex_unlock(&foo_mutex);
+}
+\fP
+.fi
+.RE
+.LP
+With static initialization, the same routine could be coded as follows:
+.sp
+.RS
+.nf
+
+\fBstatic pthread_mutex_t foo_mutex = PTHREAD_MUTEX_INITIALIZER;
+.sp
+
+void foo()
+{
+ pthread_mutex_lock(&foo_mutex);
+ /* Do work. */
+ pthread_mutex_unlock(&foo_mutex);
+}
+\fP
+.fi
+.RE
+.LP
+Note that the static initialization both eliminates the need for the
+initialization test inside \fIpthread_once\fP() and the fetch of &\fIfoo_mutex\fP
+to learn the address to be passed
+to \fIpthread_mutex_lock\fP() or \fIpthread_mutex_unlock\fP().
+.LP
+Thus, the C code written to initialize static objects is simpler on
+all systems and is also faster on a large class of systems;
+those where the (entire) synchronization object can be stored in application
+memory.
+.LP
+Yet the locking performance question is likely to be raised for machines
+that require mutexes to be allocated out of special
+memory. Such machines actually have to have mutexes and possibly condition
+variables contain pointers to the actual hardware locks.
+For static initialization to work on such machines, \fIpthread_mutex_lock\fP()
+also has to test whether or not the pointer to the actual lock has
+been allocated. If it has not, \fIpthread_mutex_lock\fP() has to initialize
+it before use. The reservation of such
+resources can be made when the program is loaded, and hence return
+codes have not been added to mutex locking and condition
+variable waiting to indicate failure to complete initialization.
+.LP
+This runtime test in \fIpthread_mutex_lock\fP() would at first seem
+to be
+extra work; an extra test is required to see whether the pointer has
+been initialized. On most machines this would actually be
+implemented as a fetch of the pointer, testing the pointer against
+zero, and then using the pointer if it has already been
+initialized. While the test might seem to add extra work, the extra
+effort of testing a register is usually negligible since no
+extra memory references are actually done. As more and more machines
+provide caches, the real expenses are memory references, not
+instructions executed.
+.LP
+Alternatively, depending on the machine architecture, there are often
+ways to eliminate \fIall\fP overhead in the most
+important case: on the lock operations that occur \fIafter\fP the
+lock has been initialized. This can be done by shifting more
+overhead to the less frequent operation: initialization. Since out-of-line
+mutex allocation also means that an address has to be
+dereferenced to find the actual lock, one technique that is widely
+applicable is to have static initialization store a bogus value
+for that address; in particular, an address that causes a machine
+fault to occur. When such a fault occurs upon the first attempt
+to lock such a mutex, validity checks can be done, and then the correct
+address for the actual lock can be filled in. Subsequent
+lock operations incur no extra overhead since they do not "fault".
+This is merely one technique that can be used to support
+static initialization, while not adversely affecting the performance
+of lock acquisition. No doubt there are other techniques that
+are highly machine-dependent.
+.LP
+The locking overhead for machines doing out-of-line mutex allocation
+is thus similar for modules being implicitly initialized,
+where it is improved for those doing mutex allocation entirely inline.
+The inline case is thus made much faster, and the
+out-of-line case is not significantly worse.
+.LP
+Besides the issue of locking performance for such machines, a concern
+is raised that it is possible that threads would serialize
+contending for initialization locks when attempting to finish initializing
+statically allocated mutexes. (Such finishing would
+typically involve taking an internal lock, allocating a structure,
+storing a pointer to the structure in the mutex, and releasing
+the internal lock.) First, many implementations would reduce such
+serialization by hashing on the mutex address. Second, such
+serialization can only occur a bounded number of times. In particular,
+it can happen at most as many times as there are statically
+allocated synchronization objects. Dynamically allocated objects would
+still be initialized via \fIpthread_mutex_init\fP() or \fIpthread_cond_init\fP().
+.LP
+Finally, if none of the above optimization techniques for out-of-line
+allocation yields sufficient performance for an
+application on some implementation, the application can avoid static
+initialization altogether by explicitly initializing all
+synchronization objects with the corresponding \fIpthread_*_init\fP()
+functions,
+which are supported by all implementations. An implementation can
+also document the tradeoffs and advise which initialization
+technique is more efficient for that particular implementation.
+.SS Destroying Mutexes
+.LP
+A mutex can be destroyed immediately after it is unlocked. For example,
+consider the following code:
+.sp
+.RS
+.nf
+
+\fBstruct obj {
+pthread_mutex_t om;
+ int refcnt;
+ ...
+};
+.sp
+
+obj_done(struct obj *op)
+{
+ pthread_mutex_lock(&op->om);
+ if (--op->refcnt == 0) {
+ pthread_mutex_unlock(&op->om);
+(A) pthread_mutex_destroy(&op->om);
+(B) free(op);
+ } else
+(C) pthread_mutex_unlock(&op->om);
+}
+\fP
+.fi
+.RE
+.LP
+In this case \fIobj\fP is reference counted and \fIobj_done\fP() is
+called whenever a reference to the object is dropped.
+Implementations are required to allow an object to be destroyed and
+freed and potentially unmapped (for example, lines A and B)
+immediately after the object is unlocked (line C).
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_mutex_getprioceiling\fP(), \fIpthread_mutex_lock\fP(),
+\fIpthread_mutex_timedlock\fP(), \fIpthread_mutexattr_getpshared\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_mutex_lock.3p b/man-pages-posix-2003/man3p/pthread_mutex_lock.3p
new file mode 100644
index 0000000..7a351ed
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_mutex_lock.3p
@@ -0,0 +1,194 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_MUTEX_LOCK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_mutex_lock
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_mutex_lock, pthread_mutex_trylock, pthread_mutex_unlock \-
+lock and unlock a mutex
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_mutex_lock(pthread_mutex_t *\fP\fImutex\fP\fB);
+.br
+int pthread_mutex_trylock(pthread_mutex_t *\fP\fImutex\fP\fB);
+.br
+int pthread_mutex_unlock(pthread_mutex_t *\fP\fImutex\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The mutex object referenced by \fImutex\fP shall be locked by calling
+\fIpthread_mutex_lock\fP(). If the mutex is already
+locked, the calling thread shall block until the mutex becomes available.
+This operation shall return with the mutex object
+referenced by \fImutex\fP in the locked state with the calling thread
+as its owner.
+.LP
+If the mutex type is PTHREAD_MUTEX_NORMAL, deadlock detection shall
+not be provided. Attempting to relock the mutex causes
+deadlock. If a thread attempts to unlock a mutex that it has not locked
+or a mutex which is unlocked, undefined behavior
+results.
+.LP
+If the mutex type is PTHREAD_MUTEX_ERRORCHECK, then error checking
+shall be provided. If a thread attempts to relock a mutex
+that it has already locked, an error shall be returned. If a thread
+attempts to unlock a mutex that it has not locked or a mutex
+which is unlocked, an error shall be returned.
+.LP
+If the mutex type is PTHREAD_MUTEX_RECURSIVE, then the mutex shall
+maintain the concept of a lock count. When a thread
+successfully acquires a mutex for the first time, the lock count shall
+be set to one. Every time a thread relocks this mutex, the
+lock count shall be incremented by one. Each time the thread unlocks
+the mutex, the lock count shall be decremented by one. When
+the lock count reaches zero, the mutex shall become available for
+other threads to acquire. If a thread attempts to unlock a mutex
+that it has not locked or a mutex which is unlocked, an error shall
+be returned.
+.LP
+If the mutex type is PTHREAD_MUTEX_DEFAULT, attempting to recursively
+lock the mutex results in undefined behavior. Attempting
+to unlock the mutex if it was not locked by the calling thread results
+in undefined behavior. Attempting to unlock the mutex if it
+is not locked results in undefined behavior.
+.LP
+The \fIpthread_mutex_trylock\fP() function shall be equivalent to
+\fIpthread_mutex_lock\fP(), except that if the mutex object
+referenced by \fImutex\fP is currently locked (by any thread, including
+the current thread), the call shall return immediately. If
+the mutex type is PTHREAD_MUTEX_RECURSIVE and the mutex is currently
+owned by the calling thread, the mutex lock count shall be
+incremented by one and the \fIpthread_mutex_trylock\fP() function
+shall immediately return success.
+.LP
+The \fIpthread_mutex_unlock\fP() function shall release the mutex
+object referenced by \fImutex\fP. The manner
+in which a mutex is released is dependent upon the mutex's type attribute.
+If there are threads blocked on the mutex object referenced by \fImutex\fP
+when \fIpthread_mutex_unlock\fP() is
+called, resulting in the mutex becoming available, the scheduling
+policy shall determine which thread shall acquire the mutex.
+.LP
+(In the case of PTHREAD_MUTEX_RECURSIVE mutexes, the mutex shall become
+available when the count reaches zero and the calling
+thread no longer has any locks on this mutex.)
+.LP
+If a signal is delivered to a thread waiting for a mutex, upon return
+from the signal handler the thread shall resume waiting
+for the mutex as if it was not interrupted.
+.SH RETURN VALUE
+.LP
+If successful, the \fIpthread_mutex_lock\fP() and \fIpthread_mutex_unlock\fP()
+functions shall return zero; otherwise, an
+error number shall be returned to indicate the error.
+.LP
+The \fIpthread_mutex_trylock\fP() function shall return zero if a
+lock on the mutex object referenced by \fImutex\fP is
+acquired. Otherwise, an error number is returned to indicate the error.
+.SH ERRORS
+.LP
+The \fIpthread_mutex_lock\fP() and \fIpthread_mutex_trylock\fP() functions
+shall fail if:
+.TP 7
+.B EINVAL
+The \fImutex\fP was created with the protocol attribute having the
+value PTHREAD_PRIO_PROTECT and the calling thread's
+priority is higher than the mutex's current priority ceiling.
+.sp
+.LP
+The \fIpthread_mutex_trylock\fP() function shall fail if:
+.TP 7
+.B EBUSY
+The \fImutex\fP could not be acquired because it was already locked.
+.sp
+.LP
+The \fIpthread_mutex_lock\fP(), \fIpthread_mutex_trylock\fP(), and
+\fIpthread_mutex_unlock\fP() functions may fail if:
+.TP 7
+.B EINVAL
+The value specified by \fImutex\fP does not refer to an initialized
+mutex object.
+.TP 7
+.B EAGAIN
+The mutex could not be acquired because the maximum number of recursive
+locks for \fImutex\fP has been exceeded.
+.sp
+.LP
+The \fIpthread_mutex_lock\fP() function may fail if:
+.TP 7
+.B EDEADLK
+The current thread already owns the mutex.
+.sp
+.LP
+The \fIpthread_mutex_unlock\fP() function may fail if:
+.TP 7
+.B EPERM
+The current thread does not own the mutex.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+Mutex objects are intended to serve as a low-level primitive from
+which other thread synchronization functions can be built. As
+such, the implementation of mutexes should be as efficient as possible,
+and this has ramifications on the features available at the
+interface.
+.LP
+The mutex functions and the particular default settings of the mutex
+attributes have been motivated by the desire to not
+preclude fast, inlined implementations of mutex locking and unlocking.
+.LP
+For example, deadlocking on a double-lock is explicitly allowed behavior
+in order to avoid requiring more overhead in the basic
+mechanism than is absolutely necessary. (More "friendly" mutexes that
+detect deadlock or that allow multiple locking by the same
+thread are easily constructed by the user via the other mechanisms
+provided. For example, \fIpthread_self\fP() can be used to record
+mutex ownership.) Implementations might also
+choose to provide such extended features as options via special mutex
+attributes.
+.LP
+Since most attributes only need to be checked when a thread is going
+to be blocked, the use of attributes does not slow the
+(common) mutex-locking case.
+.LP
+Likewise, while being able to extract the thread ID of the owner of
+a mutex might be desirable, it would require storing the
+current thread ID when each mutex is locked, and this could incur
+unacceptable levels of overhead. Similar arguments apply to a
+\fImutex_tryunlock\fP operation.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_mutex_destroy\fP(), \fIpthread_mutex_timedlock\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_mutex_setprioceiling.3p b/man-pages-posix-2003/man3p/pthread_mutex_setprioceiling.3p
new file mode 100644
index 0000000..ea30e67
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_mutex_setprioceiling.3p
@@ -0,0 +1 @@
+.so man3p/pthread_mutex_getprioceiling.3p
diff --git a/man-pages-posix-2003/man3p/pthread_mutex_timedlock.3p b/man-pages-posix-2003/man3p/pthread_mutex_timedlock.3p
new file mode 100644
index 0000000..5fe1465
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_mutex_timedlock.3p
@@ -0,0 +1,129 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_MUTEX_TIMEDLOCK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_mutex_timedlock
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_mutex_timedlock \- lock a mutex (\fBADVANCED REALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+#include <time.h>
+.br
+.sp
+int pthread_mutex_timedlock(pthread_mutex_t *restrict\fP \fImutex\fP\fB,
+.br
+\ \ \ \ \ \ const struct timespec *restrict\fP \fIabs_timeout\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_mutex_timedlock\fP() function shall lock the mutex
+object referenced by \fImutex\fP. If the mutex is already
+locked, the calling thread shall block until the mutex becomes available
+as in the \fIpthread_mutex_lock\fP() function. If the mutex cannot
+be locked without waiting for
+another thread to unlock the mutex, this wait shall be terminated
+when the specified timeout expires.
+.LP
+The timeout shall expire when the absolute time specified by \fIabs_timeout\fP
+passes, as measured by the clock on which
+timeouts are based (that is, when the value of that clock equals or
+exceeds \fIabs_timeout\fP), or if the absolute time specified
+by \fIabs_timeout\fP has already been passed at the time of the call.
+.LP
+If the Timers option is supported, the timeout shall be based on the
+CLOCK_REALTIME clock; if the Timers option is not supported,
+the timeout shall be based on the system clock as returned by the
+\fItime\fP() function.
+.LP
+The resolution of the timeout shall be the resolution of the clock
+on which it is based. The \fBtimespec\fP data type is
+defined in the \fI<time.h>\fP header.
+.LP
+Under no circumstance shall the function fail with a timeout if the
+mutex can be locked immediately. The validity of the
+\fIabs_timeout\fP parameter need not be checked if the mutex can be
+locked immediately.
+.LP
+As a consequence of the priority inheritance rules (for mutexes initialized
+with the PRIO_INHERIT protocol), if a timed mutex
+wait is terminated because its timeout expires, the priority of the
+owner of the mutex shall be adjusted as necessary to reflect
+the fact that this thread is no longer among the threads waiting for
+the mutex.
+.SH RETURN VALUE
+.LP
+If successful, the \fIpthread_mutex_timedlock\fP() function shall
+return zero; otherwise, an error number shall be returned to
+indicate the error.
+.SH ERRORS
+.LP
+The \fIpthread_mutex_timedlock\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The mutex was created with the protocol attribute having the value
+PTHREAD_PRIO_PROTECT and the calling thread's priority is
+higher than the mutex' current priority ceiling.
+.TP 7
+.B EINVAL
+The process or thread would have blocked, and the \fIabs_timeout\fP
+parameter specified a nanoseconds field value less than
+zero or greater than or equal to 1000 million.
+.TP 7
+.B ETIMEDOUT
+The mutex could not be locked before the specified timeout expired.
+.sp
+.LP
+The \fIpthread_mutex_timedlock\fP() function may fail if:
+.TP 7
+.B EINVAL
+The value specified by \fImutex\fP does not refer to an initialized
+mutex object.
+.TP 7
+.B EAGAIN
+The mutex could not be acquired because the maximum number of recursive
+locks for \fImutex\fP has been exceeded.
+.TP 7
+.B EDEADLK
+The current thread already owns the mutex.
+.sp
+.LP
+This function shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIpthread_mutex_timedlock\fP() function is part of the Threads
+and Timeouts options and need not be provided on all
+implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_mutex_destroy\fP(), \fIpthread_mutex_lock\fP(), \fIpthread_mutex_trylock\fP(),
+\fItime\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<pthread.h>\fP, \fI<time.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_mutex_trylock.3p b/man-pages-posix-2003/man3p/pthread_mutex_trylock.3p
new file mode 100644
index 0000000..342eaef
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_mutex_trylock.3p
@@ -0,0 +1 @@
+.so man3p/pthread_mutex_lock.3p
diff --git a/man-pages-posix-2003/man3p/pthread_mutex_unlock.3p b/man-pages-posix-2003/man3p/pthread_mutex_unlock.3p
new file mode 100644
index 0000000..342eaef
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_mutex_unlock.3p
@@ -0,0 +1 @@
+.so man3p/pthread_mutex_lock.3p
diff --git a/man-pages-posix-2003/man3p/pthread_mutexattr_destroy.3p b/man-pages-posix-2003/man3p/pthread_mutexattr_destroy.3p
new file mode 100644
index 0000000..5ec6502
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_mutexattr_destroy.3p
@@ -0,0 +1 @@
+.so man3p/pthread_mutexattr_init.3p
diff --git a/man-pages-posix-2003/man3p/pthread_mutexattr_getprioceiling.3p b/man-pages-posix-2003/man3p/pthread_mutexattr_getprioceiling.3p
new file mode 100644
index 0000000..d8ca984
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_mutexattr_getprioceiling.3p
@@ -0,0 +1,95 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_MUTEXATTR_GETPRIOCEILING" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_mutexattr_getprioceiling
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling
+\- get and set the prioceiling attribute of the mutex
+attributes object (\fBREALTIME THREADS\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_mutexattr_getprioceiling(const pthread_mutexattr_t *
+.br
+\ \ \ \ \ \ restrict\fP \fIattr\fP\fB, int *restrict\fP \fIprioceiling\fP\fB);
+.br
+int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *\fP\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ int\fP \fIprioceiling\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_mutexattr_getprioceiling\fP() and \fIpthread_mutexattr_setprioceiling\fP()
+functions, respectively, shall get
+and set the priority ceiling attribute of a mutex attributes object
+pointed to by \fIattr\fP which was previously created by the
+function \fIpthread_mutexattr_init\fP().
+.LP
+The \fIprioceiling\fP attribute contains the priority ceiling of initialized
+mutexes. The values of \fIprioceiling\fP are
+within the maximum range of priorities defined by SCHED_FIFO.
+.LP
+The \fIprioceiling\fP attribute defines the priority ceiling of initialized
+mutexes, which is the minimum priority level at
+which the critical section guarded by the mutex is executed. In order
+to avoid priority inversion, the priority ceiling of the
+mutex shall be set to a priority higher than or equal to the highest
+priority of all the threads that may lock that mutex. The
+values of \fIprioceiling\fP are within the maximum range of priorities
+defined under the SCHED_FIFO scheduling policy.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIpthread_mutexattr_getprioceiling\fP()
+and \fIpthread_mutexattr_setprioceiling\fP()
+functions shall return zero; otherwise, an error number shall be returned
+to indicate the error.
+.SH ERRORS
+.LP
+The \fIpthread_mutexattr_getprioceiling\fP() and \fIpthread_mutexattr_setprioceiling\fP()
+functions may fail if:
+.TP 7
+.B EINVAL
+The value specified by \fIattr\fP or \fIprioceiling\fP is invalid.
+.TP 7
+.B EPERM
+The caller does not have the privilege to perform the operation.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_cond_destroy\fP(), \fIpthread_create\fP(), \fIpthread_mutex_destroy\fP(),
+the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_mutexattr_getprotocol.3p b/man-pages-posix-2003/man3p/pthread_mutexattr_getprotocol.3p
new file mode 100644
index 0000000..8ed5bfa
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_mutexattr_getprotocol.3p
@@ -0,0 +1,152 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_MUTEXATTR_GETPROTOCOL" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_mutexattr_getprotocol
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol \- get
+and set the protocol attribute of the mutex
+attributes object (\fBREALTIME THREADS\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+\fBint pthread_mutexattr_getprotocol(const pthread_mutexattr_t *
+.br
+\ \ \ \ \ \ restrict\fP \fIattr\fP\fB, int *restrict\fP \fIprotocol\fP\fB);
+.br
+int pthread_mutexattr_setprotocol(pthread_mutexattr_t *\fP\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ int\fP \fIprotocol\fP\fB); \fP
+.sp
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_mutexattr_getprotocol\fP() and \fIpthread_mutexattr_setprotocol\fP()
+functions, respectively, shall get and set
+the protocol attribute of a mutex attributes object pointed to by
+\fIattr\fP which was previously created by the function \fIpthread_mutexattr_init\fP().
+.LP
+The \fIprotocol\fP attribute defines the protocol to be followed in
+utilizing mutexes. The value of \fIprotocol\fP may be one
+of:
+.LP
+.sp
+PTHREAD_PRIO_NONE
+.br
+.sp
+PTHREAD_PRIO_INHERIT
+.br
+.sp
+.sp
+PTHREAD_PRIO_PROTECT
+.br
+.sp
+.LP
+which are defined in the \fI<pthread.h>\fP header.
+.LP
+When a thread owns a mutex with the PTHREAD_PRIO_NONE \fIprotocol\fP
+attribute, its priority and scheduling shall not be
+affected by its mutex ownership.
+.LP
+When a thread is blocking higher priority threads because of owning
+one or more mutexes with the PTHREAD_PRIO_INHERIT
+\fIprotocol\fP attribute, it shall execute at the higher of its priority
+or the priority of the highest priority thread waiting on
+any of the mutexes owned by this thread and initialized with this
+protocol.
+.LP
+When a thread owns one or more mutexes initialized with the PTHREAD_PRIO_PROTECT
+protocol, it shall execute at the higher of its
+priority or the highest of the priority ceilings of all the mutexes
+owned by this thread and initialized with this attribute,
+regardless of whether other threads are blocked on any of these mutexes
+or not.
+.LP
+While a thread is holding a mutex which has been initialized with
+the PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT protocol
+attributes, it shall not be subject to being moved to the tail of
+the scheduling queue at its priority in the event that its
+original priority is changed, such as by a call to \fIsched_setparam\fP().
+Likewise, when a thread unlocks a mutex that has been initialized
+with the PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT protocol
+attributes, it shall not be subject to being moved to the tail of
+the scheduling queue at its priority in the event that its
+original priority is changed.
+.LP
+If a thread simultaneously owns several mutexes initialized with different
+protocols, it shall execute at the highest of the
+priorities that it would have obtained by each of these protocols.
+.LP
+When a thread makes a call to \fIpthread_mutex_lock\fP(), the mutex
+was
+initialized with the protocol attribute having the value PTHREAD_PRIO_INHERIT,
+when the calling thread is blocked because the mutex
+is owned by another thread, that owner thread shall inherit the priority
+level of the calling thread as long as it continues to own
+the mutex. The implementation shall update its execution priority
+to the maximum of its assigned priority and all its inherited
+priorities. Furthermore, if this owner thread itself becomes blocked
+on another mutex, the same priority inheritance effect shall
+be propagated to this other owner thread, in a recursive manner.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIpthread_mutexattr_getprotocol\fP()
+and \fIpthread_mutexattr_setprotocol\fP() functions
+shall return zero; otherwise, an error number shall be returned to
+indicate the error.
+.SH ERRORS
+.LP
+The \fIpthread_mutexattr_setprotocol\fP() function shall fail if:
+.TP 7
+.B ENOTSUP
+The value specified by \fIprotocol\fP is an unsupported value.
+.sp
+.LP
+The \fIpthread_mutexattr_getprotocol\fP() and \fIpthread_mutexattr_setprotocol\fP()
+functions may fail if:
+.TP 7
+.B EINVAL
+The value specified by \fIattr\fP or \fIprotocol\fP is invalid.
+.TP 7
+.B EPERM
+The caller does not have the privilege to perform the operation.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_cond_destroy\fP(), \fIpthread_create\fP(), \fIpthread_mutex_destroy\fP(),
+the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_mutexattr_getpshared.3p b/man-pages-posix-2003/man3p/pthread_mutexattr_getpshared.3p
new file mode 100644
index 0000000..116bc9c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_mutexattr_getpshared.3p
@@ -0,0 +1,102 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_MUTEXATTR_GETPSHARED" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_mutexattr_getpshared
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_mutexattr_getpshared, pthread_mutexattr_setpshared \- get and
+set the process\-shared attribute
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_mutexattr_getpshared(const pthread_mutexattr_t *
+.br
+\ \ \ \ \ \ restrict\fP \fIattr\fP\fB, int *restrict\fP \fIpshared\fP\fB);
+.br
+int pthread_mutexattr_setpshared(pthread_mutexattr_t *\fP\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ int\fP \fIpshared\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_mutexattr_getpshared\fP() function shall obtain the
+value of the \fIprocess-shared\fP attribute from the
+attributes object referenced by \fIattr\fP. The \fIpthread_mutexattr_setpshared\fP()
+function shall set the \fIprocess-shared\fP
+attribute in an initialized attributes object referenced by \fIattr\fP.
+.LP
+The \fIprocess-shared\fP attribute is set to PTHREAD_PROCESS_SHARED
+to permit a mutex to be operated upon by any thread that
+has access to the memory where the mutex is allocated, even if the
+mutex is allocated in memory that is shared by multiple
+processes. If the \fIprocess-shared\fP attribute is PTHREAD_PROCESS_PRIVATE,
+the mutex shall only be operated upon by threads
+created within the same process as the thread that initialized the
+mutex; if threads of differing processes attempt to operate on
+such a mutex, the behavior is undefined. The default value of the
+attribute shall be PTHREAD_PROCESS_PRIVATE.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIpthread_mutexattr_setpshared\fP() shall
+return zero; otherwise, an error number shall be
+returned to indicate the error.
+.LP
+Upon successful completion, \fIpthread_mutexattr_getpshared\fP() shall
+return zero and store the value of the
+\fIprocess-shared\fP attribute of \fIattr\fP into the object referenced
+by the \fIpshared\fP parameter. Otherwise, an error
+number shall be returned to indicate the error.
+.SH ERRORS
+.LP
+The \fIpthread_mutexattr_getpshared\fP() and \fIpthread_mutexattr_setpshared\fP()
+functions may fail if:
+.TP 7
+.B EINVAL
+The value specified by \fIattr\fP is invalid.
+.sp
+.LP
+The \fIpthread_mutexattr_setpshared\fP() function may fail if:
+.TP 7
+.B EINVAL
+The new value specified for the attribute is outside the range of
+legal values for that attribute.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_cond_destroy\fP(), \fIpthread_create\fP(), \fIpthread_mutex_destroy\fP(),
+\fIpthread_mutexattr_destroy\fP(), the Base Definitions volume
+of
+IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_mutexattr_gettype.3p b/man-pages-posix-2003/man3p/pthread_mutexattr_gettype.3p
new file mode 100644
index 0000000..cfedff2
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_mutexattr_gettype.3p
@@ -0,0 +1,134 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_MUTEXATTR_GETTYPE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_mutexattr_gettype
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_mutexattr_gettype, pthread_mutexattr_settype \- get and set
+the mutex type attribute
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_mutexattr_gettype(const pthread_mutexattr_t *restrict\fP
+\fIattr\fP\fB,
+.br
+\ \ \ \ \ \ int *restrict\fP \fItype\fP\fB);
+.br
+int pthread_mutexattr_settype(pthread_mutexattr_t\fP \fI*attr\fP\fB,
+int\fP \fItype\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_mutexattr_gettype\fP() and \fIpthread_mutexattr_settype\fP()
+functions, respectively, shall get and set the
+mutex \fItype\fP attribute. This attribute is set in the \fItype\fP
+parameter to these functions. The default value of the
+\fItype\fP attribute is PTHREAD_MUTEX_DEFAULT.
+.LP
+The type of mutex is contained in the \fItype\fP attribute of the
+mutex attributes. Valid mutex types include:
+.TP 7
+PTHREAD_MUTEX_NORMAL
+.sp
+This type of mutex does not detect deadlock. A thread attempting to
+relock this mutex without first unlocking it shall deadlock.
+Attempting to unlock a mutex locked by a different thread results
+in undefined behavior. Attempting to unlock an unlocked mutex
+results in undefined behavior.
+.TP 7
+PTHREAD_MUTEX_ERRORCHECK
+.sp
+This type of mutex provides error checking. A thread attempting to
+relock this mutex without first unlocking it shall return with
+an error. A thread attempting to unlock a mutex which another thread
+has locked shall return with an error. A thread attempting to
+unlock an unlocked mutex shall return with an error.
+.TP 7
+PTHREAD_MUTEX_RECURSIVE
+.sp
+A thread attempting to relock this mutex without first unlocking it
+shall succeed in locking the mutex. The relocking deadlock
+which can occur with mutexes of type PTHREAD_MUTEX_NORMAL cannot occur
+with this type of mutex. Multiple locks of this mutex shall
+require the same number of unlocks to release the mutex before another
+thread can acquire the mutex. A thread attempting to unlock
+a mutex which another thread has locked shall return with an error.
+A thread attempting to unlock an unlocked mutex shall return
+with an error.
+.TP 7
+PTHREAD_MUTEX_DEFAULT
+.sp
+Attempting to recursively lock a mutex of this type results in undefined
+behavior. Attempting to unlock a mutex of this type which
+was not locked by the calling thread results in undefined behavior.
+Attempting to unlock a mutex of this type which is not locked
+results in undefined behavior. An implementation may map this mutex
+to one of the other mutex types.
+.sp
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIpthread_mutexattr_gettype\fP()
+function shall return zero and store the value of the
+\fItype\fP attribute of \fIattr\fP into the object referenced by the
+\fItype\fP parameter. Otherwise, an error shall be returned
+to indicate the error.
+.LP
+If successful, the \fIpthread_mutexattr_settype\fP() function shall
+return zero; otherwise, an error number shall be returned
+to indicate the error.
+.SH ERRORS
+.LP
+The \fIpthread_mutexattr_settype\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The value \fItype\fP is invalid.
+.sp
+.LP
+The \fIpthread_mutexattr_gettype\fP() and \fIpthread_mutexattr_settype\fP()
+functions may fail if:
+.TP 7
+.B EINVAL
+The value specified by \fIattr\fP is invalid.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+It is advised that an application should not use a PTHREAD_MUTEX_RECURSIVE
+mutex with condition variables because the implicit
+unlock performed for a \fIpthread_cond_timedwait\fP() or \fIpthread_cond_wait\fP()
+may not actually release the mutex (if it had been locked
+multiple times). If this happens, no other thread can satisfy the
+condition of the predicate.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_cond_timedwait\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_mutexattr_init.3p b/man-pages-posix-2003/man3p/pthread_mutexattr_init.3p
new file mode 100644
index 0000000..8b6f536
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_mutexattr_init.3p
@@ -0,0 +1,346 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_MUTEXATTR_DESTROY" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_mutexattr_destroy
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_mutexattr_destroy, pthread_mutexattr_init \- destroy and initialize
+the mutex attributes object
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_mutexattr_destroy(pthread_mutexattr_t *\fP\fIattr\fP\fB);
+.br
+int pthread_mutexattr_init(pthread_mutexattr_t *\fP\fIattr\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_mutexattr_destroy\fP() function shall destroy a mutex
+attributes object; the object becomes, in effect,
+uninitialized. An implementation may cause \fIpthread_mutexattr_destroy\fP()
+to set the object referenced by \fIattr\fP to an
+invalid value. A destroyed \fIattr\fP attributes object can be reinitialized
+using \fIpthread_mutexattr_init\fP(); the results of
+otherwise referencing the object after it has been destroyed are undefined.
+.LP
+The \fIpthread_mutexattr_init\fP() function shall initialize a mutex
+attributes object \fIattr\fP with the default value for
+all of the attributes defined by the implementation.
+.LP
+Results are undefined if \fIpthread_mutexattr_init\fP() is called
+specifying an already initialized \fIattr\fP attributes
+object.
+.LP
+After a mutex attributes object has been used to initialize one or
+more mutexes, any function affecting the attributes object
+(including destruction) shall not affect any previously initialized
+mutexes.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIpthread_mutexattr_destroy\fP() and
+\fIpthread_mutexattr_init\fP() shall return zero; otherwise,
+an error number shall be returned to indicate the error.
+.SH ERRORS
+.LP
+The \fIpthread_mutexattr_destroy\fP() function may fail if:
+.TP 7
+.B EINVAL
+The value specified by \fIattr\fP is invalid.
+.sp
+.LP
+The \fIpthread_mutexattr_init\fP() function shall fail if:
+.TP 7
+.B ENOMEM
+Insufficient memory exists to initialize the mutex attributes object.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+See \fIpthread_attr_init\fP() for a general explanation of attributes.
+Attributes objects
+allow implementations to experiment with useful extensions and permit
+extension of this volume of IEEE\ Std\ 1003.1-2001
+without changing the existing functions. Thus, they provide for future
+extensibility of this volume of
+IEEE\ Std\ 1003.1-2001 and reduce the temptation to standardize prematurely
+on semantics that are not yet widely
+implemented or understood.
+.LP
+Examples of possible additional mutex attributes that have been discussed
+are \fIspin_only\fP, \fIlimited_spin\fP,
+\fIno_spin\fP, \fIrecursive\fP, and \fImetered\fP. (To explain what
+the latter attributes might mean: recursive mutexes would
+allow for multiple re-locking by the current owner; metered mutexes
+would transparently keep records of queue length, wait time,
+and so on.) Since there is not yet wide agreement on the usefulness
+of these resulting from shared implementation and usage
+experience, they are not yet specified in this volume of IEEE\ Std\ 1003.1-2001.
+Mutex attributes objects, however, make it
+possible to test out these concepts for possible standardization at
+a later time.
+.SS Mutex Attributes and Performance
+.LP
+Care has been taken to ensure that the default values of the mutex
+attributes have been defined such that mutexes initialized
+with the defaults have simple enough semantics so that the locking
+and unlocking can be done with the equivalent of a test-and-set
+instruction (plus possibly a few other basic instructions).
+.LP
+There is at least one implementation method that can be used to reduce
+the cost of testing at lock-time if a mutex has
+non-default attributes. One such method that an implementation can
+employ (and this can be made fully transparent to fully
+conforming POSIX applications) is to secretly pre-lock any mutexes
+that are initialized to non-default attributes. Any later
+attempt to lock such a mutex causes the implementation to branch to
+the "slow path" as if the mutex were unavailable; then, on
+the slow path, the implementation can do the "real work" to lock a
+non-default mutex. The underlying unlock operation is more
+complicated since the implementation never really wants to release
+the pre-lock on this kind of mutex. This illustrates that,
+depending on the hardware, there may be certain optimizations that
+can be used so that whatever mutex attributes are considered
+"most frequently used" can be processed most efficiently.
+.SS Process Shared Memory and Synchronization
+.LP
+The existence of memory mapping functions in this volume of IEEE\ Std\ 1003.1-2001
+leads to the possibility that an
+application may allocate the synchronization objects from this section
+in memory that is accessed by multiple processes (and
+therefore, by threads of multiple processes).
+.LP
+In order to permit such usage, while at the same time keeping the
+usual case (that is, usage within a single process) efficient,
+a \fIprocess-shared\fP option has been defined.
+.LP
+If an implementation supports the _POSIX_THREAD_PROCESS_SHARED option,
+then the \fIprocess-shared\fP attribute can be used to
+indicate that mutexes or condition variables may be accessed by threads
+of multiple processes.
+.LP
+The default setting of PTHREAD_PROCESS_PRIVATE has been chosen for
+the \fIprocess-shared\fP attribute so that the most
+efficient forms of these synchronization objects are created by default.
+.LP
+Synchronization variables that are initialized with the PTHREAD_PROCESS_PRIVATE
+\fIprocess-shared\fP attribute may only be
+operated on by threads in the process that initialized them. Synchronization
+variables that are initialized with the
+PTHREAD_PROCESS_SHARED \fIprocess-shared\fP attribute may be operated
+on by any thread in any process that has access to it. In
+particular, these processes may exist beyond the lifetime of the initializing
+process. For example, the following code implements a
+simple counting semaphore in a mapped file that may be used by many
+processes.
+.sp
+.RS
+.nf
+
+\fB/* sem.h */
+struct semaphore {
+ pthread_mutex_t lock;
+ pthread_cond_t nonzero;
+ unsigned count;
+};
+typedef struct semaphore semaphore_t;
+.sp
+
+semaphore_t *semaphore_create(char *semaphore_name);
+semaphore_t *semaphore_open(char *semaphore_name);
+void semaphore_post(semaphore_t *semap);
+void semaphore_wait(semaphore_t *semap);
+void semaphore_close(semaphore_t *semap);
+.sp
+
+/* sem.c */
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <fcntl.h>
+#include <pthread.h>
+#include "sem.h"
+.sp
+
+semaphore_t *
+semaphore_create(char *semaphore_name)
+{
+int fd;
+ semaphore_t *semap;
+ pthread_mutexattr_t psharedm;
+ pthread_condattr_t psharedc;
+.sp
+
+ fd = open(semaphore_name, O_RDWR | O_CREAT | O_EXCL, 0666);
+ if (fd < 0)
+ return (NULL);
+ (void) ftruncate(fd, sizeof(semaphore_t));
+ (void) pthread_mutexattr_init(&psharedm);
+ (void) pthread_mutexattr_setpshared(&psharedm,
+ PTHREAD_PROCESS_SHARED);
+ (void) pthread_condattr_init(&psharedc);
+ (void) pthread_condattr_setpshared(&psharedc,
+ PTHREAD_PROCESS_SHARED);
+ semap = (semaphore_t *) mmap(NULL, sizeof(semaphore_t),
+ PROT_READ | PROT_WRITE, MAP_SHARED,
+ fd, 0);
+ close (fd);
+ (void) pthread_mutex_init(&semap->lock, &psharedm);
+ (void) pthread_cond_init(&semap->nonzero, &psharedc);
+ semap->count = 0;
+ return (semap);
+}
+.sp
+
+semaphore_t *
+semaphore_open(char *semaphore_name)
+{
+ int fd;
+ semaphore_t *semap;
+.sp
+
+ fd = open(semaphore_name, O_RDWR, 0666);
+ if (fd < 0)
+ return (NULL);
+ semap = (semaphore_t *) mmap(NULL, sizeof(semaphore_t),
+ PROT_READ | PROT_WRITE, MAP_SHARED,
+ fd, 0);
+ close (fd);
+ return (semap);
+}
+.sp
+
+void
+semaphore_post(semaphore_t *semap)
+{
+ pthread_mutex_lock(&semap->lock);
+ if (semap->count == 0)
+ pthread_cond_signal(&semapx->nonzero);
+ semap->count++;
+ pthread_mutex_unlock(&semap->lock);
+}
+.sp
+
+void
+semaphore_wait(semaphore_t *semap)
+{
+ pthread_mutex_lock(&semap->lock);
+ while (semap->count == 0)
+ pthread_cond_wait(&semap->nonzero, &semap->lock);
+ semap->count--;
+ pthread_mutex_unlock(&semap->lock);
+}
+.sp
+
+void
+semaphore_close(semaphore_t *semap)
+{
+ munmap((void *) semap, sizeof(semaphore_t));
+}
+\fP
+.fi
+.RE
+.LP
+The following code is for three separate processes that create, post,
+and wait on a semaphore in the file \fB/tmp/semaphore\fP.
+Once the file is created, the post and wait programs increment and
+decrement the counting semaphore (waiting and waking as
+required) even though they did not initialize the semaphore.
+.sp
+.RS
+.nf
+
+\fB/* create.c */
+#include "pthread.h"
+#include "sem.h"
+.sp
+
+int
+main()
+{
+ semaphore_t *semap;
+.sp
+
+ semap = semaphore_create("/tmp/semaphore");
+ if (semap == NULL)
+ exit(1);
+ semaphore_close(semap);
+ return (0);
+}
+.sp
+
+/* post */
+#include "pthread.h"
+#include "sem.h"
+.sp
+
+int
+main()
+{
+ semaphore_t *semap;
+.sp
+
+ semap = semaphore_open("/tmp/semaphore");
+ if (semap == NULL)
+ exit(1);
+ semaphore_post(semap);
+ semaphore_close(semap);
+ return (0);
+}
+.sp
+
+/* wait */
+#include "pthread.h"
+#include "sem.h"
+.sp
+
+int
+main()
+{
+ semaphore_t *semap;
+.sp
+
+ semap = semaphore_open("/tmp/semaphore");
+ if (semap == NULL)
+ exit(1);
+ semaphore_wait(semap);
+ semaphore_close(semap);
+ return (0);
+}
+\fP
+.fi
+.RE
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_cond_destroy\fP(), \fIpthread_create\fP(), \fIpthread_mutex_destroy\fP(),
+pthread_mutexattr_destroy, the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_mutexattr_setprioceiling.3p b/man-pages-posix-2003/man3p/pthread_mutexattr_setprioceiling.3p
new file mode 100644
index 0000000..acb5a16
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_mutexattr_setprioceiling.3p
@@ -0,0 +1 @@
+.so man3p/pthread_mutexattr_getprioceiling.3p
diff --git a/man-pages-posix-2003/man3p/pthread_mutexattr_setprotocol.3p b/man-pages-posix-2003/man3p/pthread_mutexattr_setprotocol.3p
new file mode 100644
index 0000000..120b0d2
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_mutexattr_setprotocol.3p
@@ -0,0 +1 @@
+.so man3p/pthread_mutexattr_getprotocol.3p
diff --git a/man-pages-posix-2003/man3p/pthread_mutexattr_setpshared.3p b/man-pages-posix-2003/man3p/pthread_mutexattr_setpshared.3p
new file mode 100644
index 0000000..49356ae
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_mutexattr_setpshared.3p
@@ -0,0 +1 @@
+.so man3p/pthread_mutexattr_getpshared.3p
diff --git a/man-pages-posix-2003/man3p/pthread_mutexattr_settype.3p b/man-pages-posix-2003/man3p/pthread_mutexattr_settype.3p
new file mode 100644
index 0000000..4e34ea4
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_mutexattr_settype.3p
@@ -0,0 +1 @@
+.so man3p/pthread_mutexattr_gettype.3p
diff --git a/man-pages-posix-2003/man3p/pthread_once.3p b/man-pages-posix-2003/man3p/pthread_once.3p
new file mode 100644
index 0000000..49a59b1
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_once.3p
@@ -0,0 +1,149 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_ONCE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_once
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_once \- dynamic package initialization
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_once(pthread_once_t *\fP\fIonce_control\fP\fB,
+.br
+\ \ \ \ \ \ void (*\fP\fIinit_routine\fP\fB)(void));
+.br
+pthread_once_t\fP \fIonce_control\fP \fB= PTHREAD_ONCE_INIT; \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The first call to \fIpthread_once\fP() by any thread in a process,
+with a given \fIonce_control\fP, shall call the
+\fIinit_routine\fP with no arguments. Subsequent calls of \fIpthread_once\fP()
+with the same \fIonce_control\fP shall not call
+the \fIinit_routine\fP. On return from \fIpthread_once\fP(), \fIinit_routine\fP
+shall have completed. The \fIonce_control\fP
+parameter shall determine whether the associated initialization routine
+has been called.
+.LP
+The \fIpthread_once\fP() function is not a cancellation point. However,
+if \fIinit_routine\fP is a cancellation point and is
+canceled, the effect on \fIonce_control\fP shall be as if \fIpthread_once\fP()
+was never called.
+.LP
+The constant PTHREAD_ONCE_INIT is defined in the \fI<pthread.h>\fP
+header.
+.LP
+The behavior of \fIpthread_once\fP() is undefined if \fIonce_control\fP
+has automatic storage duration or is not initialized
+by PTHREAD_ONCE_INIT.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIpthread_once\fP() shall return zero;
+otherwise, an error number shall be returned to indicate
+the error.
+.SH ERRORS
+.LP
+The \fIpthread_once\fP() function may fail if:
+.TP 7
+.B EINVAL
+If either \fIonce_control\fP or \fIinit_routine\fP is invalid.
+.sp
+.LP
+The \fIpthread_once\fP() function shall not return an error code of
+[EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+Some C libraries are designed for dynamic initialization. That is,
+the global initialization for the library is performed when
+the first procedure in the library is called. In a single-threaded
+program, this is normally implemented using a static variable
+whose value is checked on entry to a routine, as follows:
+.sp
+.RS
+.nf
+
+\fBstatic int random_is_initialized = 0;
+extern int initialize_random();
+.sp
+
+int random_function()
+{
+ if (random_is_initialized == 0) {
+ initialize_random();
+ random_is_initialized = 1;
+ }
+ ... /* Operations performed after initialization. */
+}
+\fP
+.fi
+.RE
+.LP
+To keep the same structure in a multi-threaded program, a new primitive
+is needed. Otherwise, library initialization has to be
+accomplished by an explicit call to a library-exported initialization
+function prior to any use of the library.
+.LP
+For dynamic library initialization in a multi-threaded process, a
+simple initialization flag is not sufficient; the flag needs
+to be protected against modification by multiple threads simultaneously
+calling into the library. Protecting the flag requires the
+use of a mutex; however, mutexes have to be initialized before they
+are used. Ensuring that the mutex is only initialized once
+requires a recursive solution to this problem.
+.LP
+The use of \fIpthread_once\fP() not only supplies an implementation-guaranteed
+means of dynamic initialization, it provides an
+aid to the reliable construction of multi-threaded and realtime systems.
+The preceding example then becomes:
+.sp
+.RS
+.nf
+
+\fB#include <pthread.h>
+static pthread_once_t random_is_initialized = PTHREAD_ONCE_INIT;
+extern int initialize_random();
+.sp
+
+int random_function()
+{
+ (void) pthread_once(&random_is_initialized, initialize_random);
+ ... /* Operations performed after initialization. */
+}
+\fP
+.fi
+.RE
+.LP
+Note that a \fBpthread_once_t\fP cannot be an array because some compilers
+do not accept the construct
+\fB&<array_name>\fP.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_rwlock_destroy.3p b/man-pages-posix-2003/man3p/pthread_rwlock_destroy.3p
new file mode 100644
index 0000000..3114e09
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_rwlock_destroy.3p
@@ -0,0 +1 @@
+.so man3p/pthread_rwlock_init.3p
diff --git a/man-pages-posix-2003/man3p/pthread_rwlock_init.3p b/man-pages-posix-2003/man3p/pthread_rwlock_init.3p
new file mode 100644
index 0000000..5ad4db0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_rwlock_init.3p
@@ -0,0 +1,142 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_RWLOCK_DESTROY" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_rwlock_destroy
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_rwlock_destroy, pthread_rwlock_init \- destroy and initialize
+a read\-write lock object
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_rwlock_destroy(pthread_rwlock_t *\fP\fIrwlock\fP\fB);
+.br
+int pthread_rwlock_init(pthread_rwlock_t *restrict\fP \fIrwlock\fP\fB,
+.br
+\ \ \ \ \ \ const pthread_rwlockattr_t *restrict\fP \fIattr\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_rwlock_destroy\fP() function shall destroy the read-write
+lock object referenced by \fIrwlock\fP and release
+any resources used by the lock. The effect of subsequent use of the
+lock is undefined until the lock is reinitialized by another
+call to \fIpthread_rwlock_init\fP(). An implementation may cause \fIpthread_rwlock_destroy\fP()
+to set the object referenced by
+\fIrwlock\fP to an invalid value. Results are undefined if \fIpthread_rwlock_destroy\fP()
+is called when any thread holds
+\fIrwlock\fP. Attempting to destroy an uninitialized read-write lock
+results in undefined behavior.
+.LP
+The \fIpthread_rwlock_init\fP() function shall allocate any resources
+required to use the read-write lock referenced by
+\fIrwlock\fP and initializes the lock to an unlocked state with attributes
+referenced by \fIattr\fP. If \fIattr\fP is NULL, the
+default read-write lock attributes shall be used; the effect is the
+same as passing the address of a default read-write lock
+attributes object. Once initialized, the lock can be used any number
+of times without being reinitialized. Results are undefined if
+\fIpthread_rwlock_init\fP() is called specifying an already initialized
+read-write lock. Results are undefined if a read-write
+lock is used without first being initialized.
+.LP
+If the \fIpthread_rwlock_init\fP() function fails, \fIrwlock\fP shall
+not be initialized and the contents of \fIrwlock\fP are
+undefined.
+.LP
+Only the object referenced by \fIrwlock\fP may be used for performing
+synchronization. The result of referring to copies of
+that object in calls to \fIpthread_rwlock_destroy\fP(), \fIpthread_rwlock_rdlock\fP(),
+\fIpthread_rwlock_timedrdlock\fP(), \fIpthread_rwlock_timedwrlock\fP(),
+\fIpthread_rwlock_tryrdlock\fP(), \fIpthread_rwlock_trywrlock\fP(),
+\fIpthread_rwlock_unlock\fP(), or \fIpthread_rwlock_wrlock\fP() is
+undefined.
+.SH RETURN VALUE
+.LP
+If successful, the \fIpthread_rwlock_destroy\fP() and \fIpthread_rwlock_init\fP()
+functions shall return zero; otherwise, an
+error number shall be returned to indicate the error.
+.LP
+The [EBUSY] and [EINVAL] error checks, if implemented, act as if they
+were performed immediately at the beginning of processing
+for the function and caused an error return prior to modifying the
+state of the read-write lock specified by \fIrwlock\fP.
+.SH ERRORS
+.LP
+The \fIpthread_rwlock_destroy\fP() function may fail if:
+.TP 7
+.B EBUSY
+The implementation has detected an attempt to destroy the object referenced
+by \fIrwlock\fP while it is locked.
+.TP 7
+.B EINVAL
+The value specified by \fIrwlock\fP is invalid.
+.sp
+.LP
+The \fIpthread_rwlock_init\fP() function shall fail if:
+.TP 7
+.B EAGAIN
+The system lacked the necessary resources (other than memory) to initialize
+another read-write lock.
+.TP 7
+.B ENOMEM
+Insufficient memory exists to initialize the read-write lock.
+.TP 7
+.B EPERM
+The caller does not have the privilege to perform the operation.
+.sp
+.LP
+The \fIpthread_rwlock_init\fP() function may fail if:
+.TP 7
+.B EBUSY
+The implementation has detected an attempt to reinitialize the object
+referenced by \fIrwlock\fP, a previously initialized but
+not yet destroyed read-write lock.
+.TP 7
+.B EINVAL
+The value specified by \fIattr\fP is invalid.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Applications using these and related read-write lock functions may
+be subject to priority inversion, as discussed in the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Section 3.285, Priority
+Inversion.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_rwlock_rdlock\fP(), \fIpthread_rwlock_timedrdlock\fP(),
+\fIpthread_rwlock_timedwrlock\fP(), \fIpthread_rwlock_tryrdlock\fP(),
+\fIpthread_rwlock_trywrlock\fP(), \fIpthread_rwlock_unlock\fP(),
+\fIpthread_rwlock_wrlock\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_rwlock_rdlock.3p b/man-pages-posix-2003/man3p/pthread_rwlock_rdlock.3p
new file mode 100644
index 0000000..b63adbf
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_rwlock_rdlock.3p
@@ -0,0 +1,150 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_RWLOCK_RDLOCK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_rwlock_rdlock
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_rwlock_rdlock, pthread_rwlock_tryrdlock \- lock a read-write
+lock object for reading
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_rwlock_rdlock(pthread_rwlock_t\fP \fI*rwlock\fP\fB);
+.br
+int pthread_rwlock_tryrdlock(pthread_rwlock_t\fP \fI*rwlock\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_rwlock_rdlock\fP() function shall apply a read lock
+to the read-write lock referenced by \fIrwlock\fP. The
+calling thread acquires the read lock if a writer does not hold the
+lock and there are no writers blocked on the lock.
+.LP
+If the Thread Execution Scheduling option is supported, and the threads
+involved in the lock are executing with the scheduling
+policies SCHED_FIFO or SCHED_RR, the calling thread shall not acquire
+the lock if a writer holds the lock or if writers of higher
+or equal priority are blocked on the lock; otherwise, the calling
+thread shall acquire the lock.
+.LP
+If the Threads Execution Scheduling option is supported, and the threads
+involved in the lock are executing with the
+SCHED_SPORADIC scheduling policy, the calling thread shall not acquire
+the lock if a writer holds the lock or if writers of higher
+or equal priority are blocked on the lock; otherwise, the calling
+thread shall acquire the lock.
+.LP
+If the Thread Execution Scheduling option is not supported, it is
+implementation-defined whether the calling thread acquires the
+lock when a writer does not hold the lock and there are writers blocked
+on the lock. If a writer holds the lock, the calling thread
+shall not acquire the read lock. If the read lock is not acquired,
+the calling thread shall block until it can acquire the lock.
+The calling thread may deadlock if at the time the call is made it
+holds a write lock.
+.LP
+A thread may hold multiple concurrent read locks on \fIrwlock\fP (that
+is, successfully call the \fIpthread_rwlock_rdlock\fP()
+function \fIn\fP times). If so, the application shall ensure that
+the thread performs matching unlocks (that is, it calls the \fIpthread_rwlock_unlock\fP()
+function \fIn\fP times).
+.LP
+The maximum number of simultaneous read locks that an implementation
+guarantees can be applied to a read-write lock shall be
+implementation-defined. The \fIpthread_rwlock_rdlock\fP() function
+may fail if this maximum would be exceeded.
+.LP
+The \fIpthread_rwlock_tryrdlock\fP() function shall apply a read lock
+as in the \fIpthread_rwlock_rdlock\fP() function, with
+the exception that the function shall fail if the equivalent \fIpthread_rwlock_rdlock\fP()
+call would have blocked the calling
+thread. In no case shall the \fIpthread_rwlock_tryrdlock\fP() function
+ever block; it always either acquires the lock or fails and
+returns immediately.
+.LP
+Results are undefined if any of these functions are called with an
+uninitialized read-write lock.
+.LP
+If a signal is delivered to a thread waiting for a read-write lock
+for reading, upon return from the signal handler the thread
+resumes waiting for the read-write lock for reading as if it was not
+interrupted.
+.SH RETURN VALUE
+.LP
+If successful, the \fIpthread_rwlock_rdlock\fP() function shall return
+zero; otherwise, an error number shall be returned to
+indicate the error.
+.LP
+The \fIpthread_rwlock_tryrdlock\fP() function shall return zero if
+the lock for reading on the read-write lock object
+referenced by \fIrwlock\fP is acquired. Otherwise, an error number
+shall be returned to indicate the error.
+.SH ERRORS
+.LP
+The \fIpthread_rwlock_tryrdlock\fP() function shall fail if:
+.TP 7
+.B EBUSY
+The read-write lock could not be acquired for reading because a writer
+holds the lock or a writer with the appropriate priority
+was blocked on it.
+.sp
+.LP
+The \fIpthread_rwlock_rdlock\fP() and \fIpthread_rwlock_tryrdlock\fP()
+functions may fail if:
+.TP 7
+.B EINVAL
+The value specified by \fIrwlock\fP does not refer to an initialized
+read-write lock object.
+.TP 7
+.B EAGAIN
+The read lock could not be acquired because the maximum number of
+read locks for \fIrwlock\fP has been exceeded.
+.sp
+.LP
+The \fIpthread_rwlock_rdlock\fP() function may fail if:
+.TP 7
+.B EDEADLK
+The current thread already owns the read-write lock for writing.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Applications using these functions may be subject to priority inversion,
+as discussed in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 3.285, Priority Inversion.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_rwlock_destroy\fP(), \fIpthread_rwlock_timedrdlock\fP(),
+\fIpthread_rwlock_timedwrlock\fP(), \fIpthread_rwlock_trywrlock\fP(),
+\fIpthread_rwlock_unlock\fP(), \fIpthread_rwlock_wrlock\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_rwlock_timedrdlock.3p b/man-pages-posix-2003/man3p/pthread_rwlock_timedrdlock.3p
new file mode 100644
index 0000000..67d5fd3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_rwlock_timedrdlock.3p
@@ -0,0 +1,128 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_RWLOCK_TIMEDRDLOCK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_rwlock_timedrdlock
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_rwlock_timedrdlock \- lock a read-write lock for reading
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+#include <time.h>
+.br
+.sp
+int pthread_rwlock_timedrdlock(pthread_rwlock_t *restrict\fP \fIrwlock\fP\fB,
+.br
+\ \ \ \ \ \ const struct timespec *restrict\fP \fIabs_timeout\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_rwlock_timedrdlock\fP() function shall apply a read
+lock to the read-write lock referenced by \fIrwlock\fP as
+in the \fIpthread_rwlock_rdlock\fP() function. However, if the lock
+cannot
+be acquired without waiting for other threads to unlock the lock,
+this wait shall be terminated when the specified timeout expires.
+The timeout shall expire when the absolute time specified by \fIabs_timeout\fP
+passes, as measured by the clock on which timeouts
+are based (that is, when the value of that clock equals or exceeds
+\fIabs_timeout\fP), or if the absolute time specified by
+\fIabs_timeout\fP has already been passed at the time of the call.
+.LP
+If the Timers option is supported, the timeout shall be based on the
+CLOCK_REALTIME clock. If the Timers option is not supported, the
+timeout shall be based on the system clock as returned by the
+\fItime\fP() function. The resolution of the timeout shall be the
+resolution of the clock on
+which it is based. The \fBtimespec\fP data type is defined in the
+\fI<time.h>\fP
+header. Under no circumstances shall the function fail with a timeout
+if the lock can be acquired immediately. The validity of the
+\fIabs_timeout\fP parameter need not be checked if the lock can be
+immediately acquired.
+.LP
+If a signal that causes a signal handler to be executed is delivered
+to a thread blocked on a read-write lock via a call to
+\fIpthread_rwlock_timedrdlock\fP(), upon return from the signal handler
+the thread shall resume waiting for the lock as if it was
+not interrupted.
+.LP
+The calling thread may deadlock if at the time the call is made it
+holds a write lock on \fIrwlock\fP. The results are
+undefined if this function is called with an uninitialized read-write
+lock.
+.SH RETURN VALUE
+.LP
+The \fIpthread_rwlock_timedrdlock\fP() function shall return zero
+if the lock for reading on the read-write lock object
+referenced by \fIrwlock\fP is acquired. Otherwise, an error number
+shall be returned to indicate the error.
+.SH ERRORS
+.LP
+The \fIpthread_rwlock_timedrdlock\fP() function shall fail if:
+.TP 7
+.B ETIMEDOUT
+The lock could not be acquired before the specified timeout expired.
+.sp
+.LP
+The \fIpthread_rwlock_timedrdlock\fP() function may fail if:
+.TP 7
+.B EAGAIN
+The read lock could not be acquired because the maximum number of
+read locks for lock would be exceeded.
+.TP 7
+.B EDEADLK
+The calling thread already holds a write lock on \fIrwlock\fP.
+.TP 7
+.B EINVAL
+The value specified by \fIrwlock\fP does not refer to an initialized
+read-write lock object, or the \fIabs_timeout\fP
+nanosecond value is less than zero or greater than or equal to 1000
+million.
+.sp
+.LP
+This function shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Applications using this function may be subject to priority inversion,
+as discussed in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 3.285, Priority Inversion.
+.LP
+The \fIpthread_rwlock_timedrdlock\fP() function is part of the Threads
+and Timeouts options and need not be provided on all
+implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_rwlock_destroy\fP(), \fIpthread_rwlock_rdlock\fP(), \fIpthread_rwlock_timedwrlock\fP(),
+\fIpthread_rwlock_tryrdlock\fP(), \fIpthread_rwlock_trywrlock\fP(),
+\fIpthread_rwlock_unlock\fP(), \fIpthread_rwlock_wrlock\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP,
+\fI<time.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_rwlock_timedwrlock.3p b/man-pages-posix-2003/man3p/pthread_rwlock_timedwrlock.3p
new file mode 100644
index 0000000..8c1d352
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_rwlock_timedwrlock.3p
@@ -0,0 +1,122 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_RWLOCK_TIMEDWRLOCK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_rwlock_timedwrlock
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_rwlock_timedwrlock \- lock a read-write lock for writing
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+#include <time.h>
+.br
+.sp
+int pthread_rwlock_timedwrlock(pthread_rwlock_t *restrict\fP \fIrwlock\fP\fB,
+.br
+\ \ \ \ \ \ const struct timespec *restrict\fP \fIabs_timeout\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_rwlock_timedwrlock\fP() function shall apply a write
+lock to the read-write lock referenced by \fIrwlock\fP as
+in the \fIpthread_rwlock_wrlock\fP() function. However, if the lock
+cannot
+be acquired without waiting for other threads to unlock the lock,
+this wait shall be terminated when the specified timeout expires.
+The timeout shall expire when the absolute time specified by \fIabs_timeout\fP
+passes, as measured by the clock on which timeouts
+are based (that is, when the value of that clock equals or exceeds
+\fIabs_timeout\fP), or if the absolute time specified by
+\fIabs_timeout\fP has already been passed at the time of the call.
+.LP
+If the Timers option is supported, the timeout shall be based on the
+CLOCK_REALTIME clock. If the Timers option is not supported, the
+timeout shall be based on the system clock as returned by the
+\fItime\fP() function. The resolution of the timeout shall be the
+resolution of the clock on
+which it is based. The \fBtimespec\fP data type is defined in the
+\fI<time.h>\fP
+header. Under no circumstances shall the function fail with a timeout
+if the lock can be acquired immediately. The validity of the
+\fIabs_timeout\fP parameter need not be checked if the lock can be
+immediately acquired.
+.LP
+If a signal that causes a signal handler to be executed is delivered
+to a thread blocked on a read-write lock via a call to
+\fIpthread_rwlock_timedwrlock\fP(), upon return from the signal handler
+the thread shall resume waiting for the lock as if it was
+not interrupted.
+.LP
+The calling thread may deadlock if at the time the call is made it
+holds the read-write lock. The results are undefined if this
+function is called with an uninitialized read-write lock.
+.SH RETURN VALUE
+.LP
+The \fIpthread_rwlock_timedwrlock\fP() function shall return zero
+if the lock for writing on the read-write lock object
+referenced by \fIrwlock\fP is acquired. Otherwise, an error number
+shall be returned to indicate the error.
+.SH ERRORS
+.LP
+The \fIpthread_rwlock_timedwrlock\fP() function shall fail if:
+.TP 7
+.B ETIMEDOUT
+The lock could not be acquired before the specified timeout expired.
+.sp
+.LP
+The \fIpthread_rwlock_timedwrlock\fP() function may fail if:
+.TP 7
+.B EDEADLK
+The calling thread already holds the \fIrwlock\fP.
+.TP 7
+.B EINVAL
+The value specified by rwlock does not refer to an initialized read-write
+lock object, or the \fIabs_timeout\fP nanosecond
+value is less than zero or greater than or equal to 1000 million.
+.sp
+.LP
+This function shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Applications using this function may be subject to priority inversion,
+as discussed in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 3.285, Priority Inversion.
+.LP
+The \fIpthread_rwlock_timedwrlock\fP() function is part of the Threads
+and Timeouts options and need not be provided on all
+implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_rwlock_destroy\fP(), \fIpthread_rwlock_rdlock\fP(), \fIpthread_rwlock_timedrdlock\fP(),
+\fIpthread_rwlock_tryrdlock\fP(), \fIpthread_rwlock_trywrlock\fP(),
+\fIpthread_rwlock_unlock\fP(), \fIpthread_rwlock_wrlock\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP,
+\fI<time.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_rwlock_tryrdlock.3p b/man-pages-posix-2003/man3p/pthread_rwlock_tryrdlock.3p
new file mode 100644
index 0000000..d3c2a0c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_rwlock_tryrdlock.3p
@@ -0,0 +1 @@
+.so man3p/pthread_rwlock_rdlock.3p
diff --git a/man-pages-posix-2003/man3p/pthread_rwlock_trywrlock.3p b/man-pages-posix-2003/man3p/pthread_rwlock_trywrlock.3p
new file mode 100644
index 0000000..4df624e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_rwlock_trywrlock.3p
@@ -0,0 +1 @@
+.so man3p/pthread_rwlock_wrlock.3p
diff --git a/man-pages-posix-2003/man3p/pthread_rwlock_unlock.3p b/man-pages-posix-2003/man3p/pthread_rwlock_unlock.3p
new file mode 100644
index 0000000..3e726d0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_rwlock_unlock.3p
@@ -0,0 +1,100 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_RWLOCK_UNLOCK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_rwlock_unlock
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_rwlock_unlock \- unlock a read-write lock object
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_rwlock_unlock(pthread_rwlock_t\fP \fI*rwlock\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_rwlock_unlock\fP() function shall release a lock held
+on the read-write lock object referenced by \fIrwlock\fP.
+Results are undefined if the read-write lock \fIrwlock\fP is not held
+by the calling thread.
+.LP
+If this function is called to release a read lock from the read-write
+lock object and there are other read locks currently held
+on this read-write lock object, the read-write lock object remains
+in the read locked state. If this function releases the last
+read lock for this read-write lock object, the read-write lock object
+shall be put in the unlocked state with no owners.
+.LP
+If this function is called to release a write lock for this read-write
+lock object, the read-write lock object shall be put in
+the unlocked state.
+.LP
+If there are threads blocked on the lock when it becomes available,
+the scheduling policy shall determine which thread(s) shall
+acquire the lock. If the Thread Execution Scheduling option is
+supported, when threads executing with the
+scheduling policies SCHED_FIFO, SCHED_RR, or SCHED_SPORADIC are waiting
+on the lock, they shall acquire the lock in priority order
+when the lock becomes available. For equal priority threads, write
+locks shall take precedence over read locks. If the Thread Execution
+Scheduling option is not supported, it is
+implementation-defined whether write locks take precedence over read
+locks.
+.LP
+Results are undefined if any of these functions are called with an
+uninitialized read-write lock.
+.SH RETURN VALUE
+.LP
+If successful, the \fIpthread_rwlock_unlock\fP() function shall return
+zero; otherwise, an error number shall be returned to
+indicate the error.
+.SH ERRORS
+.LP
+The \fIpthread_rwlock_unlock\fP() function may fail if:
+.TP 7
+.B EINVAL
+The value specified by \fIrwlock\fP does not refer to an initialized
+read-write lock object.
+.TP 7
+.B EPERM
+The current thread does not hold a lock on the read-write lock.
+.sp
+.LP
+The \fIpthread_rwlock_unlock\fP() function shall not return an error
+code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_rwlock_destroy\fP(), \fIpthread_rwlock_rdlock\fP(), \fIpthread_rwlock_timedrdlock\fP(),
+\fIpthread_rwlock_timedwrlock\fP(), \fIpthread_rwlock_tryrdlock\fP(),
+\fIpthread_rwlock_trywrlock\fP(), \fIpthread_rwlock_wrlock\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_rwlock_wrlock.3p b/man-pages-posix-2003/man3p/pthread_rwlock_wrlock.3p
new file mode 100644
index 0000000..1d5c407
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_rwlock_wrlock.3p
@@ -0,0 +1,113 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_RWLOCK_TRYWRLOCK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_rwlock_trywrlock
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_rwlock_trywrlock, pthread_rwlock_wrlock \- lock a read-write
+lock object for writing
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_rwlock_trywrlock(pthread_rwlock_t\fP \fI*rwlock\fP\fB);
+.br
+int pthread_rwlock_wrlock(pthread_rwlock_t\fP \fI*rwlock\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_rwlock_trywrlock\fP() function shall apply a write
+lock like the \fIpthread_rwlock_wrlock\fP() function, with
+the exception that the function shall fail if any thread currently
+holds \fIrwlock\fP (for reading or writing).
+.LP
+The \fIpthread_rwlock_wrlock\fP() function shall apply a write lock
+to the read-write lock referenced by \fIrwlock\fP. The
+calling thread acquires the write lock if no other thread (reader
+or writer) holds the read-write lock \fIrwlock\fP. Otherwise,
+the thread shall block until it can acquire the lock. The calling
+thread may deadlock if at the time the call is made it holds the
+read-write lock (whether a read or write lock).
+.LP
+Implementations may favor writers over readers to avoid writer starvation.
+.LP
+Results are undefined if any of these functions are called with an
+uninitialized read-write lock.
+.LP
+If a signal is delivered to a thread waiting for a read-write lock
+for writing, upon return from the signal handler the thread
+resumes waiting for the read-write lock for writing as if it was not
+interrupted.
+.SH RETURN VALUE
+.LP
+The \fIpthread_rwlock_trywrlock\fP() function shall return zero if
+the lock for writing on the read-write lock object
+referenced by \fIrwlock\fP is acquired. Otherwise, an error number
+shall be returned to indicate the error.
+.LP
+If successful, the \fIpthread_rwlock_wrlock\fP() function shall return
+zero; otherwise, an error number shall be returned to
+indicate the error.
+.SH ERRORS
+.LP
+The \fIpthread_rwlock_trywrlock\fP() function shall fail if:
+.TP 7
+.B EBUSY
+The read-write lock could not be acquired for writing because it was
+already locked for reading or writing.
+.sp
+.LP
+The \fIpthread_rwlock_trywrlock\fP() and \fIpthread_rwlock_wrlock\fP()
+functions may fail if:
+.TP 7
+.B EINVAL
+The value specified by \fIrwlock\fP does not refer to an initialized
+read-write lock object.
+.sp
+.LP
+The \fIpthread_rwlock_wrlock\fP() function may fail if:
+.TP 7
+.B EDEADLK
+The current thread already owns the read-write lock for writing or
+reading.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Applications using these functions may be subject to priority inversion,
+as discussed in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 3.285, Priority Inversion.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_rwlock_destroy\fP(), \fIpthread_rwlock_rdlock\fP(), \fIpthread_rwlock_timedrdlock\fP(),
+\fIpthread_rwlock_timedwrlock\fP(), \fIpthread_rwlock_tryrdlock\fP(),
+\fIpthread_rwlock_unlock\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_rwlockattr_destroy.3p b/man-pages-posix-2003/man3p/pthread_rwlockattr_destroy.3p
new file mode 100644
index 0000000..650be88
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_rwlockattr_destroy.3p
@@ -0,0 +1 @@
+.so man3p/pthread_rwlockattr_init.3p
diff --git a/man-pages-posix-2003/man3p/pthread_rwlockattr_getpshared.3p b/man-pages-posix-2003/man3p/pthread_rwlockattr_getpshared.3p
new file mode 100644
index 0000000..af75ea9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_rwlockattr_getpshared.3p
@@ -0,0 +1,108 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_RWLOCKATTR_GETPSHARED" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_rwlockattr_getpshared
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_rwlockattr_getpshared, pthread_rwlockattr_setpshared \- get
+and set the process\-shared attribute of the
+read\-write lock attributes object
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *
+.br
+\ \ \ \ \ \ restrict\fP \fIattr\fP\fB, int *restrict\fP \fIpshared\fP\fB);
+.br
+int pthread_rwlockattr_setpshared(pthread_rwlockattr_t\fP \fI*attr\fP\fB,
+.br
+\ \ \ \ \ \ int\fP \fIpshared\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_rwlockattr_getpshared\fP() function shall obtain the
+value of the \fIprocess-shared\fP attribute from the
+initialized attributes object referenced by \fIattr\fP. The \fIpthread_rwlockattr_setpshared\fP()
+function shall set the
+\fIprocess-shared\fP attribute in an initialized attributes object
+referenced by \fIattr\fP.
+.LP
+The \fIprocess-shared\fP attribute shall be set to PTHREAD_PROCESS_SHARED
+to permit a read-write lock to be operated upon by
+any thread that has access to the memory where the read-write lock
+is allocated, even if the read-write lock is allocated in memory
+that is shared by multiple processes. If the \fIprocess-shared\fP
+attribute is PTHREAD_PROCESS_PRIVATE, the read-write lock shall
+only be operated upon by threads created within the same process as
+the thread that initialized the read-write lock; if threads of
+differing processes attempt to operate on such a read-write lock,
+the behavior is undefined. The default value of the
+\fIprocess-shared\fP attribute shall be PTHREAD_PROCESS_PRIVATE.
+.LP
+Additional attributes, their default values, and the names of the
+associated functions to get and set those attribute values are
+implementation-defined.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIpthread_rwlockattr_getpshared\fP()
+function shall return zero and store the value of the
+\fIprocess-shared\fP attribute of \fIattr\fP into the object referenced
+by the \fIpshared\fP parameter. Otherwise, an error
+number shall be returned to indicate the error.
+.LP
+If successful, the \fIpthread_rwlockattr_setpshared\fP() function
+shall return zero; otherwise, an error number shall be
+returned to indicate the error.
+.SH ERRORS
+.LP
+The \fIpthread_rwlockattr_getpshared\fP() and \fIpthread_rwlockattr_setpshared\fP()
+functions may fail if:
+.TP 7
+.B EINVAL
+The value specified by \fIattr\fP is invalid.
+.sp
+.LP
+The \fIpthread_rwlockattr_setpshared\fP() function may fail if:
+.TP 7
+.B EINVAL
+The new value specified for the attribute is outside the range of
+legal values for that attribute.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_rwlock_destroy\fP(), \fIpthread_rwlockattr_destroy\fP(),
+\fIpthread_rwlockattr_init\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_rwlockattr_init.3p b/man-pages-posix-2003/man3p/pthread_rwlockattr_init.3p
new file mode 100644
index 0000000..df3b920
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_rwlockattr_init.3p
@@ -0,0 +1,97 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_RWLOCKATTR_DESTROY" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_rwlockattr_destroy
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_rwlockattr_destroy, pthread_rwlockattr_init \- destroy and
+initialize the read\-write lock attributes
+object
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_rwlockattr_destroy(pthread_rwlockattr_t\fP \fI*attr\fP\fB);
+.br
+int pthread_rwlockattr_init(pthread_rwlockattr_t\fP \fI*attr\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_rwlockattr_destroy\fP() function shall destroy a read-write
+lock attributes object. A destroyed \fIattr\fP
+attributes object can be reinitialized using \fIpthread_rwlockattr_init\fP();
+the results of otherwise referencing the object
+after it has been destroyed are undefined. An implementation may cause
+\fIpthread_rwlockattr_destroy\fP() to set the object
+referenced by \fIattr\fP to an invalid value.
+.LP
+The \fIpthread_rwlockattr_init\fP() function shall initialize a read-write
+lock attributes object \fIattr\fP with the default
+value for all of the attributes defined by the implementation.
+.LP
+Results are undefined if \fIpthread_rwlockattr_init\fP() is called
+specifying an already initialized \fIattr\fP attributes
+object.
+.LP
+After a read-write lock attributes object has been used to initialize
+one or more read-write locks, any function affecting the
+attributes object (including destruction) shall not affect any previously
+initialized read-write locks.
+.SH RETURN VALUE
+.LP
+If successful, the \fIpthread_rwlockattr_destroy\fP() and \fIpthread_rwlockattr_init\fP()
+functions shall return zero;
+otherwise, an error number shall be returned to indicate the error.
+.SH ERRORS
+.LP
+The \fIpthread_rwlockattr_destroy\fP() function may fail if:
+.TP 7
+.B EINVAL
+The value specified by \fIattr\fP is invalid.
+.sp
+.LP
+The \fIpthread_rwlockattr_init\fP() function shall fail if:
+.TP 7
+.B ENOMEM
+Insufficient memory exists to initialize the read-write lock attributes
+object.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_rwlock_destroy\fP(), \fIpthread_rwlockattr_getpshared\fP(),
+\fIpthread_rwlockattr_setpshared\fP(), the Base Definitions volume
+of
+IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_rwlockattr_setpshared.3p b/man-pages-posix-2003/man3p/pthread_rwlockattr_setpshared.3p
new file mode 100644
index 0000000..07d9aca
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_rwlockattr_setpshared.3p
@@ -0,0 +1 @@
+.so man3p/pthread_rwlockattr_getpshared.3p
diff --git a/man-pages-posix-2003/man3p/pthread_self.3p b/man-pages-posix-2003/man3p/pthread_self.3p
new file mode 100644
index 0000000..32d4b59
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_self.3p
@@ -0,0 +1,63 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_SELF" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_self
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_self \- get the calling thread ID
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+pthread_t pthread_self(void); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_self\fP() function shall return the thread ID of the
+calling thread.
+.SH RETURN VALUE
+.LP
+Refer to the DESCRIPTION.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+The \fIpthread_self\fP() function shall not return an error code of
+[EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIpthread_self\fP() function provides a capability similar to
+the \fIgetpid\fP()
+function for processes and the rationale is the same: the creation
+call does not provide the thread ID to the created thread.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_create\fP(), \fIpthread_equal\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_setcancelstate.3p b/man-pages-posix-2003/man3p/pthread_setcancelstate.3p
new file mode 100644
index 0000000..5de2c51
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_setcancelstate.3p
@@ -0,0 +1 @@
+.so man3p/pthread_testcancel.3p
diff --git a/man-pages-posix-2003/man3p/pthread_setcanceltype.3p b/man-pages-posix-2003/man3p/pthread_setcanceltype.3p
new file mode 100644
index 0000000..5de2c51
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_setcanceltype.3p
@@ -0,0 +1 @@
+.so man3p/pthread_testcancel.3p
diff --git a/man-pages-posix-2003/man3p/pthread_setconcurrency.3p b/man-pages-posix-2003/man3p/pthread_setconcurrency.3p
new file mode 100644
index 0000000..a2b8dd9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_setconcurrency.3p
@@ -0,0 +1 @@
+.so man3p/pthread_getconcurrency.3p
diff --git a/man-pages-posix-2003/man3p/pthread_setschedparam.3p b/man-pages-posix-2003/man3p/pthread_setschedparam.3p
new file mode 100644
index 0000000..f819172
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_setschedparam.3p
@@ -0,0 +1 @@
+.so man3p/pthread_getschedparam.3p
diff --git a/man-pages-posix-2003/man3p/pthread_setschedprio.3p b/man-pages-posix-2003/man3p/pthread_setschedprio.3p
new file mode 100644
index 0000000..a90e518
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_setschedprio.3p
@@ -0,0 +1,107 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_SETSCHEDPRIO" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_setschedprio
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_setschedprio \- dynamic thread scheduling parameters access
+(\fBREALTIME THREADS\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_setschedprio(pthread_t\fP \fIthread\fP\fB, int\fP \fIprio\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_setschedprio\fP() function shall set the scheduling
+priority for the thread whose thread ID is given by
+\fIthread\fP to the value given by \fIprio\fP. See \fIScheduling Policies\fP
+for a description on how this function call affects the ordering of
+the thread in the thread list for its new priority.
+.LP
+If the \fIpthread_setschedprio\fP() function fails, the scheduling
+priority of the target thread shall not be changed.
+.SH RETURN VALUE
+.LP
+If successful, the \fIpthread_setschedprio\fP() function shall return
+zero; otherwise, an error number shall be returned to
+indicate the error.
+.SH ERRORS
+.LP
+The \fIpthread_setschedprio\fP() function may fail if:
+.TP 7
+.B EINVAL
+The value of \fIprio\fP is invalid for the scheduling policy of the
+specified thread.
+.TP 7
+.B ENOTSUP
+An attempt was made to set the priority to an unsupported value.
+.TP 7
+.B EPERM
+The caller does not have the appropriate permission to set the scheduling
+policy of the specified thread.
+.TP 7
+.B EPERM
+The implementation does not allow the application to modify the priority
+to the value specified.
+.TP 7
+.B ESRCH
+The value specified by \fIthread\fP does not refer to an existing
+thread.
+.sp
+.LP
+The \fIpthread_setschedprio\fP() function shall not return an error
+code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIpthread_setschedprio\fP() function provides a way for an application
+to temporarily raise its priority and then lower it
+again, without having the undesired side effect of yielding to other
+threads of the same priority. This is necessary if the
+application is to implement its own strategies for bounding priority
+inversion, such as priority inheritance or priority ceilings.
+This capability is especially important if the implementation does
+not support the Thread Priority Protection or Thread Priority
+Inheritance options, but even if those options are supported it is
+needed if the application is to bound priority inheritance for
+other resources, such as semaphores.
+.LP
+The standard developers considered that while it might be preferable
+conceptually to solve this problem by modifying the
+specification of \fIpthread_setschedparam\fP(), it was too late to
+make such
+a change, as there may be implementations that would need to be changed.
+Therefore, this new function was introduced.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIScheduling Policies\fP, \fIpthread_getschedparam\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_setspecific.3p b/man-pages-posix-2003/man3p/pthread_setspecific.3p
new file mode 100644
index 0000000..aa3b23b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_setspecific.3p
@@ -0,0 +1 @@
+.so man3p/pthread_getspecific.3p
diff --git a/man-pages-posix-2003/man3p/pthread_sigmask.3p b/man-pages-posix-2003/man3p/pthread_sigmask.3p
new file mode 100644
index 0000000..e541520
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_sigmask.3p
@@ -0,0 +1 @@
+.so man3p/sigprocmask.3p
diff --git a/man-pages-posix-2003/man3p/pthread_spin_destroy.3p b/man-pages-posix-2003/man3p/pthread_spin_destroy.3p
new file mode 100644
index 0000000..92e5693
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_spin_destroy.3p
@@ -0,0 +1 @@
+.so man3p/pthread_spin_init.3p
diff --git a/man-pages-posix-2003/man3p/pthread_spin_init.3p b/man-pages-posix-2003/man3p/pthread_spin_init.3p
new file mode 100644
index 0000000..e5814f9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_spin_init.3p
@@ -0,0 +1,125 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_SPIN_DESTROY" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_spin_destroy
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_spin_destroy, pthread_spin_init \- destroy or initialize a
+spin lock object (\fBADVANCED REALTIME
+THREADS\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_spin_destroy(pthread_spinlock_t *\fP\fIlock\fP\fB);
+.br
+int pthread_spin_init(pthread_spinlock_t *\fP\fIlock\fP\fB, int\fP
+\fIpshared\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_spin_destroy\fP() function shall destroy the spin lock
+referenced by \fIlock\fP and release any resources used
+by the lock. The effect of subsequent use of the lock is undefined
+until the lock is reinitialized by another call to
+\fIpthread_spin_init\fP(). The results are undefined if \fIpthread_spin_destroy\fP()
+is called when a thread holds the lock, or
+if this function is called with an uninitialized thread spin lock.
+.LP
+The \fIpthread_spin_init\fP() function shall allocate any resources
+required to use the spin lock referenced by \fIlock\fP and
+initialize the lock to an unlocked state.
+.LP
+If the Thread Process-Shared Synchronization option is supported and
+the value of \fIpshared\fP is PTHREAD_PROCESS_SHARED, the
+implementation shall permit the spin lock to be operated upon by any
+thread that has access to the memory where the spin lock is
+allocated, even if it is allocated in memory that is shared by multiple
+processes.
+.LP
+If the Thread Process-Shared Synchronization option is supported and
+the value of \fIpshared\fP is PTHREAD_PROCESS_PRIVATE,
+or if the option is not supported, the spin lock shall only be
+operated upon by threads created within the same process as the thread
+that initialized the spin lock. If threads of differing
+processes attempt to operate on such a spin lock, the behavior is
+undefined.
+.LP
+The results are undefined if \fIpthread_spin_init\fP() is called specifying
+an already initialized spin lock. The results are
+undefined if a spin lock is used without first being initialized.
+.LP
+If the \fIpthread_spin_init\fP() function fails, the lock is not initialized
+and the contents of \fIlock\fP are undefined.
+.LP
+Only the object referenced by \fIlock\fP may be used for performing
+synchronization.
+.LP
+The result of referring to copies of that object in calls to \fIpthread_spin_destroy\fP(),
+\fIpthread_spin_lock\fP(), \fIpthread_spin_trylock\fP(), or \fIpthread_spin_unlock\fP()
+is undefined.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return zero; otherwise,
+an error number shall be returned to indicate the
+error.
+.SH ERRORS
+.LP
+These functions may fail if:
+.TP 7
+.B EBUSY
+The implementation has detected an attempt to initialize or destroy
+a spin lock while it is in use (for example, while being
+used in a \fIpthread_spin_lock\fP() call) by another thread.
+.TP 7
+.B EINVAL
+The value specified by \fIlock\fP is invalid.
+.sp
+.LP
+The \fIpthread_spin_init\fP() function shall fail if:
+.TP 7
+.B EAGAIN
+The system lacks the necessary resources to initialize another spin
+lock.
+.TP 7
+.B ENOMEM
+Insufficient memory exists to initialize the lock.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIpthread_spin_destroy\fP() and \fIpthread_spin_init\fP() functions
+are part of the Spin Locks option and need not be
+provided on all implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_spin_lock\fP(), \fIpthread_spin_unlock\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_spin_lock.3p b/man-pages-posix-2003/man3p/pthread_spin_lock.3p
new file mode 100644
index 0000000..2ce8757
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_spin_lock.3p
@@ -0,0 +1,97 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_SPIN_LOCK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_spin_lock
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_spin_lock, pthread_spin_trylock \- lock a spin lock object
+(\fBADVANCED REALTIME THREADS\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_spin_lock(pthread_spinlock_t *\fP\fIlock\fP\fB);
+.br
+int pthread_spin_trylock(pthread_spinlock_t *\fP\fIlock\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_spin_lock\fP() function shall lock the spin lock referenced
+by \fIlock\fP. The calling thread shall acquire the
+lock if it is not held by another thread. Otherwise, the thread shall
+spin (that is, shall not return from the
+\fIpthread_spin_lock\fP() call) until the lock becomes available.
+The results are undefined if the calling thread holds the lock
+at the time the call is made. The \fIpthread_spin_trylock\fP() function
+shall lock the spin lock referenced by \fIlock\fP if it
+is not held by any thread. Otherwise, the function shall fail.
+.LP
+The results are undefined if any of these functions is called with
+an uninitialized spin lock.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return zero; otherwise,
+an error number shall be returned to indicate the
+error.
+.SH ERRORS
+.LP
+These functions may fail if:
+.TP 7
+.B EINVAL
+The value specified by \fIlock\fP does not refer to an initialized
+spin lock object.
+.sp
+.LP
+The \fIpthread_spin_lock\fP() function may fail if:
+.TP 7
+.B EDEADLK
+The calling thread already holds the lock.
+.sp
+.LP
+The \fIpthread_spin_trylock\fP() function shall fail if:
+.TP 7
+.B EBUSY
+A thread currently holds the lock.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Applications using this function may be subject to priority inversion,
+as discussed in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 3.285, Priority Inversion.
+.LP
+The \fIpthread_spin_lock\fP() and \fIpthread_spin_trylock\fP() functions
+are part of the Spin Locks option and need not be
+provided on all implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_spin_destroy\fP(), \fIpthread_spin_unlock\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_spin_trylock.3p b/man-pages-posix-2003/man3p/pthread_spin_trylock.3p
new file mode 100644
index 0000000..ca0cd28
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_spin_trylock.3p
@@ -0,0 +1 @@
+.so man3p/pthread_spin_lock.3p
diff --git a/man-pages-posix-2003/man3p/pthread_spin_unlock.3p b/man-pages-posix-2003/man3p/pthread_spin_unlock.3p
new file mode 100644
index 0000000..806d538
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_spin_unlock.3p
@@ -0,0 +1,78 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_SPIN_UNLOCK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_spin_unlock
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_spin_unlock \- unlock a spin lock object (\fBADVANCED REALTIME
+THREADS\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_spin_unlock(pthread_spinlock_t *\fP\fIlock\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_spin_unlock\fP() function shall release the spin lock
+referenced by \fIlock\fP which was locked via the \fIpthread_spin_lock\fP()
+or \fIpthread_spin_trylock\fP() functions. The results are undefined
+if the lock is not
+held by the calling thread. If there are threads spinning on the lock
+when \fIpthread_spin_unlock\fP() is called, the lock becomes
+available and an unspecified spinning thread shall acquire the lock.
+.LP
+The results are undefined if this function is called with an uninitialized
+thread spin lock.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIpthread_spin_unlock\fP() function
+shall return zero; otherwise, an error number shall be
+returned to indicate the error.
+.SH ERRORS
+.LP
+The \fIpthread_spin_unlock\fP() function may fail if:
+.TP 7
+.B EINVAL
+An invalid argument was specified.
+.TP 7
+.B EPERM
+The calling thread does not hold the lock.
+.sp
+.LP
+This function shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIpthread_spin_unlock\fP() function is part of the Spin Locks
+option and need not be provided on all implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_spin_destroy\fP(), \fIpthread_spin_lock\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pthread_testcancel.3p b/man-pages-posix-2003/man3p/pthread_testcancel.3p
new file mode 100644
index 0000000..8b09a39
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pthread_testcancel.3p
@@ -0,0 +1,125 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_SETCANCELSTATE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_setcancelstate
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_setcancelstate, pthread_setcanceltype, pthread_testcancel
+\- set cancelability state
+.SH SYNOPSIS
+.LP
+\fB#include <pthread.h>
+.br
+.sp
+int pthread_setcancelstate(int\fP \fIstate\fP\fB, int *\fP\fIoldstate\fP\fB);
+.br
+int pthread_setcanceltype(int\fP \fItype\fP\fB, int *\fP\fIoldtype\fP\fB);
+.br
+void pthread_testcancel(void); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_setcancelstate\fP() function shall atomically both
+set the calling thread's cancelability state to the indicated
+\fIstate\fP and return the previous cancelability state at the location
+referenced by \fIoldstate\fP. Legal values for
+\fIstate\fP are PTHREAD_CANCEL_ENABLE and PTHREAD_CANCEL_DISABLE.
+.LP
+The \fIpthread_setcanceltype\fP() function shall atomically both set
+the calling thread's cancelability type to the indicated
+\fItype\fP and return the previous cancelability type at the location
+referenced by \fIoldtype\fP. Legal values for \fItype\fP
+are PTHREAD_CANCEL_DEFERRED and PTHREAD_CANCEL_ASYNCHRONOUS.
+.LP
+The cancelability state and type of any newly created threads, including
+the thread in which \fImain\fP() was first invoked,
+shall be PTHREAD_CANCEL_ENABLE and PTHREAD_CANCEL_DEFERRED respectively.
+.LP
+The \fIpthread_testcancel\fP() function shall create a cancellation
+point in the calling thread. The
+\fIpthread_testcancel\fP() function shall have no effect if cancelability
+is disabled.
+.SH RETURN VALUE
+.LP
+If successful, the \fIpthread_setcancelstate\fP() and \fIpthread_setcanceltype\fP()
+functions shall return zero; otherwise, an
+error number shall be returned to indicate the error.
+.SH ERRORS
+.LP
+The \fIpthread_setcancelstate\fP() function may fail if:
+.TP 7
+.B EINVAL
+The specified state is not PTHREAD_CANCEL_ENABLE or PTHREAD_CANCEL_DISABLE.
+.sp
+.LP
+The \fIpthread_setcanceltype\fP() function may fail if:
+.TP 7
+.B EINVAL
+The specified type is not PTHREAD_CANCEL_DEFERRED or PTHREAD_CANCEL_ASYNCHRONOUS.
+.sp
+.LP
+These functions shall not return an error code of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIpthread_setcancelstate\fP() and \fIpthread_setcanceltype\fP()
+functions control the points at which a thread may be
+asynchronously canceled. For cancellation control to be usable in
+modular fashion, some rules need to be followed.
+.LP
+An object can be considered to be a generalization of a procedure.
+It is a set of procedures and global variables written as a
+unit and called by clients not known by the object. Objects may depend
+on other objects.
+.LP
+First, cancelability should only be disabled on entry to an object,
+never explicitly enabled. On exit from an object, the
+cancelability state should always be restored to its value on entry
+to the object.
+.LP
+This follows from a modularity argument: if the client of an object
+(or the client of an object that uses that object) has
+disabled cancelability, it is because the client does not want to
+be concerned about cleaning up if the thread is canceled while
+executing some sequence of actions. If an object is called in such
+a state and it enables cancelability and a cancellation request
+is pending for that thread, then the thread is canceled, contrary
+to the wish of the client that disabled.
+.LP
+Second, the cancelability type may be explicitly set to either \fIdeferred\fP
+or \fIasynchronous\fP upon entry to an object.
+But as with the cancelability state, on exit from an object the cancelability
+type should always be restored to its value on entry
+to the object.
+.LP
+Finally, only functions that are cancel-safe may be called from a
+thread that is asynchronously cancelable.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpthread_cancel\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<pthread.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/ptsname.3p b/man-pages-posix-2003/man3p/ptsname.3p
new file mode 100644
index 0000000..425f46c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ptsname.3p
@@ -0,0 +1,71 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTSNAME" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ptsname
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ptsname \- get name of the slave pseudo-terminal device
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+char *ptsname(int\fP \fIfildes\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIptsname\fP() function shall return the name of the slave pseudo-terminal
+device associated with a master pseudo-terminal
+device. The \fIfildes\fP argument is a file descriptor that refers
+to the master device. The \fIptsname\fP() function shall
+return a pointer to a string containing the pathname of the corresponding
+slave device.
+.LP
+The \fIptsname\fP() function need not be reentrant. A function that
+is not required to be reentrant is not required to be
+thread-safe.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIptsname\fP() shall return a pointer
+to a string which is the name of the pseudo-terminal slave
+device. Upon failure, \fIptsname\fP() shall return a null pointer.
+This could occur if \fIfildes\fP is an invalid file descriptor
+or if the slave device name does not exist in the file system.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The value returned may point to a static data area that is overwritten
+by each call to \fIptsname\fP().
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgrantpt\fP(), \fIopen\fP(), \fIttyname\fP(), \fIunlockpt\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/putc.3p b/man-pages-posix-2003/man3p/putc.3p
new file mode 100644
index 0000000..49ddc5d
--- /dev/null
+++ b/man-pages-posix-2003/man3p/putc.3p
@@ -0,0 +1,63 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PUTC" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" putc
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+putc \- put a byte on a stream
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+int putc(int\fP \fIc\fP\fB, FILE *\fP\fIstream\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIputc\fP() function shall be equivalent to \fIfputc\fP(), except
+that if it is
+implemented as a macro it may evaluate \fIstream\fP more than once,
+so the argument should never be an expression with side
+effects.
+.SH RETURN VALUE
+.LP
+Refer to \fIfputc\fP().
+.SH ERRORS
+.LP
+Refer to \fIfputc\fP().
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Since it may be implemented as a macro, \fIputc\fP() may treat a \fIstream\fP
+argument with side effects incorrectly. In
+particular, \fIputc\fP(\fIc\fP,*\fIf\fP++) does not necessarily work
+correctly. Therefore, use of this function is not
+recommended in such situations; \fIfputc\fP() should be used instead.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfputc\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/putc_unlocked.3p b/man-pages-posix-2003/man3p/putc_unlocked.3p
new file mode 100644
index 0000000..c7026cf
--- /dev/null
+++ b/man-pages-posix-2003/man3p/putc_unlocked.3p
@@ -0,0 +1 @@
+.so man3p/getchar_unlocked.3p
diff --git a/man-pages-posix-2003/man3p/putchar.3p b/man-pages-posix-2003/man3p/putchar.3p
new file mode 100644
index 0000000..63d97c6
--- /dev/null
+++ b/man-pages-posix-2003/man3p/putchar.3p
@@ -0,0 +1,55 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PUTCHAR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" putchar
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+putchar \- put a byte on a stdout stream
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+int putchar(int\fP \fIc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The function call \fIputchar\fP(\fIc\fP) shall be equivalent to \fIputc\fP(\fIc\fP,\fIstdout\fP).
+.SH RETURN VALUE
+.LP
+Refer to \fIfputc\fP().
+.SH ERRORS
+.LP
+Refer to \fIfputc\fP().
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIputc\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/putchar_unlocked.3p b/man-pages-posix-2003/man3p/putchar_unlocked.3p
new file mode 100644
index 0000000..c7026cf
--- /dev/null
+++ b/man-pages-posix-2003/man3p/putchar_unlocked.3p
@@ -0,0 +1 @@
+.so man3p/getchar_unlocked.3p
diff --git a/man-pages-posix-2003/man3p/putenv.3p b/man-pages-posix-2003/man3p/putenv.3p
new file mode 100644
index 0000000..0d8509b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/putenv.3p
@@ -0,0 +1,106 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PUTENV" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" putenv
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+putenv \- change or add a value to an environment
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+int putenv(char *\fP\fIstring\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIputenv\fP() function shall use the \fIstring\fP argument to
+set environment variable values. The \fIstring\fP argument
+should point to a string of the form " \fIname\fP= \fIvalue\fP ".
+The \fIputenv\fP() function shall make the value of the
+environment variable \fIname\fP equal to \fIvalue\fP by altering an
+existing variable or creating a new one. In either case, the
+string pointed to by \fIstring\fP shall become part of the environment,
+so altering the string shall change the environment. The
+space used by \fIstring\fP is no longer used once a new string which
+defines \fIname\fP is passed to \fIputenv\fP().
+.LP
+The \fIputenv\fP() function need not be reentrant. A function that
+is not required to be reentrant is not required to be
+thread-safe.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIputenv\fP() shall return 0; otherwise,
+it shall return a non-zero value and set \fIerrno\fP to
+indicate the error.
+.SH ERRORS
+.LP
+The \fIputenv\fP() function may fail if:
+.TP 7
+.B ENOMEM
+Insufficient memory was available.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Changing the Value of an Environment Variable
+.LP
+The following example changes the value of the \fIHOME\fP environment
+variable to the value \fB/usr/home\fP.
+.sp
+.RS
+.nf
+
+\fB#include <stdlib.h>
+\&...
+static char *var = "HOME=/usr/home";
+int ret;
+.sp
+
+ret = putenv(var);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The \fIputenv\fP() function manipulates the environment pointed to
+by \fIenviron\fP, and can be used in conjunction with \fIgetenv\fP().
+.LP
+See \fIexec\fP(), for restrictions on changing the environment in
+multi-threaded applications.
+.LP
+This routine may use \fImalloc\fP() to enlarge the environment.
+.LP
+A potential error is to call \fIputenv\fP() with an automatic variable
+as the argument, then return from the calling function
+while \fIstring\fP is still part of the environment.
+.LP
+The \fIsetenv\fP() function is preferred over this function.
+.SH RATIONALE
+.LP
+The standard developers noted that \fIputenv\fP() is the only function
+available to add to the environment without permitting
+memory leaks.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexec\fP(), \fIgetenv\fP(), \fImalloc\fP(), \fIsetenv\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/putmsg.3p b/man-pages-posix-2003/man3p/putmsg.3p
new file mode 100644
index 0000000..098dd18
--- /dev/null
+++ b/man-pages-posix-2003/man3p/putmsg.3p
@@ -0,0 +1,262 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PUTMSG" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" putmsg
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+putmsg, putpmsg \- send a message on a STREAM (\fBSTREAMS\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <stropts.h>
+.br
+.sp
+int putmsg(int\fP \fIfildes\fP\fB, const struct strbuf *\fP\fIctlptr\fP\fB,
+.br
+\ \ \ \ \ \ const struct strbuf *\fP\fIdataptr\fP\fB, int\fP \fIflags\fP\fB);
+.br
+int putpmsg(int\fP \fIfildes\fP\fB, const struct strbuf *\fP\fIctlptr\fP\fB,
+.br
+\ \ \ \ \ \ const struct strbuf *\fP\fIdataptr\fP\fB, int\fP \fIband\fP\fB,
+int\fP
+\fIflags\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIputmsg\fP() function shall create a message from a process
+buffer(s) and send the message to a STREAMS file. The message
+may contain either a data part, a control part, or both. The data
+and control parts are distinguished by placement in separate
+buffers, as described below. The semantics of each part are defined
+by the STREAMS module that receives the message.
+.LP
+The \fIputpmsg\fP() function is equivalent to \fIputmsg\fP(), except
+that the process can send messages in different priority
+bands. Except where noted, all requirements on \fIputmsg\fP() also
+pertain to \fIputpmsg\fP().
+.LP
+The \fIfildes\fP argument specifies a file descriptor referencing
+an open STREAM. The \fIctlptr\fP and \fIdataptr\fP
+arguments each point to a \fBstrbuf\fP structure.
+.LP
+The \fIctlptr\fP argument points to the structure describing the control
+part, if any, to be included in the message. The
+\fIbuf\fP member in the \fBstrbuf\fP structure points to the buffer
+where the control information resides, and the \fIlen\fP
+member indicates the number of bytes to be sent. The \fImaxlen\fP
+member is not used by \fIputmsg\fP(). In a similar manner, the
+argument \fIdataptr\fP specifies the data, if any, to be included
+in the message. The \fIflags\fP argument indicates what type of
+message should be sent and is described further below.
+.LP
+To send the data part of a message, the application shall ensure that
+\fIdataptr\fP is not a null pointer and the \fIlen\fP
+member of \fIdataptr\fP is 0 or greater. To send the control part
+of a message, the application shall ensure that the
+corresponding values are set for \fIctlptr\fP. No data (control) part
+shall be sent if either \fIdataptr\fP( \fIctlptr\fP) is a
+null pointer or the \fIlen\fP member of \fIdataptr\fP( \fIctlptr\fP)
+is set to -1.
+.LP
+For \fIputmsg\fP(), if a control part is specified and \fIflags\fP
+is set to RS_HIPRI, a high priority message shall be sent.
+If no control part is specified, and \fIflags\fP is set to RS_HIPRI,
+\fIputmsg\fP() shall fail and set \fIerrno\fP to [EINVAL].
+If \fIflags\fP is set to 0, a normal message (priority band equal
+to 0) shall be sent. If a control part and data part are not
+specified and \fIflags\fP is set to 0, no message shall be sent and
+0 shall be returned.
+.LP
+For \fIputpmsg\fP(), the flags are different. The \fIflags\fP argument
+is a bitmask with the following mutually-exclusive
+flags defined: MSG_HIPRI and MSG_BAND. If \fIflags\fP is set to 0,
+\fIputpmsg\fP() shall fail and set \fIerrno\fP to [EINVAL].
+If a control part is specified and \fIflags\fP is set to MSG_HIPRI
+and \fIband\fP is set to 0, a high-priority message shall be
+sent. If \fIflags\fP is set to MSG_HIPRI and either no control part
+is specified or \fIband\fP is set to a non-zero value,
+\fIputpmsg\fP() shall fail and set \fIerrno\fP to [EINVAL]. If \fIflags\fP
+is set to MSG_BAND, then a message shall be sent in
+the priority band specified by \fIband\fP. If a control part and data
+part are not specified and \fIflags\fP is set to MSG_BAND,
+no message shall be sent and 0 shall be returned.
+.LP
+The \fIputmsg\fP() function shall block if the STREAM write queue
+is full due to internal flow control conditions, with the
+following exceptions:
+.IP " *" 3
+For high-priority messages, \fIputmsg\fP() shall not block on this
+condition and continues processing the message.
+.LP
+.IP " *" 3
+For other messages, \fIputmsg\fP() shall not block but shall fail
+when the write queue is full and O_NONBLOCK is set.
+.LP
+.LP
+The \fIputmsg\fP() function shall also block, unless prevented by
+lack of internal resources, while waiting for the
+availability of message blocks in the STREAM, regardless of priority
+or whether O_NONBLOCK has been specified. No partial message
+shall be sent.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIputmsg\fP() and \fIputpmsg\fP() shall
+return 0; otherwise, they shall return -1 and set
+\fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fIputmsg\fP() and \fIputpmsg\fP() functions shall fail if:
+.TP 7
+.B EAGAIN
+A non-priority message was specified, the O_NONBLOCK flag is set,
+and the STREAM write queue is full due to internal flow
+control conditions; or buffers could not be allocated for the message
+that was to be created.
+.TP 7
+.B EBADF
+\fIfildes\fP is not a valid file descriptor open for writing.
+.TP 7
+.B EINTR
+A signal was caught during \fIputmsg\fP().
+.TP 7
+.B EINVAL
+An undefined value is specified in \fIflags\fP, or \fIflags\fP is
+set to RS_HIPRI or MSG_HIPRI and no control part is
+supplied, or the STREAM or multiplexer referenced by \fIfildes\fP
+is linked (directly or indirectly) downstream from a
+multiplexer, or \fIflags\fP is set to MSG_HIPRI and \fIband\fP is
+non-zero (for \fIputpmsg\fP() only).
+.TP 7
+.B ENOSR
+Buffers could not be allocated for the message that was to be created
+due to insufficient STREAMS memory resources.
+.TP 7
+.B ENOSTR
+A STREAM is not associated with \fIfildes\fP.
+.TP 7
+.B ENXIO
+A hangup condition was generated downstream for the specified STREAM.
+.TP 7
+.B EPIPE \fRor\fP EIO
+The \fIfildes\fP argument refers to a STREAMS-based pipe and the other
+end of the pipe is closed. A SIGPIPE signal is
+generated for the calling thread.
+.TP 7
+.B ERANGE
+The size of the data part of the message does not fall within the
+range specified by the maximum and minimum packet sizes of
+the topmost STREAM module. This value is also returned if the control
+part of the message is larger than the maximum configured
+size of the control part of a message, or if the data part of a message
+is larger than the maximum configured size of the data part
+of a message.
+.sp
+.LP
+In addition, \fIputmsg\fP() and \fIputpmsg\fP() shall fail if the
+STREAM head had processed an asynchronous error before the
+call. In this case, the value of \fIerrno\fP does not reflect the
+result of \fIputmsg\fP() or \fIputpmsg\fP(), but reflects the
+prior error.
+.br
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Sending a High-Priority Message
+.LP
+The value of \fIfd\fP is assumed to refer to an open STREAMS file.
+This call to \fIputmsg\fP() does the following:
+.IP " 1." 4
+Creates a high-priority message with a control part and a data part,
+using the buffers pointed to by \fIctrlbuf\fP and
+\fIdatabuf\fP, respectively.
+.LP
+.IP " 2." 4
+Sends the message to the STREAMS file identified by \fIfd\fP.
+.LP
+.sp
+.RS
+.nf
+
+\fB#include <stropts.h>
+#include <string.h>
+\&...
+int fd;
+char *ctrlbuf = "This is the control part";
+char *databuf = "This is the data part";
+struct strbuf ctrl;
+struct strbuf data;
+int ret;
+.sp
+
+ctrl.buf = ctrlbuf;
+ctrl.len = strlen(ctrlbuf);
+.sp
+
+data.buf = databuf;
+data.len = strlen(databuf);
+.sp
+
+ret = putmsg(fd, &ctrl, &data, MSG_HIPRI);
+\fP
+.fi
+.RE
+.SS Using putpmsg()
+.LP
+This example has the same effect as the previous example. In this
+example, however, the \fIputpmsg\fP() function creates and
+sends the message to the STREAMS file.
+.sp
+.RS
+.nf
+
+\fB#include <stropts.h>
+#include <string.h>
+\&...
+int fd;
+char *ctrlbuf = "This is the control part";
+char *databuf = "This is the data part";
+struct strbuf ctrl;
+struct strbuf data;
+int ret;
+.sp
+
+ctrl.buf = ctrlbuf;
+ctrl.len = strlen(ctrlbuf);
+.sp
+
+data.buf = databuf;
+data.len = strlen(databuf);
+.sp
+
+ret = putpmsg(fd, &ctrl, &data, 0, MSG_HIPRI);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fISTREAMS\fP, \fIgetmsg\fP(), \fIpoll\fP(), \fIread\fP(), \fIwrite\fP(),
+the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<stropts.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/putpmsg.3p b/man-pages-posix-2003/man3p/putpmsg.3p
new file mode 100644
index 0000000..32d734e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/putpmsg.3p
@@ -0,0 +1 @@
+.so man3p/putmsg.3p
diff --git a/man-pages-posix-2003/man3p/puts.3p b/man-pages-posix-2003/man3p/puts.3p
new file mode 100644
index 0000000..b206972
--- /dev/null
+++ b/man-pages-posix-2003/man3p/puts.3p
@@ -0,0 +1,91 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PUTS" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" puts
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+puts \- put a string on standard output
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+int puts(const char *\fP\fIs\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIputs\fP() function shall write the string pointed to by \fIs\fP,
+followed by a <newline>, to the standard output
+stream \fIstdout\fP. The terminating null byte shall not be written.
+.LP
+The
+\fIst_ctime\fP and \fIst_mtime\fP fields of the file shall be marked
+for update between the successful execution of \fIputs\fP()
+and the next successful completion of a call to \fIfflush\fP() or
+\fIfclose\fP() on the same stream or a call to \fIexit\fP()
+or \fIabort\fP().
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIputs\fP() shall return a non-negative
+number. Otherwise, it shall return EOF, shall set an error
+indicator for the stream, and \fIerrno\fP shall be set to indicate
+the error.
+.SH ERRORS
+.LP
+Refer to \fIfputc\fP().
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Printing to Standard Output
+.LP
+The following example gets the current time, converts it to a string
+using \fIlocaltime\fP() and \fIasctime\fP(), and prints it to
+standard output using \fIputs\fP(). It then prints the number of minutes
+to an event for which it is waiting.
+.sp
+.RS
+.nf
+
+\fB#include <time.h>
+#include <stdio.h>
+\&...
+time_t now;
+int minutes_to_event;
+\&...
+time(&now);
+printf("The time is ");
+puts(asctime(localtime(&now)));
+printf("There are %d minutes to the event.\\n",
+ minutes_to_event);
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The \fIputs\fP() function appends a <newline>, while \fIfputs\fP()
+does not.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfopen\fP(), \fIfputs\fP(), \fIputc\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pututxline.3p b/man-pages-posix-2003/man3p/pututxline.3p
new file mode 100644
index 0000000..f7769c3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pututxline.3p
@@ -0,0 +1 @@
+.so man3p/getutxid.3p
diff --git a/man-pages-posix-2003/man3p/putwc.3p b/man-pages-posix-2003/man3p/putwc.3p
new file mode 100644
index 0000000..44bf4d9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/putwc.3p
@@ -0,0 +1,65 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PUTWC" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" putwc
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+putwc \- put a wide character on a stream
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+#include <wchar.h>
+.br
+.sp
+wint_t putwc(wchar_t\fP \fIwc\fP\fB, FILE *\fP\fIstream\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIputwc\fP() function shall be equivalent to \fIfputwc\fP(),
+except that if it is
+implemented as a macro it may evaluate \fIstream\fP more than once,
+so the argument should never be an expression with side
+effects.
+.SH RETURN VALUE
+.LP
+Refer to \fIfputwc\fP().
+.SH ERRORS
+.LP
+Refer to \fIfputwc\fP().
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Since it may be implemented as a macro, \fIputwc\fP() may treat a
+\fIstream\fP argument with side effects incorrectly. In
+particular, \fIputwc\fP(\fIwc\fP,*\fIf\fP++) need not work correctly.
+Therefore, use of this function is not recommended; \fIfputwc\fP()
+should be used instead.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfputwc\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<stdio.h>\fP, \fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/putwchar.3p b/man-pages-posix-2003/man3p/putwchar.3p
new file mode 100644
index 0000000..13b5634
--- /dev/null
+++ b/man-pages-posix-2003/man3p/putwchar.3p
@@ -0,0 +1,56 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PUTWCHAR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" putwchar
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+putwchar \- put a wide character on a stdout stream
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+wint_t putwchar(wchar_t\fP \fIwc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The function call \fIputwchar\fP(\fIwc\fP) shall be equivalent to
+\fIputwc\fP(\fIwc\fP,\fIstdout\fP).
+.SH RETURN VALUE
+.LP
+Refer to \fIfputwc\fP().
+.SH ERRORS
+.LP
+Refer to \fIfputwc\fP().
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfputwc\fP(), \fIputwc\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/pwrite.3p b/man-pages-posix-2003/man3p/pwrite.3p
new file mode 100644
index 0000000..54c7c56
--- /dev/null
+++ b/man-pages-posix-2003/man3p/pwrite.3p
@@ -0,0 +1 @@
+.so man3p/write.3p
diff --git a/man-pages-posix-2003/man3p/qsort.3p b/man-pages-posix-2003/man3p/qsort.3p
new file mode 100644
index 0000000..40f3d57
--- /dev/null
+++ b/man-pages-posix-2003/man3p/qsort.3p
@@ -0,0 +1,99 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "QSORT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" qsort
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+qsort \- sort a table of data
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+void qsort(void *\fP\fIbase\fP\fB, size_t\fP \fInel\fP\fB, size_t\fP
+\fIwidth\fP\fB,
+.br
+\ \ \ \ \ \ int (*\fP\fIcompar\fP\fB)(const void *, const void *));
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIqsort\fP() function shall sort an array of \fInel\fP objects,
+the initial element of which is pointed to by
+\fIbase\fP. The size of each object, in bytes, is specified by the
+\fIwidth\fP argument. If the \fInel\fP argument has the value
+zero, the comparison function pointed to by \fIcompar\fP shall not
+be called and no rearrangement shall take place.
+.LP
+The application shall ensure that the comparison function pointed
+to by \fIcompar\fP does not alter the contents of the array.
+The implementation may reorder elements of the array between calls
+to the comparison function, but shall not alter the contents of
+any individual element.
+.LP
+When the same objects (consisting of width bytes, irrespective of
+their current positions in the array) are passed more than
+once to the comparison function, the results shall be consistent with
+one another. That is, they shall define a total ordering on
+the array.
+.LP
+The contents of the array shall be sorted in ascending order according
+to a comparison function. The \fIcompar\fP argument is a
+pointer to the comparison function, which is called with two arguments
+that point to the elements being compared. The application
+shall ensure that the function returns an integer less than, equal
+to, or greater than 0, if the first argument is considered
+respectively less than, equal to, or greater than the second. If two
+members compare as equal, their order in the sorted array is
+unspecified.
+.SH RETURN VALUE
+.LP
+The \fIqsort\fP() function shall not return a value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The comparison function need not compare every byte, so arbitrary
+data may be contained in the elements in addition to the
+values being compared.
+.SH RATIONALE
+.LP
+The requirement that each argument (hereafter referred to as \fIp)\fP
+to the comparison function is a pointer to elements of
+the array implies that for every call, for each argument separately,
+all of the following expressions are nonzero:
+.sp
+.RS
+.nf
+
+\fB((char *)p - (char *)base) % width == 0
+(char *)p >= (char *)base
+(char *)p < (char *)base + nel * width
+\fP
+.fi
+.RE
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/raise.3p b/man-pages-posix-2003/man3p/raise.3p
new file mode 100644
index 0000000..bd01c3a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/raise.3p
@@ -0,0 +1,86 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "RAISE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" raise
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+raise \- send a signal to the executing process
+.SH SYNOPSIS
+.LP
+\fB#include <signal.h>
+.br
+.sp
+int raise(int\fP \fIsig\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIraise\fP() function shall send the signal \fIsig\fP to the
+executing thread or
+process. If a signal handler is called, the \fIraise\fP() function
+shall not return until after the signal handler does.
+.LP
+If the implementation supports the Threads option, the effect of the
+\fIraise\fP() function shall be equivalent to calling:
+.sp
+.RS
+.nf
+
+\fBpthread_kill(pthread_self(), sig);
+\fP
+.fi
+.RE
+.LP
+Otherwise, the effect of the \fIraise\fP() function shall be equivalent
+to calling:
+.sp
+.RS
+.nf
+
+\fBkill(getpid(), sig);
+\fP
+.fi
+.RE
+.SH RETURN VALUE
+.LP
+Upon successful completion, 0 shall be returned. Otherwise, a non-zero
+value shall be returned and
+\fIerrno\fP shall be set to indicate the error.
+.SH ERRORS
+.LP
+The \fIraise\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The value of the \fIsig\fP argument is an invalid signal number.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The term "thread" is an extension to the ISO\ C standard.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIkill\fP(), \fIsigaction\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<signal.h>\fP, \fI<sys/types.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/rand.3p b/man-pages-posix-2003/man3p/rand.3p
new file mode 100644
index 0000000..871c729
--- /dev/null
+++ b/man-pages-posix-2003/man3p/rand.3p
@@ -0,0 +1,186 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "RAND" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" rand
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+rand, rand_r, srand \- pseudo-random number generator
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+int rand(void);
+.br
+\fP
+.LP
+\fBint rand_r(unsigned *\fP\fIseed\fP\fB); \fP
+\fB
+.br
+void srand(unsigned\fP \fIseed\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIrand\fP() function shall compute a sequence of pseudo-random
+integers in the range [0, {RAND_MAX}] with a
+period of at least 2**32.
+.LP
+The
+\fIrand\fP() function need not be reentrant. A function that is not
+required to be reentrant is not required to be thread-safe.
+.LP
+The \fIrand_r\fP() function shall compute a sequence of pseudo-random
+integers in the range [0, {RAND_MAX}]. (The value of the
+{RAND_MAX} macro shall be at least 32767.)
+.LP
+If \fIrand_r\fP() is called with the same initial value for the object
+pointed to by \fIseed\fP and that object is not
+modified between successive returns and calls to \fIrand_r\fP(), the
+same sequence shall be generated.
+.LP
+The \fIsrand\fP() function uses the argument as a seed for a new sequence
+of pseudo-random numbers to be returned by subsequent
+calls to \fIrand\fP(). If \fIsrand\fP() is then called with the same
+seed value, the sequence of pseudo-random numbers shall be
+repeated. If \fIrand\fP() is called before any calls to \fIsrand\fP()
+are made, the same sequence shall be generated as when
+\fIsrand\fP() is first called with a seed value of 1.
+.LP
+The implementation shall behave as if no function defined in this
+volume of IEEE\ Std\ 1003.1-2001 calls \fIrand\fP()
+or \fIsrand\fP().
+.SH RETURN VALUE
+.LP
+The \fIrand\fP() function shall return the next pseudo-random number
+in the sequence.
+.LP
+The \fIrand_r\fP() function shall return a pseudo-random integer.
+.LP
+The \fIsrand\fP() function shall not return a value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Generating a Pseudo-Random Number Sequence
+.LP
+The following example demonstrates how to generate a sequence of pseudo-random
+numbers.
+.sp
+.RS
+.nf
+
+\fB#include <stdio.h>
+#include <stdlib.h>
+\&...
+ long count, i;
+ char *keystr;
+ int elementlen, len;
+ char c;
+\&...
+/* Initial random number generator. */
+ srand(1);
+.sp
+
+ /* Create keys using only lowercase characters */
+ len = 0;
+ for (i=0; i<count; i++) {
+ while (len < elementlen) {
+ c = (char) (rand() % 128);
+ if (islower(c))
+ keystr[len++] = c;
+ }
+.sp
+
+ keystr[len] = '\\0';
+ printf("%s Element%0*ld\\n", keystr, elementlen, i);
+ len = 0;
+ }
+\fP
+.fi
+.RE
+.SS Generating the Same Sequence on Different Machines
+.LP
+The following code defines a pair of functions that could be incorporated
+into applications wishing to ensure that the same
+sequence of numbers is generated across different machines.
+.sp
+.RS
+.nf
+
+\fBstatic unsigned long next = 1;
+int myrand(void) /* RAND_MAX assumed to be 32767. */
+{
+ next = next * 1103515245 + 12345;
+ return((unsigned)(next/65536) % 32768);
+}
+.sp
+
+void mysrand(unsigned seed)
+{
+ next = seed;
+}
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The \fIdrand48\fP() function provides a much more elaborate random
+number
+generator.
+.LP
+The limitations on the amount of state that can be carried between
+one function call and another mean the \fIrand_r\fP()
+function can never be implemented in a way which satisfies all of
+the requirements on a pseudo-random number generator. Therefore
+this function should be avoided whenever non-trivial requirements
+(including safety) have to be fulfilled.
+.SH RATIONALE
+.LP
+The ISO\ C standard \fIrand\fP() and \fIsrand\fP() functions allow
+per-process pseudo-random streams shared by all
+threads. Those two functions need not change, but there has to be
+mutual-exclusion that prevents interference between two threads
+concurrently accessing the random number generator.
+.LP
+With regard to \fIrand\fP(), there are two different behaviors that
+may be wanted in a multi-threaded program:
+.IP " 1." 4
+A single per-process sequence of pseudo-random numbers that is shared
+by all threads that call \fIrand\fP()
+.LP
+.IP " 2." 4
+A different sequence of pseudo-random numbers for each thread that
+calls \fIrand\fP()
+.LP
+.LP
+This is provided by the modified thread-safe function based on whether
+the seed value is global to the entire process or local
+to each thread.
+.LP
+This does not address the known deficiencies of the \fIrand\fP() function
+implementations, which have been approached by
+maintaining more state. In effect, this specifies new thread-safe
+forms of a deficient function.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIdrand48\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/rand_r.3p b/man-pages-posix-2003/man3p/rand_r.3p
new file mode 100644
index 0000000..4cebbbb
--- /dev/null
+++ b/man-pages-posix-2003/man3p/rand_r.3p
@@ -0,0 +1 @@
+.so man3p/rand.3p
diff --git a/man-pages-posix-2003/man3p/random.3p b/man-pages-posix-2003/man3p/random.3p
new file mode 100644
index 0000000..d0a0c63
--- /dev/null
+++ b/man-pages-posix-2003/man3p/random.3p
@@ -0,0 +1,142 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "INITSTATE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" initstate
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+initstate, random, setstate, srandom \- pseudo-random number functions
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+char *initstate(unsigned\fP \fIseed\fP\fB, char *\fP\fIstate\fP\fB,
+size_t\fP \fIsize\fP\fB);
+.br
+long random(void);
+.br
+char *setstate(const char *\fP\fIstate\fP\fB);
+.br
+void srandom(unsigned\fP \fIseed\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIrandom\fP() function shall use a non-linear additive feedback
+random-number generator employing a default state array
+size of 31 \fBlong\fP integers to return successive pseudo-random
+numbers in the range from 0 to 2**31-1.
+The period of this random-number generator is approximately 16 x (2**31-1).
+The size of the state array
+determines the period of the random-number generator. Increasing the
+state array size shall increase the period.
+.LP
+With 256 bytes of state information, the period of the random-number
+generator shall be greater than
+2**69.
+.LP
+Like \fIrand\fP(), \fIrandom\fP() shall produce by default a sequence
+of numbers that can
+be duplicated by calling \fIsrandom\fP() with 1 as the seed.
+.LP
+The \fIsrandom\fP() function shall initialize the current state array
+using the value of \fIseed\fP.
+.LP
+The \fIinitstate\fP() and \fIsetstate\fP() functions handle restarting
+and changing random-number generators. The
+\fIinitstate\fP() function allows a state array, pointed to by the
+\fIstate\fP argument, to be initialized for future use. The
+\fIsize\fP argument, which specifies the size in bytes of the state
+array, shall be used by \fIinitstate\fP() to decide what type
+of random-number generator to use; the larger the state array, the
+more random the numbers. Values for the amount of state
+information are 8, 32, 64, 128, and 256 bytes. Other values greater
+than 8 bytes are rounded down to the nearest one of these
+values. If \fIinitstate\fP() is called with 8<=\fIsize\fP<32, then
+\fIrandom\fP() shall use a simple linear congruential
+random number generator. The \fIseed\fP argument specifies a starting
+point for the random-number sequence and provides for
+restarting at the same point. The \fIinitstate\fP() function shall
+return a pointer to the previous state information array.
+.LP
+If \fIinitstate\fP() has not been called, then \fIrandom\fP() shall
+behave as though \fIinitstate\fP() had been called with
+\fIseed\fP=1 and \fIsize\fP=128.
+.LP
+Once a state has been initialized, \fIsetstate\fP() allows switching
+between state arrays. The array defined by the
+\fIstate\fP argument shall be used for further random-number generation
+until \fIinitstate\fP() is called or \fIsetstate\fP() is
+called again. The \fIsetstate\fP() function shall return a pointer
+to the previous state array.
+.SH RETURN VALUE
+.LP
+If \fIinitstate\fP() is called with \fIsize\fP less than 8, it shall
+return NULL.
+.LP
+The \fIrandom\fP() function shall return the generated pseudo-random
+number.
+.LP
+The \fIsrandom\fP() function shall not return a value.
+.LP
+Upon successful completion, \fIinitstate\fP() and \fIsetstate\fP()
+shall return a pointer to the previous state array;
+otherwise, a null pointer shall be returned.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+After initialization, a state array can be restarted at a different
+point in one of two ways:
+.IP " 1." 4
+The \fIinitstate\fP() function can be used, with the desired seed,
+state array, and size of the array.
+.LP
+.IP " 2." 4
+The \fIsetstate\fP() function, with the desired state, can be used,
+followed by \fIsrandom\fP() with the desired seed. The
+advantage of using both of these functions is that the size of the
+state array does not have to be saved once it is
+initialized.
+.LP
+.LP
+Although some implementations of \fIrandom\fP() have written messages
+to standard error, such implementations do not conform to
+IEEE\ Std\ 1003.1-2001.
+.LP
+Issue 5 restored the historical behavior of this function.
+.LP
+Threaded applications should use \fIerand48\fP(), \fInrand48\fP(),
+or \fIjrand48\fP() instead of
+\fIrandom\fP() when an independent random number sequence in multiple
+threads is required.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIdrand48\fP(), \fIrand\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/read.3p b/man-pages-posix-2003/man3p/read.3p
new file mode 100644
index 0000000..daaa302
--- /dev/null
+++ b/man-pages-posix-2003/man3p/read.3p
@@ -0,0 +1,482 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "READ" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" read
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pread, read \- read from a file
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+\fP
+.LP
+\fBssize_t pread(int\fP \fIfildes\fP\fB, void *\fP\fIbuf\fP\fB, size_t\fP
+\fInbyte\fP\fB,
+off_t\fP \fIoffset\fP\fB); \fP
+\fB
+.br
+ssize_t read(int\fP \fIfildes\fP\fB, void *\fP\fIbuf\fP\fB, size_t\fP
+\fInbyte\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIread\fP() function shall attempt to read \fInbyte\fP bytes
+from the file associated with the open file descriptor,
+\fIfildes\fP, into the buffer pointed to by \fIbuf\fP. The behavior
+of multiple concurrent reads on the same pipe, FIFO, or
+terminal device is unspecified.
+.LP
+Before any action described below is taken, and if \fInbyte\fP is
+zero, the \fIread\fP() function may detect and return errors
+as described below. In the absence of errors, or if error detection
+is not performed, the \fIread\fP() function shall return zero
+and have no other results.
+.LP
+On files that support seeking (for example, a regular file), the \fIread\fP()
+shall start at a position in the file given by
+the file offset associated with \fIfildes\fP. The file offset shall
+be incremented by the number of bytes actually read.
+.LP
+Files that do not support seeking-for example, terminals-always read
+from the current position. The value of a file offset
+associated with such a file is undefined.
+.LP
+No data transfer shall occur past the current end-of-file. If the
+starting position is at or after the end-of-file, 0 shall be
+returned. If the file refers to a device special file, the result
+of subsequent \fIread\fP() requests is
+implementation-defined.
+.LP
+If the value of \fInbyte\fP is greater than {SSIZE_MAX}, the result
+is implementation-defined.
+.LP
+When attempting to read from an empty pipe or FIFO:
+.IP " *" 3
+If no process has the pipe open for writing, \fIread\fP() shall return
+0 to indicate end-of-file.
+.LP
+.IP " *" 3
+If some process has the pipe open for writing and O_NONBLOCK is set,
+\fIread\fP() shall return -1 and set \fIerrno\fP to
+[EAGAIN].
+.LP
+.IP " *" 3
+If some process has the pipe open for writing and O_NONBLOCK is clear,
+\fIread\fP() shall block the calling thread until some
+data is written or the pipe is closed by all processes that had the
+pipe open for writing.
+.LP
+.LP
+When attempting to read a file (other than a pipe or FIFO) that supports
+non-blocking reads and has no data currently
+available:
+.IP " *" 3
+If O_NONBLOCK is set, \fIread\fP() shall return -1 and set \fIerrno\fP
+to [EAGAIN].
+.LP
+.IP " *" 3
+If O_NONBLOCK is clear, \fIread\fP() shall block the calling thread
+until some data becomes available.
+.LP
+.IP " *" 3
+The use of the O_NONBLOCK flag has no effect if there is some data
+available.
+.LP
+.LP
+The \fIread\fP() function reads data previously written to a file.
+If any portion of a regular file prior to the end-of-file
+has not been written, \fIread\fP() shall return bytes with value 0.
+For example, \fIlseek\fP() allows the file offset to be set beyond
+the end of existing data in the file. If data
+is later written at this point, subsequent reads in the gap between
+the previous end of data and the newly written data shall
+return bytes with value 0 until data is written into the gap.
+.LP
+Upon successful completion, where \fInbyte\fP is greater than 0, \fIread\fP()
+shall mark for update the \fIst_atime\fP field
+of the file, and shall return the number of bytes read. This number
+shall never be greater than \fInbyte\fP. The value returned
+may be less than \fInbyte\fP if the number of bytes left in the file
+is less than \fInbyte\fP, if the \fIread\fP() request was
+interrupted by a signal, or if the file is a pipe or FIFO or special
+file and has fewer than \fInbyte\fP bytes immediately
+available for reading. For example, a \fIread\fP() from a file associated
+with a terminal may return one typed line of data.
+.LP
+If a \fIread\fP() is interrupted by a signal before it reads any data,
+it shall return -1 with \fIerrno\fP set to [EINTR].
+.LP
+If a \fIread\fP() is interrupted by a signal after it has successfully
+read some data, it shall return the number of bytes
+read.
+.LP
+For regular files, no data transfer shall occur past the offset maximum
+established in the open file description associated with
+\fIfildes\fP.
+.LP
+If \fIfildes\fP refers to a socket, \fIread\fP() shall be equivalent
+to \fIrecv\fP()
+with no flags set.
+.LP
+If the O_DSYNC and O_RSYNC bits have been set, read I/O operations
+on the file descriptor shall complete as defined by synchronized
+I/O data integrity completion. If the O_SYNC and O_RSYNC bits have
+been set, read I/O operations on the file descriptor shall
+complete as defined by synchronized I/O file integrity completion.
+.LP
+If \fIfildes\fP refers to a shared memory object, the result of the
+\fIread\fP() function is unspecified.
+.LP
+If \fIfildes\fP refers to a typed memory object, the result of the
+\fIread\fP() function is unspecified.
+.LP
+A
+\fIread\fP() from a STREAMS file can read data in three different
+modes: \fIbyte-stream\fP mode, \fImessage-nondiscard\fP mode,
+and \fImessage-discard\fP mode. The default shall be byte-stream mode.
+This can be changed using the I_SRDOPT \fIioctl\fP() request, and
+can be tested with I_GRDOPT \fIioctl\fP(). In byte-stream mode, \fIread\fP()
+shall retrieve data from the STREAM until as many
+bytes as were requested are transferred, or until there is no more
+data to be retrieved. Byte-stream mode ignores message
+boundaries.
+.LP
+In STREAMS message-nondiscard mode, \fIread\fP() shall retrieve data
+until as many bytes as were requested are transferred, or
+until a message boundary is reached. If \fIread\fP() does not retrieve
+all the data in a message, the remaining data shall be left
+on the STREAM, and can be retrieved by the next \fIread\fP() call.
+Message-discard mode also retrieves data until as many bytes as
+were requested are transferred, or a message boundary is reached.
+However, unread data remaining in a message after the
+\fIread\fP() returns shall be discarded, and shall not be available
+for a subsequent \fIread\fP(), \fIgetmsg\fP(), or \fIgetpmsg\fP()
+call.
+.LP
+How \fIread\fP() handles zero-byte STREAMS messages is determined
+by the current read mode setting. In byte-stream mode,
+\fIread\fP() shall accept data until it has read \fInbyte\fP bytes,
+or until there is no more data to read, or until a zero-byte
+message block is encountered. The \fIread\fP() function shall then
+return the number of bytes read, and place the zero-byte
+message back on the STREAM to be retrieved by the next \fIread\fP(),
+\fIgetmsg\fP(), or \fIgetpmsg\fP(). In message-nondiscard mode or
+message-discard mode, a zero-byte message
+shall return 0 and the message shall be removed from the STREAM. When
+a zero-byte message is read as the first message on a STREAM,
+the message shall be removed from the STREAM and 0 shall be returned,
+regardless of the read mode.
+.LP
+A \fIread\fP() from a STREAMS file shall return the data in the message
+at the front of the STREAM head read queue, regardless
+of the priority band of the message.
+.LP
+By default, STREAMs are in control-normal mode, in which a \fIread\fP()
+from a STREAMS file can only process messages that
+contain a data part but do not contain a control part. The \fIread\fP()
+shall fail if a message containing a control part is
+encountered at the STREAM head. This default action can be changed
+by placing the STREAM in either control-data mode or
+control-discard mode with the I_SRDOPT \fIioctl\fP() command. In control-data
+mode,
+\fIread\fP() shall convert any control part to data and pass it to
+the application before passing any data part originally present
+in the same message. In control-discard mode, \fIread\fP() shall discard
+message control parts but return to the process any data
+part in the message.
+.LP
+In addition, \fIread\fP() shall fail if the STREAM head had processed
+an asynchronous error before the call. In this case, the
+value of \fIerrno\fP shall not reflect the result of \fIread\fP(),
+but reflect the prior error. If a hangup occurs on the STREAM
+being read, \fIread\fP() shall continue to operate normally until
+the STREAM head read queue is empty. Thereafter, it shall return
+0.
+.LP
+The \fIpread\fP() function shall be equivalent to \fIread\fP(), except
+that it shall read from a given position in the file
+without changing the file pointer. The first three arguments to \fIpread\fP()
+are the same as \fIread\fP() with the addition of a
+fourth argument \fIoffset\fP for the desired position inside the file.
+An attempt to perform a \fIpread\fP() on a file that is
+incapable of seeking shall result in an error.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIread\fP() and \fIpread\fP() shall
+return a non-negative integer indicating the number of bytes actually
+read. Otherwise, the
+functions shall return -1 and set \fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fIread\fP() and \fIpread\fP() functions shall fail
+if:
+.TP 7
+.B EAGAIN
+The O_NONBLOCK flag is set for the file descriptor and the process
+would be delayed.
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not a valid file descriptor open for
+reading.
+.TP 7
+.B EBADMSG
+The file is a STREAM file that is set to control-normal mode and the
+message waiting to be read includes a control part.
+.TP 7
+.B EINTR
+The read operation was terminated due to the receipt of a signal,
+and no data was transferred.
+.TP 7
+.B EINVAL
+The STREAM or multiplexer referenced by \fIfildes\fP is linked (directly
+or indirectly) downstream from a multiplexer.
+.TP 7
+.B EIO
+The process is a member of a background process attempting to read
+from its controlling terminal, the process is ignoring or
+blocking the SIGTTIN signal, or the process group is orphaned. This
+error may also be generated for implementation-defined
+reasons.
+.TP 7
+.B EISDIR
+The \fIfildes\fP argument refers to a directory and the implementation
+does not allow the directory to be read using \fIread\fP()
+or \fIpread\fP(). The \fIreaddir\fP() function should be used instead.
+.TP 7
+.B EOVERFLOW
+The file is a regular file, \fInbyte\fP is greater than 0, the starting
+position is before the end-of-file, and the starting
+position is greater than or equal to the offset maximum established
+in the open file description associated with
+\fIfildes\fP.
+.sp
+.LP
+The \fIread\fP() function shall fail if:
+.TP 7
+.B EAGAIN \fRor\fP EWOULDBLOCK
+.sp
+The file descriptor is for a socket, is marked O_NONBLOCK, and no
+data is waiting to be received.
+.TP 7
+.B ECONNRESET
+A read was attempted on a socket and the connection was forcibly closed
+by its peer.
+.TP 7
+.B ENOTCONN
+A read was attempted on a socket that is not connected.
+.TP 7
+.B ETIMEDOUT
+A read was attempted on a socket and a transmission timeout occurred.
+.sp
+.LP
+The \fIread\fP() and \fIpread\fP() functions may fail
+if:
+.TP 7
+.B EIO
+A physical I/O error has occurred.
+.TP 7
+.B ENOBUFS
+Insufficient resources were available in the system to perform the
+operation.
+.TP 7
+.B ENOMEM
+Insufficient memory was available to fulfill the request.
+.TP 7
+.B ENXIO
+A request was made of a nonexistent device, or the request was outside
+the capabilities of the device.
+.sp
+.LP
+The \fIpread\fP() function shall fail, and the file pointer shall
+remain unchanged, if:
+.TP 7
+.B EINVAL
+The \fIoffset\fP argument is invalid. The value is negative.
+.TP 7
+.B EOVERFLOW
+The file is a regular file and an attempt was made to read at or beyond
+the offset maximum associated with the file.
+.TP 7
+.B ENXIO
+A request was outside the capabilities of the device.
+.TP 7
+.B ESPIPE
+\fIfildes\fP is associated with a pipe or FIFO.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Reading Data into a Buffer
+.LP
+The following example reads data from the file associated with the
+file descriptor \fIfd\fP into the buffer pointed to by
+\fIbuf\fP.
+.sp
+.RS
+.nf
+
+\fB#include <sys/types.h>
+#include <unistd.h>
+\&...
+char buf[20];
+size_t nbytes;
+ssize_t bytes_read;
+int fd;
+\&...
+nbytes = sizeof(buf);
+bytes_read = read(fd, buf, nbytes);
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+This volume of IEEE\ Std\ 1003.1-2001 does not specify the value of
+the file offset after an error is returned; there
+are too many cases. For programming errors, such as [EBADF], the concept
+is meaningless since no file is involved. For errors that
+are detected immediately, such as [EAGAIN], clearly the pointer should
+not change. After an interrupt or hardware error, however,
+an updated value would be very useful and is the behavior of many
+implementations.
+.LP
+Note that a \fIread\fP() of zero bytes does not modify \fIst_atime\fP.
+A \fIread\fP() that requests more than zero bytes, but
+returns zero, shall modify \fIst_atime\fP.
+.LP
+Implementations are allowed, but not required, to perform error checking
+for \fIread\fP() requests of zero bytes.
+.SS Input and Output
+.LP
+The use of I/O with large byte counts has always presented problems.
+Ideas such as \fIlread\fP() and \fIlwrite\fP() (using and
+returning \fBlong\fPs) were considered at one time. The current solution
+is to use abstract types on the ISO\ C standard
+function to \fIread\fP() and \fIwrite\fP(). The abstract types can
+be declared so that
+existing functions work, but can also be declared so that larger types
+can be represented in future implementations. It is presumed
+that whatever constraints limit the maximum range of \fBsize_t\fP
+also limit portable I/O requests to the same range. This volume
+of IEEE\ Std\ 1003.1-2001 also limits the range further by requiring
+that the byte count be limited so that a signed return
+value remains meaningful. Since the return type is also a (signed)
+abstract type, the byte count can be defined by the
+implementation to be larger than an \fBint\fP can hold.
+.LP
+The standard developers considered adding atomicity requirements to
+a pipe or FIFO, but recognized that due to the nature of
+pipes and FIFOs there could be no guarantee of atomicity of reads
+of {PIPE_BUF} or any other size that would be an aid to
+applications portability.
+.LP
+This volume of IEEE\ Std\ 1003.1-2001 requires that no action be taken
+for \fIread\fP() or \fIwrite\fP() when \fInbyte\fP is zero. This is
+not intended to take precedence over detection of
+errors (such as invalid buffer pointers or file descriptors). This
+is consistent with the rest of this volume of
+IEEE\ Std\ 1003.1-2001, but the phrasing here could be misread to
+require detection of the zero case before any other
+errors. A value of zero is to be considered a correct value, for which
+the semantics are a no-op.
+.LP
+I/O is intended to be atomic to ordinary files and pipes and FIFOs.
+Atomic means that all the bytes from a single operation that
+started out together end up together, without interleaving from other
+I/O operations. It is a known attribute of terminals that
+this is not honored, and terminals are explicitly (and implicitly
+permanently) excepted, making the behavior unspecified. The
+behavior for other device types is also left unspecified, but the
+wording is intended to imply that future standards might choose
+to specify atomicity (or not).
+.LP
+There were recommendations to add format parameters to \fIread\fP()
+and \fIwrite\fP() in
+order to handle networked transfers among heterogeneous file system
+and base hardware types. Such a facility may be required for
+support by the OSI presentation of layer services. However, it was
+determined that this should correspond with similar C-language
+facilities, and that is beyond the scope of this volume of IEEE\ Std\ 1003.1-2001.
+The concept was suggested to the
+developers of the ISO\ C standard for their consideration as a possible
+area for future work.
+.LP
+In 4.3 BSD, a \fIread\fP() or \fIwrite\fP() that is interrupted by
+a signal before
+transferring any data does not by default return an [EINTR] error,
+but is restarted. In 4.2 BSD, 4.3 BSD, and the Eighth Edition,
+there is an additional function, \fIselect\fP(), whose purpose is
+to pause until specified
+activity (data to read, space to write, and so on) is detected on
+specified file descriptors. It is common in applications written
+for those systems for \fIselect\fP() to be used before \fIread\fP()
+in situations (such as
+keyboard input) where interruption of I/O due to a signal is desired.
+.LP
+The issue of which files or file types are interruptible is considered
+an implementation design issue. This is often affected
+primarily by hardware and reliability issues.
+.LP
+There are no references to actions taken following an "unrecoverable
+error". It is considered beyond the scope of this volume
+of IEEE\ Std\ 1003.1-2001 to describe what happens in the case of
+hardware errors.
+.LP
+Previous versions of IEEE\ Std\ 1003.1-2001 allowed two very different
+behaviors with regard to the handling of
+interrupts. In order to minimize the resulting confusion, it was decided
+that IEEE\ Std\ 1003.1-2001 should support only
+one of these behaviors. Historical practice on AT&T-derived systems
+was to have \fIread\fP() and \fIwrite\fP() return -1 and set \fIerrno\fP
+to [EINTR] when interrupted after some, but not all, of
+the data requested had been transferred. However, the U.S. Department
+of Commerce FIPS 151-1 and FIPS 151-2 require the historical
+BSD behavior, in which \fIread\fP() and \fIwrite\fP() return the number
+of bytes actually
+transferred before the interrupt. If -1 is returned when any data
+is transferred, it is difficult to recover from the error on a
+seekable device and impossible on a non-seekable device. Most new
+implementations support this behavior. The behavior required by
+IEEE\ Std\ 1003.1-2001 is to return the number of bytes transferred.
+.LP
+IEEE\ Std\ 1003.1-2001 does not specify when an implementation that
+buffers \fIread\fP()ss actually moves the data into
+the user-supplied buffer, so an implementation may chose to do this
+at the latest possible moment. Therefore, an interrupt arriving
+earlier may not cause \fIread\fP() to return a partial byte count,
+but rather to return -1 and set \fIerrno\fP to [EINTR].
+.LP
+Consideration was also given to combining the two previous options,
+and setting \fIerrno\fP to [EINTR] while returning a short
+count. However, not only is there no existing practice that implements
+this, it is also contradictory to the idea that when
+\fIerrno\fP is set, the function responsible shall return -1.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfcntl\fP(), \fIioctl\fP(), \fIlseek\fP(), \fIopen\fP(), \fIpipe\fP(),
+\fIreadv\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 11, General
+Terminal
+Interface, \fI<stropts.h>\fP, \fI<sys/uio.h>\fP, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/readdir.3p b/man-pages-posix-2003/man3p/readdir.3p
new file mode 100644
index 0000000..5d83fcf
--- /dev/null
+++ b/man-pages-posix-2003/man3p/readdir.3p
@@ -0,0 +1,286 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "READDIR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" readdir
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+readdir, readdir_r \- read a directory
+.SH SYNOPSIS
+.LP
+\fB#include <dirent.h>
+.br
+.sp
+struct dirent *readdir(DIR *\fP\fIdirp\fP\fB);
+.br
+\fP
+.LP
+\fBint readdir_r(DIR *restrict\fP \fIdirp\fP\fB, struct dirent *restrict\fP
+\fIentry\fP\fB,
+.br
+\ \ \ \ \ \ struct dirent **restrict\fP \fIresult\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The type \fBDIR\fP, which is defined in the \fI<dirent.h>\fP header,
+represents
+a \fIdirectory stream\fP, which is an ordered sequence of all the
+directory entries in a particular directory. Directory entries
+represent files; files may be removed from a directory or added to
+a directory asynchronously to the operation of
+\fIreaddir\fP().
+.LP
+The \fIreaddir\fP() function shall return a pointer to a structure
+representing the directory entry at the current position in
+the directory stream specified by the argument \fIdirp\fP, and position
+the directory stream at the next entry. It shall return a
+null pointer upon reaching the end of the directory stream. The structure
+\fBdirent\fP defined in the \fI<dirent.h>\fP header describes a directory
+entry.
+.LP
+The \fIreaddir\fP() function shall not return directory entries containing
+empty names. If entries for dot or dot-dot exist,
+one entry shall be returned for dot and one entry shall be returned
+for dot-dot; otherwise, they shall not be returned.
+.LP
+The pointer returned by \fIreaddir\fP() points to data which may be
+overwritten by another call to \fIreaddir\fP() on the same
+directory stream. This data is not overwritten by another call to
+\fIreaddir\fP() on a different directory stream.
+.LP
+If a file is removed from or added to the directory after the most
+recent call to \fIopendir\fP() or \fIrewinddir\fP(), whether a
+subsequent call to \fIreaddir\fP() returns an entry for that file
+is unspecified.
+.LP
+The \fIreaddir\fP() function may buffer several directory entries
+per actual read operation; \fIreaddir\fP() shall mark for
+update the \fIst_atime\fP field of the directory each time the directory
+is actually read.
+.LP
+After a call to \fIfork\fP(), either the parent or child (but not
+both) may continue
+processing the directory stream using \fIreaddir\fP(), \fIrewinddir\fP(),
+\ or \fIseekdir\fP(). If both the
+parent and child processes use these functions, the result is undefined.
+.LP
+If the entry names a symbolic link, the value of the \fId_ino\fP member
+is unspecified.
+.LP
+The \fIreaddir\fP() function need not be reentrant. A function that
+is not required to be reentrant is not required to be
+thread-safe.
+.LP
+The \fIreaddir_r\fP() function shall initialize the \fBdirent\fP structure
+referenced by \fIentry\fP to represent the directory
+entry at the current position in the directory stream referred to
+by \fIdirp\fP, store a pointer to this structure at the location
+referenced by \fIresult\fP, and position the directory stream at the
+next entry.
+.LP
+The storage pointed to by \fIentry\fP shall be large enough for a
+\fBdirent\fP with an array of \fBchar\fP \fId_name\fP
+members containing at least {NAME_MAX}+1 elements.
+.LP
+Upon successful return, the pointer returned at *\fIresult\fP shall
+have the same value as the argument \fIentry\fP. Upon
+reaching the end of the directory stream, this pointer shall have
+the value NULL.
+.LP
+The \fIreaddir_r\fP() function shall not return directory entries
+containing empty names.
+.LP
+If a file is removed from or added to the directory after the most
+recent call to \fIopendir\fP() or \fIrewinddir\fP(), whether a
+subsequent call to \fIreaddir_r\fP() returns an entry for that file
+is unspecified.
+.LP
+The \fIreaddir_r\fP() function may buffer several directory entries
+per actual read operation; the \fIreaddir_r\fP() function
+shall mark for update the \fIst_atime\fP field of the directory each
+time the directory is actually read.
+.LP
+Applications wishing to check for error situations should set \fIerrno\fP
+to 0 before calling \fIreaddir\fP(). If \fIerrno\fP
+is set to non-zero on return, an error occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIreaddir\fP() shall return a pointer
+to an object of type \fBstruct dirent\fP. When an error is
+encountered, a null pointer shall be returned and \fIerrno\fP shall
+be set to indicate the error. When the end of the directory is
+encountered, a null pointer shall be returned and \fIerrno\fP is not
+changed.
+.LP
+If successful, the \fIreaddir_r\fP() function shall return zero; otherwise,
+an error number shall be returned to indicate the
+error.
+.SH ERRORS
+.LP
+The \fIreaddir\fP() function shall fail if:
+.TP 7
+.B EOVERFLOW
+One of the values in the structure to be returned cannot be represented
+correctly.
+.sp
+.LP
+The \fIreaddir\fP() function may fail if:
+.TP 7
+.B EBADF
+The \fIdirp\fP argument does not refer to an open directory stream.
+.TP 7
+.B ENOENT
+The current position of the directory stream is invalid.
+.sp
+.LP
+The \fIreaddir_r\fP() function may fail if:
+.TP 7
+.B EBADF
+The \fIdirp\fP argument does not refer to an open directory stream.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+The following sample program searches the current directory for each
+of the arguments supplied on the command line.
+.sp
+.RS
+.nf
+
+\fB#include <dirent.h>
+#include <errno.h>
+#include <stdio.h>
+#include <string.h>
+.sp
+
+static void lookup(const char *arg)
+{
+ DIR *dirp;
+ struct dirent *dp;
+.sp
+
+ if ((dirp = opendir(".")) == NULL) {
+ perror("couldn't open '.'");
+ return;
+ }
+.sp
+
+ do {
+ errno = 0;
+ if ((dp = readdir(dirp)) != NULL) {
+ if (strcmp(dp->d_name, arg) != 0)
+ continue;
+.sp
+
+ (void) printf("found %s\\n", arg);
+ (void) closedir(dirp);
+ return;
+.sp
+
+ }
+ } while (dp != NULL);
+.sp
+
+ if (errno != 0)
+ perror("error reading directory");
+ else
+ (void) printf("failed to find %s\\n", arg);
+ (void) closedir(dirp);
+ return;
+}
+.sp
+
+int main(int argc, char *argv[])
+{
+ int i;
+ for (i = 1; i < argc; i++)
+ lookup(arvg[i]);
+ return (0);
+}
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The \fIreaddir\fP() function should be used in conjunction with \fIopendir\fP(),
+\fIclosedir\fP(), and \fIrewinddir\fP() to
+examine the contents of the directory.
+.LP
+The \fIreaddir_r\fP() function is thread-safe and shall return values
+in a user-supplied buffer instead of possibly using a
+static data area that may be overwritten by each call.
+.SH RATIONALE
+.LP
+The returned value of \fIreaddir\fP() merely \fIrepresents\fP a directory
+entry. No equivalence should be inferred.
+.LP
+Historical implementations of \fIreaddir\fP() obtain multiple directory
+entries on a single read operation, which permits
+subsequent \fIreaddir\fP() operations to operate from the buffered
+information. Any wording that required each successful
+\fIreaddir\fP() operation to mark the directory \fIst_atime\fP field
+for update would disallow such historical
+performance-oriented implementations.
+.LP
+Since \fIreaddir\fP() returns NULL when it detects an error and when
+the end of the directory is encountered, an application
+that needs to tell the difference must set \fIerrno\fP to zero before
+the call and check it if NULL is returned. Since the
+function must not change \fIerrno\fP in the second case and must set
+it to a non-zero value in the first case, a zero \fIerrno\fP
+after a call returning NULL indicates end-of-directory; otherwise,
+an error.
+.LP
+Routines to deal with this problem more directly were proposed:
+.sp
+.RS
+.nf
+
+\fBint derror (\fP\fIdirp\fP\fB)
+DIR *\fP\fIdirp\fP\fB;
+.sp
+
+void clearderr (\fP\fIdirp\fP\fB)
+DIR *\fP\fIdirp\fP\fB;
+\fP
+.fi
+.RE
+.LP
+The first would indicate whether an error had occurred, and the second
+would clear the error indication. The simpler method
+involving \fIerrno\fP was adopted instead by requiring that \fIreaddir\fP()
+not change \fIerrno\fP when end-of-directory is
+encountered.
+.LP
+An error or signal indicating that a directory has changed while open
+was considered but rejected.
+.LP
+The thread-safe version of the directory reading function returns
+values in a user-supplied buffer instead of possibly using a
+static data area that may be overwritten by each call. Either the
+{NAME_MAX} compile-time constant or the corresponding \fIpathconf\fP()
+option can be used to determine the maximum sizes of returned pathnames.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIclosedir\fP(), \fIlstat\fP(), \fIopendir\fP(), \fIrewinddir\fP(),
+\fIsymlink\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<dirent.h>\fP,
+\fI<sys/types.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/readdir_r.3p b/man-pages-posix-2003/man3p/readdir_r.3p
new file mode 100644
index 0000000..35080df
--- /dev/null
+++ b/man-pages-posix-2003/man3p/readdir_r.3p
@@ -0,0 +1 @@
+.so man3p/readdir.3p
diff --git a/man-pages-posix-2003/man3p/readlink.3p b/man-pages-posix-2003/man3p/readlink.3p
new file mode 100644
index 0000000..93a9483
--- /dev/null
+++ b/man-pages-posix-2003/man3p/readlink.3p
@@ -0,0 +1,143 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "READLINK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" readlink
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+readlink \- read the contents of a symbolic link
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+ssize_t readlink(const char *restrict\fP \fIpath\fP\fB, char *restrict\fP
+\fIbuf\fP\fB,
+.br
+\ \ \ \ \ \ size_t\fP \fIbufsize\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIreadlink\fP() function shall place the contents of the symbolic
+link referred to by \fIpath\fP in the buffer \fIbuf\fP
+which has size \fIbufsize\fP. If the number of bytes in the symbolic
+link is less than \fIbufsize\fP, the contents of the
+remainder of \fIbuf\fP are unspecified. If the \fIbuf\fP argument
+is not large enough to contain the link content, the first
+\fIbufsize\fP bytes shall be placed in \fIbuf\fP.
+.LP
+If the value of \fIbufsize\fP is greater than {SSIZE_MAX}, the result
+is implementation-defined.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIreadlink\fP() shall return the count
+of bytes placed in the buffer. Otherwise, it shall return a
+value of -1, leave the buffer unchanged, and set \fIerrno\fP to indicate
+the error.
+.SH ERRORS
+.LP
+The \fIreadlink\fP() function shall fail if:
+.TP 7
+.B EACCES
+Search permission is denied for a component of the path prefix of
+\fIpath\fP.
+.TP 7
+.B EINVAL
+The \fIpath\fP argument names a file that is not a symbolic link.
+.TP 7
+.B EIO
+An I/O error occurred while reading from the file system.
+.TP 7
+.B ELOOP
+A loop exists in symbolic links encountered during resolution of the
+\fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+The length of the \fIpath\fP argument exceeds {PATH_MAX} or a pathname
+component is longer than {NAME_MAX}.
+.TP 7
+.B ENOENT
+A component of \fIpath\fP does not name an existing file or \fIpath\fP
+is an empty string.
+.TP 7
+.B ENOTDIR
+A component of the path prefix is not a directory.
+.sp
+.LP
+The \fIreadlink\fP() function may fail if:
+.TP 7
+.B EACCES
+Read permission is denied for the directory.
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the \fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+As a result of encountering a symbolic link in resolution of the \fIpath\fP
+argument, the length of the substituted pathname
+string exceeded {PATH_MAX}.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Reading the Name of a Symbolic Link
+.LP
+The following example shows how to read the name of a symbolic link
+named \fB/modules/pass1\fP.
+.sp
+.RS
+.nf
+
+\fB#include <unistd.h>
+.sp
+
+char buf[1024];
+ssizet_t len;
+\&...
+if ((len = readlink("/modules/pass1", buf, sizeof(buf)-1)) != -1)
+ buf[len] = '\\0';
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+Conforming applications should not assume that the returned contents
+of the symbolic link are null-terminated.
+.SH RATIONALE
+.LP
+Since IEEE\ Std\ 1003.1-2001 does not require any association of file
+times with symbolic links, there is no requirement
+that file times be updated by \fIreadlink\fP(). The type associated
+with \fIbufsiz\fP is a \fBsize_t\fP in order to be
+consistent with both the ISO\ C standard and the definition of \fIread\fP().
+The behavior
+specified for \fIreadlink\fP() when \fIbufsiz\fP is zero represents
+historical practice. For this case, the standard developers
+considered a change whereby \fIreadlink\fP() would return the number
+of non-null bytes contained in the symbolic link with the
+buffer \fIbuf\fP remaining unchanged; however, since the \fBstat\fP
+structure member \fIst_size\fP value can be used to
+determine the size of buffer necessary to contain the contents of
+the symbolic link as returned by \fIreadlink\fP(), this proposal
+was rejected, and the historical practice retained.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIlstat\fP(), \fIstat\fP(), \fIsymlink\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/readv.3p b/man-pages-posix-2003/man3p/readv.3p
new file mode 100644
index 0000000..86be5b3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/readv.3p
@@ -0,0 +1,120 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "READV" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" readv
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+readv \- read a vector
+.SH SYNOPSIS
+.LP
+\fB#include <sys/uio.h>
+.br
+.sp
+ssize_t readv(int\fP \fIfildes\fP\fB, const struct iovec *\fP\fIiov\fP\fB,
+int\fP \fIiovcnt\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIreadv\fP() function shall be equivalent to \fIread\fP(), except
+as described
+below. The \fIreadv\fP() function shall place the input data into
+the \fIiovcnt\fP buffers specified by the members of the
+\fIiov\fP array: \fIiov\fP[0], \fIiov\fP[1], ..., \fIiov\fP[ \fIiovcnt\fP-1].
+The \fIiovcnt\fP argument is valid if greater
+than 0 and less than or equal to {IOV_MAX}.
+.LP
+Each \fIiovec\fP entry specifies the base address and length of an
+area in memory where data should be placed. The
+\fIreadv\fP() function shall always fill an area completely before
+proceeding to the next.
+.LP
+Upon successful completion, \fIreadv\fP() shall mark for update the
+\fIst_atime\fP field of the file.
+.SH RETURN VALUE
+.LP
+Refer to \fIread\fP().
+.SH ERRORS
+.LP
+Refer to \fIread\fP().
+.LP
+In addition, the \fIreadv\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The sum of the \fIiov_len\fP values in the \fIiov\fP array overflowed
+an \fBssize_t\fP.
+.sp
+.LP
+The \fIreadv\fP() function may fail if:
+.TP 7
+.B EINVAL
+The \fIiovcnt\fP argument was less than or equal to 0, or greater
+than {IOV_MAX}.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Reading Data into an Array
+.LP
+The following example reads data from the file associated with the
+file descriptor \fIfd\fP into the buffers specified by
+members of the \fIiov\fP array.
+.sp
+.RS
+.nf
+
+\fB#include <sys/types.h>
+#include <sys/uio.h>
+#include <unistd.h>
+\&...
+ssize_t bytes_read;
+int fd;
+char buf0[20];
+char buf1[30];
+char buf2[40];
+int iovcnt;
+struct iovec iov[3];
+.sp
+
+iov[0].iov_base = buf0;
+iov[0].iov_len = sizeof(buf0);
+iov[1].iov_base = buf1;
+iov[1].iov_len = sizeof(buf1);
+iov[2].iov_base = buf2;
+iov[2].iov_len = sizeof(buf2);
+\&...
+iovcnt = sizeof(iov) / sizeof(struct iovec);
+.sp
+
+bytes_read = readv(fd, iov, iovcnt);
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+Refer to \fIread\fP().
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIread\fP(), \fIwritev\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<sys/uio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/realloc.3p b/man-pages-posix-2003/man3p/realloc.3p
new file mode 100644
index 0000000..a2318cb
--- /dev/null
+++ b/man-pages-posix-2003/man3p/realloc.3p
@@ -0,0 +1,93 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "REALLOC" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" realloc
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+realloc \- memory reallocator
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+void *realloc(void *\fP\fIptr\fP\fB, size_t\fP \fIsize\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIrealloc\fP() function shall change the size of the memory object
+pointed to by \fIptr\fP to the size specified by
+\fIsize\fP. The contents of the object shall remain unchanged up to
+the lesser of the new and old sizes. If the new size of the
+memory object would require movement of the object, the space for
+the previous instantiation of the object is freed. If the new
+size is larger, the contents of the newly allocated portion of the
+object are unspecified. If \fIsize\fP is 0 and \fIptr\fP is
+not a null pointer, the object pointed to is freed. If the space cannot
+be allocated, the object shall remain unchanged.
+.LP
+If \fIptr\fP is a null pointer, \fIrealloc\fP() shall be equivalent
+to \fImalloc\fP()
+for the specified size.
+.LP
+If \fIptr\fP does not match a pointer returned earlier by \fIcalloc\fP(),
+\fImalloc\fP(), or \fIrealloc\fP() or if the space has previously
+been deallocated by a call to \fIfree\fP() or \fIrealloc\fP(), the
+behavior is undefined.
+.LP
+The order and contiguity of storage allocated by successive calls
+to \fIrealloc\fP() is unspecified. The pointer returned if
+the allocation succeeds shall be suitably aligned so that it may be
+assigned to a pointer to any type of object and then used to
+access such an object in the space allocated (until the space is explicitly
+freed or reallocated). Each such allocation shall yield
+a pointer to an object disjoint from any other object. The pointer
+returned shall point to the start (lowest byte address) of the
+allocated space. If the space cannot be allocated, a null pointer
+shall be returned.
+.SH RETURN VALUE
+.LP
+Upon successful completion with a size not equal to 0, \fIrealloc\fP()
+shall return a pointer to the (possibly moved) allocated
+space. If \fIsize\fP is 0, either a null pointer or a unique pointer
+that can be successfully passed to \fIfree\fP() shall be returned.
+If there is not enough available memory, \fIrealloc\fP() shall
+return a null pointer and set \fIerrno\fP to [ENOMEM].
+.SH ERRORS
+.LP
+The \fIrealloc\fP() function shall fail if:
+.TP 7
+.B ENOMEM
+Insufficient memory is available.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcalloc\fP(), \fIfree\fP(), \fImalloc\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/realpath.3p b/man-pages-posix-2003/man3p/realpath.3p
new file mode 100644
index 0000000..5c9e043
--- /dev/null
+++ b/man-pages-posix-2003/man3p/realpath.3p
@@ -0,0 +1,131 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "REALPATH" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" realpath
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+realpath \- resolve a pathname
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+char *realpath(const char *restrict\fP \fIfile_name\fP\fB,
+.br
+\ \ \ \ \ \ char *restrict\fP \fIresolved_name\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIrealpath\fP() function shall derive, from the pathname pointed
+to by \fIfile_name\fP, an absolute pathname that names
+the same file, whose resolution does not involve \fB'.'\fP, \fB'..'\fP,
+or symbolic links. The generated pathname shall be
+stored as a null-terminated string, up to a maximum of {PATH_MAX}
+bytes, in the buffer pointed to by \fIresolved_name\fP.
+.LP
+If \fIresolved_name\fP is a null pointer, the behavior of \fIrealpath\fP()
+is implementation-defined.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIrealpath\fP() shall return a pointer
+to the resolved name. Otherwise, \fIrealpath\fP() shall
+return a null pointer and set \fIerrno\fP to indicate the error, and
+the contents of the buffer pointed to by \fIresolved_name\fP
+are undefined.
+.SH ERRORS
+.LP
+The \fIrealpath\fP() function shall fail if:
+.TP 7
+.B EACCES
+Read or search permission was denied for a component of \fIfile_name\fP.
+.TP 7
+.B EINVAL
+The \fIfile_name\fP argument is a null pointer.
+.TP 7
+.B EIO
+An error occurred while reading from the file system.
+.TP 7
+.B ELOOP
+A loop exists in symbolic links encountered during resolution of the
+\fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+The length of the \fIfile_name\fP argument exceeds {PATH_MAX} or a
+pathname component is longer than {NAME_MAX}.
+.TP 7
+.B ENOENT
+A component of \fIfile_name\fP does not name an existing file or \fIfile_name\fP
+points to an empty string.
+.TP 7
+.B ENOTDIR
+A component of the path prefix is not a directory.
+.sp
+.LP
+The \fIrealpath\fP() function may fail if:
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the \fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+Pathname resolution of a symbolic link produced an intermediate result
+whose length exceeds {PATH_MAX}.
+.TP 7
+.B ENOMEM
+Insufficient storage space is available.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Generating an Absolute Pathname
+.LP
+The following example generates an absolute pathname for the file
+identified by the \fIsymlinkpath\fP argument. The generated
+pathname is stored in the \fIactualpath\fP array.
+.sp
+.RS
+.nf
+
+\fB#include <stdlib.h>
+\&...
+char *symlinkpath = "/tmp/symlink/file";
+char actualpath [PATH_MAX+1];
+char *ptr;
+.sp
+
+ptr = realpath(symlinkpath, actualpath);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+Since the maximum pathname length is arbitrary unless {PATH_MAX} is
+defined, an application generally cannot supply a
+\fIresolved_name\fP buffer with size {{PATH_MAX}+1}.
+.SH FUTURE DIRECTIONS
+.LP
+In the future, passing a null pointer to \fIrealpath\fP() for the
+\fIresolved_name\fP argument may be defined to have
+\fIrealpath\fP() allocate space for the generated pathname.
+.SH SEE ALSO
+.LP
+\fIgetcwd\fP(), \fIsysconf\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/recv.3p b/man-pages-posix-2003/man3p/recv.3p
new file mode 100644
index 0000000..1682e0c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/recv.3p
@@ -0,0 +1,180 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "RECV" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" recv
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+recv \- receive a message from a connected socket
+.SH SYNOPSIS
+.LP
+\fB#include <sys/socket.h>
+.br
+.sp
+ssize_t recv(int\fP \fIsocket\fP\fB, void *\fP\fIbuffer\fP\fB, size_t\fP
+\fIlength\fP\fB, int\fP
+\fIflags\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIrecv\fP() function shall receive a message from a connection-mode
+or connectionless-mode socket. It is normally used
+with connected sockets because it does not permit the application
+to retrieve the source address of received data.
+.LP
+The \fIrecv\fP() function takes the following arguments:
+.TP 7
+\fIsocket\fP
+Specifies the socket file descriptor.
+.TP 7
+\fIbuffer\fP
+Points to a buffer where the message should be stored.
+.TP 7
+\fIlength\fP
+Specifies the length in bytes of the buffer pointed to by the \fIbuffer\fP
+argument.
+.TP 7
+\fIflags\fP
+Specifies the type of message reception. Values of this argument are
+formed by logically OR'ing zero or more of the following
+values:
+.TP 7
+MSG_PEEK
+.RS
+Peeks at an incoming message. The data is treated as unread and the
+next \fIrecv\fP() or similar function shall still return
+this data.
+.RE
+.TP 7
+MSG_OOB
+.RS
+Requests out-of-band data. The significance and semantics of out-of-band
+data are protocol-specific.
+.RE
+.TP 7
+MSG_WAITALL
+.RS
+On SOCK_STREAM sockets this requests that the function block until
+the full amount of data can be returned. The function may
+return the smaller amount of data if the socket is a message-based
+socket, if a signal is caught, if the connection is terminated,
+if MSG_PEEK was specified, or if an error is pending for the socket.
+.RE
+.sp
+.sp
+.LP
+The \fIrecv\fP() function shall return the length of the message written
+to the buffer pointed to by the \fIbuffer\fP
+argument. For message-based sockets, such as SOCK_DGRAM and SOCK_SEQPACKET,
+the entire message shall be read in a single operation.
+If a message is too long to fit in the supplied buffer, and MSG_PEEK
+is not set in the \fIflags\fP argument, the excess bytes
+shall be discarded. For stream-based sockets, such as SOCK_STREAM,
+message boundaries shall be ignored. In this case, data shall be
+returned to the user as soon as it becomes available, and no data
+shall be discarded.
+.LP
+If the MSG_WAITALL flag is not set, data shall be returned only up
+to the end of the first message.
+.LP
+If no messages are available at the socket and O_NONBLOCK is not set
+on the socket's file descriptor, \fIrecv\fP() shall block
+until a message arrives. If no messages are available at the socket
+and O_NONBLOCK is set on the socket's file descriptor,
+\fIrecv\fP() shall fail and set \fIerrno\fP to [EAGAIN] or [EWOULDBLOCK].
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIrecv\fP() shall return the length of
+the message in bytes. If no messages are available to be
+received and the peer has performed an orderly shutdown, \fIrecv\fP()
+shall return 0. Otherwise, -1 shall be returned and
+\fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fIrecv\fP() function shall fail if:
+.TP 7
+.B EAGAIN \fRor\fP EWOULDBLOCK
+.sp
+The socket's file descriptor is marked O_NONBLOCK and no data is waiting
+to be received; or MSG_OOB is set and no out-of-band data
+is available and either the socket's file descriptor is marked O_NONBLOCK
+or the socket does not support blocking to await
+out-of-band data.
+.TP 7
+.B EBADF
+The \fIsocket\fP argument is not a valid file descriptor.
+.TP 7
+.B ECONNRESET
+A connection was forcibly closed by a peer.
+.TP 7
+.B EINTR
+The \fIrecv\fP() function was interrupted by a signal that was caught,
+before any data was available.
+.TP 7
+.B EINVAL
+The MSG_OOB flag is set and no out-of-band data is available.
+.TP 7
+.B ENOTCONN
+A receive is attempted on a connection-mode socket that is not connected.
+.TP 7
+.B ENOTSOCK
+The \fIsocket\fP argument does not refer to a socket.
+.TP 7
+.B EOPNOTSUPP
+The specified flags are not supported for this socket type or protocol.
+.TP 7
+.B ETIMEDOUT
+The connection timed out during connection establishment, or due to
+a transmission timeout on active connection.
+.sp
+.LP
+The \fIrecv\fP() function may fail if:
+.TP 7
+.B EIO
+An I/O error occurred while reading from or writing to the file system.
+.TP 7
+.B ENOBUFS
+Insufficient resources were available in the system to perform the
+operation.
+.TP 7
+.B ENOMEM
+Insufficient memory was available to fulfill the request.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIrecv\fP() function is equivalent to \fIrecvfrom\fP() with a
+zero
+\fIaddress_len\fP argument, and to \fIread\fP() if no flags are used.
+.LP
+The \fIselect\fP() and \fIpoll\fP() functions can
+be used to determine when data is available to be received.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpoll\fP(), \fIread\fP(), \fIrecvmsg\fP(), \fIrecvfrom\fP(),
+\fIselect\fP(), \fIsend\fP(), \fIsendmsg\fP(), \fIsendto\fP(),
+\fIshutdown\fP(), \fIsocket\fP(), \fIwrite\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<sys/socket.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/recvfrom.3p b/man-pages-posix-2003/man3p/recvfrom.3p
new file mode 100644
index 0000000..700dc1c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/recvfrom.3p
@@ -0,0 +1,204 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "RECVFROM" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" recvfrom
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+recvfrom \- receive a message from a socket
+.SH SYNOPSIS
+.LP
+\fB#include <sys/socket.h>
+.br
+.sp
+ssize_t recvfrom(int\fP \fIsocket\fP\fB, void *restrict\fP \fIbuffer\fP\fB,
+size_t\fP \fIlength\fP\fB,
+.br
+\ \ \ \ \ \ int\fP \fIflags\fP\fB, struct sockaddr *restrict\fP \fIaddress\fP\fB,
+.br
+\ \ \ \ \ \ socklen_t *restrict\fP \fIaddress_len\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIrecvfrom\fP() function shall receive a message from a connection-mode
+or connectionless-mode socket. It is normally used
+with connectionless-mode sockets because it permits the application
+to retrieve the source address of received data.
+.LP
+The \fIrecvfrom\fP() function takes the following arguments:
+.TP 7
+\fIsocket\fP
+Specifies the socket file descriptor.
+.TP 7
+\fIbuffer\fP
+Points to the buffer where the message should be stored.
+.TP 7
+\fIlength\fP
+Specifies the length in bytes of the buffer pointed to by the \fIbuffer\fP
+argument.
+.TP 7
+\fIflags\fP
+Specifies the type of message reception. Values of this argument are
+formed by logically OR'ing zero or more of the following
+values:
+.TP 7
+MSG_PEEK
+.RS
+Peeks at an incoming message. The data is treated as unread and the
+next \fIrecvfrom\fP() or similar function shall still
+return this data.
+.RE
+.TP 7
+MSG_OOB
+.RS
+Requests out-of-band data. The significance and semantics of out-of-band
+data are protocol-specific.
+.RE
+.TP 7
+MSG_WAITALL
+.RS
+On SOCK_STREAM sockets this requests that the function block until
+the full amount of data can be returned. The function may
+return the smaller amount of data if the socket is a message-based
+socket, if a signal is caught, if the connection is terminated,
+if MSG_PEEK was specified, or if an error is pending for the socket.
+.RE
+.sp
+.TP 7
+\fIaddress\fP
+A null pointer, or points to a \fBsockaddr\fP structure in which the
+sending address is to be stored. The length and format of
+the address depend on the address family of the socket.
+.TP 7
+\fIaddress_len\fP
+Specifies the length of the \fBsockaddr\fP structure pointed to by
+the \fIaddress\fP argument.
+.sp
+.LP
+The \fIrecvfrom\fP() function shall return the length of the message
+written to the buffer pointed to by the \fIbuffer\fP
+argument. For message-based sockets, such as SOCK_RAW, SOCK_DGRAM,
+and SOCK_SEQPACKET, the entire message shall be read in a single operation.
+If a message is too long to fit
+in the supplied buffer, and MSG_PEEK is not set in the \fIflags\fP
+argument, the excess bytes shall be discarded. For stream-based
+sockets, such as SOCK_STREAM, message boundaries shall be ignored.
+In this case, data shall be returned to the user as soon as it
+becomes available, and no data shall be discarded.
+.LP
+If the MSG_WAITALL flag is not set, data shall be returned only up
+to the end of the first message.
+.LP
+Not all protocols provide the source address for messages. If the
+\fIaddress\fP argument is not a null pointer and the protocol
+provides the source address of messages, the source address of the
+received message shall be stored in the \fBsockaddr\fP
+structure pointed to by the \fIaddress\fP argument, and the length
+of this address shall be stored in the object pointed to by the
+\fIaddress_len\fP argument.
+.LP
+If the actual length of the address is greater than the length of
+the supplied \fBsockaddr\fP structure, the stored address
+shall be truncated.
+.LP
+If the \fIaddress\fP argument is not a null pointer and the protocol
+does not provide the source address of messages, the value
+stored in the object pointed to by \fIaddress\fP is unspecified.
+.LP
+If no messages are available at the socket and O_NONBLOCK is not set
+on the socket's file descriptor, \fIrecvfrom\fP() shall
+block until a message arrives. If no messages are available at the
+socket and O_NONBLOCK is set on the socket's file descriptor,
+\fIrecvfrom\fP() shall fail and set \fIerrno\fP to [EAGAIN] or [EWOULDBLOCK].
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIrecvfrom\fP() shall return the length
+of the message in bytes. If no messages are available to
+be received and the peer has performed an orderly shutdown, \fIrecvfrom\fP()
+shall return 0. Otherwise, the function shall return
+-1 and set \fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fIrecvfrom\fP() function shall fail if:
+.TP 7
+.B EAGAIN \fRor\fP EWOULDBLOCK
+.sp
+The socket's file descriptor is marked O_NONBLOCK and no data is waiting
+to be received; or MSG_OOB is set and no out-of-band data
+is available and either the socket's file descriptor is marked O_NONBLOCK
+or the socket does not support blocking to await
+out-of-band data.
+.TP 7
+.B EBADF
+The \fIsocket\fP argument is not a valid file descriptor.
+.TP 7
+.B ECONNRESET
+A connection was forcibly closed by a peer.
+.TP 7
+.B EINTR
+A signal interrupted \fIrecvfrom\fP() before any data was available.
+.TP 7
+.B EINVAL
+The MSG_OOB flag is set and no out-of-band data is available.
+.TP 7
+.B ENOTCONN
+A receive is attempted on a connection-mode socket that is not connected.
+.TP 7
+.B ENOTSOCK
+The \fIsocket\fP argument does not refer to a socket.
+.TP 7
+.B EOPNOTSUPP
+The specified flags are not supported for this socket type.
+.TP 7
+.B ETIMEDOUT
+The connection timed out during connection establishment, or due to
+a transmission timeout on active connection.
+.sp
+.LP
+The \fIrecvfrom\fP() function may fail if:
+.TP 7
+.B EIO
+An I/O error occurred while reading from or writing to the file system.
+.TP 7
+.B ENOBUFS
+Insufficient resources were available in the system to perform the
+operation.
+.TP 7
+.B ENOMEM
+Insufficient memory was available to fulfill the request.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIselect\fP() and \fIpoll\fP() functions can
+be used to determine when data is available to be received.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpoll\fP(), \fIread\fP(), \fIrecv\fP(), \fIrecvmsg\fP(), \fIselect\fP(),
+\fIsend\fP(), \fIsendmsg\fP(), \fIsendto\fP(), \fIshutdown\fP()
+,
+\fIsocket\fP(), \fIwrite\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<sys/socket.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/recvmsg.3p b/man-pages-posix-2003/man3p/recvmsg.3p
new file mode 100644
index 0000000..7b14b01
--- /dev/null
+++ b/man-pages-posix-2003/man3p/recvmsg.3p
@@ -0,0 +1,217 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "RECVMSG" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" recvmsg
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+recvmsg \- receive a message from a socket
+.SH SYNOPSIS
+.LP
+\fB#include <sys/socket.h>
+.br
+.sp
+ssize_t recvmsg(int\fP \fIsocket\fP\fB, struct msghdr *\fP\fImessage\fP\fB,
+int\fP \fIflags\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIrecvmsg\fP() function shall receive a message from a connection-mode
+or connectionless-mode socket. It is normally used
+with connectionless-mode sockets because it permits the application
+to retrieve the source address of received data.
+.LP
+The \fIrecvmsg\fP() function takes the following arguments:
+.TP 7
+\fIsocket\fP
+Specifies the socket file descriptor.
+.TP 7
+\fImessage\fP
+Points to a \fBmsghdr\fP structure, containing both the buffer to
+store the source address and the buffers for the incoming
+message. The length and format of the address depend on the address
+family of the socket. The \fImsg_flags\fP member is ignored on
+input, but may contain meaningful values on output.
+.TP 7
+\fIflags\fP
+Specifies the type of message reception. Values of this argument are
+formed by logically OR'ing zero or more of the following
+values:
+.TP 7
+MSG_OOB
+.RS
+Requests out-of-band data. The significance and semantics of out-of-band
+data are protocol-specific.
+.RE
+.TP 7
+MSG_PEEK
+.RS
+Peeks at the incoming message.
+.RE
+.TP 7
+MSG_WAITALL
+.RS
+On SOCK_STREAM sockets this requests that the function block until
+the full amount of data can be returned. The function may
+return the smaller amount of data if the socket is a message-based
+socket, if a signal is caught, if the connection is terminated,
+if MSG_PEEK was specified, or if an error is pending for the socket.
+.RE
+.sp
+.sp
+.LP
+The \fIrecvmsg\fP() function shall receive messages from unconnected
+or connected sockets and shall return the length of the
+message.
+.LP
+The \fIrecvmsg\fP() function shall return the total length of the
+message. For message-based sockets, such as SOCK_DGRAM and
+SOCK_SEQPACKET, the entire message shall be read in a single operation.
+If a message is too long to fit in the supplied buffers,
+and MSG_PEEK is not set in the \fIflags\fP argument, the excess bytes
+shall be discarded, and MSG_TRUNC shall be set in the
+\fImsg_flags\fP member of the \fBmsghdr\fP structure. For stream-based
+sockets, such as SOCK_STREAM, message boundaries shall be
+ignored. In this case, data shall be returned to the user as soon
+as it becomes available, and no data shall be discarded.
+.LP
+If the MSG_WAITALL flag is not set, data shall be returned only up
+to the end of the first message.
+.LP
+If no messages are available at the socket and O_NONBLOCK is not set
+on the socket's file descriptor, \fIrecvmsg\fP() shall
+block until a message arrives. If no messages are available at the
+socket and O_NONBLOCK is set on the socket's file descriptor,
+the \fIrecvmsg\fP() function shall fail and set \fIerrno\fP to [EAGAIN]
+or [EWOULDBLOCK].
+.LP
+In the \fBmsghdr\fP structure, the \fImsg_name\fP and \fImsg_namelen\fP
+members specify the source address if the socket is
+unconnected. If the socket is connected, the \fImsg_name\fP and \fImsg_namelen\fP
+members shall be ignored. The \fImsg_name\fP
+member may be a null pointer if no names are desired or required.
+The \fImsg_iov\fP and \fImsg_iovlen\fP fields are used to
+specify where the received data shall be stored. \fImsg_iov\fP points
+to an array of \fBiovec\fP structures; \fImsg_iovlen\fP
+shall be set to the dimension of this array. In each \fBiovec\fP structure,
+the \fIiov_base\fP field specifies a storage area and
+the \fIiov_len\fP field gives its size in bytes. Each storage area
+indicated by \fImsg_iov\fP is filled with received data in
+turn until all of the received data is stored or all of the areas
+have been filled.
+.LP
+Upon successful completion, the \fImsg_flags\fP member of the message
+header shall be the bitwise-inclusive OR of all of the
+following flags that indicate conditions detected for the received
+message:
+.TP 7
+MSG_EOR
+End-of-record was received (if supported by the protocol).
+.TP 7
+MSG_OOB
+Out-of-band data was received.
+.TP 7
+MSG_TRUNC
+Normal data was truncated.
+.TP 7
+MSG_CTRUNC
+Control data was truncated.
+.sp
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIrecvmsg\fP() shall return the length
+of the message in bytes. If no messages are available to be
+received and the peer has performed an orderly shutdown, \fIrecvmsg\fP()
+shall return 0. Otherwise, -1 shall be returned and
+\fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fIrecvmsg\fP() function shall fail if:
+.TP 7
+.B EAGAIN \fRor\fP EWOULDBLOCK
+.sp
+The socket's file descriptor is marked O_NONBLOCK and no data is waiting
+to be received; or MSG_OOB is set and no out-of-band data
+is available and either the socket's file descriptor is marked O_NONBLOCK
+or the socket does not support blocking to await
+out-of-band data.
+.TP 7
+.B EBADF
+The \fIsocket\fP argument is not a valid open file descriptor.
+.TP 7
+.B ECONNRESET
+A connection was forcibly closed by a peer.
+.TP 7
+.B EINTR
+This function was interrupted by a signal before any data was available.
+.TP 7
+.B EINVAL
+The sum of the \fIiov_len\fP values overflows a \fBssize_t\fP, or
+the MSG_OOB flag is set and no out-of-band data is
+available.
+.TP 7
+.B EMSGSIZE
+The \fImsg_iovlen\fP member of the \fBmsghdr\fP structure pointed
+to by \fImessage\fP is less than or equal to 0, or is
+greater than {IOV_MAX}.
+.TP 7
+.B ENOTCONN
+A receive is attempted on a connection-mode socket that is not connected.
+.TP 7
+.B ENOTSOCK
+The \fIsocket\fP argument does not refer to a socket.
+.TP 7
+.B EOPNOTSUPP
+The specified flags are not supported for this socket type.
+.TP 7
+.B ETIMEDOUT
+The connection timed out during connection establishment, or due to
+a transmission timeout on active connection.
+.sp
+.LP
+The \fIrecvmsg\fP() function may fail if:
+.TP 7
+.B EIO
+An I/O error occurred while reading from or writing to the file system.
+.TP 7
+.B ENOBUFS
+Insufficient resources were available in the system to perform the
+operation.
+.TP 7
+.B ENOMEM
+Insufficient memory was available to fulfill the request.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIselect\fP() and \fIpoll\fP() functions can
+be used to determine when data is available to be received.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpoll\fP(), \fIrecv\fP(), \fIrecvfrom\fP(),
+\fIselect\fP(), \fIsend\fP(), \fIsendmsg\fP(),
+\fIsendto\fP(), \fIshutdown\fP(), \fIsocket\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<sys/socket.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/regcomp.3p b/man-pages-posix-2003/man3p/regcomp.3p
new file mode 100644
index 0000000..5403b2f
--- /dev/null
+++ b/man-pages-posix-2003/man3p/regcomp.3p
@@ -0,0 +1,587 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "REGCOMP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" regcomp
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+regcomp, regerror, regexec, regfree \- regular expression matching
+.SH SYNOPSIS
+.LP
+\fB#include <regex.h>
+.br
+.sp
+int regcomp(regex_t *restrict\fP \fIpreg\fP\fB, const char *restrict\fP
+\fIpattern\fP\fB,
+.br
+\ \ \ \ \ \ int\fP \fIcflags\fP\fB);
+.br
+size_t regerror(int\fP \fIerrcode\fP\fB, const regex_t *restrict\fP
+\fIpreg\fP\fB,
+.br
+\ \ \ \ \ \ char *restrict\fP \fIerrbuf\fP\fB, size_t\fP \fIerrbuf_size\fP\fB);
+.br
+int regexec(const regex_t *restrict\fP \fIpreg\fP\fB, const char *restrict\fP
+\fIstring\fP\fB,
+.br
+\ \ \ \ \ \ size_t\fP \fInmatch\fP\fB, regmatch_t\fP \fIpmatch\fP\fB[restrict],
+int\fP
+\fIeflags\fP\fB);
+.br
+void regfree(regex_t *\fP\fIpreg\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions interpret \fIbasic\fP and \fIextended\fP regular expressions
+as described in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 9, Regular Expressions.
+.LP
+The \fBregex_t\fP structure is defined in \fI<regex.h>\fP and contains
+at least
+the following member:
+.TS C
+center; l2 l2 l.
+\fBMember Type\fP \fBMember Name\fP \fBDescription\fP
+size_t re_nsub Number of parenthesized subexpressions.
+.TE
+.LP
+The \fBregmatch_t\fP structure is defined in \fI<regex.h>\fP and contains
+at
+least the following members:
+.TS C
+center; l1 l1 lw(40).
+\fBMember Type\fP \fBMember Name\fP T{
+.na
+\fBDescription\fP
+.ad
+T}
+\fBregoff_t\fP \fIrm_so\fP T{
+.na
+Byte offset from start of \fIstring\fP to start of substring.
+.ad
+T}
+\fBregoff_t\fP \fIrm_eo\fP T{
+.na
+Byte offset from start of \fIstring\fP of the first character after the end of substring.
+.ad
+T}
+.TE
+.LP
+The \fIregcomp\fP() function shall compile the regular expression
+contained in the string pointed to by the \fIpattern\fP
+argument and place the results in the structure pointed to by \fIpreg\fP.
+The \fIcflags\fP argument is the bitwise-inclusive OR
+of zero or more of the following flags, which are defined in the \fI<regex.h>\fP
+header:
+.TP 7
+REG_EXTENDED
+Use Extended Regular Expressions.
+.TP 7
+REG_ICASE
+Ignore case in match. (See the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 9, Regular Expressions.)
+.TP 7
+REG_NOSUB
+Report only success/fail in \fIregexec\fP().
+.TP 7
+REG_NEWLINE
+Change the handling of <newline>s, as described in the text.
+.sp
+.LP
+The default regular expression type for \fIpattern\fP is a Basic Regular
+Expression. The application can specify Extended
+Regular Expressions using the REG_EXTENDED \fIcflags\fP flag.
+.LP
+If the REG_NOSUB flag was not set in \fIcflags\fP, then \fIregcomp\fP()
+shall set \fIre_nsub\fP to the number of
+parenthesized subexpressions (delimited by \fB"\\(\\)"\fP in basic
+regular expressions or \fB"()"\fP in extended regular
+expressions) found in \fIpattern\fP.
+.LP
+The \fIregexec\fP() function compares the null-terminated string specified
+by \fIstring\fP with the compiled regular
+expression \fIpreg\fP initialized by a previous call to \fIregcomp\fP().
+If it finds a match, \fIregexec\fP() shall return 0;
+otherwise, it shall return non-zero indicating either no match or
+an error. The \fIeflags\fP argument is the bitwise-inclusive OR
+of zero or more of the following flags, which are defined in the \fI<regex.h>\fP
+header:
+.TP 7
+REG_NOTBOL
+The first character of the string pointed to by \fIstring\fP is not
+the beginning of the line. Therefore, the circumflex
+character ( \fB'^'\fP ), when taken as a special character, shall
+not match the beginning of \fIstring\fP.
+.TP 7
+REG_NOTEOL
+The last character of the string pointed to by \fIstring\fP is not
+the end of the line. Therefore, the dollar sign (
+\fB'$'\fP ), when taken as a special character, shall not match the
+end of \fIstring\fP.
+.sp
+.LP
+If \fInmatch\fP is 0 or REG_NOSUB was set in the \fIcflags\fP argument
+to \fIregcomp\fP(), then \fIregexec\fP() shall ignore
+the \fIpmatch\fP argument. Otherwise, the application shall ensure
+that the \fIpmatch\fP argument points to an array with at
+least \fInmatch\fP elements, and \fIregexec\fP() shall fill in the
+elements of that array with offsets of the substrings of
+\fIstring\fP that correspond to the parenthesized subexpressions of
+\fIpattern\fP: \fIpmatch\fP[ \fIi\fP]. \fIrm_so\fP shall
+be the byte offset of the beginning and \fIpmatch\fP[ \fIi\fP]. \fIrm_eo\fP
+shall be one greater than the byte offset of the end
+of substring \fIi\fP. (Subexpression \fIi\fP begins at the \fIi\fPth
+matched open parenthesis, counting from 1.) Offsets in
+\fIpmatch\fP[0] identify the substring that corresponds to the entire
+regular expression. Unused elements of \fIpmatch\fP up to
+\fIpmatch\fP[ \fInmatch\fP-1] shall be filled with -1. If there are
+more than \fInmatch\fP subexpressions in \fIpattern\fP (
+\fIpattern\fP itself counts as a subexpression), then \fIregexec\fP()
+shall still do the match, but shall record only the first
+\fInmatch\fP substrings.
+.LP
+When matching a basic or extended regular expression, any given parenthesized
+subexpression of \fIpattern\fP might participate
+in the match of several different substrings of \fIstring\fP, or it
+might not match any substring even though the pattern as a
+whole did match. The following rules shall be used to determine which
+substrings to report in \fIpmatch\fP when matching regular
+expressions:
+.IP " 1." 4
+If subexpression \fIi\fP in a regular expression is not contained
+within another subexpression, and it participated in the
+match several times, then the byte offsets in \fIpmatch\fP[ \fIi\fP]
+shall delimit the last such match.
+.LP
+.IP " 2." 4
+If subexpression \fIi\fP is not contained within another subexpression,
+and it did not participate in an otherwise successful
+match, the byte offsets in \fIpmatch\fP[ \fIi\fP] shall be -1. A subexpression
+does not participate in the match when:
+\fB'*'\fP or \fB"\\{\\}"\fP appears immediately after the subexpression
+in a basic regular expression, or
+\fB'*'\fP, \fB'?'\fP, or \fB"{}"\fP appears immediately after the
+subexpression in an extended regular expression, and
+the subexpression did not match (matched 0 times)
+.LP
+or:
+\fB'|'\fP is used in an extended regular expression to select this
+subexpression or another, and the other
+subexpression matched.
+.LP
+.IP " 3." 4
+If subexpression \fIi\fP is contained within another subexpression
+\fIj\fP, and \fIi\fP is not contained within any other
+subexpression that is contained within \fIj\fP, and a match of subexpression
+\fIj\fP is reported in \fIpmatch\fP[ \fIj\fP],
+then the match or non-match of subexpression \fIi\fP reported in \fIpmatch\fP[
+\fIi\fP] shall be as described in 1. and 2.
+above, but within the substring reported in \fIpmatch\fP[ \fIj\fP]
+rather than the whole string. The offsets in \fIpmatch\fP[
+\fIi\fP] are still relative to the start of \fIstring\fP.
+.LP
+.IP " 4." 4
+If subexpression \fIi\fP is contained in subexpression \fIj\fP, and
+the byte offsets in \fIpmatch\fP[ \fIj\fP] are -1, then
+the pointers in \fIpmatch\fP[ \fIi\fP] shall also be -1.
+.LP
+.IP " 5." 4
+If subexpression \fIi\fP matched a zero-length string, then both byte
+offsets in \fIpmatch\fP[ \fIi\fP] shall be the byte
+offset of the character or null terminator immediately following the
+zero-length string.
+.LP
+.LP
+If, when \fIregexec\fP() is called, the locale is different from when
+the regular expression was compiled, the result is
+undefined.
+.LP
+If REG_NEWLINE is not set in \fIcflags\fP, then a <newline> in \fIpattern\fP
+or \fIstring\fP shall be treated as an
+ordinary character. If REG_NEWLINE is set, then <newline> shall be
+treated as an ordinary character except as follows:
+.IP " 1." 4
+A <newline> in \fIstring\fP shall not be matched by a period outside
+a bracket expression or by any form of a
+non-matching list (see the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter
+9, Regular Expressions).
+.LP
+.IP " 2." 4
+A circumflex ( \fB'^'\fP ) in \fIpattern\fP, when used to specify
+expression anchoring (see the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 9.3.8, BRE Expression Anchoring),
+shall match the zero-length string immediately after a <newline> in
+\fIstring\fP, regardless of the setting of
+REG_NOTBOL.
+.LP
+.IP " 3." 4
+A dollar sign ( \fB'$'\fP ) in \fIpattern\fP, when used to specify
+expression anchoring, shall match the zero-length string
+immediately before a <newline> in \fIstring\fP, regardless of the
+setting of REG_NOTEOL.
+.LP
+.LP
+The \fIregfree\fP() function frees any memory allocated by \fIregcomp\fP()
+associated with \fIpreg\fP.
+.LP
+The following constants are defined as error return values:
+.TP 7
+REG_NOMATCH
+\fIregexec\fP() failed to match.
+.TP 7
+REG_BADPAT
+Invalid regular expression.
+.TP 7
+REG_ECOLLATE
+Invalid collating element referenced.
+.TP 7
+REG_ECTYPE
+Invalid character class type referenced.
+.TP 7
+REG_EESCAPE
+Trailing \fB'\\'\fP in pattern.
+.TP 7
+REG_ESUBREG
+Number in \fB"\\digit"\fP invalid or in error.
+.TP 7
+REG_EBRACK
+\fB"[]"\fP imbalance.
+.TP 7
+REG_EPAREN
+\fB"\\(\\)"\fP or \fB"()"\fP imbalance.
+.TP 7
+REG_EBRACE
+\fB"\\{\\}"\fP imbalance.
+.TP 7
+REG_BADBR
+Content of \fB"\\{\\}"\fP invalid: not a number, number too large,
+more than two numbers, first larger than second.
+.TP 7
+REG_ERANGE
+Invalid endpoint in range expression.
+.TP 7
+REG_ESPACE
+Out of memory.
+.TP 7
+REG_BADRPT
+\fB'?'\fP, \fB'*'\fP, or \fB'+'\fP not preceded by valid regular
+expression.
+.sp
+.LP
+The \fIregerror\fP() function provides a mapping from error codes
+returned by \fIregcomp\fP() and \fIregexec\fP() to
+unspecified printable strings. It generates a string corresponding
+to the value of the \fIerrcode\fP argument, which the
+application shall ensure is the last non-zero value returned by \fIregcomp\fP()
+or \fIregexec\fP() with the given value of
+\fIpreg\fP. If \fIerrcode\fP is not such a value, the content of the
+generated string is unspecified.
+.LP
+If \fIpreg\fP is a null pointer, but \fIerrcode\fP is a value returned
+by a previous call to \fIregexec\fP() or
+\fIregcomp\fP(), the \fIregerror\fP() still generates an error string
+corresponding to the value of \fIerrcode\fP, but it might
+not be as detailed under some implementations.
+.LP
+If the \fIerrbuf_size\fP argument is not 0, \fIregerror\fP() shall
+place the generated string into the buffer of size
+\fIerrbuf_size\fP bytes pointed to by \fIerrbuf\fP. If the string
+(including the terminating null) cannot fit in the buffer,
+\fIregerror\fP() shall truncate the string and null-terminate the
+result.
+.LP
+If \fIerrbuf_size\fP is 0, \fIregerror\fP() shall ignore the \fIerrbuf\fP
+argument, and return the size of the buffer needed
+to hold the generated string.
+.LP
+If the \fIpreg\fP argument to \fIregexec\fP() or \fIregfree\fP() is
+not a compiled regular expression returned by
+\fIregcomp\fP(), the result is undefined. A \fIpreg\fP is no longer
+treated as a compiled regular expression after it is given to
+\fIregfree\fP().
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIregcomp\fP() function shall return
+0. Otherwise, it shall return an integer value indicating
+an error as described in \fI<regex.h>\fP, and the content of \fIpreg\fP
+is
+undefined. If a code is returned, the interpretation shall be as given
+in \fI<regex.h>\fP.
+.LP
+If \fIregcomp\fP() detects an invalid RE, it may return REG_BADPAT,
+or it may return one of the error codes that more precisely
+describes the error.
+.LP
+Upon successful completion, the \fIregexec\fP() function shall return
+0. Otherwise, it shall return REG_NOMATCH to indicate no
+match.
+.LP
+Upon successful completion, the \fIregerror\fP() function shall return
+the number of bytes needed to hold the entire generated
+string, including the null termination. If the return value is greater
+than \fIerrbuf_size\fP, the string returned in the buffer
+pointed to by \fIerrbuf\fP has been truncated.
+.LP
+The \fIregfree\fP() function shall not return a value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.sp
+.RS
+.nf
+
+\fB#include <regex.h>
+.sp
+
+/*
+ * Match string against the extended regular expression in
+ * pattern, treating errors as no match.
+ *
+ * Return 1 for match, 0 for no match.
+ */
+.sp
+
+int
+match(const char *string, char *pattern)
+{
+ int status;
+ regex_t re;
+.sp
+
+ if (regcomp(&re, pattern, REG_EXTENDED|REG_NOSUB) != 0) {
+ return(0); /* Report error. */
+ }
+ status = regexec(&re, string, (size_t) 0, NULL, 0);
+ regfree(&re);
+ if (status != 0) {
+ return(0); /* Report error. */
+ }
+ return(1);
+}
+\fP
+.fi
+.RE
+.LP
+The following demonstrates how the REG_NOTBOL flag could be used with
+\fIregexec\fP() to find all substrings in a line that
+match a pattern supplied by a user. (For simplicity of the example,
+very little error checking is done.)
+.sp
+.RS
+.nf
+
+\fB(void) regcomp (&re, pattern, 0);
+/* This call to regexec() finds the first match on the line. */
+error = regexec (&re, &buffer[0], 1, &pm, 0);
+while (error == 0) { /* While matches found. */
+ /* Substring found between pm.rm_so and pm.rm_eo. */
+ /* This call to regexec() finds the next match. */
+ error = regexec (&re, buffer + pm.rm_eo, 1, &pm, REG_NOTBOL);
+}
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+An application could use:
+.sp
+.RS
+.nf
+
+\fBregerror(code,preg,(char *)NULL,(size_t)0)
+\fP
+.fi
+.RE
+.LP
+to find out how big a buffer is needed for the generated string, \fImalloc\fP()
+a buffer
+to hold the string, and then call \fIregerror\fP() again to get the
+string. Alternatively, it could allocate a fixed, static
+buffer that is big enough to hold most strings, and then use \fImalloc\fP()
+to allocate a
+larger buffer if it finds that this is too small.
+.LP
+To match a pattern as described in the Shell and Utilities volume
+of IEEE\ Std\ 1003.1-2001, Section 2.13, Pattern Matching Notation,
+use the \fIfnmatch\fP() function.
+.SH RATIONALE
+.LP
+The \fIregexec\fP() function must fill in all \fInmatch\fP elements
+of \fIpmatch\fP, where \fInmatch\fP and \fIpmatch\fP
+are supplied by the application, even if some elements of \fIpmatch\fP
+do not correspond to subexpressions in \fIpattern\fP. The
+application writer should note that there is probably no reason for
+using a value of \fInmatch\fP that is larger than
+\fIpreg\fP-> \fIre_nsub\fP+1.
+.LP
+The REG_NEWLINE flag supports a use of RE matching that is needed
+in some applications like text editors. In such applications,
+the user supplies an RE asking the application to find a line that
+matches the given expression. An anchor in such an RE anchors at
+the beginning or end of any line. Such an application can pass a sequence
+of <newline>-separated lines to \fIregexec\fP() as
+a single long string and specify REG_NEWLINE to \fIregcomp\fP() to
+get the desired behavior. The application must ensure that
+there are no explicit <newline>s in \fIpattern\fP if it wants to ensure
+that any match occurs entirely within a single
+line.
+.LP
+The REG_NEWLINE flag affects the behavior of \fIregexec\fP(), but
+it is in the \fIcflags\fP parameter to \fIregcomp\fP() to
+allow flexibility of implementation. Some implementations will want
+to generate the same compiled RE in \fIregcomp\fP() regardless
+of the setting of REG_NEWLINE and have \fIregexec\fP() handle anchors
+differently based on the setting of the flag. Other
+implementations will generate different compiled REs based on the
+REG_NEWLINE.
+.LP
+The REG_ICASE flag supports the operations taken by the \fIgrep\fP
+\fB-i\fP option and
+the historical implementations of \fIex\fP and \fIvi\fP.
+Including this flag will make it easier for application code to be
+written that does the same thing as these utilities.
+.LP
+The substrings reported in \fIpmatch\fP[] are defined using offsets
+from the start of the string rather than pointers. Since
+this is a new interface, there should be no impact on historical implementations
+or applications, and offsets should be just as
+easy to use as pointers. The change to offsets was made to facilitate
+future extensions in which the string to be searched is
+presented to \fIregexec\fP() in blocks, allowing a string to be searched
+that is not all in memory at once.
+.LP
+The type \fBregoff_t\fP is used for the elements of \fIpmatch\fP[]
+to ensure that the application can represent either the
+largest possible array in memory (important for an application conforming
+to the Shell and Utilities volume of
+IEEE\ Std\ 1003.1-2001) or the largest possible file (important for
+an application using the extension where a file is
+searched in chunks).
+.LP
+The standard developers rejected the inclusion of a \fIregsub\fP()
+function that would be used to do substitutions for a
+matched RE. While such a routine would be useful to some applications,
+its utility would be much more limited than the matching
+function described here. Both RE parsing and substitution are possible
+to implement without support other than that required by the
+ISO\ C standard, but matching is much more complex than substituting.
+The only difficult part of substitution, given the
+information supplied by \fIregexec\fP(), is finding the next character
+in a string when there can be multi-byte characters. That
+is a much larger issue, and one that needs a more general solution.
+.LP
+The \fIerrno\fP variable has not been used for error returns to avoid
+filling the \fIerrno\fP name space for this feature.
+.LP
+The interface is defined so that the matched substrings \fIrm_sp\fP
+and \fIrm_ep\fP are in a separate \fBregmatch_t\fP
+structure instead of in \fBregex_t\fP. This allows a single compiled
+RE to be used simultaneously in several contexts; in
+\fImain\fP() and a signal handler, perhaps, or in multiple threads
+of lightweight processes. (The \fIpreg\fP argument to
+\fIregexec\fP() is declared with type \fBconst\fP, so the implementation
+is not permitted to use the structure to store
+intermediate results.) It also allows an application to request an
+arbitrary number of substrings from an RE. The number of
+subexpressions in the RE is reported in \fIre_nsub\fP in \fIpreg\fP.
+With this change to \fIregexec\fP(), consideration was
+given to dropping the REG_NOSUB flag since the user can now specify
+this with a zero \fInmatch\fP argument to \fIregexec\fP().
+However, keeping REG_NOSUB allows an implementation to use a different
+(perhaps more efficient) algorithm if it knows in
+\fIregcomp\fP() that no subexpressions need be reported. The implementation
+is only required to fill in \fIpmatch\fP if
+\fInmatch\fP is not zero and if REG_NOSUB is not specified. Note that
+the \fBsize_t\fP type, as defined in the ISO\ C
+standard, is unsigned, so the description of \fIregexec\fP() does
+not need to address negative values of \fInmatch\fP.
+.LP
+REG_NOTBOL was added to allow an application to do repeated searches
+for the same pattern in a line. If the pattern contains a
+circumflex character that should match the beginning of a line, then
+the pattern should only match when matched against the
+beginning of the line. Without the REG_NOTBOL flag, the application
+could rewrite the expression for subsequent matches, but in the
+general case this would require parsing the expression. The need for
+REG_NOTEOL is not as clear; it was added for symmetry.
+.LP
+The addition of the \fIregerror\fP() function addresses the historical
+need for conforming application programs to have access
+to error information more than "Function failed to compile/match your
+RE for unknown reasons".
+.LP
+This interface provides for two different methods of dealing with
+error conditions. The specific error codes (REG_EBRACE, for
+example), defined in \fI<regex.h>\fP, allow an application to recover
+from an error
+if it is so able. Many applications, especially those that use patterns
+supplied by a user, will not try to deal with specific
+error cases, but will just use \fIregerror\fP() to obtain a human-readable
+error message to present to the user.
+.LP
+The \fIregerror\fP() function uses a scheme similar to \fIconfstr\fP()
+to deal with
+the problem of allocating memory to hold the generated string. The
+scheme used by \fIstrerror\fP() in the ISO\ C standard was considered
+unacceptable since it creates
+difficulties for multi-threaded applications.
+.LP
+The \fIpreg\fP argument is provided to \fIregerror\fP() to allow an
+implementation to generate a more descriptive message than
+would be possible with \fIerrcode\fP alone. An implementation might,
+for example, save the character offset of the offending
+character of the pattern in a field of \fIpreg\fP, and then include
+that in the generated message string. The implementation may
+also ignore \fIpreg\fP.
+.LP
+A REG_FILENAME flag was considered, but omitted. This flag caused
+\fIregexec\fP() to match patterns as described in the Shell
+and Utilities volume of IEEE\ Std\ 1003.1-2001, Section 2.13, Pattern
+Matching Notation instead of REs. This service is now provided by
+the \fIfnmatch\fP()
+function.
+.LP
+Notice that there is a difference in philosophy between the ISO\ POSIX-2:1993
+standard and IEEE\ Std\ 1003.1-2001 in
+how to handle a "bad" regular expression. The ISO\ POSIX-2:1993 standard
+says that many bad constructs "produce undefined
+results", or that "the interpretation is undefined". IEEE\ Std\ 1003.1-2001,
+however, says that the interpretation of
+such REs is unspecified. The term "undefined" means that the action
+by the application is an error, of similar severity to
+passing a bad pointer to a function.
+.LP
+The \fIregcomp\fP() and \fIregexec\fP() functions are required to
+accept any null-terminated string as the \fIpattern\fP
+argument. If the meaning of the string is "undefined", the behavior
+of the function is "unspecified".
+IEEE\ Std\ 1003.1-2001 does not specify how the functions will interpret
+the pattern; they might return error codes, or
+they might do pattern matching in some completely unexpected way,
+but they should not do something like abort the process.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfnmatch\fP(), \fIglob\fP(), Shell and Utilities volume of
+IEEE\ Std\ 1003.1-2001, Section 2.13, Pattern Matching Notation, Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 9, Regular Expressions,
+\fI<regex.h>\fP, \fI<sys/types.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/regerror.3p b/man-pages-posix-2003/man3p/regerror.3p
new file mode 100644
index 0000000..bcf1d43
--- /dev/null
+++ b/man-pages-posix-2003/man3p/regerror.3p
@@ -0,0 +1 @@
+.so man3p/regcomp.3p
diff --git a/man-pages-posix-2003/man3p/regexec.3p b/man-pages-posix-2003/man3p/regexec.3p
new file mode 100644
index 0000000..bcf1d43
--- /dev/null
+++ b/man-pages-posix-2003/man3p/regexec.3p
@@ -0,0 +1 @@
+.so man3p/regcomp.3p
diff --git a/man-pages-posix-2003/man3p/regfree.3p b/man-pages-posix-2003/man3p/regfree.3p
new file mode 100644
index 0000000..bcf1d43
--- /dev/null
+++ b/man-pages-posix-2003/man3p/regfree.3p
@@ -0,0 +1 @@
+.so man3p/regcomp.3p
diff --git a/man-pages-posix-2003/man3p/remainder.3p b/man-pages-posix-2003/man3p/remainder.3p
new file mode 100644
index 0000000..21a6993
--- /dev/null
+++ b/man-pages-posix-2003/man3p/remainder.3p
@@ -0,0 +1,89 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "REMAINDER" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" remainder
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+remainder, remainderf, remainderl \- remainder function
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double remainder(double\fP \fIx\fP\fB, double\fP \fIy\fP\fB);
+.br
+float remainderf(float\fP \fIx\fP\fB, float\fP \fIy\fP\fB);
+.br
+long double remainderl(long double\fP \fIx\fP\fB, long double\fP \fIy\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall return the floating-point remainder \fIr\fP=
+\fIx\fP- \fIny\fP when \fIy\fP is non-zero. The value
+\fIn\fP is the integral value nearest the exact value \fIx\fP/ \fIy\fP.
+When |\fIn\fP-\fIx\fP/\fIy\fP|=0.5, the value
+\fIn\fP is chosen to be even.
+.LP
+The behavior of \fIremainder\fP() shall be independent of the rounding
+mode.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the floating-point
+remainder \fIr\fP= \fIx\fP- \fIny\fP when
+\fIy\fP is non-zero.
+.LP
+If
+\fIx\fP or \fIy\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is infinite or \fIy\fP is 0 and the other is non-NaN, a
+domain error shall occur, and either a NaN (if supported),
+or an implementation-defined value shall be returned.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Domain\ Error
+The \fIx\fP argument is \(+-Inf, or the \fIy\fP argument is \(+-0
+and the other argument is non-NaN.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [EDOM]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the invalid floating-point exception shall be raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIabs\fP(), \fIdiv\fP(), \fIfeclearexcept\fP(), \fIfetestexcept\fP(),
+\fIldiv\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Section 4.18, Treatment of Error Conditions for Mathematical Functions,
+\fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/remainderf.3p b/man-pages-posix-2003/man3p/remainderf.3p
new file mode 100644
index 0000000..a91128c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/remainderf.3p
@@ -0,0 +1 @@
+.so man3p/remainder.3p
diff --git a/man-pages-posix-2003/man3p/remainderl.3p b/man-pages-posix-2003/man3p/remainderl.3p
new file mode 100644
index 0000000..a91128c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/remainderl.3p
@@ -0,0 +1 @@
+.so man3p/remainder.3p
diff --git a/man-pages-posix-2003/man3p/remove.3p b/man-pages-posix-2003/man3p/remove.3p
new file mode 100644
index 0000000..b6a85c8
--- /dev/null
+++ b/man-pages-posix-2003/man3p/remove.3p
@@ -0,0 +1,79 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "REMOVE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" remove
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+remove \- remove a file
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+int remove(const char *\fP\fIpath\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIremove\fP() function shall cause the file named by the pathname
+pointed to by \fIpath\fP to be no longer accessible by
+that name. A subsequent attempt to open that file using that name
+shall fail, unless it is created anew.
+.LP
+If
+\fIpath\fP does not name a directory, \fIremove\fP(\fIpath\fP) shall
+be equivalent to \fIunlink\fP(\fIpath\fP).
+.LP
+If \fIpath\fP names a directory, \fIremove\fP(\fIpath\fP) shall be
+equivalent to \fIrmdir\fP(\fIpath\fP).
+.SH RETURN VALUE
+.LP
+Refer to \fIrmdir\fP() or \fIunlink\fP().
+.SH ERRORS
+.LP
+Refer to \fIrmdir\fP() or \fIunlink\fP().
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Removing Access to a File
+.LP
+The following example shows how to remove access to a file named \fB/home/cnd/old_mods\fP.
+.sp
+.RS
+.nf
+
+\fB#include <stdio.h>
+.sp
+
+int status;
+\&...
+status = remove("/home/cnd/old_mods");
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIrmdir\fP(), \fIunlink\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/remque.3p b/man-pages-posix-2003/man3p/remque.3p
new file mode 100644
index 0000000..3057ae3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/remque.3p
@@ -0,0 +1 @@
+.so man3p/insque.3p
diff --git a/man-pages-posix-2003/man3p/remquo.3p b/man-pages-posix-2003/man3p/remquo.3p
new file mode 100644
index 0000000..ca60cdd
--- /dev/null
+++ b/man-pages-posix-2003/man3p/remquo.3p
@@ -0,0 +1,98 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "REMQUO" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" remquo
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+remquo, remquof, remquol \- remainder functions
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double remquo(double\fP \fIx\fP\fB, double\fP \fIy\fP\fB, int *\fP\fIquo\fP\fB);
+.br
+float remquof(float\fP \fIx\fP\fB, float\fP \fIy\fP\fB, int *\fP\fIquo\fP\fB);
+.br
+long double remquol(long double\fP \fIx\fP\fB, long double\fP \fIy\fP\fB,
+int *\fP\fIquo\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIremquo\fP(), \fIremquof\fP(), and \fIremquol\fP() functions
+shall compute the same remainder as the \fIremainder\fP(), \fIremainderf\fP(),
+and \fIremainderl\fP() functions, respectively. In the object pointed
+to by \fIquo\fP, they store
+a value whose sign is the sign of \fIx\fP/ \fIy\fP and whose magnitude
+is congruent modulo 2\fI**n\fP to
+the magnitude of the integral quotient of \fIx\fP/ \fIy\fP, where
+\fIn\fP is an implementation-defined integer greater than or
+equal to 3.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+These functions shall return \fIx\fP REM \fIy\fP.
+.LP
+If
+\fIx\fP or \fIy\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is \(+-Inf or \fIy\fP is zero and the other argument is
+non-NaN, a domain error shall occur, and either a NaN
+(if supported), or an implementation-defined value shall be returned.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Domain\ Error
+The \fIx\fP argument is \(+-Inf, or the \fIy\fP argument is \(+-0
+and the other argument is non-NaN.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [EDOM]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the invalid floating-point exception shall be raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+These functions are intended for implementing argument reductions
+which can exploit a few low-order bits of the quotient. Note
+that \fIx\fP may be so large in magnitude relative to \fIy\fP that
+an exact representation of the quotient is not practical.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIremainder\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, Section 4.18,
+Treatment of Error Conditions for Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/remquof.3p b/man-pages-posix-2003/man3p/remquof.3p
new file mode 100644
index 0000000..54e1f65
--- /dev/null
+++ b/man-pages-posix-2003/man3p/remquof.3p
@@ -0,0 +1 @@
+.so man3p/remquo.3p
diff --git a/man-pages-posix-2003/man3p/remquol.3p b/man-pages-posix-2003/man3p/remquol.3p
new file mode 100644
index 0000000..54e1f65
--- /dev/null
+++ b/man-pages-posix-2003/man3p/remquol.3p
@@ -0,0 +1 @@
+.so man3p/remquo.3p
diff --git a/man-pages-posix-2003/man3p/rename.3p b/man-pages-posix-2003/man3p/rename.3p
new file mode 100644
index 0000000..76a1076
--- /dev/null
+++ b/man-pages-posix-2003/man3p/rename.3p
@@ -0,0 +1,267 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "RENAME" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" rename
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+rename \- rename a file
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+int rename(const char *\fP\fIold\fP\fB, const char *\fP\fInew\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIrename\fP() function shall change the name of a file. The \fIold\fP
+argument points to the pathname of the file to be
+renamed. The \fInew\fP argument points to the new pathname of the
+file.
+.LP
+If
+either the \fIold\fP or \fInew\fP argument names a symbolic link,
+\fIrename\fP() shall operate on the symbolic link itself, and
+shall not resolve the last component of the argument. If the \fIold\fP
+argument and the \fInew\fP argument resolve to the same
+existing file, \fIrename\fP() shall return successfully and perform
+no other action.
+.LP
+If the \fIold\fP argument points to the pathname of a file that is
+not a directory, the \fInew\fP argument shall not point to
+the pathname of a directory. If the link named by the \fInew\fP argument
+exists, it shall be removed and \fIold\fP renamed to
+\fInew\fP. In this case, a link named \fInew\fP shall remain visible
+to other processes throughout the renaming operation and
+refer either to the file referred to by \fInew\fP or \fIold\fP before
+the operation began. Write access permission is required
+for both the directory containing \fIold\fP and the directory containing
+\fInew\fP.
+.LP
+If the \fIold\fP argument points to the pathname of a directory, the
+\fInew\fP argument shall not point to the pathname of a
+file that is not a directory. If the directory named by the \fInew\fP
+argument exists, it shall be removed and \fIold\fP renamed
+to \fInew\fP. In this case, a link named \fInew\fP shall exist throughout
+the renaming operation and shall refer either to the
+directory referred to by \fInew\fP or \fIold\fP before the operation
+began. If \fInew\fP names an existing directory, it shall
+be required to be an empty directory.
+.LP
+If the \fIold\fP argument points to a pathname of a symbolic link,
+the symbolic link shall be renamed. If the \fInew\fP
+argument points to a pathname of a symbolic link, the symbolic link
+shall be removed.
+.LP
+The \fInew\fP pathname shall not contain a path prefix that names
+\fIold\fP. Write access permission is required for the
+directory containing \fIold\fP and the directory containing \fInew\fP.
+If the \fIold\fP argument points to the pathname of a
+directory, write access permission may be required for the directory
+named by \fIold\fP, and, if it exists, the directory named by
+\fInew\fP.
+.LP
+If the link named by the \fInew\fP argument exists and the file's
+link count becomes 0 when it is removed and no process has
+the file open, the space occupied by the file shall be freed and the
+file shall no longer be accessible. If one or more processes
+have the file open when the last link is removed, the link shall be
+removed before \fIrename\fP() returns, but the removal of the
+file contents shall be postponed until all references to the file
+are closed.
+.LP
+Upon successful completion, \fIrename\fP() shall mark for update the
+\fIst_ctime\fP and \fIst_mtime\fP fields of the parent
+directory of each file.
+.LP
+If the \fIrename\fP() function fails for any reason other than [EIO],
+any file named by \fInew\fP shall be unaffected.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIrename\fP() shall return 0; otherwise,
+-1 shall be returned, \fIerrno\fP shall
+be set to indicate the error, and neither the file named by
+\fIold\fP nor the file named by \fInew\fP shall be changed or created.
+.SH ERRORS
+.LP
+The \fIrename\fP() function shall fail if:
+.TP 7
+.B EACCES
+A
+component of either path prefix denies search permission; or one of
+the directories containing \fIold\fP or \fInew\fP denies
+write permissions; or, write permission is required and is denied
+for a directory pointed to by the \fIold\fP or \fInew\fP
+arguments.
+.TP 7
+.B EBUSY
+The directory named by \fIold\fP or \fInew\fP is currently in use
+by the system or another process, and the implementation
+considers this an error.
+.TP 7
+.B EEXIST \fRor\fP ENOTEMPTY
+.sp
+The link named by \fInew\fP is a directory that is not an empty directory.
+.TP 7
+.B EINVAL
+The \fInew\fP directory pathname contains a path prefix that names
+the \fIold\fP directory.
+.TP 7
+.B EIO
+A
+physical I/O error has occurred.
+.TP 7
+.B EISDIR
+The \fInew\fP argument points to a directory and the \fIold\fP argument
+points to a file that is not a directory.
+.TP 7
+.B ELOOP
+A
+loop exists in symbolic links encountered during resolution of the
+\fIpath\fP argument.
+.TP 7
+.B EMLINK
+The file named by \fIold\fP is a directory, and the link count of
+the parent directory of \fInew\fP would exceed {LINK_MAX}.
+.TP 7
+.B ENAMETOOLONG
+.sp
+The length of the \fIold\fP or \fInew\fP argument exceeds {PATH_MAX}
+or a pathname component is longer than {NAME_MAX}.
+.TP 7
+.B ENOENT
+The link named by \fIold\fP does not name an existing file, or either
+\fIold\fP or \fInew\fP points to an empty string.
+.TP 7
+.B ENOSPC
+The directory that would contain \fInew\fP cannot be extended.
+.TP 7
+.B ENOTDIR
+A
+component of either path prefix is not a directory; or the \fIold\fP
+argument names a directory and \fInew\fP argument names a
+non-directory file.
+.TP 7
+.B EPERM \fRor\fP EACCES
+.sp
+The S_ISVTX flag is set on the directory containing the file referred
+to by \fIold\fP and the caller is not the file owner, nor is
+the caller the directory owner, nor does the caller have appropriate
+privileges; or \fInew\fP refers to an existing file, the
+S_ISVTX flag is set on the directory containing this file, and the
+caller is not the file owner, nor is the caller the directory
+owner, nor does the caller have appropriate privileges.
+.TP 7
+.B EROFS
+The requested operation requires writing in a directory on a read-only
+file system.
+.TP 7
+.B EXDEV
+The links named by \fInew\fP and \fIold\fP are on different file systems
+and the implementation does not support links between
+file systems.
+.sp
+.LP
+The \fIrename\fP() function may fail if:
+.TP 7
+.B EBUSY
+The file named by the \fIold\fP or \fInew\fP arguments is a named
+STREAM.
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the \fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+.sp
+As a result of encountering a symbolic link in resolution of the \fIpath\fP
+argument, the length of the substituted pathname
+string exceeded {PATH_MAX}.
+.TP 7
+.B ETXTBSY
+The file to be renamed is a pure procedure (shared text) file that
+is being executed.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Renaming a File
+.LP
+The following example shows how to rename a file named \fB/home/cnd/mod1\fP
+to \fB/home/cnd/mod2\fP.
+.sp
+.RS
+.nf
+
+\fB#include <stdio.h>
+.sp
+
+int status;
+\&...
+status = rename("/home/cnd/mod1", "/home/cnd/mod2");
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+Some implementations mark for update the \fIst_ctime\fP field of renamed
+files and some do not. Applications which make use of
+the \fIst_ctime\fP field may behave differently with respect to renamed
+files unless they are designed to allow for either
+behavior.
+.SH RATIONALE
+.LP
+This \fIrename\fP() function is equivalent for regular files to that
+defined by the ISO\ C standard. Its inclusion here
+expands that definition to include actions on directories and specifies
+behavior when the \fInew\fP parameter names a file that
+already exists. That specification requires that the action of the
+function be atomic.
+.LP
+One of the reasons for introducing this function was to have a means
+of renaming directories while permitting implementations to
+prohibit the use of \fIlink\fP() and \fIunlink\fP()
+with directories, thus constraining links to directories to those
+made by \fImkdir\fP().
+.LP
+The specification that if \fIold\fP and \fInew\fP refer to the same
+file is intended to guarantee that:
+.sp
+.RS
+.nf
+
+\fBrename("x", "x");
+\fP
+.fi
+.RE
+.LP
+does not remove the file.
+.LP
+Renaming dot or dot-dot is prohibited in order to prevent cyclical
+file system paths.
+.LP
+See also the descriptions of [ENOTEMPTY] and [ENAMETOOLONG] in \fIrmdir\fP()
+and [EBUSY] in \fIunlink\fP(). For a discussion of [EXDEV], see \fIlink\fP()
+\&.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIlink\fP(), \fIrmdir\fP(), \fIsymlink\fP(),
+\fIunlink\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/rewind.3p b/man-pages-posix-2003/man3p/rewind.3p
new file mode 100644
index 0000000..6e90eca
--- /dev/null
+++ b/man-pages-posix-2003/man3p/rewind.3p
@@ -0,0 +1,81 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "REWIND" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" rewind
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+rewind \- reset the file position indicator in a stream
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+void rewind(FILE *\fP\fIstream\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The call:
+.sp
+.RS
+.nf
+
+\fBrewind(stream)
+\fP
+.fi
+.RE
+.LP
+shall be equivalent to:
+.sp
+.RS
+.nf
+
+\fB(void) fseek(stream, 0L, SEEK_SET)
+\fP
+.fi
+.RE
+.LP
+except that \fIrewind\fP() shall also clear the error indicator.
+.LP
+Since \fIrewind\fP() does not return a value, an application wishing
+to detect errors should clear \fIerrno\fP, then call
+\fIrewind\fP(), and if \fIerrno\fP is non-zero, assume an error has
+occurred.
+.SH RETURN VALUE
+.LP
+The \fIrewind\fP() function shall not return a value.
+.SH ERRORS
+.LP
+Refer to \fIfseek\fP() with the exception of [EINVAL] which does not
+apply.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfseek\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/rewinddir.3p b/man-pages-posix-2003/man3p/rewinddir.3p
new file mode 100644
index 0000000..ae0e1c4
--- /dev/null
+++ b/man-pages-posix-2003/man3p/rewinddir.3p
@@ -0,0 +1,71 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "REWINDDIR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" rewinddir
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+rewinddir \- reset the position of a directory stream to the beginning
+of a directory
+.SH SYNOPSIS
+.LP
+\fB#include <dirent.h>
+.br
+.sp
+void rewinddir(DIR *\fP\fIdirp\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIrewinddir\fP() function shall reset the position of the directory
+stream to which \fIdirp\fP refers to the beginning of
+the directory. It shall also cause the directory stream to refer to
+the current state of the corresponding directory, as a call to
+\fIopendir\fP() would have done. If \fIdirp\fP does not refer to a
+directory stream, the
+effect is undefined.
+.LP
+After a call to the \fIfork\fP() function, either the parent or child
+(but not both) may
+continue processing the directory stream using \fIreaddir\fP(), \fIrewinddir\fP(),
+or
+\fIseekdir\fP(). If both the
+parent and child processes use these functions, the result is undefined.
+.SH RETURN VALUE
+.LP
+The \fIrewinddir\fP() function shall not return a value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIrewinddir\fP() function should be used in conjunction with
+\fIopendir\fP(), \fIreaddir\fP(), and \fIclosedir\fP() to examine
+the contents of the directory. This method is recommended for portability.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIclosedir\fP(), \fIopendir\fP(), \fIreaddir\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<dirent.h>\fP \fI<sys/types.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/rindex.3p b/man-pages-posix-2003/man3p/rindex.3p
new file mode 100644
index 0000000..24c9a2e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/rindex.3p
@@ -0,0 +1,68 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "RINDEX" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" rindex
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+rindex \- character string operations (\fBLEGACY\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <strings.h>
+.br
+.sp
+char *rindex(const char *\fP\fIs\fP\fB, int\fP \fIc\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIrindex\fP() function shall be equivalent to \fIstrrchr\fP()
+\&.
+.SH RETURN VALUE
+.LP
+Refer to \fIstrrchr\fP().
+.SH ERRORS
+.LP
+Refer to \fIstrrchr\fP().
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIstrrchr\fP() function is preferred over this function.
+.LP
+For maximum portability, it is recommended to replace the function
+call to \fIrindex\fP() as follows:
+.sp
+.RS
+.nf
+
+\fB#define rindex(a,b) strrchr((a),(b))
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+This function may be withdrawn in a future version.
+.SH SEE ALSO
+.LP
+\fIstrrchr\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<strings.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/rint.3p b/man-pages-posix-2003/man3p/rint.3p
new file mode 100644
index 0000000..1646522
--- /dev/null
+++ b/man-pages-posix-2003/man3p/rint.3p
@@ -0,0 +1,105 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "RINT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" rint
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+rint, rintf, rintl \- round-to-nearest integral value
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double rint(double\fP \fIx\fP\fB);
+.br
+float rintf(float\fP \fIx\fP\fB);
+.br
+long double rintl(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall return the integral value (represented as a
+\fBdouble\fP) nearest \fIx\fP in the direction of the
+current rounding mode. The current rounding mode is implementation-defined.
+.LP
+If the current rounding mode rounds toward negative infinity, then
+\fIrint\fP() shall be equivalent to \fIfloor\fP(). If the current
+rounding mode rounds toward positive infinity, then \fIrint\fP() shall
+be
+equivalent to \fIceil\fP().
+.LP
+These functions differ from the \fInearbyint\fP(), \fInearbyintf\fP(),
+and \fInearbyintl\fP()
+functions only in that they may raise the inexact floating-point exception
+if the result differs in value from the argument.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the integer
+(represented as a double precision number) nearest \fIx\fP
+in the direction of the current rounding mode.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is \(+-0 or \(+-Inf, \fIx\fP shall be returned.
+.LP
+If the correct value would cause overflow, a range error shall occur
+and \fIrint\fP(), \fIrintf\fP(), and \fIrintl\fP() shall
+return the value of the macro \(+-HUGE_VAL, \(+-HUGE_VALF, and \(+-HUGE_VALL
+(with the same sign as \fIx\fP),
+respectively.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Range\ Error
+The result would cause an overflow.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the overflow floating-point exception shall be raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIabs\fP(), \fIceil\fP(), \fIfeclearexcept\fP(), \fIfetestexcept\fP(),
+\fIfloor\fP(), \fIisnan\fP(), \fInearbyint\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment
+of Error Conditions for Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/rintf.3p b/man-pages-posix-2003/man3p/rintf.3p
new file mode 100644
index 0000000..b42994e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/rintf.3p
@@ -0,0 +1 @@
+.so man3p/rint.3p
diff --git a/man-pages-posix-2003/man3p/rintl.3p b/man-pages-posix-2003/man3p/rintl.3p
new file mode 100644
index 0000000..b42994e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/rintl.3p
@@ -0,0 +1 @@
+.so man3p/rint.3p
diff --git a/man-pages-posix-2003/man3p/rmdir.3p b/man-pages-posix-2003/man3p/rmdir.3p
new file mode 100644
index 0000000..392659b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/rmdir.3p
@@ -0,0 +1,192 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "RMDIR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" rmdir
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+rmdir \- remove a directory
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+int rmdir(const char *\fP\fIpath\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIrmdir\fP() function shall remove a directory whose name is
+given by \fIpath\fP. The directory shall be removed only if
+it is an empty directory.
+.LP
+If the directory is the root directory or the current working directory
+of any process, it is unspecified whether the function
+succeeds, or whether it shall fail and set \fIerrno\fP to [EBUSY].
+.LP
+If \fIpath\fP names a symbolic link, then \fIrmdir\fP() shall fail
+and set \fIerrno\fP to [ENOTDIR].
+.LP
+If the \fIpath\fP argument refers to a path whose final component
+is either dot or dot-dot, \fIrmdir\fP() shall fail.
+.LP
+If the directory's link count becomes 0 and no process has the directory
+open, the space occupied by the directory shall be
+freed and the directory shall no longer be accessible. If one or more
+processes have the directory open when the last link is
+removed, the dot and dot-dot entries, if present, shall be removed
+before \fIrmdir\fP() returns and no new entries may be created
+in the directory, but the directory shall not be removed until all
+references to the directory are closed.
+.LP
+If the directory is not an empty directory, \fIrmdir\fP() shall fail
+and set \fIerrno\fP to [EEXIST] or [ENOTEMPTY].
+.LP
+Upon successful completion, the \fIrmdir\fP() function shall mark
+for update the \fIst_ctime\fP and \fIst_mtime\fP fields of
+the parent directory.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the function \fIrmdir\fP() shall return
+0. Otherwise, -1 shall be returned, and \fIerrno\fP set to
+indicate the error. If -1 is returned, the named directory shall not
+be changed.
+.SH ERRORS
+.LP
+The \fIrmdir\fP() function shall fail if:
+.TP 7
+.B EACCES
+Search permission is denied on a component of the path prefix, or
+write permission is denied on the parent directory of the
+directory to be removed.
+.TP 7
+.B EBUSY
+The directory to be removed is currently in use by the system or some
+process and the implementation considers this to be an
+error.
+.TP 7
+.B EEXIST \fRor\fP ENOTEMPTY
+The \fIpath\fP argument names a directory that is not an empty directory,
+or there are hard links to the directory other than dot
+or a single entry in dot-dot.
+.TP 7
+.B EINVAL
+The \fIpath\fP argument contains a last component that is dot.
+.TP 7
+.B EIO
+A physical I/O error has occurred.
+.TP 7
+.B ELOOP
+A loop exists in symbolic links encountered during resolution of the
+\fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+The length of the \fIpath\fP argument exceeds {PATH_MAX} or a pathname
+component is longer than {NAME_MAX}.
+.TP 7
+.B ENOENT
+A component of \fIpath\fP does not name an existing file, or the \fIpath\fP
+argument names a nonexistent directory or points
+to an empty string.
+.TP 7
+.B ENOTDIR
+A component of \fIpath\fP is not a directory.
+.TP 7
+.B EPERM \fRor\fP EACCES
+.sp
+The S_ISVTX flag is set on the parent directory of the directory to
+be removed and the caller is not the owner of the directory to
+be removed, nor is the caller the owner of the parent directory, nor
+does the caller have the appropriate privileges.
+.TP 7
+.B EROFS
+The directory entry to be removed resides on a read-only file system.
+.sp
+.LP
+The \fIrmdir\fP() function may fail if:
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the \fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+As a result of encountering a symbolic link in resolution of the \fIpath\fP
+argument, the length of the substituted pathname
+string exceeded {PATH_MAX}.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Removing a Directory
+.LP
+The following example shows how to remove a directory named \fB/home/cnd/mod1\fP.
+.sp
+.RS
+.nf
+
+\fB#include <unistd.h>
+.sp
+
+int status;
+\&...
+status = rmdir("/home/cnd/mod1");
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIrmdir\fP() and \fIrename\fP() functions originated in 4.2 BSD,
+and they used
+[ENOTEMPTY] for the condition when the directory to be removed does
+not exist or \fInew\fP already exists. When the 1984
+/usr/group standard was published, it contained [EEXIST] instead.
+When these functions were adopted into System V, the 1984
+/usr/group standard was used as a reference. Therefore, several existing
+applications and implementations support/use both forms,
+and no agreement could be reached on either value. All implementations
+are required to supply both [EEXIST] and [ENOTEMPTY] in \fI<errno.h>\fP
+with distinct values, so that applications can use both values in
+C-language \fBcase\fP statements.
+.LP
+The meaning of deleting \fIpathname\fP \fB/dot\fP is unclear, because
+the name of the file (directory) in the parent directory
+to be removed is not clear, particularly in the presence of multiple
+links to a directory.
+.LP
+The POSIX.1-1990 standard was silent with regard to the behavior of
+\fIrmdir\fP() when there are multiple hard links to the
+directory being removed. The requirement to set \fIerrno\fP to [EEXIST]
+or [ENOTEMPTY] clarifies the behavior in this case.
+.LP
+If the process' current working directory is being removed, that should
+be an allowed error.
+.LP
+Virtually all existing implementations detect [ENOTEMPTY] or the case
+of dot-dot. The text in \fIError Numbers\fP about returning any one
+of the possible errors permits that behavior to
+continue. The [ELOOP] error may be returned if more than {SYMLOOP_MAX}
+symbolic links are encountered during resolution of the
+\fIpath\fP argument.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIError Numbers\fP, \fImkdir\fP(), \fIremove\fP(), \fIunlink\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/round.3p b/man-pages-posix-2003/man3p/round.3p
new file mode 100644
index 0000000..0ae7a35
--- /dev/null
+++ b/man-pages-posix-2003/man3p/round.3p
@@ -0,0 +1,94 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ROUND" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" round
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+round, roundf, roundl \- round to the nearest integer value in a floating-point
+format
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double round(double\fP \fIx\fP\fB);
+.br
+float roundf(float\fP \fIx\fP\fB);
+.br
+long double roundl(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall round their argument to the nearest integer
+value in floating-point format, rounding halfway cases away
+from zero, regardless of the current rounding direction.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the rounded
+integer value.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is \(+-0 or \(+-Inf, \fIx\fP shall be returned.
+.LP
+If the correct value would cause overflow, a range error shall occur
+and \fIround\fP(), \fIroundf\fP(), and \fIroundl\fP() shall
+return the value of the macro \(+-HUGE_VAL, \(+-HUGE_VALF, and \(+-HUGE_VALL
+(with the same sign as \fIx\fP),
+respectively.
+.SH ERRORS
+.LP
+These functions may fail if:
+.TP 7
+Range\ Error
+The result overflows.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the overflow floating-point exception shall be raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeclearexcept\fP(), \fIfetestexcept\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment
+of
+Error Conditions for Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/roundf.3p b/man-pages-posix-2003/man3p/roundf.3p
new file mode 100644
index 0000000..b4a56d3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/roundf.3p
@@ -0,0 +1 @@
+.so man3p/round.3p
diff --git a/man-pages-posix-2003/man3p/roundl.3p b/man-pages-posix-2003/man3p/roundl.3p
new file mode 100644
index 0000000..b4a56d3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/roundl.3p
@@ -0,0 +1 @@
+.so man3p/round.3p
diff --git a/man-pages-posix-2003/man3p/scalb.3p b/man-pages-posix-2003/man3p/scalb.3p
new file mode 100644
index 0000000..c654756
--- /dev/null
+++ b/man-pages-posix-2003/man3p/scalb.3p
@@ -0,0 +1,140 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SCALB" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" scalb
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+scalb \- load exponent of a radix-independent floating-point number
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double scalb(double\fP \fIx\fP\fB, double\fP \fIn\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIscalb\fP() function shall compute \fIx\fP*\fIr**n\fP, where
+\fIr\fP is the radix of the
+machine's floating-point arithmetic. When \fIr\fP is 2, \fIscalb\fP()
+shall be equivalent to \fIldexp\fP(). The value of \fIr\fP is FLT_RADIX
+which is defined in \fI<float.h>\fP.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIscalb\fP() function shall return
+\fIx\fP*\fIr**n\fP.
+.LP
+If \fIx\fP or \fIn\fP is NaN, a NaN shall be returned.
+.LP
+If \fIn\fP is zero, \fIx\fP shall be returned.
+.LP
+If \fIx\fP is \(+-Inf and \fIn\fP is not -Inf, \fIx\fP shall be returned.
+.LP
+If \fIx\fP is \(+-0 and \fIn\fP is not +Inf, \fIx\fP shall be returned.
+.LP
+If \fIx\fP is \(+-0 and \fIn\fP is +Inf, a domain error shall occur,
+and either a NaN (if supported), or an
+implementation-defined value shall be returned.
+.LP
+If \fIx\fP is \(+-Inf and \fIn\fP is -Inf, a domain error shall occur,
+and either a NaN (if supported), or an
+implementation-defined value shall be returned.
+.LP
+If the result would cause an overflow, a range error shall occur and
+\(+-HUGE_VAL (according to the sign of \fIx\fP) shall
+be returned.
+.LP
+If the correct value would cause underflow, and is representable,
+a range error may occur and the correct value shall be
+returned.
+.LP
+If the correct value would cause underflow, and is not representable,
+a range error may occur, and 0.0 shall be returned.
+.SH ERRORS
+.LP
+The \fIscalb\fP() function shall fail if:
+.TP 7
+Domain\ Error
+If \fIx\fP is zero and \fIn\fP is +Inf, or \fIx\fP is Inf and \fIn\fP
+is -Inf.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [EDOM]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the invalid floating-point exception shall be
+raised.
+.TP 7
+Range\ Error
+The result would overflow.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the overflow floating-point exception shall be
+raised.
+.sp
+.LP
+The \fIscalb\fP() function may fail if:
+.TP 7
+Range\ Error
+The result underflows.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the underflow floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Applications should use either \fIscalbln\fP(), \fIscalblnf\fP(),
+or \fIscalblnl\fP() in preference to
+this function.
+.LP
+IEEE\ Std\ 1003.1-2001 only defines the behavior for the \fIscalb\fP()
+function when the \fIn\fP argument is an
+integer, a NaN, or Inf. The behavior of other values for the \fIn\fP
+argument is unspecified.
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIilogb\fP(), \fIldexp\fP(),
+\fIlogb\fP(), \fIscalbln\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment of Error Conditions
+for Mathematical Functions, \fI<float.h>\fP, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/scalbln.3p b/man-pages-posix-2003/man3p/scalbln.3p
new file mode 100644
index 0000000..51164a1
--- /dev/null
+++ b/man-pages-posix-2003/man3p/scalbln.3p
@@ -0,0 +1 @@
+.so man3p/scalbn.3p
diff --git a/man-pages-posix-2003/man3p/scalblnf.3p b/man-pages-posix-2003/man3p/scalblnf.3p
new file mode 100644
index 0000000..51164a1
--- /dev/null
+++ b/man-pages-posix-2003/man3p/scalblnf.3p
@@ -0,0 +1 @@
+.so man3p/scalbn.3p
diff --git a/man-pages-posix-2003/man3p/scalblnl.3p b/man-pages-posix-2003/man3p/scalblnl.3p
new file mode 100644
index 0000000..51164a1
--- /dev/null
+++ b/man-pages-posix-2003/man3p/scalblnl.3p
@@ -0,0 +1 @@
+.so man3p/scalbn.3p
diff --git a/man-pages-posix-2003/man3p/scalbn.3p b/man-pages-posix-2003/man3p/scalbn.3p
new file mode 100644
index 0000000..57474a9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/scalbn.3p
@@ -0,0 +1,131 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SCALBLN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" scalbln
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+scalbln, scalblnf, scalblnl, scalbn, scalbnf, scalbnl \- compute exponent
+using FLT_RADIX
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double scalbln(double\fP \fIx\fP\fB, long\fP \fIn\fP\fB);
+.br
+float scalblnf(float\fP \fIx\fP\fB, long\fP \fIn\fP\fB);
+.br
+long double scalblnl(long double\fP \fIx\fP\fB, long\fP \fIn\fP\fB);
+.br
+double scalbn(double\fP \fIx\fP\fB, int\fP \fIn\fP\fB);
+.br
+float scalbnf(float\fP \fIx\fP\fB, int\fP \fIn\fP\fB);
+.br
+long double scalbnl(long double\fP \fIx\fP\fB, int\fP \fIn\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute \fIx\fP\ *\ FLT_RADIX\fI**n\fP efficiently,
+not normally by
+computing FLT_RADIX\fI**n\fP explicitly.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return \fIx\fP\ *\ FLT_RADIX\fI**n\fP.
+.LP
+If the result would cause overflow, a range error shall occur and
+these functions shall return \(+-HUGE_VAL,
+\(+-HUGE_VALF, and \(+-HUGE_VALL (according to the sign of \fIx\fP)
+as appropriate for the return type of the
+function.
+.LP
+If the correct value would cause underflow, and is not representable,
+a range error may occur, and either 0.0 (if
+supported), or an implementation-defined value shall be
+returned.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is \(+-0 or \(+-Inf, \fIx\fP shall be returned.
+.LP
+If \fIn\fP is 0, \fIx\fP shall be returned.
+.LP
+If the correct value would cause underflow, and is representable,
+a range error may occur and the correct value shall be
+returned.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Range\ Error
+The result overflows.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the overflow floating-point exception shall be
+raised.
+.sp
+.LP
+These functions may fail if:
+.TP 7
+Range\ Error
+The result underflows.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the underflow floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+These functions are named so as to avoid conflicting with the historical
+definition of the \fIscalb\fP() function from the Single UNIX Specification.
+The difference is that the \fIscalb\fP() function has a second argument
+of \fBdouble\fP instead of \fBint\fP. The \fIscalb\fP() function is
+not part of the ISO\ C standard. The three functions whose second
+type
+is \fBlong\fP are provided because the factor required to scale from
+the smallest positive floating-point value to the largest
+finite one, on many implementations, is too large to represent in
+the minimum-width \fBint\fP format.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIscalb\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment
+of Error Conditions for Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/scalbnf.3p b/man-pages-posix-2003/man3p/scalbnf.3p
new file mode 100644
index 0000000..51164a1
--- /dev/null
+++ b/man-pages-posix-2003/man3p/scalbnf.3p
@@ -0,0 +1 @@
+.so man3p/scalbn.3p
diff --git a/man-pages-posix-2003/man3p/scalbnl.3p b/man-pages-posix-2003/man3p/scalbnl.3p
new file mode 100644
index 0000000..51164a1
--- /dev/null
+++ b/man-pages-posix-2003/man3p/scalbnl.3p
@@ -0,0 +1 @@
+.so man3p/scalbn.3p
diff --git a/man-pages-posix-2003/man3p/scanf.3p b/man-pages-posix-2003/man3p/scanf.3p
new file mode 100644
index 0000000..604c271
--- /dev/null
+++ b/man-pages-posix-2003/man3p/scanf.3p
@@ -0,0 +1,536 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FSCANF" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fscanf
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fscanf, scanf, sscanf \- convert formatted input
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+int fscanf(FILE *restrict\fP \fIstream\fP\fB, const char *restrict\fP
+\fIformat\fP\fB, ... );
+.br
+int scanf(const char *restrict\fP \fIformat\fP\fB, ... );
+.br
+int sscanf(const char *restrict\fP \fIs\fP\fB, const char *restrict\fP
+\fIformat\fP\fB, ... );
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfscanf\fP() function shall read from the named input \fIstream\fP.
+The \fIscanf\fP() function shall read from the
+standard input stream \fIstdin\fP. The \fIsscanf\fP() function shall
+read from the string \fIs\fP. Each function reads bytes,
+interprets them according to a format, and stores the results in its
+arguments. Each expects, as arguments, a control string
+\fIformat\fP described below, and a set of \fIpointer\fP arguments
+indicating where the converted input should be stored. The
+result is undefined if there are insufficient arguments for the format.
+If the format is exhausted while arguments remain, the
+excess arguments shall be evaluated but otherwise ignored.
+.LP
+Conversions can be applied to the \fIn\fPth argument after the \fIformat\fP
+in the argument list, rather than to the next unused
+argument. In this case, the conversion specifier character \fB%\fP
+(see below) is replaced by the sequence
+\fB"%\fP\fIn\fP\fB$"\fP, where \fIn\fP is a decimal integer in the
+range [1,{NL_ARGMAX}]. This feature provides for the
+definition of format strings that select arguments in an order appropriate
+to specific languages. In format strings containing the
+\fB"%\fP\fIn\fP\fB$"\fP form of conversion specifications, it is unspecified
+whether numbered arguments in the argument list
+can be referenced from the format string more than once.
+.LP
+The \fIformat\fP can contain either form of a conversion specification-that
+is, \fB%\fP or
+\fB"%\fP\fIn\fP\fB$"\fP-but the two forms cannot be mixed within a
+single \fIformat\fP string. The only exception to this
+is that \fB%%\fP or \fB%*\fP can be mixed with the \fB"%\fP\fIn\fP\fB$"\fP
+form. When numbered argument specifications
+are used, specifying the \fIN\fPth argument requires that all the
+leading arguments, from the first to the ( \fIN\fP-1)th, are
+pointers.
+.LP
+The
+\fIfscanf\fP() function in all its forms shall allow detection of
+a language-dependent radix character in the input string. The
+radix character is defined in the program's locale (category \fILC_NUMERIC
+).\fP In the POSIX locale, or in a locale where the
+radix character is not defined, the radix character shall default
+to a period ( \fB'.'\fP ).
+.LP
+The format is a character string, beginning and ending in its initial
+shift state, if any, composed of zero or more directives.
+Each directive is composed of one of the following: one or more white-space
+characters ( <space>s, <tab>s,
+<newline>s, <vertical-tab>s, or <form-feed>s); an ordinary character
+(neither \fB'%'\fP nor a white-space
+character); or a conversion specification. Each conversion specification
+is introduced by the character \fB'%'\fP or the
+character sequence \fB"%\fP\fIn\fP\fB$"\fP, after
+which the following appear in sequence:
+.IP " *" 3
+An optional assignment-suppressing character \fB'*'\fP .
+.LP
+.IP " *" 3
+An optional non-zero decimal integer that specifies the maximum field
+width.
+.LP
+.IP " *" 3
+An option length modifier that specifies the size of the receiving
+object.
+.LP
+.IP " *" 3
+A \fIconversion specifier\fP character that specifies the type of
+conversion to be applied. The valid conversion specifiers are
+described below.
+.LP
+.LP
+The \fIfscanf\fP() functions shall execute each directive of the format
+in turn. If a directive fails, as detailed below, the
+function shall return. Failures are described as input failures (due
+to the unavailability of input bytes) or matching failures
+(due to inappropriate input).
+.LP
+A directive composed of one or more white-space characters shall be
+executed by reading input until no more valid input can be
+read, or up to the first byte which is not a white-space character,
+which remains unread.
+.LP
+A directive that is an ordinary character shall be executed as follows:
+the next byte shall be read from the input and compared
+with the byte that comprises the directive; if the comparison shows
+that they are not equivalent, the directive shall fail, and the
+differing and subsequent bytes shall remain unread. Similarly, if
+end-of-file, an encoding error, or a read error prevents a
+character from being read, the directive shall fail.
+.LP
+A directive that is a conversion specification defines a set of matching
+input sequences, as described below for each conversion
+character. A conversion specification shall be executed in the following
+steps.
+.LP
+Input white-space characters (as specified by \fIisspace\fP()) shall
+be skipped, unless the
+conversion specification includes a \fB[\fP, \fBc\fP, \fBC\fP,
+or \fBn\fP conversion specifier.
+.LP
+An item shall be read from the input, unless the conversion specification
+includes an \fBn\fP conversion specifier. An input
+item shall be defined as the longest sequence of input bytes (up to
+any specified maximum field width, which may be measured in
+characters or bytes dependent on the conversion specifier) which is
+an initial subsequence of a matching sequence. The first byte,
+if any, after the input item shall remain unread. If the length of
+the input item is 0, the execution of the conversion
+specification shall fail; this condition is a matching failure, unless
+end-of-file, an encoding error, or a read error prevented
+input from the stream, in which case it is an input failure.
+.LP
+Except in the case of a \fB%\fP conversion specifier, the input item
+(or, in the case of a \fB%n\fP conversion
+specification, the count of input bytes) shall be converted to a type
+appropriate to the conversion character. If the input item is
+not a matching sequence, the execution of the conversion specification
+fails; this condition is a matching failure. Unless
+assignment suppression was indicated by a \fB'*'\fP, the result of
+the conversion shall be placed in the object pointed to by
+the first argument following the \fIformat\fP argument that has not
+already received a conversion result if the conversion
+specification is introduced by \fB%\fP, or in the \fIn\fPth argument
+if introduced by the character
+sequence \fB"%\fP\fIn\fP\fB$"\fP. If this object does not
+have an appropriate type, or if the result of the conversion cannot
+be represented in the space provided, the behavior is
+undefined.
+.LP
+The length modifiers and their meanings are:
+.TP 7
+\fBhh\fP
+Specifies that a following \fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP,
+\fBx\fP, \fBX\fP, or \fBn\fP
+conversion specifier applies to an argument with type pointer to \fBsigned
+char\fP or \fBunsigned char\fP.
+.TP 7
+\fBh\fP
+Specifies that a following \fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP,
+\fBx\fP, \fBX\fP, or \fBn\fP
+conversion specifier applies to an argument with type pointer to \fBshort\fP
+or \fBunsigned short\fP.
+.TP 7
+\fBl\fP\ (ell)
+Specifies that a following \fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP,
+\fBx\fP, \fBX\fP, or \fBn\fP
+conversion specifier applies to an argument with type pointer to \fBlong\fP
+or \fBunsigned long\fP; that a following \fBa\fP,
+\fBA\fP, \fBe\fP, \fBE\fP, \fBf\fP, \fBF\fP, \fBg\fP, or \fBG\fP
+conversion specifier applies to an
+argument with type pointer to \fBdouble\fP; or that a following \fBc\fP,
+\fBs\fP, or \fB[\fP conversion specifier
+applies to an argument with type pointer to \fBwchar_t\fP.
+.TP 7
+\fBll\fP\ (ell-ell)
+.sp
+Specifies that a following \fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP,
+\fBx\fP, \fBX\fP, or \fBn\fP conversion
+specifier applies to an argument with type pointer to \fBlong long\fP
+or \fBunsigned long long\fP.
+.TP 7
+\fBj\fP
+Specifies that a following \fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP,
+\fBx\fP, \fBX\fP, or \fBn\fP
+conversion specifier applies to an argument with type pointer to \fBintmax_t\fP
+or \fBuintmax_t\fP.
+.TP 7
+\fBz\fP
+Specifies that a following \fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP,
+\fBx\fP, \fBX\fP, or \fBn\fP
+conversion specifier applies to an argument with type pointer to \fBsize_t\fP
+or the corresponding signed integer type.
+.TP 7
+\fBt\fP
+Specifies that a following \fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP,
+\fBx\fP, \fBX\fP, or \fBn\fP
+conversion specifier applies to an argument with type pointer to \fBptrdiff_t\fP
+or the corresponding \fBunsigned\fP type.
+.TP 7
+\fBL\fP
+Specifies that a following \fBa\fP, \fBA\fP, \fBe\fP, \fBE\fP,
+\fBf\fP, \fBF\fP, \fBg\fP, or
+\fBG\fP conversion specifier applies to an argument with type pointer
+to \fBlong double\fP.
+.sp
+.LP
+If a length modifier appears with any conversion specifier other than
+as specified above, the behavior is undefined.
+.LP
+The following conversion specifiers are valid:
+.TP 7
+\fBd\fP
+Matches an optionally signed decimal integer, whose format is the
+same as expected for the subject sequence of \fIstrtol\fP() with the
+value 10 for the \fIbase\fP argument. In the absence of a size modifier,
+the application shall ensure that the corresponding argument is a
+pointer to \fBint\fP.
+.TP 7
+\fBi\fP
+Matches an optionally signed integer, whose format is the same as
+expected for the subject sequence of \fIstrtol\fP() with 0 for the
+\fIbase\fP argument. In the absence of a size modifier, the
+application shall ensure that the corresponding argument is a pointer
+to \fBint\fP.
+.TP 7
+\fBo\fP
+Matches an optionally signed octal integer, whose format is the same
+as expected for the subject sequence of \fIstrtoul\fP() with the value
+8 for the \fIbase\fP argument. In the absence of a size modifier,
+the application shall ensure that the corresponding argument is a
+pointer to \fBunsigned\fP.
+.TP 7
+\fBu\fP
+Matches an optionally signed decimal integer, whose format is the
+same as expected for the subject sequence of \fIstrtoul\fP() with
+the value 10 for the \fIbase\fP argument. In the absence of a size
+modifier,
+the application shall ensure that the corresponding argument is a
+pointer to \fBunsigned\fP.
+.TP 7
+\fBx\fP
+Matches an optionally signed hexadecimal integer, whose format is
+the same as expected for the subject sequence of \fIstrtoul\fP() with
+the value 16 for the \fIbase\fP argument. In the absence of a size
+modifier,
+the application shall ensure that the corresponding argument is a
+pointer to \fBunsigned\fP.
+.TP 7
+\fBa\fP,\ \fBe\fP,\ \fBf\fP,\ \fBg\fP
+.sp
+Matches an optionally signed floating-point number, infinity, or NaN,
+whose format is the same as expected for the subject sequence
+of \fIstrtod\fP(). In the absence of a size modifier, the application
+shall ensure that the
+corresponding argument is a pointer to \fBfloat\fP.
+.LP
+If the \fIfprintf\fP() family of functions generates character string
+representations
+for infinity and NaN (a symbolic entity encoded in floating-point
+format) to support IEEE\ Std\ 754-1985, the
+\fIfscanf\fP() family of functions shall recognize them as input.
+.TP 7
+\fBs\fP
+Matches a sequence of bytes that are not white-space characters. The
+application shall ensure that the corresponding argument
+is a pointer to the initial byte of an array of \fBchar\fP, \fBsigned
+char\fP, or \fBunsigned char\fP large enough to accept the
+sequence and a terminating null character code, which shall be added
+automatically.
+.LP
+If an \fBl\fP (ell) qualifier is present, the input is a sequence
+of characters that begins in the initial shift state. Each
+character shall be converted to a wide character as if by a call to
+the \fImbrtowc\fP()
+function, with the conversion state described by an \fBmbstate_t\fP
+object initialized to zero before the first character is
+converted. The application shall ensure that the corresponding argument
+is a pointer to an array of \fBwchar_t\fP large enough to
+accept the sequence and the terminating null wide character, which
+shall be added automatically.
+.TP 7
+\fB[\fP
+Matches a non-empty sequence of bytes from a set of expected bytes
+(the \fIscanset\fP). The normal skip over white-space
+characters shall be suppressed in this case. The application shall
+ensure that the corresponding argument is a pointer to the
+initial byte of an array of \fBchar\fP, \fBsigned char\fP, or \fBunsigned
+char\fP large enough to accept the sequence and a
+terminating null byte, which shall be added automatically.
+.LP
+If an \fBl\fP (ell) qualifier is present, the input is a sequence
+of characters that begins in the initial shift state. Each
+character in the sequence shall be converted to a wide character as
+if by a call to the \fImbrtowc\fP() function, with the conversion
+state described by an \fBmbstate_t\fP object
+initialized to zero before the first character is converted. The application
+shall ensure that the corresponding argument is a
+pointer to an array of \fBwchar_t\fP large enough to accept the sequence
+and the terminating null wide character, which shall be
+added automatically.
+.LP
+The conversion specification includes all subsequent bytes in the
+\fIformat\fP string up to and including the matching right
+square bracket ( \fB']'\fP ). The bytes between the square brackets
+(the \fIscanlist\fP) comprise the scanset, unless the byte
+after the left square bracket is a circumflex ( \fB'^'\fP ), in which
+case the scanset contains all bytes that do not appear in
+the scanlist between the circumflex and the right square bracket.
+If the conversion specification begins with \fB"[]"\fP or
+\fB"[^]"\fP, the right square bracket is included in the scanlist
+and the next right square bracket is the matching right
+square bracket that ends the conversion specification; otherwise,
+the first right square bracket is the one that ends the
+conversion specification. If a \fB'-'\fP is in the scanlist and is
+not the first character, nor the second where the first
+character is a \fB'^'\fP, nor the last character, the behavior is
+implementation-defined.
+.TP 7
+\fBc\fP
+Matches a sequence of bytes of the number specified by the field width
+(1 if no field width is present in the conversion
+specification). The application shall ensure that the corresponding
+argument is a pointer to the initial byte of an array of
+\fBchar\fP, \fBsigned char\fP, or \fBunsigned char\fP large enough
+to accept the sequence. No null byte is added. The normal
+skip over white-space characters shall be suppressed in this case.
+.LP
+If an \fBl\fP (ell) qualifier is present, the input shall be a sequence
+of characters that begins in the initial shift state.
+Each character in the sequence is converted to a wide character as
+if by a call to the \fImbrtowc\fP() function, with the conversion
+state described by an \fBmbstate_t\fP object
+initialized to zero before the first character is converted. The application
+shall ensure that the corresponding argument is a
+pointer to an array of \fBwchar_t\fP large enough to accept the resulting
+sequence of wide characters. No null wide character is
+added.
+.TP 7
+\fBp\fP
+Matches an implementation-defined set of sequences, which shall be
+the same as the set of sequences that is produced by the
+\fB%p\fP conversion specification of the corresponding \fIfprintf\fP()
+functions. The
+application shall ensure that the corresponding argument is a pointer
+to a pointer to \fBvoid\fP. The interpretation of the input
+item is implementation-defined. If the input item is a value converted
+earlier during the same program execution, the pointer that
+results shall compare equal to that value; otherwise, the behavior
+of the \fB%p\fP conversion specification is undefined.
+.TP 7
+\fBn\fP
+No input is consumed. The application shall ensure that the corresponding
+argument is a pointer to the integer into which shall
+be written the number of bytes read from the input so far by this
+call to the \fIfscanf\fP() functions. Execution of a \fB%n\fP
+conversion specification shall not increment the assignment count
+returned at the completion of execution of the function. No
+argument shall be converted, but one shall be consumed. If the conversion
+specification includes an assignment-suppressing
+character or a field width, the behavior is undefined.
+.TP 7
+\fBC\fP
+Equivalent to \fBlc\fP .
+.TP 7
+\fBS\fP
+Equivalent to \fBls\fP .
+.TP 7
+\fB%\fP
+Matches a single \fB'%'\fP character; no conversion or assignment
+occurs. The complete conversion specification shall be
+\fB%%\fP .
+.sp
+.LP
+If a conversion specification is invalid, the behavior is undefined.
+.LP
+The conversion specifiers \fBA\fP, \fBE\fP, \fBF\fP, \fBG\fP,
+and \fBX\fP are also valid and shall be
+equivalent to \fBa\fP, \fBe\fP, \fBf\fP, \fBg\fP, and \fBx\fP,
+respectively.
+.LP
+If end-of-file is encountered during input, conversion shall be terminated.
+If end-of-file occurs before any bytes matching the
+current conversion specification (except for \fB%n\fP ) have been
+read (other than leading white-space characters, where
+permitted), execution of the current conversion specification shall
+terminate with an input failure. Otherwise, unless execution of
+the current conversion specification is terminated with a matching
+failure, execution of the following conversion specification (if
+any) shall be terminated with an input failure.
+.LP
+Reaching the end of the string in \fIsscanf\fP() shall be equivalent
+to encountering end-of-file for \fIfscanf\fP().
+.LP
+If conversion terminates on a conflicting input, the offending input
+is left unread in the input. Any trailing white space
+(including <newline>s) shall be left unread unless matched by a conversion
+specification. The success of literal matches and
+suppressed assignments is only directly determinable via the \fB%n\fP
+conversion specification.
+.LP
+The
+\fIfscanf\fP() and \fIscanf\fP() functions may mark the \fIst_atime\fP
+field of the file associated with \fIstream\fP for
+update. The \fIst_atime\fP field shall be marked for update by the
+first successful execution of \fIfgetc\fP(), \fIfgets\fP(), \fIfread\fP(),
+\fIgetc\fP(), \fIgetchar\fP(), \fIgets\fP(), \fIfscanf\fP(), or
+\fIfscanf\fP() using \fIstream\fP that returns data not supplied by
+a prior call to \fIungetc\fP().
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the number
+of successfully matched and assigned input items; this
+number can be zero in the event of an early matching failure. If the
+input ends before the first matching failure or conversion,
+EOF shall be returned. If a read error occurs, the error indicator
+for the stream is set, EOF shall be returned, and
+\fIerrno\fP shall be set to indicate the error.
+.SH ERRORS
+.LP
+For the conditions under which the \fIfscanf\fP() functions fail and
+may fail, refer to \fIfgetc\fP()
+or \fIfgetwc\fP().
+.LP
+In addition, \fIfscanf\fP() may fail if:
+.TP 7
+.B EILSEQ
+Input byte sequence does not form a valid character.
+.TP 7
+.B EINVAL
+There are insufficient arguments.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+The call:
+.sp
+.RS
+.nf
+
+\fBint i, n; float x; char name[50];
+n = scanf("%d%f%s", &i, &x, name);
+\fP
+.fi
+.RE
+.LP
+with the input line:
+.sp
+.RS
+.nf
+
+\fB25 54.32E-1 Hamster
+\fP
+.fi
+.RE
+.LP
+assigns to \fIn\fP the value 3, to \fIi\fP the value 25, to \fIx\fP
+the value 5.432, and \fIname\fP contains the string
+\fB"Hamster"\fP .
+.LP
+The call:
+.sp
+.RS
+.nf
+
+\fBint i; float x; char name[50];
+(void) scanf("%2d%f%*d %[0123456789]", &i, &x, name);
+\fP
+.fi
+.RE
+.LP
+with input:
+.sp
+.RS
+.nf
+
+\fB56789 0123 56a72
+\fP
+.fi
+.RE
+.LP
+assigns 56 to \fIi\fP, 789.0 to \fIx\fP, skips 0123, and places the
+string \fB"56\\0"\fP in \fIname\fP. The next call to \fIgetchar\fP()
+shall return the character \fB'a'\fP .
+.SS Reading Data into an Array
+.LP
+The following call uses \fIfscanf\fP() to read three floating-point
+numbers from standard input into the \fIinput\fP
+array.
+.sp
+.RS
+.nf
+
+\fBfloat input[3]; fscanf (stdin, "%f %f %f", input, input+1, input+2);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+If the application calling \fIfscanf\fP() has any objects of type
+\fBwint_t\fP or \fBwchar_t\fP, it must also include the \fI<wchar.h>\fP
+header to have these objects defined.
+.SH RATIONALE
+.LP
+This function is aligned with the ISO/IEC\ 9899:1999 standard, and
+in doing so a few "obvious" things were not included.
+Specifically, the set of characters allowed in a scanset is limited
+to single-byte characters. In other similar places, multi-byte
+characters have been permitted, but for alignment with the ISO/IEC\ 9899:1999
+standard, it has not been done here. Applications
+needing this could use the corresponding wide-character functions
+to achieve the desired results.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgetc\fP(), \fIprintf\fP(), \fIsetlocale\fP(), \fIstrtod\fP(),
+\fIstrtol\fP(),
+\fIstrtoul\fP(), \fIwcrtomb\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 7, Locale, \fI<langinfo.h>\fP, \fI<stdio.h>\fP,
+\fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sched_get_priority_max.3p b/man-pages-posix-2003/man3p/sched_get_priority_max.3p
new file mode 100644
index 0000000..c029293
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sched_get_priority_max.3p
@@ -0,0 +1,76 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SCHED_GET_PRIORITY_MAX" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sched_get_priority_max
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sched_get_priority_max, sched_get_priority_min \- get priority limits
+(\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <sched.h>
+.br
+.sp
+int sched_get_priority_max(int\fP \fIpolicy\fP\fB);
+.br
+int sched_get_priority_min(int\fP \fIpolicy\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsched_get_priority_max\fP() and \fIsched_get_priority_min\fP()
+functions shall return the appropriate maximum or
+minimum, respectively, for the scheduling policy specified by \fIpolicy\fP.
+.LP
+The value of \fIpolicy\fP shall be one of the scheduling policy values
+defined in \fI<sched.h>\fP.
+.SH RETURN VALUE
+.LP
+If successful, the \fIsched_get_priority_max\fP() and \fIsched_get_priority_min\fP()
+functions shall return the appropriate
+maximum or minimum values, respectively. If unsuccessful, they shall
+return a value of -1 and set \fIerrno\fP to indicate the
+error.
+.SH ERRORS
+.LP
+The \fIsched_get_priority_max\fP() and \fIsched_get_priority_min\fP()
+functions shall fail if:
+.TP 7
+.B EINVAL
+The value of the \fIpolicy\fP parameter does not represent a defined
+scheduling policy.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsched_getparam\fP(), \fIsched_setparam\fP(), \fIsched_getscheduler\fP(),
+\fIsched_rr_get_interval\fP(),
+\fIsched_setscheduler\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<sched.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sched_get_priority_min.3p b/man-pages-posix-2003/man3p/sched_get_priority_min.3p
new file mode 100644
index 0000000..5ad82b2
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sched_get_priority_min.3p
@@ -0,0 +1 @@
+.so man3p/sched_get_priority_max.3p
diff --git a/man-pages-posix-2003/man3p/sched_getparam.3p b/man-pages-posix-2003/man3p/sched_getparam.3p
new file mode 100644
index 0000000..3e2f839
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sched_getparam.3p
@@ -0,0 +1,80 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SCHED_GETPARAM" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sched_getparam
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sched_getparam \- get scheduling parameters (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <sched.h>
+.br
+.sp
+int sched_getparam(pid_t\fP \fIpid\fP\fB, struct sched_param *\fP\fIparam\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsched_getparam\fP() function shall return the scheduling parameters
+of a process specified by \fIpid\fP in the
+\fBsched_param\fP structure pointed to by \fIparam\fP.
+.LP
+If a process specified by \fIpid\fP exists, and if the calling process
+has permission, the scheduling parameters for the
+process whose process ID is equal to \fIpid\fP shall be returned.
+.LP
+If \fIpid\fP is zero, the scheduling parameters for the calling process
+shall be returned. The behavior of the
+\fIsched_getparam\fP() function is unspecified if the value of \fIpid\fP
+is negative.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIsched_getparam\fP() function shall
+return zero. If the call to \fIsched_getparam\fP() is
+unsuccessful, the function shall return a value of -1 and set \fIerrno\fP
+to indicate the error.
+.SH ERRORS
+.LP
+The \fIsched_getparam\fP() function shall fail if:
+.TP 7
+.B EPERM
+The requesting process does not have permission to obtain the scheduling
+parameters of the specified process.
+.TP 7
+.B ESRCH
+No process can be found corresponding to that specified by \fIpid\fP.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsched_getscheduler\fP(), \fIsched_setparam\fP(),
+\fIsched_setscheduler\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<sched.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sched_getscheduler.3p b/man-pages-posix-2003/man3p/sched_getscheduler.3p
new file mode 100644
index 0000000..f9bf23a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sched_getscheduler.3p
@@ -0,0 +1,80 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SCHED_GETSCHEDULER" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sched_getscheduler
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sched_getscheduler \- get scheduling policy (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <sched.h>
+.br
+.sp
+int sched_getscheduler(pid_t\fP \fIpid\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsched_getscheduler\fP() function shall return the scheduling
+policy of the process specified by \fIpid\fP. If the value
+of \fIpid\fP is negative, the behavior of the \fIsched_getscheduler\fP()
+function is unspecified.
+.LP
+The values that can be returned by \fIsched_getscheduler\fP() are
+defined in the \fI<sched.h>\fP header.
+.LP
+If a process specified by \fIpid\fP exists, and if the calling process
+has permission, the scheduling policy shall be returned
+for the process whose process ID is equal to \fIpid\fP.
+.LP
+If \fIpid\fP is zero, the scheduling policy shall be returned for
+the calling process.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIsched_getscheduler\fP() function
+shall return the scheduling policy of the specified
+process. If unsuccessful, the function shall return -1 and set \fIerrno\fP
+to indicate the error.
+.SH ERRORS
+.LP
+The \fIsched_getscheduler\fP() function shall fail if:
+.TP 7
+.B EPERM
+The requesting process does not have permission to determine the scheduling
+policy of the specified process.
+.TP 7
+.B ESRCH
+No process can be found corresponding to that specified by \fIpid\fP.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsched_getparam\fP(), \fIsched_setparam\fP(), \fIsched_setscheduler\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<sched.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sched_rr_get_interval.3p b/man-pages-posix-2003/man3p/sched_rr_get_interval.3p
new file mode 100644
index 0000000..525fc93
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sched_rr_get_interval.3p
@@ -0,0 +1,69 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SCHED_RR_GET_INTERVAL" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sched_rr_get_interval
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sched_rr_get_interval \- get execution time limits (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <sched.h>
+.br
+.sp
+int sched_rr_get_interval(pid_t\fP \fIpid\fP\fB, struct timespec *\fP\fIinterval\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsched_rr_get_interval\fP() function shall update the \fBtimespec\fP
+structure referenced by the \fIinterval\fP
+argument to contain the current execution time limit (that is, time
+quantum) for the process specified by \fIpid\fP. If \fIpid\fP
+is zero, the current execution time limit for the calling process
+shall be returned.
+.SH RETURN VALUE
+.LP
+If successful, the \fIsched_rr_get_interval\fP() function shall return
+zero. Otherwise, it shall return a value of -1 and set
+\fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fIsched_rr_get_interval\fP() function shall fail if:
+.TP 7
+.B ESRCH
+No process can be found corresponding to that specified by \fIpid\fP.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsched_getparam\fP(), \fIsched_get_priority_max\fP(), \fIsched_getscheduler\fP(),
+\fIsched_setparam\fP(), \fIsched_setscheduler\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<sched.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sched_setparam.3p b/man-pages-posix-2003/man3p/sched_setparam.3p
new file mode 100644
index 0000000..33bcbd3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sched_setparam.3p
@@ -0,0 +1,183 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SCHED_SETPARAM" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sched_setparam
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sched_setparam \- set scheduling parameters (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <sched.h>
+.br
+.sp
+int sched_setparam(pid_t\fP \fIpid\fP\fB, const struct sched_param
+*\fP\fIparam\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsched_setparam\fP() function shall set the scheduling parameters
+of the process specified by \fIpid\fP to the values
+specified by the \fBsched_param\fP structure pointed to by \fIparam\fP.
+The value of the \fIsched_priority\fP member in the
+\fBsched_param\fP structure shall be any integer within the inclusive
+priority range for the current scheduling policy of the
+process specified by \fIpid\fP. Higher numerical values for the priority
+represent higher priorities. If the value of \fIpid\fP
+is negative, the behavior of the \fIsched_setparam\fP() function is
+unspecified.
+.LP
+If a process specified by \fIpid\fP exists, and if the calling process
+has permission, the scheduling parameters shall be set
+for the process whose process ID is equal to \fIpid\fP.
+.LP
+If \fIpid\fP is zero, the scheduling parameters shall be set for the
+calling process.
+.LP
+The conditions under which one process has permission to change the
+scheduling parameters of another process are
+implementation-defined.
+.LP
+Implementations may require the requesting process to have the appropriate
+privilege to set its own scheduling parameters or
+those of another process.
+.LP
+The target process, whether it is running or not running, shall be
+moved to the tail of the thread list for its priority.
+.LP
+If the priority of the process specified by the \fIpid\fP argument
+is set higher than that of the lowest priority running
+process and if the specified process is ready to run, the process
+specified by the \fIpid\fP argument shall preempt a lowest
+priority running process. Similarly, if the process calling \fIsched_setparam\fP()
+sets its own priority lower than that of one or
+more other non-empty process lists, then the process that is the head
+of the highest priority list shall also preempt the calling
+process. Thus, in either case, the originating process might not receive
+notification of the completion of the requested priority
+change until the higher priority process has executed.
+.LP
+If
+the scheduling policy of the target process is SCHED_SPORADIC, the
+value specified by the \fIsched_ss_low_priority\fP member of
+the \fIparam\fP argument shall be any integer within the inclusive
+priority range for the sporadic server policy. The
+\fIsched_ss_repl_period\fP and \fIsched_ss_init_budget\fP members
+of the \fIparam\fP argument shall represent the time
+parameters to be used by the sporadic server scheduling policy for
+the target process. The \fIsched_ss_max_repl\fP member of the
+\fIparam\fP argument shall represent the maximum number of replenishments
+that are allowed to be pending simultaneously for the
+process scheduled under this scheduling policy.
+.LP
+The specified \fIsched_ss_repl_period\fP shall be greater than or
+equal to the specified \fIsched_ss_init_budget\fP for the
+function to succeed; if it is not, then the function shall fail.
+.LP
+The value of \fIsched_ss_max_repl\fP shall be within the inclusive
+range [1, {SS_REPL_MAX}] for the function to succeed; if
+not, the function shall fail.
+.LP
+If the scheduling policy of the target process is either SCHED_FIFO
+or SCHED_RR, the \fIsched_ss_low_priority\fP,
+\fIsched_ss_repl_period\fP, and \fIsched_ss_init_budget\fP members
+of the \fIparam\fP argument shall have no effect on the
+scheduling behavior. If the scheduling policy of this process is not
+SCHED_FIFO, SCHED_RR, or SCHED_SPORADIC, the effects of these
+members are implementation-defined; this case includes the SCHED_OTHER
+policy.
+.LP
+If the current scheduling policy for the process specified by \fIpid\fP
+is not SCHED_FIFO, SCHED_RR, or
+SCHED_SPORADIC, the result is implementation-defined; this
+case includes the SCHED_OTHER policy.
+.LP
+The effect of this function on individual threads is dependent on
+the scheduling contention scope of the threads:
+.IP " *" 3
+For threads with system scheduling contention scope, these functions
+shall have no effect on their scheduling.
+.LP
+.IP " *" 3
+For threads with process scheduling contention scope, the threads'
+scheduling parameters shall not be affected. However, the
+scheduling of these threads with respect to threads in other processes
+may be dependent on the scheduling parameters of their
+process, which are governed using these functions.
+.LP
+.LP
+If an implementation supports a two-level scheduling model in which
+library threads are multiplexed on top of several
+kernel-scheduled entities, then the underlying kernel-scheduled entities
+for the system contention scope threads shall not be
+affected by these functions.
+.LP
+The underlying kernel-scheduled entities for the process contention
+scope threads shall have their scheduling parameters changed
+to the value specified in \fIparam\fP. Kernel-scheduled entities for
+use by process contention scope threads that are created
+after this call completes shall inherit their scheduling policy and
+associated scheduling parameters from the process.
+.LP
+This function is not atomic with respect to other threads in the process.
+Threads may continue to execute while this function
+call is in the process of changing the scheduling policy for the underlying
+kernel-scheduled entities used by the process
+contention scope threads.
+.SH RETURN VALUE
+.LP
+If successful, the \fIsched_setparam\fP() function shall return zero.
+.LP
+If the call to \fIsched_setparam\fP() is unsuccessful, the priority
+shall remain unchanged, and the function shall return a
+value of -1 and set \fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fIsched_setparam\fP() function shall fail if:
+.TP 7
+.B EINVAL
+One or more of the requested scheduling parameters is outside the
+range defined for the scheduling policy of the specified
+\fIpid\fP.
+.TP 7
+.B EPERM
+The requesting process does not have permission to set the scheduling
+parameters for the specified process, or does not have
+the appropriate privilege to invoke \fIsched_setparam\fP().
+.TP 7
+.B ESRCH
+No process can be found corresponding to that specified by \fIpid\fP.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsched_getparam\fP(), \fIsched_getscheduler\fP(),
+\fIsched_setscheduler\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<sched.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sched_setscheduler.3p b/man-pages-posix-2003/man3p/sched_setscheduler.3p
new file mode 100644
index 0000000..364475b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sched_setscheduler.3p
@@ -0,0 +1,175 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SCHED_SETSCHEDULER" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sched_setscheduler
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sched_setscheduler \- set scheduling policy and parameters (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <sched.h>
+.br
+.sp
+int sched_setscheduler(pid_t\fP \fIpid\fP\fB, int\fP \fIpolicy\fP\fB,
+.br
+\ \ \ \ \ \ const struct sched_param *\fP\fIparam\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsched_setscheduler\fP() function shall set the scheduling policy
+and scheduling parameters of the process specified by
+\fIpid\fP to \fIpolicy\fP and the parameters specified in the \fBsched_param\fP
+structure pointed to by \fIparam\fP,
+respectively. The value of the \fIsched_priority\fP member in the
+\fBsched_param\fP structure shall be any integer within the
+inclusive priority range for the scheduling policy specified by \fIpolicy\fP.
+If the value of \fIpid\fP is negative, the behavior
+of the \fIsched_setscheduler\fP() function is unspecified.
+.LP
+The possible values for the \fIpolicy\fP parameter are defined in
+the \fI<sched.h>\fP header.
+.LP
+If a process specified by \fIpid\fP exists, and if the calling process
+has permission, the scheduling policy and scheduling
+parameters shall be set for the process whose process ID is equal
+to \fIpid\fP.
+.LP
+If \fIpid\fP is zero, the scheduling policy and scheduling parameters
+shall be set for the calling process.
+.LP
+The conditions under which one process has the appropriate privilege
+to change the scheduling parameters of another process are
+implementation-defined.
+.LP
+Implementations may require that the requesting process have permission
+to set its own scheduling parameters or those of another
+process. Additionally, implementation-defined restrictions may apply
+as to the appropriate privileges required to set a process'
+own scheduling policy, or another process' scheduling policy, to a
+particular value.
+.LP
+The \fIsched_setscheduler\fP() function shall be considered successful
+if it succeeds in setting the scheduling policy and
+scheduling parameters of the process specified by \fIpid\fP to the
+values specified by \fIpolicy\fP and the structure pointed to
+by \fIparam\fP, respectively.
+.LP
+If
+the scheduling policy specified by \fIpolicy\fP is SCHED_SPORADIC,
+the value specified by the \fIsched_ss_low_priority\fP member
+of the \fIparam\fP argument shall be any integer within the inclusive
+priority range for the sporadic server policy. The
+\fIsched_ss_repl_period\fP and \fIsched_ss_init_budget\fP members
+of the \fIparam\fP argument shall represent the time
+parameters used by the sporadic server scheduling policy for the target
+process. The \fIsched_ss_max_repl\fP member of the
+\fIparam\fP argument shall represent the maximum number of replenishments
+that are allowed to be pending simultaneously for the
+process scheduled under this scheduling policy.
+.LP
+The specified \fIsched_ss_repl_period\fP shall be greater than or
+equal to the specified \fIsched_ss_init_budget\fP for the
+function to succeed; if it is not, then the function shall fail.
+.LP
+The value of \fIsched_ss_max_repl\fP shall be within the inclusive
+range [1, {SS_REPL_MAX}] for the function to succeed; if
+not, the function shall fail.
+.LP
+If the scheduling policy specified by \fIpolicy\fP is either SCHED_FIFO
+or SCHED_RR, the \fIsched_ss_low_priority\fP,
+\fIsched_ss_repl_period\fP, and \fIsched_ss_init_budget\fP members
+of the \fIparam\fP argument shall have no effect on the
+scheduling behavior.
+.LP
+The effect of this function on individual threads is dependent on
+the scheduling contention scope of the threads:
+.IP " *" 3
+For threads with system scheduling contention scope, these functions
+shall have no effect on their scheduling.
+.LP
+.IP " *" 3
+For threads with process scheduling contention scope, the threads'
+scheduling policy and associated parameters shall not be
+affected. However, the scheduling of these threads with respect to
+threads in other processes may be dependent on the scheduling
+parameters of their process, which are governed using these functions.
+.LP
+.LP
+If an implementation supports a two-level scheduling model in which
+library threads are multiplexed on top of several
+kernel-scheduled entities, then the underlying kernel-scheduled entities
+for the system contention scope threads shall not be
+affected by these functions.
+.LP
+The underlying kernel-scheduled entities for the process contention
+scope threads shall have their scheduling policy and
+associated scheduling parameters changed to the values specified in
+\fIpolicy\fP and \fIparam\fP, respectively. Kernel-scheduled
+entities for use by process contention scope threads that are created
+after this call completes shall inherit their scheduling
+policy and associated scheduling parameters from the process.
+.LP
+This function is not atomic with respect to other threads in the process.
+Threads may continue to execute while this function
+call is in the process of changing the scheduling policy and associated
+scheduling parameters for the underlying kernel-scheduled
+entities used by the process contention scope threads.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the function shall return the former scheduling
+policy of the specified process. If the
+\fIsched_setscheduler\fP() function fails to complete successfully,
+the policy and scheduling parameters shall remain unchanged,
+and the function shall return a value of -1 and set \fIerrno\fP to
+indicate the error.
+.SH ERRORS
+.LP
+The \fIsched_setscheduler\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The value of the \fIpolicy\fP parameter is invalid, or one or more
+of the parameters contained in \fIparam\fP is outside the
+valid range for the specified scheduling policy.
+.TP 7
+.B EPERM
+The requesting process does not have permission to set either or both
+of the scheduling parameters or the scheduling policy of
+the specified process.
+.TP 7
+.B ESRCH
+No process can be found corresponding to that specified by \fIpid\fP.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsched_getparam\fP(), \fIsched_getscheduler\fP(),
+\fIsched_setparam\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<sched.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sched_yield.3p b/man-pages-posix-2003/man3p/sched_yield.3p
new file mode 100644
index 0000000..9f726ad
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sched_yield.3p
@@ -0,0 +1,59 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SCHED_YIELD" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sched_yield
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sched_yield \- yield the processor
+.SH SYNOPSIS
+.LP
+\fB#include <sched.h>
+.br
+.sp
+int sched_yield(void); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsched_yield\fP() function shall force the running thread to
+relinquish the processor until it again becomes the head of
+its thread list. It takes no arguments.
+.SH RETURN VALUE
+.LP
+The \fIsched_yield\fP() function shall return 0 if it completes successfully;
+otherwise, it shall return a value of -1 and set
+\fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<sched.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/seed48.3p b/man-pages-posix-2003/man3p/seed48.3p
new file mode 100644
index 0000000..a71d5ed
--- /dev/null
+++ b/man-pages-posix-2003/man3p/seed48.3p
@@ -0,0 +1 @@
+.so man3p/drand48.3p
diff --git a/man-pages-posix-2003/man3p/seekdir.3p b/man-pages-posix-2003/man3p/seekdir.3p
new file mode 100644
index 0000000..0088fd8
--- /dev/null
+++ b/man-pages-posix-2003/man3p/seekdir.3p
@@ -0,0 +1,88 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SEEKDIR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" seekdir
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+seekdir \- set the position of a directory stream
+.SH SYNOPSIS
+.LP
+\fB#include <dirent.h>
+.br
+.sp
+void seekdir(DIR *\fP\fIdirp\fP\fB, long\fP \fIloc\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIseekdir\fP() function shall set the position of the next \fIreaddir\fP()
+operation on the directory stream specified by \fIdirp\fP to the position
+specified by \fIloc\fP. The value of \fIloc\fP should
+have been returned from an earlier call to \fItelldir\fP(). The new
+position reverts to
+the one associated with the directory stream when \fItelldir\fP()
+was performed.
+.LP
+If the value of \fIloc\fP was not obtained from an earlier call to
+\fItelldir\fP(), or
+if a call to \fIrewinddir\fP() occurred between the call to \fItelldir\fP()
+and the call to \fIseekdir\fP(), the results of subsequent calls to
+\fIreaddir\fP() are unspecified.
+.SH RETURN VALUE
+.LP
+The \fIseekdir\fP() function shall not return a value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The original standard developers perceived that there were restrictions
+on the use of the \fIseekdir\fP() and \fItelldir\fP() functions related
+to implementation details, and for that reason these functions
+need not be supported on all POSIX-conforming systems. They are required
+on implementations supporting the XSI extension.
+.LP
+One of the perceived problems of implementation is that returning
+to a given point in a directory is quite difficult to describe
+formally, in spite of its intuitive appeal, when systems that use
+B-trees, hashing functions, or other similar mechanisms to order
+their directories are considered. The definition of \fIseekdir\fP()
+and \fItelldir\fP()
+does not specify whether, when using these interfaces, a given directory
+entry will be seen at all, or more than once.
+.LP
+On systems not supporting these functions, their capability can sometimes
+be accomplished by saving a filename found by \fIreaddir\fP() and
+later using \fIrewinddir\fP() and a
+loop on \fIreaddir\fP() to relocate the position from which the filename
+was saved.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIopendir\fP(), \fIreaddir\fP(), \fItelldir\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<dirent.h>\fP, \fI<stdio.h>\fP,
+\fI<sys/types.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/select.3p b/man-pages-posix-2003/man3p/select.3p
new file mode 100644
index 0000000..6a4de30
--- /dev/null
+++ b/man-pages-posix-2003/man3p/select.3p
@@ -0,0 +1,323 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PSELECT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pselect
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pselect, select \- synchronous I/O multiplexing
+.SH SYNOPSIS
+.LP
+\fB#include <sys/select.h>
+.br
+.sp
+int pselect(int\fP \fInfds\fP\fB, fd_set *restrict\fP \fIreadfds\fP\fB,
+.br
+\ \ \ \ \ \ fd_set *restrict\fP \fIwritefds\fP\fB, fd_set *restrict\fP
+\fIerrorfds\fP\fB,
+.br
+\ \ \ \ \ \ const struct timespec *restrict\fP \fItimeout\fP\fB,
+.br
+\ \ \ \ \ \ const sigset_t *restrict\fP \fIsigmask\fP\fB);
+.br
+int select(int\fP \fInfds\fP\fB, fd_set *restrict\fP \fIreadfds\fP\fB,
+.br
+\ \ \ \ \ \ fd_set *restrict\fP \fIwritefds\fP\fB, fd_set *restrict\fP
+\fIerrorfds\fP\fB,
+.br
+\ \ \ \ \ \ struct timeval *restrict\fP \fItimeout\fP\fB);
+.br
+void FD_CLR(int\fP \fIfd\fP\fB, fd_set *\fP\fIfdset\fP\fB);
+.br
+int FD_ISSET(int\fP \fIfd\fP\fB, fd_set *\fP\fIfdset\fP\fB);
+.br
+void FD_SET(int\fP \fIfd\fP\fB, fd_set *\fP\fIfdset\fP\fB);
+.br
+void FD_ZERO(fd_set *\fP\fIfdset\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpselect\fP() function shall examine the file descriptor sets
+whose addresses are passed in the \fIreadfds\fP,
+\fIwritefds\fP, and \fIerrorfds\fP parameters to see whether some
+of their descriptors are ready for reading, are ready for
+writing, or have an exceptional condition pending, respectively.
+.LP
+The \fIselect\fP() function shall be equivalent to the \fIpselect\fP()
+function, except as follows:
+.IP " *" 3
+For the \fIselect\fP() function, the timeout period is given in seconds
+and microseconds in an argument of type \fBstruct
+timeval\fP, whereas for the \fIpselect\fP() function the timeout period
+is given in seconds and nanoseconds in an argument of
+type \fBstruct timespec\fP.
+.LP
+.IP " *" 3
+The \fIselect\fP() function has no \fIsigmask\fP argument; it shall
+behave as \fIpselect\fP() does when \fIsigmask\fP is a
+null pointer.
+.LP
+.IP " *" 3
+Upon successful completion, the \fIselect\fP() function may modify
+the object pointed to by the \fItimeout\fP argument.
+.LP
+.LP
+The \fIpselect\fP() and \fIselect\fP() functions shall support regular
+files, terminal and pseudo-terminal devices,
+\ STREAMS-based files, FIFOs, pipes, and sockets. The behavior
+of \fIpselect\fP() and \fIselect\fP() on file descriptors that refer
+to other types of file is unspecified.
+.LP
+The \fInfds\fP argument specifies the range of descriptors to be tested.
+The first \fInfds\fP descriptors shall be checked in
+each set; that is, the descriptors from zero through \fInfds\fP-1
+in the descriptor sets shall be examined.
+.LP
+If the \fIreadfds\fP argument is not a null pointer, it points to
+an object of type \fBfd_set\fP that on input specifies the
+file descriptors to be checked for being ready to read, and on output
+indicates which file descriptors are ready to read.
+.LP
+If the \fIwritefds\fP argument is not a null pointer, it points to
+an object of type \fBfd_set\fP that on input specifies the
+file descriptors to be checked for being ready to write, and on output
+indicates which file descriptors are ready to write.
+.LP
+If the \fIerrorfds\fP argument is not a null pointer, it points to
+an object of type \fBfd_set\fP that on input specifies the
+file descriptors to be checked for error conditions pending, and on
+output indicates which file descriptors have error conditions
+pending.
+.LP
+Upon successful completion, the \fIpselect\fP() or \fIselect\fP()
+function shall modify the objects pointed to by the
+\fIreadfds\fP, \fIwritefds\fP, and \fIerrorfds\fP arguments to indicate
+which file descriptors are ready for reading, ready for
+writing, or have an error condition pending, respectively, and shall
+return the total number of ready descriptors in all the output
+sets. For each file descriptor less than \fInfds\fP, the corresponding
+bit shall be set on successful completion if it was set on
+input and the associated condition is true for that file descriptor.
+.LP
+If none of the selected descriptors are ready for the requested operation,
+the \fIpselect\fP() or \fIselect\fP() function
+shall block until at least one of the requested operations becomes
+ready, until the \fItimeout\fP occurs, or until interrupted by
+a signal. The \fItimeout\fP parameter controls how long the \fIpselect\fP()
+or \fIselect\fP() function shall take before timing
+out. If the \fItimeout\fP parameter is not a null pointer, it specifies
+a maximum interval to wait for the selection to complete.
+If the specified time interval expires without any requested operation
+becoming ready, the function shall return. If the
+\fItimeout\fP parameter is a null pointer, then the call to \fIpselect\fP()
+or \fIselect\fP() shall block indefinitely until at
+least one descriptor meets the specified criteria. To effect a poll,
+the \fItimeout\fP parameter should not be a null pointer, and
+should point to a zero-valued \fBtimespec\fP structure.
+.LP
+The use of a timeout does not affect any pending timers set up by
+\fIalarm\fP(), \fIualarm\fP(), or \fIsetitimer\fP().
+.LP
+Implementations may place limitations on the maximum timeout interval
+supported. All implementations shall support a maximum
+timeout interval of at least 31 days. If the \fItimeout\fP argument
+specifies a timeout interval greater than the
+implementation-defined maximum value, the maximum value shall be used
+as the actual timeout value. Implementations may also place
+limitations on the granularity of timeout intervals. If the requested
+timeout interval requires a finer granularity than the
+implementation supports, the actual timeout interval shall be rounded
+up to the next supported value.
+.LP
+If \fIsigmask\fP is not a null pointer, then the \fIpselect\fP() function
+shall replace the signal mask of the process by the
+set of signals pointed to by \fIsigmask\fP before examining the descriptors,
+and shall restore the signal mask of the process
+before returning.
+.LP
+A descriptor shall be considered ready for reading when a call to
+an input function with O_NONBLOCK clear would not block,
+whether or not the function would transfer data successfully. (The
+function might return data, an end-of-file indication, or an
+error other than one indicating that it is blocked, and in each of
+these cases the descriptor shall be considered ready for
+reading.)
+.LP
+A descriptor shall be considered ready for writing when a call to
+an output function with O_NONBLOCK clear would not block,
+whether or not the function would transfer data successfully.
+.LP
+If a socket has a pending error, it shall be considered to have an
+exceptional condition pending. Otherwise, what constitutes an
+exceptional condition is file type-specific. For a file descriptor
+for use with a socket, it is protocol-specific except as noted
+below. For other file types it is implementation-defined. If the operation
+is meaningless for a particular file type,
+\fIpselect\fP() or \fIselect\fP() shall indicate that the descriptor
+is ready for read or write operations, and shall indicate
+that the descriptor has no exceptional condition pending.
+.LP
+If a descriptor refers to a socket, the implied input function is
+the \fIrecvmsg\fP()
+function with parameters requesting normal and ancillary data, such
+that the presence of either type shall cause the socket to be
+marked as readable. The presence of out-of-band data shall be checked
+if the socket option SO_OOBINLINE has been enabled, as
+out-of-band data is enqueued with normal data. If the socket is currently
+listening, then it shall be marked as readable if an
+incoming connection request has been received, and a call to the \fIaccept\fP()
+function
+shall complete without blocking.
+.LP
+If a descriptor refers to a socket, the implied output function is
+the \fIsendmsg\fP()
+function supplying an amount of normal data equal to the current value
+of the SO_SNDLOWAT option for the socket. If a non-blocking
+call to the \fIconnect\fP() function has been made for a socket, and
+the connection
+attempt has either succeeded or failed leaving a pending error, the
+socket shall be marked as writable.
+.LP
+A socket shall be considered to have an exceptional condition pending
+if a receive operation with O_NONBLOCK clear for the open
+file description and with the MSG_OOB flag set would return out-of-band
+data without blocking. (It is protocol-specific whether the
+MSG_OOB flag would be used to read out-of-band data.) A socket shall
+also be considered to have an exceptional condition pending if
+an out-of-band data mark is present in the receive queue. Other circumstances
+under which a socket may be considered to have an
+exceptional condition pending are protocol-specific and implementation-defined.
+.LP
+If the \fIreadfds\fP, \fIwritefds\fP, and \fIerrorfds\fP arguments
+are all null pointers and the \fItimeout\fP argument is
+not a null pointer, the \fIpselect\fP() or \fIselect\fP() function
+shall block for the time specified, or until interrupted by a
+signal. If the \fIreadfds\fP, \fIwritefds\fP, and \fIerrorfds\fP arguments
+are all null pointers and the \fItimeout\fP argument
+is a null pointer, the \fIpselect\fP() or \fIselect\fP() function
+shall block until interrupted by a signal.
+.LP
+File descriptors associated with regular files shall always select
+true for ready to read, ready to write, and error
+conditions.
+.LP
+On failure, the objects pointed to by the \fIreadfds\fP, \fIwritefds\fP,
+and \fIerrorfds\fP arguments shall not be modified.
+If the timeout interval expires without the specified condition being
+true for any of the specified file descriptors, the objects
+pointed to by the \fIreadfds\fP, \fIwritefds\fP, and \fIerrorfds\fP
+arguments shall have all bits set to 0.
+.LP
+File descriptor masks of type \fBfd_set\fP can be initialized and
+tested with \fIFD_CLR\fP(), \fIFD_ISSET\fP(),
+\fIFD_SET\fP(), and \fIFD_ZERO\fP(). It is unspecified whether each
+of these is a macro or a function. If a macro definition is
+suppressed in order to access an actual function, or a program defines
+an external identifier with any of these names, the behavior
+is undefined.
+.LP
+\fIFD_CLR\fP(\fIfd\fP, \fIfdsetp\fP) shall remove the file descriptor
+\fIfd\fP from the set pointed to by \fIfdsetp\fP. If
+\fIfd\fP is not a member of this set, there shall be no effect on
+the set, nor will an error be returned.
+.LP
+\fIFD_ISSET\fP(\fIfd\fP, \fIfdsetp\fP) shall evaluate to non-zero
+if the file descriptor \fIfd\fP is a member of the set
+pointed to by \fIfdsetp\fP, and shall evaluate to zero otherwise.
+.LP
+\fIFD_SET\fP(\fIfd\fP, \fIfdsetp\fP) shall add the file descriptor
+\fIfd\fP to the set pointed to by \fIfdsetp\fP. If the
+file descriptor \fIfd\fP is already in this set, there shall be no
+effect on the set, nor will an error be returned.
+.LP
+\fIFD_ZERO\fP(\fIfdsetp\fP) shall initialize the descriptor set pointed
+to by \fIfdsetp\fP to the null set. No error is
+returned if the set is not empty at the time \fIFD_ZERO\fP() is invoked.
+.LP
+The behavior of these macros is undefined if the \fIfd\fP argument
+is less than 0 or greater than or equal to FD_SETSIZE, or if
+\fIfd\fP is not a valid file descriptor, or if any of the arguments
+are expressions with side effects.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIpselect\fP() and \fIselect\fP()
+functions shall return the total number of bits set in the
+bit masks. Otherwise, -1 shall be returned, and \fIerrno\fP shall
+be set to indicate the error.
+.LP
+\fIFD_CLR\fP(), \fIFD_SET\fP(), and \fIFD_ZERO\fP() do not return
+a value. \fIFD_ISSET\fP() shall return a non-zero value if
+the bit for the file descriptor \fIfd\fP is set in the file descriptor
+set pointed to by \fIfdset\fP, and 0 otherwise.
+.SH ERRORS
+.LP
+Under the following conditions, \fIpselect\fP() and \fIselect\fP()
+shall fail and set \fIerrno\fP to:
+.TP 7
+.B EBADF
+One or more of the file descriptor sets specified a file descriptor
+that is not a valid open file descriptor.
+.TP 7
+.B EINTR
+The function was interrupted before any of the selected events occurred
+and before the timeout interval expired.
+.LP
+If SA_RESTART has been set for the interrupting signal, it is implementation-defined
+whether the function restarts or returns with
+[EINTR].
+.TP 7
+.B EINVAL
+An invalid timeout interval was specified.
+.TP 7
+.B EINVAL
+The \fInfds\fP argument is less than 0 or greater than FD_SETSIZE.
+.TP 7
+.B EINVAL
+One of the specified file descriptors refers to a STREAM or multiplexer
+that is linked (directly or indirectly) downstream from a
+multiplexer.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+In previous versions of the Single UNIX Specification, the \fIselect\fP()
+function was defined in the \fI<sys/time.h>\fP header. This is now
+changed to \fI<sys/select.h>\fP. The rationale for this change was
+as follows: the introduction of
+the \fIpselect\fP() function included the \fI<sys/select.h>\fP header
+and the
+\fI<sys/select.h>\fP header defines all the related definitions for
+the
+\fIpselect\fP() and \fIselect\fP() functions. Backwards-compatibility
+to existing XSI implementations is handled by allowing \fI<sys/time.h>\fP
+to include \fI<sys/select.h>\fP.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIaccept\fP(), \fIalarm\fP(), \fIconnect\fP(), \fIfcntl\fP(),
+\fIpoll\fP(), \fIread\fP(), \fIrecvmsg\fP(), \fIsendmsg\fP(),
+\fIsetitimer\fP(), \fIualarm\fP(), \fIwrite\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<sys/select.h>\fP,
+\fI<sys/time.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sem_close.3p b/man-pages-posix-2003/man3p/sem_close.3p
new file mode 100644
index 0000000..f379a34
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sem_close.3p
@@ -0,0 +1,82 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SEM_CLOSE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sem_close
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sem_close \- close a named semaphore (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <semaphore.h>
+.br
+.sp
+int sem_close(sem_t *\fP\fIsem\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsem_close\fP() function shall indicate that the calling process
+is finished using the named semaphore indicated by
+\fIsem\fP. The effects of calling \fIsem_close\fP() for an unnamed
+semaphore (one created by \fIsem_init\fP()) are undefined. The \fIsem_close\fP()
+function shall deallocate (that is, make
+available for reuse by a subsequent \fIsem_open\fP() by this process)
+any system
+resources allocated by the system for use by this process for this
+semaphore. The effect of subsequent use of the semaphore
+indicated by \fIsem\fP by this process is undefined. If the semaphore
+has not been removed with a successful call to \fIsem_unlink\fP(),
+then \fIsem_close\fP() has no effect on the state of the semaphore.
+If the
+\fIsem_unlink\fP() function has been successfully invoked for \fIname\fP
+after the
+most recent call to \fIsem_open\fP() with O_CREAT for this semaphore,
+then when all
+processes that have opened the semaphore close it, the semaphore is
+no longer accessible.
+.SH RETURN VALUE
+.LP
+Upon successful completion, a value of zero shall be returned. Otherwise,
+a value of -1 shall be returned and \fIerrno\fP set
+to indicate the error.
+.SH ERRORS
+.LP
+The \fIsem_close\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The \fIsem\fP argument is not a valid semaphore descriptor.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIsem_close\fP() function is part of the Semaphores option and
+need not be available on all implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsemctl\fP(), \fIsemget\fP(), \fIsemop\fP(),
+\fIsem_init\fP(), \fIsem_open\fP(), \fIsem_unlink\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<semaphore.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sem_destroy.3p b/man-pages-posix-2003/man3p/sem_destroy.3p
new file mode 100644
index 0000000..9d91171
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sem_destroy.3p
@@ -0,0 +1,81 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SEM_DESTROY" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sem_destroy
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sem_destroy \- destroy an unnamed semaphore (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <semaphore.h>
+.br
+.sp
+int sem_destroy(sem_t *\fP\fIsem\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsem_destroy\fP() function shall destroy the unnamed semaphore
+indicated by \fIsem\fP. Only a semaphore that was created
+using \fIsem_init\fP() may be destroyed using \fIsem_destroy\fP();
+the effect of calling
+\fIsem_destroy\fP() with a named semaphore is undefined. The effect
+of subsequent use of the semaphore \fIsem\fP is undefined
+until \fIsem\fP is reinitialized by another call to \fIsem_init\fP().
+.LP
+It is safe to destroy an initialized semaphore upon which no threads
+are currently blocked. The effect of destroying a semaphore
+upon which other threads are currently blocked is undefined.
+.SH RETURN VALUE
+.LP
+Upon successful completion, a value of zero shall be returned. Otherwise,
+a value of -1 shall be returned and \fIerrno\fP set
+to indicate the error.
+.SH ERRORS
+.LP
+The \fIsem_destroy\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The \fIsem\fP argument is not a valid semaphore.
+.sp
+.LP
+The \fIsem_destroy\fP() function may fail if:
+.TP 7
+.B EBUSY
+There are currently processes blocked on the semaphore.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIsem_destroy\fP() function is part of the Semaphores option
+and need not be available on all implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsemctl\fP(), \fIsemget\fP(), \fIsemop\fP(),
+\fIsem_init\fP(), \fIsem_open\fP(), the Base Definitions volume
+of
+IEEE\ Std\ 1003.1-2001, \fI<semaphore.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sem_getvalue.3p b/man-pages-posix-2003/man3p/sem_getvalue.3p
new file mode 100644
index 0000000..bd4903a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sem_getvalue.3p
@@ -0,0 +1,77 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SEM_GETVALUE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sem_getvalue
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sem_getvalue \- get the value of a semaphore (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <semaphore.h>
+.br
+.sp
+int sem_getvalue(sem_t *restrict\fP \fIsem\fP\fB, int *restrict\fP
+\fIsval\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsem_getvalue\fP() function shall update the location referenced
+by the \fIsval\fP argument to have the value of the
+semaphore referenced by \fIsem\fP without affecting the state of the
+semaphore. The updated value represents an actual semaphore
+value that occurred at some unspecified time during the call, but
+it need not be the actual value of the semaphore when it is
+returned to the calling process.
+.LP
+If \fIsem\fP is locked, then the object to which \fIsval\fP points
+shall either be set to zero or to a negative number whose
+absolute value represents the number of processes waiting for the
+semaphore at some unspecified time during the call.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIsem_getvalue\fP() function shall
+return a value of zero. Otherwise, it shall return a value
+of -1 and set \fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fIsem_getvalue\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The \fIsem\fP argument does not refer to a valid semaphore.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIsem_getvalue\fP() function is part of the Semaphores option
+and need not be available on all implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsemctl\fP(), \fIsemget\fP(), \fIsemop\fP(),
+\fIsem_post\fP(), \fIsem_timedwait\fP(), \fIsem_trywait\fP(),
+\fIsem_wait\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<semaphore.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sem_init.3p b/man-pages-posix-2003/man3p/sem_init.3p
new file mode 100644
index 0000000..ae63e3c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sem_init.3p
@@ -0,0 +1,104 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SEM_INIT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sem_init
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sem_init \- initialize an unnamed semaphore (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <semaphore.h>
+.br
+.sp
+int sem_init(sem_t *\fP\fIsem\fP\fB, int\fP \fIpshared\fP\fB, unsigned\fP
+\fIvalue\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsem_init\fP() function shall initialize the unnamed semaphore
+referred to by \fIsem\fP. The value of the initialized
+semaphore shall be \fIvalue\fP. Following a successful call to \fIsem_init\fP(),
+the semaphore may be used in subsequent calls to
+\fIsem_wait\fP(), \fIsem_trywait\fP(), \fIsem_post\fP(), and \fIsem_destroy\fP().
+This
+semaphore shall remain usable until the semaphore is destroyed.
+.LP
+If the \fIpshared\fP argument has a non-zero value, then the semaphore
+is shared between processes; in this case, any process
+that can access the semaphore \fIsem\fP can use \fIsem\fP for performing
+\fIsem_wait\fP(), \fIsem_trywait\fP(), \fIsem_post\fP(), and \fIsem_destroy\fP()
+operations.
+.LP
+Only \fIsem\fP itself may be used for performing synchronization.
+The result of referring to copies of \fIsem\fP in calls to
+\fIsem_wait\fP(), \fIsem_trywait\fP(), \fIsem_post\fP(), and \fIsem_destroy\fP()
+is
+undefined.
+.LP
+If the \fIpshared\fP argument is zero, then the semaphore is shared
+between threads of the process; any thread in this process
+can use \fIsem\fP for performing \fIsem_wait\fP(), \fIsem_trywait\fP(),
+\fIsem_post\fP(), and \fIsem_destroy\fP() operations. The use of the
+semaphore by threads other than those created
+in the same process is undefined.
+.LP
+Attempting to initialize an already initialized semaphore results
+in undefined behavior.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIsem_init\fP() function shall initialize
+the semaphore in \fIsem\fP. Otherwise, it shall
+return -1 and set \fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fIsem_init\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The \fIvalue\fP argument exceeds {SEM_VALUE_MAX}.
+.TP 7
+.B ENOSPC
+A resource required to initialize the semaphore has been exhausted,
+or the limit on semaphores ( {SEM_NSEMS_MAX}) has been
+reached.
+.TP 7
+.B EPERM
+The process lacks the appropriate privileges to initialize the semaphore.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIsem_init\fP() function is part of the Semaphores option and
+need not be available on all implementations.
+.SH RATIONALE
+.LP
+Although this volume of IEEE\ Std\ 1003.1-2001 fails to specify a
+successful return value, it is likely that a later
+version may require the implementation to return a value of zero if
+the call to \fIsem_init\fP() is successful.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsem_destroy\fP(), \fIsem_post\fP(), \fIsem_timedwait\fP(), \fIsem_trywait\fP(),
+\fIsem_wait\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<semaphore.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sem_open.3p b/man-pages-posix-2003/man3p/sem_open.3p
new file mode 100644
index 0000000..d576ff3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sem_open.3p
@@ -0,0 +1,174 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SEM_OPEN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sem_open
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sem_open \- initialize and open a named semaphore (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <semaphore.h>
+.br
+.sp
+sem_t *sem_open(const char *\fP\fIname\fP\fB, int\fP \fIoflag\fP\fB,
+\&...); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsem_open\fP() function shall establish a connection between
+a named semaphore and a process. Following a call to
+\fIsem_open\fP() with semaphore name \fIname\fP, the process may reference
+the semaphore associated with \fIname\fP using the
+address returned from the call. This semaphore may be used in subsequent
+calls to \fIsem_wait\fP(), \fIsem_trywait\fP(), \fIsem_post\fP(),
+and \fIsem_close\fP(). The semaphore
+remains usable by this process until the semaphore is closed by a
+successful call to \fIsem_close\fP(), \fI_exit\fP(), or one of the
+\fIexec\fP functions.
+.LP
+The \fIoflag\fP argument controls whether the semaphore is created
+or merely accessed by the call to \fIsem_open\fP(). The
+following flag bits may be set in \fIoflag\fP:
+.TP 7
+O_CREAT
+This flag is used to create a semaphore if it does not already exist.
+If O_CREAT is set and the semaphore already exists, then
+O_CREAT has no effect, except as noted under O_EXCL. Otherwise, \fIsem_open\fP()
+creates a named semaphore. The O_CREAT flag
+requires a third and a fourth argument: \fImode\fP, which is of type
+\fBmode_t\fP, and \fIvalue\fP, which is of type
+\fBunsigned\fP. The semaphore is created with an initial value of
+\fIvalue\fP. Valid initial values for semaphores are less than
+or equal to {SEM_VALUE_MAX}.
+.LP
+The user ID of the semaphore is set to the effective user ID of the
+process; the group ID of the semaphore is set to a system
+default group ID or to the effective group ID of the process. The
+permission bits of the semaphore are set to the value of the
+\fImode\fP argument except those set in the file mode creation mask
+of the process. When bits in \fImode\fP other than the file
+permission bits are specified, the effect is unspecified.
+.LP
+After the semaphore named \fIname\fP has been created by \fIsem_open\fP()
+with the O_CREAT flag, other processes can connect
+to the semaphore by calling \fIsem_open\fP() with the same value of
+\fIname\fP.
+.TP 7
+O_EXCL
+If O_EXCL and O_CREAT are set, \fIsem_open\fP() fails if the semaphore
+\fIname\fP exists. The check for the existence of the
+semaphore and the creation of the semaphore if it does not exist are
+atomic with respect to other processes executing
+\fIsem_open\fP() with O_EXCL and O_CREAT set. If O_EXCL is set and
+O_CREAT is not set, the effect is undefined.
+.LP
+If flags other than O_CREAT and O_EXCL are specified in the \fIoflag\fP
+parameter, the effect is unspecified.
+.sp
+.LP
+The \fIname\fP argument points to a string naming a semaphore object.
+It is unspecified whether the name appears in the file
+system and is visible to functions that take pathnames as arguments.
+The \fIname\fP argument conforms to the construction rules
+for a pathname. If \fIname\fP begins with the slash character, then
+processes calling \fIsem_open\fP() with the same value of
+\fIname\fP shall refer to the same semaphore object, as long as that
+name has not been removed. If \fIname\fP does not begin with
+the slash character, the effect is implementation-defined. The interpretation
+of slash characters other than the leading slash
+character in \fIname\fP is implementation-defined.
+.LP
+If a process makes multiple successful calls to \fIsem_open\fP() with
+the same value for \fIname\fP, the same semaphore
+address shall be returned for each such successful call, provided
+that there have been no calls to \fIsem_unlink\fP() for this semaphore.
+.LP
+References to copies of the semaphore produce undefined results.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIsem_open\fP() function shall return
+the address of the semaphore. Otherwise, it shall return
+a value of SEM_FAILED and set \fIerrno\fP to indicate the error. The
+symbol SEM_FAILED is defined in the \fI<semaphore.h>\fP header. No
+successful return from \fIsem_open\fP() shall return the
+value SEM_FAILED.
+.SH ERRORS
+.LP
+If any of the following conditions occur, the \fIsem_open\fP() function
+shall return SEM_FAILED and set \fIerrno\fP to the
+corresponding value:
+.TP 7
+.B EACCES
+The named semaphore exists and the permissions specified by \fIoflag\fP
+are denied, or the named semaphore does not exist and
+permission to create the named semaphore is denied.
+.TP 7
+.B EEXIST
+O_CREAT and O_EXCL are set and the named semaphore already exists.
+.TP 7
+.B EINTR
+The \fIsem_open\fP() operation was interrupted by a signal.
+.TP 7
+.B EINVAL
+The \fIsem_open\fP() operation is not supported for the given name,
+or O_CREAT was specified in \fIoflag\fP and \fIvalue\fP
+was greater than {SEM_VALUE_MAX}.
+.TP 7
+.B EMFILE
+Too many semaphore descriptors or file descriptors are currently in
+use by this process.
+.TP 7
+.B ENAMETOOLONG
+The length of the \fIname\fP argument exceeds {PATH_MAX} or a pathname
+component is longer than {NAME_MAX}.
+.TP 7
+.B ENFILE
+Too many semaphores are currently open in the system.
+.TP 7
+.B ENOENT
+O_CREAT is not set and the named semaphore does not exist.
+.TP 7
+.B ENOSPC
+There is insufficient space for the creation of the new named semaphore.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIsem_open\fP() function is part of the Semaphores option and
+need not be available on all implementations.
+.SH RATIONALE
+.LP
+Early drafts required an error return value of -1 with the type \fBsem_t
+*\fP for the \fIsem_open\fP() function, which is not
+guaranteed to be portable across implementations. The revised text
+provides the symbolic error code SEM_FAILED to eliminate the
+type conflict.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsemctl\fP(), \fIsemget\fP(), \fIsemop\fP(),
+\fIsem_close\fP(), \fIsem_post\fP(), \fIsem_timedwait\fP(), \fIsem_trywait\fP(),
+\fIsem_unlink\fP(), \fIsem_wait\fP(), the Base Definitions volume
+of
+IEEE\ Std\ 1003.1-2001, \fI<semaphore.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sem_post.3p b/man-pages-posix-2003/man3p/sem_post.3p
new file mode 100644
index 0000000..9267e3a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sem_post.3p
@@ -0,0 +1,93 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SEM_POST" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sem_post
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sem_post \- unlock a semaphore (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <semaphore.h>
+.br
+.sp
+int sem_post(sem_t *\fP\fIsem\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsem_post\fP() function shall unlock the semaphore referenced
+by \fIsem\fP by performing a semaphore unlock operation on
+that semaphore.
+.LP
+If the semaphore value resulting from this operation is positive,
+then no threads were blocked waiting for the semaphore to
+become unlocked; the semaphore value is simply incremented.
+.LP
+If the value of the semaphore resulting from this operation is zero,
+then one of the threads blocked waiting for the semaphore
+shall be allowed to return successfully from its call to \fIsem_wait\fP().
+\ If the Process
+Scheduling option is supported, the thread to be unblocked shall be
+chosen in a manner appropriate to the scheduling policies and
+parameters in effect for the blocked threads. In the case of the schedulers
+SCHED_FIFO and SCHED_RR, the highest priority waiting
+thread shall be unblocked, and if there is more than one highest priority
+thread blocked waiting for the semaphore, then the
+highest priority thread that has been waiting the longest shall be
+unblocked. If the Process Scheduling option is not defined, the
+choice of a thread to unblock is unspecified.
+.LP
+If
+the Process Sporadic Server option is supported, and the scheduling
+policy is SCHED_SPORADIC, the semantics are as per SCHED_FIFO
+above.
+.LP
+The \fIsem_post\fP() function shall be reentrant with respect to signals
+and may be invoked from a signal-catching
+function.
+.SH RETURN VALUE
+.LP
+If successful, the \fIsem_post\fP() function shall return zero; otherwise,
+the function shall return -1 and set \fIerrno\fP to
+indicate the error.
+.SH ERRORS
+.LP
+The \fIsem_post\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The \fIsem\fP argument does not refer to a valid semaphore.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIsem_post\fP() function is part of the Semaphores option and
+need not be available on all implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsemctl\fP(), \fIsemget\fP(), \fIsemop\fP(),
+\fIsem_timedwait\fP(), \fIsem_trywait\fP(), \fIsem_wait\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<semaphore.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sem_timedwait.3p b/man-pages-posix-2003/man3p/sem_timedwait.3p
new file mode 100644
index 0000000..b05bb6d
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sem_timedwait.3p
@@ -0,0 +1,119 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SEM_TIMEDWAIT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sem_timedwait
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sem_timedwait \- lock a semaphore (\fBADVANCED REALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <semaphore.h>
+.br
+#include <time.h>
+.br
+.sp
+int sem_timedwait(sem_t *restrict\fP \fIsem\fP\fB,
+.br
+\ \ \ \ \ \ const struct timespec *restrict\fP \fIabs_timeout\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsem_timedwait\fP() function shall lock the semaphore referenced
+by \fIsem\fP as in the \fIsem_wait\fP() function. However, if the
+semaphore cannot be locked without waiting for another
+process or thread to unlock the semaphore by performing a \fIsem_post\fP()
+function, this
+wait shall be terminated when the specified timeout expires.
+.LP
+The timeout shall expire when the absolute time specified by \fIabs_timeout\fP
+passes, as measured by the clock on which
+timeouts are based (that is, when the value of that clock equals or
+exceeds \fIabs_timeout\fP), or if the absolute time specified
+by \fIabs_timeout\fP has already been passed at the time of the call.
+.LP
+If the Timers option is supported, the timeout shall be based on the
+CLOCK_REALTIME clock. If the Timers option is not supported,
+the timeout shall be based on the system clock as returned by the
+\fItime\fP() function. The
+resolution of the timeout shall be the resolution of the clock on
+which it is based. The \fBtimespec\fP data type is defined as a
+structure in the \fI<time.h>\fP header.
+.LP
+Under no circumstance shall the function fail with a timeout if the
+semaphore can be locked immediately. The validity of the
+\fIabs_timeout\fP need not be checked if the semaphore can be locked
+immediately.
+.SH RETURN VALUE
+.LP
+The \fIsem_timedwait\fP() function shall return zero if the calling
+process successfully performed the semaphore lock operation
+on the semaphore designated by \fIsem\fP. If the call was unsuccessful,
+the state of the semaphore shall be unchanged, and the
+function shall return a value of -1 and set \fIerrno\fP to indicate
+the error.
+.SH ERRORS
+.LP
+The \fIsem_timedwait\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The \fIsem\fP argument does not refer to a valid semaphore.
+.TP 7
+.B EINVAL
+The process or thread would have blocked, and the \fIabs_timeout\fP
+parameter specified a nanoseconds field value less than
+zero or greater than or equal to 1000 million.
+.TP 7
+.B ETIMEDOUT
+The semaphore could not be locked before the specified timeout expired.
+.sp
+.LP
+The \fIsem_timedwait\fP() function may fail if:
+.TP 7
+.B EDEADLK
+A deadlock condition was detected.
+.TP 7
+.B EINTR
+A signal interrupted this function.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Applications using these functions may be subject to priority inversion,
+as discussed in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 3.285, Priority Inversion.
+.LP
+The \fIsem_timedwait\fP() function is part of the Semaphores and Timeouts
+options and need not be provided on all
+implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsem_post\fP(), \fIsem_trywait\fP(), \fIsem_wait\fP(), \fIsemctl\fP(),
+\fIsemget\fP(), \fIsemop\fP(), \fItime\fP(), the Base Definitions
+volume of
+IEEE\ Std\ 1003.1-2001, \fI<semaphore.h>\fP, \fI<time.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sem_trywait.3p b/man-pages-posix-2003/man3p/sem_trywait.3p
new file mode 100644
index 0000000..d7dd6ad
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sem_trywait.3p
@@ -0,0 +1 @@
+.so man3p/sem_wait.3p
diff --git a/man-pages-posix-2003/man3p/sem_unlink.3p b/man-pages-posix-2003/man3p/sem_unlink.3p
new file mode 100644
index 0000000..a36badf
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sem_unlink.3p
@@ -0,0 +1,84 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SEM_UNLINK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sem_unlink
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sem_unlink \- remove a named semaphore (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <semaphore.h>
+.br
+.sp
+int sem_unlink(const char *\fP\fIname\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsem_unlink\fP() function shall remove the semaphore named by
+the string \fIname\fP. If the semaphore named by
+\fIname\fP is currently referenced by other processes, then \fIsem_unlink\fP()
+shall have no effect on the state of the
+semaphore. If one or more processes have the semaphore open when \fIsem_unlink\fP()
+is called, destruction of the semaphore is
+postponed until all references to the semaphore have been destroyed
+by calls to \fIsem_close\fP(), \fI_exit\fP(), or \fIexec\fP. Calls
+to \fIsem_open\fP() to recreate or reconnect
+to the semaphore refer to a new semaphore after \fIsem_unlink\fP()
+is called. The \fIsem_unlink\fP() call shall not block until
+all references have been destroyed; it shall return immediately.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIsem_unlink\fP() function shall
+return a value of 0. Otherwise, the semaphore shall not be
+changed and the function shall return a value of -1 and set \fIerrno\fP
+to indicate the error.
+.SH ERRORS
+.LP
+The \fIsem_unlink\fP() function shall fail if:
+.TP 7
+.B EACCES
+Permission is denied to unlink the named semaphore.
+.TP 7
+.B ENAMETOOLONG
+The length of the \fIname\fP argument exceeds {PATH_MAX} or a pathname
+component is longer than {NAME_MAX}.
+.TP 7
+.B ENOENT
+The named semaphore does not exist.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIsem_unlink\fP() function is part of the Semaphores option and
+need not be available on all implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsemctl\fP(), \fIsemget\fP(), \fIsemop\fP(),
+\fIsem_close\fP(), \fIsem_open\fP(), the Base Definitions volume
+of
+IEEE\ Std\ 1003.1-2001, \fI<semaphore.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sem_wait.3p b/man-pages-posix-2003/man3p/sem_wait.3p
new file mode 100644
index 0000000..fb645b9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sem_wait.3p
@@ -0,0 +1,106 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SEM_TRYWAIT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sem_trywait
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sem_trywait, sem_wait \- lock a semaphore (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <semaphore.h>
+.br
+.sp
+int sem_trywait(sem_t *\fP\fIsem\fP\fB);
+.br
+int sem_wait(sem_t *\fP\fIsem\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsem_trywait\fP() function shall lock the semaphore referenced
+by \fIsem\fP only if the semaphore is currently not
+locked; that is, if the semaphore value is currently positive. Otherwise,
+it shall not lock the semaphore.
+.LP
+The \fIsem_wait\fP() function shall lock the semaphore referenced
+by \fIsem\fP by performing a semaphore lock operation on
+that semaphore. If the semaphore value is currently zero, then the
+calling thread shall not return from the call to
+\fIsem_wait\fP() until it either locks the semaphore or the call is
+interrupted by a signal.
+.LP
+Upon successful return, the state of the semaphore shall be locked
+and shall remain locked until the \fIsem_post\fP() function is executed
+and returns successfully.
+.LP
+The \fIsem_wait\fP() function is interruptible by the delivery of
+a signal.
+.SH RETURN VALUE
+.LP
+The \fIsem_trywait\fP() and \fIsem_wait\fP() functions shall return
+zero if the calling process successfully performed the
+semaphore lock operation on the semaphore designated by \fIsem\fP.
+If the call was unsuccessful, the state of the semaphore shall
+be unchanged, and the function shall return a value of -1 and set
+\fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fIsem_trywait\fP() and \fIsem_wait\fP() functions shall fail
+if:
+.TP 7
+.B EAGAIN
+The semaphore was already locked, so it cannot be immediately locked
+by the \fIsem_trywait\fP() operation (
+\fIsem_trywait\fP() only).
+.TP 7
+.B EINVAL
+The \fIsem\fP argument does not refer to a valid semaphore.
+.sp
+.LP
+The \fIsem_trywait\fP() and \fIsem_wait\fP() functions may fail if:
+.TP 7
+.B EDEADLK
+A deadlock condition was detected.
+.TP 7
+.B EINTR
+A signal interrupted this function.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Applications using these functions may be subject to priority inversion,
+as discussed in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 3.285, Priority Inversion.
+.LP
+The \fIsem_trywait\fP() and \fIsem_wait\fP() functions are part of
+the Semaphores option and need not be provided on all
+implementations.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsemctl\fP(), \fIsemget\fP(), \fIsemop\fP(),
+\fIsem_post\fP(), \fIsem_timedwait\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<semaphore.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/semctl.3p b/man-pages-posix-2003/man3p/semctl.3p
new file mode 100644
index 0000000..92fd8f8
--- /dev/null
+++ b/man-pages-posix-2003/man3p/semctl.3p
@@ -0,0 +1,232 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SEMCTL" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" semctl
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+semctl \- XSI semaphore control operations
+.SH SYNOPSIS
+.LP
+\fB#include\ <sys/sem.h>
+.br
+.sp
+int semctl(int\fP \fIsemid\fP\fB, int\fP \fIsemnum\fP\fB, int\fP \fIcmd\fP\fB,
+\&...); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsemctl\fP() function operates on XSI semaphores (see the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Section 4.15, Semaphore).
+It is unspecified whether this function interoperates
+with the realtime interprocess communication facilities defined in
+\fIRealtime\fP .
+.LP
+The \fIsemctl\fP() function provides a variety of semaphore control
+operations as specified by \fIcmd\fP. The fourth argument
+is optional and depends upon the operation requested. If required,
+it is of type \fBunion semun\fP, which the application shall
+explicitly declare:
+.sp
+.RS
+.nf
+
+\fBunion semun {
+ int val;
+ struct semid_ds *buf;
+ unsigned short *array;
+} arg;
+\fP
+.fi
+.RE
+.LP
+The following semaphore control operations as specified by \fIcmd\fP
+are executed with respect to the semaphore specified by
+\fIsemid\fP and \fIsemnum\fP. The level of permission required for
+each operation is shown with each command; see \fIXSI Interprocess
+Communication\fP . The symbolic names for the values of \fIcmd\fP
+are
+defined in the \fI<sys/sem.h>\fP header:
+.TP 7
+GETVAL
+Return the value of \fIsemval\fP; see \fI<sys/sem.h>\fP. Requires
+read
+permission.
+.TP 7
+SETVAL
+Set the value of \fIsemval\fP to \fIarg.val\fP, where \fIarg\fP is
+the value of the fourth argument to \fIsemctl\fP(). When
+this command is successfully executed, the \fIsemadj\fP value corresponding
+to the specified semaphore in all processes is
+cleared. Requires alter permission; see \fIXSI Interprocess Communication\fP
+\&.
+.TP 7
+GETPID
+Return the value of \fIsempid\fP. Requires read permission.
+.TP 7
+GETNCNT
+Return the value of \fIsemncnt\fP. Requires read permission.
+.TP 7
+GETZCNT
+Return the value of \fIsemzcnt\fP. Requires read permission.
+.sp
+.LP
+The following values of \fIcmd\fP operate on each \fIsemval\fP in
+the set of semaphores:
+.TP 7
+GETALL
+Return the value of \fIsemval\fP for each semaphore in the semaphore
+set and place into the array pointed to by
+\fIarg.array\fP, where \fIarg\fP is the fourth argument to \fIsemctl\fP().
+Requires read permission.
+.TP 7
+SETALL
+Set the value of \fIsemval\fP for each semaphore in the semaphore
+set according to the array pointed to by \fIarg.array\fP,
+where \fIarg\fP is the fourth argument to \fIsemctl\fP(). When this
+command is successfully executed, the \fIsemadj\fP values
+corresponding to each specified semaphore in all processes are cleared.
+Requires alter permission.
+.sp
+.LP
+The following values of \fIcmd\fP are also available:
+.TP 7
+IPC_STAT
+Place the current value of each member of the \fBsemid_ds\fP data
+structure associated with \fIsemid\fP into the structure
+pointed to by \fIarg.buf\fP, where \fIarg\fP is the fourth argument
+to \fIsemctl\fP(). The contents of this structure are
+defined in \fI<sys/sem.h>\fP. Requires read permission.
+.TP 7
+IPC_SET
+Set the value of the following members of the \fBsemid_ds\fP data
+structure associated with \fIsemid\fP to the corresponding
+value found in the structure pointed to by \fIarg.buf\fP, where \fIarg\fP
+is the fourth argument to \fIsemctl\fP():
+.sp
+.RS
+.nf
+
+\fBsem_perm.uid
+sem_perm.gid
+sem_perm.mode
+\fP
+.fi
+.RE
+.LP
+The mode bits specified in \fIIPC General Description\fP are copied
+into the
+corresponding bits of the \fIsem_perm.mode\fP associated with \fIsemid\fP.
+The stored values of any other bits are
+unspecified.
+.LP
+This command can only be executed by a process that has an effective
+user ID equal to either that of a process with appropriate
+privileges or to the value of \fIsem_perm.cuid\fP or \fIsem_perm.uid\fP
+in the \fBsemid_ds\fP data structure associated with
+\fIsemid\fP.
+.TP 7
+IPC_RMID
+Remove the semaphore identifier specified by \fIsemid\fP from the
+system and destroy the set of semaphores and \fBsemid_ds\fP
+data structure associated with it. This command can only be executed
+by a process that has an effective user ID equal to either
+that of a process with appropriate privileges or to the value of \fIsem_perm.cuid\fP
+or \fIsem_perm.uid\fP in the \fBsemid_ds\fP
+data structure associated with \fIsemid\fP.
+.sp
+.SH RETURN VALUE
+.LP
+If successful, the value returned by \fIsemctl\fP() depends on \fIcmd\fP
+as follows:
+.TP 7
+GETVAL
+The value of \fIsemval\fP.
+.TP 7
+GETPID
+The value of \fIsempid\fP.
+.TP 7
+GETNCNT
+The value of \fIsemncnt\fP.
+.TP 7
+GETZCNT
+The value of \fIsemzcnt\fP.
+.TP 7
+All others
+0.
+.sp
+.LP
+Otherwise, \fIsemctl\fP() shall return -1 and set \fIerrno\fP to indicate
+the error.
+.SH ERRORS
+.LP
+The \fIsemctl\fP() function shall fail if:
+.TP 7
+.B EACCES
+Operation permission is denied to the calling process; see \fIXSI
+Interprocess
+Communication\fP .
+.TP 7
+.B EINVAL
+The value of \fIsemid\fP is not a valid semaphore identifier, or the
+value of \fIsemnum\fP is less than 0 or greater than or
+equal to \fIsem_nsems\fP, or the value of \fIcmd\fP is not a valid
+command.
+.TP 7
+.B EPERM
+The argument \fIcmd\fP is equal to IPC_RMID or IPC_SET and the effective
+user ID of the calling process is not equal to that
+of a process with appropriate privileges and it is not equal to the
+value of \fIsem_perm.cuid\fP or \fIsem_perm.uid\fP in the
+data structure associated with \fIsemid\fP.
+.TP 7
+.B ERANGE
+The argument \fIcmd\fP is equal to SETVAL or SETALL and the value
+to which \fIsemval\fP is to be set is greater than the
+system-imposed maximum.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The fourth parameter in the SYNOPSIS section is now specified as \fB"..."\fP
+in order to avoid a clash with the ISO\ C
+standard when referring to the union \fIsemun\fP (as defined in Issue
+3) and for backwards-compatibility.
+.LP
+The POSIX Realtime Extension defines alternative interfaces for interprocess
+communication. Application developers who need to
+use IPC should design their applications so that modules using the
+IPC routines described in \fIXSI Interprocess Communication\fP can
+be easily modified to use the alternative
+interfaces.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIXSI Interprocess Communication\fP, \fIRealtime\fP, \fIsemget\fP(),
+\fIsemop\fP(), \fIsem_close\fP(), \fIsem_destroy\fP(), \fIsem_getvalue\fP(),
+\fIsem_init\fP(), \fIsem_open\fP(), \fIsem_post\fP(), \fIsem_unlink\fP(),
+\fIsem_wait\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<sys/sem.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/semget.3p b/man-pages-posix-2003/man3p/semget.3p
new file mode 100644
index 0000000..0b265e7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/semget.3p
@@ -0,0 +1,217 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SEMGET" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" semget
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+semget \- get set of XSI semaphores
+.SH SYNOPSIS
+.LP
+\fB#include <sys/sem.h>
+.br
+.sp
+int semget(key_t\fP \fIkey\fP\fB, int\fP \fInsems\fP\fB, int\fP \fIsemflg\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsemget\fP() function operates on XSI semaphores (see the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Section 4.15, Semaphore).
+It is unspecified whether this function interoperates
+with the realtime interprocess communication facilities defined in
+\fIRealtime\fP .
+.LP
+The \fIsemget\fP() function shall return the semaphore identifier
+associated with \fIkey\fP.
+.LP
+A semaphore identifier with its associated \fBsemid_ds\fP data structure
+and its associated set of \fInsems\fP semaphores (see
+\fI<sys/sem.h>\fP) is created for \fIkey\fP if one of the following
+is true:
+.IP " *" 3
+The argument \fIkey\fP is equal to IPC_PRIVATE.
+.LP
+.IP " *" 3
+The argument \fIkey\fP does not already have a semaphore identifier
+associated with it and (\fIsemflg\fP &IPC_CREAT) is
+non-zero.
+.LP
+.LP
+Upon creation, the \fBsemid_ds\fP data structure associated with the
+new semaphore identifier is initialized as follows:
+.IP " *" 3
+In the operation permissions structure \fIsem_perm.cuid\fP, \fIsem_perm.uid\fP,
+\fIsem_perm.cgid\fP, and \fIsem_perm.gid\fP
+shall be set equal to the effective user ID and effective group ID,
+respectively, of the calling process.
+.LP
+.IP " *" 3
+The low-order 9 bits of \fIsem_perm.mode\fP shall be set equal to
+the low-order 9 bits of \fIsemflg\fP.
+.LP
+.IP " *" 3
+The variable \fIsem_nsems\fP shall be set equal to the value of \fInsems\fP.
+.LP
+.IP " *" 3
+The variable \fIsem_otime\fP shall be set equal to 0 and \fIsem_ctime\fP
+shall be set equal to the current time.
+.LP
+.IP " *" 3
+The data structure associated with each semaphore in the set shall
+not be initialized. The \fIsemctl\fP() function with the command SETVAL
+or SETALL can be used to initialize each
+semaphore.
+.LP
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIsemget\fP() shall return a non-negative
+integer, namely a semaphore identifier; otherwise, it
+shall return -1 and set \fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fIsemget\fP() function shall fail if:
+.TP 7
+.B EACCES
+A semaphore identifier exists for \fIkey\fP, but operation permission
+as specified by the low-order 9 bits of \fIsemflg\fP
+would not be granted; see \fIXSI Interprocess Communication\fP .
+.TP 7
+.B EEXIST
+A semaphore identifier exists for the argument \fIkey\fP but ((\fIsemflg\fP
+&IPC_CREAT) &&(\fIsemflg\fP
+&IPC_EXCL)) is non-zero.
+.TP 7
+.B EINVAL
+The value of \fInsems\fP is either less than or equal to 0 or greater
+than the system-imposed limit, or a semaphore identifier
+exists for the argument \fIkey\fP, but the number of semaphores in
+the set associated with it is less than \fInsems\fP and
+\fInsems\fP is not equal to 0.
+.TP 7
+.B ENOENT
+A semaphore identifier does not exist for the argument \fIkey\fP and
+(\fIsemflg\fP &IPC_CREAT) is equal to 0.
+.TP 7
+.B ENOSPC
+A semaphore identifier is to be created but the system-imposed limit
+on the maximum number of allowed semaphores system-wide
+would be exceeded.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Creating a Semaphore Identifier
+.LP
+The following example gets a unique semaphore key using the \fIftok\fP()
+function, then
+gets a semaphore ID associated with that key using the \fIsemget\fP()
+function (the first call also tests to make sure the
+semaphore exists). If the semaphore does not exist, the program creates
+it, as shown by the second call to \fIsemget\fP(). In
+creating the semaphore for the queuing process, the program attempts
+to create one semaphore with read/write permission for all. It
+also uses the IPC_EXCL flag, which forces \fIsemget\fP() to fail if
+the semaphore already exists.
+.LP
+After creating the semaphore, the program uses a call to \fIsemop\fP()
+to initialize it
+to the values in the \fIsbuf\fP array. The number of processes that
+can execute concurrently without queuing is initially set to
+2. The final call to \fIsemget\fP() creates a semaphore identifier
+that can be used later in the program.
+.sp
+.RS
+.nf
+
+\fB#include <sys/types.h>
+#include <stdio.h>
+#include <sys/ipc.h>
+#include <sys/sem.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <pwd.h>
+#include <fcntl.h>
+#include <limits.h>
+\&...
+key_t semkey;
+int semid, pfd, fv;
+struct sembuf sbuf;
+char *lgn;
+char filename[PATH_MAX+1];
+struct stat outstat;
+struct passwd *pw;
+\&...
+/* Get unique key for semaphore. */
+if ((semkey = ftok("/tmp", 'a')) == (key_t) -1) {
+ perror("IPC error: ftok"); exit(1);
+}
+.sp
+
+/* Get semaphore ID associated with this key. */
+if ((semid = semget(semkey, 0, 0)) == -1) {
+.sp
+
+ /* Semaphore does not exist - Create. */
+ if ((semid = semget(semkey, 1, IPC_CREAT | IPC_EXCL | S_IRUSR |
+ S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)) != -1)
+ {
+ /* Initialize the semaphore. */
+ sbuf.sem_num = 0;
+ sbuf.sem_op = 2; /* This is the number of runs
+ without queuing. */
+ sbuf.sem_flg = 0;
+ if (semop(semid, &sbuf, 1) == -1) {
+ perror("IPC error: semop"); exit(1);
+ }
+ }
+ else if (errno == EEXIST) {
+ if ((semid = semget(semkey, 0, 0)) == -1) {
+ perror("IPC error 1: semget"); exit(1);
+ }
+ }
+ else {
+ perror("IPC error 2: semget"); exit(1);
+ }
+}
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The POSIX Realtime Extension defines alternative interfaces for interprocess
+communication. Application developers who need to
+use IPC should design their applications so that modules using the
+IPC routines described in \fIXSI Interprocess Communication\fP can
+be easily modified to use the alternative
+interfaces.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIXSI Interprocess Communication\fP, \fIRealtime\fP, \fIsemctl\fP(),
+\fIsemop\fP(), \fIsem_close\fP(), \fIsem_destroy\fP(), \fIsem_getvalue\fP(),
+\fIsem_init\fP(), \fIsem_open\fP(), \fIsem_post\fP(), \fIsem_unlink\fP(),
+\fIsem_wait\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<sys/sem.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/semop.3p b/man-pages-posix-2003/man3p/semop.3p
new file mode 100644
index 0000000..bd9f3ec
--- /dev/null
+++ b/man-pages-posix-2003/man3p/semop.3p
@@ -0,0 +1,353 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SEMOP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" semop
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+semop \- XSI semaphore operations
+.SH SYNOPSIS
+.LP
+\fB#include <sys/sem.h>
+.br
+.sp
+int semop(int\fP \fIsemid\fP\fB, struct sembuf *\fP\fIsops\fP\fB,
+size_t\fP \fInsops\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsemop\fP() function operates on XSI semaphores (see the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, Section 4.15, Semaphore).
+It is unspecified whether this function interoperates
+with the realtime interprocess communication facilities defined in
+\fIRealtime\fP .
+.LP
+The \fIsemop\fP() function shall perform atomically a user-defined
+array of semaphore operations on the set of semaphores
+associated with the semaphore identifier specified by the argument
+\fIsemid\fP.
+.LP
+The argument \fIsops\fP is a pointer to a user-defined array of semaphore
+operation structures. The implementation shall not
+modify elements of this array unless the application uses implementation-defined
+extensions.
+.LP
+The argument \fInsops\fP is the number of such structures in the array.
+.LP
+Each structure, \fBsembuf\fP, includes the following members:
+.TS C
+center; l2 l2 l.
+\fBMember Type\fP \fBMember Name\fP \fBDescription\fP
+\fBshort\fP \fIsem_num\fP Semaphore number.
+\fBshort\fP \fIsem_op\fP Semaphore operation.
+\fBshort\fP \fIsem_flg\fP Operation flags.
+.TE
+.LP
+Each semaphore operation specified by \fIsem_op\fP is performed on
+the corresponding semaphore specified by \fIsemid\fP and
+\fIsem_num\fP.
+.LP
+The variable \fIsem_op\fP specifies one of three semaphore operations:
+.IP " 1." 4
+If \fIsem_op\fP is a negative integer and the calling process has
+alter permission, one of the following shall occur:
+.RS
+.IP " *" 3
+If \fIsemval\fP(see \fI<sys/sem.h>\fP) is greater than or equal to
+the absolute
+value of \fIsem_op\fP, the absolute value of \fIsem_op\fP is subtracted
+from \fIsemval\fP. Also, if (\fIsem_flg\fP
+&SEM_UNDO) is non-zero, the absolute value of \fIsem_op\fP shall be
+added to the calling process' \fIsemadj\fP value for the
+specified semaphore.
+.LP
+.IP " *" 3
+If \fIsemval\fP is less than the absolute value of \fIsem_op\fP and
+(\fIsem_flg\fP &IPC_NOWAIT) is non-zero,
+\fIsemop\fP() shall return immediately.
+.LP
+.IP " *" 3
+If \fIsemval\fP is less than the absolute value of \fIsem_op\fP and
+(\fIsem_flg\fP &IPC_NOWAIT) is 0, \fIsemop\fP()
+shall increment the \fIsemncnt\fP associated with the specified semaphore
+and suspend execution of the calling thread until one of
+the following conditions occurs:
+.RS
+.IP " *" 3
+The value of \fIsemval\fP becomes greater than or equal to the absolute
+value of \fIsem_op\fP. When this occurs, the value of
+\fIsemncnt\fP associated with the specified semaphore shall be decremented,
+the absolute value of \fIsem_op\fP shall be
+subtracted from \fIsemval\fP and, if (\fIsem_flg\fP &SEM_UNDO) is
+non-zero, the absolute value of \fIsem_op\fP shall be
+added to the calling process' \fIsemadj\fP value for the specified
+semaphore.
+.LP
+.IP " *" 3
+The \fIsemid\fP for which the calling thread is awaiting action is
+removed from the system. When this occurs, \fIerrno\fP
+shall be set equal to [EIDRM] and -1 shall be returned.
+.LP
+.IP " *" 3
+The calling thread receives a signal that is to be caught. When this
+occurs, the value of \fIsemncnt\fP associated with the
+specified semaphore shall be decremented, and the calling thread shall
+resume execution in the manner prescribed in \fIsigaction\fP().
+.LP
+.RE
+.LP
+.RE
+.LP
+.IP " 2." 4
+If \fIsem_op\fP is a positive integer and the calling process has
+alter permission, the value of \fIsem_op\fP shall be added
+to \fIsemval\fP and, if (\fIsem_flg\fP &SEM_UNDO) is non-zero, the
+value of \fIsem_op\fP shall be subtracted from the
+calling process' \fIsemadj\fP value for the specified semaphore.
+.LP
+.IP " 3." 4
+If \fIsem_op\fP is 0 and the calling process has read permission,
+one of the following shall occur:
+.RS
+.IP " *" 3
+If \fIsemval\fP is 0, \fIsemop\fP() shall return immediately.
+.LP
+.IP " *" 3
+If \fIsemval\fP is non-zero and (\fIsem_flg\fP &IPC_NOWAIT) is non-zero,
+\fIsemop\fP() shall return immediately.
+.LP
+.IP " *" 3
+If \fIsemval\fP is non-zero and (\fIsem_flg\fP &IPC_NOWAIT) is 0,
+\fIsemop\fP() shall increment the \fIsemzcnt\fP
+associated with the specified semaphore and suspend execution of the
+calling thread until one of the following occurs:
+.RS
+.IP " *" 3
+The value of \fIsemval\fP becomes 0, at which time the value of \fIsemzcnt\fP
+associated with the specified semaphore shall be
+decremented.
+.LP
+.IP " *" 3
+The \fIsemid\fP for which the calling thread is awaiting action is
+removed from the system. When this occurs, \fIerrno\fP
+shall be set equal to [EIDRM] and -1 shall be returned.
+.LP
+.IP " *" 3
+The calling thread receives a signal that is to be caught. When this
+occurs, the value of \fIsemzcnt\fP associated with the
+specified semaphore shall be decremented, and the calling thread shall
+resume execution in the manner prescribed in \fIsigaction\fP().
+.LP
+.RE
+.LP
+.RE
+.LP
+.LP
+Upon successful completion, the value of \fIsempid\fP for each semaphore
+specified in the array pointed to by \fIsops\fP shall
+be set equal to the process ID of the calling process.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIsemop\fP() shall return 0; otherwise,
+it shall return -1 and set \fIerrno\fP to indicate the
+error.
+.SH ERRORS
+.LP
+The \fIsemop\fP() function shall fail if:
+.TP 7
+.B E2BIG
+The value of \fInsops\fP is greater than the system-imposed maximum.
+.TP 7
+.B EACCES
+Operation permission is denied to the calling process; see \fIXSI
+Interprocess
+Communication\fP .
+.TP 7
+.B EAGAIN
+The operation would result in suspension of the calling process but
+(\fIsem_flg\fP &IPC_NOWAIT) is non-zero.
+.TP 7
+.B EFBIG
+The value of \fIsem_num\fP is less than 0 or greater than or equal
+to the number of semaphores in the set associated with
+\fIsemid\fP.
+.TP 7
+.B EIDRM
+The semaphore identifier \fIsemid\fP is removed from the system.
+.TP 7
+.B EINTR
+The \fIsemop\fP() function was interrupted by a signal.
+.TP 7
+.B EINVAL
+The value of \fIsemid\fP is not a valid semaphore identifier, or the
+number of individual semaphores for which the calling
+process requests a SEM_UNDO would exceed the system-imposed limit.
+.TP 7
+.B ENOSPC
+The limit on the number of individual processes requesting a SEM_UNDO
+would be exceeded.
+.TP 7
+.B ERANGE
+An operation would cause a \fIsemval\fP to overflow the system-imposed
+limit, or an operation would cause a \fIsemadj\fP
+value to overflow the system-imposed limit.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Setting Values in Semaphores
+.LP
+The following example sets the values of the two semaphores associated
+with the \fIsemid\fP identifier to the values contained
+in the \fIsb\fP array.
+.sp
+.RS
+.nf
+
+\fB#include <sys/sem.h>
+\&...
+int semid;
+struct sembuf sb[2];
+int nsops = 2;
+int result;
+.sp
+
+/* Adjust value of semaphore in the semaphore array semid. */
+sb[0].sem_num = 0;
+sb[0].sem_op = -1;
+sb[0].sem_flg = SEM_UNDO | IPC_NOWAIT;
+sb[1].sem_num = 1;
+sb[1].sem_op = 1;
+sb[1].sem_flg = 0;
+.sp
+
+result = semop(semid, sb, nsops);
+\fP
+.fi
+.RE
+.SS Creating a Semaphore Identifier
+.LP
+The following example gets a unique semaphore key using the \fIftok\fP()
+function, then
+gets a semaphore ID associated with that key using the \fIsemget\fP()
+function (the first
+call also tests to make sure the semaphore exists). If the semaphore
+does not exist, the program creates it, as shown by the second
+call to \fIsemget\fP(). In creating the semaphore for the queuing
+process, the program
+attempts to create one semaphore with read/write permission for all.
+It also uses the IPC_EXCL flag, which forces \fIsemget\fP() to fail
+if the semaphore already exists.
+.LP
+After creating the semaphore, the program uses a call to \fIsemop\fP()
+to initialize it to the values in the \fIsbuf\fP array.
+The number of processes that can execute concurrently without queuing
+is initially set to 2. The final call to \fIsemget\fP() creates a
+semaphore identifier that can be used later in the program.
+.LP
+The final call to \fIsemop\fP() acquires the semaphore and waits until
+it is free; the SEM_UNDO option releases the semaphore
+when the process exits, waiting until there are less than two processes
+running concurrently.
+.sp
+.RS
+.nf
+
+\fB#include <sys/types.h>
+#include <stdio.h>
+#include <sys/ipc.h>
+#include <sys/sem.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <pwd.h>
+#include <fcntl.h>
+#include <limits.h>
+\&...
+key_t semkey;
+int semid, pfd, fv;
+struct sembuf sbuf;
+char *lgn;
+char filename[PATH_MAX+1];
+struct stat outstat;
+struct passwd *pw;
+\&...
+/* Get unique key for semaphore. */
+if ((semkey = ftok("/tmp", 'a')) == (key_t) -1) {
+ perror("IPC error: ftok"); exit(1);
+}
+.sp
+
+/* Get semaphore ID associated with this key. */
+if ((semid = semget(semkey, 0, 0)) == -1) {
+.sp
+
+ /* Semaphore does not exist - Create. */
+ if ((semid = semget(semkey, 1, IPC_CREAT | IPC_EXCL | S_IRUSR |
+ S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)) != -1)
+ {
+ /* Initialize the semaphore. */
+ sbuf.sem_num = 0;
+ sbuf.sem_op = 2; /* This is the number of runs without queuing. */
+ sbuf.sem_flg = 0;
+ if (semop(semid, &sbuf, 1) == -1) {
+ perror("IPC error: semop"); exit(1);
+ }
+ }
+ else if (errno == EEXIST) {
+ if ((semid = semget(semkey, 0, 0)) == -1) {
+ perror("IPC error 1: semget"); exit(1);
+ }
+ }
+ else {
+ perror("IPC error 2: semget"); exit(1);
+ }
+}
+\&...
+sbuf.sem_num = 0;
+sbuf.sem_op = -1;
+sbuf.sem_flg = SEM_UNDO;
+if (semop(semid, &sbuf, 1) == -1) {
+ perror("IPC Error: semop"); exit(1);
+}
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The POSIX Realtime Extension defines alternative interfaces for interprocess
+communication. Application developers who need to
+use IPC should design their applications so that modules using the
+IPC routines described in \fIXSI Interprocess Communication\fP can
+be easily modified to use the alternative
+interfaces.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIXSI Interprocess Communication\fP, \fIRealtime\fP, \fIexec\fP()
+,
+\fIexit\fP(), \fIfork\fP(), \fIsemctl\fP(), \fIsemget\fP(), \fIsem_close\fP(),
+\fIsem_destroy\fP(), \fIsem_getvalue\fP(), \fIsem_init\fP(),
+\fIsem_open\fP(), \fIsem_post\fP(), \fIsem_unlink\fP(), \fIsem_wait\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<sys/ipc.h>\fP,
+\fI<sys/sem.h>\fP, \fI<sys/types.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/send.3p b/man-pages-posix-2003/man3p/send.3p
new file mode 100644
index 0000000..c8c44ed
--- /dev/null
+++ b/man-pages-posix-2003/man3p/send.3p
@@ -0,0 +1,178 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SEND" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" send
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+send \- send a message on a socket
+.SH SYNOPSIS
+.LP
+\fB#include <sys/socket.h>
+.br
+.sp
+ssize_t send(int\fP \fIsocket\fP\fB, const void *\fP\fIbuffer\fP\fB,
+size_t\fP \fIlength\fP\fB, int\fP
+\fIflags\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsend\fP() function shall initiate transmission of a message
+from the specified socket to its peer. The \fIsend\fP()
+function shall send a message only when the socket is connected (including
+when the peer of a connectionless socket has been set
+via \fIconnect\fP()).
+.LP
+The \fIsend\fP() function takes the following arguments:
+.TP 7
+\fIsocket\fP
+Specifies the socket file descriptor.
+.TP 7
+\fIbuffer\fP
+Points to the buffer containing the message to send.
+.TP 7
+\fIlength\fP
+Specifies the length of the message in bytes.
+.TP 7
+\fIflags\fP
+Specifies the type of message transmission. Values of this argument
+are formed by logically OR'ing zero or more of the
+following flags:
+.TP 7
+MSG_EOR
+.RS
+Terminates a record (if supported by the protocol).
+.RE
+.TP 7
+MSG_OOB
+.RS
+Sends out-of-band data on sockets that support out-of-band communications.
+The significance and semantics of out-of-band data
+are protocol-specific.
+.RE
+.sp
+.sp
+.LP
+The length of the message to be sent is specified by the \fIlength\fP
+argument. If the message is too long to pass through the
+underlying protocol, \fIsend\fP() shall fail and no data shall be
+transmitted.
+.LP
+Successful completion of a call to \fIsend\fP() does not guarantee
+delivery of the message. A return value of -1 indicates only
+locally-detected errors.
+.LP
+If space is not available at the sending socket to hold the message
+to be transmitted, and the socket file descriptor does not
+have O_NONBLOCK set, \fIsend\fP() shall block until space is available.
+If space is not available at the sending socket to hold
+the message to be transmitted, and the socket file descriptor does
+have O_NONBLOCK set, \fIsend\fP() shall fail. The \fIselect\fP() and
+\fIpoll\fP() functions can be used to
+determine when it is possible to send more data.
+.LP
+The socket in use may require the process to have appropriate privileges
+to use the \fIsend\fP() function.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIsend\fP() shall return the number of
+bytes sent. Otherwise, -1 shall be returned and
+\fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fIsend\fP() function shall fail if:
+.TP 7
+.B EAGAIN \fRor\fP EWOULDBLOCK
+.sp
+The socket's file descriptor is marked O_NONBLOCK and the requested
+operation would block.
+.TP 7
+.B EBADF
+The \fIsocket\fP argument is not a valid file descriptor.
+.TP 7
+.B ECONNRESET
+A connection was forcibly closed by a peer.
+.TP 7
+.B EDESTADDRREQ
+.sp
+The socket is not connection-mode and no peer address is set.
+.TP 7
+.B EINTR
+A signal interrupted \fIsend\fP() before any data was transmitted.
+.TP 7
+.B EMSGSIZE
+The message is too large to be sent all at once, as the socket requires.
+.TP 7
+.B ENOTCONN
+The socket is not connected or otherwise has not had the peer pre-specified.
+.TP 7
+.B ENOTSOCK
+The \fIsocket\fP argument does not refer to a socket.
+.TP 7
+.B EOPNOTSUPP
+The \fIsocket\fP argument is associated with a socket that does not
+support one or more of the values set in
+\fIflags\fP.
+.TP 7
+.B EPIPE
+The socket is shut down for writing, or the socket is connection-mode
+and is no longer connected. In the latter case, and if
+the socket is of type SOCK_STREAM, the SIGPIPE signal is generated
+to the calling thread.
+.sp
+.LP
+The \fIsend\fP() function may fail if:
+.TP 7
+.B EACCES
+The calling process does not have the appropriate privileges.
+.TP 7
+.B EIO
+An I/O error occurred while reading from or writing to the file system.
+.TP 7
+.B ENETDOWN
+The local network interface used to reach the destination is down.
+.TP 7
+.B ENETUNREACH
+.sp
+No route to the network is present.
+.TP 7
+.B ENOBUFS
+Insufficient resources were available in the system to perform the
+operation.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIsend\fP() function is equivalent to \fIsendto\fP() with a null
+pointer
+\fIdest_len\fP argument, and to \fIwrite\fP() if no flags are used.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIconnect\fP(), \fIgetsockopt\fP(), \fIpoll\fP(), \fIrecv\fP(),
+\fIrecvfrom\fP(), \fIrecvmsg\fP(), \fIselect\fP(), \fIsendmsg\fP(),
+\fIsendto\fP(), \fIsetsockopt\fP(), \fIshutdown\fP(), \fIsocket\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<sys/socket.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sendmsg.3p b/man-pages-posix-2003/man3p/sendmsg.3p
new file mode 100644
index 0000000..12b26c5
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sendmsg.3p
@@ -0,0 +1,236 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SENDMSG" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sendmsg
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sendmsg \- send a message on a socket using a message structure
+.SH SYNOPSIS
+.LP
+\fB#include <sys/socket.h>
+.br
+.sp
+ssize_t sendmsg(int\fP \fIsocket\fP\fB, const struct msghdr *\fP\fImessage\fP\fB,
+int\fP \fIflags\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsendmsg\fP() function shall send a message through a connection-mode
+or connectionless-mode socket. If the socket is
+connectionless-mode, the message shall be sent to the address specified
+by \fBmsghdr\fP. If the socket is connection-mode, the
+destination address in \fBmsghdr\fP shall be ignored.
+.LP
+The \fIsendmsg\fP() function takes the following arguments:
+.TP 7
+\fIsocket\fP
+Specifies the socket file descriptor.
+.TP 7
+\fImessage\fP
+Points to a \fBmsghdr\fP structure, containing both the destination
+address and the buffers for the outgoing message. The
+length and format of the address depend on the address family of the
+socket. The \fImsg_flags\fP member is ignored.
+.TP 7
+\fIflags\fP
+Specifies the type of message transmission. The application may specify
+0 or the following flag:
+.TP 7
+MSG_EOR
+.RS
+Terminates a record (if supported by the protocol).
+.RE
+.TP 7
+MSG_OOB
+.RS
+Sends out-of-band data on sockets that support out-of-bound data.
+The significance and semantics of out-of-band data are
+protocol-specific.
+.RE
+.sp
+.sp
+.LP
+The \fImsg_iov\fP and \fImsg_iovlen\fP fields of \fImessage\fP specify
+zero or more buffers containing the data to be sent.
+\fImsg_iov\fP points to an array of \fBiovec\fP structures; \fImsg_iovlen\fP
+shall be set to the dimension of this array. In
+each \fBiovec\fP structure, the \fIiov_base\fP field specifies a storage
+area and the \fIiov_len\fP field gives its size in
+bytes. Some of these sizes can be zero. The data from each storage
+area indicated by \fImsg_iov\fP is sent in turn.
+.LP
+Successful completion of a call to \fIsendmsg\fP() does not guarantee
+delivery of the message. A return value of -1 indicates
+only locally-detected errors.
+.LP
+If space is not available at the sending socket to hold the message
+to be transmitted and the socket file descriptor does not
+have O_NONBLOCK set, the \fIsendmsg\fP() function shall block until
+space is available. If space is not available at the sending
+socket to hold the message to be transmitted and the socket file descriptor
+does have O_NONBLOCK set, the \fIsendmsg\fP() function
+shall fail.
+.LP
+If the socket protocol supports broadcast and the specified address
+is a broadcast address for the socket protocol,
+\fIsendmsg\fP() shall fail if the SO_BROADCAST option is not set for
+the socket.
+.LP
+The socket in use may require the process to have appropriate privileges
+to use the \fIsendmsg\fP() function.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIsendmsg\fP() shall return the number
+of bytes sent. Otherwise, -1 shall be returned and
+\fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fIsendmsg\fP() function shall fail if:
+.TP 7
+.B EAGAIN \fRor\fP EWOULDBLOCK
+The socket's file descriptor is marked O_NONBLOCK and the requested
+operation would block.
+.TP 7
+.B EAFNOSUPPORT
+Addresses in the specified address family cannot be used with this
+socket.
+.TP 7
+.B EBADF
+The \fIsocket\fP argument is not a valid file descriptor.
+.TP 7
+.B ECONNRESET
+A connection was forcibly closed by a peer.
+.TP 7
+.B EINTR
+A signal interrupted \fIsendmsg\fP() before any data was transmitted.
+.TP 7
+.B EINVAL
+The sum of the \fIiov_len\fP values overflows an \fBssize_t\fP.
+.TP 7
+.B EMSGSIZE
+The message is too large to be sent all at once (as the socket requires),
+or the \fImsg_iovlen\fP member of the \fBmsghdr\fP
+structure pointed to by \fImessage\fP is less than or equal to 0 or
+is greater than {IOV_MAX}.
+.TP 7
+.B ENOTCONN
+The socket is connection-mode but is not connected.
+.TP 7
+.B ENOTSOCK
+The \fIsocket\fP argument does not refer to a socket.
+.TP 7
+.B EOPNOTSUPP
+The \fIsocket\fP argument is associated with a socket that does not
+support one or more of the values set in
+\fIflags\fP.
+.TP 7
+.B EPIPE
+The socket is shut down for writing, or the socket is connection-mode
+and is no longer connected. In the latter case, and if
+the socket is of type SOCK_STREAM, the SIGPIPE signal is generated
+to the calling thread.
+.sp
+.LP
+If the address family of the socket is AF_UNIX, then \fIsendmsg\fP()
+shall fail if:
+.TP 7
+.B EIO
+An I/O error occurred while reading from or writing to the file system.
+.TP 7
+.B ELOOP
+A loop exists in symbolic links encountered during resolution of the
+pathname in the socket address.
+.TP 7
+.B ENAMETOOLONG
+A component of a pathname exceeded {NAME_MAX} characters, or an entire
+pathname exceeded {PATH_MAX} characters.
+.TP 7
+.B ENOENT
+A component of the pathname does not name an existing file or the
+path name is an empty string.
+.TP 7
+.B ENOTDIR
+A component of the path prefix of the pathname in the socket address
+is not a directory.
+.sp
+.LP
+The \fIsendmsg\fP() function may fail if:
+.TP 7
+.B EACCES
+Search permission is denied for a component of the path prefix; or
+write access to the named socket is denied.
+.TP 7
+.B EDESTADDRREQ
+The socket is not connection-mode and does not have its peer address
+set, and no destination address was specified.
+.TP 7
+.B EHOSTUNREACH
+The destination host cannot be reached (probably because the host
+is down or a remote router cannot reach it).
+.TP 7
+.B EIO
+An I/O error occurred while reading from or writing to the file system.
+.TP 7
+.B EISCONN
+A destination address was specified and the socket is already connected.
+.TP 7
+.B ENETDOWN
+The local network interface used to reach the destination is down.
+.TP 7
+.B ENETUNREACH
+No route to the network is present.
+.TP 7
+.B ENOBUFS
+Insufficient resources were available in the system to perform the
+operation.
+.TP 7
+.B ENOMEM
+Insufficient memory was available to fulfill the request.
+.sp
+.LP
+If the address family of the socket is AF_UNIX, then \fIsendmsg\fP()
+may fail if:
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the pathname in the socket address.
+.TP 7
+.B ENAMETOOLONG
+Pathname resolution of a symbolic link produced an intermediate result
+whose length exceeds {PATH_MAX}.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+Done.
+.SH APPLICATION USAGE
+.LP
+The \fIselect\fP() and \fIpoll\fP() functions can
+be used to determine when it is possible to send more data.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgetsockopt\fP(), \fIpoll\fP(), \fIrecv\fP(), \fIrecvfrom\fP(),
+\fIrecvmsg\fP(), \fIselect\fP(), \fIsend\fP(), \fIsendto\fP(),
+\fIsetsockopt\fP(), \fIshutdown\fP(), \fIsocket\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<sys/socket.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sendto.3p b/man-pages-posix-2003/man3p/sendto.3p
new file mode 100644
index 0000000..8617548
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sendto.3p
@@ -0,0 +1,244 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SENDTO" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sendto
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sendto \- send a message on a socket
+.SH SYNOPSIS
+.LP
+\fB#include <sys/socket.h>
+.br
+.sp
+ssize_t sendto(int\fP \fIsocket\fP\fB, const void *\fP\fImessage\fP\fB,
+size_t\fP \fIlength\fP\fB,
+.br
+\ \ \ \ \ \ int\fP \fIflags\fP\fB, const struct sockaddr *\fP\fIdest_addr\fP\fB,
+.br
+\ \ \ \ \ \ socklen_t\fP \fIdest_len\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsendto\fP() function shall send a message through a connection-mode
+or connectionless-mode socket. If the socket is
+connectionless-mode, the message shall be sent to the address specified
+by \fIdest_addr\fP. If the socket is connection-mode,
+\fIdest_addr\fP shall be ignored.
+.LP
+The \fIsendto\fP() function takes the following arguments:
+.TP 7
+\fIsocket\fP
+Specifies the socket file descriptor.
+.TP 7
+\fImessage\fP
+Points to a buffer containing the message to be sent.
+.TP 7
+\fIlength\fP
+Specifies the size of the message in bytes.
+.TP 7
+\fIflags\fP
+Specifies the type of message transmission. Values of this argument
+are formed by logically OR'ing zero or more of the
+following flags:
+.TP 7
+MSG_EOR
+.RS
+Terminates a record (if supported by the protocol).
+.RE
+.TP 7
+MSG_OOB
+.RS
+Sends out-of-band data on sockets that support out-of-band data. The
+significance and semantics of out-of-band data are
+protocol-specific.
+.RE
+.sp
+.TP 7
+\fIdest_addr\fP
+Points to a \fBsockaddr\fP structure containing the destination address.
+The length and format of the address depend on the
+address family of the socket.
+.TP 7
+\fIdest_len\fP
+Specifies the length of the \fBsockaddr\fP structure pointed to by
+the \fIdest_addr\fP argument.
+.sp
+.LP
+If the socket protocol supports broadcast and the specified address
+is a broadcast address for the socket protocol,
+\fIsendto\fP() shall fail if the SO_BROADCAST option is not set for
+the socket.
+.LP
+The \fIdest_addr\fP argument specifies the address of the target.
+The \fIlength\fP argument specifies the length of the
+message.
+.LP
+Successful completion of a call to \fIsendto\fP() does not guarantee
+delivery of the message. A return value of -1 indicates
+only locally-detected errors.
+.LP
+If space is not available at the sending socket to hold the message
+to be transmitted and the socket file descriptor does not
+have O_NONBLOCK set, \fIsendto\fP() shall block until space is available.
+If space is not available at the sending socket to hold
+the message to be transmitted and the socket file descriptor does
+have O_NONBLOCK set, \fIsendto\fP() shall fail.
+.LP
+The socket in use may require the process to have appropriate privileges
+to use the \fIsendto\fP() function.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIsendto\fP() shall return the number
+of bytes sent. Otherwise, -1 shall be returned and
+\fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fIsendto\fP() function shall fail if:
+.TP 7
+.B EAFNOSUPPORT
+Addresses in the specified address family cannot be used with this
+socket.
+.TP 7
+.B EAGAIN \fRor\fP EWOULDBLOCK
+The socket's file descriptor is marked O_NONBLOCK and the requested
+operation would block.
+.TP 7
+.B EBADF
+The \fIsocket\fP argument is not a valid file descriptor.
+.TP 7
+.B ECONNRESET
+A connection was forcibly closed by a peer.
+.TP 7
+.B EINTR
+A signal interrupted \fIsendto\fP() before any data was transmitted.
+.TP 7
+.B EMSGSIZE
+The message is too large to be sent all at once, as the socket requires.
+.TP 7
+.B ENOTCONN
+The socket is connection-mode but is not connected.
+.TP 7
+.B ENOTSOCK
+The \fIsocket\fP argument does not refer to a socket.
+.TP 7
+.B EOPNOTSUPP
+The \fIsocket\fP argument is associated with a socket that does not
+support one or more of the values set in
+\fIflags\fP.
+.TP 7
+.B EPIPE
+The socket is shut down for writing, or the socket is connection-mode
+and is no longer connected. In the latter case, and if
+the socket is of type SOCK_STREAM, the SIGPIPE signal is generated
+to the calling thread.
+.sp
+.LP
+If the address family of the socket is AF_UNIX, then \fIsendto\fP()
+shall fail if:
+.TP 7
+.B EIO
+An I/O error occurred while reading from or writing to the file system.
+.TP 7
+.B ELOOP
+A loop exists in symbolic links encountered during resolution of the
+pathname in the socket address.
+.TP 7
+.B ENAMETOOLONG
+A component of a pathname exceeded {NAME_MAX} characters, or an entire
+pathname exceeded {PATH_MAX} characters.
+.TP 7
+.B ENOENT
+A component of the pathname does not name an existing file or the
+pathname is an empty string.
+.TP 7
+.B ENOTDIR
+A component of the path prefix of the pathname in the socket address
+is not a directory.
+.sp
+.LP
+The \fIsendto\fP() function may fail if:
+.TP 7
+.B EACCES
+Search permission is denied for a component of the path prefix; or
+write access to the named socket is denied.
+.TP 7
+.B EDESTADDRREQ
+The socket is not connection-mode and does not have its peer address
+set, and no destination address was specified.
+.TP 7
+.B EHOSTUNREACH
+The destination host cannot be reached (probably because the host
+is down or a remote router cannot reach it).
+.TP 7
+.B EINVAL
+The \fIdest_len\fP argument is not a valid length for the address
+family.
+.TP 7
+.B EIO
+An I/O error occurred while reading from or writing to the file system.
+.TP 7
+.B EISCONN
+A destination address was specified and the socket is already connected.
+This error may or may not be returned for connection
+mode sockets.
+.TP 7
+.B ENETDOWN
+The local network interface used to reach the destination is down.
+.TP 7
+.B ENETUNREACH
+No route to the network is present.
+.TP 7
+.B ENOBUFS
+Insufficient resources were available in the system to perform the
+operation.
+.TP 7
+.B ENOMEM
+Insufficient memory was available to fulfill the request.
+.sp
+.LP
+If the address family of the socket is AF_UNIX, then \fIsendto\fP()
+may fail if:
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the pathname in the socket address.
+.TP 7
+.B ENAMETOOLONG
+Pathname resolution of a symbolic link produced an intermediate result
+whose length exceeds {PATH_MAX}.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIselect\fP() and \fIpoll\fP() functions can
+be used to determine when it is possible to send more data.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgetsockopt\fP(), \fIpoll\fP(), \fIrecv\fP(), \fIrecvfrom\fP(),
+\fIrecvmsg\fP(), \fIselect\fP(), \fIsend\fP(), \fIsendmsg\fP(),
+\fIsetsockopt\fP(), \fIshutdown\fP(), \fIsocket\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<sys/socket.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/setbuf.3p b/man-pages-posix-2003/man3p/setbuf.3p
new file mode 100644
index 0000000..8242fc0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/setbuf.3p
@@ -0,0 +1,91 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SETBUF" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" setbuf
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+setbuf \- assign buffering to a stream
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+void setbuf(FILE *restrict\fP \fIstream\fP\fB, char *restrict\fP \fIbuf\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+Except that it returns no value, the function call:
+.sp
+.RS
+.nf
+
+\fBsetbuf(stream, buf)
+\fP
+.fi
+.RE
+.LP
+shall be equivalent to:
+.sp
+.RS
+.nf
+
+\fBsetvbuf(stream, buf, _IOFBF, BUFSIZ)
+\fP
+.fi
+.RE
+.LP
+if \fIbuf\fP is not a null pointer, or to:
+.sp
+.RS
+.nf
+
+\fBsetvbuf(stream, buf, _IONBF, BUFSIZ)
+\fP
+.fi
+.RE
+.LP
+if \fIbuf\fP is a null pointer.
+.SH RETURN VALUE
+.LP
+The \fIsetbuf\fP() function shall not return a value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+A common source of error is allocating buffer space as an "automatic"
+variable in a code block, and then failing to close the
+stream in the same block.
+.LP
+With \fIsetbuf\fP(), allocating a buffer of BUFSIZ bytes does not
+necessarily imply that all of BUFSIZ bytes are used for the
+buffer area.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfopen\fP(), \fIsetvbuf\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/setcontext.3p b/man-pages-posix-2003/man3p/setcontext.3p
new file mode 100644
index 0000000..e9a0e68
--- /dev/null
+++ b/man-pages-posix-2003/man3p/setcontext.3p
@@ -0,0 +1 @@
+.so man3p/getcontext.3p
diff --git a/man-pages-posix-2003/man3p/setegid.3p b/man-pages-posix-2003/man3p/setegid.3p
new file mode 100644
index 0000000..51b1c4d
--- /dev/null
+++ b/man-pages-posix-2003/man3p/setegid.3p
@@ -0,0 +1,77 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SETEGID" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" setegid
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+setegid \- set the effective group ID
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+int setegid(gid_t\fP \fIgid\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+If \fIgid\fP is equal to the real group ID or the saved set-group-ID,
+or if the process has appropriate privileges,
+\fIsetegid\fP() shall set the effective group ID of the calling process
+to \fIgid\fP; the real group ID, saved set-group-ID, and
+any supplementary group IDs shall remain unchanged.
+.LP
+The \fIsetegid\fP() function shall not affect the supplementary group
+list in any way.
+.SH RETURN VALUE
+.LP
+Upon successful completion, 0 shall be returned; otherwise, -1 shall
+be returned and \fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fIsetegid\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The value of the \fIgid\fP argument is invalid and is not supported
+by the implementation.
+.TP 7
+.B EPERM
+The process does not have appropriate privileges and \fIgid\fP does
+not match the real group ID or the saved
+set-group-ID.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+Refer to the RATIONALE section in \fIsetuid\fP().
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexec\fP(), \fIgetegid\fP(), \fIgeteuid\fP(), \fIgetgid\fP(),
+\fIgetuid\fP(),
+\fIseteuid\fP(), \fIsetgid\fP(), \fIsetregid\fP(), \fIsetreuid\fP(),
+\fIsetuid\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<sys/types.h>\fP,
+\fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/setenv.3p b/man-pages-posix-2003/man3p/setenv.3p
new file mode 100644
index 0000000..63a0cc1
--- /dev/null
+++ b/man-pages-posix-2003/man3p/setenv.3p
@@ -0,0 +1,125 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SETENV" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" setenv
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+setenv \- add or change environment variable
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+int setenv(const char *\fP\fIenvname\fP\fB, const char *\fP\fIenvval\fP\fB,
+int\fP \fIoverwrite\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsetenv\fP() function shall update or add a variable in the
+environment of the calling process. The \fIenvname\fP
+argument points to a string containing the name of an environment
+variable to be added or altered. The environment variable shall
+be set to the value to which \fIenvval\fP points. The function shall
+fail if \fIenvname\fP points to a string which contains an
+\fB'='\fP character. If the environment variable named by \fIenvname\fP
+already exists and the value of \fIoverwrite\fP is
+non-zero, the function shall return success and the environment shall
+be updated. If the environment variable named by
+\fIenvname\fP already exists and the value of \fIoverwrite\fP is zero,
+the function shall return success and the environment
+shall remain unchanged.
+.LP
+If the application modifies \fIenviron\fP or the pointers to which
+it points, the behavior of \fIsetenv\fP() is undefined. The
+\fIsetenv\fP() function shall update the list of pointers to which
+\fIenviron\fP points.
+.LP
+The strings described by \fIenvname\fP and \fIenvval\fP are copied
+by this function.
+.LP
+The \fIsetenv\fP() function need not be reentrant. A function that
+is not required to be reentrant is not required to be
+thread-safe.
+.SH RETURN VALUE
+.LP
+Upon successful completion, zero shall be returned. Otherwise, -1
+shall be returned, \fIerrno\fP set to indicate the error, and
+the environment shall be unchanged.
+.SH ERRORS
+.LP
+The \fIsetenv\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The \fIname\fP argument is a null pointer, points to an empty string,
+or points to a string containing an \fB'='\fP
+character.
+.TP 7
+.B ENOMEM
+Insufficient memory was available to add a variable or its value to
+the environment.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+See \fIexec\fP(), for restrictions on changing the environment in
+multi-threaded applications.
+.SH RATIONALE
+.LP
+Unanticipated results may occur if \fIsetenv\fP() changes the external
+variable \fIenviron\fP. In particular, if the optional
+\fIenvp\fP argument to \fImain\fP() is present, it is not changed,
+and thus may point to an obsolete copy of the environment (as
+may any other copy of \fIenviron\fP). However, other than the aforementioned
+restriction, the developers of
+IEEE\ Std\ 1003.1-2001 intended that the traditional method of walking
+through the environment by way of the \fIenviron\fP
+pointer must be supported.
+.LP
+It was decided that \fIsetenv\fP() should be required by this revision
+because it addresses a piece of missing functionality,
+and does not impose a significant burden on the implementor.
+.LP
+There was considerable debate as to whether the System V \fIputenv\fP()
+function or the
+BSD \fIsetenv\fP() function should be required as a mandatory function.
+The \fIsetenv\fP() function was chosen because it
+permitted the implementation of the \fIunsetenv\fP() function to delete
+environmental
+variables, without specifying an additional interface. The \fIputenv\fP()
+function is
+available as an XSI extension.
+.LP
+The standard developers considered requiring that \fIsetenv\fP() indicate
+an error when a call to it would result in exceeding
+{ARG_MAX}. The requirement was rejected since the condition might
+be temporary, with the application eventually reducing the
+environment size. The ultimate success or failure depends on the size
+at the time of a call to \fIexec\fP, which returns an indication of
+this error condition.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexec\fP(), \fIgetenv\fP(), \fIunsetenv\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<stdlib.h>\fP, \fI<sys/types.h>\fP,
+\fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/seteuid.3p b/man-pages-posix-2003/man3p/seteuid.3p
new file mode 100644
index 0000000..89e72ce
--- /dev/null
+++ b/man-pages-posix-2003/man3p/seteuid.3p
@@ -0,0 +1,77 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SETEUID" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" seteuid
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+seteuid \- set effective user ID
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+int seteuid(uid_t\fP \fIuid\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+If \fIuid\fP is equal to the real user ID or the saved set-user-ID,
+or if the process has appropriate privileges,
+\fIseteuid\fP() shall set the effective user ID of the calling process
+to \fIuid\fP; the real user ID and saved set-user-ID shall
+remain unchanged.
+.LP
+The \fIseteuid\fP() function shall not affect the supplementary group
+list in any way.
+.SH RETURN VALUE
+.LP
+Upon successful completion, 0 shall be returned; otherwise, -1 shall
+be returned and \fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fIseteuid\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The value of the \fIuid\fP argument is invalid and is not supported
+by the implementation.
+.TP 7
+.B EPERM
+The process does not have appropriate privileges and \fIuid\fP does
+not match the real group ID or the saved
+set-group-ID.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+Refer to the RATIONALE section in \fIsetuid\fP().
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexec\fP(), \fIgetegid\fP(), \fIgeteuid\fP(), \fIgetgid\fP(),
+\fIgetuid\fP(),
+\fIsetegid\fP(), \fIsetgid\fP(), \fIsetregid\fP(), \fIsetreuid\fP(),
+\fIsetuid\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<sys/types.h>\fP,
+\fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/setgid.3p b/man-pages-posix-2003/man3p/setgid.3p
new file mode 100644
index 0000000..e467d0d
--- /dev/null
+++ b/man-pages-posix-2003/man3p/setgid.3p
@@ -0,0 +1,83 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SETGID" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" setgid
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+setgid \- set-group-ID
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+int setgid(gid_t\fP \fIgid\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+If the process has appropriate privileges, \fIsetgid\fP() shall set
+the real group ID, effective group ID, and the saved
+set-group-ID of the calling process to \fIgid\fP.
+.LP
+If the process does not have appropriate privileges, but \fIgid\fP
+is equal to the real group ID or the saved set-group-ID,
+\fIsetgid\fP() shall set the effective group ID to \fIgid\fP; the
+real group ID and saved set-group-ID shall remain
+unchanged.
+.LP
+The \fIsetgid\fP() function shall not affect the supplementary group
+list in any way.
+.LP
+Any supplementary group IDs of the calling process shall remain unchanged.
+.SH RETURN VALUE
+.LP
+Upon successful completion, 0 is returned. Otherwise, -1 shall be
+returned and \fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fIsetgid\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The value of the \fIgid\fP argument is invalid and is not supported
+by the implementation.
+.TP 7
+.B EPERM
+The process does not have appropriate privileges and \fIgid\fP does
+not match the real group ID or the saved
+set-group-ID.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+Refer to the RATIONALE section in \fIsetuid\fP().
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexec\fP(), \fIgetegid\fP(), \fIgeteuid\fP(), \fIgetgid\fP(),
+\fIgetuid\fP(),
+\fIsetegid\fP(), \fIseteuid\fP(), \fIsetregid\fP(), \fIsetreuid\fP(),
+\fIsetuid\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<sys/types.h>\fP,
+\fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/setgrent.3p b/man-pages-posix-2003/man3p/setgrent.3p
new file mode 100644
index 0000000..8dc5add
--- /dev/null
+++ b/man-pages-posix-2003/man3p/setgrent.3p
@@ -0,0 +1 @@
+.so man3p/getgrent.3p
diff --git a/man-pages-posix-2003/man3p/sethostent.3p b/man-pages-posix-2003/man3p/sethostent.3p
new file mode 100644
index 0000000..490b764
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sethostent.3p
@@ -0,0 +1 @@
+.so man3p/gethostent.3p
diff --git a/man-pages-posix-2003/man3p/setitimer.3p b/man-pages-posix-2003/man3p/setitimer.3p
new file mode 100644
index 0000000..0fd2215
--- /dev/null
+++ b/man-pages-posix-2003/man3p/setitimer.3p
@@ -0,0 +1 @@
+.so man3p/getitimer.3p
diff --git a/man-pages-posix-2003/man3p/setjmp.3p b/man-pages-posix-2003/man3p/setjmp.3p
new file mode 100644
index 0000000..6487796
--- /dev/null
+++ b/man-pages-posix-2003/man3p/setjmp.3p
@@ -0,0 +1,89 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SETJMP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" setjmp
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+setjmp \- set jump point for a non-local goto
+.SH SYNOPSIS
+.LP
+\fB#include <setjmp.h>
+.br
+.sp
+int setjmp(jmp_buf\fP \fIenv\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+A call to \fIsetjmp\fP() shall save the calling environment in its
+\fIenv\fP argument for later use by \fIlongjmp\fP().
+.LP
+It is unspecified whether \fIsetjmp\fP() is a macro or a function.
+If a macro definition is suppressed in order to access an
+actual function, or a program defines an external identifier with
+the name \fIsetjmp\fP, the behavior is undefined.
+.LP
+An application shall ensure that an invocation of \fIsetjmp\fP() appears
+in one of the following contexts only:
+.IP " *" 3
+The entire controlling expression of a selection or iteration statement
+.LP
+.IP " *" 3
+One operand of a relational or equality operator with the other operand
+an integral constant expression, with the resulting
+expression being the entire controlling expression of a selection
+or iteration statement
+.LP
+.IP " *" 3
+The operand of a unary \fB'!'\fP operator with the resulting expression
+being the entire controlling expression of a
+selection or iteration
+.LP
+.IP " *" 3
+The entire expression of an expression statement (possibly cast to
+\fBvoid\fP)
+.LP
+.LP
+If the invocation appears in any other context, the behavior is undefined.
+.SH RETURN VALUE
+.LP
+If the return is from a direct invocation, \fIsetjmp\fP() shall return
+0. If the return is from a call to \fIlongjmp\fP(), \fIsetjmp\fP()
+shall return a non-zero value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+In general, \fIsigsetjmp\fP() is more useful in dealing with errors
+and interrupts
+encountered in a low-level subroutine of a program.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIlongjmp\fP(), \fIsigsetjmp\fP(), the Base Definitions volume
+of
+IEEE\ Std\ 1003.1-2001, \fI<setjmp.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/setkey.3p b/man-pages-posix-2003/man3p/setkey.3p
new file mode 100644
index 0000000..4753919
--- /dev/null
+++ b/man-pages-posix-2003/man3p/setkey.3p
@@ -0,0 +1,82 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SETKEY" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" setkey
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+setkey \- set encoding key (\fBCRYPT\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+void setkey(const char *\fP\fIkey\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsetkey\fP() function provides access to an implementation-defined
+encoding algorithm. The argument of \fIsetkey\fP() is
+an array of length 64 bytes containing only the bytes with numerical
+value of 0 and 1. If this string is divided into groups of 8,
+the low-order bit in each group is ignored; this gives a 56-bit key
+which is used by the algorithm. This is the key that shall be
+used with the algorithm to encode a string \fIblock\fP passed to \fIencrypt\fP().
+.LP
+The \fIsetkey\fP() function shall not change the setting of \fIerrno\fP
+if successful. An application wishing to check for
+error situations should set \fIerrno\fP to 0 before calling \fIsetkey\fP().
+If \fIerrno\fP is non-zero on return, an error has
+occurred.
+.LP
+The \fIsetkey\fP() function need not be reentrant. A function that
+is not required to be reentrant is not required to be
+thread-safe.
+.SH RETURN VALUE
+.LP
+No values are returned.
+.SH ERRORS
+.LP
+The \fIsetkey\fP() function shall fail if:
+.TP 7
+.B ENOSYS
+The functionality is not supported on this implementation.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Decoding need not be implemented in all environments. This is related
+to government restrictions in some countries on encryption
+and decryption routines. Historical practice has been to ship a different
+version of the encryption library without the decryption
+feature in the routines supplied. Thus the exported version of \fIencrypt\fP()
+does
+encoding but not decoding.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcrypt\fP(), \fIencrypt\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/setlocale.3p b/man-pages-posix-2003/man3p/setlocale.3p
new file mode 100644
index 0000000..89fd41e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/setlocale.3p
@@ -0,0 +1,315 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SETLOCALE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" setlocale
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+setlocale \- set program locale
+.SH SYNOPSIS
+.LP
+\fB#include <locale.h>
+.br
+.sp
+char *setlocale(int\fP \fIcategory\fP\fB, const char *\fP\fIlocale\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsetlocale\fP() function selects the appropriate piece of the
+program's locale, as specified by the \fIcategory\fP and
+\fIlocale\fP arguments, and may be used to change or query the program's
+entire locale or portions thereof. The value
+\fILC_ALL\fP for \fIcategory\fP names the program's entire locale;
+other values for \fIcategory\fP name only a part of the
+program's locale:
+.TP 7
+\fILC_COLLATE\fP
+Affects the behavior of regular expressions and the collation functions.
+.TP 7
+\fILC_CTYPE\fP
+Affects the behavior of regular expressions, character classification,
+character conversion functions, and wide-character
+functions.
+.TP 7
+\fILC_MESSAGES\fP
+Affects what strings are expected by commands and utilities as affirmative
+or negative responses.
+.LP
+It also affects what strings are given by commands and utilities as
+affirmative or negative responses, and the content of messages.
+.TP 7
+\fILC_MONETARY\fP
+Affects the behavior of functions that handle monetary values.
+.TP 7
+\fILC_NUMERIC\fP
+Affects the behavior of functions that handle numeric values.
+.TP 7
+\fILC_TIME\fP
+Affects the behavior of the time conversion functions.
+.sp
+.LP
+The \fIlocale\fP argument is a pointer to a character string containing
+the required setting of \fIcategory\fP. The contents
+of this string are implementation-defined. In addition, the following
+preset values of \fIlocale\fP are defined for all settings
+of \fIcategory\fP:
+.TP 7
+"POSIX"
+Specifies the minimal environment for C-language translation called
+the POSIX locale. If \fIsetlocale\fP() is not invoked, the
+POSIX locale is the default at entry to \fImain\fP().
+.TP 7
+"C"
+Equivalent to \fB"POSIX"\fP .
+.TP 7
+""
+Specifies an implementation-defined native environment. This corresponds
+to the value of the associated environment
+variables, \fILC_*\fP and \fILANG ;\fP see the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Chapter 7, Locale and the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 8, Environment Variables.
+.TP 7
+A\ null\ pointer
+Used to direct \fIsetlocale\fP() to query the current internationalized
+environment and return the name of the locale.
+.sp
+.LP
+The locale state is common to all threads within a process.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIsetlocale\fP() shall return the string
+associated with the specified category for the new
+locale. Otherwise, \fIsetlocale\fP() shall return a null pointer and
+the program's locale is not changed.
+.LP
+A null pointer for \fIlocale\fP causes \fIsetlocale\fP() to return
+a pointer to the string associated with the \fIcategory\fP
+for the program's current locale. The program's locale shall not be
+changed.
+.LP
+The string returned by \fIsetlocale\fP() is such that a subsequent
+call with that string and its associated \fIcategory\fP
+shall restore that part of the program's locale. The application shall
+not modify the string returned which may be overwritten by a
+subsequent call to \fIsetlocale\fP().
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The following code illustrates how a program can initialize the international
+environment for one language, while selectively
+modifying the program's locale such that regular expressions and string
+operations can be applied to text recorded in a different
+language:
+.sp
+.RS
+.nf
+
+\fBsetlocale(LC_ALL, "De");
+setlocale(LC_COLLATE, "Fr@dict");
+\fP
+.fi
+.RE
+.LP
+Internationalized programs must call \fIsetlocale\fP() to initiate
+a specific language operation. This can be done by calling
+\fIsetlocale\fP() as follows:
+.sp
+.RS
+.nf
+
+\fBsetlocale(LC_ALL, "");
+\fP
+.fi
+.RE
+.LP
+Changing the setting of \fILC_MESSAGES\fP has no effect on catalogs
+that have already been opened by calls to \fIcatopen\fP().
+.SH RATIONALE
+.LP
+The ISO\ C standard defines a collection of functions to support internationalization.
+One of the most significant aspects
+of these functions is a facility to set and query the \fIinternational
+environment\fP. The international environment is a
+repository of information that affects the behavior of certain functionality,
+namely:
+.IP " 1." 4
+Character handling
+.LP
+.IP " 2." 4
+Collating
+.LP
+.IP " 3." 4
+Date/time formatting
+.LP
+.IP " 4." 4
+Numeric editing
+.LP
+.IP " 5." 4
+Monetary formatting
+.LP
+.IP " 6." 4
+Messaging
+.LP
+.LP
+The \fIsetlocale\fP() function provides the application developer
+with the ability to set all or portions, called
+\fIcategories\fP, of the international environment. These categories
+correspond to the areas of functionality mentioned above. The
+syntax for \fIsetlocale\fP() is as follows:
+.sp
+.RS
+.nf
+
+\fBchar *setlocale(int\fP \fIcategory\fP\fB, const char *\fP\fIlocale\fP\fB);
+\fP
+.fi
+.RE
+.LP
+where \fIcategory\fP is the name of one of following categories, namely:
+.sp
+.RS
+.nf
+
+\fILC_COLLATE
+
+LC_CTYPE
+
+LC_MESSAGES
+
+LC_MONETARY
+
+LC_NUMERIC
+
+LC_TIME\fP
+
+.fi
+.RE
+.LP
+In addition, a special value called \fILC_ALL\fP directs \fIsetlocale\fP()
+to set all categories.
+.LP
+There are two primary uses of \fIsetlocale\fP():
+.IP " 1." 4
+Querying the international environment to find out what it is set
+to
+.LP
+.IP " 2." 4
+Setting the international environment, or \fIlocale\fP, to a specific
+value
+.LP
+.LP
+The behavior of \fIsetlocale\fP() in these two areas is described
+below. Since it is difficult to describe the behavior in
+words, examples are used to illustrate the behavior of specific uses.
+.LP
+To query the international environment, \fIsetlocale\fP() is invoked
+with a specific category and the NULL pointer as the
+locale. The NULL pointer is a special directive to \fIsetlocale\fP()
+that tells it to query rather than set the international
+environment. The following syntax is used to query the name of the
+international environment:
+.sp
+.RS
+.nf
+
+\fBsetlocale({LC_ALL, LC_COLLATE, LC_CTYPE, LC_MESSAGES, LC_MONETARY, \\
+ LC_NUMERIC, LC_TIME},(char *) NULL);
+\fP
+.fi
+.RE
+.LP
+The \fIsetlocale\fP() function shall return the string corresponding
+to the current international environment. This value may
+be used by a subsequent call to \fIsetlocale\fP() to reset the international
+environment to this value. However, it should be
+noted that the return value from \fIsetlocale\fP() may be a pointer
+to a static area within the function and is not guaranteed to
+remain unchanged (that is, it may be modified by a subsequent call
+to \fIsetlocale\fP()). Therefore, if the purpose of calling
+\fIsetlocale\fP() is to save the value of the current international
+environment so it can be changed and reset later, the return
+value should be copied to an array of \fBchar\fP in the calling program.
+.LP
+There are three ways to set the international environment with \fIsetlocale\fP():
+.TP 7
+\fIsetlocale\fP(\fIcategory\fP,\ \fIstring\fP)
+.sp
+This usage sets a specific \fIcategory\fP in the international environment
+to a specific value corresponding to the value of the
+\fIstring\fP. A specific example is provided below:
+.sp
+.RS
+.nf
+
+\fBsetlocale(LC_ALL, "fr_FR.ISO-8859-1");
+\fP
+.fi
+.RE
+.LP
+In this example, all categories of the international environment are
+set to the locale corresponding to the string
+\fB"fr_FR.ISO-8859-1"\fP, or to the French language as spoken in
+France using the ISO/IEC\ 8859-1:1998 standard
+codeset.
+.LP
+If the string does not correspond to a valid locale, \fIsetlocale\fP()
+shall return a NULL pointer and the international
+environment is not changed. Otherwise, \fIsetlocale\fP() shall return
+the name of the locale just set.
+.TP 7
+\fIsetlocale\fP(\fIcategory\fP,\ "C")
+.sp
+The ISO\ C standard states that one locale must exist on all conforming
+implementations. The name of the locale is C and
+corresponds to a minimal international environment needed to support
+the C programming language.
+.TP 7
+\fIsetlocale\fP(\fIcategory\fP,\ "")
+.sp
+This sets a specific category to an implementation-defined default.
+This corresponds to the value of the environment
+variables.
+.sp
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexec\fP(), \fIisalnum\fP(), \fIisalpha\fP(), \fIisblank\fP(),
+\fIiscntrl\fP(), \fIisdigit\fP(), \fIisgraph\fP(),
+\fIislower\fP(), \fIisprint\fP(), \fIispunct\fP(), \fIisspace\fP(),
+\fIisupper\fP(),
+\fIiswalnum\fP(), \fIiswalpha\fP(), \fIiswblank\fP(), \fIiswcntrl\fP(),
+\fIiswctype\fP(), \fIiswdigit\fP(), \fIiswgraph\fP(), \fIiswlower\fP(),
+\fIiswprint\fP(), \fIiswpunct\fP(), \fIiswspace\fP(), \fIiswupper\fP(),
+\fIiswxdigit\fP(), \fIisxdigit\fP(), \fIlocaleconv\fP(), \fImblen\fP(),
+\fImbstowcs\fP(),
+\fImbtowc\fP(), \fInl_langinfo\fP(), \fIprintf\fP(), \fIscanf\fP(),
+setlocale, \fIstrcoll\fP(), \fIstrerror\fP(), \fIstrfmon\fP()
+,
+\fIstrtod\fP(), \fIstrxfrm\fP(), \fItolower\fP(), \fItoupper\fP(),
+\fItowlower\fP(),
+\fItowupper\fP(), \fIwcscoll\fP(), \fIwcstod\fP(), \fIwcstombs\fP(),
+\fIwcsxfrm\fP(),
+\fIwctomb\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<langinfo.h>\fP, \fI<locale.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/setlogmask.3p b/man-pages-posix-2003/man3p/setlogmask.3p
new file mode 100644
index 0000000..904d7e9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/setlogmask.3p
@@ -0,0 +1 @@
+.so man3p/syslog.3p
diff --git a/man-pages-posix-2003/man3p/setnetent.3p b/man-pages-posix-2003/man3p/setnetent.3p
new file mode 100644
index 0000000..17b642a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/setnetent.3p
@@ -0,0 +1 @@
+.so man3p/getnetent.3p
diff --git a/man-pages-posix-2003/man3p/setpgid.3p b/man-pages-posix-2003/man3p/setpgid.3p
new file mode 100644
index 0000000..266a9f8
--- /dev/null
+++ b/man-pages-posix-2003/man3p/setpgid.3p
@@ -0,0 +1,157 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SETPGID" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" setpgid
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+setpgid \- set process group ID for job control
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+int setpgid(pid_t\fP \fIpid\fP\fB, pid_t\fP \fIpgid\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsetpgid\fP() function shall either join an existing process
+group or create a new process group within the session of
+the calling process. The process group ID of a session leader shall
+not change. Upon successful completion, the process group ID of
+the process with a process ID that matches \fIpid\fP shall be set
+to \fIpgid\fP. As a special case, if \fIpid\fP is 0, the
+process ID of the calling process shall be used. Also, if \fIpgid\fP
+is 0, the process ID of the indicated process shall be
+used.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIsetpgid\fP() shall return 0; otherwise,
+-1 shall be returned and \fIerrno\fP shall be set to
+indicate the error.
+.SH ERRORS
+.LP
+The \fIsetpgid\fP() function shall fail if:
+.TP 7
+.B EACCES
+The value of the \fIpid\fP argument matches the process ID of a child
+process of the calling process and the child process has
+successfully executed one of the \fIexec\fP functions.
+.TP 7
+.B EINVAL
+The value of the \fIpgid\fP argument is less than 0, or is not a value
+supported by the implementation.
+.TP 7
+.B EPERM
+The process indicated by the \fIpid\fP argument is a session leader.
+.TP 7
+.B EPERM
+The value of the \fIpid\fP argument matches the process ID of a child
+process of the calling process and the child process is
+not in the same session as the calling process.
+.TP 7
+.B EPERM
+The value of the \fIpgid\fP argument is valid but does not match the
+process ID of the process indicated by the \fIpid\fP
+argument and there is no process with a process group ID that matches
+the value of the \fIpgid\fP argument in the same session as
+the calling process.
+.TP 7
+.B ESRCH
+The value of the \fIpid\fP argument does not match the process ID
+of the calling process or of a child process of the calling
+process.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIsetpgid\fP() function shall group processes together for the
+purpose of signaling, placement in foreground or
+background, and other job control actions.
+.LP
+The \fIsetpgid\fP() function is similar to the \fIsetpgrp\fP() function
+of 4.2 BSD,
+except that 4.2 BSD allowed the specified new process group to assume
+any value. This presents certain security problems and is
+more flexible than necessary to support job control.
+.LP
+To provide tighter security, \fIsetpgid\fP() only allows the calling
+process to join a process group already in use inside its
+session or create a new process group whose process group ID was equal
+to its process ID.
+.LP
+When a job control shell spawns a new job, the processes in the job
+must be placed into a new process group via
+\fIsetpgid\fP(). There are two timing constraints involved in this
+action:
+.IP " 1." 4
+The new process must be placed in the new process group before the
+appropriate program is launched via one of the \fIexec\fP functions.
+.LP
+.IP " 2." 4
+The new process must be placed in the new process group before the
+shell can correctly send signals to the new process
+group.
+.LP
+.LP
+To address these constraints, the following actions are performed.
+The new processes call \fIsetpgid\fP() to alter their own
+process groups after \fIfork\fP() but before \fIexec\fP. This satisfies
+the first constraint. Under 4.3 BSD, the second constraint is satisfied
+by
+the synchronization property of \fIvfork\fP(); that is, the shell
+is suspended until the
+child has completed the \fIexec\fP, thus ensuring that the child has
+completed the
+\fIsetpgid\fP(). A new version of \fIfork\fP() with this same synchronization
+property was
+considered, but it was decided instead to merely allow the parent
+shell process to adjust the process group of its child processes
+via \fIsetpgid\fP(). Both timing constraints are now satisfied by
+having both the parent shell and the child attempt to adjust the
+process group of the child process; it does not matter which succeeds
+first.
+.LP
+Since it would be confusing to an application to have its process
+group change after it began executing (that is, after \fIexec\fP),
+and because the child process would already have adjusted its process
+group before
+this, the [EACCES] error was added to disallow this.
+.LP
+One non-obvious use of \fIsetpgid\fP() is to allow a job control shell
+to return itself to its original process group (the one
+in effect when the job control shell was executed). A job control
+shell does this before returning control back to its parent when
+it is terminating or suspending itself as a way of restoring its job
+control "state" back to what its parent would expect. (Note
+that the original process group of the job control shell typically
+matches the process group of its parent, but this is not
+necessarily always the case.)
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexec\fP(), \fIgetpgrp\fP(), \fIsetsid\fP(), \fItcsetpgrp\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<sys/types.h>\fP, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/setpgrp.3p b/man-pages-posix-2003/man3p/setpgrp.3p
new file mode 100644
index 0000000..e1f4bb3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/setpgrp.3p
@@ -0,0 +1,63 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SETPGRP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" setpgrp
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+setpgrp \- set the process group ID
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+pid_t setpgrp(void); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+If the calling process is not already a session leader, \fIsetpgrp\fP()
+sets the process group ID of the calling process to the
+process ID of the calling process. If \fIsetpgrp\fP() creates a new
+session, then the new session has no controlling terminal.
+.LP
+The \fIsetpgrp\fP() function has no effect when the calling process
+is a session leader.
+.SH RETURN VALUE
+.LP
+Upon completion, \fIsetpgrp\fP() shall return the process group ID.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexec\fP(), \fIfork\fP(), \fIgetpid\fP(), \fIgetsid\fP(), \fIkill\fP(),
+\fIsetpgid\fP(), \fIsetsid\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/setpriority.3p b/man-pages-posix-2003/man3p/setpriority.3p
new file mode 100644
index 0000000..ad5e1f8
--- /dev/null
+++ b/man-pages-posix-2003/man3p/setpriority.3p
@@ -0,0 +1 @@
+.so man3p/getpriority.3p
diff --git a/man-pages-posix-2003/man3p/setprotoent.3p b/man-pages-posix-2003/man3p/setprotoent.3p
new file mode 100644
index 0000000..82a4140
--- /dev/null
+++ b/man-pages-posix-2003/man3p/setprotoent.3p
@@ -0,0 +1 @@
+.so man3p/getprotoent.3p
diff --git a/man-pages-posix-2003/man3p/setpwent.3p b/man-pages-posix-2003/man3p/setpwent.3p
new file mode 100644
index 0000000..235cf8b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/setpwent.3p
@@ -0,0 +1 @@
+.so man3p/getpwent.3p
diff --git a/man-pages-posix-2003/man3p/setregid.3p b/man-pages-posix-2003/man3p/setregid.3p
new file mode 100644
index 0000000..f718fe0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/setregid.3p
@@ -0,0 +1,91 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SETREGID" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" setregid
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+setregid \- set real and effective group IDs
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+int setregid(gid_t\fP \fIrgid\fP\fB, gid_t\fP \fIegid\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsetregid\fP() function shall set the real and effective group
+IDs of the calling process.
+.LP
+If \fIrgid\fP is -1, the real group ID shall not be changed; if \fIegid\fP
+is -1, the effective group ID shall not be
+changed.
+.LP
+The real and effective group IDs may be set to different values in
+the same call.
+.LP
+Only a process with appropriate privileges can set the real group
+ID and the effective group ID to any valid value.
+.LP
+A non-privileged process can set either the real group ID to the saved
+set-group-ID from one of the \fIexec\fP family of functions, or the
+effective group ID to the saved set-group-ID or the real group
+ID.
+.LP
+Any supplementary group IDs of the calling process remain unchanged.
+.SH RETURN VALUE
+.LP
+Upon successful completion, 0 shall be returned. Otherwise, -1 shall
+be returned and \fIerrno\fP set to indicate the error, and
+neither of the group IDs are changed.
+.SH ERRORS
+.LP
+The \fIsetregid\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The value of the \fIrgid\fP or \fIegid\fP argument is invalid or out-of-range.
+.TP 7
+.B EPERM
+The process does not have appropriate privileges and a change other
+than changing the real group ID to the saved set-group-ID,
+or changing the effective group ID to the real group ID or the saved
+set-group-ID, was requested.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+If a set-group-ID process sets its effective group ID to its real
+group ID, it can still set its effective group ID back to the
+saved set-group-ID.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexec\fP(), \fIgetegid\fP(), \fIgeteuid\fP(), \fIgetgid\fP(),
+\fIgetuid\fP(),
+\fIsetegid\fP(), \fIseteuid\fP(), \fIsetgid\fP(), \fIsetreuid\fP(),
+\fIsetuid\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/setreuid.3p b/man-pages-posix-2003/man3p/setreuid.3p
new file mode 100644
index 0000000..8a1eba0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/setreuid.3p
@@ -0,0 +1,98 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SETREUID" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" setreuid
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+setreuid \- set real and effective user IDs
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+int setreuid(uid_t\fP \fIruid\fP\fB, uid_t\fP \fIeuid\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsetreuid\fP() function shall set the real and effective user
+IDs of the current process to the values specified by the
+\fIruid\fP and \fIeuid\fP arguments. If \fIruid\fP or \fIeuid\fP is
+-1, the corresponding effective or real user ID of the
+current process shall be left unchanged.
+.LP
+A process with appropriate privileges can set either ID to any value.
+An unprivileged process can only set the effective user ID
+if the \fIeuid\fP argument is equal to either the real, effective,
+or saved user ID of the process.
+.LP
+It is unspecified whether a process without appropriate privileges
+is permitted to change the real user ID to match the current
+real, effective, or saved set-user-ID of the process.
+.SH RETURN VALUE
+.LP
+Upon successful completion, 0 shall be returned. Otherwise, -1 shall
+be returned and \fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fIsetreuid\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The value of the \fIruid\fP or \fIeuid\fP argument is invalid or out-of-range.
+.TP 7
+.B EPERM
+The current process does not have appropriate privileges, and either
+an attempt was made to change the effective user ID to a
+value other than the real user ID or the saved set-user-ID or an attempt
+was made to change the real user ID to a value not
+permitted by the implementation.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Setting the Effective User ID to the Real User ID
+.LP
+The following example sets the effective user ID of the calling process
+to the real user ID, so that files created later will be
+owned by the current user.
+.sp
+.RS
+.nf
+
+\fB#include <unistd.h>
+#include <sys/types.h>
+\&...
+setreuid(getuid(), getuid());
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgetegid\fP(), \fIgeteuid\fP(), \fIgetgid\fP(), \fIgetuid\fP(),
+\fIsetegid\fP(), \fIseteuid\fP(), \fIsetgid\fP(), \fIsetregid\fP(),
+\fIsetuid\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/setrlimit.3p b/man-pages-posix-2003/man3p/setrlimit.3p
new file mode 100644
index 0000000..2b27bee
--- /dev/null
+++ b/man-pages-posix-2003/man3p/setrlimit.3p
@@ -0,0 +1 @@
+.so man3p/getrlimit.3p
diff --git a/man-pages-posix-2003/man3p/setservent.3p b/man-pages-posix-2003/man3p/setservent.3p
new file mode 100644
index 0000000..dc6b5d8
--- /dev/null
+++ b/man-pages-posix-2003/man3p/setservent.3p
@@ -0,0 +1 @@
+.so man3p/getservent.3p
diff --git a/man-pages-posix-2003/man3p/setsid.3p b/man-pages-posix-2003/man3p/setsid.3p
new file mode 100644
index 0000000..28063b3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/setsid.3p
@@ -0,0 +1,92 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SETSID" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" setsid
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+setsid \- create session and set process group ID
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+pid_t setsid(void);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsetsid\fP() function shall create a new session, if the calling
+process is not a process group leader. Upon return the
+calling process shall be the session leader of this new session, shall
+be the process group leader of a new process group, and
+shall have no controlling terminal. The process group ID of the calling
+process shall be set equal to the process ID of the calling
+process. The calling process shall be the only process in the new
+process group and the only process in the new session.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIsetsid\fP() shall return the value
+of the new process group ID of the calling process.
+Otherwise, it shall return (\fBpid_t\fP)-1 and set \fIerrno\fP to
+indicate the error.
+.SH ERRORS
+.LP
+The \fIsetsid\fP() function shall fail if:
+.TP 7
+.B 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.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIsetsid\fP() function is similar to the \fIsetpgrp\fP() function
+of System V.
+System V, without job control, groups processes into process groups
+and creates new process groups via \fIsetpgrp\fP(); only one process
+group may be part of a login session.
+.LP
+Job control allows multiple process groups within a login session.
+In order to limit job control actions so that they can only
+affect processes in the same login session, this volume of IEEE\ Std\ 1003.1-2001
+adds the concept of a session that is
+created via \fIsetsid\fP(). The \fIsetsid\fP() function also creates
+the initial process group contained in the session.
+Additional process groups can be created via the \fIsetpgid\fP() function.
+A System V
+process group would correspond to a POSIX System Interfaces session
+containing a single POSIX process group. Note that this
+function requires that the calling process not be a process group
+leader. The usual way to ensure this is true is to create a new
+process with \fIfork\fP() and have it call \fIsetsid\fP(). The \fIfork\fP()
+function guarantees that the process ID of the new process does not
+match any existing
+process group ID.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgetsid\fP(), \fIsetpgid\fP(), \fIsetpgrp\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<sys/types.h>\fP, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/setsockopt.3p b/man-pages-posix-2003/man3p/setsockopt.3p
new file mode 100644
index 0000000..6007797
--- /dev/null
+++ b/man-pages-posix-2003/man3p/setsockopt.3p
@@ -0,0 +1,230 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SETSOCKOPT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" setsockopt
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+setsockopt \- set the socket options
+.SH SYNOPSIS
+.LP
+\fB#include <sys/socket.h>
+.br
+.sp
+int setsockopt(int\fP \fIsocket\fP\fB, int\fP \fIlevel\fP\fB, int\fP
+\fIoption_name\fP\fB,
+.br
+\ \ \ \ \ \ const void *\fP\fIoption_value\fP\fB, socklen_t\fP \fIoption_len\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsetsockopt\fP() function shall set the option specified by
+the \fIoption_name\fP argument, at the protocol level
+specified by the \fIlevel\fP argument, to the value pointed to by
+the \fIoption_value\fP argument for the socket associated with
+the file descriptor specified by the \fIsocket\fP argument.
+.LP
+The \fIlevel\fP argument specifies the protocol level at which the
+option resides. To set options at the socket level, specify
+the \fIlevel\fP argument as SOL_SOCKET. To set options at other levels,
+supply the appropriate \fIlevel\fP identifier for the
+protocol controlling the option. For example, to indicate that an
+option is interpreted by the TCP (Transport Control Protocol),
+set \fIlevel\fP to IPPROTO_TCP as defined in the \fI<netinet/in.h>\fP
+header.
+.LP
+The \fIoption_name\fP argument specifies a single option to set. The
+\fIoption_name\fP argument and any specified options are
+passed uninterpreted to the appropriate protocol module for interpretations.
+The \fI<sys/socket.h>\fP header defines the socket-level options.
+The options are as
+follows:
+.TP 7
+SO_DEBUG
+Turns on recording of debugging information. This option enables or
+disables debugging in the underlying protocol modules. This
+option takes an \fBint\fP value. This is a Boolean option.
+.TP 7
+SO_BROADCAST
+Permits sending of broadcast messages, if this is supported by the
+protocol. This option takes an \fBint\fP value. This is a
+Boolean option.
+.TP 7
+SO_REUSEADDR
+Specifies that the rules used in validating addresses supplied to
+\fIbind\fP() should
+allow reuse of local addresses, if this is supported by the protocol.
+This option takes an \fBint\fP value. This is a Boolean
+option.
+.TP 7
+SO_KEEPALIVE
+Keeps connections active by enabling the periodic transmission of
+messages, if this is supported by the protocol. This option
+takes an \fBint\fP value.
+.LP
+If the connected socket fails to respond to these messages, the connection
+is broken and threads writing to that socket are
+notified with a SIGPIPE signal. This is a Boolean option.
+.TP 7
+SO_LINGER
+Lingers on a \fIclose\fP() if data is present. This option controls
+the action taken
+when unsent messages queue on a socket and \fIclose\fP() is performed.
+If SO_LINGER is set,
+the system shall block the process during \fIclose\fP() until it can
+transmit the data or
+until the time expires. If SO_LINGER is not specified, and \fIclose\fP()
+is issued, the
+system handles the call in a way that allows the process to continue
+as quickly as possible. This option takes a \fBlinger\fP
+structure, as defined in the \fI<sys/socket.h>\fP header, to specify
+the state
+of the option and linger interval.
+.TP 7
+SO_OOBINLINE
+Leaves received out-of-band data (data marked urgent) inline. This
+option takes an \fBint\fP value. This is a Boolean
+option.
+.TP 7
+SO_SNDBUF
+Sets send buffer size. This option takes an \fBint\fP value.
+.TP 7
+SO_RCVBUF
+Sets receive buffer size. This option takes an \fBint\fP value.
+.TP 7
+SO_DONTROUTE
+Requests that outgoing messages bypass the standard routing facilities.
+The destination shall be on a directly-connected
+network, and messages are directed to the appropriate network interface
+according to the destination address. The effect, if any,
+of this option depends on what protocol is in use. This option takes
+an \fBint\fP value. This is a Boolean option.
+.TP 7
+SO_RCVLOWAT
+Sets the minimum number of bytes to process for socket input operations.
+The default value for SO_RCVLOWAT is 1. If 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. (They may 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 returned; for example,
+out-of-band data.) This option takes an \fBint\fP value.
+Note that not all implementations allow this option to be set.
+.TP 7
+SO_RCVTIMEO
+Sets the timeout value that specifies the maximum amount of time an
+input function waits until it completes. It accepts a
+\fBtimeval\fP structure with the number of seconds and microseconds
+specifying the limit on how long to wait for an input
+operation to complete. If a receive operation has blocked for this
+much time without receiving additional data, it shall return
+with a partial count or \fIerrno\fP set to [EAGAIN] or [EWOULDBLOCK]
+if no data is received. The default for this option is zero,
+which indicates that a receive operation shall not time out. This
+option takes a \fBtimeval\fP structure. Note that not all
+implementations allow this option to be set.
+.TP 7
+SO_SNDLOWAT
+Sets the minimum number of bytes to process for socket output operations.
+Non-blocking output operations shall process no data
+if flow control does not allow the smaller of the send low water mark
+value or the entire request to be processed. This option
+takes an \fBint\fP value. Note that not all implementations allow
+this option to be set.
+.TP 7
+SO_SNDTIMEO
+Sets the timeout value specifying the amount of time that an output
+function blocks because flow control prevents data from
+being sent. If a send operation has blocked for this time, it shall
+return with a partial count or with \fIerrno\fP set to
+[EAGAIN] or [EWOULDBLOCK] if no data is sent. The default for this
+option is zero, which indicates that a send operation shall not
+time out. This option stores a \fBtimeval\fP structure. Note that
+not all implementations allow this option to be set.
+.sp
+.LP
+For Boolean options, 0 indicates that the option is disabled and 1
+indicates that the option is enabled.
+.LP
+Options at other protocol levels vary in format and name.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIsetsockopt\fP() shall return 0. Otherwise,
+-1 shall be returned and \fIerrno\fP set to indicate
+the error.
+.SH ERRORS
+.LP
+The \fIsetsockopt\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fIsocket\fP argument is not a valid file descriptor.
+.TP 7
+.B EDOM
+The send and receive timeout values are too big to fit into the timeout
+fields in the socket structure.
+.TP 7
+.B EINVAL
+The specified option is invalid at the specified socket level or the
+socket has been shut down.
+.TP 7
+.B EISCONN
+The socket is already connected, and a specified option cannot be
+set while the socket is connected.
+.TP 7
+.B ENOPROTOOPT
+.sp
+The option is not supported by the protocol.
+.TP 7
+.B ENOTSOCK
+The \fIsocket\fP argument does not refer to a socket.
+.sp
+.LP
+The \fIsetsockopt\fP() function may fail if:
+.TP 7
+.B ENOMEM
+There was insufficient memory available for the operation to complete.
+.TP 7
+.B ENOBUFS
+Insufficient resources are available in the system to complete the
+call.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIsetsockopt\fP() function provides an application program with
+the means to control socket behavior. An application
+program can use \fIsetsockopt\fP() to allocate buffer space, control
+timeouts, or permit socket data broadcasts. The \fI<sys/socket.h>\fP
+header defines the socket-level options available to
+\fIsetsockopt\fP().
+.LP
+Options may exist at multiple protocol levels. The SO_ options are
+always present at the uppermost socket level.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fISockets\fP, \fIbind\fP(), \fIendprotoent\fP(), \fIgetsockopt\fP(),
+\fIsocket\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<netinet/in.h>\fP, \fI<sys/socket.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/setstate.3p b/man-pages-posix-2003/man3p/setstate.3p
new file mode 100644
index 0000000..0f22b82
--- /dev/null
+++ b/man-pages-posix-2003/man3p/setstate.3p
@@ -0,0 +1 @@
+.so man3p/random.3p
diff --git a/man-pages-posix-2003/man3p/setuid.3p b/man-pages-posix-2003/man3p/setuid.3p
new file mode 100644
index 0000000..b168643
--- /dev/null
+++ b/man-pages-posix-2003/man3p/setuid.3p
@@ -0,0 +1,204 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SETUID" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" setuid
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+setuid \- set user ID
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+int setuid(uid_t\fP \fIuid\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+If the process has appropriate privileges, \fIsetuid\fP() shall set
+the real user ID, effective user ID, and the saved
+set-user-ID of the calling process to \fIuid\fP.
+.LP
+If the process does not have appropriate privileges, but \fIuid\fP
+is equal to the real user ID or the saved set-user-ID,
+\fIsetuid\fP() shall set the effective user ID to \fIuid\fP; the real
+user ID and saved set-user-ID shall remain unchanged.
+.LP
+The \fIsetuid\fP() function shall not affect the supplementary group
+list in any way.
+.SH RETURN VALUE
+.LP
+Upon successful completion, 0 shall be returned. Otherwise, -1 shall
+be returned and \fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fIsetuid\fP() function shall fail, return -1, and set \fIerrno\fP
+to the corresponding value if one or more of the
+following are true:
+.TP 7
+.B EINVAL
+The value of the \fIuid\fP argument is invalid and not supported by
+the implementation.
+.TP 7
+.B EPERM
+The process does not have appropriate privileges and \fIuid\fP does
+not match the real user ID or the saved set-user-ID.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The various behaviors of the \fIsetuid\fP() and \fIsetgid\fP() functions
+when called by
+non-privileged processes reflect the behavior of different historical
+implementations. For portability, it is recommended that new
+non-privileged applications use the \fIseteuid\fP() and \fIsetegid\fP()
+functions instead.
+.LP
+The saved set-user-ID capability allows a program to regain the effective
+user ID established at the last \fIexec\fP call. Similarly, the saved
+set-group-ID capability allows a program to regain the effective
+group ID established at the last \fIexec\fP call. These capabilities
+are derived from System
+V. Without them, a program might have to run as superuser in order
+to perform the same functions, because superuser can write on
+the user's files. This is a problem because such a program can write
+on any user's files, and so must be carefully written to
+emulate the permissions of the calling process properly. In System
+V, these capabilities have traditionally been implemented only
+via the \fIsetuid\fP() and \fIsetgid\fP() functions for non-privileged
+processes. The fact
+that the behavior of those functions was different for privileged
+processes made them difficult to use. The POSIX.1-1990 standard
+defined the \fIsetuid\fP() function to behave differently for privileged
+and unprivileged users. When the caller had the
+appropriate privilege, the function set the calling process' real
+user ID, effective user ID, and saved set-user ID on
+implementations that supported it. When the caller did not have the
+appropriate privilege, the function set only the effective user
+ID, subject to permission checks. The former use is generally needed
+for utilities like \fIlogin\fP and \fIsu\fP, which are not
+conforming applications and thus outside the scope of IEEE\ Std\ 1003.1-2001.
+These utilities wish to change the user ID
+irrevocably to a new value, generally that of an unprivileged user.
+The latter use is needed for conforming applications that are
+installed with the set-user-ID bit and need to perform operations
+using the real user ID.
+.LP
+IEEE\ Std\ 1003.1-2001 augments the latter functionality with a mandatory
+feature named _POSIX_SAVED_IDS. This feature
+permits a set-user-ID application to switch its effective user ID
+back and forth between the values of its \fIexec\fP-time real user
+ID and effective user ID. Unfortunately, the POSIX.1-1990 standard
+did not
+permit a conforming application using this feature to work properly
+when it happened to be executed with the
+(implementation-defined) appropriate privilege. Furthermore, the application
+did not even have a means to tell whether it had this
+privilege. Since the saved set-user-ID feature is quite desirable
+for applications, as evidenced by the fact that NIST required it
+in FIPS 151-2, it has been mandated by IEEE\ Std\ 1003.1-2001. However,
+there are implementors who have been reluctant to
+support it given the limitation described above.
+.LP
+The 4.3BSD system handles the problem by supporting separate functions:
+\fIsetuid\fP() (which always sets both the real and
+effective user IDs, like \fIsetuid\fP() in IEEE\ Std\ 1003.1-2001
+for privileged users), and \fIseteuid\fP() (which always sets just
+the effective user ID, like \fIsetuid\fP() in
+IEEE\ Std\ 1003.1-2001 for non-privileged users). This separation
+of functionality into distinct functions seems desirable.
+4.3BSD does not support the saved set-user-ID feature. It supports
+similar functionality of switching the effective user ID back
+and forth via \fIsetreuid\fP(), which permits reversing the real and
+effective user IDs.
+This model seems less desirable than the saved set-user-ID because
+the real user ID changes as a side effect. The current 4.4BSD
+includes saved effective IDs and uses them for \fIseteuid\fP() and
+\fIsetegid\fP() as described above. The \fIsetreuid\fP()
+and \fIsetregid\fP() functions will be deprecated or removed.
+.LP
+The solution here is:
+.IP " *" 3
+Require that all implementations support the functionality of the
+saved set-user-ID, which is set by the \fIexec\fP functions and by
+privileged calls to \fIsetuid\fP().
+.LP
+.IP " *" 3
+Add the \fIseteuid\fP() and \fIsetegid\fP()
+functions as portable alternatives to \fIsetuid\fP() and \fIsetgid\fP()
+for non-privileged
+and privileged processes.
+.LP
+.LP
+Historical systems have provided two mechanisms for a set-user-ID
+process to change its effective user ID to be the same as its
+real user ID in such a way that it could return to the original effective
+user ID: the use of the \fIsetuid\fP() function in the
+presence of a saved set-user-ID, or the use of the BSD \fIsetreuid\fP()
+function, which
+was able to swap the real and effective user IDs. The changes included
+in IEEE\ Std\ 1003.1-2001 provide a new mechanism
+using \fIseteuid\fP() in conjunction with a saved set-user-ID. Thus,
+all implementations
+with the new \fIseteuid\fP() mechanism will have a saved set-user-ID
+for each process, and
+most of the behavior controlled by _POSIX_SAVED_IDS has been changed
+to agree with the case where the option was defined. The \fIkill\fP()
+function is an exception. Implementors of the new \fIseteuid\fP()
+mechanism will generally be required to maintain compatibility with
+the older
+mechanisms previously supported by their systems. However, compatibility
+with this use of \fIsetreuid\fP() and with the _POSIX_SAVED_IDS behavior
+of \fIkill\fP() is unfortunately complicated. If an implementation
+with a saved set-user-ID allows a
+process to use \fIsetreuid\fP() to swap its real and effective user
+IDs, but were to
+leave the saved set-user-ID unmodified, the process would then have
+an effective user ID equal to the original real user ID, and
+both real and saved set-user-ID would be equal to the original effective
+user ID. In that state, the real user would be unable to
+kill the process, even though the effective user ID of the process
+matches that of the real user, if the \fIkill\fP() behavior of _POSIX_SAVED_IDS
+was used. This is obviously not acceptable. The alternative
+choice, which is used in at least one implementation, is to change
+the saved set-user-ID to the effective user ID during most calls
+to \fIsetreuid\fP(). The standard developers considered that alternative
+to be less
+correct than the retention of the old behavior of \fIkill\fP() in
+such systems. Current
+conforming applications shall accommodate either behavior from \fIkill\fP(),
+and there
+appears to be no strong reason for \fIkill\fP() to check the saved
+set-user-ID rather than
+the effective user ID.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexec\fP(), \fIgetegid\fP(), \fIgeteuid\fP(), \fIgetgid\fP(),
+\fIgetuid\fP(),
+\fIsetegid\fP(), \fIseteuid\fP(), \fIsetgid\fP(), \fIsetregid\fP(),
+\fIsetreuid\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<sys/types.h>\fP,
+\fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/setutxent.3p b/man-pages-posix-2003/man3p/setutxent.3p
new file mode 100644
index 0000000..f7769c3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/setutxent.3p
@@ -0,0 +1 @@
+.so man3p/getutxid.3p
diff --git a/man-pages-posix-2003/man3p/setvbuf.3p b/man-pages-posix-2003/man3p/setvbuf.3p
new file mode 100644
index 0000000..8197cf7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/setvbuf.3p
@@ -0,0 +1,96 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SETVBUF" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" setvbuf
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+setvbuf \- assign buffering to a stream
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+int setvbuf(FILE *restrict\fP \fIstream\fP\fB, char *restrict\fP \fIbuf\fP\fB,
+int\fP \fItype\fP\fB,
+.br
+\ \ \ \ \ \ size_t\fP \fIsize\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsetvbuf\fP() function may be used after the stream pointed
+to by \fIstream\fP is associated with an open file but
+before any other operation (other than an unsuccessful call to \fIsetvbuf\fP())
+is performed on the stream. The argument
+\fItype\fP determines how \fIstream\fP shall be buffered, as follows:
+.IP " *" 3
+{_IOFBF} shall cause input/output to be fully buffered.
+.LP
+.IP " *" 3
+{_IOLBF} shall cause input/output to be line buffered.
+.LP
+.IP " *" 3
+{_IONBF} shall cause input/output to be unbuffered.
+.LP
+.LP
+If \fIbuf\fP is not a null pointer, the array it points to may be
+used instead of a buffer allocated by \fIsetvbuf\fP() and
+the argument \fIsize\fP specifies the size of the array; otherwise,
+\fIsize\fP may determine the size of a buffer allocated by
+the \fIsetvbuf\fP() function. The contents of the array at any time
+are unspecified.
+.LP
+For information about streams, see \fIStandard I/O Streams\fP .
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIsetvbuf\fP() shall return 0. Otherwise,
+it shall return a non-zero value if an invalid value is
+given for \fItype\fP or if the request cannot be honored, and
+may set \fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fIsetvbuf\fP() function may fail if:
+.TP 7
+.B EBADF
+The file descriptor underlying \fIstream\fP is not valid.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+A common source of error is allocating buffer space as an "automatic"
+variable in a code block, and then failing to close the
+stream in the same block.
+.LP
+With \fIsetvbuf\fP(), allocating a buffer of \fIsize\fP bytes does
+not necessarily imply that all of \fIsize\fP bytes are
+used for the buffer area.
+.LP
+Applications should note that many implementations only provide line
+buffering on input from terminal devices.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIStandard I/O Streams\fP, \fIfopen\fP(), \fIsetbuf\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/shm_open.3p b/man-pages-posix-2003/man3p/shm_open.3p
new file mode 100644
index 0000000..924e320
--- /dev/null
+++ b/man-pages-posix-2003/man3p/shm_open.3p
@@ -0,0 +1,267 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SHM_OPEN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" shm_open
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+shm_open \- open a shared memory object (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <sys/mman.h>
+.br
+.sp
+int shm_open(const char *\fP\fIname\fP\fB, int\fP \fIoflag\fP\fB,
+mode_t\fP \fImode\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIshm_open\fP() function shall establish a connection between
+a shared memory object and a file descriptor. It shall
+create an open file description that refers to the shared memory object
+and a file descriptor that refers to that open file
+description. The file descriptor is used by other functions to refer
+to that shared memory object. The \fIname\fP argument points
+to a string naming a shared memory object. It is unspecified whether
+the name appears in the file system and is visible to other
+functions that take pathnames as arguments. The \fIname\fP argument
+conforms to the construction rules for a pathname. If
+\fIname\fP begins with the slash character, then processes calling
+\fIshm_open\fP() with the same value of \fIname\fP refer to
+the same shared memory object, as long as that name has not been removed.
+If \fIname\fP does not begin with the slash character,
+the effect is implementation-defined. The interpretation of slash
+characters other than the leading slash character in \fIname\fP
+is implementation-defined.
+.LP
+If successful, \fIshm_open\fP() shall return a file descriptor for
+the shared memory object that is the lowest numbered file
+descriptor not currently open for that process. The open file description
+is new, and therefore the file descriptor does not share
+it with any other processes. It is unspecified whether the file offset
+is set. The FD_CLOEXEC file descriptor flag associated with
+the new file descriptor is set.
+.LP
+The file status flags and file access modes of the open file description
+are according to the value of \fIoflag\fP. The
+\fIoflag\fP argument is the bitwise-inclusive OR of the following
+flags defined in the \fI<fcntl.h>\fP header. Applications specify
+exactly one of the first two values (access
+modes) below in the value of \fIoflag\fP:
+.TP 7
+O_RDONLY
+Open for read access only.
+.TP 7
+O_RDWR
+Open for read or write access.
+.sp
+.LP
+Any combination of the remaining flags may be specified in the value
+of \fIoflag\fP:
+.TP 7
+O_CREAT
+If the shared memory object exists, this flag has no effect, except
+as noted under O_EXCL below. Otherwise, the shared memory
+object is created; the user ID of the shared memory object shall be
+set to the effective user ID of the process; the group ID of
+the shared memory object is set to a system default group ID or to
+the effective group ID of the process. The permission bits of
+the shared memory object shall be set to the value of the \fImode\fP
+argument except those set in the file mode creation mask of
+the process. When bits in \fImode\fP other than the file permission
+bits are set, the effect is unspecified. The \fImode\fP
+argument does not affect whether the shared memory object is opened
+for reading, for writing, or for both. The shared memory object
+has a size of zero.
+.TP 7
+O_EXCL
+If O_EXCL and O_CREAT are set, \fIshm_open\fP() fails if the shared
+memory object exists. The check for the existence of the
+shared memory object and the creation of the object if it does not
+exist is atomic with respect to other processes executing
+\fIshm_open\fP() naming the same shared memory object with O_EXCL
+and O_CREAT set. If O_EXCL is set and O_CREAT is not set, the
+result is undefined.
+.TP 7
+O_TRUNC
+If the shared memory object exists, and it is successfully opened
+O_RDWR, the object shall be truncated to zero length and the
+mode and owner shall be unchanged by this function call. The result
+of using O_TRUNC with O_RDONLY is undefined.
+.sp
+.LP
+When a shared memory object is created, the state of the shared memory
+object, including all data associated with the shared
+memory object, persists until the shared memory object is unlinked
+and all other references are gone. It is unspecified whether the
+name and shared memory object state remain valid after a system reboot.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIshm_open\fP() function shall return
+a non-negative integer representing the lowest numbered
+unused file descriptor. Otherwise, it shall return -1 and set \fIerrno\fP
+to indicate the error.
+.SH ERRORS
+.LP
+The \fIshm_open\fP() function shall fail if:
+.TP 7
+.B EACCES
+The shared memory object exists and the permissions specified by \fIoflag\fP
+are denied, or the shared memory object does not
+exist and permission to create the shared memory object is denied,
+or O_TRUNC is specified and write permission is denied.
+.TP 7
+.B EEXIST
+O_CREAT and O_EXCL are set and the named shared memory object already
+exists.
+.TP 7
+.B EINTR
+The \fIshm_open\fP() operation was interrupted by a signal.
+.TP 7
+.B EINVAL
+The \fIshm_open\fP() operation is not supported for the given name.
+.TP 7
+.B EMFILE
+Too many file descriptors are currently in use by this process.
+.TP 7
+.B ENAMETOOLONG
+The length of the \fIname\fP argument exceeds {PATH_MAX} or a pathname
+component is longer than {NAME_MAX}.
+.TP 7
+.B ENFILE
+Too many shared memory objects are currently open in the system.
+.TP 7
+.B ENOENT
+O_CREAT is not set and the named shared memory object does not exist.
+.TP 7
+.B ENOSPC
+There is insufficient space for the creation of the new shared memory
+object.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+When the Memory Mapped Files option is supported, the normal \fIopen\fP()
+call is used to
+obtain a descriptor to a file to be mapped according to existing practice
+with \fImmap\fP().
+When the Shared Memory Objects option is supported, the \fIshm_open\fP()
+function shall obtain a descriptor to the shared memory
+object to be mapped.
+.LP
+There is ample precedent for having a file descriptor represent several
+types of objects. In the POSIX.1-1990 standard, a file
+descriptor can represent a file, a pipe, a FIFO, a tty, or a directory.
+Many implementations simply have an operations vector,
+which is indexed by the file descriptor type and does very different
+operations. Note that in some cases the file descriptor passed
+to generic operations on file descriptors is returned by \fIopen\fP()
+or \fIcreat\fP() and in some cases returned by alternate functions,
+such as \fIpipe\fP(). The latter technique is used by \fIshm_open\fP().
+.LP
+Note that such shared memory objects can actually be implemented as
+mapped files. In both cases, the size can be set after the
+open using \fIftruncate\fP(). The \fIshm_open\fP() function itself
+does not create a
+shared object of a specified size because this would duplicate an
+extant function that set the size of an object referenced by a
+file descriptor.
+.LP
+On implementations where memory objects are implemented using the
+existing file system, the \fIshm_open\fP() function may be
+implemented using a macro that invokes \fIopen\fP(), and the \fIshm_unlink\fP()
+function may be implemented using a macro that invokes \fIunlink\fP().
+.LP
+For implementations without a permanent file system, the definition
+of the name of the memory objects is allowed not to survive
+a system reboot. Note that this allows systems with a permanent file
+system to implement memory objects as data structures internal
+to the implementation as well.
+.LP
+On implementations that choose to implement memory objects using memory
+directly, a \fIshm_open\fP() followed by an \fIftruncate\fP() and
+\fIclose\fP() can be used to
+preallocate a shared memory area and to set the size of that preallocation.
+This may be necessary for systems without virtual
+memory hardware support in order to ensure that the memory is contiguous.
+.LP
+The set of valid open flags to \fIshm_open\fP() was restricted to
+O_RDONLY, O_RDWR, O_CREAT, and O_TRUNC because these could be
+easily implemented on most memory mapping systems. This volume of
+IEEE\ Std\ 1003.1-2001 is silent on the results if the
+implementation cannot supply the requested file access because of
+implementation-defined reasons, including hardware ones.
+.LP
+The error conditions [EACCES] and [ENOTSUP] are provided to inform
+the application that the implementation cannot complete a
+request.
+.LP
+[EACCES] indicates for implementation-defined reasons, probably hardware-related,
+that the implementation cannot comply with a
+requested mode because it conflicts with another requested mode. An
+example might be that an application desires to open a memory
+object two times, mapping different areas with different access modes.
+If the implementation cannot map a single area into a
+process space in two places, which would be required if different
+access modes were required for the two areas, then the
+implementation may inform the application at the time of the second
+open.
+.LP
+[ENOTSUP] indicates for implementation-defined reasons, probably hardware-related,
+that the implementation cannot comply with a
+requested mode at all. An example would be that the hardware of the
+implementation cannot support write-only shared memory
+areas.
+.LP
+On all implementations, it may be desirable to restrict the location
+of the memory objects to specific file systems for
+performance (such as a RAM disk) or implementation-defined reasons
+(shared memory supported directly only on certain file systems).
+The \fIshm_open\fP() function may be used to enforce these restrictions.
+There are a number of methods available to the
+application to determine an appropriate name of the file or the location
+of an appropriate directory. One way is from the
+environment via \fIgetenv\fP(). Another would be from a configuration
+file.
+.LP
+This volume of IEEE\ Std\ 1003.1-2001 specifies that memory objects
+have initial contents of zero when created. This is
+consistent with current behavior for both files and newly allocated
+memory. For those implementations that use physical memory, it
+would be possible that such implementations could simply use available
+memory and give it to the process uninitialized. This,
+however, is not consistent with standard behavior for the uninitialized
+data area, the stack, and of course, files. Finally, it is
+highly desirable to set the allocated memory to zero for security
+reasons. Thus, initializing memory objects to zero is
+required.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIclose\fP(), \fIdup\fP(), \fIexec\fP(), \fIfcntl\fP(), \fImmap\fP(),
+\fIshmat\fP(), \fIshmctl\fP(), \fIshmdt\fP(), \fIshm_unlink\fP(),
+\fIumask\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<fcntl.h>\fP, \fI<sys/mman.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/shm_unlink.3p b/man-pages-posix-2003/man3p/shm_unlink.3p
new file mode 100644
index 0000000..4d4d5f3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/shm_unlink.3p
@@ -0,0 +1,91 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SHM_UNLINK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" shm_unlink
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+shm_unlink \- remove a shared memory object (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <sys/mman.h>
+.br
+.sp
+int shm_unlink(const char *\fP\fIname\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIshm_unlink\fP() function shall remove the name of the shared
+memory object named by the string pointed to by
+\fIname\fP.
+.LP
+If one or more references to the shared memory object exist when the
+object is unlinked, the name shall be removed before
+\fIshm_unlink\fP() returns, but the removal of the memory object contents
+shall be postponed until all open and map references to
+the shared memory object have been removed.
+.LP
+Even if the object continues to exist after the last \fIshm_unlink\fP(),
+reuse of the name shall subsequently cause \fIshm_open\fP() to behave
+as if no shared memory object of this name exists (that is, \fIshm_open\fP()
+will fail if O_CREAT is not set, or will create a new shared memory
+object if
+O_CREAT is set).
+.SH RETURN VALUE
+.LP
+Upon successful completion, a value of zero shall be returned. Otherwise,
+a value of -1 shall be returned and \fIerrno\fP set
+to indicate the error. If -1 is returned, the named shared memory
+object shall not be changed by this function call.
+.SH ERRORS
+.LP
+The \fIshm_unlink\fP() function shall fail if:
+.TP 7
+.B EACCES
+Permission is denied to unlink the named shared memory object.
+.TP 7
+.B ENAMETOOLONG
+The length of the \fIname\fP argument exceeds {PATH_MAX} or a pathname
+component is longer than {NAME_MAX}.
+.TP 7
+.B ENOENT
+The named shared memory object does not exist.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Names of memory objects that were allocated with \fIopen\fP() are
+deleted with \fIunlink\fP() in the usual fashion. Names of memory
+objects that were allocated with \fIshm_open\fP() are deleted with
+\fIshm_unlink\fP(). Note that the actual memory object is not
+destroyed until the last close and unmap on it have occurred if it
+was already in use.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIclose\fP(), \fImmap\fP(), \fImunmap\fP(), \fIshmat\fP(), \fIshmctl\fP(),
+\fIshmdt\fP(), \fIshm_open\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<sys/mman.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/shmat.3p b/man-pages-posix-2003/man3p/shmat.3p
new file mode 100644
index 0000000..fded4b7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/shmat.3p
@@ -0,0 +1,128 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SHMAT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" shmat
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+shmat \- XSI shared memory attach operation
+.SH SYNOPSIS
+.LP
+\fB#include <sys/shm.h>
+.br
+.sp
+void *shmat(int\fP \fIshmid\fP\fB, const void *\fP\fIshmaddr\fP\fB,
+int\fP \fIshmflg\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIshmat\fP() function operates on XSI shared memory (see the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, Section 3.340,
+Shared Memory Object). It is unspecified whether this function
+interoperates with the realtime interprocess communication facilities
+defined in \fIRealtime\fP .
+.LP
+The \fIshmat\fP() function attaches the shared memory segment associated
+with the shared memory identifier specified by
+\fIshmid\fP to the address space of the calling process. The segment
+is attached at the address specified by one of the following
+criteria:
+.IP " *" 3
+If \fIshmaddr\fP is a null pointer, the segment is attached at the
+first available address as selected by the system.
+.LP
+.IP " *" 3
+If \fIshmaddr\fP is not a null pointer and (\fIshmflg\fP &SHM_RND)
+is non-zero, the segment is attached at the address
+given by (\fIshmaddr\fP -((\fIuintptr_t\fP)\fIshmaddr\fP %SHMLBA)).
+The character \fB'%'\fP is the C-language remainder
+operator.
+.LP
+.IP " *" 3
+If \fIshmaddr\fP is not a null pointer and (\fIshmflg\fP &SHM_RND)
+is 0, the segment is attached at the address given by
+\fIshmaddr\fP.
+.LP
+.IP " *" 3
+The segment is attached for reading if (\fIshmflg\fP &SHM_RDONLY)
+is non-zero and the calling process has read permission;
+otherwise, if it is 0 and the calling process has read and write permission,
+the segment is attached for reading and writing.
+.LP
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIshmat\fP() shall increment the value
+of \fIshm_nattch\fP in the data structure associated with
+the shared memory ID of the attached shared memory segment and return
+the segment's start address.
+.LP
+Otherwise, the shared memory segment shall not be attached, \fIshmat\fP()
+shall return -1, and \fIerrno\fP shall be set to
+indicate the error.
+.SH ERRORS
+.LP
+The \fIshmat\fP() function shall fail if:
+.TP 7
+.B EACCES
+Operation permission is denied to the calling process; see \fIXSI
+Interprocess
+Communication\fP .
+.TP 7
+.B EINVAL
+The value of \fIshmid\fP is not a valid shared memory identifier,
+the \fIshmaddr\fP is not a null pointer, and the value of
+(\fIshmaddr\fP -((\fIuintptr_t\fP)\fIshmaddr\fP %SHMLBA)) is an illegal
+address for attaching shared memory; or the
+\fIshmaddr\fP is not a null pointer, (\fIshmflg\fP &SHM_RND) is 0,
+and the value of \fIshmaddr\fP is an illegal address for
+attaching shared memory.
+.TP 7
+.B EMFILE
+The number of shared memory segments attached to the calling process
+would exceed the system-imposed limit.
+.TP 7
+.B ENOMEM
+The available data space is not large enough to accommodate the shared
+memory segment.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The POSIX Realtime Extension defines alternative interfaces for interprocess
+communication. Application developers who need to
+use IPC should design their applications so that modules using the
+IPC routines described in \fIXSI Interprocess Communication\fP can
+be easily modified to use the alternative
+interfaces.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIXSI Interprocess Communication\fP, \fIRealtime\fP, \fIexec\fP()
+,
+\fIexit\fP(), \fIfork\fP(), \fIshmctl\fP(), \fIshmdt\fP(), \fIshmget\fP(),
+\fIshm_open\fP(),
+\fIshm_unlink\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<sys/shm.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/shmctl.3p b/man-pages-posix-2003/man3p/shmctl.3p
new file mode 100644
index 0000000..9e6d094
--- /dev/null
+++ b/man-pages-posix-2003/man3p/shmctl.3p
@@ -0,0 +1,135 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SHMCTL" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" shmctl
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+shmctl \- XSI shared memory control operations
+.SH SYNOPSIS
+.LP
+\fB#include <sys/shm.h>
+.br
+.sp
+int shmctl(int\fP \fIshmid\fP\fB, int\fP \fIcmd\fP\fB, struct shmid_ds
+*\fP\fIbuf\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIshmctl\fP() function operates on XSI shared memory (see the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Section 3.340, Shared Memory Object). It is unspecified whether this
+function
+interoperates with the realtime interprocess communication facilities
+defined in \fIRealtime\fP .
+.LP
+The \fIshmctl\fP() function provides a variety of shared memory control
+operations as specified by \fIcmd\fP. The following
+values for \fIcmd\fP are available:
+.TP 7
+IPC_STAT
+Place the current value of each member of the \fBshmid_ds\fP data
+structure associated with \fIshmid\fP into the structure
+pointed to by \fIbuf\fP. The contents of the structure are defined
+in \fI<sys/shm.h>\fP.
+.TP 7
+IPC_SET
+Set the value of the following members of the \fBshmid_ds\fP data
+structure associated with \fIshmid\fP to the corresponding
+value found in the structure pointed to by \fIbuf\fP:
+.sp
+.RS
+.nf
+
+\fBshm_perm.uid
+shm_perm.gid
+shm_perm.mode \fP Low-order nine bits.
+.fi
+.RE
+.LP
+IPC_SET can only be executed by a process that has an effective user
+ID equal to either that of a process with appropriate
+privileges or to the value of \fIshm_perm.cuid\fP or \fIshm_perm.uid\fP
+in the \fBshmid_ds\fP data structure associated with
+\fIshmid\fP.
+.TP 7
+IPC_RMID
+Remove the shared memory identifier specified by \fIshmid\fP from
+the system and destroy the shared memory segment and
+\fBshmid_ds\fP data structure associated with it. IPC_RMID can only
+be executed by a process that has an effective user ID equal
+to either that of a process with appropriate privileges or to the
+value of \fIshm_perm.cuid\fP or \fIshm_perm.uid\fP in the
+\fBshmid_ds\fP data structure associated with \fIshmid\fP.
+.sp
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIshmctl\fP() shall return 0; otherwise,
+it shall return -1 and set \fIerrno\fP to indicate the
+error.
+.SH ERRORS
+.LP
+The \fIshmctl\fP() function shall fail if:
+.TP 7
+.B EACCES
+The argument \fIcmd\fP is equal to IPC_STAT and the calling process
+does not have read permission; see \fIXSI Interprocess Communication\fP
+\&.
+.TP 7
+.B EINVAL
+The value of \fIshmid\fP is not a valid shared memory identifier,
+or the value of \fIcmd\fP is not a valid command.
+.TP 7
+.B EPERM
+The argument \fIcmd\fP is equal to IPC_RMID or IPC_SET and the effective
+user ID of the calling process is not equal to that
+of a process with appropriate privileges and it is not equal to the
+value of \fIshm_perm.cuid\fP or \fIshm_perm.uid\fP in the
+data structure associated with \fIshmid\fP.
+.sp
+.LP
+The \fIshmctl\fP() function may fail if:
+.TP 7
+.B EOVERFLOW
+The \fIcmd\fP argument is IPC_STAT and the \fIgid\fP or \fIuid\fP
+value is too large to be stored in the structure pointed
+to by the \fIbuf\fP argument.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The POSIX Realtime Extension defines alternative interfaces for interprocess
+communication. Application developers who need to
+use IPC should design their applications so that modules using the
+IPC routines described in \fIXSI Interprocess Communication\fP can
+be easily modified to use the alternative
+interfaces.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIXSI Interprocess Communication\fP, \fIRealtime\fP, \fIshmat\fP(),
+\fIshmdt\fP(), \fIshmget\fP(), \fIshm_open\fP(), \fIshm_unlink\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<sys/shm.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/shmdt.3p b/man-pages-posix-2003/man3p/shmdt.3p
new file mode 100644
index 0000000..2dbaa3d
--- /dev/null
+++ b/man-pages-posix-2003/man3p/shmdt.3p
@@ -0,0 +1,84 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SHMDT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" shmdt
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+shmdt \- XSI shared memory detach operation
+.SH SYNOPSIS
+.LP
+\fB#include <sys/shm.h>
+.br
+.sp
+int shmdt(const void *\fP\fIshmaddr\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIshmdt\fP() function operates on XSI shared memory (see the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, Section 3.340,
+Shared Memory Object). It is unspecified whether this function
+interoperates with the realtime interprocess communication facilities
+defined in \fIRealtime\fP .
+.LP
+The \fIshmdt\fP() function detaches the shared memory segment located
+at the address specified by \fIshmaddr\fP from the
+address space of the calling process.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIshmdt\fP() shall decrement the value
+of \fIshm_nattch\fP in the data structure associated with
+the shared memory ID of the attached shared memory segment and return
+0.
+.LP
+Otherwise, the shared memory segment shall not be detached, \fIshmdt\fP()
+shall return -1, and \fIerrno\fP shall be set to
+indicate the error.
+.SH ERRORS
+.LP
+The \fIshmdt\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The value of \fIshmaddr\fP is not the data segment start address of
+a shared memory segment.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The POSIX Realtime Extension defines alternative interfaces for interprocess
+communication. Application developers who need to
+use IPC should design their applications so that modules using the
+IPC routines described in \fIXSI Interprocess Communication\fP can
+be easily modified to use the alternative
+interfaces.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIXSI Interprocess Communication\fP, \fIRealtime\fP, \fIexec\fP()
+,
+\fIexit\fP(), \fIfork\fP(), \fIshmat\fP(), \fIshmctl\fP(), \fIshmget\fP(),
+\fIshm_open\fP(), \fIshm_unlink\fP(), the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, \fI<sys/shm.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/shmget.3p b/man-pages-posix-2003/man3p/shmget.3p
new file mode 100644
index 0000000..8b9452e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/shmget.3p
@@ -0,0 +1,147 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SHMGET" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" shmget
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+shmget \- get an XSI shared memory segment
+.SH SYNOPSIS
+.LP
+\fB#include <sys/shm.h>
+.br
+.sp
+int shmget(key_t\fP \fIkey\fP\fB, size_t\fP \fIsize\fP\fB, int\fP
+\fIshmflg\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIshmget\fP() function operates on XSI shared memory (see the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Section 3.340, Shared Memory Object). It is unspecified whether this
+function
+interoperates with the realtime interprocess communication facilities
+defined in \fIRealtime\fP .
+.LP
+The \fIshmget\fP() function shall return the shared memory identifier
+associated with \fIkey\fP.
+.LP
+A shared memory identifier, associated data structure, and shared
+memory segment of at least \fIsize\fP bytes (see \fI<sys/shm.h>\fP)
+are created for \fIkey\fP if one of the following is true:
+.IP " *" 3
+The argument \fIkey\fP is equal to IPC_PRIVATE.
+.LP
+.IP " *" 3
+The argument \fIkey\fP does not already have a shared memory identifier
+associated with it and (\fIshmflg\fP &IPC_CREAT)
+is non-zero.
+.LP
+.LP
+Upon creation, the data structure associated with the new shared memory
+identifier shall be initialized as follows:
+.IP " *" 3
+The values of \fIshm_perm.cuid\fP, \fIshm_perm.uid\fP, \fIshm_perm.cgid\fP,
+and \fIshm_perm.gid\fP are set equal to the
+effective user ID and effective group ID, respectively, of the calling
+process.
+.LP
+.IP " *" 3
+The low-order nine bits of \fIshm_perm.mode\fP are set equal to the
+low-order nine bits of \fIshmflg\fP.
+.LP
+.IP " *" 3
+The value of \fIshm_segsz\fP is set equal to the value of \fIsize\fP.
+.LP
+.IP " *" 3
+The values of \fIshm_lpid\fP, \fIshm_nattch\fP, \fIshm_atime\fP, and
+\fIshm_dtime\fP are set equal to 0.
+.LP
+.IP " *" 3
+The value of \fIshm_ctime\fP is set equal to the current time.
+.LP
+.LP
+When the shared memory segment is created, it shall be initialized
+with all zero values.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIshmget\fP() shall return a non-negative
+integer, namely a shared memory identifier; otherwise,
+it shall return -1 and set \fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fIshmget\fP() function shall fail if:
+.TP 7
+.B EACCES
+A shared memory identifier exists for \fIkey\fP but operation permission
+as specified by the low-order nine bits of
+\fIshmflg\fP would not be granted; see \fIXSI Interprocess Communication\fP
+\&.
+.TP 7
+.B EEXIST
+A shared memory identifier exists for the argument \fIkey\fP but (\fIshmflg\fP
+&IPC_CREAT) &&(\fIshmflg\fP
+&IPC_EXCL) is non-zero.
+.TP 7
+.B EINVAL
+A shared memory segment is to be created and the value of size is
+less than the system-imposed minimum or greater than the
+system-imposed maximum.
+.TP 7
+.B EINVAL
+No shared memory segment is to be created and a shared memory segment
+exists for \fIkey\fP but the size of the segment
+associated with it is less than \fIsize\fP and \fIsize\fP is not 0.
+.TP 7
+.B ENOENT
+A shared memory identifier does not exist for the argument \fIkey\fP
+and (\fIshmflg\fP &IPC_CREAT) is 0.
+.TP 7
+.B ENOMEM
+A shared memory identifier and associated shared memory segment shall
+be created, but the amount of available physical memory
+is not sufficient to fill the request.
+.TP 7
+.B ENOSPC
+A shared memory identifier is to be created, but the system-imposed
+limit on the maximum number of allowed shared memory
+identifiers system-wide would be exceeded.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The POSIX Realtime Extension defines alternative interfaces for interprocess
+communication. Application developers who need to
+use IPC should design their applications so that modules using the
+IPC routines described in \fIXSI Interprocess Communication\fP can
+be easily modified to use the alternative
+interfaces.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIXSI Interprocess Communication\fP, \fIRealtime\fP, \fIshmat\fP(),
+\fIshmctl\fP(), \fIshmdt\fP(), \fIshm_open\fP(), \fIshm_unlink\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<sys/shm.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/shutdown.3p b/man-pages-posix-2003/man3p/shutdown.3p
new file mode 100644
index 0000000..06bc8e8
--- /dev/null
+++ b/man-pages-posix-2003/man3p/shutdown.3p
@@ -0,0 +1,110 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SHUTDOWN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" shutdown
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+shutdown \- shut down socket send and receive operations
+.SH SYNOPSIS
+.LP
+\fB#include <sys/socket.h>
+.br
+.sp
+int shutdown(int\fP \fIsocket\fP\fB, int\fP \fIhow\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIshutdown\fP() function shall cause all or part of a full-duplex
+connection on the socket associated with the file
+descriptor \fIsocket\fP to be shut down.
+.LP
+The \fIshutdown\fP() function takes the following arguments:
+.TP 7
+\fIsocket\fP
+Specifies the file descriptor of the socket.
+.TP 7
+\fIhow\fP
+Specifies the type of shutdown. The values are as follows:
+.TP 7
+SHUT_RD
+.RS
+Disables further receive operations.
+.RE
+.TP 7
+SHUT_WR
+.RS
+Disables further send operations.
+.RE
+.TP 7
+SHUT_RDWR
+.RS
+Disables further send and receive operations.
+.RE
+.sp
+.sp
+.LP
+The \fIshutdown\fP() function disables subsequent send and/or receive
+operations on a socket, depending on the value of the
+\fIhow\fP argument.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIshutdown\fP() shall return 0; otherwise,
+-1 shall be returned and \fIerrno\fP set to indicate
+the error.
+.SH ERRORS
+.LP
+The \fIshutdown\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fIsocket\fP argument is not a valid file descriptor.
+.TP 7
+.B EINVAL
+The \fIhow\fP argument is invalid.
+.TP 7
+.B ENOTCONN
+The socket is not connected.
+.TP 7
+.B ENOTSOCK
+The \fIsocket\fP argument does not refer to a socket.
+.sp
+.LP
+The \fIshutdown\fP() function may fail if:
+.TP 7
+.B ENOBUFS
+Insufficient resources were available in the system to perform the
+operation.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgetsockopt\fP(), \fIread\fP(), \fIrecv\fP(), \fIrecvfrom\fP(),
+\fIrecvmsg\fP(), \fIselect\fP(), \fIsend\fP(), \fIsendto\fP(),
+\fIsetsockopt\fP(), \fIsocket\fP(), \fIwrite\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<sys/socket.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sigaction.3p b/man-pages-posix-2003/man3p/sigaction.3p
new file mode 100644
index 0000000..fe2c2a0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sigaction.3p
@@ -0,0 +1,511 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SIGACTION" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sigaction
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sigaction \- examine and change a signal action
+.SH SYNOPSIS
+.LP
+\fB#include <signal.h>
+.br
+.sp
+int sigaction(int\fP \fIsig\fP\fB, const struct sigaction *restrict\fP
+\fIact\fP\fB,
+.br
+\ \ \ \ \ \ struct sigaction *restrict\fP \fIoact\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsigaction\fP() function allows the calling process to examine
+and/or specify the action to be associated with a specific
+signal. The argument \fIsig\fP specifies the signal; acceptable values
+are defined in \fI<signal.h>\fP.
+.LP
+The structure \fBsigaction\fP, used to describe an action to be taken,
+is defined in the \fI<signal.h>\fP header to include at least the
+following members:
+.TS C
+center; lw(15) l lw(30).
+T{
+.na
+\fBMember Type\fP
+.ad
+T} \fBMember Name\fP T{
+.na
+\fBDescription\fP
+.ad
+T}
+T{
+.na
+\fBvoid(*) (int)\fP
+.ad
+T} \fIsa_handler\fP T{
+.na
+Pointer to a signal-catching function or one of the macros SIG_IGN or SIG_DFL.
+.ad
+T}
+T{
+.na
+\fBsigset_t\fP
+.ad
+T} \fIsa_mask\fP T{
+.na
+Additional set of signals to be blocked during execution of signal-catching function.
+.ad
+T}
+T{
+.na
+\fBint\fP
+.ad
+T} \fIsa_flags\fP T{
+.na
+Special flags to affect behavior of signal.
+.ad
+T}
+T{
+.na
+\fBvoid(*) (int,\fP
+.ad
+T} \fI\ \fP T{
+.na
+\
+.ad
+T}
+T{
+.na
+\fB\ \ siginfo_t *, void *)\fP
+.ad
+T} \fIsa_sigaction\fP T{
+.na
+Pointer to a signal-catching function.
+.ad
+T}
+.TE
+.LP
+The storage occupied by \fIsa_handler\fP and \fIsa_sigaction\fP may
+overlap, and a conforming application shall not use both
+simultaneously.
+.LP
+If the argument \fIact\fP is not a null pointer, it points to a structure
+specifying the action to be associated with the
+specified signal. If the argument \fIoact\fP is not a null pointer,
+the action previously associated with the signal is stored in
+the location pointed to by the argument \fIoact\fP. If the argument
+\fIact\fP is a null pointer, signal handling is unchanged;
+thus, the call can be used to enquire about the current handling of
+a given signal. The SIGKILL and SIGSTOP signals shall not be
+added to the signal mask using this mechanism; this restriction shall
+be enforced by the system without causing an error to be
+indicated.
+.LP
+If the SA_SIGINFO flag (see below) is cleared in the \fIsa_flags\fP
+field of the \fBsigaction\fP structure, the
+\fIsa_handler\fP field identifies the action to be associated with
+the specified signal. If the
+SA_SIGINFO flag is set in the \fIsa_flags\fP field, and the implementation
+supports the Realtime Signals Extension option or the
+XSI Extension option, the \fIsa_sigaction\fP field specifies a signal-catching
+function. If the SA_SIGINFO bit is cleared and the \fIsa_handler\fP
+field specifies a signal-catching function,
+or if the SA_SIGINFO bit is set, the \fIsa_mask\fP field identifies
+a set of signals that shall be added to the signal mask of the
+thread before the signal-catching function is invoked. If the \fIsa_handler\fP
+field specifies a signal-catching function, the
+\fIsa_mask\fP field identifies a set of signals that shall be added
+to the process' signal mask before the signal-catching
+function is invoked.
+.LP
+The \fIsa_flags\fP field can be used to modify the behavior of the
+specified signal.
+.LP
+The following flags, defined in the \fI<signal.h>\fP header, can be
+set in
+\fIsa_flags\fP:
+.TP 7
+SA_NOCLDSTOP
+Do not generate SIGCHLD when children stop or stopped children
+continue.
+.LP
+If \fIsig\fP is SIGCHLD and the SA_NOCLDSTOP flag is not set in \fIsa_flags\fP,
+and the implementation supports the SIGCHLD
+signal, then a SIGCHLD signal shall be generated for the calling process
+whenever any of its child processes stop and a
+SIGCHLD signal may be generated for the calling process whenever any
+of its stopped child processes are continued. If \fIsig\fP is SIGCHLD
+and the SA_NOCLDSTOP flag is set in
+\fIsa_flags\fP, then the implementation shall not generate a SIGCHLD
+signal in this way.
+.TP 7
+SA_ONSTACK
+If set and an alternate signal stack has been declared with \fIsigaltstack\fP(),
+the
+signal shall be delivered to the calling process on that stack. Otherwise,
+the signal shall be delivered on the current stack.
+.TP 7
+SA_RESETHAND
+If set, the disposition of the signal shall be reset to SIG_DFL and
+the SA_SIGINFO flag shall be cleared on entry to the signal
+handler.
+.TP 7
+\fBNote:\fP
+.RS
+SIGILL and SIGTRAP cannot be automatically reset when delivered; the
+system silently enforces this restriction.
+.RE
+.sp
+Otherwise, the disposition of the signal shall not be modified on
+entry to the signal handler.
+.LP
+In addition, if this flag is set, \fIsigaction\fP() behaves as if
+the SA_NODEFER flag were also set.
+.TP 7
+SA_RESTART
+This flag affects the behavior of interruptible functions; that is,
+those specified to fail with \fIerrno\fP set to [EINTR]. If
+set, and a function specified as interruptible is interrupted by this
+signal, the function shall restart and shall not fail with
+[EINTR] unless otherwise specified. If the flag is not set, interruptible
+functions interrupted by this signal shall fail with
+\fIerrno\fP set to [EINTR].
+.TP 7
+SA_SIGINFO
+If cleared and the signal is caught, the signal-catching function
+shall be entered as:
+.sp
+.RS
+.nf
+
+\fBvoid func(int\fP \fIsigno\fP\fB);
+\fP
+.fi
+.RE
+.LP
+where \fIsigno\fP is the only argument to the signal-catching function.
+In this case, the application shall use the
+\fIsa_handler\fP member to describe the signal-catching function and
+the application shall not modify the \fIsa_sigaction\fP
+member.
+.LP
+If SA_SIGINFO is set and the signal is caught, the signal-catching
+function shall be entered as:
+.sp
+.RS
+.nf
+
+\fBvoid func(int\fP \fIsigno\fP\fB, siginfo_t *\fP\fIinfo\fP\fB, void *\fP\fIcontext\fP\fB);
+\fP
+.fi
+.RE
+.LP
+where two additional arguments are passed to the signal-catching function.
+The second argument shall point to an object of type
+\fBsiginfo_t\fP explaining the reason why the signal was generated;
+the third argument can be cast to a pointer to an object of
+type \fBucontext_t\fP to refer to the receiving process' context that
+was interrupted when the signal was delivered. In this case,
+the application shall use the \fIsa_sigaction\fP member to describe
+the signal-catching function and the application shall not
+modify the \fIsa_handler\fP member.
+.LP
+The \fIsi_signo\fP member contains the system-generated signal number.
+.LP
+The \fIsi_errno\fP member may contain implementation-defined additional
+error information; if non-zero, it contains an error
+number identifying the condition that caused the signal to be generated.
+.LP
+The \fIsi_code\fP member contains a code identifying the cause of
+the signal.
+.LP
+If the value of \fIsi_code\fP is less than or equal to 0, then the
+signal was generated by a process and \fIsi_pid\fP and
+\fIsi_uid\fP, respectively, indicate the process ID and the real user
+ID of the sender. The \fI<signal.h>\fP header description contains
+information about the signal-specific contents of the elements of
+the \fBsiginfo_t\fP type.
+.TP 7
+SA_NOCLDWAIT
+If set, and \fIsig\fP equals SIGCHLD, child processes of the calling
+processes shall not be transformed into zombie processes when
+they terminate. If the calling process subsequently waits for its
+children, and the process has no unwaited-for children that were
+transformed into zombie processes, it shall block until all of its
+children terminate, and \fIwait\fP(), \fIwaitid\fP(), and \fIwaitpid\fP()
+shall fail and set \fIerrno\fP to [ECHILD]. Otherwise, terminating
+child
+processes shall be transformed into zombie processes, unless SIGCHLD
+is set to SIG_IGN.
+.TP 7
+SA_NODEFER
+If set and \fIsig\fP is caught, \fIsig\fP shall not be added to the
+process' signal mask on entry to the signal handler unless it
+is included in \fIsa_mask\fP. Otherwise, \fIsig\fP shall always be
+added to the process' signal mask on entry to the signal
+handler.
+.sp
+.LP
+When a signal is caught by a signal-catching function installed by
+\fIsigaction\fP(), a new signal mask is calculated and
+installed for the duration of the signal-catching function (or until
+a call to either \fIsigprocmask\fP() or \fIsigsuspend\fP() is
+made). This mask is formed by taking the union of the current signal
+mask and the value of the \fIsa_mask\fP for the signal being
+delivered unless SA_NODEFER or SA_RESETHAND is set, and
+then including the signal being delivered. If and when the user's
+signal handler returns normally, the original signal mask is
+restored.
+.LP
+Once an action is installed for a specific signal, it shall remain
+installed until another action is explicitly requested (by
+another call to \fIsigaction\fP()), until the SA_RESETHAND flag
+causes resetting of the handler, or until one of the \fIexec\fP
+functions is called.
+.LP
+If the previous action for \fIsig\fP had been established by \fIsignal\fP(),
+the values
+of the fields returned in the structure pointed to by \fIoact\fP are
+unspecified, and in particular \fIoact\fP->
+\fIsa_handler\fP is not necessarily the same value passed to \fIsignal\fP().
+However, if a
+pointer to the same structure or a copy thereof is passed to a subsequent
+call to \fIsigaction\fP() via the \fIact\fP argument,
+handling of the signal shall be as if the original call to \fIsignal\fP()
+were
+repeated.
+.LP
+If \fIsigaction\fP() fails, no new signal handler is installed.
+.LP
+It is unspecified whether an attempt to set the action for a signal
+that cannot be caught or ignored to SIG_DFL is ignored or
+causes an error to be returned with \fIerrno\fP set to [EINVAL].
+.LP
+If SA_SIGINFO is not set in \fIsa_flags\fP, then the disposition of
+subsequent occurrences of \fIsig\fP when it is already
+pending is implementation-defined; the signal-catching function shall
+be invoked with a single argument. If the
+implementation supports the Realtime Signals Extension option, and
+if SA_SIGINFO is set in \fIsa_flags\fP, then subsequent
+occurrences of \fIsig\fP generated by \fIsigqueue\fP() or as a result
+of any
+signal-generating function that supports the specification of an application-defined
+value (when \fIsig\fP is already pending)
+shall be queued in FIFO order until delivered or accepted; the signal-catching
+function shall be invoked with three arguments. The
+application specified value is passed to the signal-catching function
+as the \fIsi_value\fP member of the \fBsiginfo_t\fP
+structure.
+.LP
+The result of the use of \fIsigaction\fP() and a \fIsigwait\fP() function
+concurrently
+within a process on the same signal is unspecified.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIsigaction\fP() shall return 0; otherwise,
+-1 shall be returned, \fIerrno\fP shall be set to
+indicate the error, and no new signal-catching function shall be installed.
+.SH ERRORS
+.LP
+The \fIsigaction\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The \fIsig\fP argument is not a valid signal number or an attempt
+is made to catch a signal that cannot be caught or ignore a
+signal that cannot be ignored.
+.TP 7
+.B ENOTSUP
+The SA_SIGINFO bit flag is set in the \fIsa_flags\fP field of the
+\fBsigaction\fP structure, and the implementation does not
+support either the Realtime Signals Extension option, or the XSI Extension
+option.
+.sp
+.LP
+The \fIsigaction\fP() function may fail if:
+.TP 7
+.B EINVAL
+An attempt was made to set the action to SIG_DFL for a signal that
+cannot be caught or ignored (or both).
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIsigaction\fP() function supersedes the \fIsignal\fP() function,
+and should be
+used in preference. In particular, \fIsigaction\fP() and \fIsignal\fP()
+should not be used
+in the same process to control the same signal. The behavior of reentrant
+functions, as defined in the DESCRIPTION, is as specified
+by this volume of IEEE\ Std\ 1003.1-2001, regardless of invocation
+from a signal-catching function. This is the only
+intended meaning of the statement that reentrant functions may be
+used in signal-catching functions without restrictions.
+Applications must still consider all effects of such functions on
+such things as data structures, files, and process state. In
+particular, application writers need to consider the restrictions
+on interactions when interrupting \fIsleep\fP() and interactions among
+multiple handles for a file description. The fact that any
+specific function is listed as reentrant does not necessarily mean
+that invocation of that function from a signal-catching function
+is recommended.
+.LP
+In order to prevent errors arising from interrupting non-reentrant
+function calls, applications should protect calls to these
+functions either by blocking the appropriate signals or through the
+use of some programmatic semaphore (see \fIsemget\fP(), \fIsem_init\fP(),
+\fIsem_open\fP(),
+and so on). Note in particular that even the "safe" functions may
+modify \fIerrno\fP; the signal-catching function, if not
+executing as an independent thread, may want to save and restore its
+value. Naturally, the same principles apply to the reentrancy
+of application routines and asynchronous data access. Note that \fIlongjmp\fP()
+and \fIsiglongjmp\fP() are not in the list of reentrant functions.
+This is because the code
+executing after \fIlongjmp\fP() and \fIsiglongjmp\fP() can call any
+unsafe functions with the same danger as calling those unsafe
+functions directly from the signal handler. Applications that use
+\fIlongjmp\fP() and \fIsiglongjmp\fP() from within signal handlers
+require rigorous protection in order to be
+portable. Many of the other functions that are excluded from the list
+are traditionally implemented using either \fImalloc\fP() or \fIfree\fP()
+functions or the standard I/O
+library, both of which traditionally use data structures in a non-reentrant
+manner. Since any combination of different functions
+using a common data structure can cause reentrancy problems, this
+volume of IEEE\ Std\ 1003.1-2001 does not define the
+behavior when any unsafe function is called in a signal handler that
+interrupts an unsafe function.
+.LP
+If the signal occurs other than as the result of calling \fIabort\fP(),
+\fIkill\fP(), or \fIraise\fP(), the behavior is undefined if
+the signal handler calls any function in the standard library other
+than one of the functions listed in the table above or refers
+to any object with static storage duration other than by assigning
+a value to a static storage duration variable of type
+\fBvolatile sig_atomic_t\fP. Furthermore, if such a call fails, the
+value of \fIerrno\fP is unspecified.
+.LP
+Usually, the signal is executed on the stack that was in effect before
+the signal was delivered. An alternate stack may be
+specified to receive a subset of the signals being caught.
+.LP
+When the signal handler returns, the receiving process resumes execution
+at the point it was interrupted unless the signal
+handler makes other arrangements. If \fIlongjmp\fP() or \fI_longjmp\fP()
+is used to leave the signal handler, then the signal mask must be
+explicitly
+restored by the process.
+.LP
+This volume of IEEE\ Std\ 1003.1-2001 defines the third argument of
+a signal handling function when SA_SIGINFO is set as
+a \fBvoid *\fP instead of a \fBucontext_t *\fP, but without requiring
+type checking. New applications should explicitly cast the
+third argument of the signal handling function to \fBucontext_t *\fP.
+.LP
+The BSD optional four argument signal handling function is not supported
+by this volume of IEEE\ Std\ 1003.1-2001. The
+BSD declaration would be:
+.sp
+.RS
+.nf
+
+\fBvoid handler(int\fP \fIsig\fP\fB, int\fP \fIcode\fP\fB, struct sigcontext *\fP\fIscp\fP\fB,
+ char *\fP\fIaddr\fP\fB);
+\fP
+.fi
+.RE
+.LP
+where \fIsig\fP is the signal number, \fIcode\fP is additional information
+on certain signals, \fIscp\fP is a pointer to the
+\fBsigcontext\fP structure, and \fIaddr\fP is additional address information.
+Much the same information is available in the
+objects pointed to by the second argument of the signal handler specified
+when SA_SIGINFO is set.
+.SH RATIONALE
+.LP
+Although this volume of IEEE\ Std\ 1003.1-2001 requires that signals
+that cannot be ignored shall not be added to the
+signal mask when a signal-catching function is entered, there is no
+explicit requirement that subsequent calls to
+\fIsigaction\fP() reflect this in the information returned in the
+\fIoact\fP argument. In other words, if SIGKILL is included in
+the \fIsa_mask\fP field of \fIact\fP, it is unspecified whether or
+not a subsequent call to \fIsigaction\fP() returns with
+SIGKILL included in the \fIsa_mask\fP field of \fIoact\fP.
+.LP
+The SA_NOCLDSTOP flag, when supplied in the \fIact\fP-> \fIsa_flags\fP
+parameter, allows overloading SIGCHLD with the
+System V semantics that each SIGCLD signal indicates a single terminated
+child. Most conforming applications that catch SIGCHLD are
+expected to install signal-catching functions that repeatedly call
+the \fIwaitpid\fP()
+function with the WNOHANG flag set, acting on each child for which
+status is returned, until \fIwaitpid\fP() returns zero. If stopped
+children are not of interest, the use of the SA_NOCLDSTOP
+flag can prevent the overhead from invoking the signal-catching routine
+when they stop.
+.LP
+Some historical implementations also define other mechanisms for stopping
+processes, such as the \fIptrace\fP() function. These
+implementations usually do not generate a SIGCHLD signal when processes
+stop due to this mechanism; however, that is beyond the
+scope of this volume of IEEE\ Std\ 1003.1-2001.
+.LP
+This volume of IEEE\ Std\ 1003.1-2001 requires that calls to \fIsigaction\fP()
+that supply a NULL \fIact\fP argument
+succeed, even in the case of signals that cannot be caught or ignored
+(that is, SIGKILL or SIGSTOP). The System V \fIsignal\fP() and BSD
+\fIsigvec\fP() functions return [EINVAL] in these cases and, in this
+respect, their behavior varies from \fIsigaction\fP().
+.LP
+This volume of IEEE\ Std\ 1003.1-2001 requires that \fIsigaction\fP()
+properly save and restore a signal action set up
+by the ISO\ C standard \fIsignal\fP() function. However, there is
+no guarantee that the
+reverse is true, nor could there be given the greater amount of information
+conveyed by the \fBsigaction\fP structure. Because of
+this, applications should avoid using both functions for the same
+signal in the same process. Since this cannot always be avoided
+in case of general-purpose library routines, they should always be
+implemented with \fIsigaction\fP().
+.LP
+It was intended that the \fIsignal\fP() function should be implementable
+as a library
+routine using \fIsigaction\fP().
+.LP
+The POSIX Realtime Extension extends the \fIsigaction\fP() function
+as specified by the POSIX.1-1990 standard to allow the
+application to request on a per-signal basis via an additional signal
+action flag that the extra parameters, including the
+application-defined signal value, if any, be passed to the signal-catching
+function.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fISignal Concepts\fP, \fIbsd_signal\fP(), \fIkill\fP(), \fI_longjmp\fP(),
+\fIlongjmp\fP(), \fIraise\fP(), \fIsemget\fP(), \fIsem_init\fP()
+,
+\fIsem_open\fP(), \fIsigaddset\fP(), \fIsigaltstack\fP(), \fIsigdelset\fP(),
+\fIsigemptyset\fP(), \fIsigfillset\fP(), \fIsigismember\fP(),
+\fIsignal\fP(), \fIsigprocmask\fP(), \fIsigsuspend\fP(), \fIwait\fP(),
+\fIwaitid\fP(), \fIwaitpid\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<signal.h>\fP, \fI<ucontext.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sigaddset.3p b/man-pages-posix-2003/man3p/sigaddset.3p
new file mode 100644
index 0000000..d0bb1ae
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sigaddset.3p
@@ -0,0 +1,77 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SIGADDSET" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sigaddset
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sigaddset \- add a signal to a signal set
+.SH SYNOPSIS
+.LP
+\fB#include <signal.h>
+.br
+.sp
+int sigaddset(sigset_t *\fP\fIset\fP\fB, int\fP \fIsigno\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsigaddset\fP() function adds the individual signal specified
+by the \fIsigno\fP to the signal set pointed to by
+\fIset\fP.
+.LP
+Applications shall call either \fIsigemptyset\fP() or \fIsigfillset\fP()
+at least once for each object of type \fBsigset_t\fP prior to any
+other use
+of that object. If such an object is not initialized in this way,
+but is nonetheless supplied as an argument to any of \fIpthread_sigmask\fP(),
+\fIsigaction\fP(),
+\fIsigaddset\fP(), \fIsigdelset\fP(), \fIsigismember\fP(), \fIsigpending\fP(),
+\fIsigprocmask\fP(), \fIsigsuspend\fP(), \fIsigtimedwait\fP(), \fIsigwait\fP(),
+or \fIsigwaitinfo\fP(), the results are undefined.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIsigaddset\fP() shall return 0; otherwise,
+it shall return -1 and set \fIerrno\fP to indicate
+the error.
+.SH ERRORS
+.LP
+The \fIsigaddset\fP() function may fail if:
+.TP 7
+.B EINVAL
+The value of the \fIsigno\fP argument is an invalid or unsupported
+signal number.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fISignal Concepts\fP, \fIsigaction\fP(), \fIsigdelset\fP(), \fIsigemptyset\fP(),
+\fIsigfillset\fP(), \fIsigismember\fP(), \fIsigpending\fP(),
+\fIsigprocmask\fP(), \fIsigsuspend\fP(), the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, \fI<signal.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sigaltstack.3p b/man-pages-posix-2003/man3p/sigaltstack.3p
new file mode 100644
index 0000000..3931977
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sigaltstack.3p
@@ -0,0 +1,149 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SIGALTSTACK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sigaltstack
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sigaltstack \- set and get signal alternate stack context
+.SH SYNOPSIS
+.LP
+\fB#include <signal.h>
+.br
+.sp
+int sigaltstack(const stack_t *restrict\fP \fIss\fP\fB, stack_t *restrict\fP
+\fIoss\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsigaltstack\fP() function allows a process to define and examine
+the state of an alternate stack for signal handlers for
+the current thread. Signals that have been explicitly declared to
+execute on the alternate stack shall be delivered on the
+alternate stack.
+.LP
+If \fIss\fP is not a null pointer, it points to a \fBstack_t\fP structure
+that specifies the alternate signal stack that shall
+take effect upon return from \fIsigaltstack\fP(). The \fIss_flags\fP
+member specifies the new stack state. If it is set to
+SS_DISABLE, the stack is disabled and \fIss_sp\fP and \fIss_size\fP
+are ignored. Otherwise, the stack shall be enabled, and the
+\fIss_sp\fP and \fIss_size\fP members specify the new address and
+size of the stack.
+.LP
+The range of addresses starting at \fIss_sp\fP up to but not including
+\fIss_sp\fP+ \fIss_size\fP is available to the
+implementation for use as the stack. This function makes no assumptions
+regarding which end is the stack base and in which
+direction the stack grows as items are pushed.
+.LP
+If \fIoss\fP is not a null pointer, on successful completion it shall
+point to a \fBstack_t\fP structure that specifies the
+alternate signal stack that was in effect prior to the call to \fIsigaltstack\fP().
+The \fIss_sp\fP and \fIss_size\fP members
+specify the address and size of that stack. The \fIss_flags\fP member
+specifies the stack's state, and may contain one of the
+following values:
+.TP 7
+SS_ONSTACK
+The process is currently executing on the alternate signal stack.
+Attempts to modify the alternate signal stack while the
+process is executing on it fail. This flag shall not be modified by
+processes.
+.TP 7
+SS_DISABLE
+The alternate signal stack is currently disabled.
+.sp
+.LP
+The value SIGSTKSZ is a system default specifying the number of bytes
+that would be used to cover the usual case when manually
+allocating an alternate stack area. The value MINSIGSTKSZ is defined
+to be the minimum stack size for a signal handler. In
+computing an alternate stack size, a program should add that amount
+to its stack requirements to allow for the system
+implementation overhead. The constants SS_ONSTACK, SS_DISABLE, SIGSTKSZ,
+and MINSIGSTKSZ are defined in \fI<signal.h>\fP.
+.LP
+After a successful call to one of the \fIexec\fP functions, there
+are no alternate signal
+stacks in the new process image.
+.LP
+In some implementations, a signal (whether or not indicated to execute
+on the alternate stack) shall always execute on the
+alternate stack if it is delivered while another signal is being caught
+using the alternate stack.
+.LP
+Use of this function by library threads that are not bound to kernel-scheduled
+entities results in undefined behavior.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIsigaltstack\fP() shall return 0; otherwise,
+it shall return -1 and set \fIerrno\fP to indicate
+the error.
+.SH ERRORS
+.LP
+The \fIsigaltstack\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The \fIss\fP argument is not a null pointer, and the \fIss_flags\fP
+member pointed to by \fIss\fP contains flags other than
+SS_DISABLE.
+.TP 7
+.B ENOMEM
+The size of the alternate stack area is less than MINSIGSTKSZ.
+.TP 7
+.B EPERM
+An attempt was made to modify an active stack.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Allocating Memory for an Alternate Stack
+.LP
+The following example illustrates a method for allocating memory for
+an alternate stack.
+.sp
+.RS
+.nf
+
+\fB#include <signal.h>
+\&...
+if ((sigstk.ss_sp = malloc(SIGSTKSZ)) == NULL)
+ /* Error return. */
+sigstk.ss_size = SIGSTKSZ;
+sigstk.ss_flags = 0;
+if (sigaltstack(&sigstk,(stack_t *)0) < 0)
+ perror("sigaltstack");
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+On some implementations, stack space is automatically extended as
+needed. On those implementations, automatic extension is
+typically not available for an alternate stack. If the stack overflows,
+the behavior is undefined.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fISignal Concepts\fP, \fIsigaction\fP(), \fIsigsetjmp\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<signal.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sigdelset.3p b/man-pages-posix-2003/man3p/sigdelset.3p
new file mode 100644
index 0000000..ead667b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sigdelset.3p
@@ -0,0 +1,76 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SIGDELSET" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sigdelset
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sigdelset \- delete a signal from a signal set
+.SH SYNOPSIS
+.LP
+\fB#include <signal.h>
+.br
+.sp
+int sigdelset(sigset_t *\fP\fIset\fP\fB, int\fP \fIsigno\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsigdelset\fP() function deletes the individual signal specified
+by \fIsigno\fP from the signal set pointed to by
+\fIset\fP.
+.LP
+Applications should call either \fIsigemptyset\fP() or \fIsigfillset\fP()
+at least once for each object of type \fBsigset_t\fP prior to any
+other use
+of that object. If such an object is not initialized in this way,
+but is nonetheless supplied as an argument to any of \fIpthread_sigmask\fP(),
+\fIsigaction\fP(), \fIsigaddset\fP(), \fIsigdelset\fP(), \fIsigismember\fP(),
+\fIsigpending\fP(), \fIsigprocmask\fP(), \fIsigsuspend\fP(), \fIsigtimedwait\fP(),
+\fIsigwait\fP(), or \fIsigwaitinfo\fP(), the results are undefined.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIsigdelset\fP() shall return 0; otherwise,
+it shall return -1 and set \fIerrno\fP to indicate
+the error.
+.SH ERRORS
+.LP
+The \fIsigdelset\fP() function may fail if:
+.TP 7
+.B EINVAL
+The \fIsigno\fP argument is not a valid signal number, or is an unsupported
+signal number.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fISignal Concepts\fP, \fIsigaction\fP(), \fIsigaddset\fP(), \fIsigemptyset\fP(),
+\fIsigfillset\fP(), \fIsigismember\fP(), \fIsigpending\fP(),
+\fIsigprocmask\fP(), \fIsigsuspend\fP(), the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, \fI<signal.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sigemptyset.3p b/man-pages-posix-2003/man3p/sigemptyset.3p
new file mode 100644
index 0000000..1c59dfa
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sigemptyset.3p
@@ -0,0 +1,98 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SIGEMPTYSET" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sigemptyset
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sigemptyset \- initialize and empty a signal set
+.SH SYNOPSIS
+.LP
+\fB#include <signal.h>
+.br
+.sp
+int sigemptyset(sigset_t *\fP\fIset\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsigemptyset\fP() function initializes the signal set pointed
+to by \fIset\fP, such that all signals defined in
+IEEE\ Std\ 1003.1-2001 are excluded.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIsigemptyset\fP() shall return 0; otherwise,
+it shall return -1 and set \fIerrno\fP to indicate
+the error.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The implementation of the \fIsigemptyset\fP() (or \fIsigfillset\fP())
+function
+could quite trivially clear (or set) all the bits in the signal set.
+Alternatively, it would be reasonable to initialize part of
+the structure, such as a version field, to permit binary-compatibility
+between releases where the size of the set varies. For such
+reasons, either \fIsigemptyset\fP() or \fIsigfillset\fP() must be
+called prior to any
+other use of the signal set, even if such use is read-only (for example,
+as an argument to \fIsigpending\fP()). This function is not intended
+for dynamic allocation.
+.LP
+The \fIsigfillset\fP() and \fIsigemptyset\fP() functions require that
+the resulting
+signal set include (or exclude) all the signals defined in this volume
+of IEEE\ Std\ 1003.1-2001. Although it is outside
+the scope of this volume of IEEE\ Std\ 1003.1-2001 to place this requirement
+on signals that are implemented as extensions,
+it is recommended that implementation-defined signals also be affected
+by these functions. However, there may be a good reason for
+a particular signal not to be affected. For example, blocking or ignoring
+an implementation-defined signal may have undesirable
+side effects, whereas the default action for that signal is harmless.
+In such a case, it would be preferable for such a signal to
+be excluded from the signal set returned by \fIsigfillset\fP().
+.LP
+In early proposals there was no distinction between invalid and unsupported
+signals (the names of optional signals that were not
+supported by an implementation were not defined by that implementation).
+The [EINVAL] error was thus specified as a required error
+for invalid signals. With that distinction, it is not necessary to
+require implementations of these functions to determine whether
+an optional signal is actually supported, as that could have a significant
+performance impact for little value. The error could
+have been required for invalid signals and optional for unsupported
+signals, but this seemed unnecessarily complex. Thus, the error
+is optional in both cases.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fISignal Concepts\fP, \fIsigaction\fP(), \fIsigaddset\fP(), \fIsigdelset\fP(),
+\fIsigfillset\fP(), \fIsigismember\fP(), \fIsigpending\fP(),
+\fIsigprocmask\fP(), \fIsigsuspend\fP(), the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, \fI<signal.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sigfillset.3p b/man-pages-posix-2003/man3p/sigfillset.3p
new file mode 100644
index 0000000..f68f37e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sigfillset.3p
@@ -0,0 +1,62 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SIGFILLSET" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sigfillset
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sigfillset \- initialize and fill a signal set
+.SH SYNOPSIS
+.LP
+\fB#include <signal.h>
+.br
+.sp
+int sigfillset(sigset_t *\fP\fIset\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsigfillset\fP() function shall initialize the signal set pointed
+to by \fIset\fP, such that all signals defined in this
+volume of IEEE\ Std\ 1003.1-2001 are included.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIsigfillset\fP() shall return 0; otherwise,
+it shall return -1 and set \fIerrno\fP to indicate
+the error.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+Refer to \fIsigemptyset\fP().
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fISignal Concepts\fP, \fIsigaction\fP(), \fIsigaddset\fP(), \fIsigdelset\fP(),
+\fIsigemptyset\fP(), \fIsigismember\fP(), \fIsigpending\fP(),
+\fIsigprocmask\fP(), \fIsigsuspend\fP(), the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, \fI<signal.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sighold.3p b/man-pages-posix-2003/man3p/sighold.3p
new file mode 100644
index 0000000..de0bfc3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sighold.3p
@@ -0,0 +1 @@
+.so man3p/sigset.3p
diff --git a/man-pages-posix-2003/man3p/sigignore.3p b/man-pages-posix-2003/man3p/sigignore.3p
new file mode 100644
index 0000000..de0bfc3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sigignore.3p
@@ -0,0 +1 @@
+.so man3p/sigset.3p
diff --git a/man-pages-posix-2003/man3p/siginterrupt.3p b/man-pages-posix-2003/man3p/siginterrupt.3p
new file mode 100644
index 0000000..9cbeb57
--- /dev/null
+++ b/man-pages-posix-2003/man3p/siginterrupt.3p
@@ -0,0 +1,89 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SIGINTERRUPT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" siginterrupt
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+siginterrupt \- allow signals to interrupt functions
+.SH SYNOPSIS
+.LP
+\fB#include <signal.h>
+.br
+.sp
+int siginterrupt(int\fP \fIsig\fP\fB, int\fP \fIflag\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsiginterrupt\fP() function shall change the restart behavior
+when a function is interrupted by the specified signal. The
+function \fIsiginterrupt\fP(\fIsig\fP, \fIflag\fP) has an effect as
+if implemented as:
+.sp
+.RS
+.nf
+
+\fBint siginterrupt(int sig, int flag) {
+ int ret;
+ struct sigaction act;
+.sp
+
+ (void) sigaction(sig, NULL, &act);
+ if (flag)
+ act.sa_flags &= ~SA_RESTART;
+ else
+ act.sa_flags |= SA_RESTART;
+ ret = sigaction(sig, &act, NULL);
+ return ret;
+}
+\fP
+.fi
+.RE
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIsiginterrupt\fP() shall return 0; otherwise,
+-1 shall be returned and \fIerrno\fP set to
+indicate the error.
+.SH ERRORS
+.LP
+The \fIsiginterrupt\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The \fIsig\fP argument is not a valid signal number.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIsiginterrupt\fP() function supports programs written to historical
+system interfaces. A conforming application, when
+being written or rewritten, should use \fIsigaction\fP() with the
+SA_RESTART flag
+instead of \fIsiginterrupt\fP().
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fISignal Concepts\fP, \fIsigaction\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<signal.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sigismember.3p b/man-pages-posix-2003/man3p/sigismember.3p
new file mode 100644
index 0000000..954e05e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sigismember.3p
@@ -0,0 +1,79 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SIGISMEMBER" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sigismember
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sigismember \- test for a signal in a signal set
+.SH SYNOPSIS
+.LP
+\fB#include <signal.h>
+.br
+.sp
+int sigismember(const sigset_t *\fP\fIset\fP\fB, int\fP \fIsigno\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsigismember\fP() function shall test whether the signal specified
+by \fIsigno\fP is a member of the set pointed to by
+\fIset\fP.
+.LP
+Applications should call either \fIsigemptyset\fP() or \fIsigfillset\fP()
+at least once for each object of type \fBsigset_t\fP prior to any
+other use
+of that object. If such an object is not initialized in this way,
+but is nonetheless supplied as an argument to any of \fIpthread_sigmask\fP(),
+\fIsigaction\fP(), \fIsigaddset\fP(), \fIsigdelset\fP(),
+\fIsigismember\fP(), \fIsigpending\fP(), \fIsigprocmask\fP(), \fIsigsuspend\fP(),
+\fIsigtimedwait\fP(), \fIsigwait\fP(), or \fIsigwaitinfo\fP(), the
+results are undefined.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIsigismember\fP() shall return 1 if
+the specified signal is a member of the specified set, or 0
+if it is not. Otherwise, it shall return -1 and set \fIerrno\fP to
+indicate the error.
+.SH ERRORS
+.LP
+The \fIsigismember\fP() function may fail if:
+.TP 7
+.B EINVAL
+The \fIsigno\fP argument is not a valid signal number, or is an unsupported
+signal number.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fISignal Concepts\fP, \fIsigaction\fP(), \fIsigaddset\fP(), \fIsigdelset\fP(),
+\fIsigfillset\fP(), \fIsigemptyset\fP(), \fIsigpending\fP(),
+\fIsigprocmask\fP(), \fIsigsuspend\fP(), the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, \fI<signal.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/siglongjmp.3p b/man-pages-posix-2003/man3p/siglongjmp.3p
new file mode 100644
index 0000000..a43b0b3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/siglongjmp.3p
@@ -0,0 +1,75 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SIGLONGJMP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" siglongjmp
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+siglongjmp \- non-local goto with signal handling
+.SH SYNOPSIS
+.LP
+\fB#include <setjmp.h>
+.br
+.sp
+void siglongjmp(sigjmp_buf\fP \fIenv\fP\fB, int\fP \fIval\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsiglongjmp\fP() function shall be equivalent to the \fIlongjmp\fP()
+function,
+except as follows:
+.IP " *" 3
+References to \fIsetjmp\fP() shall be equivalent to \fIsigsetjmp\fP().
+.LP
+.IP " *" 3
+The \fIsiglongjmp\fP() function shall restore the saved signal mask
+if and only if the \fIenv\fP argument was initialized by a
+call to \fIsigsetjmp\fP() with a non-zero \fIsavemask\fP argument.
+.LP
+.SH RETURN VALUE
+.LP
+After \fIsiglongjmp\fP() is completed, program execution shall continue
+as if the corresponding invocation of \fIsigsetjmp\fP() had just returned
+the value specified by \fIval\fP. The \fIsiglongjmp\fP()
+function shall not cause \fIsigsetjmp\fP() to return 0; if \fIval\fP
+is 0, \fIsigsetjmp\fP() shall return the value 1.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The distinction between \fIsetjmp\fP() or \fIlongjmp\fP() and \fIsigsetjmp\fP()
+or
+\fIsiglongjmp\fP() is only significant for programs which use \fIsigaction\fP(),
+\fIsigprocmask\fP(), or \fIsigsuspend\fP().
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIlongjmp\fP(), \fIsetjmp\fP(), \fIsigprocmask\fP(), \fIsigsetjmp\fP(),
+\fIsigsuspend\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<setjmp.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/signal.3p b/man-pages-posix-2003/man3p/signal.3p
new file mode 100644
index 0000000..30affc1
--- /dev/null
+++ b/man-pages-posix-2003/man3p/signal.3p
@@ -0,0 +1,156 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SIGNAL" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" signal
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+signal \- signal management
+.SH SYNOPSIS
+.LP
+\fB#include <signal.h>
+.br
+.sp
+void (*signal(int\fP \fIsig\fP\fB, void (*\fP\fIfunc\fP\fB)(int)))(int);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+Use
+of this function is unspecified in a multi-threaded process.
+.LP
+The \fIsignal\fP() function chooses one of three ways in which receipt
+of the signal number \fIsig\fP is to be subsequently
+handled. If the value of \fIfunc\fP is SIG_DFL, default handling for
+that signal shall occur. If the value of \fIfunc\fP is
+SIG_IGN, the signal shall be ignored. Otherwise, the application shall
+ensure that \fIfunc\fP points to a function to be called
+when that signal occurs. An invocation of such a function because
+of a signal, or (recursively) of any further functions called by
+that invocation (other than functions in the standard library), is
+called a "signal handler".
+.LP
+When a signal occurs, and \fIfunc\fP points to a function, it is implementation-defined
+whether the equivalent of a:
+.sp
+.RS
+.nf
+
+\fBsignal(\fP\fIsig\fP\fB, SIG_DFL);
+\fP
+.fi
+.RE
+.LP
+is executed or the implementation prevents some implementation-defined
+set of signals (at least including \fIsig\fP) from
+occurring until the current signal handling has completed. (If the
+value of \fIsig\fP is SIGILL, the implementation may
+alternatively define that no action is taken.) Next the equivalent
+of:
+.sp
+.RS
+.nf
+
+\fB(*func)(sig);
+\fP
+.fi
+.RE
+.LP
+is executed. If and when the function returns, if the value of \fIsig\fP
+was SIGFPE, SIGILL, or SIGSEGV or any other
+implementation-defined value corresponding to a computational exception,
+the behavior is undefined. Otherwise, the program shall
+resume execution at the point it was interrupted. If the signal occurs
+as the result of calling the \fIabort\fP(), \fIraise\fP(), \fIkill\fP(),
+\fIpthread_kill\fP(), or \fIsigqueue\fP() function, the
+signal handler shall not call the \fIraise\fP() function.
+.LP
+If the signal occurs other than as the result of calling \fIabort\fP(),
+\fIraise\fP(), \fIkill\fP(), \fIpthread_kill\fP(), or \fIsigqueue\fP(),
+\ the behavior is undefined if the signal handler refers to any
+object with static storage duration other than by assigning a value
+to an object declared as volatile \fBsig_atomic_t\fP, or if
+the signal handler calls any function in the standard library other
+than one of the functions listed in \fISignal Concepts\fP . Furthermore,
+if such a call fails, the value of \fIerrno\fP is
+unspecified.
+.LP
+At program start-up, the equivalent of:
+.sp
+.RS
+.nf
+
+\fBsignal(\fP\fIsig\fP\fB, SIG_IGN);
+\fP
+.fi
+.RE
+.LP
+is executed for some signals, and the equivalent of:
+.sp
+.RS
+.nf
+
+\fBsignal(\fP\fIsig\fP\fB, SIG_DFL);
+\fP
+.fi
+.RE
+.LP
+is executed for all other signals (see \fIexec\fP).
+.SH RETURN VALUE
+.LP
+If the request can be honored, \fIsignal\fP() shall return the value
+of \fIfunc\fP for the most recent call to \fIsignal\fP()
+for the specified signal \fIsig\fP. Otherwise, SIG_ERR shall be returned
+and a positive value shall be stored in \fIerrno\fP.
+.SH ERRORS
+.LP
+The \fIsignal\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The \fIsig\fP argument is not a valid signal number or an attempt
+is made to catch a signal that cannot be caught or ignore a
+signal that cannot be ignored.
+.sp
+.LP
+The \fIsignal\fP() function may fail if:
+.TP 7
+.B EINVAL
+An
+attempt was made to set the action to SIG_DFL for a signal that cannot
+be caught or ignored (or both).
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIsigaction\fP() function provides a more comprehensive and reliable
+mechanism
+for controlling signals; new applications should use \fIsigaction\fP()
+rather than
+\fIsignal\fP().
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fISignal Concepts\fP, \fIexec\fP(), \fIpause\fP(), \fIsigaction\fP(),
+\fIsigsuspend\fP(), \fIwaitid\fP(), the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, \fI<signal.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/signbit.3p b/man-pages-posix-2003/man3p/signbit.3p
new file mode 100644
index 0000000..37fb3b9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/signbit.3p
@@ -0,0 +1,59 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SIGNBIT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" signbit
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+signbit \- test sign
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+int signbit(real-floating\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsignbit\fP() macro shall determine whether the sign of its
+argument value is negative. NaNs, zeros, and infinities have
+a sign bit.
+.SH RETURN VALUE
+.LP
+The \fIsignbit\fP() macro shall return a non-zero value if and only
+if the sign of its argument value is negative.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfpclassify\fP(), \fIisfinite\fP(), \fIisinf\fP(), \fIisnan\fP(),
+\fIisnormal\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/signgam.3p b/man-pages-posix-2003/man3p/signgam.3p
new file mode 100644
index 0000000..b17905e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/signgam.3p
@@ -0,0 +1 @@
+.so man3p/lgamma.3p
diff --git a/man-pages-posix-2003/man3p/sigpause.3p b/man-pages-posix-2003/man3p/sigpause.3p
new file mode 100644
index 0000000..de0bfc3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sigpause.3p
@@ -0,0 +1 @@
+.so man3p/sigset.3p
diff --git a/man-pages-posix-2003/man3p/sigpending.3p b/man-pages-posix-2003/man3p/sigpending.3p
new file mode 100644
index 0000000..fd083d6
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sigpending.3p
@@ -0,0 +1,63 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SIGPENDING" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sigpending
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sigpending \- examine pending signals
+.SH SYNOPSIS
+.LP
+\fB#include <signal.h>
+.br
+.sp
+int sigpending(sigset_t *\fP\fIset\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsigpending\fP() function shall store, in the location referenced
+by the \fIset\fP argument, the set of signals that are
+blocked from delivery to the calling thread and that are pending on
+the process or the calling thread.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIsigpending\fP() shall return 0; otherwise,
+-1 shall be returned and \fIerrno\fP set to indicate
+the error.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsigaddset\fP(), \fIsigdelset\fP(), \fIsigemptyset\fP(), \fIsigfillset\fP(),
+\fIsigismember\fP(), \fIsigprocmask\fP(), the Base Definitions
+volume of
+IEEE\ Std\ 1003.1-2001, \fI<signal.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sigprocmask.3p b/man-pages-posix-2003/man3p/sigprocmask.3p
new file mode 100644
index 0000000..67ee549
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sigprocmask.3p
@@ -0,0 +1,149 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "PTHREAD_SIGMASK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" pthread_sigmask
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pthread_sigmask, sigprocmask \- examine and change blocked signals
+.SH SYNOPSIS
+.LP
+\fB#include <signal.h>
+.br
+.sp
+\fP
+.LP
+\fBint pthread_sigmask(int\fP \fIhow\fP\fB, const sigset_t *restrict\fP
+\fIset\fP\fB,
+.br
+\ \ \ \ \ \ sigset_t *restrict\fP \fIoset\fP\fB);
+.br
+\fP
+.LP
+\fBint sigprocmask(int\fP \fIhow\fP\fB, const sigset_t *restrict\fP
+\fIset\fP\fB,
+.br
+\ \ \ \ \ \ sigset_t *restrict\fP \fIoset\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIpthread_sigmask\fP() function shall examine or change (or both)
+the calling thread's signal mask, regardless of the number
+of threads in the process. The function shall be equivalent to \fIsigprocmask\fP(),
+without the restriction that the call be made
+in a single-threaded process.
+.LP
+In a single-threaded process, the \fIsigprocmask\fP() function shall
+examine or change (or both) the signal mask of the calling
+thread.
+.LP
+If the argument \fIset\fP is not a null pointer, it points to a set
+of signals to be used to change the currently blocked
+set.
+.LP
+The argument \fIhow\fP indicates the way in which the set is changed,
+and the application shall ensure it consists of one of
+the following values:
+.TP 7
+SIG_BLOCK
+The resulting set shall be the union of the current set and the signal
+set pointed to by \fIset\fP.
+.TP 7
+SIG_SETMASK
+The resulting set shall be the signal set pointed to by \fIset\fP.
+.TP 7
+SIG_UNBLOCK
+The resulting set shall be the intersection of the current set and
+the complement of the signal set pointed to by
+\fIset\fP.
+.sp
+.LP
+If the argument \fIoset\fP is not a null pointer, the previous mask
+shall be stored in the location pointed to by \fIoset\fP.
+If \fIset\fP is a null pointer, the value of the argument \fIhow\fP
+is not significant and the process' signal mask shall be
+unchanged; thus the call can be used to enquire about currently blocked
+signals.
+.LP
+If there are any pending unblocked signals after the call to \fIsigprocmask\fP(),
+at least one of those signals shall be
+delivered before the call to \fIsigprocmask\fP() returns.
+.LP
+It is not possible to block those signals which cannot be ignored.
+This shall be enforced by the system without causing an error
+to be indicated.
+.LP
+If any of the SIGFPE, SIGILL, SIGSEGV, or SIGBUS signals are generated
+while they are blocked, the result is undefined, unless
+the signal was generated by the \fIkill\fP() function, the \fIsigqueue\fP()
+function, or the \fIraise\fP()
+function.
+.LP
+If \fIsigprocmask\fP() fails, the thread's signal mask shall not be
+changed.
+.LP
+The use of the \fIsigprocmask\fP() function is unspecified in a multi-threaded
+process.
+.SH RETURN VALUE
+.LP
+Upon successful completion \fIpthread_sigmask\fP() shall return 0;
+otherwise, it shall return the corresponding error number.
+.LP
+Upon successful completion, \fIsigprocmask\fP() shall return 0; otherwise,
+-1 shall be returned, \fIerrno\fP shall be set to
+indicate the error, and the process' signal mask shall be unchanged.
+.SH ERRORS
+.LP
+The \fIpthread_sigmask\fP() and \fIsigprocmask\fP() functions
+shall fail if:
+.TP 7
+.B EINVAL
+The value of the \fIhow\fP argument is not equal to one of the defined
+values.
+.sp
+.LP
+The \fIpthread_sigmask\fP() function shall not return an error code
+of [EINTR].
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+When a process' signal mask is changed in a signal-catching function
+that is installed by \fIsigaction\fP(), the restoration of the signal
+mask on return from the signal-catching
+function overrides that change (see \fIsigaction\fP()). If the signal-catching
+function
+was installed with \fIsignal\fP(), it is unspecified whether this
+occurs.
+.LP
+See \fIkill\fP() for a discussion of the requirement on delivery of
+signals.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsigaction\fP(), \fIsigaddset\fP(), \fIsigdelset\fP(), \fIsigemptyset\fP(),
+\fIsigfillset\fP(), \fIsigismember\fP(), \fIsigpending\fP(),
+\fIsigqueue\fP(), \fIsigsuspend\fP(), the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, \fI<signal.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sigqueue.3p b/man-pages-posix-2003/man3p/sigqueue.3p
new file mode 100644
index 0000000..ca43b04
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sigqueue.3p
@@ -0,0 +1,144 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SIGQUEUE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sigqueue
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sigqueue \- queue a signal to a process (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <signal.h>
+.br
+.sp
+int sigqueue(pid_t\fP \fIpid\fP\fB, int\fP \fIsigno\fP\fB, const union
+sigval\fP \fIvalue\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsigqueue\fP() function shall cause the signal specified by
+\fIsigno\fP to be sent with the value specified by
+\fIvalue\fP to the process specified by \fIpid\fP. If \fIsigno\fP
+is zero (the null signal), error checking is performed but no
+signal is actually sent. The null signal can be used to check the
+validity of \fIpid\fP.
+.LP
+The conditions required for a process to have permission to queue
+a signal to another process are the same as for the \fIkill\fP() function.
+.LP
+The \fIsigqueue\fP() function shall return immediately. If SA_SIGINFO
+is set for \fIsigno\fP and if the resources were
+available to queue the signal, the signal shall be queued and sent
+to the receiving process. If SA_SIGINFO is not set for
+\fIsigno\fP, then \fIsigno\fP shall be sent at least once to the receiving
+process; it is unspecified whether \fIvalue\fP shall
+be sent to the receiving process as a result of this call.
+.LP
+If the value of \fIpid\fP causes \fIsigno\fP to be generated for the
+sending process, and if \fIsigno\fP is not blocked for
+the calling thread and if no other thread has \fIsigno\fP unblocked
+or is waiting in a \fIsigwait\fP() function for \fIsigno\fP, either
+\fIsigno\fP or at least the pending, unblocked
+signal shall be delivered to the calling thread before the \fIsigqueue\fP()
+function returns. Should any multiple pending signals
+in the range SIGRTMIN to SIGRTMAX be selected for delivery, it shall
+be the lowest numbered one. The selection order between
+realtime and non-realtime signals, or between multiple pending non-realtime
+signals, is unspecified.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the specified signal shall have been queued,
+and the \fIsigqueue\fP() function shall return a value
+of zero. Otherwise, the function shall return a value of -1 and set
+\fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fIsigqueue\fP() function shall fail if:
+.TP 7
+.B EAGAIN
+No resources are available to queue the signal. The process has already
+queued {SIGQUEUE_MAX} signals that are still pending at
+the receiver(s), or a system-wide resource limit has been exceeded.
+.TP 7
+.B EINVAL
+The value of the \fIsigno\fP argument is an invalid or unsupported
+signal number.
+.TP 7
+.B EPERM
+The process does not have the appropriate privilege to send the signal
+to the receiving process.
+.TP 7
+.B ESRCH
+The process \fIpid\fP does not exist.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIsigqueue\fP() function allows an application to queue a realtime
+signal to itself or to another process, specifying the
+application-defined value. This is common practice in realtime applications
+on existing realtime systems. It was felt that
+specifying another function in the \fIsig\fP... name space already
+carved out for signals was preferable to extending the
+interface to \fIkill\fP().
+.LP
+Such a function became necessary when the put/get event function of
+the message queues was removed. It should be noted that the
+\fIsigqueue\fP() function implies reduced performance in a security-conscious
+implementation as the access permissions between the
+sender and receiver have to be checked on each send when the \fIpid\fP
+is resolved into a target process. Such access checks were
+necessary only at message queue open in the previous interface.
+.LP
+The standard developers required that \fIsigqueue\fP() have the same
+semantics with respect to the null signal as \fIkill\fP(), and that
+the same permission checking be used. But because of the difficulty
+of
+implementing the "broadcast" semantic of \fIkill\fP() (for example,
+to process groups) and
+the interaction with resource allocation, this semantic was not adopted.
+The \fIsigqueue\fP() function queues a signal to a single
+process specified by the \fIpid\fP argument.
+.LP
+The \fIsigqueue\fP() function can fail if the system has insufficient
+resources to queue the signal. An explicit limit on the
+number of queued signals that a process could send was introduced.
+While the limit is "per-sender", this volume of
+IEEE\ Std\ 1003.1-2001 does not specify that the resources be part
+of the state of the sender. This would require either
+that the sender be maintained after exit until all signals that it
+had sent to other processes were handled or that all such
+signals that had not yet been acted upon be removed from the queue(s)
+of the receivers. This volume of
+IEEE\ Std\ 1003.1-2001 does not preclude this behavior, but an implementation
+that allocated queuing resources from a
+system-wide pool (with per-sender limits) and that leaves queued signals
+pending after the sender exits is also permitted.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIRealtime Signals\fP, the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<signal.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sigrelse.3p b/man-pages-posix-2003/man3p/sigrelse.3p
new file mode 100644
index 0000000..de0bfc3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sigrelse.3p
@@ -0,0 +1 @@
+.so man3p/sigset.3p
diff --git a/man-pages-posix-2003/man3p/sigset.3p b/man-pages-posix-2003/man3p/sigset.3p
new file mode 100644
index 0000000..cb959d9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sigset.3p
@@ -0,0 +1,145 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SIGHOLD" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sighold
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sighold, sigignore, sigpause, sigrelse, sigset \- signal management
+.SH SYNOPSIS
+.LP
+\fB#include <signal.h>
+.br
+.sp
+int sighold(int\fP \fIsig\fP\fB);
+.br
+int sigignore(int\fP \fIsig\fP\fB);
+.br
+int sigpause(int\fP \fIsig\fP\fB);
+.br
+int sigrelse(int\fP \fIsig\fP\fB);
+.br
+void (*sigset(int\fP \fIsig\fP\fB, void (*\fP\fIdisp\fP\fB)(int)))(int);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+Use of any of these functions is unspecified in a multi-threaded process.
+.LP
+The \fIsighold\fP(), \fIsigignore\fP(), \fIsigpause\fP(), \fIsigrelse\fP(),
+and \fIsigset\fP() functions provide simplified
+signal management.
+.LP
+The \fIsigset\fP() function shall modify signal dispositions. The
+\fIsig\fP argument specifies the signal, which may be any
+signal except SIGKILL and SIGSTOP. The \fIdisp\fP argument specifies
+the signal's disposition, which may be SIG_DFL, SIG_IGN, or
+the address of a signal handler. If \fIsigset\fP() is used, and \fIdisp\fP
+is the address of a signal handler, the system shall
+add \fIsig\fP to the calling process' signal mask before executing
+the signal handler; when the signal handler returns, the system
+shall restore the calling process' signal mask to its state prior
+to the delivery of the signal. In addition, if \fIsigset\fP() is
+used, and \fIdisp\fP is equal to SIG_HOLD, \fIsig\fP shall be added
+to the calling process' signal mask and \fIsig\fP's
+disposition shall remain unchanged. If \fIsigset\fP() is used, and
+\fIdisp\fP is not equal to SIG_HOLD, \fIsig\fP shall be
+removed from the calling process' signal mask.
+.LP
+The \fIsighold\fP() function shall add \fIsig\fP to the calling process'
+signal mask.
+.LP
+The \fIsigrelse\fP() function shall remove \fIsig\fP from the calling
+process' signal mask.
+.LP
+The \fIsigignore\fP() function shall set the disposition of \fIsig\fP
+to SIG_IGN.
+.LP
+The \fIsigpause\fP() function shall remove \fIsig\fP from the calling
+process' signal mask and suspend the calling process
+until a signal is received. The \fIsigpause\fP() function shall restore
+the process' signal mask to its original state before
+returning.
+.LP
+If the action for the SIGCHLD signal is set to SIG_IGN, child processes
+of the calling processes shall not be transformed into
+zombie processes when they terminate. If the calling process subsequently
+waits for its children, and the process has no
+unwaited-for children that were transformed into zombie processes,
+it shall block until all of its children terminate, and \fIwait\fP(),
+\fIwaitid\fP(), and \fIwaitpid\fP() shall fail and set \fIerrno\fP
+to [ECHILD].
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIsigset\fP() shall return SIG_HOLD if
+the signal had been blocked and the signal's previous
+disposition if it had not been blocked. Otherwise, SIG_ERR shall be
+returned and \fIerrno\fP set to indicate the error.
+.LP
+The \fIsigpause\fP() function shall suspend execution of the thread
+until a signal is received, whereupon it shall return -1
+and set \fIerrno\fP to [EINTR].
+.LP
+For all other functions, upon successful completion, 0 shall be returned.
+Otherwise, -1 shall be returned and \fIerrno\fP set
+to indicate the error.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+.B EINVAL
+The \fIsig\fP argument is an illegal signal number.
+.sp
+.LP
+The \fIsigset\fP() and \fIsigignore\fP() functions shall fail if:
+.TP 7
+.B EINVAL
+An attempt is made to catch a signal that cannot be caught, or to
+ignore a signal that cannot be ignored.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIsigaction\fP() function provides a more comprehensive and reliable
+mechanism
+for controlling signals; new applications should use \fIsigaction\fP()
+rather than
+\fIsigset\fP().
+.LP
+The \fIsighold\fP() function, in conjunction with \fIsigrelse\fP()
+or \fIsigpause\fP(), may be used to establish critical
+regions of code that require the delivery of a signal to be temporarily
+deferred.
+.LP
+The \fIsigsuspend\fP() function should be used in preference to \fIsigpause\fP()
+for broader portability.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fISignal Concepts\fP, \fIexec\fP(), \fIpause\fP(), \fIsigaction\fP(),
+\fIsignal\fP(), \fIsigsuspend\fP(), \fIwaitid\fP(), the Base
+Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<signal.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sigsetjmp.3p b/man-pages-posix-2003/man3p/sigsetjmp.3p
new file mode 100644
index 0000000..3bf1f0e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sigsetjmp.3p
@@ -0,0 +1,108 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SIGSETJMP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sigsetjmp
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sigsetjmp \- set jump point for a non-local goto
+.SH SYNOPSIS
+.LP
+\fB#include <setjmp.h>
+.br
+.sp
+int sigsetjmp(sigjmp_buf\fP \fIenv\fP\fB, int\fP \fIsavemask\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsigsetjmp\fP() function shall be equivalent to the \fIsetjmp\fP()
+function,
+except as follows:
+.IP " *" 3
+References to \fIsetjmp\fP() are equivalent to \fIsigsetjmp\fP().
+.LP
+.IP " *" 3
+References to \fIlongjmp\fP() are equivalent to \fIsiglongjmp\fP().
+.LP
+.IP " *" 3
+If the value of the \fIsavemask\fP argument is not 0, \fIsigsetjmp\fP()
+shall also save the current signal mask of the calling
+thread as part of the calling environment.
+.LP
+.SH RETURN VALUE
+.LP
+If the return is from a successful direct invocation, \fIsigsetjmp\fP()
+shall return 0. If the return is from a call to \fIsiglongjmp\fP(),
+\fIsigsetjmp\fP() shall return a non-zero value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The distinction between \fIsetjmp\fP()/ \fIlongjmp\fP() and \fIsigsetjmp\fP()/
+\fIsiglongjmp\fP() is only significant for programs which use \fIsigaction\fP(),
+\fIsigprocmask\fP(), or \fIsigsuspend\fP().
+.LP
+Note that since this function is defined in terms of \fIsetjmp\fP(),
+if \fIsavemask\fP
+is zero, it is unspecified whether the signal mask is saved.
+.SH RATIONALE
+.LP
+The ISO\ C standard specifies various restrictions on the usage of
+the \fIsetjmp\fP() macro in order to permit implementors to recognize
+the name in the compiler and not
+implement an actual function. These same restrictions apply to the
+\fIsigsetjmp\fP() macro.
+.LP
+There are processors that cannot easily support these calls, but this
+was not considered a sufficient reason to exclude
+them.
+.LP
+4.2 BSD, 4.3 BSD, and XSI-conformant systems provide functions named
+\fI_setjmp\fP()
+and \fI_longjmp\fP() that, together with \fIsetjmp\fP() and \fIlongjmp\fP(),
+provide the same
+functionality as \fIsigsetjmp\fP() and \fIsiglongjmp\fP(). On those
+systems, \fIsetjmp\fP() and \fIlongjmp\fP() save and restore signal
+masks, while \fI_setjmp\fP() and \fI_longjmp\fP() do not. On System
+V Release 3 and in corresponding issues of the SVID, \fIsetjmp\fP()
+and \fIlongjmp\fP() are explicitly defined
+not to save and restore signal masks. In order to permit existing
+practice in both cases, the relation of \fIsetjmp\fP() and \fIlongjmp\fP()
+to signal masks is not
+specified, and a new set of functions is defined instead.
+.LP
+The \fIlongjmp\fP() and \fIsiglongjmp\fP()
+functions operate as in the previous issue provided the matching \fIsetjmp\fP()
+or
+\fIsigsetjmp\fP() has been performed in the same thread. Non-local
+jumps into contexts saved by other threads would be at best a
+questionable practice and were not considered worthy of standardization.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsiglongjmp\fP(), \fIsignal\fP(), \fIsigprocmask\fP(), \fIsigsuspend\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<setjmp.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sigsuspend.3p b/man-pages-posix-2003/man3p/sigsuspend.3p
new file mode 100644
index 0000000..14a7516
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sigsuspend.3p
@@ -0,0 +1,84 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SIGSUSPEND" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sigsuspend
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sigsuspend \- wait for a signal
+.SH SYNOPSIS
+.LP
+\fB#include <signal.h>
+.br
+.sp
+int sigsuspend(const sigset_t *\fP\fIsigmask\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsigsuspend\fP() function shall replace the current signal mask
+of the calling thread with the set of signals pointed to
+by \fIsigmask\fP and then suspend the thread until delivery of a signal
+whose action is either to execute a signal-catching
+function or to terminate the process. This shall not cause any other
+signals that may have been pending on the process to become
+pending on the thread.
+.LP
+If the action is to terminate the process then \fIsigsuspend\fP()
+shall never return. If the action is to execute a
+signal-catching function, then \fIsigsuspend\fP() shall return after
+the signal-catching function returns, with the signal mask
+restored to the set that existed prior to the \fIsigsuspend\fP() call.
+.LP
+It is not possible to block signals that cannot be ignored. This is
+enforced by the system without causing an error to be
+indicated.
+.SH RETURN VALUE
+.LP
+Since \fIsigsuspend\fP() suspends thread execution indefinitely, there
+is no successful completion return value. If a return
+occurs, -1 shall be returned and \fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fIsigsuspend\fP() function shall fail if:
+.TP 7
+.B EINTR
+A signal is caught by the calling process and control is returned
+from the signal-catching function.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Normally, at the beginning of a critical code section, a specified
+set of signals is blocked using the \fIsigprocmask\fP() function.
+When the thread has completed the critical section and needs to
+wait for the previously blocked signal(s), it pauses by calling \fIsigsuspend\fP()
+with the mask that was returned by the \fIsigprocmask\fP() call.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fISignal Concepts\fP, \fIpause\fP(), \fIsigaction\fP(), \fIsigaddset\fP(),
+\fIsigdelset\fP(), \fIsigemptyset\fP(), \fIsigfillset\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<signal.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sigtimedwait.3p b/man-pages-posix-2003/man3p/sigtimedwait.3p
new file mode 100644
index 0000000..403e807
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sigtimedwait.3p
@@ -0,0 +1 @@
+.so man3p/sigwaitinfo.3p
diff --git a/man-pages-posix-2003/man3p/sigwait.3p b/man-pages-posix-2003/man3p/sigwait.3p
new file mode 100644
index 0000000..34828fa
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sigwait.3p
@@ -0,0 +1,111 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SIGWAIT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sigwait
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sigwait \- wait for queued signals
+.SH SYNOPSIS
+.LP
+\fB#include <signal.h>
+.br
+.sp
+int sigwait(const sigset_t *restrict\fP \fIset\fP\fB, int *restrict\fP
+\fIsig\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsigwait\fP() function shall select a pending signal from \fIset\fP,
+atomically clear it from the system's set of
+pending signals, and return that signal number in the location referenced
+by \fIsig\fP. If prior to the call to \fIsigwait\fP()
+there are multiple pending instances of a single signal number, it
+is implementation-defined whether upon successful return there
+are any remaining pending signals for that signal number. If the
+implementation supports queued signals and there are
+multiple signals queued for the signal number selected, the first
+such queued signal shall cause a return from \fIsigwait\fP() and
+the remainder shall remain queued. If no signal in \fIset\fP is
+pending at the time of the call, the thread shall be suspended until
+one or more becomes pending. The signals defined by \fIset\fP
+shall have been blocked at the time of the call to \fIsigwait\fP();
+otherwise, the behavior is undefined. The effect of
+\fIsigwait\fP() on the signal actions for the signals in \fIset\fP
+is unspecified.
+.LP
+If more than one thread is using \fIsigwait\fP() to wait for the same
+signal, no more than one of these threads shall return
+from \fIsigwait\fP() with the signal number. Which thread returns
+from \fIsigwait\fP() if more than a single thread is waiting is
+unspecified.
+.LP
+Should any of the multiple pending signals in the range SIGRTMIN to
+SIGRTMAX be selected, it shall be the lowest numbered one. The
+selection order between realtime and non-realtime signals, or between
+multiple pending non-realtime signals, is unspecified.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIsigwait\fP() shall store the signal
+number of the received signal at the location referenced by
+\fIsig\fP and return zero. Otherwise, an error number shall be returned
+to indicate the error.
+.SH ERRORS
+.LP
+The \fIsigwait\fP() function may fail if:
+.TP 7
+.B EINVAL
+The \fIset\fP argument contains an invalid or unsupported signal number.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+To provide a convenient way for a thread to wait for a signal, this
+volume of IEEE\ Std\ 1003.1-2001 provides the
+\fIsigwait\fP() function. For most cases where a thread has to wait
+for a signal, the \fIsigwait\fP() function should be quite
+convenient, efficient, and adequate.
+.LP
+However, requests were made for a lower-level primitive than \fIsigwait\fP()
+and for semaphores that could be used by threads.
+After some consideration, threads were allowed to use semaphores and
+\fIsem_post\fP() was
+defined to be async-signal and async-cancel-safe.
+.LP
+In summary, when it is necessary for code run in response to an asynchronous
+signal to notify a thread, \fIsigwait\fP() should
+be used to handle the signal. Alternatively, if the implementation
+provides semaphores, they also can be used, either following
+\fIsigwait\fP() or from within a signal handling routine previously
+registered with \fIsigaction\fP().
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fISignal Concepts\fP, \fIRealtime
+Signals\fP, \fIpause\fP(), \fIpthread_sigmask\fP(), \fIsigaction\fP(),
+\fIsigpending\fP(), \fIsigsuspend\fP(), \fIsigwaitinfo\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<signal.h>\fP, \fI<time.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sigwaitinfo.3p b/man-pages-posix-2003/man3p/sigwaitinfo.3p
new file mode 100644
index 0000000..1ff9bd5
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sigwaitinfo.3p
@@ -0,0 +1,268 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SIGTIMEDWAIT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sigtimedwait
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sigtimedwait, sigwaitinfo \- wait for queued signals (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <signal.h>
+.br
+.sp
+int sigtimedwait(const sigset_t *restrict\fP \fIset\fP\fB,
+.br
+\ \ \ \ \ \ siginfo_t *restrict\fP \fIinfo\fP\fB,
+.br
+\ \ \ \ \ \ const struct timespec *restrict\fP \fItimeout\fP\fB);
+.br
+int sigwaitinfo(const sigset_t *restrict\fP \fIset\fP\fB,
+.br
+\ \ \ \ \ \ siginfo_t *restrict\fP \fIinfo\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsigtimedwait\fP() function shall be equivalent to \fIsigwaitinfo\fP()
+except that if none of the signals specified by
+\fIset\fP are pending, \fIsigtimedwait\fP() shall wait for the time
+interval specified in the \fBtimespec\fP structure
+referenced by \fItimeout\fP. If the \fBtimespec\fP structure pointed
+to by \fItimeout\fP is zero-valued and if none of the
+signals specified by \fIset\fP are pending, then \fIsigtimedwait\fP()
+shall return immediately with an error. If \fItimeout\fP
+is the NULL pointer, the behavior is unspecified. If the Monotonic
+Clock option is supported, the CLOCK_MONOTONIC
+clock shall be used to measure the time interval specified by the
+\fItimeout\fP argument.
+.LP
+The \fIsigwaitinfo\fP() function selects the pending signal from the
+set specified by \fIset\fP. Should any of multiple
+pending signals in the range SIGRTMIN to SIGRTMAX be selected, it
+shall be the lowest numbered one. The selection order between
+realtime and non-realtime signals, or between multiple pending non-realtime
+signals, is unspecified. If no signal in \fIset\fP is
+pending at the time of the call, the calling thread shall be suspended
+until one or more signals in \fIset\fP become pending or
+until it is interrupted by an unblocked, caught signal.
+.LP
+The \fIsigwaitinfo\fP() function shall be equivalent to the \fIsigwait\fP()
+function
+if the \fIinfo\fP argument is NULL. If the \fIinfo\fP argument is
+non-NULL, the \fIsigwaitinfo\fP() function shall be equivalent
+to \fIsigwait\fP(), except that the selected signal number shall be
+stored in the
+\fIsi_signo\fP member, and the cause of the signal shall be stored
+in the \fIsi_code\fP member. If any value is queued to the
+selected signal, the first such queued value shall be dequeued and,
+if the \fIinfo\fP argument is non-NULL, the value shall be
+stored in the \fIsi_value\fP member of \fIinfo\fP. The system resource
+used to queue the signal shall be released and returned to
+the system for other use. If no value is queued, the content of the
+\fIsi_value\fP member is undefined. If no further signals are
+queued for the selected signal, the pending indication for that signal
+shall be reset.
+.SH RETURN VALUE
+.LP
+Upon successful completion (that is, one of the signals specified
+by \fIset\fP is pending or is generated) \fIsigwaitinfo\fP()
+and \fIsigtimedwait\fP() shall return the selected signal number.
+Otherwise, the function shall return a value of -1 and set
+\fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fIsigtimedwait\fP() function shall fail if:
+.TP 7
+.B EAGAIN
+No signal specified by \fIset\fP was generated within the specified
+timeout period.
+.sp
+.LP
+The \fIsigtimedwait\fP() and \fIsigwaitinfo\fP() functions may fail
+if:
+.TP 7
+.B EINTR
+The wait was interrupted by an unblocked, caught signal. It shall
+be documented in system documentation whether this error
+causes these functions to fail.
+.sp
+.LP
+The \fIsigtimedwait\fP() function may also fail if:
+.TP 7
+.B EINVAL
+The \fItimeout\fP argument specified a \fItv_nsec\fP value less than
+zero or greater than or equal to 1000 million.
+.sp
+.LP
+An implementation only checks for this error if no signal is pending
+in \fIset\fP and it is necessary to wait.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIsigtimedwait\fP() function times out and returns an [EAGAIN]
+error. Application writers should note that this is
+inconsistent with other functions such as \fIpthread_cond_timedwait\fP()
+that return [ETIMEDOUT].
+.SH RATIONALE
+.LP
+Existing programming practice on realtime systems uses the ability
+to pause waiting for a selected set of events and handle the
+first event that occurs in-line instead of in a signal-handling function.
+This allows applications to be written in an
+event-directed style similar to a state machine. This style of programming
+is useful for largescale transaction processing in which
+the overall throughput of an application and the ability to clearly
+track states are more important than the ability to minimize
+the response time of individual event handling.
+.LP
+It is possible to construct a signal-waiting macro function out of
+the realtime signal function mechanism defined in this volume
+of IEEE\ Std\ 1003.1-2001. However, such a macro has to include the
+definition of a generalized handler for all signals to
+be waited on. A significant portion of the overhead of handler processing
+can be avoided if the signal-waiting function is provided
+by the kernel. This volume of IEEE\ Std\ 1003.1-2001 therefore provides
+two signal-waiting functions-one that waits
+indefinitely and one with a timeout-as part of the overall realtime
+signal function specification.
+.LP
+The specification of a function with a timeout allows an application
+to be written that can be broken out of a wait after a set
+period of time if no event has occurred. It was argued that setting
+a timer event before the wait and recognizing the timer event
+in the wait would also implement the same functionality, but at a
+lower performance level. Because of the performance degradation
+associated with the user-level specification of a timer event and
+the subsequent cancellation of that timer event after the wait
+completes for a valid event, and the complexity associated with handling
+potential race conditions associated with the user-level
+method, the separate function has been included.
+.LP
+Note that the semantics of the \fIsigwaitinfo\fP() function are nearly
+identical to that of the \fIsigwait\fP() function defined by this
+volume of IEEE\ Std\ 1003.1-2001. The only
+difference is that \fIsigwaitinfo\fP() returns the queued signal value
+in the \fIvalue\fP argument. The return of the queued
+value is required so that applications can differentiate between multiple
+events queued to the same signal number.
+.LP
+The two distinct functions are being maintained because some implementations
+may choose to implement the POSIX Threads Extension
+functions and not implement the queued signals extensions. Note, though,
+that \fIsigwaitinfo\fP() does not return the queued value
+if the \fIvalue\fP argument is NULL, so the POSIX Threads Extension
+\fIsigwait\fP()
+function can be implemented as a macro on \fIsigwaitinfo\fP().
+.LP
+The \fIsigtimedwait\fP() function was separated from the \fIsigwaitinfo\fP()
+function to address concerns regarding the
+overloading of the \fItimeout\fP pointer to indicate indefinite wait
+(no timeout), timed wait, and immediate return, and concerns
+regarding consistency with other functions where the conditional and
+timed waits were separate functions from the pure blocking
+function. The semantics of \fIsigtimedwait\fP() are specified such
+that \fIsigwaitinfo\fP() could be implemented as a macro with
+a NULL pointer for \fItimeout\fP.
+.LP
+The \fIsigwait\fP functions provide a synchronous mechanism for threads
+to wait for asynchronously-generated signals. One
+important question was how many threads that are suspended in a call
+to a \fIsigwait\fP()
+function for a signal should return from the call when the signal
+is sent. Four choices were considered:
+.IP " 1." 4
+Return an error for multiple simultaneous calls to \fIsigwait\fP functions
+for the same signal.
+.LP
+.IP " 2." 4
+One or more threads return.
+.LP
+.IP " 3." 4
+All waiting threads return.
+.LP
+.IP " 4." 4
+Exactly one thread returns.
+.LP
+.LP
+Prohibiting multiple calls to \fIsigwait\fP() for the same signal
+was felt to be overly
+restrictive. The "one or more" behavior made implementation of conforming
+packages easy at the expense of forcing POSIX threads
+clients to protect against multiple simultaneous calls to \fIsigwait\fP()
+in application
+code in order to achieve predictable behavior. There was concern that
+the "all waiting threads" behavior would result in "signal
+broadcast storms", consuming excessive CPU resources by replicating
+the signals in the general case. Furthermore, no convincing
+examples could be presented that delivery to all was either simpler
+or more powerful than delivery to one.
+.LP
+Thus, the consensus was that exactly one thread that was suspended
+in a call to a \fIsigwait\fP function for a signal should
+return when that signal occurs. This is not an onerous restriction
+as:
+.IP " *" 3
+A multi-way signal wait can be built from the single-way wait.
+.LP
+.IP " *" 3
+Signals should only be handled by application-level code, as library
+routines cannot guess what the application wants to do with
+signals generated for the entire process.
+.LP
+.IP " *" 3
+Applications can thus arrange for a single thread to wait for any
+given signal and call any needed routines upon its
+arrival.
+.LP
+.LP
+In an application that is using signals for interprocess communication,
+signal processing is typically done in one place.
+Alternatively, if the signal is being caught so that process cleanup
+can be done, the signal handler thread can call separate
+process cleanup routines for each portion of the application. Since
+the application main line started each portion of the
+application, it is at the right abstraction level to tell each portion
+of the application to clean up.
+.LP
+Certainly, there exist programming styles where it is logical to consider
+waiting for a single signal in multiple threads. A
+simple \fIsigwait_multiple\fP() routine can be constructed to achieve
+this goal. A possible implementation would be to have each
+\fIsigwait_multiple\fP() caller registered as having expressed interest
+in a set of signals. The caller then waits on a
+thread-specific condition variable. A single server thread calls a
+\fIsigwait\fP()
+function on the union of all registered signals. When the \fIsigwait\fP()
+function
+returns, the appropriate state is set and condition variables are
+broadcast. New \fIsigwait_multiple\fP() callers may cause the
+pending \fIsigwait\fP() call to be canceled and reissued in order
+to update the set of
+signals being waited for.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIRealtime Signals\fP, \fIpause\fP(), \fIpthread_sigmask\fP(),
+\fIsigaction\fP(), \fIsigpending\fP(), \fIsigsuspend\fP(), \fIsigwait\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<signal.h>\fP,
+\fI<time.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sin.3p b/man-pages-posix-2003/man3p/sin.3p
new file mode 100644
index 0000000..03c83af
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sin.3p
@@ -0,0 +1,122 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SIN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sin
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sin, sinf, sinl \- sine function
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double sin(double\fP \fIx\fP\fB);
+.br
+float sinf(float\fP \fIx\fP\fB);
+.br
+long double sinl(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the sine of their argument \fIx\fP,
+measured in radians.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the sine
+of \fIx\fP.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is \(+-0, \fIx\fP shall be returned.
+.LP
+If \fIx\fP is subnormal, a range error may occur and \fIx\fP should
+be returned.
+.LP
+If \fIx\fP is \(+-Inf, a domain error shall occur, and either a NaN
+(if supported), or an implementation-defined value
+shall be returned.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Domain\ Error
+The \fIx\fP argument is \(+-Inf.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [EDOM]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the invalid floating-point exception shall be raised.
+.sp
+.LP
+These functions may fail if:
+.TP 7
+Range\ Error
+The value of \fIx\fP is subnormal
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the underflow floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Taking the Sine of a 45-Degree Angle
+.sp
+.RS
+.nf
+
+\fB#include <math.h>
+\&...
+double radians = 45.0 * M_PI / 180;
+double result;
+\&...
+result = sin(radians);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+These functions may lose accuracy when their argument is near a multiple
+of pi or is far
+from 0.0.
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIasin\fP(), \fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIisnan\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment of Error Conditions
+for
+Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sinf.3p b/man-pages-posix-2003/man3p/sinf.3p
new file mode 100644
index 0000000..1691510
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sinf.3p
@@ -0,0 +1 @@
+.so man3p/sin.3p
diff --git a/man-pages-posix-2003/man3p/sinh.3p b/man-pages-posix-2003/man3p/sinh.3p
new file mode 100644
index 0000000..9d00aa6
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sinh.3p
@@ -0,0 +1,108 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SINH" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sinh
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sinh, sinhf, sinhl \- hyperbolic sine functions
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double sinh(double\fP \fIx\fP\fB);
+.br
+float sinhf(float\fP \fIx\fP\fB);
+.br
+long double sinhl(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the hyperbolic sine of their argument
+\fIx\fP.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the hyperbolic
+sine of \fIx\fP.
+.LP
+If the result would cause an overflow, a range error shall occur and
+\(+-HUGE_VAL, \(+-HUGE_VALF, and \(+-HUGE_VALL
+(with the same sign as \fIx\fP) shall be returned as appropriate for
+the type of the function.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is \(+-0 or \(+-Inf, \fIx\fP shall be returned.
+.LP
+If \fIx\fP is subnormal, a range error may occur and \fIx\fP should
+be returned.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Range\ Error
+The result would cause an overflow.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the overflow floating-point exception shall be
+raised.
+.sp
+.LP
+These functions may fail if:
+.TP 7
+Range\ Error
+The value \fIx\fP is subnormal.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the underflow floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIasinh\fP(), \fIcosh\fP(), \fIfeclearexcept\fP(), \fIfetestexcept\fP(),
+\fIisnan\fP(), \fItanh\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment of Error Conditions
+for
+Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sinhf.3p b/man-pages-posix-2003/man3p/sinhf.3p
new file mode 100644
index 0000000..20d9a2d
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sinhf.3p
@@ -0,0 +1 @@
+.so man3p/sinh.3p
diff --git a/man-pages-posix-2003/man3p/sinhl.3p b/man-pages-posix-2003/man3p/sinhl.3p
new file mode 100644
index 0000000..20d9a2d
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sinhl.3p
@@ -0,0 +1 @@
+.so man3p/sinh.3p
diff --git a/man-pages-posix-2003/man3p/sinl.3p b/man-pages-posix-2003/man3p/sinl.3p
new file mode 100644
index 0000000..1691510
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sinl.3p
@@ -0,0 +1 @@
+.so man3p/sin.3p
diff --git a/man-pages-posix-2003/man3p/sleep.3p b/man-pages-posix-2003/man3p/sleep.3p
new file mode 100644
index 0000000..b0cb827
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sleep.3p
@@ -0,0 +1,164 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SLEEP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sleep
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sleep \- suspend execution for an interval of time
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+unsigned sleep(unsigned\fP \fIseconds\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsleep\fP() function shall cause the calling thread to be suspended
+from execution until either the number of realtime
+seconds specified by the argument \fIseconds\fP has elapsed or a signal
+is delivered to the calling thread and its action is to
+invoke a signal-catching function or to terminate the process. The
+suspension time may be longer than requested due to the
+scheduling of other activity by the system.
+.LP
+If a SIGALRM signal is generated for the calling process during execution
+of \fIsleep\fP() and if the SIGALRM signal is being
+ignored or blocked from delivery, it is unspecified whether \fIsleep\fP()
+returns when the SIGALRM signal is scheduled. If the
+signal is being blocked, it is also unspecified whether it remains
+pending after \fIsleep\fP() returns or it is discarded.
+.LP
+If a SIGALRM signal is generated for the calling process during execution
+of \fIsleep\fP(), except as a result of a prior call
+to \fIalarm\fP(), and if the SIGALRM signal is not being ignored or
+blocked from delivery,
+it is unspecified whether that signal has any effect other than causing
+\fIsleep\fP() to return.
+.LP
+If a signal-catching function interrupts \fIsleep\fP() and examines
+or changes either the time a SIGALRM is scheduled to be
+generated, the action associated with the SIGALRM signal, or whether
+the SIGALRM signal is blocked from delivery, the results are
+unspecified.
+.LP
+If a signal-catching function interrupts \fIsleep\fP() and calls \fIsiglongjmp\fP()
+or \fIlongjmp\fP() to restore an environment saved prior to the \fIsleep\fP()
+call, the
+action associated with the SIGALRM signal and the time at which a
+SIGALRM signal is scheduled to be generated are unspecified. It
+is also unspecified whether the SIGALRM signal is blocked, unless
+the process' signal mask is restored as part of the
+environment.
+.LP
+Interactions between \fIsleep\fP() and any of \fIsetitimer\fP(), \fIualarm\fP(),
+or \fIusleep\fP() are unspecified.
+.SH RETURN VALUE
+.LP
+If \fIsleep\fP() returns because the requested time has elapsed, the
+value returned shall be 0. If \fIsleep\fP() returns due
+to delivery of a signal, the return value shall be the "unslept" amount
+(the requested time minus the time actually slept) in
+seconds.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+There are two general approaches to the implementation of the \fIsleep\fP()
+function. One is to use the \fIalarm\fP() function to schedule a SIGALRM
+signal and then suspend the process waiting for that
+signal. The other is to implement an independent facility. This volume
+of IEEE\ Std\ 1003.1-2001 permits either
+approach.
+.LP
+In order to comply with the requirement that no primitive shall change
+a process attribute unless explicitly described by this
+volume of IEEE\ Std\ 1003.1-2001, an implementation using SIGALRM
+must carefully take into account any SIGALRM signal
+scheduled by previous \fIalarm\fP() calls, the action previously established
+for SIGALRM,
+and whether SIGALRM was blocked. If a SIGALRM has been scheduled before
+the \fIsleep\fP() would ordinarily complete, the
+\fIsleep\fP() must be shortened to that time and a SIGALRM generated
+(possibly simulated by direct invocation of the
+signal-catching function) before \fIsleep\fP() returns. If a SIGALRM
+has been scheduled after the \fIsleep\fP() would ordinarily
+complete, it must be rescheduled for the same time before \fIsleep\fP()
+returns. The action and blocking for SIGALRM must be saved
+and restored.
+.LP
+Historical implementations often implement the SIGALRM-based version
+using \fIalarm\fP()
+and \fIpause\fP(). One such implementation is prone to infinite hangups,
+as described in \fIpause\fP(). Another such implementation uses the
+C-language \fIsetjmp\fP() and \fIlongjmp\fP() functions to avoid that
+window. That implementation introduces a different problem: when the
+SIGALRM signal interrupts a signal-catching function installed
+by the user to catch a different signal, the \fIlongjmp\fP() aborts
+that signal-catching
+function. An implementation based on \fIsigprocmask\fP(), \fIalarm\fP(),
+and \fIsigsuspend\fP() can avoid these
+problems.
+.LP
+Despite all reasonable care, there are several very subtle, but detectable
+and unavoidable, differences between the two types of
+implementations. These are the cases mentioned in this volume of IEEE\ Std\ 1003.1-2001
+where some other activity relating
+to SIGALRM takes place, and the results are stated to be unspecified.
+All of these cases are sufficiently unusual as not to be of
+concern to most applications.
+.LP
+See also the discussion of the term \fIrealtime\fP in \fIalarm\fP()
+\&.
+.LP
+Since \fIsleep\fP() can be implemented using \fIalarm\fP(), the discussion
+about alarms
+occurring early under \fIalarm\fP() applies to \fIsleep\fP() as well.
+.LP
+Application writers should note that the type of the argument \fIseconds\fP
+and the return value of \fIsleep\fP() is
+\fBunsigned\fP. That means that a Strictly Conforming POSIX System
+Interfaces Application cannot pass a value greater than the
+minimum guaranteed value for {UINT_MAX}, which the ISO\ C standard
+sets as 65535, and any application passing a larger value is
+restricting its portability. A different type was considered, but
+historical implementations, including those with a 16-bit
+\fBint\fP type, consistently use either \fBunsigned\fP or \fBint\fP.
+.LP
+Scheduling delays may cause the process to return from the \fIsleep\fP()
+function significantly after the requested time. In
+such cases, the return value should be set to zero, since the formula
+(requested time minus the time actually spent) yields a
+negative number and \fIsleep\fP() returns an \fBunsigned\fP.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIalarm\fP(), \fIgetitimer\fP(), \fInanosleep\fP(), \fIpause\fP(),
+\fIsigaction\fP(),
+\fIsigsetjmp\fP(), \fIualarm\fP(), \fIusleep\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/snprintf.3p b/man-pages-posix-2003/man3p/snprintf.3p
new file mode 100644
index 0000000..b1ca735
--- /dev/null
+++ b/man-pages-posix-2003/man3p/snprintf.3p
@@ -0,0 +1 @@
+.so man3p/printf.3p
diff --git a/man-pages-posix-2003/man3p/sockatmark.3p b/man-pages-posix-2003/man3p/sockatmark.3p
new file mode 100644
index 0000000..c946df5
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sockatmark.3p
@@ -0,0 +1,122 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SOCKATMARK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sockatmark
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sockatmark \- determine whether a socket is at the out-of-band mark
+.SH SYNOPSIS
+.LP
+\fB#include <sys/socket.h>
+.br
+.sp
+int sockatmark(int\fP \fIs\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsockatmark\fP() function shall determine whether the socket
+specified by the descriptor \fIs\fP is at the out-of-band
+data mark (see the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
+Section 2.10.12, Socket Out-of-Band State). If the protocol for the
+socket
+supports out-of-band data by marking the stream with an out-of-band
+data mark, the \fIsockatmark\fP() function shall return 1 when
+all data preceding the mark has been read and the out-of-band data
+mark is the first element in the receive queue. The
+\fIsockatmark\fP() function shall not remove the mark from the stream.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIsockatmark\fP() function shall
+return a value indicating whether the socket is at an
+out-of-band data mark. If the protocol has marked the data stream
+and all data preceding the mark has been read, the return value
+shall be 1; if there is no mark, or if data precedes the mark in the
+receive queue, the \fIsockatmark\fP() function shall return
+0. Otherwise, it shall return a value of -1 and set \fIerrno\fP to
+indicate the error.
+.SH ERRORS
+.LP
+The \fIsockatmark\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fIs\fP argument is not a valid file descriptor.
+.TP 7
+.B ENOTTY
+The \fIs\fP argument does not specify a descriptor for a socket.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The use of this function between receive operations allows an application
+to determine which received data precedes the
+out-of-band data and which follows the out-of-band data.
+.LP
+There is an inherent race condition in the use of this function. On
+an empty receive queue, the current read of the location
+might well be at the "mark", but the system has no way of knowing
+that the next data segment that will arrive from the network
+will carry the mark, and \fIsockatmark\fP() will return false, and
+the next read operation will silently consume the mark.
+.LP
+Hence, this function can only be used reliably when the application
+already knows that the out-of-band data has been seen by the
+system or that it is known that there is data waiting to be read at
+the socket (via SIGURG or \fIselect\fP()). See \fISocket Receive Queue\fP,
+\fISocket Out-of-Band Data State\fP, \fISignals\fP, and \fIpselect\fP()
+for
+details.
+.SH RATIONALE
+.LP
+The \fIsockatmark\fP() function replaces the historical SIOCATMARK
+command to \fIioctl\fP() which implemented the same functionality
+on many implementations. Using a wrapper
+function follows the adopted conventions to avoid specifying commands
+to the \fIioctl\fP()
+function, other than those now included to support XSI STREAMS. The
+\fIsockatmark\fP() function could be implemented as
+follows:
+.sp
+.RS
+.nf
+
+\fB#include <sys/ioctl.h>
+.sp
+
+int sockatmark(int s)
+{
+ int val;
+ if (ioctl(s,SIOCATMARK,&val)==-1)
+ return(-1);
+ return(val);
+}
+\fP
+.fi
+.RE
+.LP
+The use of [ENOTTY] to indicate an incorrect descriptor type matches
+the historical behavior of SIOCATMARK.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIpselect\fP(), \fIrecv\fP(), \fIrecvmsg\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<sys/socket.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/socket.3p b/man-pages-posix-2003/man3p/socket.3p
new file mode 100644
index 0000000..e4db093
--- /dev/null
+++ b/man-pages-posix-2003/man3p/socket.3p
@@ -0,0 +1,155 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SOCKET" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" socket
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+socket \- create an endpoint for communication
+.SH SYNOPSIS
+.LP
+\fB#include <sys/socket.h>
+.br
+.sp
+int socket(int\fP \fIdomain\fP\fB, int\fP \fItype\fP\fB, int\fP \fIprotocol\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsocket\fP() function shall create an unbound socket in a communications
+domain, and return a file descriptor that can be
+used in later function calls that operate on sockets.
+.LP
+The \fIsocket\fP() function takes the following arguments:
+.TP 7
+\fIdomain\fP
+Specifies the communications domain in which a socket is to be created.
+.TP 7
+\fItype\fP
+Specifies the type of socket to be created.
+.TP 7
+\fIprotocol\fP
+Specifies a particular protocol to be used with the socket. Specifying
+a \fIprotocol\fP of 0 causes \fIsocket\fP() to use an
+unspecified default protocol appropriate for the requested socket
+type.
+.sp
+.LP
+The \fIdomain\fP argument specifies the address family used in the
+communications domain. The address families supported by the
+system are implementation-defined.
+.LP
+Symbolic constants that can be used for the domain argument are defined
+in the \fI<sys/socket.h>\fP header.
+.LP
+The \fItype\fP argument specifies the socket type, which determines
+the semantics of communication over the socket. The
+following socket types are defined; implementations may specify additional
+socket types:
+.TP 7
+SOCK_STREAM
+Provides sequenced, reliable, bidirectional, connection-mode byte
+streams, and may provide a transmission mechanism for
+out-of-band data.
+.TP 7
+SOCK_DGRAM
+Provides datagrams, which are connectionless-mode, unreliable messages
+of fixed maximum length.
+.TP 7
+SOCK_SEQPACKET
+Provides sequenced, reliable, bidirectional, connection-mode transmission
+paths for records. A record can be sent using one or
+more output operations and received using one or more input operations,
+but a single operation never transfers part of more than
+one record. Record boundaries are visible to the receiver via the
+MSG_EOR flag.
+.sp
+.LP
+If the \fIprotocol\fP argument is non-zero, it shall specify a protocol
+that is supported by the address family. If the
+\fIprotocol\fP argument is zero, the default protocol for this address
+family and type shall be used. The protocols supported by
+the system are implementation-defined.
+.LP
+The process may need to have appropriate privileges to use the \fIsocket\fP()
+function or to create some sockets.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIsocket\fP() shall return a non-negative
+integer, the socket file descriptor. Otherwise, a value
+of -1 shall be returned and \fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fIsocket\fP() function shall fail if:
+.TP 7
+.B EAFNOSUPPORT
+.sp
+The implementation does not support the specified address family.
+.TP 7
+.B EMFILE
+No more file descriptors are available for this process.
+.TP 7
+.B ENFILE
+No more file descriptors are available for the system.
+.TP 7
+.B EPROTONOSUPPORT
+.sp
+The protocol is not supported by the address family, or the protocol
+is not supported by the implementation.
+.TP 7
+.B EPROTOTYPE
+The socket type is not supported by the protocol.
+.sp
+.LP
+The \fIsocket\fP() function may fail if:
+.TP 7
+.B EACCES
+The process does not have appropriate privileges.
+.TP 7
+.B ENOBUFS
+Insufficient resources were available in the system to perform the
+operation.
+.TP 7
+.B ENOMEM
+Insufficient memory was available to fulfill the request.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The documentation for specific address families specifies which protocols
+each address family supports. The documentation for
+specific protocols specifies which socket types each protocol supports.
+.LP
+The application can determine whether an address family is supported
+by trying to create a socket with \fIdomain\fP set to the
+protocol in question.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIaccept\fP(), \fIbind\fP(), \fIconnect\fP(),
+\fIgetsockname\fP(), \fIgetsockopt\fP(), \fIlisten\fP(), \fIrecv\fP(),
+\fIrecvfrom\fP(), \fIrecvmsg\fP(), \fIsend\fP(), \fIsendmsg\fP(),
+\fIsetsockopt\fP(), \fIshutdown\fP(), \fIsocketpair\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<netinet/in.h>\fP,
+\fI<sys/socket.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/socketpair.3p b/man-pages-posix-2003/man3p/socketpair.3p
new file mode 100644
index 0000000..43626e5
--- /dev/null
+++ b/man-pages-posix-2003/man3p/socketpair.3p
@@ -0,0 +1,157 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SOCKETPAIR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" socketpair
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+socketpair \- create a pair of connected sockets
+.SH SYNOPSIS
+.LP
+\fB#include <sys/socket.h>
+.br
+.sp
+int socketpair(int\fP \fIdomain\fP\fB, int\fP \fItype\fP\fB, int\fP
+\fIprotocol\fP\fB,
+.br
+\ \ \ \ \ \ int\fP \fIsocket_vector\fP\fB[2]);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsocketpair\fP() function shall create an unbound pair of connected
+sockets in a specified \fIdomain\fP, of a specified
+\fItype\fP, under the protocol optionally specified by the \fIprotocol\fP
+argument. The two sockets shall be identical. The file
+descriptors used in referencing the created sockets shall be returned
+in \fIsocket_vector\fP[0] and \fIsocket_vector\fP[1].
+.LP
+The \fIsocketpair\fP() function takes the following arguments:
+.TP 7
+\fIdomain\fP
+Specifies the communications domain in which the sockets are to be
+created.
+.TP 7
+\fItype\fP
+Specifies the type of sockets to be created.
+.TP 7
+\fIprotocol\fP
+Specifies a particular protocol to be used with the sockets. Specifying
+a \fIprotocol\fP of 0 causes \fIsocketpair\fP() to
+use an unspecified default protocol appropriate for the requested
+socket type.
+.TP 7
+\fIsocket_vector\fP
+Specifies a 2-integer array to hold the file descriptors of the created
+socket pair.
+.sp
+.LP
+The \fItype\fP argument specifies the socket type, which determines
+the semantics of communications over the socket. The
+following socket types are defined; implementations may specify additional
+socket types:
+.TP 7
+SOCK_STREAM
+Provides sequenced, reliable, bidirectional, connection-mode byte
+streams, and may provide a transmission mechanism for
+out-of-band data.
+.TP 7
+SOCK_DGRAM
+Provides datagrams, which are connectionless-mode, unreliable messages
+of fixed maximum length.
+.TP 7
+SOCK_SEQPACKET
+Provides sequenced, reliable, bidirectional, connection-mode transmission
+paths for records. A record can be sent using one or
+more output operations and received using one or more input operations,
+but a single operation never transfers part of more than
+one record. Record boundaries are visible to the receiver via the
+MSG_EOR flag.
+.sp
+.LP
+If the \fIprotocol\fP argument is non-zero, it shall specify a protocol
+that is supported by the address family. If the
+\fIprotocol\fP argument is zero, the default protocol for this address
+family and type shall be used. The protocols supported by
+the system are implementation-defined.
+.LP
+The process may need to have appropriate privileges to use the \fIsocketpair\fP()
+function or to create some sockets.
+.SH RETURN VALUE
+.LP
+Upon successful completion, this function shall return 0; otherwise,
+-1 shall be returned and \fIerrno\fP set to indicate the
+error.
+.SH ERRORS
+.LP
+The \fIsocketpair\fP() function shall fail if:
+.TP 7
+.B EAFNOSUPPORT
+.sp
+The implementation does not support the specified address family.
+.TP 7
+.B EMFILE
+No more file descriptors are available for this process.
+.TP 7
+.B ENFILE
+No more file descriptors are available for the system.
+.TP 7
+.B EOPNOTSUPP
+The specified protocol does not permit creation of socket pairs.
+.TP 7
+.B EPROTONOSUPPORT
+.sp
+The protocol is not supported by the address family, or the protocol
+is not supported by the implementation.
+.TP 7
+.B EPROTOTYPE
+The socket type is not supported by the protocol.
+.sp
+.LP
+The \fIsocketpair\fP() function may fail if:
+.TP 7
+.B EACCES
+The process does not have appropriate privileges.
+.TP 7
+.B ENOBUFS
+Insufficient resources were available in the system to perform the
+operation.
+.TP 7
+.B ENOMEM
+Insufficient memory was available to fulfill the request.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The documentation for specific address families specifies which protocols
+each address family supports. The documentation for
+specific protocols specifies which socket types each protocol supports.
+.LP
+The \fIsocketpair\fP() function is used primarily with UNIX domain
+sockets and need not be supported for other domains.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsocket\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<sys/socket.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sprintf.3p b/man-pages-posix-2003/man3p/sprintf.3p
new file mode 100644
index 0000000..b1ca735
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sprintf.3p
@@ -0,0 +1 @@
+.so man3p/printf.3p
diff --git a/man-pages-posix-2003/man3p/sqrt.3p b/man-pages-posix-2003/man3p/sqrt.3p
new file mode 100644
index 0000000..bed1ce5
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sqrt.3p
@@ -0,0 +1,106 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SQRT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sqrt
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sqrt, sqrtf, sqrtl \- square root function
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double sqrt(double\fP \fIx\fP\fB);
+.br
+float sqrtf(float\fP \fIx\fP\fB);
+.br
+long double sqrtl(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the square root of their argument \fIx\fP,
+sqrt(x).
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the square
+root of \fIx\fP.
+.LP
+For finite values of \fIx\fP < -0, a domain error shall occur, and
+\ either a NaN (if supported), or an implementation-defined value
+shall be returned.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is \(+-0 or +Inf, \fIx\fP shall be returned.
+.LP
+If \fIx\fP is -Inf, a domain error shall occur, and either a NaN (if
+supported), or an implementation-defined value shall be
+returned.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Domain\ Error
+The finite value of \fIx\fP is < -0, or \fIx\fP is -Inf.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [EDOM]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the invalid floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Taking the Square Root of 9.0
+.sp
+.RS
+.nf
+
+\fB#include <math.h>
+\&...
+double x = 9.0;
+double result;
+\&...
+result = sqrt(x);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIisnan\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment
+of Error Conditions for Mathematical Functions, \fI<math.h>\fP, \fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sqrtf.3p b/man-pages-posix-2003/man3p/sqrtf.3p
new file mode 100644
index 0000000..e21dfb9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sqrtf.3p
@@ -0,0 +1 @@
+.so man3p/sqrt.3p
diff --git a/man-pages-posix-2003/man3p/sqrtl.3p b/man-pages-posix-2003/man3p/sqrtl.3p
new file mode 100644
index 0000000..e21dfb9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sqrtl.3p
@@ -0,0 +1 @@
+.so man3p/sqrt.3p
diff --git a/man-pages-posix-2003/man3p/srand.3p b/man-pages-posix-2003/man3p/srand.3p
new file mode 100644
index 0000000..4cebbbb
--- /dev/null
+++ b/man-pages-posix-2003/man3p/srand.3p
@@ -0,0 +1 @@
+.so man3p/rand.3p
diff --git a/man-pages-posix-2003/man3p/srand48.3p b/man-pages-posix-2003/man3p/srand48.3p
new file mode 100644
index 0000000..a71d5ed
--- /dev/null
+++ b/man-pages-posix-2003/man3p/srand48.3p
@@ -0,0 +1 @@
+.so man3p/drand48.3p
diff --git a/man-pages-posix-2003/man3p/srandom.3p b/man-pages-posix-2003/man3p/srandom.3p
new file mode 100644
index 0000000..0f22b82
--- /dev/null
+++ b/man-pages-posix-2003/man3p/srandom.3p
@@ -0,0 +1 @@
+.so man3p/random.3p
diff --git a/man-pages-posix-2003/man3p/sscanf.3p b/man-pages-posix-2003/man3p/sscanf.3p
new file mode 100644
index 0000000..0a084c9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sscanf.3p
@@ -0,0 +1 @@
+.so man3p/scanf.3p
diff --git a/man-pages-posix-2003/man3p/stat.3p b/man-pages-posix-2003/man3p/stat.3p
new file mode 100644
index 0000000..f92ea96
--- /dev/null
+++ b/man-pages-posix-2003/man3p/stat.3p
@@ -0,0 +1,231 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "STAT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" stat
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+stat \- get file status
+.SH SYNOPSIS
+.LP
+\fB#include <sys/stat.h>
+.br
+.sp
+int stat(const char *restrict\fP \fIpath\fP\fB, struct stat *restrict\fP
+\fIbuf\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIstat\fP() function shall obtain information about the named
+file and write it to the area pointed to by the \fIbuf\fP
+argument. The \fIpath\fP argument points to a pathname naming a file.
+Read, write, or execute permission of the named file is not
+required. An implementation that provides additional or alternate
+file access control mechanisms may, under implementation-defined
+conditions, cause \fIstat\fP() to fail. In particular, the system
+may deny the existence of the file specified by \fIpath\fP.
+.LP
+If the named file is a symbolic link, the \fIstat\fP() function shall
+continue pathname resolution using the contents of the
+symbolic link, and shall return information pertaining to the resulting
+file if the file exists.
+.LP
+The \fIbuf\fP argument is a pointer to a \fBstat\fP structure, as
+defined in the \fI<sys/stat.h>\fP header, into which information is
+placed concerning the file.
+.LP
+The \fIstat\fP() function shall update any time-related fields (as
+described in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 4.7, File Times Update), before writing
+into the \fBstat\fP structure.
+.LP
+Unless otherwise specified, the structure members \fIst_mode\fP, \fIst_ino\fP,
+\fIst_dev\fP, \fIst_uid\fP, \fIst_gid\fP,
+\fIst_atime\fP, \fIst_ctime\fP, and \fIst_mtime\fP shall have meaningful
+values for all file types defined in this volume of
+IEEE\ Std\ 1003.1-2001. The value of the member \fIst_nlink\fP shall
+be set to the number of links to the file.
+.SH RETURN VALUE
+.LP
+Upon successful completion, 0 shall be returned. Otherwise, -1 shall
+be returned and \fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fIstat\fP() function shall fail if:
+.TP 7
+.B EACCES
+Search permission is denied for a component of the path prefix.
+.TP 7
+.B EIO
+An error occurred while reading from the file system.
+.TP 7
+.B ELOOP
+A loop exists in symbolic links encountered during resolution of the
+\fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+The length of the \fIpath\fP argument exceeds {PATH_MAX} or a pathname
+component is longer than {NAME_MAX}.
+.TP 7
+.B ENOENT
+A component of \fIpath\fP does not name an existing file or \fIpath\fP
+is an empty string.
+.TP 7
+.B ENOTDIR
+A component of the path prefix is not a directory.
+.TP 7
+.B EOVERFLOW
+The file size in bytes or the number of blocks allocated to the file
+or the file serial number cannot be represented correctly
+in the structure pointed to by \fIbuf\fP.
+.sp
+.LP
+The \fIstat\fP() function may fail if:
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the \fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+As a result of encountering a symbolic link in resolution of the \fIpath\fP
+argument, the length of the substituted pathname
+string exceeded {PATH_MAX}.
+.TP 7
+.B EOVERFLOW
+A value to be stored would overflow one of the members of the \fBstat\fP
+structure.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Obtaining File Status Information
+.LP
+The following example shows how to obtain file status information
+for a file named \fB/home/cnd/mod1\fP. The structure variable
+\fIbuffer\fP is defined for the \fBstat\fP structure.
+.sp
+.RS
+.nf
+
+\fB#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+.sp
+
+struct stat buffer;
+int status;
+\&...
+status = stat("/home/cnd/mod1", &buffer);
+\fP
+.fi
+.RE
+.SS Getting Directory Information
+.LP
+The following example fragment gets status information for each entry
+in a directory. The call to the \fIstat\fP() function
+stores file information in the \fBstat\fP structure pointed to by
+\fIstatbuf\fP. The lines that follow the \fIstat\fP() call
+format the fields in the \fBstat\fP structure for presentation to
+the user of the program.
+.sp
+.RS
+.nf
+
+\fB#include <sys/types.h>
+#include <sys/stat.h>
+#include <dirent.h>
+#include <pwd.h>
+#include <grp.h>
+#include <time.h>
+#include <locale.h>
+#include <langinfo.h>
+#include <stdio.h>
+#include <stdint.h>
+.sp
+
+struct dirent *dp;
+struct stat statbuf;
+struct passwd *pwd;
+struct group *grp;
+struct tm *tm;
+char datestring[256];
+\&...
+/* Loop through directory entries. */
+while ((dp = readdir(dir)) != NULL) {
+.sp
+
+ /* Get entry's information. */
+ if (stat(dp->d_name, &statbuf) == -1)
+ continue;
+.sp
+
+ /* Print out type, permissions, and number of links. */
+ printf("%10.10s", sperm (statbuf.st_mode));
+ printf("%4d", statbuf.st_nlink);
+.sp
+
+ /* Print out owner's name if it is found using getpwuid(). */
+ if ((pwd = getpwuid(statbuf.st_uid)) != NULL)
+ printf(" %-8.8s", pwd->pw_name);
+ else
+ printf(" %-8d", statbuf.st_uid);
+.sp
+
+ /* Print out group name if it is found using getgrgid(). */
+ if ((grp = getgrgid(statbuf.st_gid)) != NULL)
+ printf(" %-8.8s", grp->gr_name);
+ else
+ printf(" %-8d", statbuf.st_gid);
+.sp
+
+ /* Print size of file. */
+ printf(" %9jd", (intmax_t)statbuf.st_size);
+.sp
+
+ tm = localtime(&statbuf.st_mtime);
+.sp
+
+ /* Get localized date string. */
+ strftime(datestring, sizeof(datestring), nl_langinfo(D_T_FMT), tm);
+.sp
+
+ printf(" %s %s\\n", datestring, dp->d_name);
+}
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The intent of the paragraph describing "additional or alternate file
+access control mechanisms" is to allow a secure
+implementation where a process with a label that does not dominate
+the file's label cannot perform a \fIstat\fP() function. This
+is not related to read permission; a process with a label that dominates
+the file's label does not need read permission. An
+implementation that supports write-up operations could fail \fIfstat\fP()
+function calls
+even though it has a valid file descriptor open for writing.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfstat\fP(), \fIlstat\fP(), \fIreadlink\fP(), \fIsymlink\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<sys/stat.h>\fP, \fI<sys/types.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/statvfs.3p b/man-pages-posix-2003/man3p/statvfs.3p
new file mode 100644
index 0000000..2ab444b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/statvfs.3p
@@ -0,0 +1,174 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FSTATVFS" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fstatvfs
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fstatvfs, statvfs \- get file system information
+.SH SYNOPSIS
+.LP
+\fB#include <sys/statvfs.h>
+.br
+.sp
+int fstatvfs(int\fP \fIfildes\fP\fB, struct statvfs *\fP\fIbuf\fP\fB);
+.br
+int statvfs(const char *restrict\fP \fIpath\fP\fB, struct statvfs
+*restrict\fP \fIbuf\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfstatvfs\fP() function shall obtain information about the file
+system containing the file referenced by
+\fIfildes\fP.
+.LP
+The \fIstatvfs\fP() function shall obtain information about the file
+system containing the file named by \fIpath\fP.
+.LP
+For both functions, the \fIbuf\fP argument is a pointer to a \fBstatvfs\fP
+structure that shall be filled. Read, write, or
+execute permission of the named file is not required.
+.LP
+The following flags can be returned in the \fIf_flag\fP member:
+.TP 7
+ST_RDONLY
+Read-only file system.
+.TP 7
+ST_NOSUID
+Setuid/setgid bits ignored by \fIexec\fP.
+.sp
+.LP
+It is unspecified whether all members of the \fBstatvfs\fP structure
+have meaningful values on all file systems.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIstatvfs\fP() shall return 0. Otherwise,
+it shall return -1 and set \fIerrno\fP to indicate the
+error.
+.SH ERRORS
+.LP
+The \fIfstatvfs\fP() and \fIstatvfs\fP() functions shall fail if:
+.TP 7
+.B EIO
+An I/O error occurred while reading the file system.
+.TP 7
+.B EINTR
+A signal was caught during execution of the function.
+.TP 7
+.B EOVERFLOW
+One of the values to be returned cannot be represented correctly in
+the structure pointed to by \fIbuf\fP.
+.sp
+.LP
+The \fIfstatvfs\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not an open file descriptor.
+.sp
+.LP
+The \fIstatvfs\fP() function shall fail if:
+.TP 7
+.B EACCES
+Search permission is denied on a component of the path prefix.
+.TP 7
+.B ELOOP
+A loop exists in symbolic links encountered during resolution of the
+\fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+The length of a pathname exceeds {PATH_MAX} or a pathname component
+is longer than {NAME_MAX}.
+.TP 7
+.B ENOENT
+A component of \fIpath\fP does not name an existing file or \fIpath\fP
+is an empty string.
+.TP 7
+.B ENOTDIR
+A component of the path prefix of \fIpath\fP is not a directory.
+.sp
+.LP
+The \fIstatvfs\fP() function may fail if:
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the \fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+Pathname resolution of a symbolic link produced an intermediate result
+whose length exceeds {PATH_MAX}.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Obtaining File System Information Using fstatvfs()
+.LP
+The following example shows how to obtain file system information
+for the file system upon which the file named
+\fB/home/cnd/mod1\fP resides, using the \fIfstatvfs\fP() function.
+The \fB/home/cnd/mod1\fP file is opened with read/write
+privileges and the open file descriptor is passed to the \fIfstatvfs\fP()
+function.
+.sp
+.RS
+.nf
+
+\fB#include <statvfs.h>
+#include <fcntl.h>
+.sp
+
+struct statvfs buffer;
+int status;
+\&...
+fildes = open("/home/cnd/mod1", O_RDWR);
+status = fstatvfs(fildes, &buffer);
+\fP
+.fi
+.RE
+.SS Obtaining File System Information Using statvfs()
+.LP
+The following example shows how to obtain file system information
+for the file system upon which the file named
+\fB/home/cnd/mod1\fP resides, using the \fIstatvfs\fP() function.
+.sp
+.RS
+.nf
+
+\fB#include <statvfs.h>
+.sp
+
+struct statvfs buffer;
+int status;
+\&...
+status = statvfs("/home/cnd/mod1", &buffer);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIchmod\fP(), \fIchown\fP(), \fIcreat\fP(), \fIdup\fP(), \fIexec\fP(),
+\fIfcntl\fP(), \fIlink\fP(), \fImknod\fP(), \fIopen\fP(), \fIpipe\fP(),
+\fIread\fP(), \fItime\fP(), \fIunlink\fP(), \fIutime\fP(), \fIwrite\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<sys/statvfs.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/stderr.3p b/man-pages-posix-2003/man3p/stderr.3p
new file mode 100644
index 0000000..ce7d4f1
--- /dev/null
+++ b/man-pages-posix-2003/man3p/stderr.3p
@@ -0,0 +1 @@
+.so man3p/stdin.3p
diff --git a/man-pages-posix-2003/man3p/stdin.3p b/man-pages-posix-2003/man3p/stdin.3p
new file mode 100644
index 0000000..bc1d681
--- /dev/null
+++ b/man-pages-posix-2003/man3p/stdin.3p
@@ -0,0 +1,92 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "STDIN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" stdin
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+stderr, stdin, stdout \- standard I/O streams
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+extern FILE *stderr, *stdin, *stdout;
+.br
+\fP
+.SH DESCRIPTION
+.LP
+A file with associated buffering is called a \fIstream\fP and is declared
+to be a pointer to a defined type \fBFILE\fP. The \fIfopen\fP() function
+shall create certain descriptive data for a stream and return a pointer
+to designate the stream in all further transactions. Normally, there
+are three open streams with constant pointers declared in the
+\fI<stdio.h>\fP header and associated with the standard open files.
+.LP
+At program start-up, three streams shall be predefined and need not
+be opened explicitly: \fIstandard input\fP (for reading
+conventional input), \fIstandard output\fP (for writing conventional
+output), and \fIstandard error\fP (for writing diagnostic
+output). When opened, the standard error stream is not fully buffered;
+the standard input and standard output streams are fully
+buffered if and only if the stream can be determined not to refer
+to an interactive device.
+.LP
+The
+following symbolic values in \fI<unistd.h>\fP define the file descriptors
+that shall
+be associated with the C-language \fIstdin\fP, \fIstdout\fP, and \fIstderr\fP
+when the application is started:
+.TP 7
+STDIN_FILENO
+Standard input value, \fIstdin\fP. Its value is 0.
+.TP 7
+STDOUT_FILENO
+Standard output value, \fIstdout\fP. Its value is 1.
+.TP 7
+STDERR_FILENO
+Standard error value, \fIstderr\fP. Its value is 2.
+.sp
+.LP
+The \fIstderr\fP stream is expected to be open for reading and writing.
+.SH RETURN VALUE
+.LP
+None.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfclose\fP(), \fIfeof\fP(), \fIferror\fP(),
+\fIfileno\fP(), \fIfopen\fP(), \fIfread\fP(), \fIfseek\fP(), \fIgetc\fP(),
+\fIgets\fP(), \fIpopen\fP(), \fIprintf\fP(), \fIputc\fP(), \fIputs\fP(),
+\fIread\fP(), \fIscanf\fP(), \fIsetbuf\fP(), \fIsetvbuf\fP(),
+\fItmpfile\fP(), \fIungetc\fP(), \fIvprintf\fP(), the Base Definitions
+volume of
+IEEE\ Std\ 1003.1-2001, \fI<stdio.h>\fP, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/stdout.3p b/man-pages-posix-2003/man3p/stdout.3p
new file mode 100644
index 0000000..ce7d4f1
--- /dev/null
+++ b/man-pages-posix-2003/man3p/stdout.3p
@@ -0,0 +1 @@
+.so man3p/stdin.3p
diff --git a/man-pages-posix-2003/man3p/strcasecmp.3p b/man-pages-posix-2003/man3p/strcasecmp.3p
new file mode 100644
index 0000000..64d6a30
--- /dev/null
+++ b/man-pages-posix-2003/man3p/strcasecmp.3p
@@ -0,0 +1,77 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "STRCASECMP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" strcasecmp
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+strcasecmp, strncasecmp \- case-insensitive string comparisons
+.SH SYNOPSIS
+.LP
+\fB#include <strings.h>
+.br
+.sp
+int strcasecmp(const char *\fP\fIs1\fP\fB, const char *\fP\fIs2\fP\fB);
+.br
+int strncasecmp(const char *\fP\fIs1\fP\fB, const char *\fP\fIs2\fP\fB,
+size_t\fP \fIn\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIstrcasecmp\fP() function shall compare, while ignoring differences
+in case, the string pointed to by \fIs1\fP to the
+string pointed to by \fIs2\fP. The \fIstrncasecmp\fP() function shall
+compare, while ignoring differences in case, not more than
+\fIn\fP bytes from the string pointed to by \fIs1\fP to the string
+pointed to by \fIs2\fP.
+.LP
+In the POSIX locale, \fIstrcasecmp\fP() and \fIstrncasecmp\fP() shall
+behave as if the strings had been converted to lowercase
+and then a byte comparison performed. The results are unspecified
+in other locales.
+.SH RETURN VALUE
+.LP
+Upon completion, \fIstrcasecmp\fP() shall return an integer greater
+than, equal to, or less than 0, if the string pointed to by
+\fIs1\fP is, ignoring case, greater than, equal to, or less than the
+string pointed to by \fIs2\fP, respectively.
+.LP
+Upon successful completion, \fIstrncasecmp\fP() shall return an integer
+greater than, equal to, or less than 0, if the possibly
+null-terminated array pointed to by \fIs1\fP is, ignoring case, greater
+than, equal to, or less than the possibly null-terminated
+array pointed to by \fIs2\fP, respectively.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<strings.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/strcat.3p b/man-pages-posix-2003/man3p/strcat.3p
new file mode 100644
index 0000000..b97c384
--- /dev/null
+++ b/man-pages-posix-2003/man3p/strcat.3p
@@ -0,0 +1,64 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "STRCAT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" strcat
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+strcat \- concatenate two strings
+.SH SYNOPSIS
+.LP
+\fB#include <string.h>
+.br
+.sp
+char *strcat(char *restrict\fP \fIs1\fP\fB, const char *restrict\fP
+\fIs2\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIstrcat\fP() function shall append a copy of the string pointed
+to by \fIs2\fP (including the terminating null byte) to
+the end of the string pointed to by \fIs1\fP. The initial byte of
+\fIs2\fP overwrites the null byte at the end of \fIs1\fP. If
+copying takes place between objects that overlap, the behavior is
+undefined.
+.SH RETURN VALUE
+.LP
+The \fIstrcat\fP() function shall return \fIs1\fP; no return value
+is reserved to indicate an error.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+This issue is aligned with the ISO\ C standard; this does not affect
+compatibility with XPG3 applications. Reliable error
+detection by this function was never guaranteed.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIstrncat\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<string.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/strchr.3p b/man-pages-posix-2003/man3p/strchr.3p
new file mode 100644
index 0000000..cd45f3b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/strchr.3p
@@ -0,0 +1,59 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "STRCHR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" strchr
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+strchr \- string scanning operation
+.SH SYNOPSIS
+.LP
+\fB#include <string.h>
+.br
+.sp
+char *strchr(const char *\fP\fIs\fP\fB, int\fP \fIc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIstrchr\fP() function shall locate the first occurrence of \fIc\fP
+(converted to a \fBchar\fP) in the string pointed to
+by \fIs\fP. The terminating null byte is considered to be part of
+the string.
+.SH RETURN VALUE
+.LP
+Upon completion, \fIstrchr\fP() shall return a pointer to the byte,
+or a null pointer if the byte was not found.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIstrrchr\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<string.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/strcmp.3p b/man-pages-posix-2003/man3p/strcmp.3p
new file mode 100644
index 0000000..64a476f
--- /dev/null
+++ b/man-pages-posix-2003/man3p/strcmp.3p
@@ -0,0 +1,105 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "STRCMP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" strcmp
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+strcmp \- compare two strings
+.SH SYNOPSIS
+.LP
+\fB#include <string.h>
+.br
+.sp
+int strcmp(const char *\fP\fIs1\fP\fB, const char *\fP\fIs2\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIstrcmp\fP() function shall compare the string pointed to by
+\fIs1\fP to the string pointed to by \fIs2\fP.
+.LP
+The sign of a non-zero return value shall be determined by the sign
+of the difference between the values of the first pair of
+bytes (both interpreted as type \fBunsigned char\fP) that differ in
+the strings being compared.
+.SH RETURN VALUE
+.LP
+Upon completion, \fIstrcmp\fP() shall return an integer greater than,
+equal to, or less than 0, if the string pointed to by
+\fIs1\fP is greater than, equal to, or less than the string pointed
+to by \fIs2\fP, respectively.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Checking a Password Entry
+.LP
+The following example compares the information read from standard
+input to the value of the name of the user entry. If the
+\fIstrcmp\fP() function returns 0 (indicating a match), a further
+check will be made to see if the user entered the proper old
+password. The \fIcrypt\fP() function shall encrypt the old password
+entered by the user,
+using the value of the encrypted password in the \fBpasswd\fP structure
+as the salt. If this value matches the value of the
+encrypted \fBpasswd\fP in the structure, the entered password \fIoldpasswd\fP
+is the correct user's password. Finally, the
+program encrypts the new password so that it can store the information
+in the \fBpasswd\fP structure.
+.sp
+.RS
+.nf
+
+\fB#include <string.h>
+#include <unistd.h>
+#include <stdio.h>
+\&...
+int valid_change;
+struct passwd *p;
+char user[100];
+char oldpasswd[100];
+char newpasswd[100];
+char savepasswd[100];
+\&...
+if (strcmp(p->pw_name, user) == 0) {
+ if (strcmp(p->pw_passwd, crypt(oldpasswd, p->pw_passwd)) == 0) {
+ strcpy(savepasswd, crypt(newpasswd, user));
+ p->pw_passwd = savepasswd;
+ valid_change = 1;
+ }
+ else {
+ fprintf(stderr, "Old password is not valid\\n");
+ }
+}
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIstrncmp\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<string.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/strcoll.3p b/man-pages-posix-2003/man3p/strcoll.3p
new file mode 100644
index 0000000..8a50d73
--- /dev/null
+++ b/man-pages-posix-2003/man3p/strcoll.3p
@@ -0,0 +1,101 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "STRCOLL" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" strcoll
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+strcoll \- string comparison using collating information
+.SH SYNOPSIS
+.LP
+\fB#include <string.h>
+.br
+.sp
+int strcoll(const char *\fP\fIs1\fP\fB, const char *\fP\fIs2\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIstrcoll\fP() function shall compare the string pointed to by
+\fIs1\fP to the string pointed to by \fIs2\fP, both
+interpreted as appropriate to the \fILC_COLLATE\fP category of the
+current locale.
+.LP
+The
+\fIstrcoll\fP() function shall not change the setting of \fIerrno\fP
+if successful.
+.LP
+Since no return value is reserved to indicate an error, an application
+wishing to check for error situations should set
+\fIerrno\fP to 0, then call \fIstrcoll\fP(), then check \fIerrno\fP.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIstrcoll\fP() shall return an integer
+greater than, equal to, or less than 0, according to
+whether the string pointed to by \fIs1\fP is greater than, equal to,
+or less than the string pointed to by \fIs2\fP when both are
+interpreted as appropriate to the current locale. On error, \fIstrcoll\fP()
+may set \fIerrno\fP, but no return
+value is reserved to indicate an error.
+.SH ERRORS
+.LP
+The \fIstrcoll\fP() function may fail if:
+.TP 7
+.B EINVAL
+The \fIs1\fP or \fIs2\fP arguments contain characters outside the
+domain of the collating sequence.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Comparing Nodes
+.LP
+The following example uses an application-defined function, \fInode_compare\fP(),
+to compare two nodes based on an alphabetical
+ordering of the \fIstring\fP field.
+.sp
+.RS
+.nf
+
+\fB#include <string.h>
+\&...
+struct node { /* These are stored in the table. */
+ char *string;
+ int length;
+};
+\&...
+int node_compare(const void *node1, const void *node2)
+{
+ return strcoll(((const struct node *)node1)->string,
+ ((const struct node *)node2)->string);
+}
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The \fIstrxfrm\fP() and \fIstrcmp\fP()
+functions should be used for sorting large lists.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIstrcmp\fP(), \fIstrxfrm\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<string.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/strcpy.3p b/man-pages-posix-2003/man3p/strcpy.3p
new file mode 100644
index 0000000..48af7a4
--- /dev/null
+++ b/man-pages-posix-2003/man3p/strcpy.3p
@@ -0,0 +1,124 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "STRCPY" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" strcpy
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+strcpy \- copy a string
+.SH SYNOPSIS
+.LP
+\fB#include <string.h>
+.br
+.sp
+char *strcpy(char *restrict\fP \fIs1\fP\fB, const char *restrict\fP
+\fIs2\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIstrcpy\fP() function shall copy the string pointed to by \fIs2\fP
+(including the terminating null byte) into the array
+pointed to by \fIs1\fP. If copying takes place between objects that
+overlap, the behavior is undefined.
+.SH RETURN VALUE
+.LP
+The \fIstrcpy\fP() function shall return \fIs1\fP; no return value
+is reserved to indicate an error.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Initializing a String
+.LP
+The following example copies the string \fB"----------"\fP into the
+\fIpermstring\fP variable.
+.sp
+.RS
+.nf
+
+\fB#include <string.h>
+\&...
+static char permstring[11];
+\&...
+strcpy(permstring, "----------");
+\&...
+\fP
+.fi
+.RE
+.SS Storing a Key and Data
+.LP
+The following example allocates space for a key using \fImalloc\fP()
+then uses
+\fIstrcpy\fP() to place the key there. Then it allocates space for
+data using \fImalloc\fP(), and uses \fIstrcpy\fP() to place data there.
+(The user-defined function
+\fIdbfree\fP() frees memory previously allocated to an array of type
+\fBstruct element *\fP.)
+.sp
+.RS
+.nf
+
+\fB#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+\&...
+/* Structure used to read data and store it. */
+struct element {
+ char *key;
+ char *data;
+};
+.sp
+
+struct element *tbl, *curtbl;
+char *key, *data;
+int count;
+\&...
+void dbfree(struct element *, int);
+\&...
+if ((curtbl->key = malloc(strlen(key) + 1)) == NULL) {
+ perror("malloc"); dbfree(tbl, count); return NULL;
+}
+strcpy(curtbl->key, key);
+.sp
+
+if ((curtbl->data = malloc(strlen(data) + 1)) == NULL) {
+ perror("malloc"); free(curtbl->key); dbfree(tbl, count); return NULL;
+}
+strcpy(curtbl->data, data);
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+Character movement is performed differently in different implementations.
+Thus, overlapping moves may yield surprises.
+.LP
+This issue is aligned with the ISO\ C standard; this does not affect
+compatibility with XPG3 applications. Reliable error
+detection by this function was never guaranteed.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIstrncpy\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<string.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/strcspn.3p b/man-pages-posix-2003/man3p/strcspn.3p
new file mode 100644
index 0000000..cb59d0f
--- /dev/null
+++ b/man-pages-posix-2003/man3p/strcspn.3p
@@ -0,0 +1,60 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "STRCSPN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" strcspn
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+strcspn \- get the length of a complementary substring
+.SH SYNOPSIS
+.LP
+\fB#include <string.h>
+.br
+.sp
+size_t strcspn(const char *\fP\fIs1\fP\fB, const char *\fP\fIs2\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIstrcspn\fP() function shall compute the length (in bytes) of
+the maximum initial segment of the string pointed to by
+\fIs1\fP which consists entirely of bytes \fInot\fP from the string
+pointed to by \fIs2\fP.
+.SH RETURN VALUE
+.LP
+The \fIstrcspn\fP() function shall return the length of the computed
+segment of the string pointed to by \fIs1\fP; no return
+value is reserved to indicate an error.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIstrspn\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<string.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/strdup.3p b/man-pages-posix-2003/man3p/strdup.3p
new file mode 100644
index 0000000..da51f29
--- /dev/null
+++ b/man-pages-posix-2003/man3p/strdup.3p
@@ -0,0 +1,66 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "STRDUP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" strdup
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+strdup \- duplicate a string
+.SH SYNOPSIS
+.LP
+\fB#include <string.h>
+.br
+.sp
+char *strdup(const char *\fP\fIs1\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIstrdup\fP() function shall return a pointer to a new string,
+which is a duplicate of the string pointed to by \fIs1\fP.
+The returned pointer can be passed to \fIfree\fP(). A null pointer
+is returned if the new
+string cannot be created.
+.SH RETURN VALUE
+.LP
+The \fIstrdup\fP() function shall return a pointer to a new string
+on success. Otherwise, it shall return a null pointer and
+set \fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fIstrdup\fP() function may fail if:
+.TP 7
+.B ENOMEM
+Storage space available is insufficient.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfree\fP(), \fImalloc\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<string.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/strerror.3p b/man-pages-posix-2003/man3p/strerror.3p
new file mode 100644
index 0000000..a1e0d1a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/strerror.3p
@@ -0,0 +1,118 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "STRERROR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" strerror
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+strerror, strerror_r \- get error message string
+.SH SYNOPSIS
+.LP
+\fB#include <string.h>
+.br
+.sp
+char *strerror(int\fP \fIerrnum\fP\fB);
+.br
+\fP
+.LP
+\fBint strerror_r(int\fP \fIerrnum\fP\fB, char *\fP\fIstrerrbuf\fP\fB,
+size_t\fP
+\fIbuflen\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+For \fIstrerror\fP(): The functionality described on this reference
+page is aligned with the ISO\ C standard. Any
+conflict between the requirements described here and the ISO\ C standard
+is unintentional. This volume of
+IEEE\ Std\ 1003.1-2001 defers to the ISO\ C standard.
+.LP
+The \fIstrerror\fP() function shall map the error number in \fIerrnum\fP
+to a locale-dependent error message string and shall
+return a pointer to it. Typically, the values for \fIerrnum\fP come
+from \fIerrno\fP, but \fIstrerror\fP() shall map any value
+of type \fBint\fP to a message.
+.LP
+The string pointed to shall not be modified by the application, but
+may be overwritten by a subsequent call to \fIstrerror\fP()
+\ or \fIperror\fP().
+.LP
+The
+contents of the error message strings returned by \fIstrerror\fP()
+should be determined by the setting of the \fILC_MESSAGES\fP
+category in the current locale.
+.LP
+The implementation shall behave as if no function defined in this
+volume of IEEE\ Std\ 1003.1-2001 calls
+\fIstrerror\fP().
+.LP
+The
+\fIstrerror\fP() function shall not change the setting of \fIerrno\fP
+if successful.
+.LP
+Since no return value is reserved to indicate an error, an application
+wishing to check for error situations should set
+\fIerrno\fP to 0, then call \fIstrerror\fP(), then check \fIerrno\fP.
+.LP
+The \fIstrerror\fP() function need not be reentrant. A function that
+is not required to be reentrant is not required to be
+thread-safe.
+.LP
+The \fIstrerror_r\fP() function shall map the error number in \fIerrnum\fP
+to a locale-dependent error message string and shall
+return the string in the buffer pointed to by \fIstrerrbuf\fP, with
+length \fIbuflen\fP.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIstrerror\fP() shall return a pointer
+to the generated message string. On error \fIerrno\fP may
+be set, but no return value is reserved to indicate an error.
+.LP
+Upon successful completion, \fIstrerror_r\fP() shall return 0. Otherwise,
+an error number shall be returned to indicate the error.
+.SH ERRORS
+.LP
+These functions may fail if:
+.TP 7
+.B EINVAL
+The value of \fIerrnum\fP is not a valid error number.
+.sp
+.LP
+The \fIstrerror_r\fP() function may fail if:
+.TP 7
+.B ERANGE
+Insufficient storage was supplied via \fIstrerrbuf\fP and \fIbuflen\fP
+to contain the generated message string.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIperror\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<string.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/strerror_r.3p b/man-pages-posix-2003/man3p/strerror_r.3p
new file mode 100644
index 0000000..d1f57d7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/strerror_r.3p
@@ -0,0 +1 @@
+.so man3p/strerror.3p
diff --git a/man-pages-posix-2003/man3p/strfmon.3p b/man-pages-posix-2003/man3p/strfmon.3p
new file mode 100644
index 0000000..70ebac3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/strfmon.3p
@@ -0,0 +1,288 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "STRFMON" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" strfmon
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+strfmon \- convert monetary value to a string
+.SH SYNOPSIS
+.LP
+\fB#include <monetary.h>
+.br
+.sp
+ssize_t strfmon(char *restrict\fP \fIs\fP\fB, size_t\fP \fImaxsize\fP\fB,
+.br
+\ \ \ \ \ \ const char *restrict\fP \fIformat\fP\fB, ...); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIstrfmon\fP() function shall place characters into the array
+pointed to by \fIs\fP as controlled by the string pointed
+to by \fIformat\fP. No more than \fImaxsize\fP bytes are placed into
+the array.
+.LP
+The format is a character string, beginning and ending in its initial
+state, if any, that contains two types of objects:
+\fIplain characters\fP, which are simply copied to the output stream,
+and \fIconversion specifications\fP, each of which shall
+result in the fetching of zero or more arguments which are converted
+and formatted. The results are undefined if there are
+insufficient arguments for the format. If the format is exhausted
+while arguments remain, the excess arguments are simply
+ignored.
+.LP
+The application shall ensure that a conversion specification consists
+of the following sequence:
+.IP " *" 3
+A \fB'%'\fP character
+.LP
+.IP " *" 3
+Optional flags
+.LP
+.IP " *" 3
+Optional field width
+.LP
+.IP " *" 3
+Optional left precision
+.LP
+.IP " *" 3
+Optional right precision
+.LP
+.IP " *" 3
+A required conversion specifier character that determines the conversion
+to be performed
+.LP
+.SS Flags
+.LP
+One or more of the following optional flags can be specified to control
+the conversion:
+.TP 7
+\fB=\fP\fIf\fP
+An \fB'='\fP followed by a single character \fIf\fP which is used
+as the numeric fill character. In order to work with
+precision or width counts, the fill character shall be a single byte
+character; if not, the behavior is undefined. The default
+numeric fill character is the <space>. This flag does not affect field
+width filling which always uses the <space>.
+This flag is ignored unless a left precision (see below) is specified.
+.TP 7
+\fB^\fP
+Do not format the currency amount with grouping characters. The default
+is to insert the grouping characters if defined for the
+current locale.
+.TP 7
+\fB+\fP\ or\ \fB(\fP
+Specify the style of representing positive and negative currency amounts.
+Only one of \fB'+'\fP or \fB'('\fP may be
+specified. If \fB'+'\fP is specified, the locale's equivalent of \fB'+'\fP
+and \fB'-'\fP are used (for example, in the
+U.S., the empty string if positive and \fB'-'\fP if negative). If
+\fB'('\fP is specified, negative amounts are enclosed
+within parentheses. If neither flag is specified, the \fB'+'\fP style
+is used.
+.TP 7
+\fB!\fP
+Suppress the currency symbol from the output conversion.
+.TP 7
+\fB-\fP
+Specify the alignment. If this flag is present the result of the conversion
+is left-justified (padded to the right) rather than
+right-justified. This flag shall be ignored unless a field width (see
+below) is specified.
+.sp
+.SS Field Width
+.TP 7
+\fIw\fP
+A decimal digit string \fIw\fP specifying a minimum field width in
+bytes in which the result of the conversion is
+right-justified (or left-justified if the flag \fB'-'\fP is specified).
+The default is 0.
+.sp
+.SS Left Precision
+.TP 7
+\fB#\fP\fIn\fP
+A \fB'#'\fP followed by a decimal digit string \fIn\fP specifying
+a maximum number of digits expected to be formatted to
+the left of the radix character. This option can be used to keep the
+formatted output from multiple calls to the \fIstrfmon\fP()
+function aligned in the same columns. It can also be used to fill
+unused positions with a special character as in
+\fB"$***123.45"\fP . This option causes an amount to be formatted
+as if it has the number of digits specified by \fIn\fP. If
+more than \fIn\fP digit positions are required, this conversion specification
+is ignored. Digit positions in excess of those
+actually required are filled with the numeric fill character (see
+the \fB=\fP\fIf\fP flag above).
+.LP
+If grouping has not been suppressed with the \fB'^'\fP flag, and it
+is defined for the current locale, grouping separators
+are inserted before the fill characters (if any) are added. Grouping
+separators are not applied to fill characters even if the fill
+character is a digit.
+.LP
+To ensure alignment, any characters appearing before or after the
+number in the formatted output such as currency or sign
+symbols are padded as necessary with <space>s to make their positive
+and negative formats an equal length.
+.sp
+.SS Right Precision
+.TP 7
+\fB\&.\fP\fIp\fP
+A period followed by a decimal digit string \fIp\fP specifying the
+number of digits after the radix character. If the value of
+the right precision \fIp\fP is 0, no radix character appears. If a
+right precision is not included, a default specified by the
+current locale is used. The amount being formatted is rounded to the
+specified number of digits prior to formatting.
+.sp
+.SS Conversion Specifier Characters
+.LP
+The conversion specifier characters and their meanings are:
+.TP 7
+\fBi\fP
+The \fBdouble\fP argument is formatted according to the locale's international
+currency format (for example, in the U.S.: USD
+1,234.56). If the argument is \(+-Inf or NaN, the result of the conversion
+is unspecified.
+.TP 7
+\fBn\fP
+The \fBdouble\fP argument is formatted according to the locale's national
+currency format (for example, in the U.S.:
+$1,234.56). If the argument is \(+-Inf or NaN, the result of the conversion
+is unspecified.
+.TP 7
+\fB%\fP
+Convert to a \fB'%'\fP ; no argument is converted. The entire conversion
+specification shall be \fB%%\fP .
+.sp
+.SS Locale Information
+.LP
+The \fILC_MONETARY\fP category of the program's locale affects the
+behavior of this function including the monetary radix
+character (which may be different from the numeric radix character
+affected by the \fILC_NUMERIC\fP category), the grouping
+separator, the currency symbols, and formats. The international currency
+symbol should be conformant with the ISO\ 4217:1995
+standard.
+.LP
+If the value of \fImaxsize\fP is greater than {SSIZE_MAX}, the result
+is implementation-defined.
+.SH RETURN VALUE
+.LP
+If the total number of resulting bytes including the terminating null
+byte is not more than \fImaxsize\fP, \fIstrfmon\fP()
+shall return the number of bytes placed into the array pointed to
+by \fIs\fP, not including the terminating null byte. Otherwise,
+-1 shall be returned, the contents of the array are unspecified, and
+\fIerrno\fP shall be set to indicate the error.
+.SH ERRORS
+.LP
+The \fIstrfmon\fP() function shall fail if:
+.TP 7
+.B E2BIG
+Conversion stopped due to lack of space in the buffer.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+Given a locale for the U.S. and the values 123.45, -123.45, and 3456.781,
+the following output might be produced. Square
+brackets ( \fB"[]"\fP ) are used in this example to delimit the output.
+.sp
+.RS
+.nf
+
+\fB%n [$123.45] \fP Default formatting
+\fB [-$123.45]
+ [$3,456.78]
+.sp
+
+%11n [ $123.45] \fP Right align within an 11-character field
+\fB [ -$123.45]
+ [ $3,456.78]
+.sp
+
+%#5n [ $ 123.45] \fP Aligned columns for values up to 99999
+\fB [-$ 123.45]
+ [ $ 3,456.78]
+.sp
+
+%=*#5n [ $***123.45] \fP Specify a fill character
+\fB [-$***123.45]
+ [ $*3,456.78]
+.sp
+
+%=0#5n [ $000123.45] \fP Fill characters do not use grouping
+\fB [-$000123.45] \fP even if the fill character is a digit
+\fB [ $03,456.78]
+.sp
+
+%^#5n [ $ 123.45] \fP Disable the grouping separator
+\fB [-$ 123.45]
+ [ $ 3456.78]
+.sp
+
+%^#5.0n [ $ 123] \fP Round off to whole units
+\fB [-$ 123]
+ [ $ 3457]
+.sp
+
+%^#5.4n [ $ 123.4500] \fP Increase the precision
+\fB [-$ 123.4500]
+ [ $ 3456.7810]
+.sp
+
+%(#5n [$ 123.45] \fP Use an alternative pos/neg style
+\fB [($ 123.45)]
+ [$ 3,456.78]
+.sp
+
+%!(#5n [ 123.45] \fP Disable the currency symbol
+\fB [( 123.45)]
+ [ 3,456.78]
+.sp
+
+%-14#5.4n [ $ 123.4500 ] \fP Left-justify the output
+\fB [-$ 123.4500 ]
+ [ $ 3,456.7810 ]
+.sp
+
+%14#5.4n [ $ 123.4500] \fP Corresponding right-justified output
+\fB [ -$ 123.4500]
+ [ $ 3,456.7810]
+\fP
+.fi
+.RE
+.LP
+See also the EXAMPLES section in \fIfprintf\fP().
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+Lowercase conversion characters are reserved for future standards
+use and uppercase for implementation-defined use.
+.SH SEE ALSO
+.LP
+\fIfprintf\fP(), \fIlocaleconv\fP(), the Base Definitions volume
+of
+IEEE\ Std\ 1003.1-2001, \fI<monetary.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/strftime.3p b/man-pages-posix-2003/man3p/strftime.3p
new file mode 100644
index 0000000..7068b57
--- /dev/null
+++ b/man-pages-posix-2003/man3p/strftime.3p
@@ -0,0 +1,434 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "STRFTIME" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" strftime
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+strftime \- convert date and time to a string
+.SH SYNOPSIS
+.LP
+\fB#include <time.h>
+.br
+.sp
+size_t strftime(char *restrict\fP \fIs\fP\fB, size_t\fP \fImaxsize\fP\fB,
+.br
+\ \ \ \ \ \ const char *restrict\fP \fIformat\fP\fB, const struct
+tm *restrict\fP
+\fItimeptr\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIstrftime\fP() function shall place bytes into the array pointed
+to by \fIs\fP as controlled by the string pointed to by
+\fIformat\fP. The format is a character string, beginning and ending
+in its initial shift state, if any. The \fIformat\fP string
+consists of zero or more conversion specifications and ordinary characters.
+A conversion specification consists of a \fB'%'\fP
+character, possibly followed by an \fBE\fP or \fBO\fP modifier, and
+a terminating conversion specifier character that
+determines the conversion specification's behavior. All ordinary characters
+(including the terminating null byte) are copied
+unchanged into the array. If copying takes place between objects that
+overlap, the behavior is undefined. No more than
+\fImaxsize\fP bytes are placed into the array. Each conversion specifier
+is replaced by appropriate characters as described in the
+following list. The appropriate characters are determined using the
+\fILC_TIME\fP category of the current locale and by the values
+of zero or more members of the broken-down time structure pointed
+to by \fItimeptr\fP, as specified in brackets in the
+description. If any of the specified values are outside the normal
+range, the characters stored are unspecified.
+.LP
+Local timezone information is used as though \fIstrftime\fP() called
+\fItzset\fP().
+.LP
+The following conversion specifications are supported:
+.TP 7
+\fB%a\fP
+Replaced by the locale's abbreviated weekday name. [ \fItm_wday\fP]
+.TP 7
+\fB%A\fP
+Replaced by the locale's full weekday name. [ \fItm_wday\fP]
+.TP 7
+\fB%b\fP
+Replaced by the locale's abbreviated month name. [ \fItm_mon\fP]
+.TP 7
+\fB%B\fP
+Replaced by the locale's full month name. [ \fItm_mon\fP]
+.TP 7
+\fB%c\fP
+Replaced by the locale's appropriate date and time representation.
+(See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<time.h>\fP.)
+.TP 7
+\fB%C\fP
+Replaced by the year divided by 100 and truncated to an integer, as
+a decimal number [00,99]. [ \fItm_year\fP]
+.TP 7
+\fB%d\fP
+Replaced by the day of the month as a decimal number [01,31]. [ \fItm_mday\fP]
+.TP 7
+\fB%D\fP
+Equivalent to \fB%m\fP / \fB%d\fP / \fB%y\fP . [ \fItm_mon\fP, \fItm_mday\fP,
+\fItm_year\fP]
+.TP 7
+\fB%e\fP
+Replaced by the day of the month as a decimal number [1,31]; a single
+digit is preceded by a space. [ \fItm_mday\fP]
+.TP 7
+\fB%F\fP
+Equivalent to \fB%Y\fP - \fB%m\fP - \fB%d\fP (the ISO\ 8601:2000 standard
+date format). [ \fItm_year\fP,
+\fItm_mon\fP, \fItm_mday\fP]
+.TP 7
+\fB%g\fP
+Replaced by the last 2 digits of the week-based year (see below) as
+a decimal number [00,99]. [ \fItm_year\fP, \fItm_wday\fP,
+\fItm_yday\fP]
+.TP 7
+\fB%G\fP
+Replaced by the week-based year (see below) as a decimal number (for
+example, 1977). [ \fItm_year\fP, \fItm_wday\fP,
+\fItm_yday\fP]
+.TP 7
+\fB%h\fP
+Equivalent to \fB%b\fP . [ \fItm_mon\fP]
+.TP 7
+\fB%H\fP
+Replaced by the hour (24-hour clock) as a decimal number [00,23].
+[ \fItm_hour\fP]
+.TP 7
+\fB%I\fP
+Replaced by the hour (12-hour clock) as a decimal number [01,12].
+[ \fItm_hour\fP]
+.TP 7
+\fB%j\fP
+Replaced by the day of the year as a decimal number [001,366]. [ \fItm_yday\fP]
+.TP 7
+\fB%m\fP
+Replaced by the month as a decimal number [01,12]. [ \fItm_mon\fP]
+.TP 7
+\fB%M\fP
+Replaced by the minute as a decimal number [00,59]. [ \fItm_min\fP]
+.TP 7
+\fB%n\fP
+Replaced by a <newline>.
+.TP 7
+\fB%p\fP
+Replaced by the locale's equivalent of either a.m. or p.m. [ \fItm_hour\fP]
+.TP 7
+\fB%r\fP
+Replaced by the time in a.m. and p.m. notation; in the POSIX locale
+this shall be equivalent to \fB%I\fP :
+\fB%M\fP : \fB%S\fP \fB%p\fP . [ \fItm_hour\fP,
+\fItm_min\fP, \fItm_sec\fP]
+.TP 7
+\fB%R\fP
+Replaced by the time in 24-hour notation ( \fB%H\fP : \fB%M\fP ).
+[ \fItm_hour\fP, \fItm_min\fP]
+.TP 7
+\fB%S\fP
+Replaced by the second as a decimal number [00,60]. [ \fItm_sec\fP]
+.TP 7
+\fB%t\fP
+Replaced by a <tab>.
+.TP 7
+\fB%T\fP
+Replaced by the time ( \fB%H\fP : \fB%M\fP : \fB%S\fP ). [ \fItm_hour\fP,
+\fItm_min\fP, \fItm_sec\fP]
+.TP 7
+\fB%u\fP
+Replaced by the weekday as a decimal number [1,7], with 1 representing
+Monday. [ \fItm_wday\fP]
+.TP 7
+\fB%U\fP
+Replaced by the week number of the year as a decimal number [00,53].
+The first Sunday of January is the first day of week 1;
+days in the new year before this are in week 0. [ \fItm_year\fP, \fItm_wday\fP,
+\fItm_yday\fP]
+.TP 7
+\fB%V\fP
+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 1 January has four or more days in the new year, then it
+is considered week 1. Otherwise, it is the last week of the
+previous year, and the next week is week 1. Both January 4th and the
+first Thursday of January are always in week 1. [
+\fItm_year\fP, \fItm_wday\fP, \fItm_yday\fP]
+.TP 7
+\fB%w\fP
+Replaced by the weekday as a decimal number [0,6], with 0 representing
+Sunday. [ \fItm_wday\fP]
+.TP 7
+\fB%W\fP
+Replaced by the week number of the year as a decimal number [00,53].
+The first Monday of January is the first day of week 1;
+days in the new year before this are in week 0. [ \fItm_year\fP, \fItm_wday\fP,
+\fItm_yday\fP]
+.TP 7
+\fB%x\fP
+Replaced by the locale's appropriate date representation. (See the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<time.h>\fP.)
+.TP 7
+\fB%X\fP
+Replaced by the locale's appropriate time representation. (See the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<time.h>\fP.)
+.TP 7
+\fB%y\fP
+Replaced by the last two digits of the year as a decimal number [00,99].
+[ \fItm_year\fP]
+.TP 7
+\fB%Y\fP
+Replaced by the year as a decimal number (for example, 1997). [ \fItm_year\fP]
+.TP 7
+\fB%z\fP
+Replaced by the offset from UTC in the ISO\ 8601:2000 standard format
+( \fB+hhmm\fP or \fB-hhmm\fP ), or by no
+characters if no timezone is determinable. For example, \fB"-0430"\fP
+means 4 hours 30 minutes behind UTC (west of Greenwich).
+\ If \fItm_isdst\fP is zero, the standard time offset is used. If
+\fItm_isdst\fP is greater than zero, the daylight savings
+time offset is used. If \fItm_isdst\fP is negative, no characters
+are returned. [ \fItm_isdst\fP]
+.TP 7
+\fB%Z\fP
+Replaced by the timezone name or abbreviation, or by no bytes if no
+timezone information exists. [ \fItm_isdst\fP]
+.TP 7
+\fB%%\fP
+Replaced by \fB%\fP .
+.sp
+.LP
+If a conversion specification does not correspond to any of the above,
+the behavior is undefined.
+.LP
+If
+a \fBstruct tm\fP broken-down time structure is created by \fIlocaltime\fP()
+or \fIlocaltime_r\fP(), or modified by \fImktime\fP(), and the value
+of \fITZ\fP is subsequently modified, the results of the \fB%Z\fP
+and \fB%z\fP \fIstrftime\fP() conversion specifiers are undefined,
+when \fIstrftime\fP() is called with such a broken-down
+time structure.
+.LP
+If a \fBstruct tm\fP broken-down time structure is created or modified
+by \fIgmtime\fP() or \fIgmtime_r\fP(), it is unspecified
+whether the result of the \fB%Z\fP and \fB%z\fP conversion specifiers
+shall refer to UTC or the current local timezone, when
+\fIstrftime\fP() is called with such a broken-down time structure.
+.SS Modified Conversion Specifiers
+.LP
+Some conversion specifiers can be modified by the \fBE\fP or \fBO\fP
+modifier characters to indicate that an alternative
+format or specification should be used rather than the one normally
+used by the unmodified conversion specifier. If the alternative
+format or specification does not exist for the current locale (see
+ERA in the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 7.3.5, LC_TIME), the behavior shall
+be as if the unmodified conversion specification were used.
+.TP 7
+\fB%Ec\fP
+Replaced by the locale's alternative appropriate date and time representation.
+.TP 7
+\fB%EC\fP
+Replaced by the name of the base year (period) in the locale's alternative
+representation.
+.TP 7
+\fB%Ex\fP
+Replaced by the locale's alternative date representation.
+.TP 7
+\fB%EX\fP
+Replaced by the locale's alternative time representation.
+.TP 7
+\fB%Ey\fP
+Replaced by the offset from \fB%EC\fP (year only) in the locale's
+alternative representation.
+.TP 7
+\fB%EY\fP
+Replaced by the full alternative year representation.
+.TP 7
+\fB%Od\fP
+Replaced by the day of the month, using the locale's alternative numeric
+symbols, filled as needed with leading zeros if there
+is any alternative symbol for zero; otherwise, with leading spaces.
+.TP 7
+\fB%Oe\fP
+Replaced by the day of the month, using the locale's alternative numeric
+symbols, filled as needed with leading spaces.
+.TP 7
+\fB%OH\fP
+Replaced by the hour (24-hour clock) using the locale's alternative
+numeric symbols.
+.TP 7
+\fB%OI\fP
+Replaced by the hour (12-hour clock) using the locale's alternative
+numeric symbols.
+.TP 7
+\fB%Om\fP
+Replaced by the month using the locale's alternative numeric symbols.
+.TP 7
+\fB%OM\fP
+Replaced by the minutes using the locale's alternative numeric symbols.
+.TP 7
+\fB%OS\fP
+Replaced by the seconds using the locale's alternative numeric symbols.
+.TP 7
+\fB%Ou\fP
+Replaced by the weekday as a number in the locale's alternative representation
+(Monday=1).
+.TP 7
+\fB%OU\fP
+Replaced by the week number of the year (Sunday as the first day of
+the week, rules corresponding to \fB%U\fP ) using the
+locale's alternative numeric symbols.
+.TP 7
+\fB%OV\fP
+Replaced by the week number of the year (Monday as the first day of
+the week, rules corresponding to \fB%V\fP ) using the
+locale's alternative numeric symbols.
+.TP 7
+\fB%Ow\fP
+Replaced by the number of the weekday (Sunday=0) using the locale's
+alternative numeric symbols.
+.TP 7
+\fB%OW\fP
+Replaced by the week number of the year (Monday as the first day of
+the week) using the locale's alternative numeric
+symbols.
+.TP 7
+\fB%Oy\fP
+Replaced by the year (offset from \fB%C\fP ) using the locale's alternative
+numeric symbols.
+.sp
+.LP
+\fB%g\fP, \fB%G\fP, and \fB%V\fP give values according to the ISO\ 8601:2000
+standard week-based year. In this
+system, weeks begin on a Monday and week 1 of the year is the week
+that includes January 4th, which is also the week that includes
+the first Thursday of the year, and is also the first week that contains
+at least four days in the year. If the first Monday of
+January is the 2nd, 3rd, or 4th, the preceding days are part of the
+last week of the preceding year; thus, for Saturday 2nd January
+1999, \fB%G\fP is replaced by 1998 and \fB%V\fP is replaced by 53.
+If December 29th, 30th, or 31st is a Monday, it and any
+following days are part of week 1 of the following year. Thus, for
+Tuesday 30th December 1997, \fB%G\fP is replaced by 1998 and
+\fB%V\fP is replaced by 01.
+.LP
+If a conversion specifier is not one of the above, the behavior is
+undefined.
+.SH RETURN VALUE
+.LP
+If the total number of resulting bytes including the terminating null
+byte is not more than \fImaxsize\fP, \fIstrftime\fP()
+shall return the number of bytes placed into the array pointed to
+by \fIs\fP, not including the terminating null byte. Otherwise,
+0 shall be returned and the contents of the array are unspecified.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Getting a Localized Date String
+.LP
+The following example first sets the locale to the user's default.
+The locale information will be used in the \fInl_langinfo\fP() and
+\fIstrftime\fP() functions. The \fInl_langinfo\fP() function returns
+the localized date string which specifies how the date is
+laid out. The \fIstrftime\fP() function takes this information and,
+using the \fBtm\fP structure for values, places the date and
+time information into \fIdatestring\fP.
+.sp
+.RS
+.nf
+
+\fB#include <time.h>
+#include <locale.h>
+#include <langinfo.h>
+\&...
+struct tm *tm;
+char datestring[256];
+\&...
+setlocale (LC_ALL, "");
+\&...
+strftime (datestring, sizeof(datestring), nl_langinfo (D_T_FMT), tm);
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The range of values for \fB%S\fP is [00,60] rather than [00,59] to
+allow for the occasional leap second.
+.LP
+Some of the conversion specifications are duplicates of others. They
+are included for compatibility with \fInl_cxtime\fP() and
+\fInl_ascxtime\fP(), which were published in Issue 2.
+.LP
+Applications should use \fB%Y\fP (4-digit years) in preference to
+\fB%y\fP (2-digit years).
+.LP
+In the C locale, the \fBE\fP and \fBO\fP modifiers are ignored and
+the replacement strings for the following specifiers
+are:
+.TP 7
+\fB%a\fP
+The first three characters of \fB%A\fP .
+.TP 7
+\fB%A\fP
+One of Sunday, Monday, ..., Saturday.
+.TP 7
+\fB%b\fP
+The first three characters of \fB%B\fP .
+.TP 7
+\fB%B\fP
+One of January, February, ..., December.
+.TP 7
+\fB%c\fP
+Equivalent to \fB%a\fP \fB%b\fP \fB%e\fP \fB%T\fP \fB%Y\fP .
+.TP 7
+\fB%p\fP
+One of AM or PM.
+.TP 7
+\fB%r\fP
+Equivalent to \fB%I\fP : \fB%M\fP : \fB%S\fP \fB%p\fP .
+.TP 7
+\fB%x\fP
+Equivalent to \fB%m\fP / \fB%d\fP / \fB%y\fP .
+.TP 7
+\fB%X\fP
+Equivalent to \fB%T\fP .
+.TP 7
+\fB%Z\fP
+Implementation-defined.
+.sp
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIasctime\fP(), \fIclock\fP(), \fIctime\fP(),
+\fIdifftime\fP(), \fIgetdate\fP(), \fIgmtime\fP(), \fIlocaltime\fP(),
+\fImktime\fP(),
+\fIstrptime\fP(), \fItime\fP(), \fItzset\fP(),
+\fIutime\fP(), Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Section 7.3.5, LC_TIME, \fI<time.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/strlen.3p b/man-pages-posix-2003/man3p/strlen.3p
new file mode 100644
index 0000000..af79d5f
--- /dev/null
+++ b/man-pages-posix-2003/man3p/strlen.3p
@@ -0,0 +1,85 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "STRLEN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" strlen
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+strlen \- get string length
+.SH SYNOPSIS
+.LP
+\fB#include <string.h>
+.br
+.sp
+size_t strlen(const char *\fP\fIs\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIstrlen\fP() function shall compute the number of bytes in the
+string to which \fIs\fP points, not including the
+terminating null byte.
+.SH RETURN VALUE
+.LP
+The \fIstrlen\fP() function shall return the length of \fIs\fP; no
+return value shall be reserved to indicate an error.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Getting String Lengths
+.LP
+The following example sets the maximum length of \fIkey\fP and \fIdata\fP
+by using \fIstrlen\fP() to get the lengths of those
+strings.
+.sp
+.RS
+.nf
+
+\fB#include <string.h>
+\&...
+struct element {
+ char *key;
+ char *data;
+};
+\&...
+char *key, *data;
+int len;
+.sp
+
+*keylength = *datalength = 0;
+\&...
+if ((len = strlen(key)) > *keylength)
+ *keylength = len;
+if ((len = strlen(data)) > *datalength)
+ *datalength = len;
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<string.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/strncasecmp.3p b/man-pages-posix-2003/man3p/strncasecmp.3p
new file mode 100644
index 0000000..bfb795d
--- /dev/null
+++ b/man-pages-posix-2003/man3p/strncasecmp.3p
@@ -0,0 +1 @@
+.so man3p/strcasecmp.3p
diff --git a/man-pages-posix-2003/man3p/strncat.3p b/man-pages-posix-2003/man3p/strncat.3p
new file mode 100644
index 0000000..0d57be6
--- /dev/null
+++ b/man-pages-posix-2003/man3p/strncat.3p
@@ -0,0 +1,63 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "STRNCAT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" strncat
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+strncat \- concatenate a string with part of another
+.SH SYNOPSIS
+.LP
+\fB#include <string.h>
+.br
+.sp
+char *strncat(char *restrict\fP \fIs1\fP\fB, const char *restrict\fP
+\fIs2\fP\fB, size_t\fP \fIn\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIstrncat\fP() function shall append not more than \fIn\fP bytes
+(a null byte and bytes that follow it are not appended)
+from the array pointed to by \fIs2\fP to the end of the string pointed
+to by \fIs1\fP. The initial byte of \fIs2\fP overwrites
+the null byte at the end of \fIs1\fP. A terminating null byte is always
+appended to the result. If copying takes place between
+objects that overlap, the behavior is undefined.
+.SH RETURN VALUE
+.LP
+The \fIstrncat\fP() function shall return \fIs1\fP; no return value
+shall be reserved to indicate an error.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIstrcat\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<string.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/strncmp.3p b/man-pages-posix-2003/man3p/strncmp.3p
new file mode 100644
index 0000000..2b09639
--- /dev/null
+++ b/man-pages-posix-2003/man3p/strncmp.3p
@@ -0,0 +1,67 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "STRNCMP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" strncmp
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+strncmp \- compare part of two strings
+.SH SYNOPSIS
+.LP
+\fB#include <string.h>
+.br
+.sp
+int strncmp(const char *\fP\fIs1\fP\fB, const char *\fP\fIs2\fP\fB,
+size_t\fP \fIn\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIstrncmp\fP() function shall compare not more than \fIn\fP bytes
+(bytes that follow a null byte are not compared) from
+the array pointed to by \fIs1\fP to the array pointed to by \fIs2\fP.
+.LP
+The sign of a non-zero return value is determined by the sign of the
+difference between the values of the first pair of bytes
+(both interpreted as type \fBunsigned char\fP) that differ in the
+strings being compared.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIstrncmp\fP() shall return an integer
+greater than, equal to, or less than 0, if the possibly
+null-terminated array pointed to by \fIs1\fP is greater than, equal
+to, or less than the possibly null-terminated array pointed to
+by \fIs2\fP respectively.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIstrcmp\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<string.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/strncpy.3p b/man-pages-posix-2003/man3p/strncpy.3p
new file mode 100644
index 0000000..990cd51
--- /dev/null
+++ b/man-pages-posix-2003/man3p/strncpy.3p
@@ -0,0 +1,71 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "STRNCPY" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" strncpy
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+strncpy \- copy part of a string
+.SH SYNOPSIS
+.LP
+\fB#include <string.h>
+.br
+.sp
+char *strncpy(char *restrict\fP \fIs1\fP\fB, const char *restrict\fP
+\fIs2\fP\fB, size_t\fP \fIn\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIstrncpy\fP() function shall copy not more than \fIn\fP bytes
+(bytes that follow a null byte are not copied) from the
+array pointed to by \fIs2\fP to the array pointed to by \fIs1\fP.
+If copying takes place between objects that overlap, the
+behavior is undefined.
+.LP
+If the array pointed to by \fIs2\fP is a string that is shorter than
+\fIn\fP bytes, null bytes shall be appended to the copy
+in the array pointed to by \fIs1\fP, until \fIn\fP bytes in all are
+written.
+.SH RETURN VALUE
+.LP
+The \fIstrncpy\fP() function shall return \fIs1\fP; no return value
+is reserved to indicate an error.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Character movement is performed differently in different implementations.
+Thus, overlapping moves may yield surprises.
+.LP
+If there is no null byte in the first \fIn\fP bytes of the array pointed
+to by \fIs2\fP, the result is not
+null-terminated.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIstrcpy\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<string.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/strpbrk.3p b/man-pages-posix-2003/man3p/strpbrk.3p
new file mode 100644
index 0000000..3488134
--- /dev/null
+++ b/man-pages-posix-2003/man3p/strpbrk.3p
@@ -0,0 +1,59 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "STRPBRK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" strpbrk
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+strpbrk \- scan a string for a byte
+.SH SYNOPSIS
+.LP
+\fB#include <string.h>
+.br
+.sp
+char *strpbrk(const char *\fP\fIs1\fP\fB, const char *\fP\fIs2\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIstrpbrk\fP() function shall locate the first occurrence in
+the string pointed to by \fIs1\fP of any byte from the
+string pointed to by \fIs2\fP.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIstrpbrk\fP() shall return a pointer
+to the byte or a null pointer if no byte from \fIs2\fP
+occurs in \fIs1\fP.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIstrchr\fP(), \fIstrrchr\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<string.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/strptime.3p b/man-pages-posix-2003/man3p/strptime.3p
new file mode 100644
index 0000000..42066b0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/strptime.3p
@@ -0,0 +1,303 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "STRPTIME" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" strptime
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+strptime \- date and time conversion
+.SH SYNOPSIS
+.LP
+\fB#include <time.h>
+.br
+.sp
+char *strptime(const char *restrict\fP \fIbuf\fP\fB, const char *restrict\fP
+\fIformat\fP\fB,
+.br
+\ \ \ \ \ \ struct tm *restrict\fP \fItm\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIstrptime\fP() function shall convert the character string pointed
+to by \fIbuf\fP to values which are stored in the
+\fBtm\fP structure pointed to by \fItm\fP, using the format specified
+by \fIformat\fP.
+.LP
+The \fIformat\fP is composed of zero or more directives. Each directive
+is composed of one of the following: one or more
+white-space characters (as specified by \fIisspace\fP()); an ordinary
+character (neither
+\fB'%'\fP nor a white-space character); or a conversion specification.
+Each conversion specification is composed of a
+\fB'%'\fP character followed by a conversion character which specifies
+the replacement required. The application shall ensure
+that there is white-space or other non-alphanumeric characters between
+any two conversion specifications. The following conversion
+specifications are supported:
+.TP 7
+\fB%a\fP
+The day of the week, using the locale's weekday names; either the
+abbreviated or full name may be specified.
+.TP 7
+\fB%A\fP
+Equivalent to \fB%a\fP .
+.TP 7
+\fB%b\fP
+The month, using the locale's month names; either the abbreviated
+or full name may be specified.
+.TP 7
+\fB%B\fP
+Equivalent to \fB%b\fP .
+.TP 7
+\fB%c\fP
+Replaced by the locale's appropriate date and time representation.
+.TP 7
+\fB%C\fP
+The century number [00,99]; leading zeros are permitted but not required.
+.TP 7
+\fB%d\fP
+The day of the month [01,31]; leading zeros are permitted but not
+required.
+.TP 7
+\fB%D\fP
+The date as \fB%m\fP / \fB%d\fP / \fB%y\fP .
+.TP 7
+\fB%e\fP
+Equivalent to \fB%d\fP .
+.TP 7
+\fB%h\fP
+Equivalent to \fB%b\fP .
+.TP 7
+\fB%H\fP
+The hour (24-hour clock) [00,23]; leading zeros are permitted but
+not required.
+.TP 7
+\fB%I\fP
+The hour (12-hour clock) [01,12]; leading zeros are permitted but
+not required.
+.TP 7
+\fB%j\fP
+The day number of the year [001,366]; leading zeros are permitted
+but not required.
+.TP 7
+\fB%m\fP
+The month number [01,12]; leading zeros are permitted but not required.
+.TP 7
+\fB%M\fP
+The minute [00,59]; leading zeros are permitted but not required.
+.TP 7
+\fB%n\fP
+Any white space.
+.TP 7
+\fB%p\fP
+The locale's equivalent of a.m or p.m.
+.TP 7
+\fB%r\fP
+12-hour clock time using the AM/PM notation if \fBt_fmt_ampm\fP is
+not an empty string in the LC_TIME portion of the current
+locale; in the POSIX locale, this shall be equivalent to \fB%I\fP
+: \fB%M\fP : \fB%S\fP \fB%p\fP .
+.TP 7
+\fB%R\fP
+The time as \fB%H\fP : \fB%M\fP .
+.TP 7
+\fB%S\fP
+The seconds [00,60]; leading zeros are permitted but not required.
+.TP 7
+\fB%t\fP
+Any white space.
+.TP 7
+\fB%T\fP
+The time as \fB%H\fP : \fB%M\fP : \fB%S\fP .
+.TP 7
+\fB%U\fP
+The week number of the year (Sunday as the first day of the week)
+as a decimal number [00,53]; leading zeros are permitted but
+not required.
+.TP 7
+\fB%w\fP
+The weekday as a decimal number [0,6], with 0 representing Sunday;
+leading zeros are permitted but not required.
+.TP 7
+\fB%W\fP
+The week number of the year (Monday as the first day of the week)
+as a decimal number [00,53]; leading zeros are permitted but
+not required.
+.TP 7
+\fB%x\fP
+The date, using the locale's date format.
+.TP 7
+\fB%X\fP
+The time, using the locale's time format.
+.TP 7
+\fB%y\fP
+The year within century. When a century is not otherwise specified,
+values in the range [69,99] shall refer to years 1969 to
+1999 inclusive, and values in the range [00,68] shall refer to years
+2000 to 2068 inclusive; leading zeros shall be permitted but
+shall not be required.
+.TP 7
+\fBNote:\fP
+.RS
+It is expected that in a future version of IEEE\ Std\ 1003.1-2001
+the default century inferred from a 2-digit year will
+change. (This would apply to all commands accepting a 2-digit year
+as input.)
+.RE
+.sp
+.TP 7
+\fB%Y\fP
+The year, including the century (for example, 1988).
+.TP 7
+\fB%%\fP
+Replaced by \fB%\fP .
+.sp
+.SS Modified Conversion Specifiers
+.LP
+Some conversion specifiers can be modified by the \fBE\fP and \fBO\fP
+modifier characters to indicate that an alternative
+format or specification should be used rather than the one normally
+used by the unmodified conversion specifier. If the alternative
+format or specification does not exist in the current locale, the
+behavior shall be as if the unmodified conversion specification
+were used.
+.TP 7
+\fB%Ec\fP
+The locale's alternative appropriate date and time representation.
+.TP 7
+\fB%EC\fP
+The name of the base year (period) in the locale's alternative representation.
+.TP 7
+\fB%Ex\fP
+The locale's alternative date representation.
+.TP 7
+\fB%EX\fP
+The locale's alternative time representation.
+.TP 7
+\fB%Ey\fP
+The offset from \fB%EC\fP (year only) in the locale's alternative
+representation.
+.TP 7
+\fB%EY\fP
+The full alternative year representation.
+.TP 7
+\fB%Od\fP
+The day of the month using the locale's alternative numeric symbols;
+leading zeros are permitted but not required.
+.TP 7
+\fB%Oe\fP
+Equivalent to \fB%Od\fP .
+.TP 7
+\fB%OH\fP
+The hour (24-hour clock) using the locale's alternative numeric symbols.
+.TP 7
+\fB%OI\fP
+The hour (12-hour clock) using the locale's alternative numeric symbols.
+.TP 7
+\fB%Om\fP
+The month using the locale's alternative numeric symbols.
+.TP 7
+\fB%OM\fP
+The minutes using the locale's alternative numeric symbols.
+.TP 7
+\fB%OS\fP
+The seconds using the locale's alternative numeric symbols.
+.TP 7
+\fB%OU\fP
+The week number of the year (Sunday as the first day of the week)
+using the locale's alternative numeric symbols.
+.TP 7
+\fB%Ow\fP
+The number of the weekday (Sunday=0) using the locale's alternative
+numeric symbols.
+.TP 7
+\fB%OW\fP
+The week number of the year (Monday as the first day of the week)
+using the locale's alternative numeric symbols.
+.TP 7
+\fB%Oy\fP
+The year (offset from \fB%C\fP ) using the locale's alternative numeric
+symbols.
+.sp
+.LP
+A conversion specification composed of white-space characters is executed
+by scanning input up to the first character that is
+not white-space (which remains unscanned), or until no more characters
+can be scanned.
+.LP
+A conversion specification that is an ordinary character is executed
+by scanning the next character from the buffer. If the
+character scanned from the buffer differs from the one comprising
+the directive, the directive fails, and the differing and
+subsequent characters remain unscanned.
+.LP
+A series of conversion specifications composed of \fB%n\fP, \fB%t\fP,
+white-space characters, or any combination is
+executed by scanning up to the first character that is not white space
+(which remains unscanned), or until no more characters can
+be scanned.
+.LP
+Any other conversion specification is executed by scanning characters
+until a character matching the next directive is scanned,
+or until no more characters can be scanned. These characters, except
+the one matching the next directive, are then compared to the
+locale values associated with the conversion specifier. If a match
+is found, values for the appropriate \fBtm\fP structure members
+are set to values corresponding to the locale information. Case is
+ignored when matching items in \fIbuf\fP such as month or
+weekday names. If no match is found, \fIstrptime\fP() fails and no
+more characters are scanned.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIstrptime\fP() shall return a pointer
+to the character following the last character parsed.
+Otherwise, a null pointer shall be returned.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Several "equivalent to" formats and the special processing of white-space
+characters are provided in order to ease the use of
+identical \fIformat\fP strings for \fIstrftime\fP() and \fIstrptime\fP().
+.LP
+Applications should use \fB%Y\fP (4-digit years) in preference to
+\fB%y\fP (2-digit years).
+.LP
+It is unspecified whether multiple calls to \fIstrptime\fP() using
+the same \fBtm\fP structure will update the current
+contents of the structure or overwrite all contents of the structure.
+Conforming applications should make a single call to
+\fIstrptime\fP() with a format and all data needed to completely specify
+the date and time being converted.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+The \fIstrptime\fP() function is expected to be mandatory in the next
+version of this volume of
+IEEE\ Std\ 1003.1-2001.
+.SH SEE ALSO
+.LP
+\fIscanf\fP(), \fIstrftime\fP(), \fItime\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<time.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/strrchr.3p b/man-pages-posix-2003/man3p/strrchr.3p
new file mode 100644
index 0000000..bdd4dd4
--- /dev/null
+++ b/man-pages-posix-2003/man3p/strrchr.3p
@@ -0,0 +1,79 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "STRRCHR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" strrchr
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+strrchr \- string scanning operation
+.SH SYNOPSIS
+.LP
+\fB#include <string.h>
+.br
+.sp
+char *strrchr(const char *\fP\fIs\fP\fB, int\fP \fIc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIstrrchr\fP() function shall locate the last occurrence of \fIc\fP
+(converted to a \fBchar\fP) in the string pointed to
+by \fIs\fP. The terminating null byte is considered to be part of
+the string.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIstrrchr\fP() shall return a pointer
+to the byte or a null pointer if \fIc\fP does not occur in
+the string.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Finding the Base Name of a File
+.LP
+The following example uses \fIstrrchr\fP() to get a pointer to the
+base name of a file. The \fIstrrchr\fP() function searches
+backwards through the name of the file to find the last \fB'/'\fP
+character in \fIname\fP. This pointer (plus one) will point
+to the base name of the file.
+.sp
+.RS
+.nf
+
+\fB#include <string.h>
+\&...
+const char *name;
+char *basename;
+\&...
+basename = strrchr(name, '/') + 1;
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIstrchr\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<string.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/strspn.3p b/man-pages-posix-2003/man3p/strspn.3p
new file mode 100644
index 0000000..3dde185
--- /dev/null
+++ b/man-pages-posix-2003/man3p/strspn.3p
@@ -0,0 +1,59 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "STRSPN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" strspn
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+strspn \- get length of a substring
+.SH SYNOPSIS
+.LP
+\fB#include <string.h>
+.br
+.sp
+size_t strspn(const char *\fP\fIs1\fP\fB, const char *\fP\fIs2\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIstrspn\fP() function shall compute the length (in bytes) of
+the maximum initial segment of the string pointed to by
+\fIs1\fP which consists entirely of bytes from the string pointed
+to by \fIs2\fP.
+.SH RETURN VALUE
+.LP
+The \fIstrspn\fP() function shall return the length of \fIs1\fP; no
+return value is reserved to indicate an error.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIstrcspn\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<string.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/strstr.3p b/man-pages-posix-2003/man3p/strstr.3p
new file mode 100644
index 0000000..e71a632
--- /dev/null
+++ b/man-pages-posix-2003/man3p/strstr.3p
@@ -0,0 +1,63 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "STRSTR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" strstr
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+strstr \- find a substring
+.SH SYNOPSIS
+.LP
+\fB#include <string.h>
+.br
+.sp
+char *strstr(const char *\fP\fIs1\fP\fB, const char *\fP\fIs2\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIstrstr\fP() function shall locate the first occurrence in the
+string pointed to by \fIs1\fP of the sequence of bytes
+(excluding the terminating null byte) in the string pointed to by
+\fIs2\fP.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIstrstr\fP() shall return a pointer
+to the located string or a null pointer if the string is not
+found.
+.LP
+If \fIs2\fP points to a string with zero length, the function shall
+return \fIs1\fP.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIstrchr\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<string.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/strtod.3p b/man-pages-posix-2003/man3p/strtod.3p
new file mode 100644
index 0000000..f996d28
--- /dev/null
+++ b/man-pages-posix-2003/man3p/strtod.3p
@@ -0,0 +1,279 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "STRTOD" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" strtod
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+strtod, strtof, strtold \- convert a string to a double-precision number
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+double strtod(const char *restrict\fP \fInptr\fP\fB, char **restrict\fP
+\fIendptr\fP\fB);
+.br
+float strtof(const char *restrict\fP \fInptr\fP\fB, char **restrict\fP
+\fIendptr\fP\fB);
+.br
+long double strtold(const char *restrict\fP \fInptr\fP\fB, char **restrict\fP
+\fIendptr\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall convert the initial portion of the string pointed
+to by \fInptr\fP to \fBdouble\fP, \fBfloat\fP, and
+\fBlong double\fP representation, respectively. First, they decompose
+the input string into three parts:
+.IP " 1." 4
+An initial, possibly empty, sequence of white-space characters (as
+specified by \fIisspace\fP())
+.LP
+.IP " 2." 4
+A subject sequence interpreted as a floating-point constant or representing
+infinity or NaN
+.LP
+.IP " 3." 4
+A final string of one or more unrecognized characters, including the
+terminating null byte of the input string
+.LP
+.LP
+Then they shall attempt to convert the subject sequence to a floating-point
+number, and return the result.
+.LP
+The expected form of the subject sequence is an optional plus or minus
+sign, then one of the following:
+.IP " *" 3
+A non-empty sequence of decimal digits optionally containing a radix
+character, then an optional exponent part
+.LP
+.IP " *" 3
+A 0x or 0X, then a non-empty sequence of hexadecimal digits optionally
+containing a radix character, then an optional binary
+exponent part
+.LP
+.IP " *" 3
+One of INF or INFINITY, ignoring case
+.LP
+.IP " *" 3
+One of NAN or NAN(\fIn-char-sequence_opt\fP), ignoring case in the
+NAN part, where:
+.sp
+.RS
+.nf
+
+\fBn-char-sequence:
+ digit
+ nondigit
+ n-char-sequence digit
+ n-char-sequence nondigit
+\fP
+.fi
+.RE
+.LP
+.LP
+The subject sequence is defined as the longest initial subsequence
+of the input string, starting with the first non-white-space
+character, that is of the expected form. The subject sequence contains
+no characters if the input string is not of the expected
+form.
+.LP
+If the subject sequence has the expected form for a floating-point
+number, the sequence of characters starting with the first
+digit or the decimal-point character (whichever occurs first) shall
+be interpreted as a floating constant of the C language, except
+that the radix character shall be used in place of a period, and that
+if neither an exponent part nor a radix character appears in
+a decimal floating-point number, or if a binary exponent part does
+not appear in a hexadecimal floating-point number, an exponent
+part of the appropriate type with value zero is assumed to follow
+the last digit in the string. If the subject sequence begins with
+a minus sign, the sequence shall be interpreted as negated. A character
+sequence INF or INFINITY shall be interpreted as an
+infinity, if representable in the return type, else as if it were
+a floating constant that is too large for the range of the return
+type. A character sequence NAN or NAN(\fIn-char-sequence_opt\fP) shall
+be interpreted as a quiet NaN, if
+supported in the return type, else as if it were a subject sequence
+part that does not have the expected form; the meaning of the
+\fIn\fP-char sequences is implementation-defined. A pointer to the
+final string is stored in the object pointed to by
+\fIendptr\fP, provided that \fIendptr\fP is not a null pointer.
+.LP
+If the subject sequence has the hexadecimal form and FLT_RADIX is
+a power of 2, the value resulting from the conversion is
+correctly rounded.
+.LP
+The
+radix character is defined in the program's locale (category \fILC_NUMERIC
+).\fP In the POSIX locale, or in a locale where the
+radix character is not defined, the radix character shall default
+to a period ( \fB'.'\fP ).
+.LP
+In other than the C or POSIX locales, other
+implementation-defined subject sequences may be accepted.
+.LP
+If the subject sequence is empty or does not have the expected form,
+no conversion shall be performed; the value of \fIstr\fP
+is stored in the object pointed to by \fIendptr\fP, provided that
+\fIendptr\fP is not a null pointer.
+.LP
+The
+\fIstrtod\fP() function shall not change the setting of \fIerrno\fP
+if successful.
+.LP
+Since 0 is returned on error and is also a valid return on success,
+an application wishing to check for error situations should
+set \fIerrno\fP to 0, then call \fIstrtod\fP(), \fIstrtof\fP(), or
+\fIstrtold\fP(), then check \fIerrno\fP.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the converted
+value. If no conversion could be performed, 0 shall be
+returned, and \fIerrno\fP may be set to [EINVAL].
+.LP
+If the correct value is outside the range of representable values,
+\(+-HUGE_VAL, \(+-HUGE_VALF, or \(+-HUGE_VALL
+shall be returned (according to the sign of the value), and \fIerrno\fP
+shall be set to [ERANGE].
+.LP
+If the correct value would cause an underflow, a value whose magnitude
+is no greater than the smallest normalized positive
+number in the return type shall be returned and \fIerrno\fP set to
+[ERANGE].
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+.B ERANGE
+The value to be returned would cause overflow or underflow.
+.sp
+.LP
+These functions may fail if:
+.TP 7
+.B EINVAL
+No
+conversion could be performed.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+If the subject sequence has the hexadecimal form and FLT_RADIX is
+not a power of 2, and the result is not exactly representable,
+the result should be one of the two numbers in the appropriate internal
+format that are adjacent to the hexadecimal floating source
+value, with the extra stipulation that the error should have a correct
+sign for the current rounding direction.
+.LP
+If the subject sequence has the decimal form and at most DECIMAL_DIG
+(defined in \fI<float.h>\fP) significant digits, the result should
+be correctly rounded. If the subject
+sequence \fID\fP has the decimal form and more than DECIMAL_DIG significant
+digits, consider the two bounding, adjacent decimal
+strings \fIL\fP and \fIU\fP, both having DECIMAL_DIG significant digits,
+such that the values of \fIL\fP, \fID\fP, and \fIU\fP
+satisfy \fIL\fP <= \fID\fP <= \fIU\fP. The result should be one of
+the (equal or adjacent) values that would be obtained
+by correctly rounding \fIL\fP and \fIU\fP according to the current
+rounding direction, with the extra stipulation that the error
+with respect to \fID\fP should have a correct sign for the current
+rounding direction.
+.LP
+The changes to \fIstrtod\fP() introduced by the ISO/IEC\ 9899:1999
+standard can alter the behavior of well-formed
+applications complying with the ISO/IEC\ 9899:1990 standard and thus
+earlier versions of the base documents. One such example
+would be:
+.sp
+.RS
+.nf
+
+\fBint
+what_kind_of_number (char *s)
+{
+ char *endp;
+ double d;
+ long l;
+.sp
+
+ d = strtod(s, &endp);
+ if (s != endp && *endp == `\\0')
+ printf("It's a float with value %g\\n", d);
+ else
+ {
+ l = strtol(s, &endp, 0);
+ if (s != endp && *endp == `\\0')
+ printf("It's an integer with value %ld\\n", 1);
+ else
+ return 1;
+ }
+ return 0;
+}
+\fP
+.fi
+.RE
+.LP
+If the function is called with:
+.sp
+.RS
+.nf
+
+\fBwhat_kind_of_number ("0x10")
+\fP
+.fi
+.RE
+.LP
+an ISO/IEC\ 9899:1990 standard-compliant library will result in the
+function printing:
+.sp
+.RS
+.nf
+
+\fBIt's an integer with value 16
+\fP
+.fi
+.RE
+.LP
+With the ISO/IEC\ 9899:1999 standard, the result is:
+.sp
+.RS
+.nf
+
+\fBIt's a float with value 16
+\fP
+.fi
+.RE
+.LP
+The change in behavior is due to the inclusion of floating-point numbers
+in hexadecimal notation without requiring that either a
+decimal point or the binary exponent be present.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIisspace\fP(), \fIlocaleconv\fP(), \fIscanf\fP(), \fIsetlocale\fP(),
+\fIstrtol\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 7, Locale,
+\fI<float.h>\fP, \fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/strtof.3p b/man-pages-posix-2003/man3p/strtof.3p
new file mode 100644
index 0000000..e7802a0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/strtof.3p
@@ -0,0 +1 @@
+.so man3p/strtod.3p
diff --git a/man-pages-posix-2003/man3p/strtoimax.3p b/man-pages-posix-2003/man3p/strtoimax.3p
new file mode 100644
index 0000000..b9b7f92
--- /dev/null
+++ b/man-pages-posix-2003/man3p/strtoimax.3p
@@ -0,0 +1,83 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "STRTOIMAX" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" strtoimax
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+strtoimax, strtoumax \- convert string to integer type
+.SH SYNOPSIS
+.LP
+\fB#include <inttypes.h>
+.br
+.sp
+intmax_t strtoimax(const char *restrict\fP \fInptr\fP\fB, char **restrict\fP
+\fIendptr\fP\fB,
+.br
+\ \ \ \ \ \ int\fP \fIbase\fP\fB);
+.br
+uintmax_t strtoumax(const char *restrict\fP \fInptr\fP\fB, char **restrict\fP
+\fIendptr\fP\fB,
+.br
+\ \ \ \ \ \ int\fP \fIbase\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall be equivalent to the \fIstrtol\fP(), \fIstrtoll\fP(),
+\fIstrtoul\fP(), and \fIstrtoull\fP() functions, except that the initial
+portion of the string shall be converted to
+\fBintmax_t\fP and \fBuintmax_t\fP representation, respectively.
+.SH RETURN VALUE
+.LP
+These functions shall return the converted value, if any.
+.LP
+If no conversion could be performed, zero shall be returned.
+.LP
+If the correct value is outside the range of representable values,
+{INTMAX_MAX}, {INTMAX_MIN}, or {UINTMAX_MAX} shall be
+returned (according to the return type and sign of the value, if any),
+and \fIerrno\fP shall be set to [ERANGE].
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+.B ERANGE
+The value to be returned is not representable.
+.sp
+.LP
+These functions may fail if:
+.TP 7
+.B EINVAL
+The value of \fIbase\fP is not supported.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIstrtol\fP(), \fIstrtoul\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<inttypes.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/strtok.3p b/man-pages-posix-2003/man3p/strtok.3p
new file mode 100644
index 0000000..51b622b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/strtok.3p
@@ -0,0 +1,184 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "STRTOK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" strtok
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+strtok, strtok_r \- split string into tokens
+.SH SYNOPSIS
+.LP
+\fB#include <string.h>
+.br
+.sp
+char *strtok(char *restrict\fP \fIs1\fP\fB, const char *restrict\fP
+\fIs2\fP\fB);
+.br
+\fP
+.LP
+\fBchar *strtok_r(char *restrict\fP \fIs\fP\fB, const char *restrict\fP
+\fIsep\fP\fB,
+.br
+\ \ \ \ \ \ char **restrict\fP \fIlasts\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+For \fIstrtok\fP(): The functionality described on this reference
+page is aligned with the ISO\ C standard. Any
+conflict between the requirements described here and the ISO\ C standard
+is unintentional. This volume of
+IEEE\ Std\ 1003.1-2001 defers to the ISO\ C standard.
+.LP
+A sequence of calls to \fIstrtok\fP() breaks the string pointed to
+by \fIs1\fP into a sequence of tokens, each of which is
+delimited by a byte from the string pointed to by \fIs2\fP. The first
+call in the sequence has \fIs1\fP as its first argument,
+and is followed by calls with a null pointer as their first argument.
+The separator string pointed to by \fIs2\fP may be different
+from call to call.
+.LP
+The first call in the sequence searches the string pointed to by \fIs1\fP
+for the first byte that is \fInot\fP contained in
+the current separator string pointed to by \fIs2\fP. If no such byte
+is found, then there are no tokens in the string pointed to
+by \fIs1\fP and \fIstrtok\fP() shall return a null pointer. If such
+a byte is found, it is the start of the first token.
+.LP
+The \fIstrtok\fP() function then searches from there for a byte that
+\fIis\fP contained in the current separator string. If no
+such byte is found, the current token extends to the end of the string
+pointed to by \fIs1\fP, and subsequent searches for a token
+shall return a null pointer. If such a byte is found, it is overwritten
+by a null byte, which terminates the current token. The
+\fIstrtok\fP() function saves a pointer to the following byte, from
+which the next search for a token shall start.
+.LP
+Each subsequent call, with a null pointer as the value of the first
+argument, starts searching from the saved pointer and
+behaves as described above.
+.LP
+The implementation shall behave as if no function defined in this
+volume of IEEE\ Std\ 1003.1-2001 calls
+\fIstrtok\fP().
+.LP
+The
+\fIstrtok\fP() function need not be reentrant. A function that is
+not required to be reentrant is not required to be thread-safe.
+.LP
+The \fIstrtok_r\fP() function considers the null-terminated string
+\fIs\fP as a sequence of zero or more text tokens separated by
+spans of one or more characters from the separator string \fIsep\fP.
+The argument \fIlasts\fP points to a user-provided pointer
+which points to stored information necessary for \fIstrtok_r\fP()
+to continue scanning the same string.
+.LP
+In the first call to \fIstrtok_r\fP(), \fIs\fP points to a null-terminated
+string, \fIsep\fP to a null-terminated string of
+separator characters, and the value pointed to by \fIlasts\fP is ignored.
+The \fIstrtok_r\fP() function shall return a pointer to
+the first character of the first token, write a null character into
+\fIs\fP immediately following the returned token, and update
+the pointer to which \fIlasts\fP points.
+.LP
+In subsequent calls, \fIs\fP is a NULL pointer and \fIlasts\fP shall
+be unchanged from the previous call so that subsequent
+calls shall move through the string \fIs\fP, returning successive
+tokens until no tokens remain. The separator string \fIsep\fP
+may be different from call to call. When no token remains in \fIs\fP,
+a NULL pointer shall be returned.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIstrtok\fP() shall return a pointer
+to the first byte of a token. Otherwise, if there is no
+token, \fIstrtok\fP() shall return a null pointer.
+.LP
+The \fIstrtok_r\fP() function shall return a pointer to the token
+found, or a NULL pointer when no token is found.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Searching for Word Separators
+.LP
+The following example searches for tokens separated by <space>s.
+.sp
+.RS
+.nf
+
+\fB#include <string.h>
+\&...
+char *token;
+char *line = "LINE TO BE SEPARATED";
+char *search = " ";
+.sp
+
+/* Token will point to "LINE". */
+token = strtok(line, search);
+.sp
+
+/* Token will point to "TO". */
+token = strtok(NULL, search);
+\fP
+.fi
+.RE
+.SS Breaking a Line
+.LP
+The following example uses \fIstrtok\fP() to break a line into two
+character strings separated by any combination of
+<space>s, <tab>s, or <newline>s.
+.sp
+.RS
+.nf
+
+\fB#include <string.h>
+\&...
+struct element {
+ char *key;
+ char *data;
+};
+\&...
+char line[LINE_MAX];
+char *key, *data;
+\&...
+key = strtok(line, " \\n");
+data = strtok(NULL, " \\n");
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The \fIstrtok_r\fP() function is thread-safe and stores its state
+in a user-supplied buffer instead of possibly using a static
+data area that may be overwritten by an unrelated call from another
+thread.
+.SH RATIONALE
+.LP
+The \fIstrtok\fP() function searches for a separator string within
+a larger string. It returns a pointer to the last substring
+between separator strings. This function uses static storage to keep
+track of the current string position between calls. The new
+function, \fIstrtok_r\fP(), takes an additional argument, \fIlasts\fP,
+to keep track of the current position in the string.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<string.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/strtok_r.3p b/man-pages-posix-2003/man3p/strtok_r.3p
new file mode 100644
index 0000000..1aa7121
--- /dev/null
+++ b/man-pages-posix-2003/man3p/strtok_r.3p
@@ -0,0 +1 @@
+.so man3p/strtok.3p
diff --git a/man-pages-posix-2003/man3p/strtol.3p b/man-pages-posix-2003/man3p/strtol.3p
new file mode 100644
index 0000000..dececf2
--- /dev/null
+++ b/man-pages-posix-2003/man3p/strtol.3p
@@ -0,0 +1,156 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "STRTOL" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" strtol
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+strtol, strtoll \- convert a string to a long integer
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+long strtol(const char *restrict\fP \fIstr\fP\fB, char **restrict\fP
+\fIendptr\fP\fB, int\fP \fIbase\fP\fB);
+.br
+long long strtoll(const char *restrict\fP \fIstr\fP\fB, char **restrict\fP
+\fIendptr\fP\fB,
+.br
+\ \ \ \ \ \ int\fP \fIbase\fP\fB)
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall convert the initial portion of the string pointed
+to by \fIstr\fP to a type \fBlong\fP and \fBlong
+long\fP representation, respectively. First, they decompose the input
+string into three parts:
+.IP " 1." 4
+An initial, possibly empty, sequence of white-space characters (as
+specified by \fIisspace\fP())
+.LP
+.IP " 2." 4
+A subject sequence interpreted as an integer represented in some radix
+determined by the value of \fIbase\fP
+.LP
+.IP " 3." 4
+A final string of one or more unrecognized characters, including the
+terminating null byte of the input string.
+.LP
+.LP
+Then they shall attempt to convert the subject sequence to an integer,
+and return the result.
+.LP
+If the value of \fIbase\fP is 0, the expected form of the subject
+sequence is that of a decimal constant, octal constant, or
+hexadecimal constant, any of which may be preceded by a \fB'+'\fP
+or \fB'-'\fP sign. A decimal constant begins with a
+non-zero digit, and consists of a sequence of decimal digits. An octal
+constant consists of the prefix \fB'0'\fP optionally
+followed by a sequence of the digits \fB'0'\fP to \fB'7'\fP only.
+A hexadecimal constant consists of the prefix 0x or 0X
+followed by a sequence of the decimal digits and letters \fB'a'\fP
+(or \fB'A'\fP ) to \fB'f'\fP (or \fB'F'\fP ) with
+values 10 to 15 respectively.
+.LP
+If the value of \fIbase\fP is between 2 and 36, the expected form
+of the subject sequence is a sequence of letters and digits
+representing an integer with the radix specified by \fIbase\fP, optionally
+preceded by a \fB'+'\fP or \fB'-'\fP sign. The
+letters from \fB'a'\fP (or \fB'A'\fP ) to \fB'z'\fP (or \fB'Z'\fP
+) inclusive are ascribed the values 10 to 35; only
+letters whose ascribed values are less than that of \fIbase\fP are
+permitted. If the value of \fIbase\fP is 16, the characters 0x
+or 0X may optionally precede the sequence of letters and digits, following
+the sign if present.
+.LP
+The subject sequence is defined as the longest initial subsequence
+of the input string, starting with the first non-white-space
+character that is of the expected form. The subject sequence shall
+contain no characters if the input string is empty or consists
+entirely of white-space characters, or if the first non-white-space
+character is other than a sign or a permissible letter or
+digit.
+.LP
+If the subject sequence has the expected form and the value of \fIbase\fP
+is 0, the sequence of characters starting with the
+first digit shall be interpreted as an integer constant. If the subject
+sequence has the expected form and the value of \fIbase\fP
+is between 2 and 36, it shall be used as the base for conversion,
+ascribing to each letter its value as given above. If the subject
+sequence begins with a minus sign, the value resulting from the conversion
+shall be negated. A pointer to the final string shall be
+stored in the object pointed to by \fIendptr\fP, provided that \fIendptr\fP
+is not a null pointer.
+.LP
+In other than the C or POSIX locales, other
+implementation-defined subject sequences may be accepted.
+.LP
+If the subject sequence is empty or does not have the expected form,
+no conversion is performed; the value of \fIstr\fP is
+stored in the object pointed to by \fIendptr\fP, provided that \fIendptr\fP
+is not a null pointer.
+.LP
+The
+\fIstrtol\fP() function shall not change the setting of \fIerrno\fP
+if successful.
+.LP
+Since 0, {LONG_MIN} or {LLONG_MIN}, and {LONG_MAX} or {LLONG_MAX}
+are returned on error and are also valid returns on success,
+an application wishing to check for error situations should set \fIerrno\fP
+to 0, then call \fIstrtol\fP() or \fIstrtoll\fP(),
+then check \fIerrno\fP.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the converted
+value, if any. If no conversion could be performed, 0
+shall be returned and \fIerrno\fP may be set to [EINVAL].
+.LP
+If the correct value is outside the range of representable values,
+{LONG_MIN}, {LONG_MAX}, {LLONG_MIN}, or {LLONG_MAX} shall be
+returned (according to the sign of the value), and \fIerrno\fP set
+to [ERANGE].
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+.B ERANGE
+The value to be returned is not representable.
+.sp
+.LP
+These functions may fail if:
+.TP 7
+.B EINVAL
+The value of \fIbase\fP is not supported.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIisalpha\fP(), \fIscanf\fP(), \fIstrtod\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/strtold.3p b/man-pages-posix-2003/man3p/strtold.3p
new file mode 100644
index 0000000..e7802a0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/strtold.3p
@@ -0,0 +1 @@
+.so man3p/strtod.3p
diff --git a/man-pages-posix-2003/man3p/strtoll.3p b/man-pages-posix-2003/man3p/strtoll.3p
new file mode 100644
index 0000000..93a836e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/strtoll.3p
@@ -0,0 +1 @@
+.so man3p/strtol.3p
diff --git a/man-pages-posix-2003/man3p/strtoul.3p b/man-pages-posix-2003/man3p/strtoul.3p
new file mode 100644
index 0000000..e75dca5
--- /dev/null
+++ b/man-pages-posix-2003/man3p/strtoul.3p
@@ -0,0 +1,159 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "STRTOUL" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" strtoul
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+strtoul, strtoull \- convert a string to an unsigned long
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+unsigned long strtoul(const char *restrict\fP \fIstr\fP\fB,
+.br
+\ \ \ \ \ \ char **restrict\fP \fIendptr\fP\fB, int\fP \fIbase\fP\fB);
+.br
+unsigned long long strtoull(const char *restrict\fP \fIstr\fP\fB,
+.br
+\ \ \ \ \ \ char **restrict\fP \fIendptr\fP\fB, int\fP \fIbase\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall convert the initial portion of the string pointed
+to by \fIstr\fP to a type \fBunsigned long\fP and
+\fBunsigned long long\fP representation, respectively. First, they
+decompose the input string into three parts:
+.IP " 1." 4
+An initial, possibly empty, sequence of white-space characters (as
+specified by \fIisspace\fP())
+.LP
+.IP " 2." 4
+A subject sequence interpreted as an integer represented in some radix
+determined by the value of \fIbase\fP
+.LP
+.IP " 3." 4
+A final string of one or more unrecognized characters, including the
+terminating null byte of the input string
+.LP
+.LP
+Then they shall attempt to convert the subject sequence to an unsigned
+integer, and return the result.
+.LP
+If the value of \fIbase\fP is 0, the expected form of the subject
+sequence is that of a decimal constant, octal constant, or
+hexadecimal constant, any of which may be preceded by a \fB'+'\fP
+or \fB'-'\fP sign. A decimal constant begins with a
+non-zero digit, and consists of a sequence of decimal digits. An octal
+constant consists of the prefix \fB'0'\fP optionally
+followed by a sequence of the digits \fB'0'\fP to \fB'7'\fP only.
+A hexadecimal constant consists of the prefix 0x or 0X
+followed by a sequence of the decimal digits and letters \fB'a'\fP
+(or \fB'A'\fP ) to \fB'f'\fP (or \fB'F'\fP ) with
+values 10 to 15 respectively.
+.LP
+If the value of \fIbase\fP is between 2 and 36, the expected form
+of the subject sequence is a sequence of letters and digits
+representing an integer with the radix specified by \fIbase\fP, optionally
+preceded by a \fB'+'\fP or \fB'-'\fP sign. The
+letters from \fB'a'\fP (or \fB'A'\fP ) to \fB'z'\fP (or \fB'Z'\fP
+) inclusive are ascribed the values 10 to 35; only
+letters whose ascribed values are less than that of \fIbase\fP are
+permitted. If the value of \fIbase\fP is 16, the characters 0x
+or 0X may optionally precede the sequence of letters and digits, following
+the sign if present.
+.LP
+The subject sequence is defined as the longest initial subsequence
+of the input string, starting with the first non-white-space
+character that is of the expected form. The subject sequence shall
+contain no characters if the input string is empty or consists
+entirely of white-space characters, or if the first non-white-space
+character is other than a sign or a permissible letter or
+digit.
+.LP
+If the subject sequence has the expected form and the value of \fIbase\fP
+is 0, the sequence of characters starting with the
+first digit shall be interpreted as an integer constant. If the subject
+sequence has the expected form and the value of \fIbase\fP
+is between 2 and 36, it shall be used as the base for conversion,
+ascribing to each letter its value as given above. If the subject
+sequence begins with a minus sign, the value resulting from the conversion
+shall be negated. A pointer to the final string shall be
+stored in the object pointed to by \fIendptr\fP, provided that \fIendptr\fP
+is not a null pointer.
+.LP
+In other than the C or POSIX locales, other
+implementation-defined subject sequences may be accepted.
+.LP
+If the subject sequence is empty or does not have the expected form,
+no conversion shall be performed; the value of \fIstr\fP
+shall be stored in the object pointed to by \fIendptr\fP, provided
+that \fIendptr\fP is not a null pointer.
+.LP
+The
+\fIstrtoul\fP() function shall not change the setting of \fIerrno\fP
+if successful.
+.LP
+Since 0, {ULONG_MAX}, and {ULLONG_MAX} are returned on error and are
+also valid returns on success, an application wishing to
+check for error situations should set \fIerrno\fP to 0, then call
+\fIstrtoul\fP() or \fIstrtoull\fP(), then check \fIerrno\fP.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the converted
+value, if any. If no conversion could be performed, 0
+shall be returned and \fIerrno\fP may be set to [EINVAL]. If
+the
+correct value is outside the range of representable values, {ULONG_MAX}
+or {ULLONG_MAX} shall be returned and \fIerrno\fP set to
+[ERANGE].
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+.B EINVAL
+The value of \fIbase\fP is not supported.
+.TP 7
+.B ERANGE
+The value to be returned is not representable.
+.sp
+.LP
+These functions may fail if:
+.TP 7
+.B EINVAL
+No
+conversion could be performed.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIisalpha\fP(), \fIscanf\fP(), \fIstrtod\fP(), \fIstrtol\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/strtoull.3p b/man-pages-posix-2003/man3p/strtoull.3p
new file mode 100644
index 0000000..eb8b498
--- /dev/null
+++ b/man-pages-posix-2003/man3p/strtoull.3p
@@ -0,0 +1 @@
+.so man3p/strtoul.3p
diff --git a/man-pages-posix-2003/man3p/strtoumax.3p b/man-pages-posix-2003/man3p/strtoumax.3p
new file mode 100644
index 0000000..c9558ba
--- /dev/null
+++ b/man-pages-posix-2003/man3p/strtoumax.3p
@@ -0,0 +1 @@
+.so man3p/strtoimax.3p
diff --git a/man-pages-posix-2003/man3p/strxfrm.3p b/man-pages-posix-2003/man3p/strxfrm.3p
new file mode 100644
index 0000000..d81ba7e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/strxfrm.3p
@@ -0,0 +1,94 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "STRXFRM" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" strxfrm
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+strxfrm \- string transformation
+.SH SYNOPSIS
+.LP
+\fB#include <string.h>
+.br
+.sp
+size_t strxfrm(char *restrict\fP \fIs1\fP\fB, const char *restrict\fP
+\fIs2\fP\fB, size_t\fP \fIn\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIstrxfrm\fP() function shall transform the string pointed to
+by \fIs2\fP and place the resulting string into the array
+pointed to by \fIs1\fP. The transformation is such that if \fIstrcmp\fP()
+is applied to
+two transformed strings, it shall return a value greater than, equal
+to, or less than 0, corresponding to the result of \fIstrcoll\fP()
+applied to the same two original strings. No more than \fIn\fP bytes
+are placed
+into the resulting array pointed to by \fIs1\fP, including the terminating
+null byte. If \fIn\fP is 0, \fIs1\fP is permitted to
+be a null pointer. If copying takes place between objects that overlap,
+the behavior is undefined.
+.LP
+The
+\fIstrxfrm\fP() function shall not change the setting of \fIerrno\fP
+if successful.
+.LP
+Since no return value is reserved to indicate an error, an application
+wishing to check for error situations should set
+\fIerrno\fP to 0, then call \fIstrxfrm\fP(), then check \fIerrno\fP.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIstrxfrm\fP() shall return the length
+of the transformed string (not including the terminating
+null byte). If the value returned is \fIn\fP or more, the contents
+of the array pointed to by \fIs1\fP are unspecified.
+.LP
+On
+error, \fIstrxfrm\fP() may set \fIerrno\fP but no return value is
+reserved to indicate an error.
+.SH ERRORS
+.LP
+The \fIstrxfrm\fP() function may fail if:
+.TP 7
+.B EINVAL
+The string pointed to by the \fIs2\fP argument contains characters
+outside the domain of the collating sequence.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The transformation function is such that two transformed strings can
+be ordered by \fIstrcmp\fP() as appropriate to collating sequence
+information in the program's locale (category
+\fILC_COLLATE ).\fP
+.LP
+The fact that when \fIn\fP is 0 \fIs1\fP is permitted to be a null
+pointer is useful to determine the size of the \fIs1\fP
+array prior to making the transformation.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIstrcmp\fP(), \fIstrcoll\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<string.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/swab.3p b/man-pages-posix-2003/man3p/swab.3p
new file mode 100644
index 0000000..c411035
--- /dev/null
+++ b/man-pages-posix-2003/man3p/swab.3p
@@ -0,0 +1,65 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SWAB" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" swab
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+swab \- swap bytes
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+void swab(const void *restrict\fP \fIsrc\fP\fB, void *restrict\fP
+\fIdest\fP\fB,
+.br
+\ \ \ \ \ \ ssize_t\fP \fInbytes\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIswab\fP() function shall copy \fInbytes\fP bytes, which are
+pointed to by \fIsrc\fP, to the object pointed to by
+\fIdest\fP, exchanging adjacent bytes. The \fInbytes\fP argument should
+be even. If \fInbytes\fP is odd, \fIswab\fP() copies
+and exchanges \fInbytes\fP-1 bytes and the disposition of the last
+byte is unspecified. If copying takes place between objects
+that overlap, the behavior is undefined. If \fInbytes\fP is negative,
+\fIswab\fP() does nothing.
+.SH RETURN VALUE
+.LP
+None.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/swapcontext.3p b/man-pages-posix-2003/man3p/swapcontext.3p
new file mode 100644
index 0000000..974f94a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/swapcontext.3p
@@ -0,0 +1 @@
+.so man3p/makecontext.3p
diff --git a/man-pages-posix-2003/man3p/swprintf.3p b/man-pages-posix-2003/man3p/swprintf.3p
new file mode 100644
index 0000000..2298188
--- /dev/null
+++ b/man-pages-posix-2003/man3p/swprintf.3p
@@ -0,0 +1 @@
+.so man3p/wprintf.3p
diff --git a/man-pages-posix-2003/man3p/swscanf.3p b/man-pages-posix-2003/man3p/swscanf.3p
new file mode 100644
index 0000000..672fbc2
--- /dev/null
+++ b/man-pages-posix-2003/man3p/swscanf.3p
@@ -0,0 +1 @@
+.so man3p/wscanf.3p
diff --git a/man-pages-posix-2003/man3p/symlink.3p b/man-pages-posix-2003/man3p/symlink.3p
new file mode 100644
index 0000000..a50abf3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/symlink.3p
@@ -0,0 +1,131 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SYMLINK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" symlink
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+symlink \- make a symbolic link to a file
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+int symlink(const char *\fP\fIpath1\fP\fB, const char *\fP\fIpath2\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsymlink\fP() function shall create a symbolic link called \fIpath2\fP
+that contains the string pointed to by
+\fIpath1\fP ( \fIpath2\fP is the name of the symbolic link created,
+\fIpath1\fP is the string contained in the symbolic
+link).
+.LP
+The string pointed to by \fIpath1\fP shall be treated only as a character
+string and shall not be validated as a pathname.
+.LP
+If the \fIsymlink\fP() function fails for any reason other than [EIO],
+any file named by \fIpath2\fP shall be unaffected.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIsymlink\fP() shall return 0; otherwise,
+it shall return -1 and set \fIerrno\fP to indicate the
+error.
+.SH ERRORS
+.LP
+The \fIsymlink\fP() function shall fail if:
+.TP 7
+.B EACCES
+Write permission is denied in the directory where the symbolic link
+is being created, or search permission is denied for a
+component of the path prefix of \fIpath2\fP.
+.TP 7
+.B EEXIST
+The \fIpath2\fP argument names an existing file or symbolic link.
+.TP 7
+.B EIO
+An I/O error occurs while reading from or writing to the file system.
+.TP 7
+.B ELOOP
+A loop exists in symbolic links encountered during resolution of the
+\fIpath2\fP argument.
+.TP 7
+.B ENAMETOOLONG
+The length of the \fIpath2\fP argument exceeds {PATH_MAX} or a pathname
+component is longer than {NAME_MAX} or the length of the
+\fIpath1\fP argument is longer than {SYMLINK_MAX}.
+.TP 7
+.B ENOENT
+A component of \fIpath2\fP does not name an existing file or \fIpath2\fP
+is an empty string.
+.TP 7
+.B ENOSPC
+The directory in which the entry for the new symbolic link is being
+placed cannot be extended because no space is left on the
+file system containing the directory, or the new symbolic link cannot
+be created because no space is left on the file system which
+shall contain the link, or the file system is out of file-allocation
+resources.
+.TP 7
+.B ENOTDIR
+A component of the path prefix of \fIpath2\fP is not a directory.
+.TP 7
+.B EROFS
+The new symbolic link would reside on a read-only file system.
+.sp
+.LP
+The \fIsymlink\fP() function may fail if:
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the \fIpath2\fP argument.
+.TP 7
+.B ENAMETOOLONG
+As a result of encountering a symbolic link in resolution of the \fIpath2\fP
+argument, the length of the substituted pathname
+string exceeded {PATH_MAX} bytes (including the terminating null byte),
+or the length of the string pointed to by \fIpath1\fP
+exceeded {SYMLINK_MAX}.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Like a hard link, a symbolic link allows a file to have multiple logical
+names. The presence of a hard link guarantees the
+existence of a file, even after the original name has been removed.
+A symbolic link provides no such assurance; in fact, the file
+named by the \fIpath1\fP argument need not exist when the link is
+created. A symbolic link can cross file system boundaries.
+.LP
+Normal permission checks are made on each component of the symbolic
+link pathname during its resolution.
+.SH RATIONALE
+.LP
+Since IEEE\ Std\ 1003.1-2001 does not require any association of file
+times with symbolic links, there is no requirement
+that file times be updated by \fIsymlink\fP().
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIlchown\fP(), \fIlink\fP(), \fIlstat\fP(), \fIopen\fP(), \fIreadlink\fP(),
+\fIunlink\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sync.3p b/man-pages-posix-2003/man3p/sync.3p
new file mode 100644
index 0000000..9284d45
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sync.3p
@@ -0,0 +1,61 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SYNC" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sync
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sync \- schedule file system updates
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+void sync(void); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsync\fP() function shall cause all information in memory that
+updates file systems to be scheduled for writing out to
+all file systems.
+.LP
+The writing, although scheduled, is not necessarily complete upon
+return from \fIsync\fP().
+.SH RETURN VALUE
+.LP
+The \fIsync\fP() function shall not return a value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfsync\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/sysconf.3p b/man-pages-posix-2003/man3p/sysconf.3p
new file mode 100644
index 0000000..3f3985d
--- /dev/null
+++ b/man-pages-posix-2003/man3p/sysconf.3p
@@ -0,0 +1,313 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SYSCONF" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" sysconf
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+sysconf \- get configurable system variables
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+long sysconf(int\fP \fIname\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsysconf\fP() function provides a method for the application
+to determine the current value of a configurable system
+limit or option ( \fIvariable\fP). The implementation shall support
+all of the variables listed in the following table and may
+support others.
+.LP
+The \fIname\fP argument represents the system variable to be queried.
+The following table lists the minimal set of system
+variables from \fI<limits.h>\fP or \fI<unistd.h>\fP that can be returned
+by \fIsysconf\fP(), and the symbolic constants
+defined in \fI<unistd.h>\fP that are the corresponding values used
+for
+\fIname\fP.
+.TS C
+center; l1 l.
+\fBVariable\fP \fBValue of Name\fP
+{AIO_LISTIO_MAX} _SC_AIO_LISTIO_MAX
+{AIO_MAX} _SC_AIO_MAX
+{AIO_PRIO_DELTA_MAX} _SC_AIO_PRIO_DELTA_MAX
+{ARG_MAX} _SC_ARG_MAX
+{ATEXIT_MAX} _SC_ATEXIT_MAX
+{BC_BASE_MAX} _SC_BC_BASE_MAX
+{BC_DIM_MAX} _SC_BC_DIM_MAX
+{BC_SCALE_MAX} _SC_BC_SCALE_MAX
+{BC_STRING_MAX} _SC_BC_STRING_MAX
+{CHILD_MAX} _SC_CHILD_MAX
+Clock ticks/second _SC_CLK_TCK
+{COLL_WEIGHTS_MAX} _SC_COLL_WEIGHTS_MAX
+{DELAYTIMER_MAX} _SC_DELAYTIMER_MAX
+{EXPR_NEST_MAX} _SC_EXPR_NEST_MAX
+{HOST_NAME_MAX} _SC_HOST_NAME_MAX
+{IOV_MAX} _SC_IOV_MAX
+{LINE_MAX} _SC_LINE_MAX
+{LOGIN_NAME_MAX} _SC_LOGIN_NAME_MAX
+{NGROUPS_MAX} _SC_NGROUPS_MAX
+Maximum size of \fIgetgrgid_r\fP() and _SC_GETGR_R_SIZE_MAX
+\fIgetgrnam_r\fP() data buffers \
+Maximum size of \fIgetpwuid_r\fP() and _SC_GETPW_R_SIZE_MAX
+\fIgetpwnam_r\fP() data buffers \
+{MQ_OPEN_MAX} _SC_MQ_OPEN_MAX
+{MQ_PRIO_MAX} _SC_MQ_PRIO_MAX
+{OPEN_MAX} _SC_OPEN_MAX
+_POSIX_ADVISORY_INFO _SC_ADVISORY_INFO
+_POSIX_BARRIERS _SC_BARRIERS
+_POSIX_ASYNCHRONOUS_IO _SC_ASYNCHRONOUS_IO
+_POSIX_CLOCK_SELECTION _SC_CLOCK_SELECTION
+_POSIX_CPUTIME _SC_CPUTIME
+_POSIX_FILE_LOCKING _SC_FILE_LOCKING
+_POSIX_FSYNC _SC_FSYNC
+_POSIX_IPV6 _SC_IPV6
+_POSIX_JOB_CONTROL _SC_JOB_CONTROL
+_POSIX_MAPPED_FILES _SC_MAPPED_FILES
+_POSIX_MEMLOCK _SC_MEMLOCK
+_POSIX_MEMLOCK_RANGE _SC_MEMLOCK_RANGE
+_POSIX_MEMORY_PROTECTION _SC_MEMORY_PROTECTION
+_POSIX_MESSAGE_PASSING _SC_MESSAGE_PASSING
+_POSIX_MONOTONIC_CLOCK _SC_MONOTONIC_CLOCK
+_POSIX_MULTI_PROCESS _SC_MULTI_PROCESS
+_POSIX_PRIORITIZED_IO _SC_PRIORITIZED_IO
+_POSIX_PRIORITY_SCHEDULING _SC_PRIORITY_SCHEDULING
+_POSIX_RAW_SOCKETS _SC_RAW_SOCKETS
+_POSIX_READER_WRITER_LOCKS _SC_READER_WRITER_LOCKS
+_POSIX_REALTIME_SIGNALS _SC_REALTIME_SIGNALS
+_POSIX_REGEXP _SC_REGEXP
+_POSIX_SAVED_IDS _SC_SAVED_IDS
+_POSIX_SEMAPHORES _SC_SEMAPHORES
+_POSIX_SHARED_MEMORY_OBJECTS _SC_SHARED_MEMORY_OBJECTS
+_POSIX_SHELL _SC_SHELL
+_POSIX_SPAWN _SC_SPAWN
+_POSIX_SPIN_LOCKS _SC_SPIN_LOCKS
+_POSIX_SPORADIC_SERVER _SC_SPORADIC_SERVER
+_POSIX_SYMLOOP_MAX _SC_SYMLOOP_MAX
+_POSIX_SYNCHRONIZED_IO _SC_SYNCHRONIZED_IO
+_POSIX_THREAD_ATTR_STACKADDR _SC_THREAD_ATTR_STACKADDR
+_POSIX_THREAD_ATTR_STACKSIZE _SC_THREAD_ATTR_STACKSIZE
+_POSIX_THREAD_CPUTIME _SC_THREAD_CPUTIME
+_POSIX_THREAD_PRIO_INHERIT _SC_THREAD_PRIO_INHERIT
+_POSIX_THREAD_PRIO_PROTECT _SC_THREAD_PRIO_PROTECT
+_POSIX_THREAD_PRIORITY_SCHEDULING _SC_THREAD_PRIORITY_SCHEDULING
+_POSIX_THREAD_PROCESS_SHARED _SC_THREAD_PROCESS_SHARED
+_POSIX_THREAD_SAFE_FUNCTIONS _SC_THREAD_SAFE_FUNCTIONS
+_POSIX_THREAD_SPORADIC_SERVER _SC_THREAD_SPORADIC_SERVER
+_POSIX_THREADS _SC_THREADS
+_POSIX_TIMEOUTS _SC_TIMEOUTS
+_POSIX_TIMERS _SC_TIMERS
+_POSIX_TRACE _SC_TRACE
+_POSIX_TRACE_EVENT_FILTER _SC_TRACE_EVENT_FILTER
+_POSIX_TRACE_INHERIT _SC_TRACE_INHERIT
+_POSIX_TRACE_LOG _SC_TRACE_LOG
+_POSIX_TYPED_MEMORY_OBJECTS _SC_TYPED_MEMORY_OBJECTS
+_POSIX_VERSION _SC_VERSION
+_POSIX_V6_ILP32_OFF32 _SC_V6_ILP32_OFF32
+_POSIX_V6_ILP32_OFFBIG _SC_V6_ILP32_OFFBIG
+_POSIX_V6_LP64_OFF64 _SC_V6_LP64_OFF64
+_POSIX_V6_LPBIG_OFFBIG _SC_V6_LPBIG_OFFBIG
+_POSIX2_C_BIND _SC_2_C_BIND
+_POSIX2_C_DEV _SC_2_C_DEV
+_POSIX2_C_VERSION _SC_2_C_VERSION
+_POSIX2_CHAR_TERM _SC_2_CHAR_TERM
+_POSIX2_FORT_DEV _SC_2_FORT_DEV
+_POSIX2_FORT_RUN _SC_2_FORT_RUN
+_POSIX2_LOCALEDEF _SC_2_LOCALEDEF
+_POSIX2_PBS _SC_2_PBS
+_POSIX2_PBS_ACCOUNTING _SC_2_PBS_ACCOUNTING
+_POSIX2_PBS_CHECKPOINT _SC_2_PBS_CHECKPOINT
+_POSIX2_PBS_LOCATE _SC_2_PBS_LOCATE
+_POSIX2_PBS_MESSAGE _SC_2_PBS_MESSAGE
+_POSIX2_PBS_TRACK _SC_2_PBS_TRACK
+_POSIX2_SW_DEV _SC_2_SW_DEV
+_POSIX2_UPE _SC_2_UPE
+_POSIX2_VERSION _SC_2_VERSION
+_REGEX_VERSION _SC_REGEX_VERSION
+{PAGE_SIZE} _SC_PAGE_SIZE
+{PAGESIZE} _SC_PAGESIZE
+{PTHREAD_DESTRUCTOR_ITERATIONS} _SC_THREAD_DESTRUCTOR_ITERATIONS
+{PTHREAD_KEYS_MAX} _SC_THREAD_KEYS_MAX
+{PTHREAD_STACK_MIN} _SC_THREAD_STACK_MIN
+{PTHREAD_THREADS_MAX} _SC_THREAD_THREADS_MAX
+{RE_DUP_MAX} _SC_RE_DUP_MAX
+{RTSIG_MAX} _SC_RTSIG_MAX
+{SEM_NSEMS_MAX} _SC_SEM_NSEMS_MAX
+{SEM_VALUE_MAX} _SC_SEM_VALUE_MAX
+{SIGQUEUE_MAX} _SC_SIGQUEUE_MAX
+{STREAM_MAX} _SC_STREAM_MAX
+{SYMLOOP_MAX} _SC_SYMLOOP_MAX
+{TIMER_MAX} _SC_TIMER_MAX
+{TTY_NAME_MAX} _SC_TTY_NAME_MAX
+{TZNAME_MAX} _SC_TZNAME_MAX
+_XBS5_ILP32_OFF32 (\fBLEGACY\fP) _SC_XBS5_ILP32_OFF32 (\fBLEGACY\fP)
+_XBS5_ILP32_OFFBIG (\fBLEGACY\fP) _SC_XBS5_ILP32_OFFBIG (\fBLEGACY\fP)
+_XBS5_LP64_OFF64 (\fBLEGACY\fP) _SC_XBS5_LP64_OFF64 (\fBLEGACY\fP)
+_XBS5_LPBIG_OFFBIG (\fBLEGACY\fP) _SC_XBS5_LPBIG_OFFBIG (\fBLEGACY\fP)
+_XOPEN_CRYPT _SC_XOPEN_CRYPT
+_XOPEN_ENH_I18N _SC_XOPEN_ENH_I18N
+_XOPEN_LEGACY _SC_XOPEN_LEGACY
+_XOPEN_REALTIME _SC_XOPEN_REALTIME
+_XOPEN_REALTIME_THREADS _SC_XOPEN_REALTIME_THREADS
+_XOPEN_SHM _SC_XOPEN_SHM
+_XOPEN_STREAMS _SC_XOPEN_STREAMS
+_XOPEN_UNIX _SC_XOPEN_UNIX
+_XOPEN_VERSION _SC_XOPEN_VERSION
+_XOPEN_XCU_VERSION _SC_XOPEN_XCU_VERSION
+.TE
+.SH RETURN VALUE
+.LP
+If \fIname\fP is an invalid value, \fIsysconf\fP() shall return -1
+and set \fIerrno\fP to indicate the error. If the variable
+corresponding to \fIname\fP has no limit, \fIsysconf\fP() shall return
+-1 without changing the value of \fIerrno\fP. Note that
+indefinite limits do not imply infinite limits; see \fI<limits.h>\fP.
+.LP
+Otherwise, \fIsysconf\fP() shall return the current variable value
+on the system. The value returned shall not be more
+restrictive than the corresponding value described to the application
+when it was compiled with the implementation's \fI<limits.h>\fP or
+\fI<unistd.h>\fP. The
+value shall not change during the lifetime of the calling process,
+\ except that \fIsysconf\fP(_SC_OPEN_MAX) may return different
+values before and after a call to \fIsetrlimit\fP() which changes
+the RLIMIT_NOFILE soft
+limit.
+.SH ERRORS
+.LP
+The \fIsysconf\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The value of the \fIname\fP argument is invalid.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+As -1 is a permissible return value in a successful situation, an
+application wishing to check for error situations should set
+\fIerrno\fP to 0, then call \fIsysconf\fP(), and, if it returns -1,
+check to see if \fIerrno\fP is non-zero.
+.LP
+If the value of \fIsysconf\fP(_SC_2_VERSION) is not equal to the value
+of the _POSIX2_VERSION symbolic constant, the utilities
+available via \fIsystem\fP() or \fIpopen\fP() might
+not behave as described in the Shell and Utilities volume of IEEE\ Std\ 1003.1-2001.
+This would mean that the application
+is not running in an environment that conforms to the Shell and Utilities
+volume of IEEE\ Std\ 1003.1-2001. Some
+applications might be able to deal with this, others might not. However,
+the functions defined in this volume of
+IEEE\ Std\ 1003.1-2001 continue to operate as specified, even if \fIsysconf\fP(_SC_2_VERSION)
+reports that the utilities
+no longer perform as specified.
+.SH RATIONALE
+.LP
+This functionality was added in response to requirements of application
+developers and of system vendors who deal with many
+international system configurations. It is closely related to \fIpathconf\fP()
+and \fIfpathconf\fP().
+.LP
+Although a conforming application can run on all systems by never
+demanding more resources than the minimum values published in
+this volume of IEEE\ Std\ 1003.1-2001, it is useful for that application
+to be able to use the actual value for the
+quantity of a resource available on any given system. To do this,
+the application makes use of the value of a symbolic constant in
+\fI<limits.h>\fP or \fI<unistd.h>\fP.
+.LP
+However, once compiled, the application must still be able to cope
+if the amount of resource available is increased. To that
+end, an application may need a means of determining the quantity of
+a resource, or the presence of an option, at execution
+time.
+.LP
+Two examples are offered:
+.IP " 1." 4
+Applications may wish to act differently on systems with or without
+job control. Applications vendors who wish to distribute
+only a single binary package to all instances of a computer architecture
+would be forced to assume job control is never available
+if it were to rely solely on the \fI<unistd.h>\fP value published
+in this volume of
+IEEE\ Std\ 1003.1-2001.
+.LP
+.IP " 2." 4
+International applications vendors occasionally require knowledge
+of the number of clock ticks per second. Without these
+facilities, they would be required to either distribute their applications
+partially in source form or to have 50 Hz and 60 Hz
+versions for the various countries in which they operate.
+.LP
+.LP
+It is the knowledge that many applications are actually distributed
+widely in executable form that leads to this facility. If
+limited to the most restrictive values in the headers, such applications
+would have to be prepared to accept the most limited
+environments offered by the smallest microcomputers. Although this
+is entirely portable, there was a consensus that they should be
+able to take advantage of the facilities offered by large systems,
+without the restrictions associated with source and object
+distributions.
+.LP
+During the discussions of this feature, it was pointed out that it
+is almost always possible for an application to discern what
+a value might be at runtime by suitably testing the various functions
+themselves. And, in any event, it could always be written to
+adequately deal with error returns from the various functions. In
+the end, it was felt that this imposed an unreasonable level of
+complication and sophistication on the application writer.
+.LP
+This runtime facility is not meant to provide ever-changing values
+that applications have to check multiple times. The values
+are seen as changing no more frequently than once per system initialization,
+such as by a system administrator or operator with an
+automatic configuration program. This volume of IEEE\ Std\ 1003.1-2001
+specifies that they shall not change within the
+lifetime of the process.
+.LP
+Some values apply to the system overall and others vary at the file
+system or directory level. The latter are described in \fIpathconf\fP()
+\&.
+.LP
+Note that all values returned must be expressible as integers. String
+values were considered, but the additional flexibility of
+this approach was rejected due to its added complexity of implementation
+and use.
+.LP
+Some values, such as {PATH_MAX}, are sometimes so large that they
+must not be used to, say, allocate arrays. The
+\fIsysconf\fP() function returns a negative value to show that this
+symbolic constant is not even defined in this case.
+.LP
+Similar to \fIpathconf\fP(), this permits the implementation not to
+have a limit. When
+one resource is infinite, returning an error indicating that some
+other resource limit has been reached is conforming behavior.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIconfstr\fP(), \fIpathconf\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<limits.h>\fP, \fI<unistd.h>\fP, the Shell
+and Utilities volume of IEEE\ Std\ 1003.1-2001, \fIgetconf\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/syslog.3p b/man-pages-posix-2003/man3p/syslog.3p
new file mode 100644
index 0000000..aa11b64
--- /dev/null
+++ b/man-pages-posix-2003/man3p/syslog.3p
@@ -0,0 +1,266 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "CLOSELOG" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" closelog
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+closelog, openlog, setlogmask, syslog \- control system log
+.SH SYNOPSIS
+.LP
+\fB#include <syslog.h>
+.br
+.sp
+void closelog(void);
+.br
+void openlog(const char *\fP\fIident\fP\fB, int\fP \fIlogopt\fP\fB,
+int\fP \fIfacility\fP\fB);
+.br
+int setlogmask(int\fP \fImaskpri\fP\fB);
+.br
+void syslog(int\fP \fIpriority\fP\fB, const char *\fP\fImessage\fP\fB,
+\&... /*\fP \fIarguments\fP \fB*/); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIsyslog\fP() function shall send a message to an implementation-defined
+logging facility, which may log it in an
+implementation-defined system log, write it to the system console,
+forward it to a list of users, or forward it to the logging
+facility on another host over the network. The logged message shall
+include a message header and a message body. The message header
+contains at least a timestamp and a tag string.
+.LP
+The message body is generated from the \fImessage\fP and following
+arguments in the same manner as if these were arguments to
+\fIprintf\fP(), except that the additional conversion specification
+\fB%m\fP shall be
+recognized; it shall convert no arguments, shall cause the output
+of the error message string associated with the value of
+\fIerrno\fP on entry to \fIsyslog\fP(), and may be mixed with argument
+specifications of the \fB"%\fP\fIn\fP\fB$"\fP form.
+If a complete conversion specification with the \fBm\fP conversion
+specifier character is not just \fB%m\fP, the behavior is
+undefined. A trailing <newline> may be added if needed.
+.LP
+Values of the \fIpriority\fP argument are formed by OR'ing together
+a severity-level value and an optional facility value. If
+no facility value is specified, the current default facility value
+is used.
+.LP
+Possible values of severity level include:
+.TP 7
+LOG_EMERG
+A panic condition.
+.TP 7
+LOG_ALERT
+A condition that should be corrected immediately, such as a corrupted
+system database.
+.TP 7
+LOG_CRIT
+Critical conditions, such as hard device errors.
+.TP 7
+LOG_ERR
+Errors.
+.TP 7
+LOG_WARNING
+.sp
+Warning messages.
+.TP 7
+LOG_NOTICE
+Conditions that are not error conditions, but that may require special
+handling.
+.TP 7
+LOG_INFO
+Informational messages.
+.TP 7
+LOG_DEBUG
+Messages that contain information normally of use only when debugging
+a program.
+.sp
+.LP
+The facility indicates the application or system component generating
+the message. Possible facility values include:
+.TP 7
+LOG_USER
+Messages generated by arbitrary processes. This is the default facility
+identifier if none is specified.
+.TP 7
+LOG_LOCAL0
+Reserved for local use.
+.TP 7
+LOG_LOCAL1
+Reserved for local use.
+.TP 7
+LOG_LOCAL2
+Reserved for local use.
+.TP 7
+LOG_LOCAL3
+Reserved for local use.
+.TP 7
+LOG_LOCAL4
+Reserved for local use.
+.TP 7
+LOG_LOCAL5
+Reserved for local use.
+.TP 7
+LOG_LOCAL6
+Reserved for local use.
+.TP 7
+LOG_LOCAL7
+Reserved for local use.
+.sp
+.LP
+The \fIopenlog\fP() function shall set process attributes that affect
+subsequent calls to \fIsyslog\fP(). The \fIident\fP
+argument is a string that is prepended to every message. The \fIlogopt\fP
+argument indicates logging options. Values for
+\fIlogopt\fP are constructed by a bitwise-inclusive OR of zero or
+more of the following:
+.TP 7
+LOG_PID
+Log the process ID with each message. This is useful for identifying
+specific processes.
+.TP 7
+LOG_CONS
+Write messages to the system console if they cannot be sent to the
+logging facility. The \fIsyslog\fP() function ensures that
+the process does not acquire the console as a controlling terminal
+in the process of writing the message.
+.TP 7
+LOG_NDELAY
+Open the connection to the logging facility immediately. Normally
+the open is delayed until the first message is logged. This
+is useful for programs that need to manage the order in which file
+descriptors are allocated.
+.TP 7
+LOG_ODELAY
+Delay open until \fIsyslog\fP() is called.
+.TP 7
+LOG_NOWAIT
+Do not wait for child processes that may have been created during
+the course of logging the message. This option should be used
+by processes that enable notification of child termination using SIGCHLD,
+since \fIsyslog\fP() may otherwise block waiting for a
+child whose exit status has already been collected.
+.sp
+.LP
+The \fIfacility\fP argument encodes a default facility to be assigned
+to all messages that do not have an explicit facility
+already encoded. The initial default facility is LOG_USER.
+.LP
+The \fIopenlog\fP() and \fIsyslog\fP() functions may allocate a file
+descriptor. It is not necessary to call \fIopenlog\fP()
+prior to calling \fIsyslog\fP().
+.LP
+The \fIcloselog\fP() function shall close any open file descriptors
+allocated by previous calls to \fIopenlog\fP() or
+\fIsyslog\fP().
+.LP
+The \fIsetlogmask\fP() function shall set the log priority mask for
+the current process to \fImaskpri\fP and return the
+previous mask. If the \fImaskpri\fP argument is 0, the current log
+mask is not modified. Calls by the current process to
+\fIsyslog\fP() with a priority not set in \fImaskpri\fP shall be rejected.
+The default log mask allows all priorities to be
+logged. A call to \fIopenlog\fP() is not required prior to calling
+\fIsetlogmask\fP().
+.LP
+Symbolic constants for use as values of the \fIlogopt\fP, \fIfacility\fP,
+\fIpriority\fP, and \fImaskpri\fP arguments are
+defined in the \fI<syslog.h>\fP header.
+.SH RETURN VALUE
+.LP
+The \fIsetlogmask\fP() function shall return the previous log priority
+mask. The \fIcloselog\fP(), \fIopenlog\fP(), and
+\fIsyslog\fP() functions shall not return a value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Using openlog()
+.LP
+The following example causes subsequent calls to \fIsyslog\fP() to
+log the process ID with each message, and to write messages
+to the system console if they cannot be sent to the logging facility.
+.sp
+.RS
+.nf
+
+\fB#include <syslog.h>
+.sp
+
+char *ident = "Process demo";
+int logopt = LOG_PID | LOG_CONS;
+int facility = LOG_USER;
+\&...
+openlog(ident, logopt, facility);
+\fP
+.fi
+.RE
+.SS Using setlogmask()
+.LP
+The following example causes subsequent calls to \fIsyslog\fP() to
+accept error messages, and to reject all other messages.
+.sp
+.RS
+.nf
+
+\fB#include <syslog.h>
+.sp
+
+int result;
+int mask = LOG_MASK (LOG_ERR);
+\&...
+result = setlogmask(mask);
+\fP
+.fi
+.RE
+.SS Using syslog
+.LP
+The following example sends the message \fB"This is a message"\fP
+to the default logging facility, marking the message as an
+error message generated by random processes.
+.sp
+.RS
+.nf
+
+\fB#include <syslog.h>
+.sp
+
+char *message = "This is a message";
+int priority = LOG_ERR | LOG_USER;
+\&...
+syslog(priority, message);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIprintf\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<syslog.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/system.3p b/man-pages-posix-2003/man3p/system.3p
new file mode 100644
index 0000000..51fbec2
--- /dev/null
+++ b/man-pages-posix-2003/man3p/system.3p
@@ -0,0 +1,320 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "SYSTEM" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" system
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+system \- issue a command
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+int system(const char *\fP\fIcommand\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+If \fIcommand\fP is a null pointer, the \fIsystem\fP() function shall
+determine whether the host environment has a command
+processor. If \fIcommand\fP is not a null pointer, the \fIsystem\fP()
+function shall pass the string pointed to by \fIcommand\fP
+to that command processor to be executed in an implementation-defined
+manner; this might then cause the program calling
+\fIsystem\fP() to behave in a non-conforming manner or to terminate.
+.LP
+The
+environment of the executed command shall be as if a child process
+were created using \fIfork\fP(), and the child process invoked the
+\fIsh\fP utility
+using \fIexecl\fP() as follows:
+.sp
+.RS
+.nf
+
+\fBexecl(<\fP\fIshell path\fP\fB>, "sh", "-c",\fP \fIcommand\fP\fB, (char *)0);
+\fP
+.fi
+.RE
+.LP
+where <\fIshell path\fP> is an unspecified pathname for the \fIsh\fP
+utility.
+.LP
+The \fIsystem\fP() function shall ignore the SIGINT and SIGQUIT signals,
+and shall block the SIGCHLD signal, while waiting for
+the command to terminate. If this might cause the application to miss
+a signal that would have killed it, then the application
+should examine the return value from \fIsystem\fP() and take whatever
+action is appropriate to the application if the command
+terminated due to receipt of a signal.
+.LP
+The \fIsystem\fP() function shall not affect the termination status
+of any child of the calling processes other than the
+process or processes it itself creates.
+.LP
+The \fIsystem\fP() function shall not return until the child process
+has terminated.
+.SH RETURN VALUE
+.LP
+If \fIcommand\fP is a null pointer, \fIsystem\fP() shall return non-zero
+to indicate that a command processor is available, or
+zero if none is available. The \fIsystem\fP() function shall always
+return non-zero when \fIcommand\fP is NULL.
+.LP
+If
+\fIcommand\fP is not a null pointer, \fIsystem\fP() shall return the
+termination status of the command language interpreter in
+the format specified by \fIwaitpid\fP(). The termination status shall
+be as defined for
+the \fIsh\fP utility; otherwise, the termination status is unspecified.
+If some error prevents
+the command language interpreter from executing after the child process
+is created, the return value from \fIsystem\fP() shall be
+as if the command language interpreter had terminated using \fIexit\fP(127)
+or \fI_exit\fP(127). If a child process cannot be
+created, or if the termination status for the command language interpreter
+cannot be obtained, \fIsystem\fP() shall return -1 and
+set \fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The
+\fIsystem\fP() function may set \fIerrno\fP values as described by
+\fIfork\fP().
+.LP
+In addition, \fIsystem\fP() may fail if:
+.TP 7
+.B ECHILD
+The status of the child process created by \fIsystem\fP() is no longer
+available.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+If the return value of \fIsystem\fP() is not -1, its value can be
+decoded through the use of the macros described in \fI<sys/wait.h>\fP.
+For convenience, these macros are also provided in \fI<stdlib.h>\fP.
+.LP
+Note that, while \fIsystem\fP() must ignore SIGINT and SIGQUIT and
+block SIGCHLD while waiting for the child to terminate, the
+handling of signals in the executed command is as specified by \fIfork\fP()
+and \fIexec\fP. For example, if SIGINT is being caught or is set to
+SIG_DFL when \fIsystem\fP() is called,
+then the child is started with SIGINT handling set to SIG_DFL.
+.LP
+Ignoring SIGINT and SIGQUIT in the parent process prevents coordination
+problems (two processes reading from the same terminal,
+for example) when the executed command ignores or catches one of the
+signals. It is also usually the correct action when the user
+has given a command to the application to be executed synchronously
+(as in the \fB'!'\fP command in many interactive
+applications). In either case, the signal should be delivered only
+to the child process, not to the application itself. There is
+one situation where ignoring the signals might have less than the
+desired effect. This is when the application uses \fIsystem\fP()
+to perform some task invisible to the user. If the user typed the
+interrupt character ( \fB"^C"\fP, for example) while
+\fIsystem\fP() is being used in this way, one would expect the application
+to be killed, but only the executed command is killed.
+Applications that use \fIsystem\fP() in this way should carefully
+check the return status from \fIsystem\fP() to see if the
+executed command was successful, and should take appropriate action
+when the command fails.
+.LP
+Blocking SIGCHLD while waiting for the child to terminate prevents
+the application from catching the signal and obtaining status
+from \fIsystem\fP()'s child process before \fIsystem\fP() can get
+the status itself.
+.LP
+The context in which the utility is ultimately executed may differ
+from that in which \fIsystem\fP() was called. For example,
+file descriptors that have the FD_CLOEXEC flag set are closed, and
+the process ID and parent process ID are different. Also, if the
+executed utility changes its environment variables or its current
+working directory, that change is not reflected in the caller's
+context.
+.LP
+There is no defined way for an application to find the specific path
+for the shell. However, \fIconfstr\fP() can provide a value for \fIPATH\fP
+that is guaranteed to find the \fIsh\fP utility.
+.SH RATIONALE
+.LP
+The \fIsystem\fP() function should not be used by programs that have
+set user (or group) ID privileges. The \fIfork\fP() and \fIexec\fP
+family of functions (except \fIexeclp\fP() and \fIexecvp\fP()), should
+be used
+instead. This prevents any unforeseen manipulation of the environment
+of the user that could cause execution of commands not
+anticipated by the calling program.
+.LP
+There are three levels of specification for the \fIsystem\fP() function.
+The ISO\ C standard gives the most basic. It
+requires that the function exists, and defines a way for an application
+to query whether a command language interpreter exists. It
+says nothing about the command language or the environment in which
+the command is interpreted.
+.LP
+IEEE\ Std\ 1003.1-2001 places additional restrictions on \fIsystem\fP().
+It requires that if there is a command
+language interpreter, the environment must be as specified by \fIfork\fP()
+and \fIexec\fP. This ensures, for example, that close-on- \fIexec\fP
+works, that file locks are not inherited, and that the process ID
+is different. It also specifies the return value from
+\fIsystem\fP() when the command line can be run, thus giving the application
+some information about the command's completion
+status.
+.LP
+Finally, IEEE\ Std\ 1003.1-2001 requires the command to be interpreted
+as in the shell command language defined in the
+Shell and Utilities volume of IEEE\ Std\ 1003.1-2001.
+.LP
+Note that, \fIsystem\fP(NULL) is required to return non-zero, indicating
+that there is a command language interpreter. At first
+glance, this would seem to conflict with the ISO\ C standard which
+allows \fIsystem\fP(NULL) to return zero. There is no
+conflict, however. A system must have a command language interpreter,
+and is non-conforming if none is present. It is therefore
+permissible for the \fIsystem\fP() function on such a system to implement
+the behavior specified by the ISO\ C standard as
+long as it is understood that the implementation does not conform
+to IEEE\ Std\ 1003.1-2001 if \fIsystem\fP(NULL) returns
+zero.
+.LP
+It was explicitly decided that when \fIcommand\fP is NULL, \fIsystem\fP()
+should not be required to check to make sure that
+the command language interpreter actually exists with the correct
+mode, that there are enough processes to execute it, and so on.
+The call \fIsystem\fP(NULL) could, theoretically, check for such problems
+as too many existing child processes, and return zero.
+However, it would be inappropriate to return zero due to such a (presumably)
+transient condition. If some condition exists that is
+not under the control of this application and that would cause any
+\fIsystem\fP() call to fail, that system has been rendered
+non-conforming.
+.LP
+Early drafts required, or allowed, \fIsystem\fP() to return with \fIerrno\fP
+set to [EINTR] if it was interrupted with a
+signal. This error return was removed, and a requirement that \fIsystem\fP()
+not return until the child has terminated was added.
+This means that if a \fIwaitpid\fP() call in \fIsystem\fP() exits
+with \fIerrno\fP set
+to [EINTR], \fIsystem\fP() must reissue the \fIwaitpid\fP(). This
+change was made for two
+reasons:
+.IP " 1." 4
+There is no way for an application to clean up if \fIsystem\fP() returns
+[EINTR], short of calling \fIwait\fP(), and that could have the undesirable
+effect of returning the status of children other
+than the one started by \fIsystem\fP().
+.LP
+.IP " 2." 4
+While it might require a change in some historical implementations,
+those implementations already have to be changed because
+they use \fIwait\fP() instead of \fIwaitpid\fP().
+.LP
+.LP
+Note that if the application is catching SIGCHLD signals, it will
+receive such a signal before a successful \fIsystem\fP() call
+returns.
+.LP
+To conform to IEEE\ Std\ 1003.1-2001, \fIsystem\fP() must use \fIwaitpid\fP(),
+or some similar function, instead of \fIwait\fP().
+.LP
+The following code sample illustrates how \fIsystem\fP() might be
+implemented on an implementation conforming to
+IEEE\ Std\ 1003.1-2001.
+.sp
+.RS
+.nf
+
+\fB#include <signal.h>
+int system(const char *cmd)
+{
+ int stat;
+ pid_t pid;
+ struct sigaction sa, savintr, savequit;
+ sigset_t saveblock;
+ if (cmd == NULL)
+ return(1);
+ sa.sa_handler = SIG_IGN;
+ sigemptyset(&sa.sa_mask);
+ sa.sa_flags = 0;
+ sigemptyset(&savintr.sa_mask);
+ sigemptyset(&savequit.sa_mask);
+ sigaction(SIGINT, &sa, &savintr);
+ sigaction(SIGQUIT, &sa, &savequit);
+ sigaddset(&sa.sa_mask, SIGCHLD);
+ sigprocmask(SIG_BLOCK, &sa.sa_mask, &saveblock);
+ if ((pid = fork()) == 0) {
+ sigaction(SIGINT, &savintr, (struct sigaction *)0);
+ sigaction(SIGQUIT, &savequit, (struct sigaction *)0);
+ sigprocmask(SIG_SETMASK, &saveblock, (sigset_t *)0);
+ execl("/bin/sh", "sh", "-c", cmd, (char *)0);
+ _exit(127);
+ }
+ if (pid == -1) {
+ stat = -1; /* errno comes from fork() */
+ } else {
+ while (waitpid(pid, &stat, 0) == -1) {
+ if (errno != EINTR){
+ stat = -1;
+ break;
+ }
+ }
+ }
+ sigaction(SIGINT, &savintr, (struct sigaction *)0);
+ sigaction(SIGQUIT, &savequit, (struct sigaction *)0);
+ sigprocmask(SIG_SETMASK, &saveblock, (sigset_t *)0);
+ return(stat);
+}
+\fP
+.fi
+.RE
+.LP
+Note that, while a particular implementation of \fIsystem\fP() (such
+as the one above) can assume a particular path for the
+shell, such a path is not necessarily valid on another system. The
+above example is not portable, and is not intended to be.
+.LP
+One reviewer suggested that an implementation of \fIsystem\fP() might
+want to use an environment variable such as \fISHELL\fP
+to determine which command interpreter to use. The supposed implementation
+would use the default command interpreter if the one
+specified by the environment variable was not available. This would
+allow a user, when using an application that prompts for
+command lines to be processed using \fIsystem\fP(), to specify a different
+command interpreter. Such an implementation is
+discouraged. If the alternate command interpreter did not follow the
+command line syntax specified in the Shell and Utilities
+volume of IEEE\ Std\ 1003.1-2001, then changing \fISHELL\fP would
+render \fIsystem\fP() non-conforming. This would affect
+applications that expected the specified behavior from \fIsystem\fP(),
+and since the Shell and Utilities volume of
+IEEE\ Std\ 1003.1-2001 does not mention that \fISHELL\fP affects \fIsystem\fP(),
+the application would not know that it
+needed to unset \fISHELL\fP.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexec\fP(), \fIpipe\fP(), \fIwaitpid\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<limits.h>\fP, \fI<signal.h>\fP,
+\fI<stdlib.h>\fP, \fI<sys/wait.h>\fP, the
+Shell and Utilities volume of IEEE\ Std\ 1003.1-2001, \fIsh\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/tan.3p b/man-pages-posix-2003/man3p/tan.3p
new file mode 100644
index 0000000..3f3945d
--- /dev/null
+++ b/man-pages-posix-2003/man3p/tan.3p
@@ -0,0 +1,149 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TAN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" tan
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+tan, tanf, tanl \- tangent function
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double tan(double\fP \fIx\fP\fB);
+.br
+float tanf(float\fP \fIx\fP\fB);
+.br
+long double tanl(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the tangent of their argument \fIx\fP,
+measured in radians.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the tangent
+of \fIx\fP.
+.LP
+If the correct value would cause underflow, and is not representable,
+a range error may occur, and either 0.0 (if
+supported), or an implementation-defined value shall be
+returned.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is \(+-0, \fIx\fP shall be returned.
+.LP
+If \fIx\fP is subnormal, a range error may occur and \fIx\fP should
+be returned.
+.LP
+If \fIx\fP is \(+-Inf, a domain error shall occur, and either a NaN
+(if supported), or an implementation-defined value
+shall be returned.
+.LP
+If the correct value would cause underflow, and is representable,
+a range error may occur and the correct value shall be
+returned.
+.LP
+If the correct value would cause overflow, a range error shall occur
+and \fItan\fP(), \fItanf\fP(), and \fItanl\fP() shall
+return \(+-HUGE_VAL, \(+-HUGE_VALF, and \(+-HUGE_VALL, respectively,
+with the same sign as the correct value of the
+function.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Domain\ Error
+The value of \fIx\fP is \(+-Inf.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [EDOM]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the invalid floating-point exception shall be raised.
+.TP 7
+Range\ Error
+The result overflows
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the overflow floating-point exception shall be raised.
+.sp
+.LP
+These functions may fail if:
+.TP 7
+Range\ Error
+The result underflows, or the value of \fIx\fP is subnormal.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the underflow floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Taking the Tangent of a 45-Degree Angle
+.sp
+.RS
+.nf
+
+\fB#include <math.h>
+\&...
+double radians = 45.0 * M_PI / 180;
+double result;
+\&...
+result = tan (radians);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+There are no known floating-point representations such that for a
+normal argument, \fItan\fP( \fIx\fP) is either overflow or
+underflow.
+.LP
+These functions may lose accuracy when their argument is near a multiple
+of pi/2 or is far
+from 0.0.
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIatan\fP(), \fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIisnan\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment of Error Conditions
+for
+Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/tanf.3p b/man-pages-posix-2003/man3p/tanf.3p
new file mode 100644
index 0000000..d38ba05
--- /dev/null
+++ b/man-pages-posix-2003/man3p/tanf.3p
@@ -0,0 +1 @@
+.so man3p/tan.3p
diff --git a/man-pages-posix-2003/man3p/tanh.3p b/man-pages-posix-2003/man3p/tanh.3p
new file mode 100644
index 0000000..b5c0134
--- /dev/null
+++ b/man-pages-posix-2003/man3p/tanh.3p
@@ -0,0 +1,92 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TANH" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" tanh
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+tanh, tanhf, tanhl \- hyperbolic tangent functions
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double tanh(double\fP \fIx\fP\fB);
+.br
+float tanhf(float\fP \fIx\fP\fB);
+.br
+long double tanhl(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the hyperbolic tangent of their argument
+\fIx\fP.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the hyperbolic
+tangent of \fIx\fP.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is \(+-0, \fIx\fP shall be returned.
+.LP
+If \fIx\fP is \(+-Inf, \(+-1 shall be returned.
+.LP
+If \fIx\fP is subnormal, a range error may occur and \fIx\fP should
+be returned.
+.SH ERRORS
+.LP
+These functions may fail if:
+.TP 7
+Range\ Error
+The value of \fIx\fP is subnormal.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the underflow floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIatanh\fP(), \fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIisnan\fP(),
+\fItan\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment
+of Error Conditions for Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/tanhf.3p b/man-pages-posix-2003/man3p/tanhf.3p
new file mode 100644
index 0000000..d7797f2
--- /dev/null
+++ b/man-pages-posix-2003/man3p/tanhf.3p
@@ -0,0 +1 @@
+.so man3p/tanh.3p
diff --git a/man-pages-posix-2003/man3p/tanhl.3p b/man-pages-posix-2003/man3p/tanhl.3p
new file mode 100644
index 0000000..d7797f2
--- /dev/null
+++ b/man-pages-posix-2003/man3p/tanhl.3p
@@ -0,0 +1 @@
+.so man3p/tanh.3p
diff --git a/man-pages-posix-2003/man3p/tanl.3p b/man-pages-posix-2003/man3p/tanl.3p
new file mode 100644
index 0000000..d38ba05
--- /dev/null
+++ b/man-pages-posix-2003/man3p/tanl.3p
@@ -0,0 +1 @@
+.so man3p/tan.3p
diff --git a/man-pages-posix-2003/man3p/tcdrain.3p b/man-pages-posix-2003/man3p/tcdrain.3p
new file mode 100644
index 0000000..2f163a9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/tcdrain.3p
@@ -0,0 +1,83 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TCDRAIN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" tcdrain
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+tcdrain \- wait for transmission of output
+.SH SYNOPSIS
+.LP
+\fB#include <termios.h>
+.br
+.sp
+int tcdrain(int\fP \fIfildes\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fItcdrain\fP() function shall block until all output written
+to the object referred to by \fIfildes\fP is transmitted.
+The \fIfildes\fP argument is an open file descriptor associated with
+a terminal.
+.LP
+Any attempts to use \fItcdrain\fP() from a process which is a member
+of a background process group on a \fIfildes\fP
+associated with its controlling terminal, shall cause the process
+group to be sent a SIGTTOU signal. If the calling process is
+blocking or ignoring SIGTTOU signals, the process shall be allowed
+to perform the operation, and no signal is sent.
+.SH RETURN VALUE
+.LP
+Upon successful completion, 0 shall be returned. Otherwise, -1 shall
+be returned and \fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fItcdrain\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not a valid file descriptor.
+.TP 7
+.B EINTR
+A signal interrupted \fItcdrain\fP().
+.TP 7
+.B ENOTTY
+The file associated with \fIfildes\fP is not a terminal.
+.sp
+.LP
+The \fItcdrain\fP() function may fail if:
+.TP 7
+.B EIO
+The process group of the writing process is orphaned, and the writing
+process is not ignoring or blocking SIGTTOU.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fItcflush\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 11, General Terminal Interface, \fI<termios.h>\fP, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/tcflow.3p b/man-pages-posix-2003/man3p/tcflow.3p
new file mode 100644
index 0000000..62322bb
--- /dev/null
+++ b/man-pages-posix-2003/man3p/tcflow.3p
@@ -0,0 +1,103 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TCFLOW" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" tcflow
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+tcflow \- suspend or restart the transmission or reception of data
+.SH SYNOPSIS
+.LP
+\fB#include <termios.h>
+.br
+.sp
+int tcflow(int\fP \fIfildes\fP\fB, int\fP \fIaction\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fItcflow\fP() function shall suspend or restart transmission
+or reception of data on the object referred to by
+\fIfildes\fP, depending on the value of \fIaction\fP. The \fIfildes\fP
+argument is an open file descriptor associated with a
+terminal.
+.IP " *" 3
+If \fIaction\fP is TCOOFF, output shall be suspended.
+.LP
+.IP " *" 3
+If \fIaction\fP is TCOON, suspended output shall be restarted.
+.LP
+.IP " *" 3
+If \fIaction\fP is TCIOFF, the system shall transmit a STOP character,
+which is intended to cause the terminal device to stop
+transmitting data to the system.
+.LP
+.IP " *" 3
+If \fIaction\fP is TCION, the system shall transmit a START character,
+which is intended to cause the terminal device to start
+transmitting data to the system.
+.LP
+.LP
+The default on the opening of a terminal file is that neither its
+input nor its output are suspended.
+.LP
+Attempts to use \fItcflow\fP() from a process which is a member of
+a background process group on a \fIfildes\fP associated
+with its controlling terminal, shall cause the process group to be
+sent a SIGTTOU signal. If the calling process is blocking or
+ignoring SIGTTOU signals, the process shall be allowed to perform
+the operation, and no signal is sent.
+.SH RETURN VALUE
+.LP
+Upon successful completion, 0 shall be returned. Otherwise, -1 shall
+be returned and \fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fItcflow\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not a valid file descriptor.
+.TP 7
+.B EINVAL
+The \fIaction\fP argument is not a supported value.
+.TP 7
+.B ENOTTY
+The file associated with \fIfildes\fP is not a terminal.
+.sp
+.LP
+The \fItcflow\fP() function may fail if:
+.TP 7
+.B EIO
+The process group of the writing process is orphaned, and the writing
+process is not ignoring or blocking SIGTTOU.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fItcsendbreak\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 11, General Terminal Interface, \fI<termios.h>\fP, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/tcflush.3p b/man-pages-posix-2003/man3p/tcflush.3p
new file mode 100644
index 0000000..ad71a48
--- /dev/null
+++ b/man-pages-posix-2003/man3p/tcflush.3p
@@ -0,0 +1,97 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TCFLUSH" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" tcflush
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+tcflush \- flush non-transmitted output data, non-read input data,
+or both
+.SH SYNOPSIS
+.LP
+\fB#include <termios.h>
+.br
+.sp
+int tcflush(int\fP \fIfildes\fP\fB, int\fP \fIqueue_selector\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+Upon successful completion, \fItcflush\fP() shall discard data written
+to the object referred to by \fIfildes\fP (an open file
+descriptor associated with a terminal) but not transmitted, or data
+received but not read, depending on the value of
+\fIqueue_selector\fP:
+.IP " *" 3
+If \fIqueue_selector\fP is TCIFLUSH, it shall flush data received
+but not read.
+.LP
+.IP " *" 3
+If \fIqueue_selector\fP is TCOFLUSH, it shall flush data written but
+not transmitted.
+.LP
+.IP " *" 3
+If \fIqueue_selector\fP is TCIOFLUSH, it shall flush both data received
+but not read and data written but not transmitted.
+.LP
+.LP
+Attempts to use \fItcflush\fP() from a process which is a member of
+a background process group on a \fIfildes\fP associated
+with its controlling terminal shall cause the process group to be
+sent a SIGTTOU signal. If the calling process is blocking or
+ignoring SIGTTOU signals, the process shall be allowed to perform
+the operation, and no signal is sent.
+.SH RETURN VALUE
+.LP
+Upon successful completion, 0 shall be returned. Otherwise, -1 shall
+be returned and \fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fItcflush\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not a valid file descriptor.
+.TP 7
+.B EINVAL
+The \fIqueue_selector\fP argument is not a supported value.
+.TP 7
+.B ENOTTY
+The file associated with \fIfildes\fP is not a terminal.
+.sp
+.LP
+The \fItcflush\fP() function may fail if:
+.TP 7
+.B EIO
+The process group of the writing process is orphaned, and the writing
+process is not ignoring or blocking SIGTTOU.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fItcdrain\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 11, General Terminal Interface, \fI<termios.h>\fP, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/tcgetattr.3p b/man-pages-posix-2003/man3p/tcgetattr.3p
new file mode 100644
index 0000000..6732cf3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/tcgetattr.3p
@@ -0,0 +1,114 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TCGETATTR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" tcgetattr
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+tcgetattr \- get the parameters associated with the terminal
+.SH SYNOPSIS
+.LP
+\fB#include <termios.h>
+.br
+.sp
+int tcgetattr(int\fP \fIfildes\fP\fB, struct termios *\fP\fItermios_p\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fItcgetattr\fP() function shall get the parameters associated
+with the terminal referred to by \fIfildes\fP and store
+them in the \fBtermios\fP structure referenced by \fItermios_p\fP.
+The \fIfildes\fP argument is an open file descriptor
+associated with a terminal.
+.LP
+The \fItermios_p\fP argument is a pointer to a \fBtermios\fP structure.
+.LP
+The \fItcgetattr\fP() operation is allowed from any process.
+.LP
+If the terminal device supports different input and output baud rates,
+the baud rates stored in the \fBtermios\fP structure
+returned by \fItcgetattr\fP() shall reflect the actual baud rates,
+even if they are equal. If differing baud rates are not
+supported, the rate returned as the output baud rate shall be the
+actual baud rate. If the terminal device does not support split
+baud rates, the input baud rate stored in the \fBtermios\fP structure
+shall be the output rate (as one of the symbolic
+values).
+.SH RETURN VALUE
+.LP
+Upon successful completion, 0 shall be returned. Otherwise, -1 shall
+be returned and \fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fItcgetattr\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not a valid file descriptor.
+.TP 7
+.B ENOTTY
+The file associated with \fIfildes\fP is not a terminal.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+Care must be taken when changing the terminal attributes. Applications
+should always do a \fItcgetattr\fP(), save the
+\fBtermios\fP structure values returned, and then do a \fItcsetattr\fP(),
+changing only
+the necessary fields. The application should use the values saved
+from the \fItcgetattr\fP() to reset the terminal state whenever
+it is done with the terminal. This is necessary because terminal attributes
+apply to the underlying port and not to each individual
+open instance; that is, all processes that have used the terminal
+see the latest attribute changes.
+.LP
+A program that uses these functions should be written to catch all
+signals and take other appropriate actions to ensure that
+when the program terminates, whether planned or not, the terminal
+device's state is restored to its original state.
+.LP
+Existing practice dealing with error returns when only part of a request
+can be honored is based on calls to the \fIioctl\fP() function. In
+historical BSD and System V implementations, the corresponding \fIioctl\fP()
+returns zero if the requested actions were semantically correct, even
+if some of the
+requested changes could not be made. Many existing applications assume
+this behavior and would no longer work correctly if the
+return value were changed from zero to -1 in this case.
+.LP
+Note that either specification has a problem. When zero is returned,
+it implies everything succeeded even if some of the changes
+were not made. When -1 is returned, it implies everything failed even
+though some of the changes were made.
+.LP
+Applications that need all of the requested changes made to work properly
+should follow \fItcsetattr\fP() with a call to \fItcgetattr\fP() and
+compare the appropriate field
+values.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fItcsetattr\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 11, General Terminal Interface, \fI<termios.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/tcgetpgrp.3p b/man-pages-posix-2003/man3p/tcgetpgrp.3p
new file mode 100644
index 0000000..a7c4c4d
--- /dev/null
+++ b/man-pages-posix-2003/man3p/tcgetpgrp.3p
@@ -0,0 +1,77 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TCGETPGRP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" tcgetpgrp
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+tcgetpgrp \- get the foreground process group ID
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+pid_t tcgetpgrp(int\fP \fIfildes\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fItcgetpgrp\fP() function shall return the value of the process
+group ID of the foreground process group associated with
+the terminal.
+.LP
+If there is no foreground process group, \fItcgetpgrp\fP() shall return
+a value greater than 1 that does not match the process
+group ID of any existing process group.
+.LP
+The \fItcgetpgrp\fP() function is allowed from a process that is a
+member of a background process group; however, the
+information may be subsequently changed by a process that is a member
+of a foreground process group.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fItcgetpgrp\fP() shall return the value
+of the process group ID of the foreground process
+associated with the terminal. Otherwise, -1 shall be returned and
+\fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fItcgetpgrp\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not a valid file descriptor.
+.TP 7
+.B ENOTTY
+The calling process does not have a controlling terminal, or the file
+is not the controlling terminal.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsetsid\fP(), \fIsetpgid\fP(), \fItcsetpgrp\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<sys/types.h>\fP, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/tcgetsid.3p b/man-pages-posix-2003/man3p/tcgetsid.3p
new file mode 100644
index 0000000..bb9c975
--- /dev/null
+++ b/man-pages-posix-2003/man3p/tcgetsid.3p
@@ -0,0 +1,69 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TCGETSID" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" tcgetsid
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+tcgetsid \- get the process group ID for the session leader for the
+controlling terminal
+.SH SYNOPSIS
+.LP
+\fB#include <termios.h>
+.br
+.sp
+pid_t tcgetsid(int\fP \fIfildes\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fItcgetsid\fP() function shall obtain the process group ID of
+the session for which the terminal specified by
+\fIfildes\fP is the controlling terminal.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fItcgetsid\fP() shall return the process
+group ID associated with the terminal. Otherwise, a value
+of (\fBpid_t\fP)-1 shall be returned and \fIerrno\fP set to indicate
+the error.
+.SH ERRORS
+.LP
+The \fItcgetsid\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not a valid file descriptor.
+.TP 7
+.B ENOTTY
+The calling process does not have a controlling terminal, or the file
+is not the controlling terminal.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<termios.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/tcsendbreak.3p b/man-pages-posix-2003/man3p/tcsendbreak.3p
new file mode 100644
index 0000000..608bef5
--- /dev/null
+++ b/man-pages-posix-2003/man3p/tcsendbreak.3p
@@ -0,0 +1,92 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TCSENDBREAK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" tcsendbreak
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+tcsendbreak \- send a break for a specific duration
+.SH SYNOPSIS
+.LP
+\fB#include <termios.h>
+.br
+.sp
+int tcsendbreak(int\fP \fIfildes\fP\fB, int\fP \fIduration\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+If the terminal is using asynchronous serial data transmission, \fItcsendbreak\fP()
+shall cause transmission of a continuous
+stream of zero-valued bits for a specific duration. If \fIduration\fP
+is 0, it shall cause transmission of zero-valued bits for at
+least 0.25 seconds, and not more than 0.5 seconds. If \fIduration\fP
+is not 0, it shall send zero-valued bits for an
+implementation-defined period of time.
+.LP
+The \fIfildes\fP argument is an open file descriptor associated with
+a terminal.
+.LP
+If the terminal is not using asynchronous serial data transmission,
+it is implementation-defined whether \fItcsendbreak\fP()
+sends data to generate a break condition or returns without taking
+any action.
+.LP
+Attempts to use \fItcsendbreak\fP() from a process which is a member
+of a background process group on a \fIfildes\fP
+associated with its controlling terminal shall cause the process group
+to be sent a SIGTTOU signal. If the calling process is
+blocking or ignoring SIGTTOU signals, the process shall be allowed
+to perform the operation, and no signal is sent.
+.SH RETURN VALUE
+.LP
+Upon successful completion, 0 shall be returned. Otherwise, -1 shall
+be returned and \fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fItcsendbreak\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not a valid file descriptor.
+.TP 7
+.B ENOTTY
+The file associated with \fIfildes\fP is not a terminal.
+.sp
+.LP
+The \fItcsendbreak\fP() function may fail if:
+.TP 7
+.B EIO
+The process group of the writing process is orphaned, and the writing
+process is not ignoring or blocking SIGTTOU.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 11,
+General
+Terminal Interface, \fI<termios.h>\fP, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/tcsetattr.3p b/man-pages-posix-2003/man3p/tcsetattr.3p
new file mode 100644
index 0000000..c8630e3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/tcsetattr.3p
@@ -0,0 +1,164 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TCSETATTR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" tcsetattr
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+tcsetattr \- set the parameters associated with the terminal
+.SH SYNOPSIS
+.LP
+\fB#include <termios.h>
+.br
+.sp
+int tcsetattr(int\fP \fIfildes\fP\fB, int\fP \fIoptional_actions\fP\fB,
+.br
+\ \ \ \ \ \ const struct termios *\fP\fItermios_p\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fItcsetattr\fP() function shall set the parameters associated
+with the terminal referred to by the open file descriptor
+\fIfildes\fP (an open file descriptor associated with a terminal)
+from the \fBtermios\fP structure referenced by \fItermios_p\fP
+as follows:
+.IP " *" 3
+If \fIoptional_actions\fP is TCSANOW, the change shall occur immediately.
+.LP
+.IP " *" 3
+If \fIoptional_actions\fP is TCSADRAIN, the change shall occur after
+all output written to \fIfildes\fP is transmitted. This
+function should be used when changing parameters that affect output.
+.LP
+.IP " *" 3
+If \fIoptional_actions\fP is TCSAFLUSH, the change shall occur after
+all output written to \fIfildes\fP is transmitted, and
+all input so far received but not read shall be discarded before the
+change is made.
+.LP
+.LP
+If the output baud rate stored in the \fBtermios\fP structure pointed
+to by \fItermios_p\fP is the zero baud rate, B0, the
+modem control lines shall no longer be asserted. Normally, this shall
+disconnect the line.
+.LP
+If the input baud rate stored in the \fBtermios\fP structure pointed
+to by \fItermios_p\fP is 0, the input baud rate given to
+the hardware is the same as the output baud rate stored in the \fBtermios\fP
+structure.
+.LP
+The \fItcsetattr\fP() function shall return successfully if it was
+able to perform any of the requested actions, even if some
+of the requested actions could not be performed. It shall set all
+the attributes that the implementation supports as requested and
+leave all the attributes not supported by the implementation unchanged.
+If no part of the request can be honored, it shall return
+-1 and set \fIerrno\fP to [EINVAL]. If the input and output baud rates
+differ and are a combination that is not supported, neither
+baud rate shall be changed. A subsequent call to \fItcgetattr\fP()
+shall return the
+actual state of the terminal device (reflecting both the changes made
+and not made in the previous \fItcsetattr\fP() call). The
+\fItcsetattr\fP() function shall not change the values found in the
+\fBtermios\fP structure under any circumstances.
+.LP
+The effect of \fItcsetattr\fP() is undefined if the value of the \fBtermios\fP
+structure pointed to by \fItermios_p\fP was
+not derived from the result of a call to \fItcgetattr\fP() on \fIfildes\fP;
+an
+application should modify only fields and flags defined by this volume
+of IEEE\ Std\ 1003.1-2001 between the call to \fItcgetattr\fP() and
+\fItcsetattr\fP(), leaving all other fields and flags
+unmodified.
+.LP
+No actions defined by this volume of IEEE\ Std\ 1003.1-2001, other
+than a call to \fItcsetattr\fP() or a close of the
+last file descriptor in the system associated with this terminal device,
+shall cause any of the terminal attributes defined by this
+volume of IEEE\ Std\ 1003.1-2001 to change.
+.LP
+If \fItcsetattr\fP() is called from a process which is a member of
+a background process group on a \fIfildes\fP associated
+with its controlling terminal:
+.IP " *" 3
+If the calling process is blocking or ignoring SIGTTOU signals, the
+operation completes normally and no signal is sent.
+.LP
+.IP " *" 3
+Otherwise, a SIGTTOU signal shall be sent to the process group.
+.LP
+.SH RETURN VALUE
+.LP
+Upon successful completion, 0 shall be returned. Otherwise, -1 shall
+be returned and \fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fItcsetattr\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not a valid file descriptor.
+.TP 7
+.B EINTR
+A signal interrupted \fItcsetattr\fP().
+.TP 7
+.B EINVAL
+The \fIoptional_actions\fP argument is not a supported value, or an
+attempt was made to change an attribute represented in the
+\fBtermios\fP structure to an unsupported value.
+.TP 7
+.B ENOTTY
+The file associated with \fIfildes\fP is not a terminal.
+.sp
+.LP
+The \fItcsetattr\fP() function may fail if:
+.TP 7
+.B EIO
+The process group of the writing process is orphaned, and the writing
+process is not ignoring or blocking SIGTTOU.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+If trying to change baud rates, applications should call \fItcsetattr\fP()
+then call \fItcgetattr\fP() in order to determine what baud rates
+were actually selected.
+.SH RATIONALE
+.LP
+The \fItcsetattr\fP() function can be interrupted in the following
+situations:
+.IP " *" 3
+It is interrupted while waiting for output to drain.
+.LP
+.IP " *" 3
+It is called from a process in a background process group and SIGTTOU
+is caught.
+.LP
+.LP
+See also the RATIONALE section in \fItcgetattr\fP().
+.SH FUTURE DIRECTIONS
+.LP
+Using an input baud rate of 0 to set the input rate equal to the output
+rate may not necessarily be supported in a future
+version of this volume of IEEE\ Std\ 1003.1-2001.
+.SH SEE ALSO
+.LP
+\fIcfgetispeed\fP(), \fItcgetattr\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface,
+\fI<termios.h>\fP, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/tcsetpgrp.3p b/man-pages-posix-2003/man3p/tcsetpgrp.3p
new file mode 100644
index 0000000..123b544
--- /dev/null
+++ b/man-pages-posix-2003/man3p/tcsetpgrp.3p
@@ -0,0 +1,89 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TCSETPGRP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" tcsetpgrp
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+tcsetpgrp \- set the foreground process group ID
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+int tcsetpgrp(int\fP \fIfildes\fP\fB, pid_t\fP \fIpgid_id\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+If the process has a controlling terminal, \fItcsetpgrp\fP() shall
+set the foreground process group ID associated with the
+terminal to \fIpgid_id\fP. The application shall ensure that the file
+associated with \fIfildes\fP is the controlling terminal of
+the calling process and the controlling terminal is currently associated
+with the session of the calling process. The application
+shall ensure that the value of \fIpgid_id\fP matches a process group
+ID of a process in the same session as the calling
+process.
+.LP
+Attempts to use \fItcsetpgrp\fP() from a process which is a member
+of a background process group on a \fIfildes\fP associated
+with its controlling terminal shall cause the process group to be
+sent a SIGTTOU signal. If the calling process is blocking or
+ignoring SIGTTOU signals, the process shall be allowed to perform
+the operation, and no signal is sent.
+.SH RETURN VALUE
+.LP
+Upon successful completion, 0 shall be returned. Otherwise, -1 shall
+be returned and \fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fItcsetpgrp\fP() function shall fail if:
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not a valid file descriptor.
+.TP 7
+.B EINVAL
+This implementation does not support the value in the \fIpgid_id\fP
+argument.
+.TP 7
+.B ENOTTY
+The calling process does not have a controlling terminal, or the file
+is not the controlling terminal, or the controlling
+terminal is no longer associated with the session of the calling process.
+.TP 7
+.B EPERM
+The value of \fIpgid_id\fP is a value supported by the implementation,
+but does not match the process group ID of a process in
+the same session as the calling process.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fItcgetpgrp\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<sys/types.h>\fP, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/tdelete.3p b/man-pages-posix-2003/man3p/tdelete.3p
new file mode 100644
index 0000000..e706caf
--- /dev/null
+++ b/man-pages-posix-2003/man3p/tdelete.3p
@@ -0,0 +1 @@
+.so man3p/tsearch.3p
diff --git a/man-pages-posix-2003/man3p/telldir.3p b/man-pages-posix-2003/man3p/telldir.3p
new file mode 100644
index 0000000..44c0cc6
--- /dev/null
+++ b/man-pages-posix-2003/man3p/telldir.3p
@@ -0,0 +1,64 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TELLDIR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" telldir
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+telldir \- current location of a named directory stream
+.SH SYNOPSIS
+.LP
+\fB#include <dirent.h>
+.br
+.sp
+long telldir(DIR *\fP\fIdirp\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fItelldir\fP() function shall obtain the current location associated
+with the directory stream specified by
+\fIdirp\fP.
+.LP
+If the most recent operation on the directory stream was a \fIseekdir\fP(),
+the
+directory position returned from the \fItelldir\fP() shall be the
+same as that supplied as a \fIloc\fP argument for \fIseekdir\fP().
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fItelldir\fP() shall return the current
+location of the specified directory stream.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIopendir\fP(), \fIreaddir\fP(), \fIseekdir\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<dirent.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/tempnam.3p b/man-pages-posix-2003/man3p/tempnam.3p
new file mode 100644
index 0000000..326eef3
--- /dev/null
+++ b/man-pages-posix-2003/man3p/tempnam.3p
@@ -0,0 +1,114 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TEMPNAM" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" tempnam
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+tempnam \- create a name for a temporary file
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+char *tempnam(const char *\fP\fIdir\fP\fB, const char *\fP\fIpfx\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fItempnam\fP() function shall generate a pathname that may be
+used for a temporary file.
+.LP
+The \fItempnam\fP() function allows the user to control the choice
+of a directory. The \fIdir\fP argument points to the name
+of the directory in which the file is to be created. If \fIdir\fP
+is a null pointer or points to a string which is not a name for
+an appropriate directory, the path prefix defined as P_tmpdir in the
+\fI<stdio.h>\fP
+header shall be used. If that directory is not accessible, an implementation-defined
+directory may be used.
+.LP
+Many applications prefer their temporary files to have certain initial
+letter sequences in their names. The \fIpfx\fP argument
+should be used for this. This argument may be a null pointer or point
+to a string of up to five bytes to be used as the beginning
+of the filename.
+.LP
+Some implementations of \fItempnam\fP() may use \fItmpnam\fP() internally.
+On such
+implementations, if called more than {TMP_MAX} times in a single process,
+the behavior is implementation-defined.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fItempnam\fP() shall allocate space for
+a string, put the generated pathname in that space, and
+return a pointer to it. The pointer shall be suitable for use in a
+subsequent call to \fIfree\fP(). Otherwise, it shall return a null
+pointer and set \fIerrno\fP to indicate the
+error.
+.SH ERRORS
+.LP
+The \fItempnam\fP() function shall fail if:
+.TP 7
+.B ENOMEM
+Insufficient storage space is available.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Generating a Pathname
+.LP
+The following example generates a pathname for a temporary file in
+directory \fB/tmp\fP, with the prefix \fIfile\fP. After the
+filename has been created, the call to \fIfree\fP() deallocates the
+space used to store the
+filename.
+.sp
+.RS
+.nf
+
+\fB#include <stdio.h>
+#include <stdlib.h>
+\&...
+char *directory = "/tmp";
+char *fileprefix = "file";
+char *file;
+.sp
+
+file = tempnam(directory, fileprefix);
+free(file);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+This function only creates pathnames. It is the application's responsibility
+to create and remove the files. Between the time a
+pathname is created and the file is opened, it is possible for some
+other process to create a file with the same name. Applications
+may find \fItmpfile\fP() more useful.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfopen\fP(), \fIfree\fP(), \fIopen\fP(), \fItmpfile\fP(), \fItmpnam\fP(),
+\fIunlink\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/tfind.3p b/man-pages-posix-2003/man3p/tfind.3p
new file mode 100644
index 0000000..e706caf
--- /dev/null
+++ b/man-pages-posix-2003/man3p/tfind.3p
@@ -0,0 +1 @@
+.so man3p/tsearch.3p
diff --git a/man-pages-posix-2003/man3p/tgamma.3p b/man-pages-posix-2003/man3p/tgamma.3p
new file mode 100644
index 0000000..ba55434
--- /dev/null
+++ b/man-pages-posix-2003/man3p/tgamma.3p
@@ -0,0 +1,129 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TGAMMA" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" tgamma
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+tgamma, tgammaf, tgammal \- compute gamma() function
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double tgamma(double\fP \fIx\fP\fB);
+.br
+float tgammaf(float\fP \fIx\fP\fB);
+.br
+long double tgammal(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall compute the \fIgamma\fP() function of \fIx\fP.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return \fIGamma\fP(
+\fIx\fP).
+.LP
+If \fIx\fP is a negative integer, a domain error shall occur, and
+either a NaN (if supported), or an implementation-defined
+value shall be returned.
+.LP
+If the correct value would cause overflow, a range error shall occur
+and \fItgamma\fP(), \fItgammaf\fP(), and \fItgammal\fP()
+shall return \(+-HUGE_VAL, \(+-HUGE_VALF, or \(+-HUGE_VALL, respectively,
+with the same sign as the correct value of
+the function.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is +Inf, \fIx\fP shall be returned.
+.LP
+If \fIx\fP is \(+-0, a pole error shall occur, and \fItgamma\fP(),
+\fItgammaf\fP(), and \fItgammal\fP() shall return
+\(+-HUGE_VAL, \(+-HUGE_VALF, and \(+-HUGE_VALL, respectively.
+.LP
+If \fIx\fP is -Inf, a domain error shall occur, and either a NaN (if
+supported), or an implementation-defined value shall be
+returned.
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+Domain\ Error
+The value of \fIx\fP is a negative integer, or \fIx\fP is -Inf.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [EDOM]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the invalid floating-point exception shall be
+raised.
+.TP 7
+Pole\ Error
+The value of \fIx\fP is zero.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the divide-by-zero floating-point exception shall be
+raised.
+.br
+.TP 7
+Range\ Error
+The value overflows.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the overflow floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+For IEEE\ Std\ 754-1985 \fBdouble\fP, overflow happens when 0 < \fIx\fP
+< 1/DBL_MAX, and 171.7 <
+\fIx\fP.
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+This function is named \fItgamma\fP() in order to avoid conflicts
+with the historical \fIgamma\fP() and \fIlgamma\fP() functions.
+.SH FUTURE DIRECTIONS
+.LP
+It is possible that the error response for a negative integer argument
+may be changed to a pole error and a return value of
+\(+-Inf.
+.SH SEE ALSO
+.LP
+\fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIlgamma\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment
+of Error Conditions for Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/tgammaf.3p b/man-pages-posix-2003/man3p/tgammaf.3p
new file mode 100644
index 0000000..42d38b8
--- /dev/null
+++ b/man-pages-posix-2003/man3p/tgammaf.3p
@@ -0,0 +1 @@
+.so man3p/tgamma.3p
diff --git a/man-pages-posix-2003/man3p/tgammal.3p b/man-pages-posix-2003/man3p/tgammal.3p
new file mode 100644
index 0000000..42d38b8
--- /dev/null
+++ b/man-pages-posix-2003/man3p/tgammal.3p
@@ -0,0 +1 @@
+.so man3p/tgamma.3p
diff --git a/man-pages-posix-2003/man3p/time.3p b/man-pages-posix-2003/man3p/time.3p
new file mode 100644
index 0000000..281b932
--- /dev/null
+++ b/man-pages-posix-2003/man3p/time.3p
@@ -0,0 +1,157 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TIME" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" time
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+time \- get time
+.SH SYNOPSIS
+.LP
+\fB#include <time.h>
+.br
+.sp
+time_t time(time_t *\fP\fItloc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fItime\fP() function shall return the value of time in seconds
+since the Epoch.
+.LP
+The \fItloc\fP argument points to an area where the return value is
+also stored. If \fItloc\fP is a null pointer, no value is
+stored.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fItime\fP() shall return the value of
+time. Otherwise, (\fBtime_t\fP)-1 shall be returned.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Getting the Current Time
+.LP
+The following example uses the \fItime\fP() function to calculate
+the time elapsed, in seconds, since the Epoch, \fIlocaltime\fP() to
+convert that value to a broken-down time, and \fIasctime\fP() to convert
+the broken-down time values into a printable string.
+.sp
+.RS
+.nf
+
+\fB#include <stdio.h>
+#include <time.h>
+.sp
+
+int main(void)
+{
+time_t result;
+.sp
+
+ result = time(NULL);
+ printf("%s%ju secs since the Epoch\\n",
+ asctime(localtime(&result)),
+ (uintmax_t)result);
+ return(0);
+}
+\fP
+.fi
+.RE
+.LP
+This example writes the current time to \fIstdout\fP in a form like
+this:
+.sp
+.RS
+.nf
+
+\fBWed Jun 26 10:32:15 1996
+835810335 secs since the Epoch
+\fP
+.fi
+.RE
+.SS Timing an Event
+.LP
+The following example gets the current time, prints it out in the
+user's format, and prints the number of minutes to an event
+being timed.
+.sp
+.RS
+.nf
+
+\fB#include <time.h>
+#include <stdio.h>
+\&...
+time_t now;
+int minutes_to_event;
+\&...
+time(&now);
+minutes_to_event = ...;
+printf("The time is ");
+puts(asctime(localtime(&now)));
+printf("There are %d minutes to the event.\\n",
+ minutes_to_event);
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fItime\fP() function returns a value in seconds (type \fBtime_t\fP)
+while \fItimes\fP() returns a set of values in clock ticks (type \fBclock_t\fP).
+Some historical
+implementations, such as 4.3 BSD, have mechanisms capable of returning
+more precise times (see below). A generalized timing scheme
+to unify these various timing mechanisms has been proposed but not
+adopted.
+.LP
+Implementations in which \fBtime_t\fP is a 32-bit signed integer (many
+historical implementations) fail in the year 2038.
+IEEE\ Std\ 1003.1-2001 does not address this problem. However, the
+use of the \fBtime_t\fP type is mandated in order to
+ease the eventual fix.
+.LP
+The use of the \fI<time.h>\fP header instead of \fI<sys/types.h>\fP
+allows compatibility with the ISO\ C standard.
+.LP
+Many historical implementations (including Version 7) and the 1984
+/usr/group standard use \fBlong\fP instead of \fBtime_t\fP.
+This volume of IEEE\ Std\ 1003.1-2001 uses the latter type in order
+to agree with the ISO\ C standard.
+.LP
+4.3 BSD includes \fItime\fP() only as an alternate function to the
+more flexible \fIgettimeofday\fP() function.
+.SH FUTURE DIRECTIONS
+.LP
+In a future version of this volume of IEEE\ Std\ 1003.1-2001, \fBtime_t\fP
+is likely to be required to be capable of
+representing times far in the future. Whether this will be mandated
+as a 64-bit type or a requirement that a specific date in the
+future be representable (for example, 10000 AD) is not yet determined.
+Systems purchased after the approval of this volume of
+IEEE\ Std\ 1003.1-2001 should be evaluated to determine whether their
+lifetime will extend past 2038.
+.SH SEE ALSO
+.LP
+\fIasctime\fP(), \fIclock\fP(), \fIctime\fP(),
+\fIdifftime\fP(), \fIgettimeofday\fP(), \fIgmtime\fP(), \fIlocaltime\fP(),
+\fImktime\fP(),
+\fIstrftime\fP(), \fIstrptime\fP(), \fIutime\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<time.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/timer_create.3p b/man-pages-posix-2003/man3p/timer_create.3p
new file mode 100644
index 0000000..2f4c731
--- /dev/null
+++ b/man-pages-posix-2003/man3p/timer_create.3p
@@ -0,0 +1,202 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TIMER_CREATE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" timer_create
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+timer_create \- create a per-process timer (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <signal.h>
+.br
+#include <time.h>
+.br
+.sp
+int timer_create(clockid_t\fP \fIclockid\fP\fB, struct sigevent *restrict\fP
+\fIevp\fP\fB,
+.br
+\ \ \ \ \ \ timer_t *restrict\fP \fItimerid\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fItimer_create\fP() function shall create a per-process timer
+using the specified clock, \fIclock_id\fP, as the timing
+base. The \fItimer_create\fP() function shall return, in the location
+referenced by \fItimerid\fP, a timer ID of type
+\fBtimer_t\fP used to identify the timer in timer requests. This timer
+ID shall be unique within the calling process until the
+timer is deleted. The particular clock, \fIclock_id\fP, is defined
+in \fI<time.h>\fP.
+The timer whose ID is returned shall be in a disarmed state upon return
+from \fItimer_create\fP().
+.LP
+The \fIevp\fP argument, if non-NULL, points to a \fBsigevent\fP structure.
+This structure, allocated by the application,
+defines the asynchronous notification to occur as specified in \fISignal
+Generation and
+Delivery\fP when the timer expires. If the \fIevp\fP argument is NULL,
+the effect is as if the \fIevp\fP argument pointed to
+a \fBsigevent\fP structure with the \fIsigev_notify\fP member having
+the value SIGEV_SIGNAL, the \fIsigev_signo\fP having a
+default signal number, and the \fIsigev_value\fP member having the
+value of the timer ID.
+.LP
+Each implementation shall define a set of clocks that can be used
+as timing bases for per-process timers. All implementations
+shall support a \fIclock_id\fP of CLOCK_REALTIME. If the Monotonic
+Clock option is supported, implementations shall
+support a \fIclock_id\fP of CLOCK_MONOTONIC.
+.LP
+Per-process timers shall not be inherited by a child process across
+a \fIfork\fP() and
+shall be disarmed and deleted by an \fIexec\fP.
+.LP
+If _POSIX_CPUTIME is defined, implementations shall support \fIclock_id\fP
+values representing the CPU-time clock of the calling
+process.
+.LP
+If _POSIX_THREAD_CPUTIME is defined, implementations shall support
+\fIclock_id\fP values representing the CPU-time clock of the
+calling thread.
+.LP
+It is implementation-defined whether a \fItimer_create\fP() function
+will succeed if the value defined by \fIclock_id\fP
+corresponds to the CPU-time clock of a process or thread different
+from the process or thread invoking the function.
+.SH RETURN VALUE
+.LP
+If the call succeeds, \fItimer_create\fP() shall return zero and update
+the location referenced by \fItimerid\fP to a
+\fBtimer_t\fP, which can be passed to the per-process timer calls.
+If an error occurs, the function shall return a value of -1 and
+set \fIerrno\fP to indicate the error. The value of \fItimerid\fP
+is undefined if an error occurs.
+.SH ERRORS
+.LP
+The \fItimer_create\fP() function shall fail if:
+.TP 7
+.B EAGAIN
+The system lacks sufficient signal queuing resources to honor the
+request.
+.TP 7
+.B EAGAIN
+The calling process has already created all of the timers it is allowed
+by this implementation.
+.TP 7
+.B EINVAL
+The specified clock ID is not defined.
+.TP 7
+.B ENOTSUP
+The implementation does not support the creation of a timer attached
+to the CPU-time clock that is specified by
+\fIclock_id\fP and associated with a process or thread different from
+the process or thread invoking \fItimer_create\fP().
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.br
+.SH RATIONALE
+.LP
+.SS Periodic Timer Overrun and Resource Allocation
+.LP
+The specified timer facilities may deliver realtime signals (that
+is, queued signals) on implementations that support this
+option. Since realtime applications cannot afford to lose notifications
+of asynchronous events, like timer expirations or
+asynchronous I/O completions, it must be possible to ensure that sufficient
+resources exist to deliver the signal when the event
+occurs. In general, this is not a difficulty because there is a one-to-one
+correspondence between a request and a subsequent signal
+generation. If the request cannot allocate the signal delivery resources,
+it can fail the call with an [EAGAIN] error.
+.LP
+Periodic timers are a special case. A single request can generate
+an unspecified number of signals. This is not a problem if the
+requesting process can service the signals as fast as they are generated,
+thus making the signal delivery resources available for
+delivery of subsequent periodic timer expiration signals. But, in
+general, this cannot be assured-processing of periodic timer
+signals may "overrun''; that is, subsequent periodic timer expirations
+may occur before the currently pending signal has been
+delivered.
+.LP
+Also, for signals, according to the POSIX.1-1990 standard, if subsequent
+occurrences of a pending signal are generated, it is
+implementation-defined whether a signal is delivered for each occurrence.
+This is not adequate for some realtime applications. So a
+mechanism is required to allow applications to detect how many timer
+expirations were delayed without requiring an indefinite
+amount of system resources to store the delayed expirations.
+.LP
+The specified facilities provide for an overrun count. The overrun
+count is defined as the number of extra timer expirations
+that occurred between the time a timer expiration signal is generated
+and the time the signal is delivered. The signal-catching
+function, if it is concerned with overruns, can retrieve this count
+on entry. With this method, a periodic timer only needs one
+"signal queuing resource" that can be allocated at the time of the
+\fItimer_create\fP() function call.
+.LP
+A function is defined to retrieve the overrun count so that an application
+need not allocate static storage to contain the
+count, and an implementation need not update this storage asynchronously
+on timer expirations. But, for some high-frequency
+periodic applications, the overhead of an additional system call on
+each timer expiration may be prohibitive. The functions, as
+defined, permit an implementation to maintain the overrun count in
+user space, associated with the \fItimerid\fP. The \fItimer_getoverrun\fP()
+function can then be implemented as a macro that uses the
+\fItimerid\fP argument (which may just be a pointer to a user space
+structure containing the counter) to locate the overrun count
+with no system call overhead. Other implementations, less concerned
+with this class of applications, can avoid the asynchronous
+update of user space by maintaining the count in a system structure
+at the cost of the extra system call to obtain it.
+.SS Timer Expiration Signal Parameters
+.LP
+The Realtime Signals Extension option supports an application-specific
+datum that is delivered to the extended signal handler.
+This value is explicitly specified by the application, along with
+the signal number to be delivered, in a \fBsigevent\fP
+structure. The type of the application-defined value can be either
+an integer constant or a pointer. This explicit specification of
+the value, as opposed to always sending the timer ID, was selected
+based on existing practice.
+.LP
+It is common practice for realtime applications (on non-POSIX systems
+or realtime extended POSIX systems) to use the parameters
+of event handlers as the case label of a switch statement or as a
+pointer to an application-defined data structure. Since
+\fItimer_id\fPs are dynamically allocated by the \fItimer_create\fP()
+function, they can be used for neither of these functions
+without additional application overhead in the signal handler; for
+example, to search an array of saved timer IDs to associate the
+ID with a constant or application data structure.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIclock_getres\fP(), \fItimer_delete\fP(), \fItimer_getoverrun\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<time.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/timer_delete.3p b/man-pages-posix-2003/man3p/timer_delete.3p
new file mode 100644
index 0000000..130e813
--- /dev/null
+++ b/man-pages-posix-2003/man3p/timer_delete.3p
@@ -0,0 +1,67 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TIMER_DELETE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" timer_delete
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+timer_delete \- delete a per-process timer (\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <time.h>
+.br
+.sp
+int timer_delete(timer_t\fP \fItimerid\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fItimer_delete\fP() function deletes the specified timer, \fItimerid\fP,
+previously created by the \fItimer_create\fP() function. If the timer
+is armed when \fItimer_delete\fP() is called,
+the behavior shall be as if the timer is automatically disarmed before
+removal. The disposition of pending signals for the deleted
+timer is unspecified.
+.SH RETURN VALUE
+.LP
+If successful, the \fItimer_delete\fP() function shall return a value
+of zero. Otherwise, the function shall return a value of
+-1 and set \fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+The \fItimer_delete\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The timer ID specified by \fItimerid\fP is not a valid timer ID.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fItimer_create\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<time.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/timer_getoverrun.3p b/man-pages-posix-2003/man3p/timer_getoverrun.3p
new file mode 100644
index 0000000..d82746b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/timer_getoverrun.3p
@@ -0,0 +1 @@
+.so man3p/timer_gettime.3p
diff --git a/man-pages-posix-2003/man3p/timer_gettime.3p b/man-pages-posix-2003/man3p/timer_gettime.3p
new file mode 100644
index 0000000..c463ce9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/timer_gettime.3p
@@ -0,0 +1,180 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TIMER_GETOVERRUN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" timer_getoverrun
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+timer_getoverrun, timer_gettime, timer_settime \- per-process timers
+(\fBREALTIME\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <time.h>
+.br
+.sp
+int timer_getoverrun(timer_t\fP \fItimerid\fP\fB);
+.br
+int timer_gettime(timer_t\fP \fItimerid\fP\fB, struct itimerspec *\fP\fIvalue\fP\fB);
+.br
+int timer_settime(timer_t\fP \fItimerid\fP\fB, int\fP \fIflags\fP\fB,
+.br
+\ \ \ \ \ \ const struct itimerspec *restrict\fP \fIvalue\fP\fB,
+.br
+\ \ \ \ \ \ struct itimerspec *restrict\fP \fIovalue\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fItimer_gettime\fP() function shall store the amount of time
+until the specified timer, \fItimerid\fP, expires and the
+reload value of the timer into the space pointed to by the \fIvalue\fP
+argument. The \fIit_value\fP member of this structure
+shall contain the amount of time before the timer expires, or zero
+if the timer is disarmed. This value is returned as the interval
+until timer expiration, even if the timer was armed with absolute
+time. The \fIit_interval\fP member of \fIvalue\fP shall contain
+the reload value last set by \fItimer_settime\fP().
+.LP
+The \fItimer_settime\fP() function shall set the time until the next
+expiration of the timer specified by \fItimerid\fP from
+the \fIit_value\fP member of the \fIvalue\fP argument and arm the
+timer if the \fIit_value\fP member of \fIvalue\fP is
+non-zero. If the specified timer was already armed when \fItimer_settime\fP()
+is called, this call shall reset the time until next
+expiration to the \fIvalue\fP specified. If the \fIit_value\fP member
+of \fIvalue\fP is zero, the timer shall be disarmed. The
+effect of disarming or resetting a timer with pending expiration notifications
+is unspecified.
+.LP
+If the flag TIMER_ABSTIME is not set in the argument \fIflags\fP,
+\fItimer_settime\fP() shall behave as if the time until next
+expiration is set to be equal to the interval specified by the \fIit_value\fP
+member of \fIvalue\fP. That is, the timer shall
+expire in \fIit_value\fP nanoseconds from when the call is made. If
+the flag TIMER_ABSTIME is set in the argument \fIflags\fP,
+\fItimer_settime\fP() shall behave as if the time until next expiration
+is set to be equal to the difference between the absolute
+time specified by the \fIit_value\fP member of \fIvalue\fP and the
+current value of the clock associated with \fItimerid\fP.
+That is, the timer shall expire when the clock reaches the value specified
+by the \fIit_value\fP member of \fIvalue\fP. If the
+specified time has already passed, the function shall succeed and
+the expiration notification shall be made.
+.LP
+The reload value of the timer shall be set to the value specified
+by the \fIit_interval\fP member of \fIvalue\fP. When a timer
+is armed with a non-zero \fIit_interval\fP, a periodic (or repetitive)
+timer is specified.
+.LP
+Time values that are between two consecutive non-negative integer
+multiples of the resolution of the specified timer shall be
+rounded up to the larger multiple of the resolution. Quantization
+error shall not cause the timer to expire earlier than the
+rounded time value.
+.LP
+If the argument \fIovalue\fP is not NULL, the \fItimer_settime\fP()
+function shall store, in the location referenced by
+\fIovalue\fP, a value representing the previous amount of time before
+the timer would have expired, or zero if the timer was
+disarmed, together with the previous timer reload value. Timers shall
+not expire before their scheduled time.
+.LP
+Only a single signal shall be queued to the process for a given timer
+at any point in time. When a timer for which a signal is
+still pending expires, no signal shall be queued, and a timer overrun
+shall occur. When a timer
+expiration signal is delivered to or accepted by a process, if the
+implementation supports the Realtime Signals Extension, the
+\fItimer_getoverrun\fP() function shall return the timer expiration
+overrun count for the specified timer. The overrun count
+returned contains the number of extra timer expirations that occurred
+between the time the signal was generated (queued) and when
+it was delivered or accepted, up to but not including an implementation-defined
+maximum of {DELAYTIMER_MAX}. If the number of such
+extra expirations is greater than or equal to {DELAYTIMER_MAX}, then
+the overrun count shall be set to {DELAYTIMER_MAX}. The value
+returned by \fItimer_getoverrun\fP() shall apply to the most recent
+expiration signal delivery or acceptance for the timer. If no expiration
+signal has been delivered for the timer, or if the
+Realtime Signals Extension is not supported, the return value of \fItimer_getoverrun\fP()
+is unspecified.
+.SH RETURN VALUE
+.LP
+If the \fItimer_getoverrun\fP() function succeeds, it shall return
+the timer expiration overrun count as explained above.
+.LP
+If the \fItimer_gettime\fP() or \fItimer_settime\fP() functions succeed,
+a value of 0 shall be returned.
+.LP
+If an error occurs for any of these functions, the value -1 shall
+be returned, and \fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fItimer_getoverrun\fP(), \fItimer_gettime\fP(), and \fItimer_settime\fP()
+functions shall fail if:
+.TP 7
+.B EINVAL
+The \fItimerid\fP argument does not correspond to an ID returned by
+\fItimer_create\fP() but not yet deleted by \fItimer_delete\fP().
+.sp
+.LP
+The \fItimer_settime\fP() function shall fail if:
+.TP 7
+.B EINVAL
+A \fIvalue\fP structure specified a nanosecond value less than zero
+or greater than or equal to 1000 million, and the
+\fIit_value\fP member of that structure did not specify zero seconds
+and nanoseconds.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+Practical clocks tick at a finite rate, with rates of 100 hertz and
+1000 hertz being common. The inverse of this tick rate is
+the clock resolution, also called the clock granularity, which in
+either case is expressed as a time duration, being 10
+milliseconds and 1 millisecond respectively for these common rates.
+The granularity of practical clocks implies that if one reads a
+given clock twice in rapid succession, one may get the same time value
+twice; and that timers must wait for the next clock tick
+after the theoretical expiration time, to ensure that a timer never
+returns too soon. Note also that the granularity of the clock
+may be significantly coarser than the resolution of the data format
+used to set and get time and interval values. Also note that
+some implementations may choose to adjust time and/or interval values
+to exactly match the ticks of the underlying clock.
+.LP
+This volume of IEEE\ Std\ 1003.1-2001 defines functions that allow
+an application to determine the
+implementation-supported resolution for the clocks and requires an
+implementation to document the resolution supported for timers
+and \fInanosleep\fP() if they differ from the supported clock resolution.
+This is more
+of a procurement issue than a runtime application issue.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIclock_getres\fP(), \fItimer_create\fP(), the Base
+Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<time.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/timer_settime.3p b/man-pages-posix-2003/man3p/timer_settime.3p
new file mode 100644
index 0000000..d82746b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/timer_settime.3p
@@ -0,0 +1 @@
+.so man3p/timer_gettime.3p
diff --git a/man-pages-posix-2003/man3p/times.3p b/man-pages-posix-2003/man3p/times.3p
new file mode 100644
index 0000000..15bd453
--- /dev/null
+++ b/man-pages-posix-2003/man3p/times.3p
@@ -0,0 +1,163 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TIMES" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" times
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+times \- get process and waited-for child process times
+.SH SYNOPSIS
+.LP
+\fB#include <sys/times.h>
+.br
+.sp
+clock_t times(struct tms *\fP\fIbuffer\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fItimes\fP() function shall fill the \fBtms\fP structure pointed
+to by \fIbuffer\fP with time-accounting information.
+The \fBtms\fP structure is defined in \fI<sys/times.h>\fP.
+.LP
+All times are measured in terms of the number of clock ticks used.
+.LP
+The times of a terminated child process shall be included in the \fItms_cutime\fP
+and \fItms_cstime\fP elements of the parent
+when \fIwait\fP() or \fIwaitpid\fP() returns the
+process ID of this terminated child. If a child process has not waited
+for its children, their times shall not be included in its
+times.
+.IP " *" 3
+The \fItms_utime\fP structure member is the CPU time charged for the
+execution of user instructions of the calling process.
+.LP
+.IP " *" 3
+The \fItms_stime\fP structure member is the CPU time charged for execution
+by the system on behalf of the calling process.
+.LP
+.IP " *" 3
+The \fItms_cutime\fP structure member is the sum of the \fItms_utime\fP
+and \fItms_cutime\fP times of the child
+processes.
+.LP
+.IP " *" 3
+The \fItms_cstime\fP structure member is the sum of the \fItms_stime\fP
+and \fItms_cstime\fP times of the child
+processes.
+.LP
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fItimes\fP() shall return the elapsed
+real time, in clock ticks, since an arbitrary point in the
+past (for example, system start-up time). This point does not change
+from one invocation of \fItimes\fP() within the process to
+another. The return value may overflow the possible range of type
+\fBclock_t\fP. If \fItimes\fP() fails, (\fBclock_t\fP)-1 shall
+be returned and \fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Timing a Database Lookup
+.LP
+The following example defines two functions, \fIstart_clock\fP() and
+\fIend_clock\fP(), that are used to time a lookup. It
+also defines variables of type \fBclock_t\fP and \fBtms\fP to measure
+the duration of transactions. The \fIstart_clock\fP()
+function saves the beginning times given by the \fItimes\fP() function.
+The \fIend_clock\fP() function gets the ending times and
+prints the difference between the two times.
+.sp
+.RS
+.nf
+
+\fB#include <sys/times.h>
+#include <stdio.h>
+\&...
+void start_clock(void);
+void end_clock(char *msg);
+\&...
+static clock_t st_time;
+static clock_t en_time;
+static struct tms st_cpu;
+static struct tms en_cpu;
+\&...
+void
+start_clock()
+{
+ st_time = times(&st_cpu);
+}
+.sp
+
+/* This example assumes that the result of each subtraction
+ is within the range of values that can be represented in
+ an integer type. */
+void
+end_clock(char *msg)
+{
+ en_time = times(&en_cpu);
+.sp
+
+ fputs(msg,stdout);
+ printf("Real Time: %jd, User Time %jd, System Time %jd\\n",
+ (intmax_t)(en_time - st_time),
+ (intmax_t)(en_cpu.tms_utime - st_cpu.tms_utime),
+ (intmax_t)(en_cpu.tms_stime - st_cpu.tms_stime));
+}
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+Applications should use \fIsysconf\fP(_SC_CLK_TCK) to determine the
+number of clock ticks per second as it may vary from system
+to system.
+.SH RATIONALE
+.LP
+The accuracy of the times reported is intentionally left unspecified
+to allow implementations flexibility in design, from
+uniprocessor to multi-processor networks.
+.LP
+The inclusion of times of child processes is recursive, so that a
+parent process may collect the total times of all of its
+descendants. But the times of a child are only added to those of its
+parent when its parent successfully waits on the child. Thus,
+it is not guaranteed that a parent process can always see the total
+times of all its descendants; see also the discussion of the
+term ``realtime'' in \fIalarm\fP().
+.LP
+If the type \fBclock_t\fP is defined to be a signed 32-bit integer,
+it overflows in somewhat more than a year if there are 60
+clock ticks per second, or less than a year if there are 100. There
+are individual systems that run continuously for longer than
+that. This volume of IEEE\ Std\ 1003.1-2001 permits an implementation
+to make the reference point for the returned value be
+the start-up time of the process, rather than system start-up time.
+.LP
+The term ``charge'' in this context has nothing to do with billing
+for services. The operating system accounts for time used in
+this way. That information must be correct, regardless of how that
+information is used.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIalarm\fP(), \fIexec\fP(), \fIfork\fP(), \fIsysconf\fP(), \fItime\fP(),
+\fIwait\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<sys/times.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/timezone.3p b/man-pages-posix-2003/man3p/timezone.3p
new file mode 100644
index 0000000..3c5f1bc
--- /dev/null
+++ b/man-pages-posix-2003/man3p/timezone.3p
@@ -0,0 +1 @@
+.so man3p/tzset.3p
diff --git a/man-pages-posix-2003/man3p/tmpfile.3p b/man-pages-posix-2003/man3p/tmpfile.3p
new file mode 100644
index 0000000..ac81246
--- /dev/null
+++ b/man-pages-posix-2003/man3p/tmpfile.3p
@@ -0,0 +1,118 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TMPFILE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" tmpfile
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+tmpfile \- create a temporary file
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+FILE *tmpfile(void);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fItmpfile\fP() function shall create a temporary file and open
+a corresponding stream. The file shall be automatically
+deleted when all references to the file are closed. The file is opened
+as in \fIfopen\fP()
+for update (\fIw\fP+).
+.LP
+In
+some implementations, a permanent file may be left behind if the process
+calling \fItmpfile\fP() is killed while it is processing
+a call to \fItmpfile\fP().
+.LP
+An error message may be written to standard error if the stream cannot
+be opened.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fItmpfile\fP() shall return a pointer
+to the stream of the file that is created. Otherwise, it
+shall return a null pointer and set \fIerrno\fP to indicate the
+error.
+.SH ERRORS
+.LP
+The \fItmpfile\fP() function shall fail if:
+.TP 7
+.B EINTR
+A
+signal was caught during \fItmpfile\fP().
+.TP 7
+.B EMFILE
+{OPEN_MAX} file descriptors are currently open in the calling process.
+.TP 7
+.B ENFILE
+The maximum allowable number of files is currently open in the system.
+.TP 7
+.B ENOSPC
+The directory or file system which would contain the new file cannot
+be expanded.
+.TP 7
+.B EOVERFLOW
+The file is a regular file and the size of the file cannot be represented
+correctly in an object of type \fBoff_t\fP.
+.sp
+.LP
+The \fItmpfile\fP() function may fail if:
+.TP 7
+.B EMFILE
+{FOPEN_MAX} streams are currently open in the calling process.
+.TP 7
+.B ENOMEM
+Insufficient storage space is available.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Creating a Temporary File
+.LP
+The following example creates a temporary file for update, and returns
+a pointer to a stream for the created file in the
+\fIfp\fP variable.
+.sp
+.RS
+.nf
+
+\fB#include <stdio.h>
+\&...
+FILE *fp;
+.sp
+
+fp = tmpfile ();
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+It should be possible to open at least {TMP_MAX} temporary files during
+the lifetime of the program (this limit may be shared
+with \fItmpnam\fP()) and there should be no limit on the number simultaneously
+open other
+than this limit and any limit on the number of open files ( {FOPEN_MAX}).
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfopen\fP(), \fItmpnam\fP(), \fIunlink\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/tmpnam.3p b/man-pages-posix-2003/man3p/tmpnam.3p
new file mode 100644
index 0000000..eac7d07
--- /dev/null
+++ b/man-pages-posix-2003/man3p/tmpnam.3p
@@ -0,0 +1,105 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TMPNAM" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" tmpnam
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+tmpnam \- create a name for a temporary file
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+char *tmpnam(char *\fP\fIs\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fItmpnam\fP() function shall generate a string that is a valid
+filename and that is not the same as the name of an
+existing file. The function is potentially capable of generating {TMP_MAX}
+different strings, but any or all of them may already be
+in use by existing files and thus not be suitable return values.
+.LP
+The \fItmpnam\fP() function generates a different string each time
+it is called from the same process, up to {TMP_MAX} times.
+If it is called more than {TMP_MAX} times, the behavior is implementation-defined.
+.LP
+The implementation shall behave as if no function defined in this
+volume of IEEE\ Std\ 1003.1-2001 calls
+\fItmpnam\fP().
+.LP
+If
+the application uses any of the functions guaranteed to be available
+if either _POSIX_THREAD_SAFE_FUNCTIONS or _POSIX_THREADS is
+defined, the application shall ensure that the \fItmpnam\fP() function
+is called with a non-NULL parameter.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fItmpnam\fP() shall return a pointer
+to a string. If no suitable string can be generated, the
+\fItmpnam\fP() function shall return a null pointer.
+.LP
+If the argument \fIs\fP is a null pointer, \fItmpnam\fP() shall leave
+its result in an internal static object and return a
+pointer to that object. Subsequent calls to \fItmpnam\fP() may modify
+the same object. If the argument \fIs\fP is not a null
+pointer, it is presumed to point to an array of at least L_tmpnam
+\fBchar\fPs; \fItmpnam\fP() shall write its result in that
+array and shall return the argument as its value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Generating a Filename
+.LP
+The following example generates a unique filename and stores it in
+the array pointed to by \fIptr\fP.
+.sp
+.RS
+.nf
+
+\fB#include <stdio.h>
+\&...
+char filename[L_tmpnam+1];
+char *ptr;
+.sp
+
+ptr = tmpnam(filename);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+This function only creates filenames. It is the application's responsibility
+to create and remove the files.
+.LP
+Between the time a pathname is created and the file is opened, it
+is possible for some other process to create a file with the
+same name. Applications may find \fItmpfile\fP() more useful.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfopen\fP(), \fIopen\fP(), \fItempnam\fP(),
+\fItmpfile\fP(), \fIunlink\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/toascii.3p b/man-pages-posix-2003/man3p/toascii.3p
new file mode 100644
index 0000000..bd9b3b4
--- /dev/null
+++ b/man-pages-posix-2003/man3p/toascii.3p
@@ -0,0 +1,57 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TOASCII" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" toascii
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+toascii \- translate an integer to a 7-bit ASCII character
+.SH SYNOPSIS
+.LP
+\fB#include <ctype.h>
+.br
+.sp
+int toascii(int\fP \fIc\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fItoascii\fP() function shall convert its argument into a 7-bit
+ASCII character.
+.SH RETURN VALUE
+.LP
+The \fItoascii\fP() function shall return the value (\fIc\fP &0x7f).
+.SH ERRORS
+.LP
+No errors are returned.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIisascii\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<ctype.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/tolower.3p b/man-pages-posix-2003/man3p/tolower.3p
new file mode 100644
index 0000000..8d3ab5f
--- /dev/null
+++ b/man-pages-posix-2003/man3p/tolower.3p
@@ -0,0 +1,65 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TOLOWER" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" tolower
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+tolower \- transliterate uppercase characters to lowercase
+.SH SYNOPSIS
+.LP
+\fB#include <ctype.h>
+.br
+.sp
+int tolower(int\fP \fIc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fItolower\fP() function has as a domain a type \fBint\fP, the
+value of which is representable as an \fBunsigned char\fP
+or the value of EOF. If the argument has any other value, the behavior
+is undefined. If the argument of \fItolower\fP() represents
+an uppercase letter, and there exists a corresponding lowercase letter
+\ (as defined by character type information in the program
+locale category \fILC_CTYPE ),\fP the result shall be the
+corresponding lowercase letter. All other arguments in the domain
+are returned unchanged.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fItolower\fP() shall return the lowercase
+letter corresponding to the argument passed; otherwise,
+it shall return the argument unchanged.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsetlocale\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 7, Locale, \fI<ctype.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/toupper.3p b/man-pages-posix-2003/man3p/toupper.3p
new file mode 100644
index 0000000..cb78f39
--- /dev/null
+++ b/man-pages-posix-2003/man3p/toupper.3p
@@ -0,0 +1,64 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TOUPPER" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" toupper
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+toupper \- transliterate lowercase characters to uppercase
+.SH SYNOPSIS
+.LP
+\fB#include <ctype.h>
+.br
+.sp
+int toupper(int\fP \fIc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fItoupper\fP() function has as a domain a type \fBint\fP, the
+value of which is representable as an \fBunsigned char\fP
+or the value of EOF. If the argument has any other value, the behavior
+is undefined. If the argument of \fItoupper\fP() represents
+a lowercase letter, and there exists a corresponding uppercase letter
+\ (as defined by character type information in the program
+locale category \fILC_CTYPE ),\fP the result shall be the
+corresponding uppercase letter. All other arguments in the domain
+are returned unchanged.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fItoupper\fP() shall return the uppercase
+letter corresponding to the argument passed.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsetlocale\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 7, Locale, \fI<ctype.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/towctrans.3p b/man-pages-posix-2003/man3p/towctrans.3p
new file mode 100644
index 0000000..f6e4714
--- /dev/null
+++ b/man-pages-posix-2003/man3p/towctrans.3p
@@ -0,0 +1,86 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TOWCTRANS" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" towctrans
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+towctrans \- wide-character transliteration
+.SH SYNOPSIS
+.LP
+\fB#include <wctype.h>
+.br
+.sp
+wint_t towctrans(wint_t\fP \fIwc\fP\fB, wctrans_t\fP \fIdesc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fItowctrans\fP() function shall transliterate the wide-character
+code \fIwc\fP using the mapping described by
+\fIdesc\fP. The current setting of the \fILC_CTYPE\fP category should
+be the same as during the call to \fIwctrans\fP() that returned the
+value \fIdesc\fP. If the value
+of \fIdesc\fP is invalid (that is, not obtained by a call to \fIwctrans\fP()
+or
+\fIdesc\fP is invalidated by a subsequent call to \fIsetlocale\fP()
+that has affected
+category \fILC_CTYPE ),\fP the result is unspecified.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to 0 before calling \fItowctrans\fP(). If
+\fIerrno\fP is non-zero on return, an error has occurred.
+.SH RETURN VALUE
+.LP
+If successful, the \fItowctrans\fP() function shall return the mapped
+value of \fIwc\fP using the mapping described by
+\fIdesc\fP. Otherwise, it shall return \fIwc\fP unchanged.
+.SH ERRORS
+.LP
+The \fItowctrans\fP() function may fail if:
+.TP 7
+.B EINVAL
+\fIdesc\fP contains an invalid transliteration descriptor.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The strings \fB"tolower"\fP and \fB"toupper"\fP are reserved for the
+standard mapping names. In the table below, the
+functions in the left column are equivalent to the functions in the
+right column.
+.sp
+.RS
+.nf
+
+\fBtowlower(\fP\fIwc\fP\fB) towctrans(\fP\fIwc\fP\fB, wctrans("tolower"))
+towupper(\fP\fIwc\fP\fB) towctrans(\fP\fIwc\fP\fB, wctrans("toupper"))
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fItowlower\fP(), \fItowupper\fP(), \fIwctrans\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<wctype.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/towlower.3p b/man-pages-posix-2003/man3p/towlower.3p
new file mode 100644
index 0000000..bcc7765
--- /dev/null
+++ b/man-pages-posix-2003/man3p/towlower.3p
@@ -0,0 +1,67 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TOWLOWER" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" towlower
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+towlower \- transliterate uppercase wide-character code to lowercase
+.SH SYNOPSIS
+.LP
+\fB#include <wctype.h>
+.br
+.sp
+wint_t towlower(wint_t\fP \fIwc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fItowlower\fP() function has as a domain a type \fBwint_t\fP,
+the value of which the application shall ensure is a
+character representable as a \fBwchar_t\fP, and a wide-character code
+corresponding to a valid character in the current locale or
+the value of WEOF. If the argument has any other value, the behavior
+is undefined. If the argument of \fItowlower\fP() represents
+an uppercase wide-character code, and there exists a corresponding
+lowercase wide-character code (as defined by character type
+information in the program locale category \fILC_CTYPE ),\fP the result
+shall be the corresponding lowercase wide-character code.
+All other arguments in the domain are returned unchanged.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fItowlower\fP() shall return the lowercase
+letter corresponding to the argument passed; otherwise,
+it shall return the argument unchanged.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsetlocale\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 7, Locale, \fI<wctype.h>\fP, \fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/towupper.3p b/man-pages-posix-2003/man3p/towupper.3p
new file mode 100644
index 0000000..4a1a89d
--- /dev/null
+++ b/man-pages-posix-2003/man3p/towupper.3p
@@ -0,0 +1,67 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TOWUPPER" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" towupper
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+towupper \- transliterate lowercase wide-character code to uppercase
+.SH SYNOPSIS
+.LP
+\fB#include <wctype.h>
+.br
+.sp
+wint_t towupper(wint_t\fP \fIwc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fItowupper\fP() function has as a domain a type \fBwint_t\fP,
+the value of which the application shall ensure is a
+character representable as a \fBwchar_t\fP, and a wide-character code
+corresponding to a valid character in the current locale or
+the value of WEOF. If the argument has any other value, the behavior
+is undefined. If the argument of \fItowupper\fP() represents
+a lowercase wide-character code, and there exists a corresponding
+uppercase wide-character code (as defined by character type
+information in the program locale category \fILC_CTYPE ),\fP the result
+shall be the corresponding uppercase wide-character code.
+All other arguments in the domain are returned unchanged.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fItowupper\fP() shall return the uppercase
+letter corresponding to the argument passed. Otherwise,
+it shall return the argument unchanged.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIsetlocale\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Chapter 7, Locale, \fI<wctype.h>\fP, \fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/trunc.3p b/man-pages-posix-2003/man3p/trunc.3p
new file mode 100644
index 0000000..5515aa0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/trunc.3p
@@ -0,0 +1,66 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TRUNC" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" trunc
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+trunc, truncf, truncl \- round to truncated integer value
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double trunc(double\fP \fIx\fP\fB);
+.br
+float truncf(float\fP \fIx\fP\fB);
+.br
+long double truncl(long double\fP \fIx\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall round their argument to the integer value, in
+floating format, nearest to but no larger in magnitude than
+the argument.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the truncated
+integer value.
+.LP
+If
+\fIx\fP is NaN, a NaN shall be returned.
+.LP
+If \fIx\fP is \(+-0 or \(+-Inf, \fIx\fP shall be returned.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/truncate.3p b/man-pages-posix-2003/man3p/truncate.3p
new file mode 100644
index 0000000..a9d542f
--- /dev/null
+++ b/man-pages-posix-2003/man3p/truncate.3p
@@ -0,0 +1,128 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TRUNCATE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" truncate
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+truncate \- truncate a file to a specified length
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+int truncate(const char *\fP\fIpath\fP\fB, off_t\fP \fIlength\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fItruncate\fP() function shall cause the regular file named by
+\fIpath\fP to have a size which shall be equal to
+\fIlength\fP bytes.
+.LP
+If the file previously was larger than \fIlength\fP, the extra data
+is discarded. If the file was previously shorter than
+\fIlength\fP, its size is increased, and the extended area appears
+as if it were zero-filled.
+.LP
+The application shall ensure that the process has write permission
+for the file.
+.LP
+If the request would cause the file size to exceed the soft file size
+limit for the process, the request shall fail and the
+implementation shall generate the SIGXFSZ signal for the process.
+.LP
+This function shall not modify the file offset for any open file descriptions
+associated with the file. Upon successful
+completion, if the file size is changed, this function shall mark
+for update the \fIst_ctime\fP and \fIst_mtime\fP fields of the
+file, and the S_ISUID and S_ISGID bits of the file mode may be cleared.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fItruncate\fP() shall return 0. Otherwise,
+-1 shall be returned, and \fIerrno\fP set to indicate
+the error.
+.SH ERRORS
+.LP
+The \fItruncate\fP() function shall fail if:
+.TP 7
+.B EINTR
+A signal was caught during execution.
+.TP 7
+.B EINVAL
+The \fIlength\fP argument was less than 0.
+.TP 7
+.B EFBIG \fRor\fP EINVAL
+The \fIlength\fP argument was greater than the maximum file size.
+.TP 7
+.B EIO
+An I/O error occurred while reading from or writing to a file system.
+.TP 7
+.B EACCES
+A component of the path prefix denies search permission, or write
+permission is denied on the file.
+.TP 7
+.B EISDIR
+The named file is a directory.
+.TP 7
+.B ELOOP
+A loop exists in symbolic links encountered during resolution of the
+\fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+The length of the \fIpath\fP argument exceeds {PATH_MAX} or a pathname
+component is longer than {NAME_MAX}.
+.TP 7
+.B ENOENT
+A component of \fIpath\fP does not name an existing file or \fIpath\fP
+is an empty string.
+.TP 7
+.B ENOTDIR
+A component of the path prefix of \fIpath\fP is not a directory.
+.TP 7
+.B EROFS
+The named file resides on a read-only file system.
+.sp
+.LP
+The \fItruncate\fP() function may fail if:
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the \fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+Pathname resolution of a symbolic link produced an intermediate result
+whose length exceeds {PATH_MAX}.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIopen\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/truncf.3p b/man-pages-posix-2003/man3p/truncf.3p
new file mode 100644
index 0000000..440bc9f
--- /dev/null
+++ b/man-pages-posix-2003/man3p/truncf.3p
@@ -0,0 +1 @@
+.so man3p/trunc.3p
diff --git a/man-pages-posix-2003/man3p/truncl.3p b/man-pages-posix-2003/man3p/truncl.3p
new file mode 100644
index 0000000..440bc9f
--- /dev/null
+++ b/man-pages-posix-2003/man3p/truncl.3p
@@ -0,0 +1 @@
+.so man3p/trunc.3p
diff --git a/man-pages-posix-2003/man3p/tsearch.3p b/man-pages-posix-2003/man3p/tsearch.3p
new file mode 100644
index 0000000..96780b6
--- /dev/null
+++ b/man-pages-posix-2003/man3p/tsearch.3p
@@ -0,0 +1,249 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TDELETE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" tdelete
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+tdelete, tfind, tsearch, twalk \- manage a binary search tree
+.SH SYNOPSIS
+.LP
+\fB#include <search.h>
+.br
+.sp
+void *tdelete(const void *restrict\fP \fIkey\fP\fB, void **restrict\fP
+\fIrootp\fP\fB,
+.br
+\ \ \ \ \ \ int(*\fP\fIcompar\fP\fB)(const void *, const void *));
+.br
+void *tfind(const void *\fP\fIkey\fP\fB, void *const *\fP\fIrootp\fP\fB,
+.br
+\ \ \ \ \ \ int(*\fP\fIcompar\fP\fB)(const void *, const void *));
+.br
+void *tsearch(const void *\fP\fIkey\fP\fB, void **\fP\fIrootp\fP\fB,
+.br
+\ \ \ \ \ \ int (*\fP\fIcompar\fP\fB)(const void *, const void *));
+.br
+void twalk(const void *\fP\fIroot\fP\fB,
+.br
+\ \ \ \ \ \ void (*\fP\fIaction\fP\fB)(const void *, VISIT, int));
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fItdelete\fP(), \fItfind\fP(), \fItsearch\fP(), and \fItwalk\fP()
+functions manipulate binary search trees. Comparisons
+are made with a user-supplied routine, the address of which is passed
+as the \fIcompar\fP argument. This routine is called with
+two arguments, which are the pointers to the elements being compared.
+The application shall ensure that the user-supplied routine
+returns an integer less than, equal to, or greater than 0, according
+to whether the first argument is to be considered less than,
+equal to, or greater than the second argument. The comparison function
+need not compare every byte, so arbitrary data may be
+contained in the elements in addition to the values being compared.
+.LP
+The \fItsearch\fP() function shall build and access the tree. The
+\fIkey\fP argument is a pointer to an element to be accessed
+or stored. If there is a node in the tree whose element is equal to
+the value pointed to by \fIkey\fP, a pointer to this found
+node shall be returned. Otherwise, the value pointed to by \fIkey\fP
+shall be inserted (that is, a new node is created and the
+value of \fIkey\fP is copied to this node), and a pointer to this
+node returned. Only pointers are copied, so the application
+shall ensure that the calling routine stores the data. The \fIrootp\fP
+argument points to a variable that points to the root node
+of the tree. A null pointer value for the variable pointed to by \fIrootp\fP
+denotes an empty tree; in this case, the variable
+shall be set to point to the node which shall be at the root of the
+new tree.
+.LP
+Like \fItsearch\fP(), \fItfind\fP() shall search for a node in the
+tree, returning a pointer to it if found. However, if it is
+not found, \fItfind\fP() shall return a null pointer. The arguments
+for \fItfind\fP() are the same as for \fItsearch\fP().
+.LP
+The \fItdelete\fP() function shall delete a node from a binary search
+tree. The arguments are the same as for \fItsearch\fP().
+The variable pointed to by \fIrootp\fP shall be changed if the deleted
+node was the root of the tree. The \fItdelete\fP()
+function shall return a pointer to the parent of the deleted node,
+or a null pointer if the node is not found.
+.LP
+The \fItwalk\fP() function shall traverse a binary search tree. The
+\fIroot\fP argument is a pointer to the root node of the
+tree to be traversed. (Any node in a tree may be used as the root
+for a walk below that node.) The argument \fIaction\fP is the
+name of a routine to be invoked at each node. This routine is, in
+turn, called with three arguments. The first argument shall be
+the address of the node being visited. The structure pointed to by
+this argument is unspecified and shall not be modified by the
+application, but it shall be possible to cast a pointer-to-node into
+a pointer-to-pointer-to-element to access the element stored
+in the node. The second argument shall be a value from an enumeration
+data type:
+.sp
+.RS
+.nf
+
+\fBtypedef enum { preorder, postorder, endorder, leaf } VISIT;
+\fP
+.fi
+.RE
+.LP
+(defined in \fI<search.h>\fP), depending on whether this is the first,
+second, or
+third time that the node is visited (during a depth-first, left-to-right
+traversal of the tree), or whether the node is a leaf. The
+third argument shall be the level of the node in the tree, with the
+root being level 0.
+.LP
+If the calling function alters the pointer to the root, the result
+is undefined.
+.SH RETURN VALUE
+.LP
+If the node is found, both \fItsearch\fP() and \fItfind\fP() shall
+return a pointer to it. If not, \fItfind\fP() shall return
+a null pointer, and \fItsearch\fP() shall return a pointer to the
+inserted item.
+.LP
+A null pointer shall be returned by \fItsearch\fP() if there is not
+enough space available to create a new node.
+.LP
+A null pointer shall be returned by \fItdelete\fP(), \fItfind\fP(),
+and \fItsearch\fP() if \fIrootp\fP is a null pointer on
+entry.
+.LP
+The \fItdelete\fP() function shall return a pointer to the parent
+of the deleted node, or a null pointer if the node is not
+found.
+.LP
+The \fItwalk\fP() function shall not return a value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+The following code reads in strings and stores structures containing
+a pointer to each string and a count of its length. It then
+walks the tree, printing out the stored strings and their lengths
+in alphabetical order.
+.sp
+.RS
+.nf
+
+\fB#include <search.h>
+#include <string.h>
+#include <stdio.h>
+.sp
+
+#define STRSZ 10000
+#define NODSZ 500
+.sp
+
+struct node { /* Pointers to these are stored in the tree. */
+ char *string;
+ int length;
+};
+.sp
+
+char string_space[STRSZ]; /* Space to store strings. */
+struct node nodes[NODSZ]; /* Nodes to store. */
+void *root = NULL; /* This points to the root. */
+.sp
+
+int main(int argc, char *argv[])
+{
+ char *strptr = string_space;
+ struct node *nodeptr = nodes;
+ void print_node(const void *, VISIT, int);
+ int i = 0, node_compare(const void *, const void *);
+.sp
+
+ while (gets(strptr) != NULL && i++ < NODSZ) {
+ /* Set node. */
+ nodeptr->string = strptr;
+ nodeptr->length = strlen(strptr);
+ /* Put node into the tree. */
+ (void) tsearch((void *)nodeptr, (void **)&root,
+ node_compare);
+ /* Adjust pointers, so we do not overwrite tree. */
+ strptr += nodeptr->length + 1;
+ nodeptr++;
+ }
+ twalk(root, print_node);
+ return 0;
+}
+.sp
+
+/*
+ * This routine compares two nodes, based on an
+ * alphabetical ordering of the string field.
+ */
+int
+node_compare(const void *node1, const void *node2)
+{
+ return strcmp(((const struct node *) node1)->string,
+ ((const struct node *) node2)->string);
+}
+.sp
+
+/*
+ * This routine prints out a node, the second time
+ * twalk encounters it or if it is a leaf.
+ */
+void
+print_node(const void *ptr, VISIT order, int level)
+{
+ const struct node *p = *(const struct node **) ptr;
+.sp
+
+ if (order == postorder || order == leaf) {
+ (void) printf("string = %s, length = %d\\n",
+ p->string, p->length);
+ }
+}
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The \fIroot\fP argument to \fItwalk\fP() is one level of indirection
+less than the \fIrootp\fP arguments to \fItdelete\fP()
+and \fItsearch\fP().
+.LP
+There are two nomenclatures used to refer to the order in which tree
+nodes are visited. The \fItsearch\fP() function uses
+\fBpreorder\fP, \fBpostorder\fP, and \fBendorder\fP to refer respectively
+to visiting a node before any of its children, after
+its left child and before its right, and after both its children.
+The alternative nomenclature uses \fBpreorder\fP,
+\fBinorder\fP, and \fBpostorder\fP to refer to the same visits, which
+could result in some confusion over the meaning of
+\fBpostorder\fP.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIhcreate\fP(), \fIlsearch\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<search.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/ttyname.3p b/man-pages-posix-2003/man3p/ttyname.3p
new file mode 100644
index 0000000..ffd55d9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ttyname.3p
@@ -0,0 +1,108 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TTYNAME" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ttyname
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ttyname, ttyname_r \- find the pathname of a terminal
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+char *ttyname(int\fP \fIfildes\fP\fB);
+.br
+\fP
+.LP
+\fBint ttyname_r(int\fP \fIfildes\fP\fB, char *\fP\fIname\fP\fB, size_t\fP
+\fInamesize\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIttyname\fP() function shall return a pointer to a string containing
+a null-terminated pathname of the terminal
+associated with file descriptor \fIfildes\fP. The return value may
+point to static data whose content is overwritten by each
+call.
+.LP
+The \fIttyname\fP() function need not be reentrant. A function that
+is not required to be reentrant is not required to be
+thread-safe.
+.LP
+The \fIttyname_r\fP() function shall store the null-terminated pathname
+of the terminal associated with the file descriptor
+\fIfildes\fP in the character array referenced by \fIname\fP. The
+array is \fInamesize\fP characters long and should have space
+for the name and the terminating null character. The maximum length
+of the terminal name shall be {TTY_NAME_MAX}.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIttyname\fP() shall return a pointer
+to a string. Otherwise, a null pointer shall be returned and
+\fIerrno\fP set to indicate the error.
+.LP
+If successful, the \fIttyname_r\fP() function shall return zero. Otherwise,
+an error number shall be returned to indicate the
+error.
+.SH ERRORS
+.LP
+The \fIttyname\fP() function may fail if:
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not a valid file descriptor.
+.TP 7
+.B ENOTTY
+The \fIfildes\fP argument does not refer to a terminal.
+.sp
+.LP
+The \fIttyname_r\fP() function may fail if:
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not a valid file descriptor.
+.TP 7
+.B ENOTTY
+The \fIfildes\fP argument does not refer to a terminal.
+.TP 7
+.B ERANGE
+The value of \fInamesize\fP is smaller than the length of the string
+to be returned including the terminating null character.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The term ``terminal'' is used instead of the historical term ``terminal
+device'' in order to avoid a reference to an undefined
+term.
+.LP
+The thread-safe version places the terminal name in a user-supplied
+buffer and returns a non-zero value if it fails. The
+non-thread-safe version may return the name in a static data area
+that may be overwritten by each call.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/ttyname_r.3p b/man-pages-posix-2003/man3p/ttyname_r.3p
new file mode 100644
index 0000000..50a133d
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ttyname_r.3p
@@ -0,0 +1 @@
+.so man3p/ttyname.3p
diff --git a/man-pages-posix-2003/man3p/twalk.3p b/man-pages-posix-2003/man3p/twalk.3p
new file mode 100644
index 0000000..e706caf
--- /dev/null
+++ b/man-pages-posix-2003/man3p/twalk.3p
@@ -0,0 +1 @@
+.so man3p/tsearch.3p
diff --git a/man-pages-posix-2003/man3p/tzname.3p b/man-pages-posix-2003/man3p/tzname.3p
new file mode 100644
index 0000000..3c5f1bc
--- /dev/null
+++ b/man-pages-posix-2003/man3p/tzname.3p
@@ -0,0 +1 @@
+.so man3p/tzset.3p
diff --git a/man-pages-posix-2003/man3p/tzset.3p b/man-pages-posix-2003/man3p/tzset.3p
new file mode 100644
index 0000000..54ef25e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/tzset.3p
@@ -0,0 +1,105 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "TZSET" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" tzset
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+daylight, timezone, tzname, tzset \- set timezone conversion information
+.SH SYNOPSIS
+.LP
+\fB#include <time.h>
+.br
+.sp
+\fP
+.LP
+\fBextern int daylight;
+.br
+extern long timezone;
+.br
+\fP
+.LP
+\fBextern char *tzname[2];
+.br
+void tzset(void); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fItzset\fP() function shall use the value of the environment
+variable \fITZ\fP to set time conversion information used by
+\fIctime\fP(), \fIlocaltime\fP(), \fImktime\fP(), and \fIstrftime\fP()
+\&. If \fITZ\fP is absent from the
+environment, implementation-defined default timezone information shall
+be used.
+.LP
+The \fItzset\fP() function shall set the external variable \fItzname\fP
+as follows:
+.sp
+.RS
+.nf
+
+\fBtzname[0] = "\fP\fIstd\fP\fB";
+tzname[1] = "\fP\fIdst\fP\fB";
+\fP
+.fi
+.RE
+.LP
+where \fIstd\fP and \fIdst\fP are as described in the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, Chapter 8, Environment Variables.
+.LP
+The \fItzset\fP() function also shall set the external variable \fIdaylight\fP
+to 0 if Daylight Savings Time conversions should
+never be applied for the timezone in use; otherwise, non-zero. The
+external variable \fItimezone\fP shall be set to the
+difference, in seconds, between Coordinated Universal Time (UTC) and
+local standard time.
+.SH RETURN VALUE
+.LP
+The \fItzset\fP() function shall not return a value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+Example \fITZ\fP variables and their timezone differences are given
+in the table below:
+.TS C
+center; l l.
+TZ timezone
+EST5EDT 5*60*60
+GMT0 0*60*60
+JST-9 -9*60*60
+MET-1MEST -1*60*60
+MST7MDT 7*60*60
+PST8PDT 8*60*60
+.TE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIctime\fP(), \fIlocaltime\fP(), \fImktime\fP(), \fIstrftime\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 8, Environment Variables, \fI<time.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/ualarm.3p b/man-pages-posix-2003/man3p/ualarm.3p
new file mode 100644
index 0000000..85aedd9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ualarm.3p
@@ -0,0 +1,94 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "UALARM" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ualarm
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ualarm \- set the interval timer
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+useconds_t ualarm(useconds_t\fP \fIuseconds\fP\fB, useconds_t\fP \fIinterval\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIualarm\fP() function shall cause the SIGALRM signal to be generated
+for the calling process after the number of realtime
+microseconds specified by the \fIuseconds\fP argument has elapsed.
+When the \fIinterval\fP argument is non-zero, repeated timeout
+notification occurs with a period in microseconds specified by the
+\fIinterval\fP argument. If the notification signal, SIGALRM,
+is not caught or ignored, the calling process is terminated.
+.LP
+Implementations may place limitations on the granularity of timer
+values. For each interval timer, if the requested timer value
+requires a finer granularity than the implementation supports, the
+actual timer value shall be rounded up to the next supported
+value.
+.LP
+Interactions between \fIualarm\fP() and any of the following are unspecified:
+.sp
+.RS
+.nf
+
+\fIalarm\fP()
+\fInanosleep\fP()
+\fIsetitimer\fP()
+\fItimer_create\fP()
+\fItimer_delete\fP()
+\fItimer_getoverrun\fP()
+\fItimer_gettime\fP()
+\fItimer_settime\fP()
+\fIsleep\fP()
+.fi
+.RE
+.SH RETURN VALUE
+.LP
+The \fIualarm\fP() function shall return the number of microseconds
+remaining from the previous \fIualarm\fP() call. If no
+timeouts are pending or if \fIualarm\fP() has not previously been
+called, \fIualarm\fP() shall return 0.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Applications are recommended to use \fInanosleep\fP() if the Timers
+option is
+supported, or \fIsetitimer\fP(), \fItimer_create\fP(), \fItimer_delete\fP(),
+\fItimer_getoverrun\fP(), \fItimer_gettime\fP(), or \fItimer_settime\fP()
+instead of this function.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIalarm\fP(), \fInanosleep\fP(), \fIsetitimer\fP(), \fIsleep\fP(),
+\fItimer_create\fP(), \fItimer_delete\fP(), \fItimer_getoverrun\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/ulimit.3p b/man-pages-posix-2003/man3p/ulimit.3p
new file mode 100644
index 0000000..d617b81
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ulimit.3p
@@ -0,0 +1,97 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ULIMIT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ulimit
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ulimit \- get and set process limits
+.SH SYNOPSIS
+.LP
+\fB#include <ulimit.h>
+.br
+.sp
+long ulimit(int\fP \fIcmd\fP\fB, ...); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIulimit\fP() function shall control process limits. The process
+limits that can be controlled by this function include
+the maximum size of a single file that can be written (this is equivalent
+to using \fIsetrlimit\fP() with RLIMIT_FSIZE). The \fIcmd\fP values,
+defined in \fI<ulimit.h>\fP, include:
+.TP 7
+UL_GETFSIZE
+Return the file size limit (RLIMIT_FSIZE) of the process. The limit
+shall be in units of 512-byte blocks and shall be inherited
+by child processes. Files of any size can be read. The return value
+shall be the integer part of the soft file size limit divided
+by 512. If the result cannot be represented as a \fBlong\fP, the result
+is unspecified.
+.TP 7
+UL_SETFSIZE
+Set the file size limit for output operations of the process to the
+value of the second argument, taken as a \fBlong\fP,
+multiplied by 512. If the result would overflow an \fBrlim_t\fP, the
+actual value set is unspecified. Any process may decrease its
+own limit, but only a process with appropriate privileges may increase
+the limit. The return value shall be the integer part of the
+new file size limit divided by 512.
+.sp
+.LP
+The \fIulimit\fP() function shall not change the setting of \fIerrno\fP
+if successful.
+.LP
+As all return values are permissible in a successful situation, an
+application wishing to check for error situations should set
+\fIerrno\fP to 0, then call \fIulimit\fP(), and, if it returns -1,
+check to see if \fIerrno\fP is non-zero.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIulimit\fP() shall return the value
+of the requested limit. Otherwise, -1 shall be returned and
+\fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fIulimit\fP() function shall fail and the limit shall be unchanged
+if:
+.TP 7
+.B EINVAL
+The \fIcmd\fP argument is not valid.
+.TP 7
+.B EPERM
+A process not having appropriate privileges attempts to increase its
+file size limit.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgetrlimit\fP(), \fIsetrlimit\fP(), \fIwrite\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<ulimit.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/umask.3p b/man-pages-posix-2003/man3p/umask.3p
new file mode 100644
index 0000000..7f1ec6f
--- /dev/null
+++ b/man-pages-posix-2003/man3p/umask.3p
@@ -0,0 +1,79 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "UMASK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" umask
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+umask \- set and get the file mode creation mask
+.SH SYNOPSIS
+.LP
+\fB#include <sys/stat.h>
+.br
+.sp
+mode_t umask(mode_t\fP \fIcmask\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIumask\fP() function shall set the process' file mode creation
+mask to \fIcmask\fP and return the previous value of the
+mask. Only the file permission bits of \fIcmask\fP (see \fI<sys/stat.h>\fP)
+are
+used; the meaning of the other bits is implementation-defined.
+.LP
+The process' file mode creation mask is used during \fIopen\fP(),
+\fIcreat\fP(), \fImkdir\fP(), and \fImkfifo\fP() to turn off permission
+bits in the \fImode\fP argument supplied. Bit positions that
+are set in \fIcmask\fP are cleared in the mode of the created file.
+.SH RETURN VALUE
+.LP
+The file permission bits in the value returned by \fIumask\fP() shall
+be the previous value of the file mode creation mask. The
+state of any other bits in that value is unspecified, except that
+a subsequent call to \fIumask\fP() with the returned value as
+\fIcmask\fP shall leave the state of the mask the same as its state
+before the first call, including any unspecified use of those
+bits.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+Unsigned argument and return types for \fIumask\fP() were proposed.
+The return type and the argument were both changed to
+\fBmode_t\fP.
+.LP
+Historical implementations have made use of additional bits in \fIcmask\fP
+for their implementation-defined purposes. The
+addition of the text that the meaning of other bits of the field is
+implementation-defined permits these implementations to conform
+to this volume of IEEE\ Std\ 1003.1-2001.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIcreat\fP(), \fImkdir\fP(), \fImkfifo\fP(),
+\fIopen\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<sys/stat.h>\fP, \fI<sys/types.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/uname.3p b/man-pages-posix-2003/man3p/uname.3p
new file mode 100644
index 0000000..d9ffe70
--- /dev/null
+++ b/man-pages-posix-2003/man3p/uname.3p
@@ -0,0 +1,96 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "UNAME" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" uname
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+uname \- get the name of the current system
+.SH SYNOPSIS
+.LP
+\fB#include <sys/utsname.h>
+.br
+.sp
+int uname(struct utsname *\fP\fIname\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIuname\fP() function shall store information identifying the
+current system in the structure pointed to by
+\fIname\fP.
+.LP
+The \fIuname\fP() function uses the \fButsname\fP structure defined
+in \fI<sys/utsname.h>\fP.
+.LP
+The \fIuname\fP() function shall return a string naming the current
+system in the character array \fIsysname\fP. Similarly,
+\fInodename\fP shall contain the name of this node within an implementation-defined
+communications network. The arrays
+\fIrelease\fP and \fIversion\fP shall further identify the operating
+system. The array \fImachine\fP shall contain a name that
+identifies the hardware that the system is running on.
+.LP
+The format of each member is implementation-defined.
+.SH RETURN VALUE
+.LP
+Upon successful completion, a non-negative value shall be returned.
+Otherwise, -1 shall be returned and \fIerrno\fP set to
+indicate the error.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The inclusion of the \fInodename\fP member in this structure does
+not imply that it is sufficient information for interfacing
+to communications networks.
+.SH RATIONALE
+.LP
+The values of the structure members are not constrained to have any
+relation to the version of this volume of
+IEEE\ Std\ 1003.1-2001 implemented in the operating system. An application
+should instead depend on _POSIX_VERSION and
+related constants defined in \fI<unistd.h>\fP.
+.LP
+This volume of IEEE\ Std\ 1003.1-2001 does not define the sizes of
+the members of the structure and permits them to be
+of different sizes, although most implementations define them all
+to be the same size: eight bytes plus one byte for the string
+terminator. That size for \fInodename\fP is not enough for use with
+many networks.
+.LP
+The \fIuname\fP() function originated in System III, System V, and
+related implementations, and it does not exist in Version 7
+or 4.3 BSD. The values it returns are set at system compile time in
+those historical implementations.
+.LP
+4.3 BSD has \fIgethostname\fP() and \fIgethostid\fP(), which return
+a symbolic name and a numeric value, respectively. There are
+related \fIsethostname\fP() and \fIsethostid\fP() functions that are
+used to set the values the other two functions return. The
+former functions are included in this specification, the latter are
+not.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<sys/utsname.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/ungetc.3p b/man-pages-posix-2003/man3p/ungetc.3p
new file mode 100644
index 0000000..9c06458
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ungetc.3p
@@ -0,0 +1,83 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "UNGETC" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ungetc
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ungetc \- push byte back into input stream
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+int ungetc(int\fP \fIc\fP\fB, FILE *\fP\fIstream\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIungetc\fP() function shall push the byte specified by \fIc\fP
+(converted to an \fBunsigned char\fP) back onto the
+input stream pointed to by \fIstream\fP. The pushed-back bytes shall
+be returned by subsequent reads on that stream in the reverse
+order of their pushing. A successful intervening call (with the stream
+pointed to by \fIstream\fP) to a file-positioning function
+( \fIfseek\fP(), \fIfsetpos\fP(), or \fIrewind\fP()) shall discard
+any pushed-back bytes for the stream. The external storage
+corresponding to the stream shall be unchanged.
+.LP
+One byte of push-back shall be provided. If \fIungetc\fP() is called
+too many times on the same stream without an intervening
+read or file-positioning operation on that stream, the operation may
+fail.
+.LP
+If the value of \fIc\fP equals that of the macro EOF, the operation
+shall fail and the input stream shall be left
+unchanged.
+.LP
+A successful call to \fIungetc\fP() shall clear the end-of-file indicator
+for the stream. The value of the file-position
+indicator for the stream after reading or discarding all pushed-back
+bytes shall be the same as it was before the bytes were pushed
+back. The file-position indicator is decremented by each successful
+call to \fIungetc\fP(); if its value was 0 before a call, its
+value is unspecified after the call.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIungetc\fP() shall return the byte pushed
+back after conversion. Otherwise, it shall return
+EOF.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfseek\fP(), \fIgetc\fP(), \fIfsetpos\fP(),
+\fIread\fP(), \fIrewind\fP(), \fIsetbuf\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/ungetwc.3p b/man-pages-posix-2003/man3p/ungetwc.3p
new file mode 100644
index 0000000..8c1039b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/ungetwc.3p
@@ -0,0 +1,92 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "UNGETWC" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" ungetwc
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+ungetwc \- push wide-character code back into the input stream
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+#include <wchar.h>
+.br
+.sp
+wint_t ungetwc(wint_t\fP \fIwc\fP\fB, FILE *\fP\fIstream\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIungetwc\fP() function shall push the character corresponding
+to the wide-character code specified by \fIwc\fP back onto
+the input stream pointed to by \fIstream\fP. The pushed-back characters
+shall be returned by subsequent reads on that stream in
+the reverse order of their pushing. A successful intervening call
+(with the stream pointed to by \fIstream\fP) to a
+file-positioning function ( \fIfseek\fP(), \fIfsetpos\fP(), or \fIrewind\fP())
+discards any
+pushed-back characters for the stream. The external storage corresponding
+to the stream is unchanged.
+.LP
+At least one character of push-back shall be provided. If \fIungetwc\fP()
+is called too many times on the same stream without
+an intervening read or file-positioning operation on that stream,
+the operation may fail.
+.LP
+If the value of \fIwc\fP equals that of the macro WEOF, the operation
+shall fail and the input stream shall be left
+unchanged.
+.LP
+A successful call to \fIungetwc\fP() shall clear the end-of-file indicator
+for the stream. The value of the file-position
+indicator for the stream after reading or discarding all pushed-back
+characters shall be the same as it was before the characters
+were pushed back. The file-position indicator is decremented (by one
+or more) by each successful call to \fIungetwc\fP(); if its
+value was 0 before a call, its value is unspecified after the call.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIungetwc\fP() shall return the wide-character
+code corresponding to the pushed-back character.
+Otherwise, it shall return WEOF.
+.SH ERRORS
+.LP
+The \fIungetwc\fP() function may fail if:
+.TP 7
+.B EILSEQ
+An
+invalid character sequence is detected, or a wide-character code does
+not correspond to a valid character.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfseek\fP(), \fIfsetpos\fP(), \fIread\fP(),
+\fIrewind\fP(), \fIsetbuf\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<stdio.h>\fP, \fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/unlink.3p b/man-pages-posix-2003/man3p/unlink.3p
new file mode 100644
index 0000000..d13996a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/unlink.3p
@@ -0,0 +1,274 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "UNLINK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" unlink
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+unlink \- remove a directory entry
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+int unlink(const char *\fP\fIpath\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIunlink\fP() function shall remove a link to a file. If \fIpath\fP
+names a symbolic link, \fIunlink\fP() shall remove
+the symbolic link named by \fIpath\fP and shall not affect any file
+or directory named by the contents of the symbolic link.
+Otherwise, \fIunlink\fP() shall remove the link named by the pathname
+pointed to by \fIpath\fP and shall decrement the link count
+of the file referenced by the link.
+.LP
+When the file's link count becomes 0 and no process has the file open,
+the space occupied by the file shall be freed and the
+file shall no longer be accessible. If one or more processes have
+the file open when the last link is removed, the link shall be
+removed before \fIunlink\fP() returns, but the removal of the file
+contents shall be postponed until all references to the file
+are closed.
+.LP
+The \fIpath\fP argument shall not name a directory unless the process
+has appropriate privileges and the implementation
+supports using \fIunlink\fP() on directories.
+.LP
+Upon successful completion, \fIunlink\fP() shall mark for update the
+\fIst_ctime\fP and \fIst_mtime\fP fields of the parent
+directory. Also, if the file's link count is not 0, the \fIst_ctime\fP
+field of the file shall be marked for update.
+.SH RETURN VALUE
+.LP
+Upon successful completion, 0 shall be returned. Otherwise, -1 shall
+be returned and \fIerrno\fP set to indicate the error. If
+-1 is returned, the named file shall not be changed.
+.SH ERRORS
+.LP
+The \fIunlink\fP() function shall fail and shall not unlink the file
+if:
+.TP 7
+.B EACCES
+Search permission is denied for a component of the path prefix, or
+write permission is denied on the directory containing the
+directory entry to be removed.
+.TP 7
+.B EBUSY
+The file named by the \fIpath\fP argument cannot be unlinked because
+it is being used by the system or another process and the
+implementation considers this an error.
+.TP 7
+.B ELOOP
+A loop exists in symbolic links encountered during resolution of the
+\fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+The length of the \fIpath\fP argument exceeds {PATH_MAX} or a pathname
+component is longer than {NAME_MAX}.
+.TP 7
+.B ENOENT
+A component of \fIpath\fP does not name an existing file or \fIpath\fP
+is an empty string.
+.TP 7
+.B ENOTDIR
+A component of the path prefix is not a directory.
+.TP 7
+.B EPERM
+The file named by \fIpath\fP is a directory, and either the calling
+process does not have appropriate privileges, or the
+implementation prohibits using \fIunlink\fP() on directories.
+.TP 7
+.B EPERM \fRor\fP EACCES
+.sp
+The S_ISVTX flag is set on the directory containing the file referred
+to by the \fIpath\fP argument and the caller is not the file
+owner, nor is the caller the directory owner, nor does the caller
+have appropriate privileges.
+.TP 7
+.B EROFS
+The directory entry to be unlinked is part of a read-only file system.
+.sp
+.LP
+The \fIunlink\fP() function may fail and not unlink the file if:
+.TP 7
+.B EBUSY
+The file named by \fIpath\fP is a named STREAM.
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the \fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+As a result of encountering a symbolic link in resolution of the \fIpath\fP
+argument, the length of the substituted pathname
+string exceeded {PATH_MAX}.
+.TP 7
+.B ETXTBSY
+The entry to be unlinked is the last directory entry to a pure procedure
+(shared text) file that is being executed.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Removing a Link to a File
+.LP
+The following example shows how to remove a link to a file named \fB/home/cnd/mod1\fP
+by removing the entry named
+\fB/modules/pass1\fP.
+.sp
+.RS
+.nf
+
+\fB#include <unistd.h>
+.sp
+
+char *path = "/modules/pass1";
+int status;
+\&...
+status = unlink(path);
+\fP
+.fi
+.RE
+.SS Checking for an Error
+.LP
+The following example fragment creates a temporary password lock file
+named \fBLOCKFILE\fP, which is defined as
+\fB/etc/ptmp\fP, and gets a file descriptor for it. If the file cannot
+be opened for writing, \fIunlink\fP() is used to remove
+the link between the file descriptor and \fBLOCKFILE\fP.
+.sp
+.RS
+.nf
+
+\fB#include <sys/types.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <unistd.h>
+#include <sys/stat.h>
+.sp
+
+#define LOCKFILE "/etc/ptmp"
+.sp
+
+int pfd; /* Integer for file descriptor returned by open call. */
+FILE *fpfd; /* File pointer for use in putpwent(). */
+\&...
+/* Open password Lock file. If it exists, this is an error. */
+if ((pfd = open(LOCKFILE, O_WRONLY| O_CREAT | O_EXCL, S_IRUSR
+ | S_IWUSR | S_IRGRP | S_IROTH)) == -1) {
+ fprintf(stderr, "Cannot open /etc/ptmp. Try again later.\\n");
+ exit(1);
+}
+.sp
+
+/* Lock file created; proceed with fdopen of lock file so that
+ putpwent() can be used.
+ */
+if ((fpfd = fdopen(pfd, "w")) == NULL) {
+ close(pfd);
+ unlink(LOCKFILE);
+ exit(1);
+}
+\fP
+.fi
+.RE
+.SS Replacing Files
+.LP
+The following example fragment uses \fIunlink\fP() to discard links
+to files, so that they can be replaced with new versions of
+the files. The first call removes the link to \fBLOCKFILE\fP if an
+error occurs. Successive calls remove the links to
+\fBSAVEFILE\fP and \fBPASSWDFILE\fP so that new links can be created,
+then removes the link to \fBLOCKFILE\fP when it is no
+longer needed.
+.sp
+.RS
+.nf
+
+\fB#include <sys/types.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <unistd.h>
+#include <sys/stat.h>
+.sp
+
+#define LOCKFILE "/etc/ptmp"
+#define PASSWDFILE "/etc/passwd"
+#define SAVEFILE "/etc/opasswd"
+\&...
+/* If no change was made, assume error and leave passwd unchanged. */
+if (!valid_change) {
+ fprintf(stderr, "Could not change password for user %s\\n", user);
+ unlink(LOCKFILE);
+ exit(1);
+}
+.sp
+
+/* Change permissions on new password file. */
+chmod(LOCKFILE, S_IRUSR | S_IRGRP | S_IROTH);
+.sp
+
+/* Remove saved password file. */
+unlink(SAVEFILE);
+.sp
+
+/* Save current password file. */
+link(PASSWDFILE, SAVEFILE);
+.sp
+
+/* Remove current password file. */
+unlink(PASSWDFILE);
+.sp
+
+/* Save new password file as current password file. */
+link(LOCKFILE,PASSWDFILE);
+.sp
+
+/* Remove lock file. */
+unlink(LOCKFILE);
+.sp
+
+exit(0);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+Applications should use \fIrmdir\fP() to remove a directory.
+.SH RATIONALE
+.LP
+Unlinking a directory is restricted to the superuser in many historical
+implementations for reasons given in \fIlink\fP() (see also \fIrename\fP()).
+.LP
+The meaning of [EBUSY] in historical implementations is "mount point
+busy". Since this volume of
+IEEE\ Std\ 1003.1-2001 does not cover the system administration concepts
+of mounting and unmounting, the description of the
+error was changed to "resource busy". (This meaning is used by some
+device drivers when a second process tries to open an
+exclusive use device.) The wording is also intended to allow implementations
+to refuse to remove a directory if it is the root or
+current working directory of any process.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIclose\fP(), \fIlink\fP(), \fIremove\fP(), \fIrmdir\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/unlockpt.3p b/man-pages-posix-2003/man3p/unlockpt.3p
new file mode 100644
index 0000000..a96b9b0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/unlockpt.3p
@@ -0,0 +1,72 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "UNLOCKPT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" unlockpt
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+unlockpt \- unlock a pseudo-terminal master/slave pair
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+int unlockpt(int\fP \fIfildes\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIunlockpt\fP() function shall unlock the slave pseudo-terminal
+device associated with the master to which \fIfildes\fP
+refers.
+.LP
+Conforming applications shall ensure that they call \fIunlockpt\fP()
+before opening the slave side of a pseudo-terminal
+device.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIunlockpt\fP() shall return 0. Otherwise,
+it shall return -1 and set \fIerrno\fP to indicate the
+error.
+.SH ERRORS
+.LP
+The \fIunlockpt\fP() function may fail if:
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not a file descriptor open for writing.
+.TP 7
+.B EINVAL
+The \fIfildes\fP argument is not associated with a master pseudo-terminal
+device.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgrantpt\fP(), \fIopen\fP(), \fIptsname\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/unsetenv.3p b/man-pages-posix-2003/man3p/unsetenv.3p
new file mode 100644
index 0000000..3ba3ff7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/unsetenv.3p
@@ -0,0 +1,79 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "UNSETENV" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" unsetenv
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+unsetenv \- remove an environment variable
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+int unsetenv(const char *\fP\fIname\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIunsetenv\fP() function shall remove an environment variable
+from the environment of the calling process. The \fIname\fP
+argument points to a string, which is the name of the variable to
+be removed. The named argument shall not contain an \fB'='\fP
+character. If the named variable does not exist in the current environment,
+the environment shall be unchanged and the function is
+considered to have completed successfully.
+.LP
+If the application modifies \fIenviron\fP or the pointers to which
+it points, the behavior of \fIunsetenv\fP() is undefined.
+The \fIunsetenv\fP() function shall update the list of pointers to
+which \fIenviron\fP points.
+.LP
+The \fIunsetenv\fP() function need not be reentrant. A function that
+is not required to be reentrant is not required to be
+thread-safe.
+.SH RETURN VALUE
+.LP
+Upon successful completion, zero shall be returned. Otherwise, -1
+shall be returned, \fIerrno\fP set to indicate the error, and
+the environment shall be unchanged.
+.SH ERRORS
+.LP
+The \fIunsetenv\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The \fIname\fP argument is a null pointer, points to an empty string,
+or points to a string containing an \fB'='\fP
+character.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+Refer to the RATIONALE section in \fIsetenv\fP().
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgetenv\fP(), \fIsetenv\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<stdlib.h>\fP, \fI<sys/types.h>\fP, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/usleep.3p b/man-pages-posix-2003/man3p/usleep.3p
new file mode 100644
index 0000000..915a577
--- /dev/null
+++ b/man-pages-posix-2003/man3p/usleep.3p
@@ -0,0 +1,129 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "USLEEP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" usleep
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+usleep \- suspend execution for an interval
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+int usleep(useconds_t\fP \fIuseconds\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIusleep\fP() function shall cause the calling thread to be suspended
+from execution until either the number of realtime
+microseconds specified by the argument \fIuseconds\fP has elapsed
+or a signal is delivered to the calling thread and its action is
+to invoke a signal-catching function or to terminate the process.
+The suspension time may be longer than requested due to the
+scheduling of other activity by the system.
+.LP
+The \fIuseconds\fP argument shall be less than one million. If the
+value of \fIuseconds\fP is 0, then the call has no
+effect.
+.LP
+If a SIGALRM signal is generated for the calling process during execution
+of \fIusleep\fP() and if the SIGALRM signal is being
+ignored or blocked from delivery, it is unspecified whether \fIusleep\fP()
+returns when the SIGALRM signal is scheduled. If the
+signal is being blocked, it is also unspecified whether it remains
+pending after \fIusleep\fP() returns or it is discarded.
+.LP
+If a SIGALRM signal is generated for the calling process during execution
+of \fIusleep\fP(), except as a result of a prior call
+to \fIalarm\fP(), and if the SIGALRM signal is not being ignored or
+blocked from delivery,
+it is unspecified whether that signal has any effect other than causing
+\fIusleep\fP() to return.
+.LP
+If a signal-catching function interrupts \fIusleep\fP() and examines
+or changes either the time a SIGALRM is scheduled to be
+generated, the action associated with the SIGALRM signal, or whether
+the SIGALRM signal is blocked from delivery, the results are
+unspecified.
+.LP
+If a signal-catching function interrupts \fIusleep\fP() and calls
+\fIsiglongjmp\fP() or \fIlongjmp\fP() to restore an
+environment saved prior to the \fIusleep\fP() call, the action associated
+with the SIGALRM signal and the time at which a SIGALRM
+signal is scheduled to be generated are unspecified. It is also unspecified
+whether the SIGALRM signal is blocked, unless the
+process' signal mask is restored as part of the environment.
+.LP
+Implementations may place limitations on the granularity of timer
+values. For each interval timer, if the requested timer value
+requires a finer granularity than the implementation supports, the
+actual timer value shall be rounded up to the next supported
+value.
+.LP
+Interactions between \fIusleep\fP() and any of the following are unspecified:
+.sp
+.RS
+.nf
+
+\fInanosleep\fP()
+\fIsetitimer\fP()
+\fItimer_create\fP()
+\fItimer_delete\fP()
+\fItimer_getoverrun\fP()
+\fItimer_gettime\fP()
+\fItimer_settime\fP()
+\fIualarm\fP()
+\fIsleep\fP()
+.fi
+.RE
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIusleep\fP() shall return 0; otherwise,
+it shall return -1 and set \fIerrno\fP to indicate the
+error.
+.SH ERRORS
+.LP
+The \fIusleep\fP() function may fail if:
+.TP 7
+.B EINVAL
+The time interval specified one million or more microseconds.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Applications are recommended to use \fInanosleep\fP() if the Timers
+option is
+supported, or \fIsetitimer\fP(), \fItimer_create\fP(), \fItimer_delete\fP(),
+\fItimer_getoverrun\fP(), \fItimer_gettime\fP(), or \fItimer_settime\fP()
+instead of this function.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIalarm\fP(), \fIgetitimer\fP(), \fInanosleep\fP(), \fIsigaction\fP(),
+\fIsleep\fP(),
+\fItimer_create\fP(), \fItimer_delete\fP(), \fItimer_getoverrun\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/utime.3p b/man-pages-posix-2003/man3p/utime.3p
new file mode 100644
index 0000000..fbcbf0e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/utime.3p
@@ -0,0 +1,130 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "UTIME" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" utime
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+utime \- set file access and modification times
+.SH SYNOPSIS
+.LP
+\fB#include <utime.h>
+.br
+.sp
+int utime(const char *\fP\fIpath\fP\fB, const struct utimbuf *\fP\fItimes\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIutime\fP() function shall set the access and modification times
+of the file named by the \fIpath\fP argument.
+.LP
+If \fItimes\fP is a null pointer, the access and modification times
+of the file shall be set to the current time. The effective
+user ID of the process shall match the owner of the file, or the process
+has write permission to the file or has appropriate
+privileges, to use \fIutime\fP() in this manner.
+.LP
+If \fItimes\fP is not a null pointer, \fItimes\fP shall be interpreted
+as a pointer to a \fButimbuf\fP structure and the
+access and modification times shall be set to the values contained
+in the designated structure. Only a process with the effective
+user ID equal to the user ID of the file or a process with appropriate
+privileges may use \fIutime\fP() this way.
+.LP
+The \fButimbuf\fP structure is defined in the \fI<utime.h>\fP header.
+The times
+in the structure \fButimbuf\fP are measured in seconds since the Epoch.
+.LP
+Upon successful completion, \fIutime\fP() shall mark the time of the
+last file status change, \fIst_ctime\fP, to be updated;
+see \fI<sys/stat.h>\fP.
+.SH RETURN VALUE
+.LP
+Upon successful completion, 0 shall be returned. Otherwise, -1 shall
+be returned and \fIerrno\fP shall be set to indicate the
+error, and the file times shall not be affected.
+.SH ERRORS
+.LP
+The \fIutime\fP() function shall fail if:
+.TP 7
+.B EACCES
+Search permission is denied by a component of the path prefix; or
+the \fItimes\fP argument is a null pointer and the effective
+user ID of the process does not match the owner of the file, the process
+does not have write permission for the file, and the
+process does not have appropriate privileges.
+.TP 7
+.B ELOOP
+A loop exists in symbolic links encountered during resolution of the
+\fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+The length of the \fIpath\fP argument exceeds {PATH_MAX} or a pathname
+component is longer than {NAME_MAX}.
+.TP 7
+.B ENOENT
+A component of \fIpath\fP does not name an existing file or \fIpath\fP
+is an empty string.
+.TP 7
+.B ENOTDIR
+A component of the path prefix is not a directory.
+.TP 7
+.B EPERM
+The \fItimes\fP argument is not a null pointer and the calling process'
+effective user ID does not match the owner of the file
+and the calling process does not have the appropriate privileges.
+.TP 7
+.B EROFS
+The file system containing the file is read-only.
+.sp
+.LP
+The \fIutime\fP() function may fail if:
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the \fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+As a result of encountering a symbolic link in resolution of the \fIpath\fP
+argument, the length of the substituted pathname
+string exceeded {PATH_MAX}.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+The \fIactime\fP structure member must be present so that an application
+may set it, even though an implementation may ignore
+it and not change the access time on the file. If an application intends
+to leave one of the times of a file unchanged while
+changing the other, it should use \fIstat\fP() to retrieve the file's
+\fIst_atime\fP and
+\fIst_mtime\fP parameters, set \fIactime\fP and \fImodtime\fP in the
+buffer, and change one of them before making the
+\fIutime\fP() call.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<sys/stat.h>\fP,
+\fI<utime.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/utimes.3p b/man-pages-posix-2003/man3p/utimes.3p
new file mode 100644
index 0000000..4c6ece6
--- /dev/null
+++ b/man-pages-posix-2003/man3p/utimes.3p
@@ -0,0 +1,122 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "UTIMES" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" utimes
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+utimes \- set file access and modification times (\fBLEGACY\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <sys/time.h>
+.br
+.sp
+int utimes(const char *\fP\fIpath\fP\fB, const struct timeval\fP \fItimes[2]\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIutimes\fP() function shall set the access and modification
+times of the file pointed to by the \fIpath\fP argument to
+the value of the \fItimes\fP argument. The \fIutimes\fP() function
+allows time specifications accurate to the microsecond.
+.LP
+For \fIutimes\fP(), the \fItimes\fP argument is an array of \fBtimeval\fP
+structures. The first array member represents the
+date and time of last access, and the second member represents the
+date and time of last modification. The times in the
+\fBtimeval\fP structure are measured in seconds and microseconds since
+the Epoch, although rounding toward the nearest second may
+occur.
+.LP
+If the \fItimes\fP argument is a null pointer, the access and modification
+times of the file shall be set to the current time.
+The effective user ID of the process shall match the owner of the
+file, or has write access to the file or appropriate privileges
+to use this call in this manner. Upon completion, \fIutimes\fP() shall
+mark the time of the last file status change,
+\fIst_ctime\fP, for update.
+.SH RETURN VALUE
+.LP
+Upon successful completion, 0 shall be returned. Otherwise, -1 shall
+be returned and \fIerrno\fP shall be set to indicate the
+error, and the file times shall not be affected.
+.SH ERRORS
+.LP
+The \fIutimes\fP() function shall fail if:
+.TP 7
+.B EACCES
+Search permission is denied by a component of the path prefix; or
+the \fItimes\fP argument is a null pointer and the effective
+user ID of the process does not match the owner of the file and write
+access is denied.
+.TP 7
+.B ELOOP
+A loop exists in symbolic links encountered during resolution of the
+\fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+The length of the \fIpath\fP argument exceeds {PATH_MAX} or a pathname
+component is longer than {NAME_MAX}.
+.TP 7
+.B ENOENT
+A component of \fIpath\fP does not name an existing file or \fIpath\fP
+is an empty string.
+.TP 7
+.B ENOTDIR
+A component of the path prefix is not a directory.
+.TP 7
+.B EPERM
+The \fItimes\fP argument is not a null pointer and the calling process'
+effective user ID has write access to the file but
+does not match the owner of the file and the calling process does
+not have the appropriate privileges.
+.TP 7
+.B EROFS
+The file system containing the file is read-only.
+.sp
+.LP
+The \fIutimes\fP() function may fail if:
+.TP 7
+.B ELOOP
+More than {SYMLOOP_MAX} symbolic links were encountered during resolution
+of the \fIpath\fP argument.
+.TP 7
+.B ENAMETOOLONG
+Pathname resolution of a symbolic link produced an intermediate result
+whose length exceeds {PATH_MAX}.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+For applications portability, the \fIutime\fP() function should be
+used to set file
+access and modification times instead of \fIutimes\fP().
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+This function may be withdrawn in a future version.
+.SH SEE ALSO
+.LP
+\fIutime\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<sys/time.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/va_arg.3p b/man-pages-posix-2003/man3p/va_arg.3p
new file mode 100644
index 0000000..fceebb9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/va_arg.3p
@@ -0,0 +1,37 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "VA_ARG" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" va_arg
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+va_arg, va_copy, va_end, va_start \- handle variable argument list
+.SH SYNOPSIS
+.LP
+\fB#include <stdarg.h>
+.br
+.sp
+\fP \fItype\fP \fBva_arg(va_list\fP \fIap\fP\fB,\fP \fItype\fP\fB);
+.br
+void va_copy(va_list\fP \fIdest\fP\fB, va_list\fP \fIsrc\fP\fB);
+.br
+void va_end(va_list\fP \fIap\fP\fB);
+.br
+void va_start(va_list\fP \fIap\fP\fB,\fP \fIargN\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+Refer to the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<stdarg.h>\fP.
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/va_copy.3p b/man-pages-posix-2003/man3p/va_copy.3p
new file mode 100644
index 0000000..1b563f7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/va_copy.3p
@@ -0,0 +1 @@
+.so man3p/va_arg.3p
diff --git a/man-pages-posix-2003/man3p/va_end.3p b/man-pages-posix-2003/man3p/va_end.3p
new file mode 100644
index 0000000..1b563f7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/va_end.3p
@@ -0,0 +1 @@
+.so man3p/va_arg.3p
diff --git a/man-pages-posix-2003/man3p/va_start.3p b/man-pages-posix-2003/man3p/va_start.3p
new file mode 100644
index 0000000..1b563f7
--- /dev/null
+++ b/man-pages-posix-2003/man3p/va_start.3p
@@ -0,0 +1 @@
+.so man3p/va_arg.3p
diff --git a/man-pages-posix-2003/man3p/vfork.3p b/man-pages-posix-2003/man3p/vfork.3p
new file mode 100644
index 0000000..3f6b108
--- /dev/null
+++ b/man-pages-posix-2003/man3p/vfork.3p
@@ -0,0 +1,118 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "VFORK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" vfork
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+vfork \- create a new process; share virtual memory
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+pid_t vfork(void); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIvfork\fP() function shall be equivalent to \fIfork\fP(), except
+that the behavior
+is undefined if the process created by \fIvfork\fP() either modifies
+any data other than a variable of type \fBpid_t\fP used to
+store the return value from \fIvfork\fP(), or returns from the function
+in which \fIvfork\fP() was called, or calls any other
+function before successfully calling \fI_exit\fP() or one of the \fIexec\fP
+family of functions.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIvfork\fP() shall return 0 to the child
+process and return the process ID of the child process to
+the parent process. Otherwise, -1 shall be returned to the parent,
+no child process shall be created, and \fIerrno\fP shall be set
+to indicate the error.
+.SH ERRORS
+.LP
+The \fIvfork\fP() function shall fail if:
+.TP 7
+.B EAGAIN
+The system-wide limit on the total number of processes under execution
+would be exceeded, or the system-imposed limit on the
+total number of processes under execution by a single user would be
+exceeded.
+.TP 7
+.B ENOMEM
+There is insufficient swap space for the new process.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Conforming applications are recommended not to depend on \fIvfork\fP(),
+but to use \fIfork\fP() instead. The \fIvfork\fP() function may be
+withdrawn in a future version.
+.LP
+On some implementations, \fIvfork\fP() is equivalent to \fIfork\fP().
+.LP
+The \fIvfork\fP() function differs from \fIfork\fP() only in that
+the child process can
+share code and data with the calling process (parent process). This
+speeds cloning activity significantly at a risk to the
+integrity of the parent process if \fIvfork\fP() is misused.
+.LP
+The use of \fIvfork\fP() for any purpose except as a prelude to an
+immediate call to a function from the \fIexec\fP family, or to \fI_exit\fP(),
+is not advised.
+.LP
+The \fIvfork\fP() function can be used to create new processes without
+fully copying the address space of the old process. If a
+forked process is simply going to call \fIexec\fP, the data space
+copied from the parent to
+the child by \fIfork\fP() is not used. This is particularly inefficient
+in a paged
+environment, making \fIvfork\fP() particularly useful. Depending upon
+the size of the parent's data space, \fIvfork\fP() can give
+a significant performance improvement over \fIfork\fP().
+.LP
+The \fIvfork\fP() function can normally be used just like \fIfork\fP().
+It does not work,
+however, to return while running in the child's context from the caller
+of \fIvfork\fP() since the eventual return from
+\fIvfork\fP() would then return to a no longer existent stack frame.
+Care should be taken, also, to call \fI_exit\fP() rather than \fIexit\fP()
+if \fIexec\fP cannot be used, since \fIexit\fP() flushes and closes
+standard I/O channels, thereby damaging the parent process' standard
+I/O data structures. (Even with \fIfork\fP(), it is wrong to call
+\fIexit\fP(), since buffered
+data would then be flushed twice.)
+.LP
+If signal handlers are invoked in the child process after \fIvfork\fP(),
+they must follow the same rules as other code in the
+child process.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+This function may be withdrawn in a future version.
+.SH SEE ALSO
+.LP
+\fIexec\fP(), \fIexit\fP(), \fIfork\fP(), \fIwait\fP(), the Base
+Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/vfprintf.3p b/man-pages-posix-2003/man3p/vfprintf.3p
new file mode 100644
index 0000000..9eff46e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/vfprintf.3p
@@ -0,0 +1 @@
+.so man3p/vprintf.3p
diff --git a/man-pages-posix-2003/man3p/vfscanf.3p b/man-pages-posix-2003/man3p/vfscanf.3p
new file mode 100644
index 0000000..d2b5770
--- /dev/null
+++ b/man-pages-posix-2003/man3p/vfscanf.3p
@@ -0,0 +1 @@
+.so man3p/vscanf.3p
diff --git a/man-pages-posix-2003/man3p/vfwprintf.3p b/man-pages-posix-2003/man3p/vfwprintf.3p
new file mode 100644
index 0000000..ca09784
--- /dev/null
+++ b/man-pages-posix-2003/man3p/vfwprintf.3p
@@ -0,0 +1 @@
+.so man3p/vwprintf.3p
diff --git a/man-pages-posix-2003/man3p/vfwscanf.3p b/man-pages-posix-2003/man3p/vfwscanf.3p
new file mode 100644
index 0000000..022cd00
--- /dev/null
+++ b/man-pages-posix-2003/man3p/vfwscanf.3p
@@ -0,0 +1 @@
+.so man3p/vwscanf.3p
diff --git a/man-pages-posix-2003/man3p/vprintf.3p b/man-pages-posix-2003/man3p/vprintf.3p
new file mode 100644
index 0000000..71d51cc
--- /dev/null
+++ b/man-pages-posix-2003/man3p/vprintf.3p
@@ -0,0 +1,80 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "VFPRINTF" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" vfprintf
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+vfprintf, vprintf, vsnprintf, vsprintf \- format output of a stdarg
+argument list
+.SH SYNOPSIS
+.LP
+\fB#include <stdarg.h>
+.br
+#include <stdio.h>
+.br
+.sp
+int vfprintf(FILE *restrict\fP \fIstream\fP\fB, const char *restrict\fP
+\fIformat\fP\fB,
+.br
+\ \ \ \ \ \ va_list\fP \fIap\fP\fB);
+.br
+int vprintf(const char *restrict\fP \fIformat\fP\fB, va_list\fP \fIap\fP\fB);
+.br
+int vsnprintf(char *restrict\fP \fIs\fP\fB, size_t\fP \fIn\fP\fB,
+const char *restrict\fP \fIformat\fP\fB,
+.br
+\ \ \ \ \ \ va_list\fP \fIap\fP\fB);
+.br
+int vsprintf(char *restrict\fP \fIs\fP\fB, const char *restrict\fP
+\fIformat\fP\fB, va_list\fP \fIap\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIvprintf\fP(), \fIvfprintf\fP(), \fIvsnprintf\fP(), and \fIvsprintf\fP()
+functions shall be equivalent to \fIprintf\fP(), \fIfprintf\fP(),
+\fIsnprintf\fP(), and \fIsprintf\fP() respectively,
+except that instead of being called with a variable number of arguments,
+they are called with an argument list as defined by \fI<stdarg.h>\fP.
+.LP
+These functions shall not invoke the \fIva_end\fP macro. As these
+functions invoke the \fIva_arg\fP macro, the value of
+\fIap\fP after the return is unspecified.
+.SH RETURN VALUE
+.LP
+Refer to \fIfprintf\fP().
+.SH ERRORS
+.LP
+Refer to \fIfprintf\fP().
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Applications using these functions should call \fIva_end\fP(\fIap\fP)
+afterwards to clean up.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfprintf\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<stdarg.h>\fP, \fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/vscanf.3p b/man-pages-posix-2003/man3p/vscanf.3p
new file mode 100644
index 0000000..e24a4b4
--- /dev/null
+++ b/man-pages-posix-2003/man3p/vscanf.3p
@@ -0,0 +1,76 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "VFSCANF" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" vfscanf
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+vfscanf, vscanf, vsscanf \- format input of a stdarg argument list
+.SH SYNOPSIS
+.LP
+\fB#include <stdarg.h>
+.br
+#include <stdio.h>
+.br
+.sp
+int vfscanf(FILE *restrict\fP \fIstream\fP\fB, const char *restrict\fP
+\fIformat\fP\fB,
+.br
+\ \ \ \ \ \ va_list\fP \fIarg\fP\fB);
+.br
+int vscanf(const char *restrict\fP \fIformat\fP\fB, va_list\fP \fIarg\fP\fB);
+.br
+int vsscanf(const char *restrict\fP \fIs\fP\fB, const char *restrict\fP
+\fIformat\fP\fB,
+.br
+\ \ \ \ \ \ va_list\fP \fIarg\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIvscanf\fP(), \fIvfscanf\fP(), and \fIvsscanf\fP() functions
+shall be equivalent to the \fIscanf\fP(), \fIfscanf\fP(), and \fIsscanf\fP()
+functions, respectively, except that instead of being called with
+a variable number
+of arguments, they are called with an argument list as defined in
+the \fI<stdarg.h>\fP header. These functions shall not invoke the
+\fIva_end\fP macro. As these
+functions invoke the \fIva_arg\fP macro, the value of \fIap\fP after
+the return is unspecified.
+.SH RETURN VALUE
+.LP
+Refer to \fIfscanf\fP().
+.SH ERRORS
+.LP
+Refer to \fIfscanf\fP().
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Applications using these functions should call \fIva_end\fP( \fIap\fP)
+afterwards to clean up.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfscanf\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<stdarg.h>\fP, \fI<stdio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/vsnprintf.3p b/man-pages-posix-2003/man3p/vsnprintf.3p
new file mode 100644
index 0000000..9eff46e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/vsnprintf.3p
@@ -0,0 +1 @@
+.so man3p/vprintf.3p
diff --git a/man-pages-posix-2003/man3p/vsprintf.3p b/man-pages-posix-2003/man3p/vsprintf.3p
new file mode 100644
index 0000000..9eff46e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/vsprintf.3p
@@ -0,0 +1 @@
+.so man3p/vprintf.3p
diff --git a/man-pages-posix-2003/man3p/vsscanf.3p b/man-pages-posix-2003/man3p/vsscanf.3p
new file mode 100644
index 0000000..d2b5770
--- /dev/null
+++ b/man-pages-posix-2003/man3p/vsscanf.3p
@@ -0,0 +1 @@
+.so man3p/vscanf.3p
diff --git a/man-pages-posix-2003/man3p/vswprintf.3p b/man-pages-posix-2003/man3p/vswprintf.3p
new file mode 100644
index 0000000..ca09784
--- /dev/null
+++ b/man-pages-posix-2003/man3p/vswprintf.3p
@@ -0,0 +1 @@
+.so man3p/vwprintf.3p
diff --git a/man-pages-posix-2003/man3p/vswscanf.3p b/man-pages-posix-2003/man3p/vswscanf.3p
new file mode 100644
index 0000000..022cd00
--- /dev/null
+++ b/man-pages-posix-2003/man3p/vswscanf.3p
@@ -0,0 +1 @@
+.so man3p/vwscanf.3p
diff --git a/man-pages-posix-2003/man3p/vwprintf.3p b/man-pages-posix-2003/man3p/vwprintf.3p
new file mode 100644
index 0000000..3670a1b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/vwprintf.3p
@@ -0,0 +1,80 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "VFWPRINTF" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" vfwprintf
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+vfwprintf, vswprintf, vwprintf \- wide-character formatted output of
+a stdarg argument list
+.SH SYNOPSIS
+.LP
+\fB#include <stdarg.h>
+.br
+#include <stdio.h>
+.br
+#include <wchar.h>
+.br
+.sp
+int vfwprintf(FILE *restrict\fP \fIstream\fP\fB, const wchar_t *restrict\fP
+\fIformat\fP\fB,
+.br
+\ \ \ \ \ \ va_list\fP \fIarg\fP\fB);
+.br
+int vswprintf(wchar_t *restrict\fP \fIws\fP\fB, size_t\fP \fIn\fP\fB,
+.br
+\ \ \ \ \ \ const wchar_t *restrict\fP \fIformat\fP\fB, va_list\fP
+\fIarg\fP\fB);
+.br
+int vwprintf(const wchar_t *restrict\fP \fIformat\fP\fB, va_list\fP
+\fIarg\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIvfwprintf\fP(), \fIvswprintf\fP(), and \fIvwprintf\fP() functions
+shall be equivalent to \fIfwprintf\fP(), \fIswprintf\fP(), and \fIwprintf\fP()
+respectively, except that instead of being called with a variable
+number of
+arguments, they are called with an argument list as defined by \fI<stdarg.h>\fP.
+.LP
+These functions shall not invoke the \fIva_end\fP macro. However,
+as these functions do invoke the \fIva_arg\fP macro, the
+value of \fIap\fP after the return is unspecified.
+.SH RETURN VALUE
+.LP
+Refer to \fIfwprintf\fP().
+.SH ERRORS
+.LP
+Refer to \fIfwprintf\fP().
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Applications using these functions should call \fIva_end\fP(\fIap\fP)
+afterwards to clean up.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfwprintf\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<stdarg.h>\fP, \fI<stdio.h>\fP, \fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/vwscanf.3p b/man-pages-posix-2003/man3p/vwscanf.3p
new file mode 100644
index 0000000..ec1ae19
--- /dev/null
+++ b/man-pages-posix-2003/man3p/vwscanf.3p
@@ -0,0 +1,80 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "VFWSCANF" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" vfwscanf
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+vfwscanf, vswscanf, vwscanf \- wide-character formatted input of a
+stdarg argument list
+.SH SYNOPSIS
+.LP
+\fB#include <stdarg.h>
+.br
+#include <stdio.h>
+.br
+#include <wchar.h>
+.br
+.sp
+int vfwscanf(FILE *restrict\fP \fIstream\fP\fB, const wchar_t *restrict\fP
+\fIformat\fP\fB,
+.br
+\ \ \ \ \ \ va_list\fP \fIarg\fP\fB);
+.br
+int vswscanf(const wchar_t *restrict\fP \fIws\fP\fB, const wchar_t
+*restrict\fP \fIformat\fP\fB,
+.br
+\ \ \ \ \ \ va_list\fP \fIarg\fP\fB);
+.br
+int vwscanf(const wchar_t *restrict\fP \fIformat\fP\fB, va_list\fP
+\fIarg\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIvfwscanf\fP(), \fIvswscanf\fP(), and \fIvwscanf\fP() functions
+shall be equivalent to the \fIfwscanf\fP(), \fIswscanf\fP(), and \fIwscanf\fP()
+functions, respectively, except that instead of being called with
+a variable number
+of arguments, they are called with an argument list as defined in
+the \fI<stdarg.h>\fP header. These functions shall not invoke the
+\fIva_end\fP macro. As these
+functions invoke the \fIva_arg\fP macro, the value of \fIap\fP after
+the return is unspecified.
+.SH RETURN VALUE
+.LP
+Refer to \fIfwscanf\fP().
+.SH ERRORS
+.LP
+Refer to \fIfwscanf\fP().
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+Applications using these functions should call \fIva_end\fP( \fIap\fP)
+afterwards to clean up.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfwscanf\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<stdarg.h>\fP, \fI<stdio.h>\fP, \fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wait.3p b/man-pages-posix-2003/man3p/wait.3p
new file mode 100644
index 0000000..726a645
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wait.3p
@@ -0,0 +1,491 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WAIT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wait
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wait, waitpid \- wait for a child process to stop or terminate
+.SH SYNOPSIS
+.LP
+\fB#include <sys/wait.h>
+.br
+.sp
+pid_t wait(int *\fP\fIstat_loc\fP\fB);
+.br
+pid_t waitpid(pid_t\fP \fIpid\fP\fB, int *\fP\fIstat_loc\fP\fB, int\fP
+\fIoptions\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwait\fP() and \fIwaitpid\fP() functions shall obtain status
+information pertaining to one of the caller's child
+processes. Various options permit status information to be obtained
+for child processes that have terminated or stopped. If status
+information is available for two or more child processes, the order
+in which their status is reported is unspecified.
+.LP
+The \fIwait\fP() function shall suspend execution of the calling thread
+until status information for one of the terminated
+child processes of the calling process is available, or until delivery
+of a signal whose action is either to execute a
+signal-catching function or to terminate the process. If more than
+one thread is suspended in \fIwait\fP() or \fIwaitpid\fP()
+awaiting termination of the same process, exactly one thread shall
+return the process status at the time of the target process
+termination. If status information is available prior to the call
+to \fIwait\fP(), return shall be immediate.
+.LP
+The \fIwaitpid\fP() function shall be equivalent to \fIwait\fP() if
+the \fIpid\fP argument is (\fBpid_t\fP)-1 and the
+\fIoptions\fP argument is 0. Otherwise, its behavior shall be modified
+by the values of the \fIpid\fP and \fIoptions\fP
+arguments.
+.LP
+The \fIpid\fP argument specifies a set of child processes for which
+\fIstatus\fP is requested. The \fIwaitpid\fP() function
+shall only return the status of a child process from this set:
+.IP " *" 3
+If \fIpid\fP is equal to (\fBpid_t\fP)-1, \fIstatus\fP is requested
+for any child process. In this respect, \fIwaitpid\fP()
+is then equivalent to \fIwait\fP().
+.LP
+.IP " *" 3
+If \fIpid\fP is greater than 0, it specifies the process ID of a single
+child process for which \fIstatus\fP is requested.
+.LP
+.IP " *" 3
+If \fIpid\fP is 0, \fIstatus\fP is requested for any child process
+whose process group ID is equal to that of the calling
+process.
+.LP
+.IP " *" 3
+If \fIpid\fP is less than (\fBpid_t\fP)-1, \fIstatus\fP is requested
+for any child process whose process group ID is equal to
+the absolute value of \fIpid\fP.
+.LP
+.LP
+The \fIoptions\fP argument is constructed from the bitwise-inclusive
+OR of zero or more of the following flags, defined in the
+\fI<sys/wait.h>\fP header:
+.TP 7
+WCONTINUED
+The \fIwaitpid\fP() function shall report the status of any continued
+child process specified by \fIpid\fP whose status has not
+been reported since it continued from a job control stop.
+.TP 7
+WNOHANG
+The \fIwaitpid\fP() function shall not suspend execution of the calling
+thread if \fIstatus\fP is not immediately available
+for one of the child processes specified by \fIpid\fP.
+.TP 7
+WUNTRACED
+The status of any child processes specified by \fIpid\fP that are
+stopped, and whose status has not yet been reported since
+they stopped, shall also be reported to the requesting process.
+.sp
+.LP
+If the calling process has SA_NOCLDWAIT set or has SIGCHLD set to
+SIG_IGN, and the process has no unwaited-for children that were
+transformed into zombie processes, the calling thread shall block
+until all of the children of the process containing the calling
+thread terminate, and \fIwait\fP() and \fIwaitpid\fP() shall fail
+and set \fIerrno\fP to [ECHILD].
+.LP
+If \fIwait\fP() or \fIwaitpid\fP() return because the status of a
+child process is available, these functions shall return a
+value equal to the process ID of the child process. In this case,
+if the value of the argument \fIstat_loc\fP is not a null
+pointer, information shall be stored in the location pointed to by
+\fIstat_loc\fP. The value stored at the location pointed to by
+\fIstat_loc\fP shall be 0 if and only if the status returned is from
+a terminated child process that terminated by one of the
+following means:
+.IP " 1." 4
+The process returned 0 from \fImain\fP().
+.LP
+.IP " 2." 4
+The process called \fI_exit\fP() or \fIexit\fP()
+with a \fIstatus\fP argument of 0.
+.LP
+.IP " 3." 4
+The process was terminated because the last thread in the process
+terminated.
+.LP
+.LP
+Regardless of its value, this information may be interpreted using
+the following macros, which are defined in \fI<sys/wait.h>\fP and
+evaluate to integral expressions; the \fIstat_val\fP argument is
+the integer value pointed to by \fIstat_loc\fP.
+.TP 7
+WIFEXITED(\fIstat_val\fP)
+.sp
+Evaluates to a non-zero value if \fIstatus\fP was returned for a child
+process that terminated normally.
+.TP 7
+WEXITSTATUS(\fIstat_val\fP)
+.sp
+If the value of WIFEXITED(\fIstat_val\fP) is non-zero, this macro
+evaluates to the low-order 8 bits of the \fIstatus\fP argument
+that the child process passed to \fI_exit\fP() or \fIexit\fP(), or
+the value the child process returned from \fImain\fP().
+.TP 7
+WIFSIGNALED(\fIstat_val\fP)
+.sp
+Evaluates to a non-zero value if \fIstatus\fP was returned for a child
+process that terminated due to the receipt of a signal that
+was not caught (see \fI<signal.h>\fP).
+.TP 7
+WTERMSIG(\fIstat_val\fP)
+.sp
+If the value of WIFSIGNALED(\fIstat_val\fP) is non-zero, this macro
+evaluates to the number of the signal that caused the
+termination of the child process.
+.TP 7
+WIFSTOPPED(\fIstat_val\fP)
+.sp
+Evaluates to a non-zero value if \fIstatus\fP was returned for a child
+process that is currently stopped.
+.TP 7
+WSTOPSIG(\fIstat_val\fP)
+.sp
+If the value of WIFSTOPPED(\fIstat_val\fP) is non-zero, this macro
+evaluates to the number of the signal that caused the child
+process to stop.
+.TP 7
+WIFCONTINUED(\fIstat_val\fP)
+.sp
+Evaluates to a non-zero value if \fIstatus\fP was returned for a child
+process that has continued from a job control stop.
+.sp
+.LP
+It is unspecified whether the \fIstatus\fP value returned by calls
+to \fIwait\fP() or \fIwaitpid\fP() for processes created by
+\fIposix_spawn\fP() or \fIposix_spawnp\fP() can indicate a WIFSTOPPED(\fIstat_val\fP)
+before subsequent calls to
+\fIwait\fP() or \fIwaitpid\fP() indicate WIFEXITED(\fIstat_val\fP)
+as the result of an error detected before the new process
+image starts executing.
+.LP
+It is unspecified whether the \fIstatus\fP value returned by calls
+to \fIwait\fP() or \fIwaitpid\fP() for processes created
+by \fIposix_spawn\fP() or \fIposix_spawnp\fP() can indicate a WIFSIGNALED(\fIstat_val\fP)
+if a signal is sent to the
+parent's process group after \fIposix_spawn\fP() or \fIposix_spawnp\fP()
+is called.
+.LP
+If the information pointed to by \fIstat_loc\fP was stored by a call
+to \fIwaitpid\fP() that specified the WUNTRACED flag
+\ and did not specify the WCONTINUED flag, exactly one of the
+macros WIFEXITED(*\fIstat_loc\fP), WIFSIGNALED(*\fIstat_loc\fP), and
+WIFSTOPPED(*\fIstat_loc\fP) shall evaluate to a non-zero
+value.
+.LP
+If the information pointed to by \fIstat_loc\fP was stored by a call
+to \fIwaitpid\fP() that specified the WUNTRACED and
+WCONTINUED flags, exactly one of the macros
+WIFEXITED(*\fIstat_loc\fP), WIFSIGNALED(*\fIstat_loc\fP), WIFSTOPPED(*\fIstat_loc\fP),
+\ and
+WIFCONTINUED(*\fIstat_loc\fP) shall evaluate to a non-zero
+value.
+.LP
+If the information pointed to by \fIstat_loc\fP was stored by a call
+to \fIwaitpid\fP() that did not specify the WUNTRACED
+\ or WCONTINUED flags, or by a call to the \fIwait\fP()
+function, exactly one of the macros WIFEXITED(*\fIstat_loc\fP) and
+WIFSIGNALED(*\fIstat_loc\fP) shall evaluate to a non-zero
+value.
+.LP
+If the information pointed to by \fIstat_loc\fP was stored by a call
+to \fIwaitpid\fP() that did not specify the WUNTRACED
+flag
+\ and specified the WCONTINUED flag, or by a call to the
+\fIwait\fP() function, exactly one of the macros WIFEXITED(*\fIstat_loc\fP),
+WIFSIGNALED(*\fIstat_loc\fP), and
+WIFCONTINUED(*\fIstat_loc\fP) shall evaluate to a non-zero
+value.
+.LP
+If _POSIX_REALTIME_SIGNALS is defined, and the implementation queues
+the SIGCHLD signal, then if \fIwait\fP() or
+\fIwaitpid\fP() returns because the status of a child process is available,
+any pending SIGCHLD signal associated with the process
+ID of the child process shall be discarded. Any other pending SIGCHLD
+signals shall remain pending.
+.LP
+Otherwise, if SIGCHLD is blocked, if \fIwait\fP() or \fIwaitpid\fP()
+return because the status of a child process is
+available, any pending SIGCHLD signal shall be cleared unless the
+status of another child process is available.
+.LP
+For all other conditions, it is unspecified whether child \fIstatus\fP
+will be available when a SIGCHLD signal is
+delivered.
+.LP
+There may be additional implementation-defined circumstances under
+which \fIwait\fP() or \fIwaitpid\fP() report \fIstatus\fP.
+This shall not occur unless the calling process or one of its child
+processes explicitly makes use of a non-standard extension. In
+these cases the interpretation of the reported \fIstatus\fP is implementation-defined.
+.LP
+If a parent process terminates without waiting for all of its child
+processes to terminate, the remaining child processes shall be
+assigned a new parent process ID corresponding to an implementation-defined
+system process.
+.SH RETURN VALUE
+.LP
+If \fIwait\fP() or \fIwaitpid\fP() returns because the status of a
+child process is available, these functions shall return a
+value equal to the process ID of the child process for which \fIstatus\fP
+is reported. If \fIwait\fP() or \fIwaitpid\fP()
+returns due to the delivery of a signal to the calling process, -1
+shall be returned and \fIerrno\fP set to [EINTR]. If
+\fIwaitpid\fP() was invoked with WNOHANG set in \fIoptions\fP, it
+has at least one child process specified by \fIpid\fP for
+which \fIstatus\fP is not available, and \fIstatus\fP is not available
+for any process specified by \fIpid\fP, 0 is returned.
+Otherwise, (\fBpid_t\fP)-1 shall be returned, and \fIerrno\fP set
+to indicate the error.
+.SH ERRORS
+.LP
+The \fIwait\fP() function shall fail if:
+.TP 7
+.B ECHILD
+The calling process has no existing unwaited-for child processes.
+.TP 7
+.B EINTR
+The function was interrupted by a signal. The value of the location
+pointed to by \fIstat_loc\fP is undefined.
+.sp
+.LP
+The \fIwaitpid\fP() function shall fail if:
+.TP 7
+.B ECHILD
+The process specified by \fIpid\fP does not exist or is not a child
+of the calling process, or the process group specified by
+\fIpid\fP does not exist or does not have any member process that
+is a child of the calling process.
+.TP 7
+.B EINTR
+The function was interrupted by a signal. The value of the location
+pointed to by \fIstat_loc\fP is undefined.
+.TP 7
+.B EINVAL
+The \fIoptions\fP argument is not valid.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+A call to the \fIwait\fP() or \fIwaitpid\fP() function only returns
+\fIstatus\fP on an immediate child process of the calling
+process; that is, a child that was produced by a single \fIfork\fP()
+call (perhaps followed
+by an \fIexec\fP or other function calls) from the parent. If a child
+produces grandchildren
+by further use of \fIfork\fP(), none of those grandchildren nor any
+of their descendants
+affect the behavior of a \fIwait\fP() from the original parent process.
+Nothing in this volume of IEEE\ Std\ 1003.1-2001
+prevents an implementation from providing extensions that permit a
+process to get \fIstatus\fP from a grandchild or any other
+process, but a process that does not use such extensions must be guaranteed
+to see \fIstatus\fP from only its direct children.
+.LP
+The \fIwaitpid\fP() function is provided for three reasons:
+.IP " 1." 4
+To support job control
+.LP
+.IP " 2." 4
+To permit a non-blocking version of the \fIwait\fP() function
+.LP
+.IP " 3." 4
+To permit a library routine, such as \fIsystem\fP() or \fIpclose\fP(),
+to wait for its children without interfering with other terminated
+children for
+which the process has not waited
+.LP
+.LP
+The first two of these facilities are based on the \fIwait3\fP() function
+provided by 4.3 BSD. The function uses the
+\fIoptions\fP argument, which is equivalent to an argument to \fIwait3\fP().
+The WUNTRACED flag is used only in conjunction with
+job control on systems supporting job control. Its name comes from
+4.3 BSD and refers to the fact that there are two types of
+stopped processes in that implementation: processes being traced via
+the \fIptrace\fP() debugging facility and (untraced)
+processes stopped by job control signals. Since \fIptrace\fP() is
+not part of this volume of IEEE\ Std\ 1003.1-2001, only
+the second type is relevant. The name WUNTRACED was retained because
+its usage is the same, even though the name is not intuitively
+meaningful in this context.
+.LP
+The third reason for the \fIwaitpid\fP() function is to permit independent
+sections of a process to spawn and wait for children
+without interfering with each other. For example, the following problem
+occurs in developing a portable shell, or command
+interpreter:
+.sp
+.RS
+.nf
+
+\fBstream = popen("/bin/true");
+(void) system("sleep 100");
+(void) pclose(stream);
+\fP
+.fi
+.RE
+.LP
+On all historical implementations, the final \fIpclose\fP() fails
+to reap the
+\fIwait\fP() \fIstatus\fP of the \fIpopen\fP().
+.LP
+The status values are retrieved by macros, rather than given as specific
+bit encodings as they are in most historical
+implementations (and thus expected by existing programs). This was
+necessary to eliminate a limitation on the number of signals an
+implementation can support that was inherent in the traditional encodings.
+This volume of IEEE\ Std\ 1003.1-2001 does
+require that a \fIstatus\fP value of zero corresponds to a process
+calling \fI_exit\fP(0), as this is the most common encoding
+expected by existing programs. Some of the macro names were adopted
+from 4.3 BSD.
+.LP
+These macros syntactically operate on an arbitrary integer value.
+The behavior is undefined unless that value is one stored by a
+successful call to \fIwait\fP() or \fIwaitpid\fP() in the location
+pointed to by the \fIstat_loc\fP argument. An early proposal
+attempted to make this clearer by specifying each argument as *\fIstat_loc\fP
+rather than \fIstat_val\fP. However, that did not
+follow the conventions of other specifications in this volume of IEEE\ Std\ 1003.1-2001
+or traditional usage. It also could
+have implied that the argument to the macro must literally be *\fIstat_loc\fP;
+in fact, that value can be stored or passed as an
+argument to other functions before being interpreted by these macros.
+.LP
+The extension that affects \fIwait\fP() and \fIwaitpid\fP() and is
+common in historical implementations is the \fIptrace\fP()
+function. It is called by a child process and causes that child to
+stop and return a \fIstatus\fP that appears identical to the
+\fIstatus\fP indicated by WIFSTOPPED. The \fIstatus\fP of \fIptrace\fP()
+children is traditionally returned regardless of the
+WUNTRACED flag (or by the \fIwait\fP() function). Most applications
+do not need to concern themselves with such extensions because
+they have control over what extensions they or their children use.
+However, applications, such as command interpreters, that invoke
+arbitrary processes may see this behavior when those arbitrary processes
+misuse such extensions.
+.LP
+Implementations that support \fBcore\fP file creation or other implementation-defined
+actions on termination of some processes
+traditionally provide a bit in the \fIstatus\fP returned by \fIwait\fP()
+to indicate that such actions have occurred.
+.LP
+Allowing the \fIwait\fP() family of functions to discard a pending
+SIGCHLD signal that is associated with a successfully
+waited-for child process puts them into the \fIsigwait\fP() and \fIsigwaitinfo\fP()
+category with respect to SIGCHLD.
+.LP
+This definition allows implementations to treat a pending SIGCHLD
+signal as accepted by the process in \fIwait\fP(), with the
+same meaning of "accepted" as when that word is applied to the \fIsigwait\fP()
+family of
+functions.
+.LP
+Allowing the \fIwait\fP() family of functions to behave this way permits
+an implementation to be able to deal precisely with
+SIGCHLD signals.
+.LP
+In particular, an implementation that does accept (discard) the SIGCHLD
+signal can make the following guarantees regardless of
+the queuing depth of signals in general (the list of waitable children
+can hold the SIGCHLD queue):
+.IP " 1." 4
+If a SIGCHLD signal handler is established via \fIsigaction\fP() without
+the
+SA_RESETHAND flag, SIGCHLD signals can be accurately counted; that
+is, exactly one SIGCHLD signal will be delivered to or accepted
+by the process for every child process that terminates.
+.LP
+.IP " 2." 4
+A single \fIwait\fP() issued from a SIGCHLD signal handler can be
+guaranteed to return immediately with status information for
+a child process.
+.LP
+.IP " 3." 4
+When SA_SIGINFO is requested, the SIGCHLD signal handler can be guaranteed
+to receive a non-NULL pointer to a \fBsiginfo_t\fP
+structure that describes a child process for which a wait via \fIwaitpid\fP()
+or \fIwaitid\fP() will not block or fail.
+.LP
+.IP " 4." 4
+The \fIsystem\fP() function will not cause a process' SIGCHLD handler
+to be called as a
+result of the \fIfork\fP()/ \fIexec\fP executed within
+\fIsystem\fP() because \fIsystem\fP() will accept
+the SIGCHLD signal when it performs a \fIwaitpid\fP() for its child
+process. This is a desirable behavior of \fIsystem\fP() so that it
+can be used in a library without causing side effects to the application
+linked with the library.
+.LP
+.LP
+An implementation that does not permit the \fIwait\fP() family of
+functions to accept (discard) a pending SIGCHLD signal
+associated with a successfully waited-for child, cannot make the guarantees
+described above for the following reasons:
+.TP 7
+Guarantee #1
+.sp
+Although it might be assumed that reliable queuing of all SIGCHLD
+signals generated by the system can make this guarantee, the
+counter-example is the case of a process that blocks SIGCHLD and performs
+an indefinite loop of \fIfork\fP()/ \fIwait\fP() operations. If the
+implementation supports queued signals, then
+eventually the system will run out of memory for the queue. The guarantee
+cannot be made because there must be some limit to the
+depth of queuing.
+.TP 7
+Guarantees #2 and #3
+.sp
+These cannot be guaranteed unless the \fIwait\fP() family of functions
+accepts the SIGCHLD signal. Otherwise, a \fIfork\fP()/ \fIwait\fP()
+executed while SIGCHLD is blocked (as in the \fIsystem\fP() function)
+will result in an invocation of the handler when SIGCHLD is unblocked,
+after the process has disappeared.
+.TP 7
+Guarantee #4
+.sp
+Although possible to make this guarantee, \fIsystem\fP() would have
+to set the SIGCHLD
+handler to SIG_DFL so that the SIGCHLD signal generated by its \fIfork\fP()
+would be
+discarded (the SIGCHLD default action is to be ignored), then restore
+it to its previous setting. This would have the undesirable
+side effect of discarding all SIGCHLD signals pending to the process.
+.sp
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexec\fP(), \fIexit\fP(), \fIfork\fP(), \fIwaitid\fP(), the
+Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<signal.h>\fP, \fI<sys/wait.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/waitid.3p b/man-pages-posix-2003/man3p/waitid.3p
new file mode 100644
index 0000000..04558fa
--- /dev/null
+++ b/man-pages-posix-2003/man3p/waitid.3p
@@ -0,0 +1,126 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WAITID" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" waitid
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+waitid \- wait for a child process to change state
+.SH SYNOPSIS
+.LP
+\fB#include <sys/wait.h>
+.br
+.sp
+int waitid(idtype_t\fP \fIidtype\fP\fB, id_t\fP \fIid\fP\fB, siginfo_t
+*\fP\fIinfop\fP\fB, int\fP
+\fIoptions\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwaitid\fP() function shall suspend the calling thread until
+one child of the process containing the calling thread
+changes state. It records the current state of a child in the structure
+pointed to by \fIinfop\fP. If a child process changed
+state prior to the call to \fIwaitid\fP(), \fIwaitid\fP() shall return
+immediately. If more than one thread is suspended in \fIwait\fP()
+or \fIwaitpid\fP() waiting for termination
+of the same process, exactly one thread shall return the process status
+at the time of the target process termination.
+.LP
+The \fIidtype\fP and \fIid\fP arguments are used to specify which
+children \fIwaitid\fP() waits for.
+.LP
+If \fIidtype\fP is P_PID, \fIwaitid\fP() shall wait for the child
+with a process ID equal to (\fBpid_t\fP)\fIid\fP.
+.LP
+If \fIidtype\fP is P_PGID, \fIwaitid\fP() shall wait for any child
+with a process group ID equal to
+(\fBpid_t\fP)\fIid\fP.
+.LP
+If \fIidtype\fP is P_ALL, \fIwaitid\fP() shall wait for any children
+and \fIid\fP is ignored.
+.LP
+The \fIoptions\fP argument is used to specify which state changes
+\fIwaitid\fP() shall wait for. It is formed by OR'ing
+together one or more of the following flags:
+.TP 7
+WEXITED
+Wait for processes that have exited.
+.TP 7
+WSTOPPED
+Status shall be returned for any child that has stopped upon receipt
+of a signal.
+.TP 7
+WCONTINUED
+Status shall be returned for any child that was stopped and has been
+continued.
+.TP 7
+WNOHANG
+Return immediately if there are no children to wait for.
+.TP 7
+WNOWAIT
+Keep the process whose status is returned in \fIinfop\fP in a waitable
+state. This shall not affect the state of the process;
+the process may be waited for again after this call completes.
+.sp
+.LP
+The application shall ensure that the \fIinfop\fP argument points
+to a \fBsiginfo_t\fP structure. If \fIwaitid\fP() returns
+because a child process was found that satisfied the conditions indicated
+by the arguments \fIidtype\fP and \fIoptions\fP, then
+the structure pointed to by \fIinfop\fP shall be filled in by the
+system with the status of the process. The \fIsi_signo\fP
+member shall always be equal to SIGCHLD.
+.SH RETURN VALUE
+.LP
+If WNOHANG was specified and there are no children to wait for, 0
+shall be returned. If \fIwaitid\fP() returns due to the
+change of state of one of its children, 0 shall be returned. Otherwise,
+-1 shall be returned and \fIerrno\fP set to indicate the
+error.
+.SH ERRORS
+.LP
+The \fIwaitid\fP() function shall fail if:
+.TP 7
+.B ECHILD
+The calling process has no existing unwaited-for child processes.
+.TP 7
+.B EINTR
+The \fIwaitid\fP() function was interrupted by a signal.
+.TP 7
+.B EINVAL
+An invalid value was specified for \fIoptions\fP, or \fIidtype\fP
+and \fIid\fP specify an invalid set of processes.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIexec\fP(), \fIexit\fP(), \fIwait\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<sys/wait.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/waitpid.3p b/man-pages-posix-2003/man3p/waitpid.3p
new file mode 100644
index 0000000..f84d64e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/waitpid.3p
@@ -0,0 +1 @@
+.so man3p/wait.3p
diff --git a/man-pages-posix-2003/man3p/wcrtomb.3p b/man-pages-posix-2003/man3p/wcrtomb.3p
new file mode 100644
index 0000000..e66b951
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wcrtomb.3p
@@ -0,0 +1,106 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WCRTOMB" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wcrtomb
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wcrtomb \- convert a wide-character code to a character (restartable)
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+.sp
+size_t wcrtomb(char *restrict\fP \fIs\fP\fB, wchar_t\fP \fIwc\fP\fB,
+mbstate_t *restrict\fP \fIps\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+If \fIs\fP is a null pointer, the \fIwcrtomb\fP() function shall be
+equivalent to the call:
+.sp
+.RS
+.nf
+
+\fBwcrtomb(\fP\fIbuf\fP\fB, L'\\0',\fP \fIps\fP\fB)
+\fP
+.fi
+.RE
+.LP
+where \fIbuf\fP is an internal buffer.
+.LP
+If \fIs\fP is not a null pointer, the \fIwcrtomb\fP() function shall
+determine the number of bytes needed to represent the
+character that corresponds to the wide character given by \fIwc\fP
+(including any shift sequences), and store the resulting bytes
+in the array whose first element is pointed to by \fIs\fP. At most
+{MB_CUR_MAX} bytes are stored. If \fIwc\fP is a null wide
+character, a null byte shall be stored, preceded by any shift sequence
+needed to restore the initial shift state. The resulting
+state described shall be the initial conversion state.
+.LP
+If \fIps\fP is a null pointer, the \fIwcrtomb\fP() function shall
+use its own internal \fBmbstate_t\fP object, which is
+initialized at program start-up to the initial conversion state. Otherwise,
+the \fBmbstate_t\fP object pointed to by \fIps\fP
+shall be used to completely describe the current conversion state
+of the associated character sequence. The implementation shall
+behave as if no function defined in this volume of IEEE\ Std\ 1003.1-2001
+calls \fIwcrtomb\fP().
+.LP
+If
+the application uses any of the _POSIX_THREAD_SAFE_FUNCTIONS or _POSIX_THREADS
+functions, the application shall ensure that the
+\fIwcrtomb\fP() function is called with a non-NULL \fIps\fP argument.
+.LP
+The behavior of this function shall be affected by the \fILC_CTYPE\fP
+category of the current locale.
+.SH RETURN VALUE
+.LP
+The \fIwcrtomb\fP() function shall return the number of bytes stored
+in the array object (including any shift sequences). When
+\fIwc\fP is not a valid wide character, an encoding error shall occur.
+In this case, the function shall store the value of the
+macro [EILSEQ] in \fIerrno\fP and shall return (\fBsize_t\fP)-1; the
+conversion state shall be undefined.
+.SH ERRORS
+.LP
+The \fIwcrtomb\fP() function may fail if:
+.TP 7
+.B EINVAL
+\fIps\fP points to an object that contains an invalid conversion state.
+.TP 7
+.B EILSEQ
+Invalid wide-character code is detected.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fImbsinit\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wcscat.3p b/man-pages-posix-2003/man3p/wcscat.3p
new file mode 100644
index 0000000..523183e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wcscat.3p
@@ -0,0 +1,63 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WCSCAT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wcscat
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wcscat \- concatenate two wide-character strings
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+wchar_t *wcscat(wchar_t *restrict\fP \fIws1\fP\fB, const wchar_t *restrict\fP
+\fIws2\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwcscat\fP() function shall append a copy of the wide-character
+string pointed to by \fIws2\fP (including the
+terminating null wide-character code) to the end of the wide-character
+string pointed to by \fIws1\fP. The initial wide-character
+code of \fIws2\fP shall overwrite the null wide-character code at
+the end of \fIws1\fP. If copying takes place between objects
+that overlap, the behavior is undefined.
+.SH RETURN VALUE
+.LP
+The \fIwcscat\fP() function shall return \fIws1\fP; no return value
+is reserved to indicate an error.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIwcsncat\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wcschr.3p b/man-pages-posix-2003/man3p/wcschr.3p
new file mode 100644
index 0000000..1ae5dbb
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wcschr.3p
@@ -0,0 +1,63 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WCSCHR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wcschr
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wcschr \- wide-character string scanning operation
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+wchar_t *wcschr(const wchar_t *\fP\fIws\fP\fB, wchar_t\fP \fIwc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwcschr\fP() function shall locate the first occurrence of \fIwc\fP
+in the wide-character string pointed to by
+\fIws\fP. The application shall ensure that the value of \fIwc\fP
+is a character representable as a type \fBwchar_t\fP and a
+wide-character code corresponding to a valid character in the current
+locale. The terminating null wide-character code is
+considered to be part of the wide-character string.
+.SH RETURN VALUE
+.LP
+Upon completion, \fIwcschr\fP() shall return a pointer to the wide-character
+code, or a null pointer if the wide-character code
+is not found.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIwcsrchr\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wcscmp.3p b/man-pages-posix-2003/man3p/wcscmp.3p
new file mode 100644
index 0000000..c64216f
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wcscmp.3p
@@ -0,0 +1,65 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WCSCMP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wcscmp
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wcscmp \- compare two wide-character strings
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+int wcscmp(const wchar_t *\fP\fIws1\fP\fB, const wchar_t *\fP\fIws2\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwcscmp\fP() function shall compare the wide-character string
+pointed to by \fIws1\fP to the wide-character string
+pointed to by \fIws2\fP.
+.LP
+The sign of a non-zero return value shall be determined by the sign
+of the difference between the values of the first pair of
+wide-character codes that differ in the objects being compared.
+.SH RETURN VALUE
+.LP
+Upon completion, \fIwcscmp\fP() shall return an integer greater than,
+equal to, or less than 0, if the wide-character string
+pointed to by \fIws1\fP is greater than, equal to, or less than the
+wide-character string pointed to by \fIws2\fP,
+respectively.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIwcsncmp\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wcscoll.3p b/man-pages-posix-2003/man3p/wcscoll.3p
new file mode 100644
index 0000000..661c0e8
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wcscoll.3p
@@ -0,0 +1,79 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WCSCOLL" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wcscoll
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wcscoll \- wide-character string comparison using collating information
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+int wcscoll(const wchar_t *\fP\fIws1\fP\fB, const wchar_t *\fP\fIws2\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwcscoll\fP() function shall compare the wide-character string
+pointed to by \fIws1\fP to the wide-character string
+pointed to by \fIws2\fP, both interpreted as appropriate to the \fILC_COLLATE\fP
+category of the current locale.
+.LP
+The
+\fIwcscoll\fP() function shall not change the setting of \fIerrno\fP
+if successful.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to 0 before calling \fIwcscoll\fP(). If
+\fIerrno\fP is non-zero on return, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIwcscoll\fP() shall return an integer
+greater than, equal to, or less than 0, according to
+whether the wide-character string pointed to by \fIws1\fP is greater
+than, equal to, or less than the wide-character string
+pointed to by \fIws2\fP, when both are interpreted as appropriate
+to the current locale. On error,
+\fIwcscoll\fP() shall set \fIerrno\fP, but no return value is reserved
+to indicate an error.
+.SH ERRORS
+.LP
+The \fIwcscoll\fP() function may fail if:
+.TP 7
+.B EINVAL
+The \fIws1\fP or \fIws2\fP arguments contain wide-character codes
+outside the domain of the collating sequence.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIwcsxfrm\fP() and \fIwcscmp\fP()
+functions should be used for sorting large lists.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIwcscmp\fP(), \fIwcsxfrm\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wcscpy.3p b/man-pages-posix-2003/man3p/wcscpy.3p
new file mode 100644
index 0000000..c79ac09
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wcscpy.3p
@@ -0,0 +1,61 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WCSCPY" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wcscpy
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wcscpy \- copy a wide-character string
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+wchar_t *wcscpy(wchar_t *restrict\fP \fIws1\fP\fB, const wchar_t *restrict\fP
+\fIws2\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwcscpy\fP() function shall copy the wide-character string pointed
+to by \fIws2\fP (including the terminating null
+wide-character code) into the array pointed to by \fIws1\fP. If copying
+takes place between objects that overlap, the behavior is
+undefined.
+.SH RETURN VALUE
+.LP
+The \fIwcscpy\fP() function shall return \fIws1\fP; no return value
+is reserved to indicate an error.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIwcsncpy\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wcscspn.3p b/man-pages-posix-2003/man3p/wcscspn.3p
new file mode 100644
index 0000000..c8cef92
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wcscspn.3p
@@ -0,0 +1,61 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WCSCSPN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wcscspn
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wcscspn \- get the length of a complementary wide substring
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+size_t wcscspn(const wchar_t *\fP\fIws1\fP\fB, const wchar_t *\fP\fIws2\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwcscspn\fP() function shall compute the length (in wide characters)
+of the maximum initial segment of the wide-character
+string pointed to by \fIws1\fP which consists entirely of wide-character
+codes \fInot\fP from the wide-character string pointed
+to by \fIws2\fP.
+.SH RETURN VALUE
+.LP
+The \fIwcscspn\fP() function shall return the length of the initial
+substring of \fIws1\fP; no return value is reserved to
+indicate an error.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIwcsspn\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wcsftime.3p b/man-pages-posix-2003/man3p/wcsftime.3p
new file mode 100644
index 0000000..b4a877c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wcsftime.3p
@@ -0,0 +1,88 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WCSFTIME" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wcsftime
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wcsftime \- convert date and time to a wide-character string
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+size_t wcsftime(wchar_t *restrict\fP \fIwcs\fP\fB, size_t\fP \fImaxsize\fP\fB,
+.br
+\ \ \ \ \ \ const wchar_t *restrict\fP \fIformat\fP\fB, const struct
+tm *restrict\fP
+\fItimeptr\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwcsftime\fP() function shall be equivalent to the \fIstrftime\fP()
+function,
+except that:
+.IP " *" 3
+The argument \fIwcs\fP points to the initial element of an array of
+wide characters into which the generated output is to be
+placed.
+.LP
+.IP " *" 3
+The argument \fImaxsize\fP indicates the maximum number of wide characters
+to be placed in the output array.
+.LP
+.IP " *" 3
+The argument \fIformat\fP is a wide-character string and the conversion
+specifications are replaced by corresponding sequences
+of wide characters.
+.LP
+.IP " *" 3
+The return value indicates the number of wide characters placed in
+the output array.
+.LP
+.LP
+If copying takes place between objects that overlap, the behavior
+is undefined.
+.SH RETURN VALUE
+.LP
+If the total number of resulting wide-character codes including the
+terminating null wide-character code is no more than
+\fImaxsize\fP, \fIwcsftime\fP() shall return the number of wide-character
+codes placed into the array pointed to by \fIwcs\fP,
+not including the terminating null wide-character code. Otherwise,
+zero is returned and the contents of the array are
+unspecified.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIstrftime\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wcslen.3p b/man-pages-posix-2003/man3p/wcslen.3p
new file mode 100644
index 0000000..b3e5df2
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wcslen.3p
@@ -0,0 +1,57 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WCSLEN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wcslen
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wcslen \- get wide-character string length
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+size_t wcslen(const wchar_t *\fP\fIws\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwcslen\fP() function shall compute the number of wide-character
+codes in the wide-character string to which \fIws\fP
+points, not including the terminating null wide-character code.
+.SH RETURN VALUE
+.LP
+The \fIwcslen\fP() function shall return the length of \fIws\fP; no
+return value is reserved to indicate an error.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wcsncat.3p b/man-pages-posix-2003/man3p/wcsncat.3p
new file mode 100644
index 0000000..6ef378f
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wcsncat.3p
@@ -0,0 +1,67 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WCSNCAT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wcsncat
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wcsncat \- concatenate a wide-character string with part of another
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+wchar_t *wcsncat(wchar_t *restrict\fP \fIws1\fP\fB, const wchar_t
+*restrict\fP \fIws2\fP\fB,
+.br
+\ \ \ \ \ \ size_t\fP \fIn\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwcsncat\fP() function shall append not more than \fIn\fP wide-character
+codes (a null wide-character code and
+wide-character codes that follow it are not appended) from the array
+pointed to by \fIws2\fP to the end of the wide-character
+string pointed to by \fIws1\fP. The initial wide-character code of
+\fIws2\fP shall overwrite the null wide-character code at the
+end of \fIws1\fP. A terminating null wide-character code shall always
+be appended to the result. If copying takes place between
+objects that overlap, the behavior is undefined.
+.SH RETURN VALUE
+.LP
+The \fIwcsncat\fP() function shall return \fIws1\fP; no return value
+is reserved to indicate an error.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIwcscat\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wcsncmp.3p b/man-pages-posix-2003/man3p/wcsncmp.3p
new file mode 100644
index 0000000..9730430
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wcsncmp.3p
@@ -0,0 +1,67 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WCSNCMP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wcsncmp
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wcsncmp \- compare part of two wide-character strings
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+int wcsncmp(const wchar_t *\fP\fIws1\fP\fB, const wchar_t *\fP\fIws2\fP\fB,
+size_t\fP \fIn\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwcsncmp\fP() function shall compare not more than \fIn\fP wide-character
+codes (wide-character codes that follow a null
+wide-character code are not compared) from the array pointed to by
+\fIws1\fP to the array pointed to by \fIws2\fP.
+.LP
+The sign of a non-zero return value shall be determined by the sign
+of the difference between the values of the first pair of
+wide-character codes that differ in the objects being compared.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIwcsncmp\fP() shall return an integer
+greater than, equal to, or less than 0, if the possibly
+null-terminated array pointed to by \fIws1\fP is greater than, equal
+to, or less than the possibly null-terminated array pointed
+to by \fIws2\fP, respectively.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIwcscmp\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wcsncpy.3p b/man-pages-posix-2003/man3p/wcsncpy.3p
new file mode 100644
index 0000000..37a5ebf
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wcsncpy.3p
@@ -0,0 +1,71 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WCSNCPY" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wcsncpy
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wcsncpy \- copy part of a wide-character string
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+wchar_t *wcsncpy(wchar_t *restrict\fP \fIws1\fP\fB, const wchar_t
+*restrict\fP \fIws2\fP\fB,
+.br
+\ \ \ \ \ \ size_t\fP \fIn\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwcsncpy\fP() function shall copy not more than \fIn\fP wide-character
+codes (wide-character codes that follow a null
+wide-character code are not copied) from the array pointed to by \fIws2\fP
+to the array pointed to by \fIws1\fP. If copying takes
+place between objects that overlap, the behavior is undefined.
+.LP
+If the array pointed to by \fIws2\fP is a wide-character string that
+is shorter than \fIn\fP wide-character codes, null
+wide-character codes shall be appended to the copy in the array pointed
+to by \fIws1\fP, until \fIn\fP wide-character codes in
+all are written.
+.SH RETURN VALUE
+.LP
+The \fIwcsncpy\fP() function shall return \fIws1\fP; no return value
+is reserved to indicate an error.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+If there is no null wide-character code in the first \fIn\fP wide-character
+codes of the array pointed to by \fIws2\fP, the
+result is not null-terminated.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIwcscpy\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wcspbrk.3p b/man-pages-posix-2003/man3p/wcspbrk.3p
new file mode 100644
index 0000000..4aa1b82
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wcspbrk.3p
@@ -0,0 +1,59 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WCSPBRK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wcspbrk
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wcspbrk \- scan a wide-character string for a wide-character code
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+wchar_t *wcspbrk(const wchar_t *\fP\fIws1\fP\fB, const wchar_t *\fP\fIws2\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwcspbrk\fP() function shall locate the first occurrence in
+the wide-character string pointed to by \fIws1\fP of any
+wide-character code from the wide-character string pointed to by \fIws2\fP.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIwcspbrk\fP() shall return a pointer
+to the wide-character code or a null pointer if no
+wide-character code from \fIws2\fP occurs in \fIws1\fP.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIwcschr\fP(), \fIwcsrchr\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wcsrchr.3p b/man-pages-posix-2003/man3p/wcsrchr.3p
new file mode 100644
index 0000000..0977d39
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wcsrchr.3p
@@ -0,0 +1,63 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WCSRCHR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wcsrchr
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wcsrchr \- wide-character string scanning operation
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+wchar_t *wcsrchr(const wchar_t *\fP\fIws\fP\fB, wchar_t\fP \fIwc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwcsrchr\fP() function shall locate the last occurrence of \fIwc\fP
+in the wide-character string pointed to by
+\fIws\fP. The application shall ensure that the value of \fIwc\fP
+is a character representable as a type \fBwchar_t\fP and a
+wide-character code corresponding to a valid character in the current
+locale. The terminating null wide-character code shall be
+considered to be part of the wide-character string.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIwcsrchr\fP() shall return a pointer
+to the wide-character code or a null pointer if \fIwc\fP
+does not occur in the wide-character string.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIwcschr\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wcsrtombs.3p b/man-pages-posix-2003/man3p/wcsrtombs.3p
new file mode 100644
index 0000000..be8685e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wcsrtombs.3p
@@ -0,0 +1,116 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WCSRTOMBS" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wcsrtombs
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wcsrtombs \- convert a wide-character string to a character string
+(restartable)
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+size_t wcsrtombs(char *restrict\fP \fIdst\fP\fB, const wchar_t **restrict\fP
+\fIsrc\fP\fB,
+.br
+\ \ \ \ \ \ size_t\fP \fIlen\fP\fB, mbstate_t *restrict\fP \fIps\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwcsrtombs\fP() function shall convert a sequence of wide characters
+from the array indirectly pointed to by \fIsrc\fP
+into a sequence of corresponding characters, beginning in the conversion
+state described by the object pointed to by \fIps\fP. If
+\fIdst\fP is not a null pointer, the converted characters shall then
+be stored into the array pointed to by \fIdst\fP. Conversion
+continues up to and including a terminating null wide character, which
+shall also be stored. Conversion shall stop earlier in the
+following cases:
+.IP " *" 3
+When a code is reached that does not correspond to a valid character
+.LP
+.IP " *" 3
+When the next character would exceed the limit of \fIlen\fP total
+bytes to be stored in the array pointed to by \fIdst\fP (and
+\fIdst\fP is not a null pointer)
+.LP
+.LP
+Each conversion shall take place as if by a call to the \fIwcrtomb\fP()
+function.
+.LP
+If \fIdst\fP is not a null pointer, the pointer object pointed to
+by \fIsrc\fP shall be assigned either a null pointer (if
+conversion stopped due to reaching a terminating null wide character)
+or the address just past the last wide character converted
+(if any). If conversion stopped due to reaching a terminating null
+wide character, the resulting state described shall be the
+initial conversion state.
+.LP
+If \fIps\fP is a null pointer, the \fIwcsrtombs\fP() function shall
+use its own internal \fBmbstate_t\fP object, which is
+initialized at program start-up to the initial conversion state. Otherwise,
+the \fBmbstate_t\fP object pointed to by \fIps\fP
+shall be used to completely describe the current conversion state
+of the associated character sequence. The implementation shall
+behave as if no function defined in this volume of IEEE\ Std\ 1003.1-2001
+calls \fIwcsrtombs\fP().
+.LP
+If
+the application uses any of the _POSIX_THREAD_SAFE_FUNCTIONS or _POSIX_THREADS
+functions, the application shall ensure that the
+\fIwcsrtombs\fP() function is called with a non-NULL \fIps\fP argument.
+.LP
+The behavior of this function shall be affected by the \fILC_CTYPE\fP
+category of the current locale.
+.SH RETURN VALUE
+.LP
+If conversion stops because a code is reached that does not correspond
+to a valid character, an encoding error occurs. In this
+case, the \fIwcsrtombs\fP() function shall store the value of the
+macro [EILSEQ] in \fIerrno\fP and return (\fBsize_t\fP)-1; the
+conversion state is undefined. Otherwise, it shall return the number
+of bytes in the resulting character sequence, not including
+the terminating null (if any).
+.SH ERRORS
+.LP
+The \fIwcsrtombs\fP() function may fail if:
+.TP 7
+.B EINVAL
+\fIps\fP points to an object that contains an invalid conversion state.
+.TP 7
+.B EILSEQ
+A wide-character code does not correspond to a valid character.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fImbsinit\fP(), \fIwcrtomb\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wcsspn.3p b/man-pages-posix-2003/man3p/wcsspn.3p
new file mode 100644
index 0000000..54091a5
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wcsspn.3p
@@ -0,0 +1,61 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WCSSPN" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wcsspn
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wcsspn \- get the length of a wide substring
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+size_t wcsspn(const wchar_t *\fP\fIws1\fP\fB, const wchar_t *\fP\fIws2\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwcsspn\fP() function shall compute the length (in wide characters)
+of the maximum initial segment of the wide-character
+string pointed to by \fIws1\fP which consists entirely of wide-character
+codes from the wide-character string pointed to by
+\fIws2\fP.
+.SH RETURN VALUE
+.LP
+The \fIwcsspn\fP() function shall return the length of the initial
+substring of \fIws1\fP; no return value is reserved to
+indicate an error.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIwcscspn\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wcsstr.3p b/man-pages-posix-2003/man3p/wcsstr.3p
new file mode 100644
index 0000000..60cb412
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wcsstr.3p
@@ -0,0 +1,66 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WCSSTR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wcsstr
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wcsstr \- find a wide-character substring
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+wchar_t *wcsstr(const wchar_t *restrict\fP \fIws1\fP\fB,
+.br
+\ \ \ \ \ \ const wchar_t *restrict\fP \fIws2\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwcsstr\fP() function shall locate the first occurrence in the
+wide-character string pointed to by \fIws1\fP of the
+sequence of wide characters (excluding the terminating null wide character)
+in the wide-character string pointed to by
+\fIws2\fP.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIwcsstr\fP() shall return a pointer
+to the located wide-character string, or a null pointer if
+the wide-character string is not found.
+.LP
+If \fIws2\fP points to a wide-character string with zero length, the
+function shall return \fIws1\fP.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIwcschr\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wcstod.3p b/man-pages-posix-2003/man3p/wcstod.3p
new file mode 100644
index 0000000..a1b4482
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wcstod.3p
@@ -0,0 +1,217 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WCSTOD" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wcstod
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wcstod, wcstof, wcstold \- convert a wide-character string to a double-precision
+number
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+double wcstod(const wchar_t *restrict\fP \fInptr\fP\fB, wchar_t **restrict\fP
+\fIendptr\fP\fB);
+.br
+float wcstof(const wchar_t *restrict\fP \fInptr\fP\fB, wchar_t **restrict\fP
+\fIendptr\fP\fB);
+.br
+long double wcstold(const wchar_t *restrict\fP \fInptr\fP\fB,
+.br
+\ \ \ \ \ \ wchar_t **restrict\fP \fIendptr\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall convert the initial portion of the wide-character
+string pointed to by \fInptr\fP to \fBdouble\fP,
+\fBfloat\fP, and \fBlong double\fP representation, respectively. First,
+they shall decompose the input wide-character string into
+three parts:
+.IP " 1." 4
+An initial, possibly empty, sequence of white-space wide-character
+codes (as specified by \fIiswspace\fP())
+.LP
+.IP " 2." 4
+A subject sequence interpreted as a floating-point constant or representing
+infinity or NaN
+.LP
+.IP " 3." 4
+A final wide-character string of one or more unrecognized wide-character
+codes, including the terminating null wide-character
+code of the input wide-character string
+.LP
+.LP
+Then they shall attempt to convert the subject sequence to a floating-point
+number, and return the result.
+.LP
+The expected form of the subject sequence is an optional plus or minus
+sign, then one of the following:
+.IP " *" 3
+A non-empty sequence of decimal digits optionally containing a radix
+character, then an optional exponent part
+.LP
+.IP " *" 3
+A 0x or 0X, then a non-empty sequence of hexadecimal digits optionally
+containing a radix character, then an optional binary
+exponent part
+.LP
+.IP " *" 3
+One of INF or INFINITY, or any other wide string equivalent except
+for case
+.LP
+.IP " *" 3
+One of NAN or NAN(\fIn-wchar-sequence_opt\fP), or any other wide string
+ignoring case in the NAN part,
+where:
+.sp
+.RS
+.nf
+
+\fBn-wchar-sequence:
+ digit
+ nondigit
+ n-wchar-sequence digit
+ n-wchar-sequence nondigit
+\fP
+.fi
+.RE
+.LP
+.LP
+The subject sequence is defined as the longest initial subsequence
+of the input wide string, starting with the first
+non-white-space wide character, that is of the expected form. The
+subject sequence contains no wide characters if the input wide
+string is not of the expected form.
+.LP
+If the subject sequence has the expected form for a floating-point
+number, the sequence of wide characters starting with the
+first digit or the radix character (whichever occurs first) shall
+be interpreted as a floating constant according to the rules of
+the C language, except that the radix character shall be used in place
+of a period, and that if neither an exponent part nor a
+radix character appears in a decimal floating-point number, or if
+a binary exponent part does not appear in a hexadecimal
+floating-point number, an exponent part of the appropriate type with
+value zero shall be assumed to follow the last digit in the
+string. If the subject sequence begins with a minus sign, the sequence
+shall be interpreted as negated. A wide-character sequence
+INF or INFINITY shall be interpreted as an infinity, if representable
+in the return type, else as if it were a floating constant
+that is too large for the range of the return type. A wide-character
+sequence NAN or
+NAN(\fIn-wchar-sequence_opt\fP) shall be interpreted as a quiet NaN,
+if supported in the return type,
+else as if it were a subject sequence part that does not have the
+expected form; the meaning of the \fIn\fP-wchar sequences is
+implementation-defined. A pointer to the final wide string shall be
+stored in the object pointed to by \fIendptr\fP, provided that
+\fIendptr\fP is not a null pointer.
+.LP
+If the subject sequence has the hexadecimal form and FLT_RADIX is
+a power of 2, the conversion shall be rounded in an
+implementation-defined manner.
+.LP
+The
+radix character shall be as defined in the program's locale (category
+\fILC_NUMERIC ).\fP In the POSIX locale, or in a locale
+where the radix character is not defined, the radix character shall
+default to a period ( \fB'.'\fP ).
+.LP
+In other than the C or POSIX locales, other
+implementation-defined subject sequences may be accepted.
+.LP
+If the subject sequence is empty or does not have the expected form,
+no conversion shall be performed; the value of \fInptr\fP
+shall be stored in the object pointed to by \fIendptr\fP, provided
+that \fIendptr\fP is not a null pointer.
+.LP
+The
+\fIwcstod\fP() function shall not change the setting of \fIerrno\fP
+if successful.
+.LP
+Since 0 is returned on error and is also a valid return on success,
+an application wishing to check for error situations should
+set \fIerrno\fP to 0, then call \fIwcstod\fP(), \fIwcstof\fP(), or
+\fIwcstold\fP(), then check \fIerrno\fP.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the converted
+value. If no conversion could be performed, 0 shall be
+returned and \fIerrno\fP may be set to [EINVAL].
+.LP
+If the correct value is outside the range of representable values,
+\(+-HUGE_VAL, \(+-HUGE_VALF, or \(+-HUGE_VALL
+shall be returned (according to the sign of the value), and \fIerrno\fP
+shall be set to [ERANGE].
+.LP
+If the correct value would cause underflow, a value whose magnitude
+is no greater than the smallest normalized positive number
+in the return type shall be returned and \fIerrno\fP set to [ERANGE].
+.SH ERRORS
+.LP
+The \fIwcstod\fP() function shall fail if:
+.TP 7
+.B ERANGE
+The value to be returned would cause overflow or underflow.
+.sp
+.LP
+The \fIwcstod\fP() function may fail if:
+.TP 7
+.B EINVAL
+No
+conversion could be performed.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+If the subject sequence has the hexadecimal form and FLT_RADIX is
+not a power of 2, and the result is not exactly representable,
+the result should be one of the two numbers in the appropriate internal
+format that are adjacent to the hexadecimal floating source
+value, with the extra stipulation that the error should have a correct
+sign for the current rounding direction.
+.LP
+If the subject sequence has the decimal form and at most DECIMAL_DIG
+(defined in \fI<float.h>\fP) significant digits, the result should
+be correctly rounded. If the subject
+sequence \fID\fP has the decimal form and more than DECIMAL_DIG significant
+digits, consider the two bounding, adjacent decimal
+strings \fIL\fP and \fIU\fP, both having DECIMAL_DIG significant digits,
+such that the values of \fIL\fP, \fID\fP, and \fIU\fP
+satisfy \fB"L <= D <= U"\fP . The result should be one of the (equal
+or adjacent) values that would be obtained by
+correctly rounding \fIL\fP and \fIU\fP according to the current rounding
+direction, with the extra stipulation that the error
+with respect to \fID\fP should have a correct sign for the current
+rounding direction.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIiswspace\fP(), \fIlocaleconv\fP(), \fIscanf\fP(), \fIsetlocale\fP(),
+\fIwcstol\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 7, Locale,
+\fI<float.h>\fP, \fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wcstof.3p b/man-pages-posix-2003/man3p/wcstof.3p
new file mode 100644
index 0000000..d7b3247
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wcstof.3p
@@ -0,0 +1 @@
+.so man3p/wcstod.3p
diff --git a/man-pages-posix-2003/man3p/wcstoimax.3p b/man-pages-posix-2003/man3p/wcstoimax.3p
new file mode 100644
index 0000000..b6164e0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wcstoimax.3p
@@ -0,0 +1,87 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WCSTOIMAX" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wcstoimax
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wcstoimax, wcstoumax \- convert a wide-character string to an integer
+type
+.SH SYNOPSIS
+.LP
+\fB#include <stddef.h>
+.br
+#include <inttypes.h>
+.br
+.sp
+intmax_t wcstoimax(const wchar_t *restrict\fP \fInptr\fP\fB,
+.br
+\ \ \ \ \ \ wchar_t **restrict\fP \fIendptr\fP\fB, int\fP \fIbase\fP\fB);
+.br
+uintmax_t wcstoumax(const wchar_t *restrict\fP \fInptr\fP\fB,
+.br
+\ \ \ \ \ \ wchar_t **restrict\fP \fIendptr\fP\fB, int\fP \fIbase\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall be equivalent to the \fIwcstol\fP(), \fIwcstoll\fP(),
+\fIwcstoul\fP(), and \fIwcstoull\fP() functions, respectively, except
+that the initial portion of the wide string
+shall be converted to \fBintmax_t\fP and \fBuintmax_t\fP representation,
+respectively.
+.SH RETURN VALUE
+.LP
+These functions shall return the converted value, if any.
+.LP
+If no conversion could be performed, zero shall be returned. If the
+correct value is outside the range of representable values,
+{INTMAX_MAX}, {INTMAX_MIN}, or {UINTMAX_MAX} shall be returned (according
+to the return type and sign of the value, if any), and
+\fIerrno\fP shall be set to [ERANGE].
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+.B EINVAL
+The value of \fIbase\fP is not supported.
+.TP 7
+.B ERANGE
+The value to be returned is not representable.
+.sp
+.LP
+These functions may fail if:
+.TP 7
+.B EINVAL
+No conversion could be performed.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIwcstol\fP(), \fIwcstoul\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<inttypes.h>\fP, \fI<stddef.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wcstok.3p b/man-pages-posix-2003/man3p/wcstok.3p
new file mode 100644
index 0000000..dcd03bc
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wcstok.3p
@@ -0,0 +1,97 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WCSTOK" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wcstok
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wcstok \- split a wide-character string into tokens
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+wchar_t *wcstok(wchar_t *restrict\fP \fIws1\fP\fB, const wchar_t *restrict\fP
+\fIws2\fP\fB,
+.br
+\ \ \ \ \ \ wchar_t **restrict\fP \fIptr\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+A sequence of calls to \fIwcstok\fP() shall break the wide-character
+string pointed to by \fIws1\fP into a sequence of tokens,
+each of which shall be delimited by a wide-character code from the
+wide-character string pointed to by \fIws2\fP. The \fIptr\fP
+argument points to a caller-provided \fBwchar_t\fP pointer into which
+the \fIwcstok\fP() function shall store information
+necessary for it to continue scanning the same wide-character string.
+.LP
+The first call in the sequence has \fIws1\fP as its first argument,
+and is followed by calls with a null pointer as their first
+argument. The separator string pointed to by \fIws2\fP may be different
+from call to call.
+.LP
+The first call in the sequence shall search the wide-character string
+pointed to by \fIws1\fP for the first wide-character code
+that is \fInot\fP contained in the current separator string pointed
+to by \fIws2\fP. If no such wide-character code is found,
+then there are no tokens in the wide-character string pointed to by
+\fIws1\fP and \fIwcstok\fP() shall return a null pointer. If
+such a wide-character code is found, it shall be the start of the
+first token.
+.LP
+The \fIwcstok\fP() function shall then search from there for a wide-character
+code that \fIis\fP contained in the current
+separator string. If no such wide-character code is found, the current
+token extends to the end of the wide-character string
+pointed to by \fIws1\fP, and subsequent searches for a token shall
+return a null pointer. If such a wide-character code is found,
+it shall be overwritten by a null wide character, which terminates
+the current token. The \fIwcstok\fP() function shall save a
+pointer to the following wide-character code, from which the next
+search for a token shall start.
+.LP
+Each subsequent call, with a null pointer as the value of the first
+argument, shall start searching from the saved pointer and
+behave as described above.
+.LP
+The implementation shall behave as if no function calls \fIwcstok\fP().
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIwcstok\fP() function shall return
+a pointer to the first wide-character code of a token.
+Otherwise, if there is no token, \fIwcstok\fP() shall return a null
+pointer.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wcstol.3p b/man-pages-posix-2003/man3p/wcstol.3p
new file mode 100644
index 0000000..a979c13
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wcstol.3p
@@ -0,0 +1,162 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WCSTOL" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wcstol
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wcstol, wcstoll \- convert a wide-character string to a long integer
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+long wcstol(const wchar_t *restrict\fP \fInptr\fP\fB, wchar_t **restrict\fP
+\fIendptr\fP\fB,
+.br
+\ \ \ \ \ \ int\fP \fIbase\fP\fB);
+.br
+long long wcstoll(const wchar_t *restrict\fP \fInptr\fP\fB,
+.br
+\ \ \ \ \ \ wchar_t **restrict\fP \fIendptr\fP\fB, int\fP \fIbase\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+These functions shall convert the initial portion of the wide-character
+string pointed to by \fInptr\fP to \fBlong\fP, \fBlong
+long\fP, \fBunsigned long\fP, and \fBunsigned long long\fP representation,
+respectively. First, they shall decompose the input
+string into three parts:
+.IP " 1." 4
+An initial, possibly empty, sequence of white-space wide-character
+codes (as specified by \fIiswspace\fP())
+.LP
+.IP " 2." 4
+A subject sequence interpreted as an integer represented in some radix
+determined by the value of \fIbase\fP
+.LP
+.IP " 3." 4
+A final wide-character string of one or more unrecognized wide-character
+codes, including the terminating null wide-character
+code of the input wide-character string
+.LP
+.LP
+Then they shall attempt to convert the subject sequence to an integer,
+and return the result.
+.LP
+If \fIbase\fP is 0, the expected form of the subject sequence is that
+of a decimal constant, octal constant, or hexadecimal
+constant, any of which may be preceded by a \fB'+'\fP or \fB'-'\fP
+sign. A decimal constant begins with a non-zero digit, and
+consists of a sequence of decimal digits. An octal constant consists
+of the prefix \fB'0'\fP optionally followed by a sequence
+of the digits \fB'0'\fP to \fB'7'\fP only. A hexadecimal constant
+consists of the prefix 0x or 0X followed by a sequence of
+the decimal digits and letters \fB'a'\fP (or \fB'A'\fP ) to \fB'f'\fP
+(or \fB'F'\fP ) with values 10 to 15
+respectively.
+.LP
+If the value of \fIbase\fP is between 2 and 36, the expected form
+of the subject sequence is a sequence of letters and digits
+representing an integer with the radix specified by \fIbase\fP, optionally
+preceded by a \fB'+'\fP or \fB'-'\fP sign, but
+not including an integer suffix. The letters from \fB'a'\fP (or \fB'A'\fP
+) to \fB'z'\fP (or \fB'Z'\fP ) inclusive are
+ascribed the values 10 to 35; only letters whose ascribed values are
+less than that of \fIbase\fP shall be permitted. If the value
+of \fIbase\fP is 16, the wide-character code representations of 0x
+or 0X may optionally precede the sequence of letters and
+digits, following the sign if present.
+.LP
+The subject sequence is defined as the longest initial subsequence
+of the input wide-character string, starting with the first
+non-white-space wide-character code that is of the expected form.
+The subject sequence contains no wide-character codes if the
+input wide-character string is empty or consists entirely of white-space
+wide-character code, or if the first non-white-space
+wide-character code is other than a sign or a permissible letter or
+digit.
+.LP
+If the subject sequence has the expected form and \fIbase\fP is 0,
+the sequence of wide-character codes starting with the first
+digit shall be interpreted as an integer constant. If the subject
+sequence has the expected form and the value of \fIbase\fP is
+between 2 and 36, it shall be used as the base for conversion, ascribing
+to each letter its value as given above. If the subject
+sequence begins with a minus sign, the value resulting from the conversion
+shall be negated. A pointer to the final wide-character
+string shall be stored in the object pointed to by \fIendptr\fP, provided
+that \fIendptr\fP is not a null pointer.
+.LP
+In other than the C or POSIX locales, other
+implementation-defined subject sequences may be accepted.
+.LP
+If the subject sequence is empty or does not have the expected form,
+no conversion shall be performed; the value of \fInptr\fP
+shall be stored in the object pointed to by \fIendptr\fP, provided
+that \fIendptr\fP is not a null pointer.
+.LP
+These functions shall not change the setting of \fIerrno\fP if successful.
+.LP
+Since 0, {LONG_MIN} or {LLONG_MIN} and {LONG_MAX} or {LLONG_MAX} are
+returned on error and are also valid returns on success, an
+application wishing to check for error situations should set \fIerrno\fP
+to 0, then call \fIwcstol\fP() or \fIwcstoll\fP(), then
+check \fIerrno\fP.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the converted
+value, if any. If no conversion could be performed, 0
+shall be returned and \fIerrno\fP may be set to indicate the error.
+If the correct value is outside the range of representable values,
+{LONG_MIN}, {LONG_MAX}, {LLONG_MIN}, or {LLONG_MAX} shall
+be returned (according to the sign of the value), and \fIerrno\fP
+set to [ERANGE].
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+.B EINVAL
+The value of \fIbase\fP is not supported.
+.TP 7
+.B ERANGE
+The value to be returned is not representable.
+.sp
+.LP
+These functions may fail if:
+.TP 7
+.B EINVAL
+No
+conversion could be performed.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIiswalpha\fP(), \fIscanf\fP(), \fIwcstod\fP(), the Base Definitions
+volume of IEEE\ Std\ 1003.1-2001, \fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wcstold.3p b/man-pages-posix-2003/man3p/wcstold.3p
new file mode 100644
index 0000000..d7b3247
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wcstold.3p
@@ -0,0 +1 @@
+.so man3p/wcstod.3p
diff --git a/man-pages-posix-2003/man3p/wcstoll.3p b/man-pages-posix-2003/man3p/wcstoll.3p
new file mode 100644
index 0000000..2a8f17a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wcstoll.3p
@@ -0,0 +1 @@
+.so man3p/wcstol.3p
diff --git a/man-pages-posix-2003/man3p/wcstombs.3p b/man-pages-posix-2003/man3p/wcstombs.3p
new file mode 100644
index 0000000..d6ca0d4
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wcstombs.3p
@@ -0,0 +1,92 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WCSTOMBS" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wcstombs
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wcstombs \- convert a wide-character string to a character string
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+size_t wcstombs(char *restrict\fP \fIs\fP\fB, const wchar_t *restrict\fP
+\fIpwcs\fP\fB,
+.br
+\ \ \ \ \ \ size_t\fP \fIn\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwcstombs\fP() function shall convert the sequence of wide-character
+codes that are in the array pointed to by
+\fIpwcs\fP into a sequence of characters that begins in the initial
+shift state and store these characters into the array pointed
+to by \fIs\fP, stopping if a character would exceed the limit of \fIn\fP
+total bytes or if a null byte is stored. Each
+wide-character code shall be converted as if by a call to \fIwctomb\fP(),
+except that the
+shift state of \fIwctomb\fP() shall not be affected.
+.LP
+The behavior of this function shall be affected by the \fILC_CTYPE\fP
+category of the current locale.
+.LP
+No more than \fIn\fP bytes shall be modified in the array pointed
+to by \fIs\fP. If copying takes place between objects that
+overlap, the behavior is undefined. If \fIs\fP is a null pointer,
+\fIwcstombs\fP() shall return the length required to convert
+the entire array regardless of the value of \fIn\fP, but no values
+are stored.
+.LP
+The \fIwcstombs\fP() function need not be reentrant. A function that
+is not required to be reentrant is not required to be
+thread-safe.
+.SH RETURN VALUE
+.LP
+If a wide-character code is encountered that does not correspond to
+a valid character (of one or more bytes each),
+\fIwcstombs\fP() shall return (\fBsize_t\fP)-1. Otherwise, \fIwcstombs\fP()
+shall return the number of bytes stored in the
+character array, not including any terminating null byte. The array
+shall not be null-terminated if the value returned is
+\fIn\fP.
+.SH ERRORS
+.LP
+The \fIwcstombs\fP() function may fail if:
+.TP 7
+.B EILSEQ
+A
+wide-character code does not correspond to a valid character.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fImblen\fP(), \fImbtowc\fP(), \fImbstowcs\fP(), \fIwctomb\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wcstoul.3p b/man-pages-posix-2003/man3p/wcstoul.3p
new file mode 100644
index 0000000..1257c63
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wcstoul.3p
@@ -0,0 +1,164 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WCSTOUL" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wcstoul
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wcstoul, wcstoull \- convert a wide-character string to an unsigned
+long
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+unsigned long wcstoul(const wchar_t *restrict\fP \fInptr\fP\fB,
+.br
+\ \ \ \ \ \ wchar_t **restrict\fP \fIendptr\fP\fB, int\fP \fIbase\fP\fB);
+.br
+unsigned long long wcstoull(const wchar_t *restrict\fP \fInptr\fP\fB,
+.br
+\ \ \ \ \ \ wchar_t **restrict\fP \fIendptr\fP\fB, int\fP \fIbase\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwcstoul\fP() and \fIwcstoull\fP() functions shall convert the
+initial portion of the wide-character string pointed to
+by \fInptr\fP to \fBunsigned long\fP and \fBunsigned long long\fP
+representation, respectively. First, they shall decompose the
+input wide-character string into three parts:
+.IP " 1." 4
+An initial, possibly empty, sequence of white-space wide-character
+codes (as specified by \fIiswspace\fP())
+.LP
+.IP " 2." 4
+A subject sequence interpreted as an integer represented in some radix
+determined by the value of \fIbase\fP
+.LP
+.IP " 3." 4
+A final wide-character string of one or more unrecognized wide-character
+codes, including the terminating null wide-character
+code of the input wide-character string
+.LP
+.LP
+Then they shall attempt to convert the subject sequence to an unsigned
+integer, and return the result.
+.LP
+If \fIbase\fP is 0, the expected form of the subject sequence is that
+of a decimal constant, octal constant, or hexadecimal
+constant, any of which may be preceded by a \fB'+'\fP or \fB'-'\fP
+sign. A decimal constant begins with a non-zero digit, and
+consists of a sequence of decimal digits. An octal constant consists
+of the prefix \fB'0'\fP optionally followed by a sequence
+of the digits \fB'0'\fP to \fB'7'\fP only. A hexadecimal constant
+consists of the prefix 0x or 0X followed by a sequence of
+the decimal digits and letters \fB'a'\fP (or \fB'A'\fP ) to \fB'f'\fP
+(or \fB'F'\fP ) with values 10 to 15
+respectively.
+.LP
+If the value of \fIbase\fP is between 2 and 36, the expected form
+of the subject sequence is a sequence of letters and digits
+representing an integer with the radix specified by \fIbase\fP, optionally
+preceded by a \fB'+'\fP or \fB'-'\fP sign, but
+not including an integer suffix. The letters from \fB'a'\fP (or \fB'A'\fP
+) to \fB'z'\fP (or \fB'Z'\fP ) inclusive are
+ascribed the values 10 to 35; only letters whose ascribed values are
+less than that of \fIbase\fP shall be permitted. If the value
+of \fIbase\fP is 16, the wide-character codes 0x or 0X may optionally
+precede the sequence of letters and digits, following the
+sign if present.
+.LP
+The subject sequence is defined as the longest initial subsequence
+of the input wide-character string, starting with the first
+wide-character code that is not white space and is of the expected
+form. The subject sequence contains no wide-character codes if
+the input wide-character string is empty or consists entirely of white-space
+wide-character codes, or if the first wide-character
+code that is not white space is other than a sign or a permissible
+letter or digit.
+.LP
+If the subject sequence has the expected form and \fIbase\fP is 0,
+the sequence of wide-character codes starting with the first
+digit shall be interpreted as an integer constant. If the subject
+sequence has the expected form and the value of \fIbase\fP is
+between 2 and 36, it shall be used as the base for conversion, ascribing
+to each letter its value as given above. If the subject
+sequence begins with a minus sign, the value resulting from the conversion
+shall be negated. A pointer to the final wide-character
+string shall be stored in the object pointed to by \fIendptr\fP, provided
+that \fIendptr\fP is not a null pointer.
+.LP
+In other than the C or POSIX locales, other
+implementation-defined subject sequences may be accepted.
+.LP
+If the subject sequence is empty or does not have the expected form,
+no conversion shall be performed; the value of \fInptr\fP
+shall be stored in the object pointed to by \fIendptr\fP, provided
+that \fIendptr\fP is not a null pointer.
+.LP
+The
+\fIwcstoul\fP() function shall not change the setting of \fIerrno\fP
+if successful.
+.LP
+Since 0, {ULONG_MAX}, and {ULLONG_MAX} are returned on error and 0
+is also a valid return on success, an application wishing to
+check for error situations should set \fIerrno\fP to 0, then call
+\fIwcstoul\fP() or \fIwcstoull\fP(), then check \fIerrno\fP.
+.SH RETURN VALUE
+.LP
+Upon successful completion, the \fIwcstoul\fP() and \fIwcstoull\fP()
+functions shall return the converted value, if any. If no
+conversion could be performed, 0 shall be returned and \fIerrno\fP
+may be set to indicate the error. If the correct value is outside
+the range of representable values,
+{ULONG_MAX} or {ULLONG_MAX} respectively shall be returned and \fIerrno\fP
+set to [ERANGE].
+.SH ERRORS
+.LP
+These functions shall fail if:
+.TP 7
+.B EINVAL
+The value of \fIbase\fP is not supported.
+.TP 7
+.B ERANGE
+The value to be returned is not representable.
+.sp
+.LP
+These functions may fail if:
+.TP 7
+.B EINVAL
+No
+conversion could be performed.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIiswalpha\fP(), \fIscanf\fP(), \fIwcstod\fP(), \fIwcstol\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wcstoull.3p b/man-pages-posix-2003/man3p/wcstoull.3p
new file mode 100644
index 0000000..3c699d0
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wcstoull.3p
@@ -0,0 +1 @@
+.so man3p/wcstoul.3p
diff --git a/man-pages-posix-2003/man3p/wcstoumax.3p b/man-pages-posix-2003/man3p/wcstoumax.3p
new file mode 100644
index 0000000..990ecdc
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wcstoumax.3p
@@ -0,0 +1 @@
+.so man3p/wcstoimax.3p
diff --git a/man-pages-posix-2003/man3p/wcswcs.3p b/man-pages-posix-2003/man3p/wcswcs.3p
new file mode 100644
index 0000000..9db422f
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wcswcs.3p
@@ -0,0 +1,68 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WCSWCS" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wcswcs
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wcswcs \- find a wide substring (\fBLEGACY\fP)
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+wchar_t *wcswcs(const wchar_t *\fP\fIws1\fP\fB, const wchar_t *\fP\fIws2\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwcswcs\fP() function shall locate the first occurrence in the
+wide-character string pointed to by \fIws1\fP of the
+sequence of wide-character codes (excluding the terminating null wide-character
+code) in the wide-character string pointed to by
+\fIws2\fP.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIwcswcs\fP() shall return a pointer
+to the located wide-character string or a null pointer if the
+wide-character string is not found.
+.LP
+If \fIws2\fP points to a wide-character string with zero length, the
+function shall return \fIws1\fP.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+This function was not included in the final ISO/IEC\ 9899:1990/Amendment
+1:1995 (E). Application developers are strongly
+encouraged to use the \fIwcsstr\fP() function instead.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+This function may be withdrawn in a future version.
+.SH SEE ALSO
+.LP
+\fIwcschr\fP(), \fIwcsstr\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wcswidth.3p b/man-pages-posix-2003/man3p/wcswidth.3p
new file mode 100644
index 0000000..a4c1c56
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wcswidth.3p
@@ -0,0 +1,68 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WCSWIDTH" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wcswidth
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wcswidth \- number of column positions of a wide-character string
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+int wcswidth(const wchar_t *\fP\fIpwcs\fP\fB, size_t\fP \fIn\fP\fB);
+\fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwcswidth\fP() function shall determine the number of column
+positions required for \fIn\fP wide-character codes (or
+fewer than \fIn\fP wide-character codes if a null wide-character code
+is encountered before \fIn\fP wide-character codes are
+exhausted) in the string pointed to by \fIpwcs\fP.
+.SH RETURN VALUE
+.LP
+The \fIwcswidth\fP() function either shall return 0 (if \fIpwcs\fP
+points to a null wide-character code), or return the number
+of column positions to be occupied by the wide-character string pointed
+to by \fIpwcs\fP, or return -1 (if any of the first
+\fIn\fP wide-character codes in the wide-character string pointed
+to by \fIpwcs\fP is not a printable wide-character code).
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+This function was removed from the final ISO/IEC\ 9899:1990/Amendment
+1:1995 (E), and the return value for a non-printable
+wide character is not specified.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIwcwidth\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+Section 3.103, Column Position, \fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wcsxfrm.3p b/man-pages-posix-2003/man3p/wcsxfrm.3p
new file mode 100644
index 0000000..42c8e38
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wcsxfrm.3p
@@ -0,0 +1,98 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WCSXFRM" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wcsxfrm
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wcsxfrm \- wide-character string transformation
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+size_t wcsxfrm(wchar_t *restrict\fP \fIws1\fP\fB, const wchar_t *restrict\fP
+\fIws2\fP\fB,
+.br
+\ \ \ \ \ \ size_t\fP \fIn\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwcsxfrm\fP() function shall transform the wide-character string
+pointed to by \fIws2\fP and place the resulting
+wide-character string into the array pointed to by \fIws1\fP. The
+transformation shall be such that if \fIwcscmp\fP() is applied to
+two transformed wide strings, it shall return a value greater than,
+equal to, or less than 0, corresponding to the result of \fIwcscoll\fP()
+applied to the
+same two original wide-character strings. No more than \fIn\fP wide-character
+codes shall be placed into the resulting array
+pointed to by \fIws1\fP, including the terminating null wide-character
+code. If \fIn\fP is 0, \fIws1\fP is permitted to be a
+null pointer. If copying takes place between objects that overlap,
+the behavior is undefined.
+.LP
+The
+\fIwcsxfrm\fP() function shall not change the setting of \fIerrno\fP
+if successful.
+.LP
+Since no return value is reserved to indicate an error, an application
+wishing to check for error situations should set
+\fIerrno\fP to 0, then call \fIwcsxfrm\fP(), then check \fIerrno\fP.
+.SH RETURN VALUE
+.LP
+The \fIwcsxfrm\fP() function shall return the length of the transformed
+wide-character string (not including the terminating
+null wide-character code). If the value returned is \fIn\fP or more,
+the contents of the array pointed to by \fIws1\fP are
+unspecified.
+.LP
+On
+error, the \fIwcsxfrm\fP() function may set \fIerrno\fP, but no return
+value is reserved to indicate an error.
+.SH ERRORS
+.LP
+The \fIwcsxfrm\fP() function may fail if:
+.TP 7
+.B EINVAL
+The wide-character string pointed to by \fIws2\fP contains wide-character
+codes outside the domain of the collating sequence.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The transformation function is such that two transformed wide-character
+strings can be ordered by \fIwcscmp\fP() as appropriate to collating
+sequence information in the program's locale (category
+\fILC_COLLATE ).\fP
+.LP
+The fact that when \fIn\fP is 0 \fIws1\fP is permitted to be a null
+pointer is useful to determine the size of the \fIws1\fP
+array prior to making the transformation.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIwcscmp\fP(), \fIwcscoll\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wctob.3p b/man-pages-posix-2003/man3p/wctob.3p
new file mode 100644
index 0000000..a0eaf0b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wctob.3p
@@ -0,0 +1,67 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WCTOB" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wctob
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wctob \- wide-character to single-byte conversion
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+#include <wchar.h>
+.br
+.sp
+int wctob(wint_t\fP \fIc\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwctob\fP() function shall determine whether \fIc\fP corresponds
+to a member of the extended character set whose
+character representation is a single byte when in the initial shift
+state.
+.LP
+The behavior of this function shall be affected by the \fILC_CTYPE\fP
+category of the current locale.
+.SH RETURN VALUE
+.LP
+The \fIwctob\fP() function shall return EOF if \fIc\fP does not correspond
+to a character with length one in the initial shift
+state. Otherwise, it shall return the single-byte representation of
+that character as an \fBunsigned char\fP converted to
+\fBint\fP.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIbtowc\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wctomb.3p b/man-pages-posix-2003/man3p/wctomb.3p
new file mode 100644
index 0000000..e112de2
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wctomb.3p
@@ -0,0 +1,95 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WCTOMB" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wctomb
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wctomb \- convert a wide-character code to a character
+.SH SYNOPSIS
+.LP
+\fB#include <stdlib.h>
+.br
+.sp
+int wctomb(char *\fP\fIs\fP\fB, wchar_t\fP \fIwchar\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwctomb\fP() function shall determine the number of bytes needed
+to represent the character corresponding to the
+wide-character code whose value is \fIwchar\fP (including any change
+in the shift state). It shall store the character
+representation (possibly multiple bytes and any special bytes to change
+shift state) in the array object pointed to by \fIs\fP (if
+\fIs\fP is not a null pointer). At most {MB_CUR_MAX} bytes shall be
+stored. If \fIwchar\fP is 0, a null byte shall be stored,
+preceded by any shift sequence needed to restore the initial shift
+state, and \fIwctomb\fP() shall be left in the initial shift
+state.
+.LP
+The
+behavior of this function is affected by the \fILC_CTYPE\fP category
+of the current locale. For a state-dependent encoding, this
+function shall be placed into its initial state by a call for which
+its character pointer argument, \fIs\fP, is a null pointer.
+Subsequent calls with \fIs\fP as other than a null pointer shall cause
+the internal state of the function to be altered as
+necessary. A call with \fIs\fP as a null pointer shall cause this
+function to return a non-zero value if encodings have state
+dependency, and 0 otherwise. Changing the \fILC_CTYPE\fP category
+causes the shift state of this function to be unspecified.
+.LP
+The \fIwctomb\fP() function need not be reentrant. A function that
+is not required to be reentrant is not required to be
+thread-safe.
+.LP
+The implementation shall behave as if no function defined in this
+volume of IEEE\ Std\ 1003.1-2001 calls
+\fIwctomb\fP().
+.SH RETURN VALUE
+.LP
+If \fIs\fP is a null pointer, \fIwctomb\fP() shall return a non-zero
+or 0 value, if character encodings, respectively, do or
+do not have state-dependent encodings. If \fIs\fP is not a null pointer,
+\fIwctomb\fP() shall return -1 if the value of
+\fIwchar\fP does not correspond to a valid character, or return the
+number of bytes that constitute the character corresponding to
+the value of \fIwchar\fP.
+.LP
+In no case shall the value returned be greater than the value of the
+{MB_CUR_MAX} macro.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fImblen\fP(), \fImbtowc\fP(), \fImbstowcs\fP(), \fIwcstombs\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<stdlib.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wctrans.3p b/man-pages-posix-2003/man3p/wctrans.3p
new file mode 100644
index 0000000..ebe699a
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wctrans.3p
@@ -0,0 +1,79 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WCTRANS" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wctrans
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wctrans \- define character mapping
+.SH SYNOPSIS
+.LP
+\fB#include <wctype.h>
+.br
+.sp
+wctrans_t wctrans(const char *\fP\fIcharclass\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwctrans\fP() function is defined for valid character mapping
+names identified in the current locale. The
+\fIcharclass\fP is a string identifying a generic character mapping
+name for which codeset-specific information is required. The
+following character mapping names are defined in all locales: \fBtolower\fP
+and \fBtoupper\fP.
+.LP
+The function shall return a value of type \fBwctrans_t\fP, which can
+be used as the second argument to subsequent calls of \fItowctrans\fP().
+The \fIwctrans\fP() function shall determine values of \fBwctrans_t\fP
+according to the rules of the coded character set defined by character
+mapping information in the program's locale (category
+\fILC_CTYPE ).\fP The values returned by \fIwctrans\fP() shall be
+valid until a call to \fIsetlocale\fP() that modifies the category
+\fILC_CTYPE\fP.
+.SH RETURN VALUE
+.LP
+The \fIwctrans\fP() function shall return 0 and may set \fIerrno\fP
+to indicate the error if the given character mapping name is not
+valid for the current
+locale (category \fILC_CTYPE );\fP otherwise, it shall return a non-zero
+object of type \fBwctrans_t\fP that can be used in calls
+to \fItowctrans\fP().
+.SH ERRORS
+.LP
+The \fIwctrans\fP() function may fail if:
+.TP 7
+.B EINVAL
+The character mapping name pointed to by \fIcharclass\fP is not valid
+in the current locale.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fItowctrans\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<wctype.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wctype.3p b/man-pages-posix-2003/man3p/wctype.3p
new file mode 100644
index 0000000..a14f169
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wctype.3p
@@ -0,0 +1,114 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WCTYPE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wctype
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wctype \- define character class
+.SH SYNOPSIS
+.LP
+\fB#include <wctype.h>
+.br
+.sp
+wctype_t wctype(const char *\fP\fIproperty\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwctype\fP() function is defined for valid character class names
+as defined in the current locale. The \fIproperty\fP
+argument is a string identifying a generic character class for which
+codeset-specific type information is required. The following
+character class names shall be defined in all locales:
+.TS C
+center; lw(26) lw(26) lw(26).
+T{
+\fB
+.br
+alnum
+.br
+alpha
+.br
+blank
+.br
+cntrl
+.br
+\fP
+T} T{
+\fB
+.br
+digit
+.br
+graph
+.br
+lower
+.br
+print
+.br
+\fP
+T} T{
+\fB
+.br
+punct
+.br
+space
+.br
+upper
+.br
+xdigit
+.br
+\fP
+T}
+.TE
+.LP
+Additional character class names defined in the locale definition
+file (category \fILC_CTYPE )\fP can also be specified.
+.LP
+The function shall return a value of type \fBwctype_t\fP, which can
+be used as the second argument to subsequent calls of \fIiswctype\fP().
+The \fIwctype\fP() function shall determine values of \fBwctype_t\fP
+according to the rules of the coded character set defined by character
+type information in the program's locale (category
+\fILC_CTYPE ).\fP The values returned by \fIwctype\fP() shall be valid
+until a call to \fIsetlocale\fP() that modifies the category \fILC_CTYPE
+\&.\fP
+.SH RETURN VALUE
+.LP
+The \fIwctype\fP() function shall return 0 if the given character
+class name is not valid for the current locale (category
+\fILC_CTYPE );\fP otherwise, it shall return an object of type \fBwctype_t\fP
+that can be used in calls to \fIiswctype\fP().
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIiswctype\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<wctype.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wcwidth.3p b/man-pages-posix-2003/man3p/wcwidth.3p
new file mode 100644
index 0000000..5ecd6ad
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wcwidth.3p
@@ -0,0 +1,66 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WCWIDTH" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wcwidth
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wcwidth \- number of column positions of a wide-character code
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+int wcwidth(wchar_t\fP \fIwc\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwcwidth\fP() function shall determine the number of column
+positions required for the wide character \fIwc\fP. The
+application shall ensure that the value of \fIwc\fP is a character
+representable as a \fBwchar_t\fP, and is a wide-character code
+corresponding to a valid character in the current locale.
+.SH RETURN VALUE
+.LP
+The \fIwcwidth\fP() function shall either return 0 (if \fIwc\fP is
+a null wide-character code), or return the number of column
+positions to be occupied by the wide-character code \fIwc\fP, or return
+-1 (if \fIwc\fP does not correspond to a printable
+wide-character code).
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+This function was removed from the final ISO/IEC\ 9899:1990/Amendment
+1:1995 (E), and the return value for a non-printable
+wide character is not specified.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIwcswidth\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wmemchr.3p b/man-pages-posix-2003/man3p/wmemchr.3p
new file mode 100644
index 0000000..3504ac4
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wmemchr.3p
@@ -0,0 +1,69 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WMEMCHR" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wmemchr
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wmemchr \- find a wide character in memory
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+wchar_t *wmemchr(const wchar_t *\fP\fIws\fP\fB, wchar_t\fP \fIwc\fP\fB,
+size_t\fP \fIn\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwmemchr\fP() function shall locate the first occurrence of
+\fIwc\fP in the initial \fIn\fP wide characters of the
+object pointed to by \fIws\fP. This function shall not be affected
+by locale and all \fBwchar_t\fP values shall be treated
+identically. The null wide character and \fBwchar_t\fP values not
+corresponding to valid characters shall not be treated
+specially.
+.LP
+If \fIn\fP is zero, the application shall ensure that \fIws\fP is
+a valid pointer and the function behaves as if no valid
+occurrence of \fIwc\fP is found.
+.SH RETURN VALUE
+.LP
+The \fIwmemchr\fP() function shall return a pointer to the located
+wide character, or a null pointer if the wide character does
+not occur in the object.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIwmemcmp\fP(), \fIwmemcpy\fP(), \fIwmemmove\fP(), \fIwmemset\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wmemcmp.3p b/man-pages-posix-2003/man3p/wmemcmp.3p
new file mode 100644
index 0000000..1e8f09c
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wmemcmp.3p
@@ -0,0 +1,70 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WMEMCMP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wmemcmp
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wmemcmp \- compare wide characters in memory
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+int wmemcmp(const wchar_t *\fP\fIws1\fP\fB, const wchar_t *\fP\fIws2\fP\fB,
+size_t\fP \fIn\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwmemcmp\fP() function shall compare the first \fIn\fP wide
+characters of the object pointed to by \fIws1\fP to the
+first \fIn\fP wide characters of the object pointed to by \fIws2\fP.
+This function shall not be affected by locale and all
+\fBwchar_t\fP values shall be treated identically. The null wide character
+and \fBwchar_t\fP values not corresponding to valid
+characters shall not be treated specially.
+.LP
+If \fIn\fP is zero, the application shall ensure that \fIws1\fP and
+\fIws2\fP are valid pointers, and the function shall
+behave as if the two objects compare equal.
+.SH RETURN VALUE
+.LP
+The \fIwmemcmp\fP() function shall return an integer greater than,
+equal to, or less than zero, respectively, as the object
+pointed to by \fIws1\fP is greater than, equal to, or less than the
+object pointed to by \fIws2\fP.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIwmemchr\fP(), \fIwmemcpy\fP(), \fIwmemmove\fP(), \fIwmemset\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wmemcpy.3p b/man-pages-posix-2003/man3p/wmemcpy.3p
new file mode 100644
index 0000000..3efd01b
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wmemcpy.3p
@@ -0,0 +1,68 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WMEMCPY" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wmemcpy
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wmemcpy \- copy wide characters in memory
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+wchar_t *wmemcpy(wchar_t *restrict\fP \fIws1\fP\fB, const wchar_t
+*restrict\fP \fIws2\fP\fB,
+.br
+\ \ \ \ \ \ size_t\fP \fIn\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwmemcpy\fP() function shall copy \fIn\fP wide characters from
+the object pointed to by \fIws2\fP to the object pointed
+to by \fIws1\fP. This function shall not be affected by locale and
+all \fBwchar_t\fP values shall be treated identically. The
+null wide character and \fBwchar_t\fP values not corresponding to
+valid characters shall not be treated specially.
+.LP
+If \fIn\fP is zero, the application shall ensure that \fIws1\fP and
+\fIws2\fP are valid pointers, and the function shall copy
+zero wide characters.
+.SH RETURN VALUE
+.LP
+The \fIwmemcpy\fP() function shall return the value of \fIws1\fP.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIwmemchr\fP(), \fIwmemcmp\fP(), \fIwmemmove\fP(), \fIwmemset\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wmemmove.3p b/man-pages-posix-2003/man3p/wmemmove.3p
new file mode 100644
index 0000000..deb70fe
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wmemmove.3p
@@ -0,0 +1,73 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WMEMMOVE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wmemmove
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wmemmove \- copy wide characters in memory with overlapping areas
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+wchar_t *wmemmove(wchar_t *\fP\fIws1\fP\fB, const wchar_t *\fP\fIws2\fP\fB,
+size_t\fP \fIn\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwmemmove\fP() function shall copy \fIn\fP wide characters from
+the object pointed to by \fIws2\fP to the object
+pointed to by \fIws1\fP. Copying shall take place as if the \fIn\fP
+wide characters from the object pointed to by \fIws2\fP are
+first copied into a temporary array of \fIn\fP wide characters that
+does not overlap the objects pointed to by \fIws1\fP or
+\fIws2\fP, and then the \fIn\fP wide characters from the temporary
+array are copied into the object pointed to by \fIws1\fP.
+.LP
+This function shall not be affected by locale and all \fBwchar_t\fP
+values shall be treated identically. The null wide
+character and \fBwchar_t\fP values not corresponding to valid characters
+shall not be treated specially.
+.LP
+If \fIn\fP is zero, the application shall ensure that \fIws1\fP and
+\fIws2\fP are valid pointers, and the function shall copy
+zero wide characters.
+.SH RETURN VALUE
+.LP
+The \fIwmemmove\fP() function shall return the value of \fIws1\fP.
+.SH ERRORS
+.LP
+No errors are defined
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIwmemchr\fP(), \fIwmemcmp\fP(), \fIwmemcpy\fP(), \fIwmemset\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wmemset.3p b/man-pages-posix-2003/man3p/wmemset.3p
new file mode 100644
index 0000000..b47dc34
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wmemset.3p
@@ -0,0 +1,66 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WMEMSET" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wmemset
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wmemset \- set wide characters in memory
+.SH SYNOPSIS
+.LP
+\fB#include <wchar.h>
+.br
+.sp
+wchar_t *wmemset(wchar_t *\fP\fIws\fP\fB, wchar_t\fP \fIwc\fP\fB,
+size_t\fP \fIn\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwmemset\fP() function shall copy the value of \fIwc\fP into
+each of the first \fIn\fP wide characters of the object
+pointed to by \fIws\fP. This function shall not be affected by locale
+and all \fBwchar_t\fP values shall be treated identically.
+The null wide character and \fBwchar_t\fP values not corresponding
+to valid characters shall not be treated specially.
+.LP
+If \fIn\fP is zero, the application shall ensure that \fIws\fP is
+a valid pointer, and the function shall copy zero wide
+characters.
+.SH RETURN VALUE
+.LP
+The \fIwmemset\fP() functions shall return the value of \fIws\fP.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIwmemchr\fP(), \fIwmemcmp\fP(), \fIwmemcpy\fP(), \fIwmemmove\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wordexp.3p b/man-pages-posix-2003/man3p/wordexp.3p
new file mode 100644
index 0000000..261b128
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wordexp.3p
@@ -0,0 +1,382 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WORDEXP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" wordexp
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+wordexp, wordfree \- perform word expansions
+.SH SYNOPSIS
+.LP
+\fB#include <wordexp.h>
+.br
+.sp
+int wordexp(const char *restrict\fP \fIwords\fP\fB, wordexp_t *restrict\fP
+\fIpwordexp\fP\fB,
+.br
+\ \ \ \ \ \ int\fP \fIflags\fP\fB);
+.br
+void wordfree(wordexp_t *\fP\fIpwordexp\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwordexp\fP() function shall perform word expansions as described
+in the Shell and Utilities volume of
+IEEE\ Std\ 1003.1-2001, Section 2.6, Word Expansions, subject to
+quoting as in the Shell and Utilities volume of IEEE\ Std\ 1003.1-2001,
+Section 2.2, Quoting, and place the list of expanded words into the
+structure pointed
+to by \fIpwordexp\fP.
+.LP
+The \fIwords\fP argument is a pointer to a string containing one or
+more words to be expanded. The expansions shall be the same
+as would be performed by the command line interpreter if \fIwords\fP
+were the part of a command line representing the arguments to
+a utility. Therefore, the application shall ensure that \fIwords\fP
+does not contain an unquoted <newline> or any of the
+unquoted shell special characters \fB'|'\fP, \fB'&'\fP, \fB';'\fP,
+\fB'<'\fP, \fB'>'\fP except in the
+context of command substitution as specified in the Shell and Utilities
+volume of IEEE\ Std\ 1003.1-2001, Section 2.6.3, Command Substitution.
+It also shall not contain unquoted parentheses
+or braces, except in the context of command or variable substitution.
+The application shall ensure that every member of
+\fIwords\fP which it expects to have expanded by \fIwordexp\fP() does
+not contain an unquoted initial comment character. The
+application shall also ensure that any words which it intends to be
+ignored (because they begin or continue a comment) are deleted
+from \fIwords\fP. If the argument \fIwords\fP contains an unquoted
+comment character (number sign) that is the beginning of a
+token, \fIwordexp\fP() shall either treat the comment character as
+a regular character, or interpret it as a comment indicator and
+ignore the remainder of \fIwords\fP.
+.LP
+The structure type \fBwordexp_t\fP is defined in the \fI<wordexp.h>\fP
+header
+and includes at least the following members:
+.TS C
+center; l1 l1 lw(40).
+\fBMember Type\fP \fBMember Name\fP T{
+.na
+\fBDescription\fP
+.ad
+T}
+\fBsize_t\fP \fIwe_wordc\fP T{
+.na
+Count of words matched by \fIwords\fP.
+.ad
+T}
+\fBchar **\fP \fIwe_wordv\fP T{
+.na
+Pointer to list of expanded words.
+.ad
+T}
+\fBsize_t\fP \fIwe_offs\fP T{
+.na
+Slots to reserve at the beginning of \fIpwordexp\fP->\fIwe_wordv\fP.
+.ad
+T}
+.TE
+.LP
+The \fIwordexp\fP() function shall store the number of generated words
+into \fIpwordexp\fP->\fIwe_wordc\fP and a pointer
+to a list of pointers to words in \fIpwordexp\fP->\fIwe_wordv\fP.
+Each individual field created during field splitting (see
+the Shell and Utilities volume of IEEE\ Std\ 1003.1-2001, Section
+2.6.5, Field Splitting) or pathname expansion (see the Shell and Utilities
+volume of IEEE\ Std\ 1003.1-2001, Section 2.6.6, Pathname Expansion)
+shall be a separate word in the
+\fIpwordexp\fP->\fIwe_wordv\fP list. The words shall be in order as
+described in the Shell and Utilities volume of
+IEEE\ Std\ 1003.1-2001, Section 2.6, Word Expansions. The first
+pointer after the last word pointer shall be a null pointer. The expansion
+of special parameters described in the Shell and
+Utilities volume of IEEE\ Std\ 1003.1-2001, Section 2.5.2, Special
+Parameters is unspecified.
+.LP
+It is the caller's responsibility to allocate the storage pointed
+to by \fIpwordexp\fP. The \fIwordexp\fP() function shall
+allocate other space as needed, including memory pointed to by \fIpwordexp\fP->\fIwe_wordv\fP.
+The \fIwordfree\fP() function
+frees any memory associated with \fIpwordexp\fP from a previous call
+to \fIwordexp\fP().
+.LP
+The \fIflags\fP argument is used to control the behavior of \fIwordexp\fP().
+The value of \fIflags\fP is the
+bitwise-inclusive OR of zero or more of the following constants, which
+are defined in \fI<wordexp.h>\fP:
+.TP 7
+WRDE_APPEND
+Append words generated to the ones from a previous call to \fIwordexp\fP().
+.TP 7
+WRDE_DOOFFS
+Make use of \fIpwordexp\fP->\fIwe_offs\fP. If this flag is set, \fIpwordexp\fP->\fIwe_offs\fP
+is used to specify how
+many null pointers to add to the beginning of \fIpwordexp\fP->\fIwe_wordv\fP.
+In other words,
+\fIpwordexp\fP->\fIwe_wordv\fP shall point to \fIpwordexp\fP->\fIwe_offs\fP
+null pointers, followed by
+\fIpwordexp\fP->\fIwe_wordc\fP word pointers, followed by a null pointer.
+.TP 7
+WRDE_NOCMD
+If the implementation supports the utilities defined in the Shell
+and Utilities volume of IEEE\ Std\ 1003.1-2001, fail
+if command substitution, as specified in the Shell and Utilities volume
+of IEEE\ Std\ 1003.1-2001, Section 2.6.3, Command Substitution, is
+requested.
+.TP 7
+WRDE_REUSE
+The \fIpwordexp\fP argument was passed to a previous successful call
+to \fIwordexp\fP(), and has not been passed to
+\fIwordfree\fP(). The result shall be the same as if the application
+had called \fIwordfree\fP() and then called \fIwordexp\fP()
+without WRDE_REUSE.
+.TP 7
+WRDE_SHOWERR
+Do not redirect \fIstderr\fP to \fB/dev/null\fP.
+.TP 7
+WRDE_UNDEF
+Report error on an attempt to expand an undefined shell variable.
+.sp
+.LP
+The WRDE_APPEND flag can be used to append a new set of words to those
+generated by a previous call to \fIwordexp\fP(). The
+following rules apply to applications when two or more calls to \fIwordexp\fP()
+are made with the same value of \fIpwordexp\fP
+and without intervening calls to \fIwordfree\fP():
+.IP " 1." 4
+The first such call shall not set WRDE_APPEND. All subsequent calls
+shall set it.
+.LP
+.IP " 2." 4
+All of the calls shall set WRDE_DOOFFS, or all shall not set it.
+.LP
+.IP " 3." 4
+After the second and each subsequent call, \fIpwordexp\fP->\fIwe_wordv\fP
+shall point to a list containing the
+following:
+.RS
+.IP " a." 4
+Zero or more null pointers, as specified by WRDE_DOOFFS and \fIpwordexp\fP->\fIwe_offs\fP
+.LP
+.IP " b." 4
+Pointers to the words that were in the \fIpwordexp\fP->\fIwe_wordv\fP
+list before the call, in the same order as before
+.LP
+.IP " c." 4
+Pointers to the new words generated by the latest call, in the specified
+order
+.LP
+.RE
+.LP
+.IP " 4." 4
+The count returned in \fIpwordexp\fP->\fIwe_wordc\fP shall be the
+total number of words from all of the calls.
+.LP
+.IP " 5." 4
+The application can change any of the fields after a call to \fIwordexp\fP(),
+but if it does it shall reset them to the
+original value before a subsequent call, using the same \fIpwordexp\fP
+value, to \fIwordfree\fP() or \fIwordexp\fP() with the
+WRDE_APPEND or WRDE_REUSE flag.
+.LP
+.LP
+If the implementation supports the utilities defined in the Shell
+and Utilities volume of IEEE\ Std\ 1003.1-2001, and
+\fIwords\fP contains an unquoted character- <newline>, \fB'|'\fP,
+\fB'&'\fP, \fB';'\fP, \fB'<'\fP,
+\fB'>'\fP, \fB'('\fP, \fB')'\fP, \fB'{'\fP, \fB'}'\fP - in an
+inappropriate context, \fIwordexp\fP() shall
+fail, and the number of expanded words shall be 0.
+.LP
+Unless WRDE_SHOWERR is set in \fIflags\fP, \fIwordexp\fP() shall redirect
+\fIstderr\fP to \fB/dev/null\fP for any utilities
+executed as a result of command substitution while expanding \fIwords\fP.
+If WRDE_SHOWERR is set, \fIwordexp\fP() may write
+messages to \fIstderr\fP if syntax errors are detected while expanding
+\fIwords\fP.
+.LP
+The application shall ensure that if WRDE_DOOFFS is set, then \fIpwordexp\fP->\fIwe_offs\fP
+has the same value for each
+\fIwordexp\fP() call and \fIwordfree\fP() call using a given \fIpwordexp\fP.
+.LP
+The following constants are defined as error return values:
+.TP 7
+WRDE_BADCHAR
+One of the unquoted characters- <newline>, \fB'|'\fP, \fB'&'\fP,
+\fB';'\fP, \fB'<'\fP,
+\fB'>'\fP, \fB'('\fP, \fB')'\fP, \fB'{'\fP, \fB'}'\fP - appears
+in \fIwords\fP in an inappropriate
+context.
+.TP 7
+WRDE_BADVAL
+Reference to undefined shell variable when WRDE_UNDEF is set in \fIflags\fP.
+.TP 7
+WRDE_CMDSUB
+Command substitution requested when WRDE_NOCMD was set in \fIflags\fP.
+.TP 7
+WRDE_NOSPACE
+Attempt to allocate memory failed.
+.TP 7
+WRDE_SYNTAX
+Shell syntax error, such as unbalanced parentheses or unterminated
+string.
+.sp
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIwordexp\fP() shall return 0. Otherwise,
+a non-zero value, as described in \fI<wordexp.h>\fP, shall be returned
+to indicate an error. If \fIwordexp\fP() returns the
+value WRDE_NOSPACE, then \fIpwordexp\fP->\fIwe_wordc\fP and \fIpwordexp\fP->\fIwe_wordv\fP
+shall be updated to reflect
+any words that were successfully expanded. In other cases, they shall
+not be modified.
+.LP
+The \fIwordfree\fP() function shall not return a value.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+The \fIwordexp\fP() function is intended to be used by an application
+that wants to do all of the shell's expansions on a word
+or words obtained from a user. For example, if the application prompts
+for a filename (or list of filenames) and then uses
+\fIwordexp\fP() to process the input, the user could respond with
+anything that would be valid as input to the shell.
+.LP
+The WRDE_NOCMD flag is provided for applications that, for security
+or other reasons, want to prevent a user from executing
+shell commands. Disallowing unquoted shell special characters also
+prevents unwanted side effects, such as executing a command or
+writing a file.
+.SH RATIONALE
+.LP
+This function was included as an alternative to \fIglob\fP(). There
+had been continuing
+controversy over exactly what features should be included in \fIglob\fP().
+It is hoped that
+by providing \fIwordexp\fP() (which provides all of the shell word
+expansions, but which may be slow to execute) and \fIglob\fP() (which
+is faster, but which only performs pathname expansion, without tilde
+or parameter
+expansion) this will satisfy the majority of applications.
+.LP
+While \fIwordexp\fP() could be implemented entirely as a library routine,
+it is expected that most implementations run a shell
+in a subprocess to do the expansion.
+.LP
+Two different approaches have been proposed for how the required information
+might be presented to the shell and the results
+returned. They are presented here as examples.
+.LP
+One proposal is to extend the \fIecho\fP utility by adding a \fB-q\fP
+option. This option
+would cause \fIecho\fP to add a backslash before each backslash and
+<blank> that occurs
+within an argument. The \fIwordexp\fP() function could then invoke
+the shell as follows:
+.sp
+.RS
+.nf
+
+\fB(void) strcpy(buffer, "echo -q");
+(void) strcat(buffer,\fP \fIwords\fP\fB);
+if ((flags & WRDE_SHOWERR) == 0)
+ (void) strcat(buffer, "2>/dev/null");
+f = popen(buffer, "r");
+\fP
+.fi
+.RE
+.LP
+The \fIwordexp\fP() function would read the resulting output, remove
+unquoted backslashes, and break into words at unquoted
+<blank>s. If the WRDE_NOCMD flag was set, \fIwordexp\fP() would have
+to scan \fIwords\fP before starting the subshell to
+make sure that there would be no command substitution. In any case,
+it would have to scan \fIwords\fP for unquoted special
+characters.
+.LP
+Another proposal is to add the following options to \fIsh\fP:
+.TP 7
+\fB-w\fP\ \fIwordlist\fP
+.sp
+This option provides a wordlist expansion service to applications.
+The words in \fIwordlist\fP shall be expanded and the following
+written to standard output:
+.RS
+.IP " 1." 4
+The count of the number of words after expansion, in decimal, followed
+by a null byte
+.LP
+.IP " 2." 4
+The number of bytes needed to represent the expanded words (not including
+null separators), in decimal, followed by a null
+byte
+.LP
+.IP " 3." 4
+The expanded words, each terminated by a null byte
+.LP
+.RE
+.LP
+If an error is encountered during word expansion, \fIsh\fP exits with
+a non-zero status
+after writing the former to report any words successfully expanded
+.TP 7
+\fB-P\fP
+Run in "protected" mode. If specified with the \fB-w\fP option, no
+command substitution shall be performed.
+.sp
+.LP
+With these options, \fIwordexp\fP() could be implemented fairly simply
+by creating a subprocess using \fIfork\fP() and executing \fIsh\fP
+using the line:
+.sp
+.RS
+.nf
+
+\fBexecl(<\fP\fIshell path\fP\fB>, "sh", "-P", "-w",\fP \fIwords\fP\fB, (char *)0);
+\fP
+.fi
+.RE
+.LP
+after directing standard error to \fB/dev/null\fP.
+.LP
+It seemed objectionable for a library routine to write messages to
+standard error, unless explicitly requested, so
+\fIwordexp\fP() is required to redirect standard error to \fB/dev/null\fP
+to ensure that no messages are generated, even for
+commands executed for command substitution. The WRDE_SHOWERR flag
+can be specified to request that error messages be written.
+.LP
+The WRDE_REUSE flag allows the implementation to avoid the expense
+of freeing and reallocating memory, if that is possible. A
+minimal implementation can call \fIwordfree\fP() when WRDE_REUSE is
+set.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfnmatch\fP(), \fIglob\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<wordexp.h>\fP, the Shell and Utilities
+volume
+of IEEE\ Std\ 1003.1-2001, Chapter 2, Shell Command Language
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wordfree.3p b/man-pages-posix-2003/man3p/wordfree.3p
new file mode 100644
index 0000000..830933f
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wordfree.3p
@@ -0,0 +1 @@
+.so man3p/wordexp.3p
diff --git a/man-pages-posix-2003/man3p/wprintf.3p b/man-pages-posix-2003/man3p/wprintf.3p
new file mode 100644
index 0000000..2fbacca
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wprintf.3p
@@ -0,0 +1,615 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FWPRINTF" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fwprintf
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fwprintf, swprintf, wprintf \- print formatted wide-character output
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+#include <wchar.h>
+.br
+.sp
+int fwprintf(FILE *restrict\fP \fIstream\fP\fB, const wchar_t *restrict\fP
+\fIformat\fP\fB, ...);
+.br
+int swprintf(wchar_t *restrict\fP \fIws\fP\fB, size_t\fP \fIn\fP\fB,
+.br
+\ \ \ \ \ \ const wchar_t *restrict\fP \fIformat\fP\fB, ...);
+.br
+int wprintf(const wchar_t *restrict\fP \fIformat\fP\fB, ...);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfwprintf\fP() function shall place output on the named output
+\fIstream\fP. The \fIwprintf\fP() function shall place
+output on the standard output stream \fIstdout\fP. The \fIswprintf\fP()
+function shall place output followed by the null wide
+character in consecutive wide characters starting at *\fIws\fP; no
+more than \fIn\fP wide characters shall be written, including
+a terminating null wide character, which is always added (unless \fIn\fP
+is zero).
+.LP
+Each of these functions shall convert, format, and print its arguments
+under control of the \fIformat\fP wide-character string.
+The \fIformat\fP is composed of zero or more directives: \fIordinary
+wide-characters\fP, which are simply copied to the output
+stream, and \fIconversion specifications\fP, each of which results
+in the fetching of zero or more arguments. The results are
+undefined if there are insufficient arguments for the \fIformat\fP.
+If the \fIformat\fP is exhausted while arguments remain, the
+excess arguments are evaluated but are otherwise ignored.
+.LP
+Conversions can be applied to the \fIn\fPth argument after the \fIformat\fP
+in the argument list, rather than to the next unused
+argument. In this case, the conversion specifier wide character \fB%\fP
+(see below) is replaced by the sequence \fB"%n$"\fP,
+where \fIn\fP is a decimal integer in the range [1,{NL_ARGMAX}], giving
+the position of the argument in the argument list. This
+feature provides for the definition of \fIformat\fP wide-character
+strings that select arguments in an order appropriate to
+specific languages (see the EXAMPLES section).
+.LP
+The \fIformat\fP can contain either numbered argument specifications
+(that is, \fB"%\fP\fIn\fP\fB$"\fP and
+\fB"*\fP\fIm\fP\fB$"\fP), or unnumbered argument conversion specifications
+(that is, \fB%\fP and \fB*\fP ), but not
+both. The only exception to this is that \fB%%\fP can be mixed with
+the \fB"%\fP\fIn\fP\fB$"\fP form. The results of
+mixing numbered and unnumbered argument specifications in a \fIformat\fP
+wide-character string are undefined. When numbered
+argument specifications are used, specifying the \fIN\fPth argument
+requires that all the leading arguments, from the first to the
+(\fIN\fP-1)th, are specified in the \fIformat\fP wide-character string.
+.LP
+In \fIformat\fP wide-character strings containing the \fB"%\fP\fIn\fP\fB$"\fP
+form of conversion specification, numbered
+arguments in the argument list can be referenced from the \fIformat\fP
+wide-character string as many times as required.
+.LP
+In \fIformat\fP wide-character strings containing the \fB%\fP form
+of conversion specification, each argument in the
+argument list shall be used exactly once.
+.LP
+All
+forms of the \fIfwprintf\fP() function allow for the insertion of
+a locale-dependent radix character in the output string, output
+as a wide-character value. The radix character is defined in the program's
+locale (category \fILC_NUMERIC ).\fP In the POSIX
+locale, or in a locale where the radix character is not defined, the
+radix character shall default to a period ( \fB'.'\fP ).
+.LP
+Each conversion specification is introduced by the \fB'%'\fP wide
+character or by the
+wide-character sequence \fB"%\fP\fIn\fP\fB$"\fP, after
+which the following appear in sequence:
+.IP " *" 3
+Zero or more \fIflags\fP (in any order), which modify the meaning
+of the conversion specification.
+.LP
+.IP " *" 3
+An optional minimum \fIfield width\fP. If the converted value has
+fewer wide characters than the field width, it shall be
+padded with spaces by default on the left; it shall be padded on the
+right, if the left-adjustment flag ( \fB'-'\fP ), described
+below, is given to the field width. The field width takes the form
+of an asterisk ( \fB'*'\fP ), described below, or a decimal
+integer.
+.LP
+.IP " *" 3
+An optional \fIprecision\fP that gives the minimum number of digits
+to appear for the \fBd\fP, \fBi\fP, \fBo\fP,
+\fBu\fP, \fBx\fP, and \fBX\fP conversion specifiers; the number
+of digits to appear after the radix character for the
+\fBa\fP, \fBA\fP, \fBe\fP, \fBE\fP, \fBf\fP, and \fBF\fP conversion
+specifiers; the maximum number of
+significant digits for the \fBg\fP and \fBG\fP conversion specifiers;
+or the maximum number of wide characters to be printed
+from a string in the \fBs\fP conversion specifiers. The precision
+takes the form of a period ( \fB'.'\fP ) followed either by
+an asterisk ( \fB'*'\fP ), described below, or an optional decimal
+digit string, where a null digit string is treated as 0. If a
+precision appears with any other conversion wide character, the behavior
+is undefined.
+.LP
+.IP " *" 3
+An optional length modifier that specifies the size of the argument.
+.LP
+.IP " *" 3
+A \fIconversion specifier\fP wide character that indicates the type
+of conversion to be applied.
+.LP
+.LP
+A field width, or precision, or both, may be indicated by an asterisk
+( \fB'*'\fP ). In this case an argument of type
+\fBint\fP supplies the field width or precision. Applications shall
+ensure that arguments specifying field width, or precision, or
+both appear in that order before the argument, if any, to be converted.
+A negative field width is taken as a \fB'-'\fP flag
+followed by a positive field width. A negative precision is taken
+as if the precision were omitted. In
+\fIformat\fP wide-character strings containing the \fB"%\fP\fIn\fP\fB$"\fP
+form of a conversion specification, a field
+width or precision may be indicated by the sequence \fB"*\fP\fIm\fP\fB$"\fP,
+where \fIm\fP is a decimal integer in the
+range [1,{NL_ARGMAX}] giving the position in the argument list (after
+the \fIformat\fP argument) of an integer argument containing
+the field width or precision, for example:
+.sp
+.RS
+.nf
+
+\fBwprintf(L"%1$d:%2$.*3$d:%4$.*3$d\\n", hour, min, precision, sec);
+\fP
+.fi
+.RE
+.LP
+The flag wide characters and their meanings are:
+.TP 7
+\fB'\fP
+The integer portion of the result of a decimal conversion ( \fB%i\fP,
+\fB%d\fP, \fB%u\fP, \fB%f\fP, \fB%F\fP,
+\fB%g\fP, or \fB%G\fP ) shall be formatted with thousands' grouping
+wide characters. For other conversions, the behavior is
+undefined. The numeric grouping wide character is used.
+.TP 7
+\fB-\fP
+The result of the conversion shall be left-justified within the field.
+The conversion shall be right-justified if this flag is
+not specified.
+.TP 7
+\fB+\fP
+The result of a signed conversion shall always begin with a sign (
+\fB'+'\fP or \fB'-'\fP ). The conversion shall begin
+with a sign only when a negative value is converted if this flag is
+not specified.
+.TP 7
+<space>
+If the first wide character of a signed conversion is not a sign,
+or if a signed conversion results in no wide characters, a
+<space> shall be prefixed to the result. This means that if the <space>
+and \fB'+'\fP flags both appear, the
+<space> flag shall be ignored.
+.TP 7
+\fB#\fP
+Specifies that the value is to be converted to an alternative form.
+For \fBo\fP conversion, it increases the precision (if
+necessary) to force the first digit of the result to be 0. For \fBx\fP
+or \fBX\fP conversion specifiers, a non-zero result
+shall have 0x (or 0X) prefixed to it. For \fBa\fP, \fBA\fP, \fBe\fP,
+\fBE\fP, \fBf\fP, \fBF\fP, \fBg\fP,
+and \fBG\fP conversion specifiers, the result shall always contain
+a radix character, even if no digits follow it. Without
+this flag, a radix character appears in the result of these conversions
+only if a digit follows it. For \fBg\fP and \fBG\fP
+conversion specifiers, trailing zeros shall \fInot\fP be removed from
+the result as they normally are. For other conversion
+specifiers, the behavior is undefined.
+.TP 7
+\fB0\fP
+For \fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP, \fBx\fP, \fBX\fP, \fBa\fP,
+\fBA\fP, \fBe\fP,
+\fBE\fP, \fBf\fP, \fBF\fP, \fBg\fP, and \fBG\fP conversion specifiers,
+leading zeros (following any indication
+of sign or base) are used to pad to the field width; no space padding
+is performed. If the \fB'0'\fP and \fB'-'\fP flags both
+appear, the \fB'0'\fP flag shall be ignored. For \fBd\fP, \fBi\fP,
+\fBo\fP, \fBu\fP, \fBx\fP, and \fBX\fP
+conversion specifiers, if a precision is specified, the \fB'0'\fP
+flag shall be ignored. If the \fB'0'\fP and \fB'"\fP
+flags both appear, the grouping wide characters are inserted before
+zero padding. For other conversions, the behavior is
+undefined.
+.sp
+.LP
+The length modifiers and their meanings are:
+.TP 7
+\fBhh\fP
+Specifies that a following \fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP,
+\fBx\fP, or \fBX\fP conversion specifier
+applies to a \fBsigned char\fP or \fBunsigned char\fP argument (the
+argument will have been promoted according to the integer
+promotions, but its value shall be converted to \fBsigned char\fP
+or \fBunsigned char\fP before printing); or that a following
+\fBn\fP conversion specifier applies to a pointer to a \fBsigned char\fP
+argument.
+.TP 7
+\fBh\fP
+Specifies that a following \fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP,
+\fBx\fP, or \fBX\fP conversion specifier
+applies to a \fBshort\fP or \fBunsigned short\fP argument (the argument
+will have been promoted according to the integer
+promotions, but its value shall be converted to \fBshort\fP or \fBunsigned
+short\fP before printing); or that a following
+\fBn\fP conversion specifier applies to a pointer to a \fBshort\fP
+argument.
+.TP 7
+\fBl\fP\ (ell)
+Specifies that a following \fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP,
+\fBx\fP, or \fBX\fP conversion specifier
+applies to a \fBlong\fP or \fBunsigned long\fP argument; that a following
+\fBn\fP conversion specifier applies to a pointer to
+a \fBlong\fP argument; that a following \fBc\fP conversion specifier
+applies to a \fBwint_t\fP argument; that a following
+\fBs\fP conversion specifier applies to a pointer to a \fBwchar_t\fP
+argument; or has no effect on a following \fBa\fP,
+\fBA\fP, \fBe\fP, \fBE\fP, \fBf\fP, \fBF\fP, \fBg\fP, or \fBG\fP
+conversion specifier.
+.TP 7
+\fBll\fP\ (ell-ell)
+.sp
+Specifies that a following \fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP,
+\fBx\fP, or \fBX\fP conversion specifier
+applies to a \fBlong long\fP or \fBunsigned long long\fP argument;
+or that a following \fBn\fP conversion specifier applies to
+a pointer to a \fBlong long\fP argument.
+.TP 7
+\fBj\fP
+Specifies that a following \fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP,
+\fBx\fP, or \fBX\fP conversion specifier
+applies to an \fBintmax_t\fP or \fBuintmax_t\fP argument; or that
+a following \fBn\fP conversion specifier applies to a
+pointer to an \fBintmax_t\fP argument.
+.TP 7
+\fBz\fP
+Specifies that a following \fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP,
+\fBx\fP, or \fBX\fP conversion specifier
+applies to a \fBsize_t\fP or the corresponding signed integer type
+argument; or that a following \fBn\fP conversion specifier
+applies to a pointer to a signed integer type corresponding to a \fBsize_t\fP
+argument.
+.TP 7
+\fBt\fP
+Specifies that a following \fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP,
+\fBx\fP, or \fBX\fP conversion specifier
+applies to a \fBptrdiff_t\fP or the corresponding \fBunsigned\fP type
+argument; or that a following \fBn\fP conversion
+specifier applies to a pointer to a \fBptrdiff_t\fP argument.
+.TP 7
+\fBL\fP
+Specifies that a following \fBa\fP, \fBA\fP, \fBe\fP, \fBE\fP,
+\fBf\fP, \fBF\fP, \fBg\fP, or
+\fBG\fP conversion specifier applies to a \fBlong double\fP argument.
+.sp
+.LP
+If a length modifier appears with any conversion specifier other than
+as specified above, the behavior is undefined.
+.LP
+The conversion specifiers and their meanings are:
+.TP 7
+\fBd\fP,\ \fBi\fP
+The \fBint\fP argument shall be converted to a signed decimal in the
+style \fB"[-]\fP\fIdddd"\fP. The precision specifies
+the minimum number of digits to appear; if the value being converted
+can be represented in fewer digits, it shall be expanded with
+leading zeros. The default precision shall be 1. The result of converting
+zero with an explicit precision of zero shall be no wide
+characters.
+.TP 7
+\fBo\fP
+The \fBunsigned\fP argument shall be converted to unsigned octal format
+in the style \fB"dddd"\fP . The precision specifies
+the minimum number of digits to appear; if the value being converted
+can be represented in fewer digits, it shall be expanded with
+leading zeros. The default precision shall be 1. The result of converting
+zero with an explicit precision of zero shall be no wide
+characters.
+.TP 7
+\fBu\fP
+The \fBunsigned\fP argument shall be converted to unsigned decimal
+format in the style \fB"dddd"\fP . The precision
+specifies the minimum number of digits to appear; if the value being
+converted can be represented in fewer digits, it shall be
+expanded with leading zeros. The default precision shall be 1. The
+result of converting zero with an explicit precision of zero
+shall be no wide characters.
+.TP 7
+\fBx\fP
+The \fBunsigned\fP argument shall be converted to unsigned hexadecimal
+format in the style \fB"dddd"\fP ; the letters
+\fB"abcdef"\fP are used. The precision specifies the minimum number
+of digits to appear; if the value being converted can be
+represented in fewer digits, it shall be expanded with leading zeros.
+The default precision shall be 1. The result of converting
+zero with an explicit precision of zero shall be no wide characters.
+.TP 7
+\fBX\fP
+Equivalent to the \fBx\fP conversion specifier, except that letters
+\fB"ABCDEF"\fP are used instead of \fB"abcdef"\fP
+\&.
+.TP 7
+\fBf\fP,\ \fBF\fP
+The \fBdouble\fP argument shall be converted to decimal notation in
+the style \fB"[-]\fP\fIddd.ddd"\fP, where the number
+of digits after the radix character shall be equal to the precision
+specification. If the precision is missing, it shall be taken
+as 6; if the precision is explicitly zero and no \fB'#'\fP flag is
+present, no radix character shall appear. If a radix
+character appears, at least one digit shall appear before it. The
+value shall be rounded in an implementation-defined manner to the
+appropriate number of digits.
+.LP
+A \fBdouble\fP argument representing an infinity shall be converted
+in one of the styles \fB"[-]inf"\fP or
+\fB"[-]infinity"\fP ; which style is implementation-defined. A \fBdouble\fP
+argument representing a NaN shall be converted in
+one of the styles \fB"[-]nan"\fP or \fB"[-]nan(\fP\fIn-char-sequence\fP\fB)"\fP;
+which style, and the meaning of any
+\fIn-char-sequence\fP, is implementation-defined. The \fBF\fP conversion
+specifier produces \fB"INF"\fP,
+\fB"INFINITY"\fP, or \fB"NAN"\fP instead of \fB"inf"\fP, \fB"infinity"\fP,
+or \fB"nan"\fP, respectively.
+.TP 7
+\fBe\fP,\ \fBE\fP
+The \fBdouble\fP argument shall be converted in the style \fB"[-]\fP\fId.ddd\fPe\fB\(+-dd"\fP,
+where there shall be
+one digit before the radix character (which is non-zero if the argument
+is non-zero) and the number of digits after it shall be
+equal to the precision; if the precision is missing, it shall be taken
+as 6; if the precision is zero and no \fB'#'\fP flag is
+present, no radix character shall appear. The value shall be rounded
+in an implementation-defined manner to the appropriate number
+of digits. The \fBE\fP conversion wide character shall produce a number
+with \fB'E'\fP instead of \fB'e'\fP introducing
+the exponent. The exponent shall always contain at least two digits.
+If the value is zero, the exponent shall be zero.
+.LP
+A \fBdouble\fP argument representing an infinity or NaN shall be converted
+in the style of an \fBf\fP or \fBF\fP
+conversion specifier.
+.TP 7
+\fBg\fP,\ \fBG\fP
+The \fBdouble\fP argument shall be converted in the style \fBf\fP
+or \fBe\fP (or in the style \fBF\fP or \fBE\fP
+in the case of a \fBG\fP conversion specifier), with the precision
+specifying the number of significant digits. If an explicit
+precision is zero, it shall be taken as 1. The style used depends
+on the value converted; style \fBe\fP (or \fBE\fP ) shall
+be used only if the exponent resulting from such a conversion is less
+than -4 or greater than or equal to the precision. Trailing
+zeros shall be removed from the fractional portion of the result;
+a radix character shall appear only if it is followed by a digit.
+.LP
+A \fBdouble\fP argument representing an infinity or NaN shall be converted
+in the style of an \fBf\fP or \fBF\fP
+conversion specifier.
+.TP 7
+\fBa\fP,\ \fBA\fP
+A \fBdouble\fP argument representing a floating-point number shall
+be converted in the style \fB"[-]0xh.hhhhp\(+-d"\fP,
+where there shall be one hexadecimal digit (which is non-zero if the
+argument is a normalized floating-point number and is
+otherwise unspecified) before the decimal-point wide character and
+the number of hexadecimal digits after it shall be equal to the
+precision; if the precision is missing and FLT_RADIX is a power of
+2, then the precision shall be sufficient for an exact
+representation of the value; if the precision is missing and FLT_RADIX
+is not a power of 2, then the precision shall be sufficient
+to distinguish values of type \fBdouble\fP, except that trailing zeros
+may be omitted; if the precision is zero and the
+\fB'#'\fP flag is not specified, no decimal-point wide character shall
+appear. The letters \fB"abcdef"\fP are used for
+\fBa\fP conversion and the letters \fB"ABCDEF"\fP for \fBA\fP conversion.
+The \fBA\fP conversion specifier produces a
+number with \fB'X'\fP and \fB'P'\fP instead of \fB'x'\fP and \fB'p'\fP
+\&. The exponent shall always contain at least one
+digit, and only as many more digits as necessary to represent the
+decimal exponent of 2. If the value is zero, the exponent shall
+be zero.
+.LP
+A \fBdouble\fP argument representing an infinity or NaN shall be converted
+in the style of an \fBf\fP or \fBF\fP
+conversion specifier.
+.TP 7
+\fBc\fP
+If no \fBl\fP (ell) qualifier is present, the \fBint\fP argument shall
+be converted to a wide character as if by calling
+the \fIbtowc\fP() function and the resulting wide character shall
+be written. Otherwise, the
+\fBwint_t\fP argument shall be converted to \fBwchar_t\fP, and written.
+.TP 7
+\fBs\fP
+If no \fBl\fP (ell) qualifier is present, the application shall ensure
+that the argument is a pointer to a character array
+containing a character sequence beginning in the initial shift state.
+Characters from the array shall be converted as if by
+repeated calls to the \fImbrtowc\fP() function, with the conversion
+state described by an
+\fBmbstate_t\fP object initialized to zero before the first character
+is converted, and written up to (but not including) the
+terminating null wide character. If the precision is specified, no
+more than that many wide characters shall be written. If the
+precision is not specified, or is greater than the size of the array,
+the application shall ensure that the array contains a null
+wide character.
+.LP
+If an \fBl\fP (ell) qualifier is present, the application shall ensure
+that the argument is a pointer to an array of type
+\fBwchar_t\fP. Wide characters from the array shall be written up
+to (but not including) a terminating null wide character. If no
+precision is specified, or is greater than the size of the array,
+the application shall ensure that the array contains a null wide
+character. If a precision is specified, no more than that many wide
+characters shall be written.
+.TP 7
+\fBp\fP
+The application shall ensure that the argument is a pointer to \fBvoid\fP.
+The value of the pointer shall be converted to a
+sequence of printable wide characters in an implementation-defined
+manner.
+.TP 7
+\fBn\fP
+The application shall ensure that the argument is a pointer to an
+integer into which is written the number of wide characters
+written to the output so far by this call to one of the \fIfwprintf\fP()
+functions. No argument shall be converted, but one shall
+be consumed. If the conversion specification includes any flags, a
+field width, or a precision, the behavior is undefined.
+.TP 7
+\fBC\fP
+Equivalent to \fBlc\fP .
+.TP 7
+\fBS\fP
+Equivalent to \fBls\fP .
+.TP 7
+\fB%\fP
+Output a \fB'%'\fP wide character; no argument shall be converted.
+The entire conversion specification shall be \fB%%\fP
+\&.
+.sp
+.LP
+If a conversion specification does not match one of the above forms,
+the behavior is undefined.
+.LP
+In no case does a nonexistent or small field width cause truncation
+of a field; if the result of a conversion is wider than the
+field width, the field shall be expanded to contain the conversion
+result. Characters generated by \fIfwprintf\fP() and
+\fIwprintf\fP() shall be printed as if \fIfputwc\fP() had been called.
+.LP
+For \fBa\fP and \fBA\fP conversions, if FLT_RADIX is not a power of
+2 and the result is not exactly representable in the
+given precision, the result should be one of the two adjacent numbers
+in hexadecimal floating style with the given precision, with
+the extra stipulation that the error should have a correct sign for
+the current rounding direction.
+.LP
+For \fBe\fP, \fBE\fP, \fBf\fP, \fBF\fP, \fBg\fP, and \fBG\fP
+conversion specifiers, if the number of
+significant decimal digits is at most DECIMAL_DIG, then the result
+should be correctly rounded. If the number of significant
+decimal digits is more than DECIMAL_DIG but the source value is exactly
+representable with DECIMAL_DIG digits, then the result
+should be an exact representation with trailing zeros. Otherwise,
+the source value is bounded by two adjacent decimal strings
+\fIL\fP < \fIU\fP, both having DECIMAL_DIG significant digits; the
+value of the resultant decimal string \fID\fP should
+satisfy \fIL\fP <= \fID\fP <= \fIU\fP, with the extra stipulation
+that the error should have a correct sign for the
+current rounding direction.
+.LP
+The
+\fIst_ctime\fP and \fIst_mtime\fP fields of the file shall be marked
+for update between the call to a successful execution of
+\fIfwprintf\fP() or \fIwprintf\fP() and the next successful completion
+of a call to \fIfflush\fP() or \fIfclose\fP() on the same stream,
+or a
+call to \fIexit\fP() or \fIabort\fP().
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the number
+of wide characters transmitted, excluding the terminating
+null wide character in the case of \fIswprintf\fP(), or a negative
+value if an output error was encountered, and set
+\fIerrno\fP to indicate the error.
+.LP
+If \fIn\fP or more wide characters were requested to be written, \fIswprintf\fP()
+shall return a negative value, and set
+\fIerrno\fP to indicate the error.
+.SH ERRORS
+.LP
+For the conditions under which \fIfwprintf\fP() and \fIwprintf\fP()
+fail and may fail, refer to \fIfputwc\fP().
+.LP
+In addition, all forms of \fIfwprintf\fP() may fail if:
+.TP 7
+.B EILSEQ
+A wide-character code that does not correspond to a valid character
+has been detected.
+.TP 7
+.B EINVAL
+There are insufficient arguments.
+.sp
+.LP
+In addition, \fIwprintf\fP() and \fIfwprintf\fP() may fail if:
+.TP 7
+.B ENOMEM
+Insufficient storage space is available.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+To print the language-independent date and time format, the following
+statement could be used:
+.sp
+.RS
+.nf
+
+\fBwprintf(format, weekday, month, day, hour, min);
+\fP
+.fi
+.RE
+.LP
+For American usage, \fIformat\fP could be a pointer to the wide-character
+string:
+.sp
+.RS
+.nf
+
+\fBL"%s, %s %d, %d:%.2d\\n"
+\fP
+.fi
+.RE
+.LP
+producing the message:
+.sp
+.RS
+.nf
+
+\fBSunday, July 3, 10:02
+\fP
+.fi
+.RE
+.LP
+whereas for German usage, \fIformat\fP could be a pointer to the wide-character
+string:
+.sp
+.RS
+.nf
+
+\fBL"%1$s, %3$d. %2$s, %4$d:%5$.2d\\n"
+\fP
+.fi
+.RE
+.LP
+producing the message:
+.sp
+.RS
+.nf
+
+\fBSonntag, 3. Juli, 10:02
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIbtowc\fP(), \fIfputwc\fP(), \fIfwscanf\fP(), \fImbrtowc\fP(),
+\fIsetlocale\fP(),
+the Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 7,
+Locale, \fI<stdio.h>\fP, \fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/write.3p b/man-pages-posix-2003/man3p/write.3p
new file mode 100644
index 0000000..ce0a3eb
--- /dev/null
+++ b/man-pages-posix-2003/man3p/write.3p
@@ -0,0 +1,590 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WRITE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" write
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+pwrite, write \- write on a file
+.SH SYNOPSIS
+.LP
+\fB#include <unistd.h>
+.br
+.sp
+\fP
+.LP
+\fBssize_t pwrite(int\fP \fIfildes\fP\fB, const void *\fP\fIbuf\fP\fB,
+size_t\fP
+\fInbyte\fP\fB,
+.br
+\ \ \ \ \ \ off_t offset); \fP
+\fB
+.br
+ssize_t write(int\fP \fIfildes\fP\fB, const void *\fP\fIbuf\fP\fB,
+size_t\fP \fInbyte\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwrite\fP() function shall attempt to write \fInbyte\fP bytes
+from the buffer pointed to by \fIbuf\fP to the file
+associated with the open file descriptor, \fIfildes\fP.
+.LP
+Before any action described below is taken, and if \fInbyte\fP is
+zero and the file is a regular file, the \fIwrite\fP()
+function may detect and return errors as described below. In the absence
+of errors, or if error detection is not performed, the
+\fIwrite\fP() function shall return zero and have no other results.
+If \fInbyte\fP is zero and the file is not a regular file,
+the results are unspecified.
+.LP
+On a regular file or other file capable of seeking, the actual writing
+of data shall proceed from the position in the file
+indicated by the file offset associated with \fIfildes\fP. Before
+successful return from \fIwrite\fP(), the file offset shall be
+incremented by the number of bytes actually written. On a regular
+file, if this incremented file offset is greater than the length
+of the file, the length of the file shall be set to this file offset.
+.LP
+On a file not capable of seeking, writing shall always take place
+starting at the current position. The value of a file offset
+associated with such a device is undefined.
+.LP
+If the O_APPEND flag of the file status flags is set, the file offset
+shall be set to the end of the file prior to each write
+and no intervening file modification operation shall occur between
+changing the file offset and the write operation.
+.LP
+If a \fIwrite\fP() requests that more bytes be written than there
+is room for (for example, the process'
+file size limit or the physical end of a medium), only as many
+bytes as there is room for shall be written. For example, suppose
+there is space for 20 bytes more in a file before reaching a
+limit. A write of 512 bytes will return 20. The next write of a non-zero
+number of bytes would give a failure return (except as
+noted below).
+.LP
+If the request would cause the file size to exceed the soft file size
+limit for the process and there is no room for any bytes to
+be written, the request shall fail and the implementation shall generate
+the SIGXFSZ signal for the thread.
+.LP
+If \fIwrite\fP() is interrupted by a signal before it writes any data,
+it shall return -1 with \fIerrno\fP set to [EINTR].
+.LP
+If \fIwrite\fP() is interrupted by a signal after it successfully
+writes some data, it shall return the number of bytes
+written.
+.LP
+If the value of \fInbyte\fP is greater than {SSIZE_MAX}, the result
+is implementation-defined.
+.LP
+After a \fIwrite\fP() to a regular file has successfully returned:
+.IP " *" 3
+Any successful \fIread\fP() from each byte position in the file that
+was modified by that
+write shall return the data specified by the \fIwrite\fP() for that
+position until such byte positions are again modified.
+.LP
+.IP " *" 3
+Any subsequent successful \fIwrite\fP() to the same byte position
+in the file shall overwrite that file data.
+.LP
+.LP
+Write requests to a pipe or FIFO shall be handled in the same way
+as a regular file with the following exceptions:
+.IP " *" 3
+There is no file offset associated with a pipe, hence each write request
+shall append to the end of the pipe.
+.LP
+.IP " *" 3
+Write requests of {PIPE_BUF} bytes or less shall not be interleaved
+with data from other processes doing writes on the same
+pipe. Writes of greater than {PIPE_BUF} bytes may have data interleaved,
+on arbitrary boundaries, with writes by other processes,
+whether or not the O_NONBLOCK flag of the file status flags is set.
+.LP
+.IP " *" 3
+If the O_NONBLOCK flag is clear, a write request may cause the thread
+to block, but on normal completion it shall return
+\fInbyte\fP.
+.LP
+.IP " *" 3
+If the O_NONBLOCK flag is set, \fIwrite\fP() requests shall be handled
+differently, in the following ways:
+.RS
+.IP " *" 3
+The \fIwrite\fP() function shall not block the thread.
+.LP
+.IP " *" 3
+A write request for {PIPE_BUF} or fewer bytes shall have the following
+effect: if there is sufficient space available in the
+pipe, \fIwrite\fP() shall transfer all the data and return the number
+of bytes requested. Otherwise, \fIwrite\fP() shall transfer
+no data and return -1 with \fIerrno\fP set to [EAGAIN].
+.LP
+.IP " *" 3
+A write request for more than {PIPE_BUF} bytes shall cause one of
+the following:
+.RS
+.IP " *" 3
+When at least one byte can be written, transfer what it can and return
+the number of bytes written. When all data previously
+written to the pipe is read, it shall transfer at least {PIPE_BUF}
+bytes.
+.LP
+.IP " *" 3
+When no data can be written, transfer no data, and return -1 with
+\fIerrno\fP set to [EAGAIN].
+.LP
+.RE
+.LP
+.RE
+.LP
+.LP
+When attempting to write to a file descriptor (other than a pipe or
+FIFO) that supports non-blocking writes and cannot accept
+the data immediately:
+.IP " *" 3
+If the O_NONBLOCK flag is clear, \fIwrite\fP() shall block the calling
+thread until the data can be accepted.
+.LP
+.IP " *" 3
+If the O_NONBLOCK flag is set, \fIwrite\fP() shall not block the thread.
+If some data can be written without blocking the
+thread, \fIwrite\fP() shall write what it can and return the number
+of bytes written. Otherwise, it shall return -1 and set
+\fIerrno\fP to [EAGAIN].
+.LP
+.LP
+Upon successful completion, where \fInbyte\fP is greater than 0, \fIwrite\fP()
+shall mark for update the \fIst_ctime\fP and
+\fIst_mtime\fP fields of the file, and if the file is a regular file,
+the S_ISUID and S_ISGID bits of the file mode may be
+cleared.
+.LP
+For regular files, no data transfer shall occur past the offset maximum
+established in the open file description associated with
+\fIfildes\fP.
+.LP
+If \fIfildes\fP refers to a socket, \fIwrite\fP() shall be equivalent
+to \fIsend\fP()
+with no flags set.
+.LP
+If the O_DSYNC bit has been set, write I/O operations on the file
+descriptor shall complete as defined by synchronized I/O data
+integrity completion.
+.LP
+If the O_SYNC bit has been set, write I/O operations on the file descriptor
+shall complete as defined by synchronized I/O file
+integrity completion.
+.LP
+If \fIfildes\fP refers to a shared memory object, the result of the
+\fIwrite\fP() function is unspecified.
+.LP
+If \fIfildes\fP refers to a typed memory object, the result of the
+\fIwrite\fP() function is unspecified.
+.LP
+If \fIfildes\fP refers to a STREAM, the operation of \fIwrite\fP()
+shall be determined by the values of the minimum and maximum
+\fInbyte\fP range (packet size) accepted by the STREAM. These values
+are determined by the topmost STREAM module. If \fInbyte\fP
+falls within the packet size range, \fInbyte\fP bytes shall be written.
+If \fInbyte\fP does not fall within the range and the
+minimum packet size value is 0, \fIwrite\fP() shall break the buffer
+into maximum packet size segments prior to sending the data
+downstream (the last segment may contain less than the maximum packet
+size). If \fInbyte\fP does not fall within the range and the
+minimum value is non-zero, \fIwrite\fP() shall fail with \fIerrno\fP
+set to [ERANGE]. Writing a zero-length buffer ( \fInbyte\fP
+is 0) to a STREAMS device sends 0 bytes with 0 returned. However,
+writing a zero-length buffer to a STREAMS-based pipe or FIFO
+sends no message and 0 is returned. The process may issue I_SWROPT
+\fIioctl\fP() to enable
+zero-length messages to be sent across the pipe or FIFO.
+.LP
+When writing to a STREAM, data messages are created with a priority
+band of 0. When writing to a STREAM that is not a pipe or
+FIFO:
+.IP " *" 3
+If O_NONBLOCK is clear, and the STREAM cannot accept data (the STREAM
+write queue is full due to internal flow control
+conditions), \fIwrite\fP() shall block until data can be accepted.
+.LP
+.IP " *" 3
+If O_NONBLOCK is set and the STREAM cannot accept data, \fIwrite\fP()
+shall return -1 and set \fIerrno\fP to [EAGAIN].
+.LP
+.IP " *" 3
+If O_NONBLOCK is set and part of the buffer has been written while
+a condition in which the STREAM cannot accept additional data
+occurs, \fIwrite\fP() shall terminate and return the number of bytes
+written.
+.LP
+.LP
+In addition, \fIwrite\fP() shall fail if the STREAM head has processed
+an asynchronous error before the call. In this case, the
+value of \fIerrno\fP does not reflect the result of \fIwrite\fP(),
+but reflects the prior error.
+.LP
+The \fIpwrite\fP() function shall be equivalent to \fIwrite\fP(),
+except that it writes into a given position without changing
+the file pointer. The first three arguments to \fIpwrite\fP() are
+the same as \fIwrite\fP() with the addition of a fourth
+argument offset for the desired position inside the file.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIwrite\fP() and \fIpwrite\fP()
+shall return the number of bytes actually written to the file associated
+with \fIfildes\fP. This number
+shall never be greater than \fInbyte\fP. Otherwise, -1 shall be returned
+and \fIerrno\fP set to indicate the error.
+.SH ERRORS
+.LP
+The \fIwrite\fP() and \fIpwrite\fP() functions shall fail
+if:
+.TP 7
+.B EAGAIN
+The O_NONBLOCK flag is set for the file descriptor and the thread
+would be delayed in the \fIwrite\fP() operation.
+.TP 7
+.B EBADF
+The \fIfildes\fP argument is not a valid file descriptor open for
+writing.
+.TP 7
+.B EFBIG
+An attempt was made to write a file that exceeds the implementation-defined
+maximum file size or the
+process' file size limit, and there was no room for any bytes
+to be written.
+.TP 7
+.B EFBIG
+The file is a regular file, \fInbyte\fP is greater than 0, and the
+starting position is greater than or equal to the offset
+maximum established in the open file description associated with \fIfildes\fP.
+.TP 7
+.B EINTR
+The write operation was terminated due to the receipt of a signal,
+and no data was transferred.
+.TP 7
+.B EIO
+The process is a member of a background process group attempting to
+write to its controlling terminal, TOSTOP is set, the
+process is neither ignoring nor blocking SIGTTOU, and the process
+group of the process is orphaned. This error may also be returned
+under implementation-defined conditions.
+.TP 7
+.B ENOSPC
+There was no free space remaining on the device containing the file.
+.TP 7
+.B EPIPE
+An attempt is made to write to a pipe or FIFO that is not open for
+reading by any process, or that only has one end open. A
+SIGPIPE signal shall also be sent to the thread.
+.TP 7
+.B ERANGE
+The transfer request size was outside the range supported by the STREAMS
+file associated with \fIfildes\fP.
+.sp
+.LP
+The \fIwrite\fP() function shall fail if:
+.TP 7
+.B EAGAIN \fRor\fP EWOULDBLOCK
+.sp
+The file descriptor is for a socket, is marked O_NONBLOCK, and write
+would block.
+.TP 7
+.B ECONNRESET
+A write was attempted on a socket that is not connected.
+.TP 7
+.B EPIPE
+A write was attempted on a socket that is shut down for writing, or
+is no longer connected. In the latter case, if the socket
+is of type SOCK_STREAM, the SIGPIPE signal is generated to the calling
+process.
+.sp
+.LP
+The \fIwrite\fP() and \fIpwrite\fP() functions may fail
+if:
+.TP 7
+.B EINVAL
+The STREAM or multiplexer referenced by \fIfildes\fP is linked (directly
+or indirectly) downstream from a multiplexer.
+.TP 7
+.B EIO
+A physical I/O error has occurred.
+.TP 7
+.B ENOBUFS
+Insufficient resources were available in the system to perform the
+operation.
+.TP 7
+.B ENXIO
+A request was made of a nonexistent device, or the request was outside
+the capabilities of the device.
+.TP 7
+.B ENXIO
+A hangup occurred on the STREAM being written to.
+.sp
+.LP
+A
+write to a STREAMS file may fail if an error message has been received
+at the STREAM head. In this case, \fIerrno\fP is set to the
+value included in the error message.
+.LP
+The \fIwrite\fP() function may fail if:
+.TP 7
+.B EACCES
+A write was attempted on a socket and the calling process does not
+have appropriate privileges.
+.TP 7
+.B ENETDOWN
+A write was attempted on a socket and the local network interface
+used to reach the destination is down.
+.TP 7
+.B ENETUNREACH
+.sp
+A write was attempted on a socket and no route to the network is present.
+.sp
+.LP
+The \fIpwrite\fP() function shall fail and the file pointer remain
+unchanged if:
+.TP 7
+.B EINVAL
+The \fIoffset\fP argument is invalid. The value is negative.
+.TP 7
+.B ESPIPE
+\fIfildes\fP is associated with a pipe or FIFO.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Writing from a Buffer
+.LP
+The following example writes data from the buffer pointed to by \fIbuf\fP
+to the file associated with the file descriptor
+\fIfd\fP.
+.sp
+.RS
+.nf
+
+\fB#include <sys/types.h>
+#include <string.h>
+\&...
+char buf[20];
+size_t nbytes;
+ssize_t bytes_written;
+int fd;
+\&...
+strcpy(buf, "This is a test\\n");
+nbytes = strlen(buf);
+.sp
+
+bytes_written = write(fd, buf, nbytes);
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+See also the RATIONALE section in \fIread\fP().
+.LP
+An attempt to write to a pipe or FIFO has several major characteristics:
+.IP " *" 3
+\fIAtomic/non-atomic\fP: A write is atomic if the whole amount written
+in one operation is not interleaved with data from any
+other process. This is useful when there are multiple writers sending
+data to a single reader. Applications need to know how large
+a write request can be expected to be performed atomically. This maximum
+is called {PIPE_BUF}. This volume of
+IEEE\ Std\ 1003.1-2001 does not say whether write requests for more
+than {PIPE_BUF} bytes are atomic, but requires that
+writes of {PIPE_BUF} or fewer bytes shall be atomic.
+.LP
+.IP " *" 3
+\fIBlocking/immediate\fP: Blocking is only possible with O_NONBLOCK
+clear. If there is enough space for all the data requested
+to be written immediately, the implementation should do so. Otherwise,
+the process may block; that is, pause until enough space is
+available for writing. The effective size of a pipe or FIFO (the maximum
+amount that can be written in one operation without
+blocking) may vary dynamically, depending on the implementation, so
+it is not possible to specify a fixed value for it.
+.LP
+.IP " *" 3
+\fIComplete/partial/deferred\fP: A write request:
+.sp
+.RS
+.nf
+
+\fBint fildes;
+size_t nbyte;
+ssize_t ret;
+char *buf;
+.sp
+
+ret = write(fildes, buf, nbyte);
+\fP
+.fi
+.RE
+.LP
+may return:
+.TP 7
+Complete
+.RS
+\fIret\fP=\fInbyte\fP
+.RE
+.TP 7
+Partial
+.RS
+\fIret\fP<\fInbyte\fP
+.LP
+This shall never happen if \fInbyte\fP<= {PIPE_BUF}. If it does happen
+(with \fInbyte\fP> {PIPE_BUF}), this volume of
+IEEE\ Std\ 1003.1-2001 does not guarantee atomicity, even if \fIret\fP<=
+{PIPE_BUF}, because atomicity is guaranteed
+according to the amount \fIrequested\fP, not the amount \fIwritten\fP.
+.RE
+.TP 7
+Deferred:
+.RS
+\fIret\fP=-1, \fIerrno\fP=[EAGAIN]
+.LP
+This error indicates that a later request may succeed. It does not
+indicate that it \fIshall\fP succeed, even if
+\fInbyte\fP<= {PIPE_BUF}, because if no process reads from the pipe
+or FIFO, the write never succeeds. An application could
+usefully count the number of times [EAGAIN] is caused by a particular
+value of \fInbyte\fP> {PIPE_BUF} and perhaps do later
+writes with a smaller value, on the assumption that the effective
+size of the pipe may have decreased.
+.RE
+.sp
+.LP
+Partial and deferred writes are only possible with O_NONBLOCK set.
+.LP
+.LP
+The relations of these properties are shown in the following tables:
+.TS C
+center;c2 s2 s2 s.
+\fBWrite to a Pipe or FIFO with O_NONBLOCK \fIclear\fP\fP
+.T&
+l l l l.
+\fBImmediately Writable:\fP \fBNone\fP \fBSome\fP \fInbyte\fP
+\fInbyte\fP<={PIPE_BUF} Atomic blocking Atomic blocking Atomic immediate
+\ \fInbyte\fP \fInbyte\fP \fInbyte\fP
+\fInbyte\fP>{PIPE_BUF} Blocking \fInbyte\fP Blocking \fInbyte\fP Blocking \fInbyte\fP
+.TE
+.LP
+If the O_NONBLOCK flag is clear, a write request shall block if the
+amount writable immediately is less than that requested. If
+the flag is set (by \fIfcntl\fP()), a write request shall never block.
+.TS C
+center;c2 s2 s2 s.
+\fBWrite to a Pipe or FIFO with O_NONBLOCK \fIset\fP\fP
+.T&
+l l l l.
+\fBImmediately Writable:\fP \fBNone\fP \fBSome\fP \fInbyte\fP
+\fInbyte\fP<={PIPE_BUF} -1, [EAGAIN] -1, [EAGAIN] Atomic \fInbyte\fP
+\fInbyte\fP>{PIPE_BUF} -1, [EAGAIN] <\fInbyte\fP or -1, <=\fInbyte\fP or -1,
+\ \ [EAGAIN] [EAGAIN]
+.TE
+.LP
+There is no exception regarding partial writes when O_NONBLOCK is
+set. With the exception of writing to an empty pipe, this
+volume of IEEE\ Std\ 1003.1-2001 does not specify exactly when a partial
+write is performed since that would require
+specifying internal details of the implementation. Every application
+should be prepared to handle partial writes when O_NONBLOCK is
+set and the requested amount is greater than {PIPE_BUF}, just as every
+application should be prepared to handle partial writes on
+other kinds of file descriptors.
+.LP
+The intent of forcing writing at least one byte if any can be written
+is to assure that each write makes progress if there is
+any room in the pipe. If the pipe is empty, {PIPE_BUF} bytes must
+be written; if not, at least some progress must have been
+made.
+.LP
+Where this volume of IEEE\ Std\ 1003.1-2001 requires -1 to be returned
+and \fIerrno\fP set to [EAGAIN], most historical
+implementations return zero (with the O_NDELAY flag set, which is
+the historical predecessor of O_NONBLOCK, but is not itself in
+this volume of IEEE\ Std\ 1003.1-2001). The error indications in this
+volume of IEEE\ Std\ 1003.1-2001 were chosen
+so that an application can distinguish these cases from end-of-file.
+While \fIwrite\fP() cannot receive an indication of
+end-of-file, \fIread\fP() can, and the two functions have similar
+return values. Also, some
+existing systems (for example, Eighth Edition) permit a write of zero
+bytes to mean that the reader should get an end-of-file
+indication; for those systems, a return value of zero from \fIwrite\fP()
+indicates a successful write of an end-of-file
+indication.
+.LP
+Implementations are allowed, but not required, to perform error checking
+for \fIwrite\fP() requests of zero bytes.
+.LP
+The concept of a {PIPE_MAX} limit (indicating the maximum number of
+bytes that can be written to a pipe in a single operation)
+was considered, but rejected, because this concept would unnecessarily
+limit application writing.
+.LP
+See also the discussion of O_NONBLOCK in \fIread\fP().
+.LP
+Writes can be serialized with respect to other reads and writes. If
+a \fIread\fP() of file
+data can be proven (by any means) to occur after a \fIwrite\fP() of
+the data, it must reflect that \fIwrite\fP(), even if the
+calls are made by different processes. A similar requirement applies
+to multiple write operations to the same file position. This
+is needed to guarantee the propagation of data from \fIwrite\fP()
+calls to subsequent \fIread\fP() calls. This requirement is particularly
+significant for networked file systems, where
+some caching schemes violate these semantics.
+.LP
+Note that this is specified in terms of \fIread\fP() and \fIwrite\fP().
+The XSI
+extensions \fIreadv\fP() and \fIwritev\fP() also
+obey these semantics. A new "high-performance" write analog that did
+not follow these serialization requirements would also be
+permitted by this wording. This volume of IEEE\ Std\ 1003.1-2001 is
+also silent about any effects of application-level
+caching (such as that done by \fIstdio\fP).
+.LP
+This volume of IEEE\ Std\ 1003.1-2001 does not specify the value of
+the file offset after an error is returned; there
+are too many cases. For programming errors, such as [EBADF], the concept
+is meaningless since no file is involved. For errors that
+are detected immediately, such as [EAGAIN], clearly the pointer should
+not change. After an interrupt or hardware error, however,
+an updated value would be very useful and is the behavior of many
+implementations.
+.LP
+This volume of IEEE\ Std\ 1003.1-2001 does not specify behavior of
+concurrent writes to a file from multiple processes.
+Applications should use some form of concurrency control.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIchmod\fP(), \fIcreat\fP(), \fIdup\fP(), \fIfcntl\fP(), \fIgetrlimit\fP(),
+\fIlseek\fP(),
+\fIopen\fP(), \fIpipe\fP(), \fIulimit\fP(), \fIwritev\fP(), the
+Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<limits.h>\fP,
+\fI<stropts.h>\fP, \fI<sys/uio.h>\fP, \fI<unistd.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/writev.3p b/man-pages-posix-2003/man3p/writev.3p
new file mode 100644
index 0000000..840c205
--- /dev/null
+++ b/man-pages-posix-2003/man3p/writev.3p
@@ -0,0 +1,129 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WRITEV" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" writev
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+writev \- write a vector
+.SH SYNOPSIS
+.LP
+\fB#include <sys/uio.h>
+.br
+.sp
+ssize_t writev(int\fP \fIfildes\fP\fB, const struct iovec *\fP\fIiov\fP\fB,
+int\fP \fIiovcnt\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwritev\fP() function shall be equivalent to \fIwrite\fP(),
+except as described
+below. The \fIwritev\fP() function shall gather output data from the
+\fIiovcnt\fP buffers specified by the members of the
+\fIiov\fP array: \fIiov\fP[0], \fIiov\fP[1], ..., \fIiov\fP[\fIiovcnt\fP-1].
+The \fIiovcnt\fP argument is valid if greater
+than 0 and less than or equal to {IOV_MAX}, as defined in \fI<limits.h>\fP.
+.LP
+Each \fIiovec\fP entry specifies the base address and length of an
+area in memory from which data should be written. The
+\fIwritev\fP() function shall always write a complete area before
+proceeding to the next.
+.LP
+If \fIfildes\fP refers to a regular file and all of the \fIiov_len\fP
+members in the array pointed to by \fIiov\fP are 0,
+\fIwritev\fP() shall return 0 and have no other effect. For other
+file types, the behavior is unspecified.
+.LP
+If the sum of the \fIiov_len\fP values is greater than {SSIZE_MAX},
+the operation shall fail and no data shall be
+transferred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, \fIwritev\fP() shall return the number
+of bytes actually written. Otherwise, it shall return a
+value of -1, the file-pointer shall remain unchanged, and \fIerrno\fP
+shall be set to indicate an error.
+.SH ERRORS
+.LP
+Refer to \fIwrite\fP().
+.LP
+In addition, the \fIwritev\fP() function shall fail if:
+.TP 7
+.B EINVAL
+The sum of the \fIiov_len\fP values in the \fIiov\fP array would overflow
+an \fBssize_t\fP.
+.sp
+.LP
+The \fIwritev\fP() function may fail and set \fIerrno\fP to:
+.TP 7
+.B EINVAL
+The \fIiovcnt\fP argument was less than or equal to 0, or greater
+than {IOV_MAX}.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Writing Data from an Array
+.LP
+The following example writes data from the buffers specified by members
+of the \fIiov\fP array to the file associated with the
+file descriptor \fIfd\fP.
+.sp
+.RS
+.nf
+
+\fB#include <sys/types.h>
+#include <sys/uio.h>
+#include <unistd.h>
+\&...
+ssize_t bytes_written;
+int fd;
+char *buf0 = "short string\\n";
+char *buf1 = "This is a longer string\\n";
+char *buf2 = "This is the longest string in this example\\n";
+int iovcnt;
+struct iovec iov[3];
+.sp
+
+iov[0].iov_base = buf0;
+iov[0].iov_len = strlen(buf0);
+iov[1].iov_base = buf1;
+iov[1].iov_len = strlen(buf1);
+iov[2].iov_base = buf2;
+iov[2].iov_len = strlen(buf2);
+\&...
+iovcnt = sizeof(iov) / sizeof(struct iovec);
+.sp
+
+bytes_written = writev(fd, iov, iovcnt);
+\&...
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+None.
+.SH RATIONALE
+.LP
+Refer to \fIwrite\fP().
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIreadv\fP(), \fIwrite\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<limits.h>\fP, \fI<sys/uio.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/wscanf.3p b/man-pages-posix-2003/man3p/wscanf.3p
new file mode 100644
index 0000000..ea14c4f
--- /dev/null
+++ b/man-pages-posix-2003/man3p/wscanf.3p
@@ -0,0 +1,522 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "FWSCANF" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" fwscanf
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+fwscanf, swscanf, wscanf \- convert formatted wide-character input
+.SH SYNOPSIS
+.LP
+\fB#include <stdio.h>
+.br
+#include <wchar.h>
+.br
+.sp
+int fwscanf(FILE *restrict\fP \fIstream\fP\fB, const wchar_t *restrict\fP
+\fIformat\fP\fB, ... );
+.br
+int swscanf(const wchar_t *restrict\fP \fIws\fP\fB,
+.br
+\ \ \ \ \ \ const wchar_t *restrict\fP \fIformat\fP\fB, ... );
+.br
+int wscanf(const wchar_t *restrict\fP \fIformat\fP\fB, ... );
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIfwscanf\fP() function shall read from the named input \fIstream\fP.
+The \fIwscanf\fP() function shall read from the
+standard input stream \fIstdin\fP. The \fIswscanf\fP() function shall
+read from the wide-character string \fIws\fP. Each
+function reads wide characters, interprets them according to a format,
+and stores the results in its arguments. Each expects, as
+arguments, a control wide-character string \fIformat\fP described
+below, and a set of \fIpointer\fP arguments indicating where
+the converted input should be stored. The result is undefined if there
+are insufficient arguments for the format. If the
+\fIformat\fP is exhausted while arguments remain, the excess arguments
+are evaluated but are otherwise ignored.
+.LP
+Conversions can be applied to the \fIn\fPth argument after the \fIformat\fP
+in the argument list, rather than to the next unused
+argument. In this case, the conversion specifier wide character \fB%\fP
+(see below) is replaced by the sequence \fB"%n$"\fP,
+where \fIn\fP is a decimal integer in the range [1,{NL_ARGMAX}]. This
+feature provides for the definition of \fIformat\fP
+wide-character strings that select arguments in an order appropriate
+to specific languages. In \fIformat\fP wide-character strings
+containing the \fB"%\fP\fIn\fP\fB$"\fP form of conversion specifications,
+it is unspecified whether numbered arguments in
+the argument list can be referenced from the \fIformat\fP wide-character
+string more than once.
+.LP
+The \fIformat\fP can contain either form of a conversion specification-that
+is, \fB%\fP or \fB"%\fP\fIn\fP\fB$"\fP-
+but the two forms cannot normally be mixed within a single \fIformat\fP
+wide-character string. The only exception to this is that
+\fB%%\fP or \fB%*\fP can be mixed with the \fB"%\fP\fIn\fP\fB$"\fP
+form. When numbered argument specifications are
+used, specifying the \fIN\fPth argument requires that all the leading
+arguments, from the first to the ( \fIN\fP-1)th, are
+pointers.
+.LP
+The
+\fIfwscanf\fP() function in all its forms allows for detection of
+a language-dependent radix character in the input string,
+encoded as a wide-character value. The radix character is defined
+in the program's locale (category \fILC_NUMERIC ).\fP In the
+POSIX locale, or in a locale where the radix character is not defined,
+the radix character shall default to a period ( \fB'.'\fP
+).
+.LP
+The \fIformat\fP is a wide-character string composed of zero or more
+directives. Each directive is composed of one of the
+following: one or more white-space wide characters ( <space>s, <tab>s,
+<newline>s, <vertical-tab>s, or
+<form-feed>s); an ordinary wide character (neither \fB'%'\fP nor a
+white-space character); or a conversion specification.
+Each conversion specification is introduced by a \fB'%'\fP or
+the sequence \fB"%\fP\fIn\fP\fB$"\fP after which the following appear
+in sequence:
+.IP " *" 3
+An optional assignment-suppressing character \fB'*'\fP .
+.LP
+.IP " *" 3
+An optional non-zero decimal integer that specifies the maximum field
+width.
+.LP
+.IP " *" 3
+An optional length modifier that specifies the size of the receiving
+object.
+.LP
+.IP " *" 3
+A conversion specifier wide character that specifies the type of conversion
+to be applied. The valid conversion specifiers are
+described below.
+.LP
+.LP
+The \fIfwscanf\fP() functions shall execute each directive of the
+format in turn. If a directive fails, as detailed below, the
+function shall return. Failures are described as input failures (due
+to the unavailability of input bytes) or matching failures
+(due to inappropriate input).
+.LP
+A directive composed of one or more white-space wide characters is
+executed by reading input until no more valid input can be
+read, or up to the first wide character which is not a white-space
+wide character, which remains unread.
+.LP
+A directive that is an ordinary wide character shall be executed as
+follows. The next wide character is read from the input and
+compared with the wide character that comprises the directive; if
+the comparison shows that they are not equivalent, the directive
+shall fail, and the differing and subsequent wide characters remain
+unread. Similarly, if end-of-file, an encoding error, or a read
+error prevents a wide character from being read, the directive shall
+fail.
+.LP
+A directive that is a conversion specification defines a set of matching
+input sequences, as described below for each conversion
+wide character. A conversion specification is executed in the following
+steps.
+.LP
+Input white-space wide characters (as specified by \fIiswspace\fP()
+) shall be skipped, unless the
+conversion specification includes a \fB[\fP, \fBc\fP, or \fBn\fP
+conversion specifier.
+.LP
+An item shall be read from the input, unless the conversion specification
+includes an \fBn\fP conversion specifier wide
+character. An input item is defined as the longest sequence of input
+wide characters, not exceeding any specified field width,
+which is an initial subsequence of a matching sequence. The first
+wide character, if any, after the input item shall remain unread.
+If the length of the input item is zero, the execution of the conversion
+specification shall fail; this condition is a matching
+failure, unless end-of-file, an encoding error, or a read error prevented
+input from the stream, in which case it is an input
+failure.
+.LP
+Except in the case of a \fB%\fP conversion specifier, the input item
+(or, in the case of a \fB%n\fP conversion
+specification, the count of input wide characters) shall be converted
+to a type appropriate to the conversion wide character. If
+the input item is not a matching sequence, the execution of the conversion
+specification shall fail; this condition is a matching
+failure. Unless assignment suppression was indicated by a \fB'*'\fP,
+the result of the conversion shall be placed in the object
+pointed to by the first argument following the \fIformat\fP argument
+that has not already received a conversion result if the
+conversion specification is introduced by \fB%\fP, or in the
+\fIn\fPth argument if introduced by the wide-character
+sequence \fB"%\fP\fIn\fP\fB$"\fP. If this object does not
+have an appropriate type, or if the result of the conversion cannot
+be represented in the space provided, the behavior is
+undefined.
+.LP
+The length modifiers and their meanings are:
+.TP 7
+\fBhh\fP
+Specifies that a following \fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP,
+\fBx\fP, \fBX\fP, or \fBn\fP
+conversion specifier applies to an argument with type pointer to \fBsigned
+char\fP or \fBunsigned char\fP.
+.TP 7
+\fBh\fP
+Specifies that a following \fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP,
+\fBx\fP, \fBX\fP, or \fBn\fP
+conversion specifier applies to an argument with type pointer to \fBshort\fP
+or \fBunsigned short\fP.
+.TP 7
+\fBl\fP\ (ell)
+Specifies that a following \fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP,
+\fBx\fP, \fBX\fP, or \fBn\fP
+conversion specifier applies to an argument with type pointer to \fBlong\fP
+or \fBunsigned long\fP; that a following \fBa\fP,
+\fBA\fP, \fBe\fP, \fBE\fP, \fBf\fP, \fBF\fP, \fBg\fP, or \fBG\fP
+conversion specifier applies to an
+argument with type pointer to \fBdouble\fP; or that a following \fBc\fP,
+\fBs\fP, or \fB[\fP conversion specifier
+applies to an argument with type pointer to \fBwchar_t\fP.
+.TP 7
+\fBll\fP\ (ell-ell)
+.sp
+Specifies that a following \fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP,
+\fBx\fP, \fBX\fP, or \fBn\fP conversion
+specifier applies to an argument with type pointer to \fBlong long\fP
+or \fBunsigned long long\fP.
+.TP 7
+\fBj\fP
+Specifies that a following \fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP,
+\fBx\fP, \fBX\fP, or \fBn\fP
+conversion specifier applies to an argument with type pointer to \fBintmax_t\fP
+or \fBuintmax_t\fP.
+.TP 7
+\fBz\fP
+Specifies that a following \fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP,
+\fBx\fP, \fBX\fP, or \fBn\fP
+conversion specifier applies to an argument with type pointer to \fBsize_t\fP
+or the corresponding signed integer type.
+.TP 7
+\fBt\fP
+Specifies that a following \fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP,
+\fBx\fP, \fBX\fP, or \fBn\fP
+conversion specifier applies to an argument with type pointer to \fBptrdiff_t\fP
+or the corresponding \fBunsigned\fP type.
+.TP 7
+\fBL\fP
+Specifies that a following \fBa\fP, \fBA\fP, \fBe\fP, \fBE\fP,
+\fBf\fP, \fBF\fP, \fBg\fP, or
+\fBG\fP conversion specifier applies to an argument with type pointer
+to \fBlong double\fP.
+.sp
+.LP
+If a length modifier appears with any conversion specifier other than
+as specified above, the behavior is undefined.
+.LP
+The following conversion specifier wide characters are valid:
+.TP 7
+\fBd\fP
+Matches an optionally signed decimal integer, whose format is the
+same as expected for the subject sequence of \fIwcstol\fP() with the
+value 10 for the \fIbase\fP argument. In the absence of a size modifier,
+the application shall ensure that the corresponding argument is a
+pointer to \fBint\fP.
+.TP 7
+\fBi\fP
+Matches an optionally signed integer, whose format is the same as
+expected for the subject sequence of \fIwcstol\fP() with 0 for the
+\fIbase\fP argument. In the absence of a size modifier, the
+application shall ensure that the corresponding argument is a pointer
+to \fBint\fP.
+.TP 7
+\fBo\fP
+Matches an optionally signed octal integer, whose format is the same
+as expected for the subject sequence of \fIwcstoul\fP() with the value
+8 for the \fIbase\fP argument. In the absence of a size modifier,
+the application shall ensure that the corresponding argument is a
+pointer to \fBunsigned\fP.
+.TP 7
+\fBu\fP
+Matches an optionally signed decimal integer, whose format is the
+same as expected for the subject sequence of \fIwcstoul\fP() with
+the value 10 for the \fIbase\fP argument. In the absence of a size
+modifier,
+the application shall ensure that the corresponding argument is a
+pointer to \fBunsigned\fP.
+.TP 7
+\fBx\fP
+Matches an optionally signed hexadecimal integer, whose format is
+the same as expected for the subject sequence of \fIwcstoul\fP() with
+the value 16 for the \fIbase\fP argument. In the absence of a size
+modifier,
+the application shall ensure that the corresponding argument is a
+pointer to \fBunsigned\fP.
+.TP 7
+\fBa\fP,\ \fBe\fP,\ \fBf\fP,\ \fBg\fP
+.sp
+Matches an optionally signed floating-point number, infinity, or NaN
+whose format is the same as expected for the subject sequence
+of \fIwcstod\fP(). In the absence of a size modifier, the application
+shall ensure that the
+corresponding argument is a pointer to \fBfloat\fP.
+.LP
+If the \fIfwprintf\fP() family of functions generates character string
+representations
+for infinity and NaN (a symbolic entity encoded in floating-point
+format) to support IEEE\ Std\ 754-1985, the
+\fIfwscanf\fP() family of functions shall recognize them as input.
+.TP 7
+\fBs\fP
+Matches a sequence of non white-space wide characters. If no \fBl\fP
+(ell) qualifier is present, characters from the input
+field shall be converted as if by repeated calls to the \fIwcrtomb\fP()
+function, with the
+conversion state described by an \fBmbstate_t\fP object initialized
+to zero before the first wide character is converted. The
+application shall ensure that the corresponding argument is a pointer
+to a character array large enough to accept the sequence and
+the terminating null character, which shall be added automatically.
+.LP
+Otherwise, the application shall ensure that the corresponding argument
+is a pointer to an array of \fBwchar_t\fP large enough
+to accept the sequence and the terminating null wide character, which
+shall be added automatically.
+.TP 7
+\fB[\fP
+Matches a non-empty sequence of wide characters from a set of expected
+wide characters (the \fIscanset\fP). If no \fBl\fP
+(ell) qualifier is present, wide characters from the input field shall
+be converted as if by repeated calls to the \fIwcrtomb\fP() function,
+with the conversion state described by an \fBmbstate_t\fP object
+initialized to zero before the first wide character is converted.
+The application shall ensure that the corresponding argument is a
+pointer to a character array large enough to accept the sequence and
+the terminating null character, which shall be added
+automatically.
+.LP
+If an \fBl\fP (ell) qualifier is present, the application shall ensure
+that the corresponding argument is a pointer to an
+array of \fBwchar_t\fP large enough to accept the sequence and the
+terminating null wide character, which shall be added
+automatically.
+.LP
+The conversion specification includes all subsequent wide characters
+in the \fIformat\fP string up to and including the
+matching right square bracket ( \fB']'\fP ). The wide characters between
+the square brackets (the \fIscanlist\fP) comprise the
+scanset, unless the wide character after the left square bracket is
+a circumflex ( \fB'^'\fP ), in which case the scanset
+contains all wide characters that do not appear in the scanlist between
+the circumflex and the right square bracket. If the
+conversion specification begins with \fB"[]"\fP or \fB"[^]"\fP, the
+right square bracket is included in the scanlist and the
+next right square bracket is the matching right square bracket that
+ends the conversion specification; otherwise, the first right
+square bracket is the one that ends the conversion specification.
+If a \fB'-'\fP is in the scanlist and is not the first wide
+character, nor the second where the first wide character is a \fB'^'\fP,
+nor the last wide character, the behavior is
+implementation-defined.
+.TP 7
+\fBc\fP
+Matches a sequence of wide characters of exactly the number specified
+by the field width (1 if no field width is present in the
+conversion specification).
+.LP
+If no \fBl\fP (ell) length modifier is present, characters from the
+input field shall be converted as if by repeated calls to
+the \fIwcrtomb\fP() function, with the conversion state described
+by an \fBmbstate_t\fP
+object initialized to zero before the first wide character is converted.
+The corresponding argument shall be a pointer to the
+initial element of a character array large enough to accept the sequence.
+No null character is added.
+.LP
+If an \fBl\fP (ell) length modifier is present, the corresponding
+argument shall be a pointer to the initial element of an
+array of \fBwchar_t\fP large enough to accept the sequence. No null
+wide character is added.
+.LP
+Otherwise, the application shall ensure that the corresponding argument
+is a pointer to an array of \fBwchar_t\fP large enough
+to accept the sequence. No null wide character is added.
+.TP 7
+\fBp\fP
+Matches an implementation-defined set of sequences, which shall be
+the same as the set of sequences that is produced by the
+\fB%p\fP conversion specification of the corresponding \fIfwprintf\fP()
+functions. The
+application shall ensure that the corresponding argument is a pointer
+to a pointer to \fBvoid\fP. The interpretation of the input
+item is implementation-defined. If the input item is a value converted
+earlier during the same program execution, the pointer that
+results shall compare equal to that value; otherwise, the behavior
+of the \fB%p\fP conversion is undefined.
+.TP 7
+\fBn\fP
+No input is consumed. The application shall ensure that the corresponding
+argument is a pointer to the integer into which is to
+be written the number of wide characters read from the input so far
+by this call to the \fIfwscanf\fP() functions. Execution of a
+\fB%n\fP conversion specification shall not increment the assignment
+count returned at the completion of execution of the
+function. No argument shall be converted, but one shall be consumed.
+If the conversion specification includes an
+assignment-suppressing wide character or a field width, the behavior
+is undefined.
+.TP 7
+\fBC\fP
+Equivalent to \fBlc\fP .
+.TP 7
+\fBS\fP
+Equivalent to \fBls\fP .
+.TP 7
+\fB%\fP
+Matches a single \fB'%'\fP wide character; no conversion or assignment
+shall occur. The complete conversion specification
+shall be \fB%%\fP .
+.sp
+.LP
+If a conversion specification is invalid, the behavior is undefined.
+.LP
+The conversion specifiers \fBA\fP, \fBE\fP, \fBF\fP, \fBG\fP,
+and \fBX\fP are also valid and shall be
+equivalent to, respectively, \fBa\fP, \fBe\fP, \fBf\fP, \fBg\fP,
+and \fBx\fP .
+.LP
+If end-of-file is encountered during input, conversion is terminated.
+If end-of-file occurs before any wide characters matching
+the current conversion specification (except for \fB%n\fP ) have been
+read (other than leading white-space, where permitted),
+execution of the current conversion specification shall terminate
+with an input failure. Otherwise, unless execution of the current
+conversion specification is terminated with a matching failure, execution
+of the following conversion specification (if any) shall
+be terminated with an input failure.
+.LP
+Reaching the end of the string in \fIswscanf\fP() shall be equivalent
+to encountering end-of-file for \fIfwscanf\fP().
+.LP
+If conversion terminates on a conflicting input, the offending input
+shall be left unread in the input. Any trailing white space
+(including <newline>) shall be left unread unless matched by a conversion
+specification. The success of literal matches and
+suppressed assignments is only directly determinable via the \fB%n\fP
+conversion specification.
+.LP
+The
+\fIfwscanf\fP() and \fIwscanf\fP() functions may mark the \fIst_atime\fP
+field of the file associated with \fIstream\fP for
+update. The \fIst_atime\fP field shall be marked for update by the
+first successful execution of \fIfgetc\fP(), \fIfgetwc\fP(), \fIfgets\fP(),
+\fIfgetws\fP(), \fIfread\fP(), \fIgetc\fP(), \fIgetwc\fP(), \fIgetchar\fP(),
+\fIgetwchar\fP(), \fIgets\fP(), \fIfscanf\fP(), or \fIfwscanf\fP()
+using \fIstream\fP that returns data not supplied by a prior
+call to \fIungetc\fP().
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the number
+of successfully matched and assigned input items; this
+number can be zero in the event of an early matching failure. If the
+input ends before the first matching failure or conversion,
+EOF shall be returned. If a read error occurs, the error indicator
+for the stream is set, EOF shall be returned, and
+\fIerrno\fP shall be set to indicate the error.
+.SH ERRORS
+.LP
+For the conditions under which the \fIfwscanf\fP() functions shall
+fail and may fail, refer to \fIfgetwc\fP().
+.LP
+In addition, \fIfwscanf\fP() may fail if:
+.TP 7
+.B EILSEQ
+Input byte sequence does not form a valid character.
+.TP 7
+.B EINVAL
+There are insufficient arguments.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+The call:
+.sp
+.RS
+.nf
+
+\fBint i, n; float x; char name[50];
+n = wscanf(L"%d%f%s", &i, &x, name);
+\fP
+.fi
+.RE
+.LP
+with the input line:
+.sp
+.RS
+.nf
+
+\fB25 54.32E-1 Hamster
+\fP
+.fi
+.RE
+.LP
+assigns to \fIn\fP the value 3, to \fIi\fP the value 25, to \fIx\fP
+the value 5.432, and \fIname\fP contains the string
+\fB"Hamster"\fP .
+.LP
+The call:
+.sp
+.RS
+.nf
+
+\fBint i; float x; char name[50];
+(void) wscanf(L"%2d%f%*d %[0123456789]", &i, &x, name);
+\fP
+.fi
+.RE
+.LP
+with input:
+.sp
+.RS
+.nf
+
+\fB56789 0123 56a72
+\fP
+.fi
+.RE
+.LP
+assigns 56 to \fIi\fP, 789.0 to \fIx\fP, skips 0123, and places the
+string \fB"56\\0"\fP in \fIname\fP. The next call to \fIgetchar\fP()
+shall return the character \fB'a'\fP .
+.SH APPLICATION USAGE
+.LP
+In format strings containing the \fB'%'\fP form of conversion specifications,
+each argument in the argument list is used
+exactly once.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIgetwc\fP(), \fIfwprintf\fP(), \fIsetlocale\fP(), \fIwcstod\fP(),
+\fIwcstol\fP(),
+\fIwcstoul\fP(), \fIwcrtomb\fP(), the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Chapter 7, Locale, \fI<langinfo.h>\fP, \fI<stdio.h>\fP,
+\fI<wchar.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/y0.3p b/man-pages-posix-2003/man3p/y0.3p
new file mode 100644
index 0000000..611280e
--- /dev/null
+++ b/man-pages-posix-2003/man3p/y0.3p
@@ -0,0 +1,118 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "Y0" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" y0
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+y0, y1, yn \- Bessel functions of the second kind
+.SH SYNOPSIS
+.LP
+\fB#include <math.h>
+.br
+.sp
+double y0(double\fP \fIx\fP\fB);
+.br
+double y1(double\fP \fIx\fP\fB);
+.br
+double yn(int\fP \fIn\fP\fB, double\fP \fIx\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIy0\fP(), \fIy1\fP(), and \fIyn\fP() functions shall compute
+Bessel functions of \fIx\fP of the second kind of orders
+0, 1, and \fIn\fP, respectively.
+.LP
+An application wishing to check for error situations should set \fIerrno\fP
+to zero and call
+\fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
+On return, if \fIerrno\fP is non-zero or
+\fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+is non-zero, an error has occurred.
+.SH RETURN VALUE
+.LP
+Upon successful completion, these functions shall return the relevant
+Bessel value of \fIx\fP of the second kind.
+.LP
+If \fIx\fP is NaN, NaN shall be returned.
+.LP
+If the \fIx\fP argument to these functions is negative, -HUGE_VAL
+or NaN shall be returned, and a domain error may occur.
+.LP
+If \fIx\fP is 0.0, -HUGE_VAL shall be returned and a range error may
+occur.
+.LP
+If the correct result would cause underflow, 0.0 shall be returned
+and a range error may occur.
+.LP
+If the correct result would cause overflow, -HUGE_VAL or 0.0 shall
+be returned and a range error may occur.
+.SH ERRORS
+.LP
+These functions may fail if:
+.TP 7
+Domain\ Error
+The value of \fIx\fP is negative.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [EDOM]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the invalid floating-point exception shall be
+raised.
+.TP 7
+Range\ Error
+The value of \fIx\fP is 0.0, or the correct result would cause overflow.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the overflow floating-point exception shall be
+raised.
+.TP 7
+Range\ Error
+The value of \fIx\fP is too large in magnitude, or the correct result
+would cause underflow.
+.LP
+If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
+then \fIerrno\fP shall be set to [ERANGE]. If the
+integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
+then the underflow floating-point exception shall be
+raised.
+.sp
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
+& MATH_ERREXCEPT) are independent of
+each other, but at least one of them must be non-zero.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIfeclearexcept\fP(), \fIfetestexcept\fP(), \fIisnan\fP(), \fIj0\fP(),
+the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment of Error Conditions
+for
+Mathematical Functions, \fI<math.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .
diff --git a/man-pages-posix-2003/man3p/y1.3p b/man-pages-posix-2003/man3p/y1.3p
new file mode 100644
index 0000000..442ed02
--- /dev/null
+++ b/man-pages-posix-2003/man3p/y1.3p
@@ -0,0 +1 @@
+.so man3p/y0.3p
diff --git a/man-pages-posix-2003/man3p/yn.3p b/man-pages-posix-2003/man3p/yn.3p
new file mode 100644
index 0000000..442ed02
--- /dev/null
+++ b/man-pages-posix-2003/man3p/yn.3p
@@ -0,0 +1 @@
+.so man3p/y0.3p