OSDN Git Service

LDP: Update draft based on the previous commit
authorAkihiro Motoki <amotoki@gmail.com>
Fri, 26 Mar 2021 05:13:06 +0000 (14:13 +0900)
committerAkihiro Motoki <amotoki@gmail.com>
Fri, 26 Mar 2021 05:13:06 +0000 (14:13 +0900)
254 files changed:
manual/LDP_man-pages/draft/man2/eventfd.2
manual/LDP_man-pages/draft/man2/getrusage.2
manual/LDP_man-pages/draft/man2/utimensat.2
manual/LDP_man-pages/draft/man3/a64l.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/abort.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/abs.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/acos.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/acosh.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/addseverity.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/adjtime.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/alloca.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/asin.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/assert.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/assert_perror.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/atan.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/atan2.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/atanh.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/atexit.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/atof.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/basename.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/bindresvport.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/bsd_signal.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/bsearch.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/canonicalize_file_name.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/catgets.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/catopen.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/cbrt.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/ceil.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/cfree.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/clock.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/clock_getcpuclockid.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/closedir.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/copysign.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/cos.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/cosh.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/difftime.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/dirfd.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/div.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/dysize.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/ecvt.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/ecvt_r.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/erfc.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/err.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/error.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/exp.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/exp10.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/exp2.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/fabs.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/fdim.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/fenv.3
manual/LDP_man-pages/draft/man3/fgetgrent.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/fgetpwent.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/floor.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/fma.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/fmax.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/fmin.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/fmod.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/fpclassify.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/fread.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/ftime.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/ftok.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/fts.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/futimes.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/gamma.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/gcvt.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/getcontext.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/getdate.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/getdirentries.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/getenv.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/getfsent.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/getgrent.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/getgrent_r.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/getgrnam.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/getgrouplist.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/gethostbyname.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/getifaddrs.3
manual/LDP_man-pages/draft/man3/getloadavg.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/getlogin.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/getnetent.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/getpass.3
manual/LDP_man-pages/draft/man3/getprotoent.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/getpt.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/getpw.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/getpwent.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/getpwnam.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/getrpcent.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/getrpcent_r.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/getrpcport.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/getservent.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/getspnam.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/getsubopt.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/getttyent.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/glob.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/gnu_get_libc_version.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/gsignal.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/hsearch.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/hypot.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/iconv.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/iconv_close.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/iconv_open.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/if_nameindex.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/if_nametoindex.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/ilogb.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/initgroups.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/insque.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/isalpha.3
manual/LDP_man-pages/draft/man3/isatty.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/isgreater.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/j0.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/key_setsecret.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/ldexp.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/localeconv.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/log.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/log10.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/log2.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/logb.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/lrint.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/lsearch.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/lseek64.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/makecontext.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/makedev.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/mallinfo.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/malloc_get_state.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/malloc_info.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/malloc_stats.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/malloc_trim.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/malloc_usable_size.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/matherr.3
manual/LDP_man-pages/draft/man3/mblen.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/mbstowcs.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/mbtowc.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/mkdtemp.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/mkfifo.3
manual/LDP_man-pages/draft/man3/mkstemp.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/mktemp.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/mq_close.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/mq_getattr.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/mq_notify.3
manual/LDP_man-pages/draft/man3/mq_open.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/mq_receive.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/mq_send.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/mq_unlink.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/nan.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/nextafter.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/on_exit.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/opendir.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/openpty.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/posix_fallocate.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/posix_memalign.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/posix_openpt.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/pow.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/profil.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/psignal.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/pthread_attr_init.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/pthread_attr_setaffinity_np.3
manual/LDP_man-pages/draft/man3/pthread_attr_setdetachstate.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/pthread_attr_setguardsize.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/pthread_attr_setinheritsched.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/pthread_attr_setschedparam.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/pthread_attr_setschedpolicy.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/pthread_attr_setscope.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/pthread_attr_setstack.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/pthread_attr_setstackaddr.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/pthread_attr_setstacksize.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/pthread_cancel.3
manual/LDP_man-pages/draft/man3/pthread_cleanup_push.3
manual/LDP_man-pages/draft/man3/pthread_detach.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/pthread_equal.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/pthread_exit.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/pthread_getattr_np.3
manual/LDP_man-pages/draft/man3/pthread_getcpuclockid.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/pthread_join.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/pthread_kill.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/pthread_kill_other_threads_np.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/pthread_self.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/pthread_setaffinity_np.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/pthread_setcancelstate.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/pthread_setconcurrency.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/pthread_setname_np.3
manual/LDP_man-pages/draft/man3/pthread_setschedparam.3
manual/LDP_man-pages/draft/man3/pthread_setschedprio.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/pthread_sigmask.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/pthread_sigqueue.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/pthread_testcancel.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/pthread_tryjoin_np.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/pthread_yield.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/putenv.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/putgrent.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/putpwent.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/qecvt.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/qsort.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/raise.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/rand.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/random_r.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/re_comp.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/realpath.3
manual/LDP_man-pages/draft/man3/regex.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/remquo.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/rewinddir.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/round.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/rpc.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/rpmatch.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/rtime.3
manual/LDP_man-pages/draft/man3/scalb.3
manual/LDP_man-pages/draft/man3/scalbln.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/scandir.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/sched_getcpu.3
manual/LDP_man-pages/draft/man3/seekdir.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/sem_close.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/sem_destroy.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/sem_getvalue.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/sem_init.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/sem_open.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/sem_post.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/sem_unlink.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/sem_wait.3
manual/LDP_man-pages/draft/man3/setaliasent.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/setenv.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/setlocale.3
manual/LDP_man-pages/draft/man3/setlogmask.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/setnetgrent.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/siginterrupt.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/signbit.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/sigpause.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/sigqueue.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/sigset.3
manual/LDP_man-pages/draft/man3/sigvec.3
manual/LDP_man-pages/draft/man3/sigwait.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/sin.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/sincos.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/sinh.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/sleep.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/sockatmark.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/sqrt.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/stdarg.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/strptime.3
manual/LDP_man-pages/draft/man3/strtod.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/strtoimax.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/sysv_signal.3
manual/LDP_man-pages/draft/man3/tan.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/tanh.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/tcgetsid.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/telldir.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/termios.3
manual/LDP_man-pages/draft/man3/tgamma.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/toascii.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/toupper.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/trunc.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/ttyslot.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/ulimit.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/wctomb.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/wordexp.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/xcrypt.3 [new file with mode: 0644]
manual/LDP_man-pages/draft/man3/xdr.3 [new file with mode: 0644]

index 4da7b36..bfd0f73 100644 (file)
@@ -160,12 +160,12 @@ reached.
 で利用可能である。 バージョン 2.9 以降では、glibc の \fBeventfd\fP()  のラッパー関数は、カーネルが対応していれば
 \fBeventfd2\fP()  システムコールを利用する。
 .SH 属性
-For an explanation of the terms used in this section, see \fBattributes\fP(7).
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
 .TS
 allbox;
 lb lb lb
 l l l.
-Interface      Attribute       値
+インターフェース       属性  値
 T{
 \fBeventfd\fP()
 T}     Thread safety   MT\-Safe
index f217c05..662b2c4 100644 (file)
@@ -181,13 +181,13 @@ I/O 動作を必要とするページフォルトの回数。
 .TP 
 \fBEINVAL\fP
 \fIwho\fP が無効である。
-.SH ATTRIBUTES
-For an explanation of the terms used in this section, see \fBattributes\fP(7).
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
 .TS
 allbox;
 lb lb lb
 l l l.
-Interface      Attribute       Value
+インターフェース       属性  値
 T{
 \fBgetrusage\fP()
 T}     Thread safety   MT\-Safe
index fb095c2..45000fc 100644 (file)
@@ -247,12 +247,12 @@ neither \fItv_nsec\fP field is \fBUTIME_NOW\fP, and neither \fItv_nsec\fP field
 .PP
 \fBfutimens\fP() のサポートは glibc 2.6 で初めて登場した。
 .SH 属性
-For an explanation of the terms used in this section, see \fBattributes\fP(7).
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
 .TS
 allbox;
 lbw23 lb lb
 l l l.
-Interface      Attribute       Value
+インターフェース       属性  値
 T{
 \fButimensat\fP(),
 \fBfutimens\fP()
diff --git a/manual/LDP_man-pages/draft/man3/a64l.3 b/manual/LDP_man-pages/draft/man3/a64l.3
new file mode 100644 (file)
index 0000000..2c450a4
--- /dev/null
@@ -0,0 +1,95 @@
+.\" Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
+.\" Distributed under GPL
+.\" %%%LICENSE_END
+.\"
+.\" Corrected, aeb, 2002-05-30
+.\"
+\t
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2002-2003 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated Tue Aug  6 04:34:20 JST 2002
+.\"         by Yuichi SATO <ysato@h4.dion.ne.jp>
+.\" Updated & Modified Thu Nov 27 01:02:55 JST 2003
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\"
+.TH A64L 3 2020\-08\-13 "" "Linux Programmer's Manual"
+.SH 名前
+a64l, l64a \- long と base\-64 を変換する
+.SH 書式
+\fB#include <stdlib.h>\fP
+.PP
+\fBlong a64l(const char *\fP\fIstr64\fP\fB);\fP
+.PP
+\fBchar *l64a(long \fP\fIvalue\fP\fB);\fP
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBa64l\fP(), \fBl64a\fP():
+.br
+.RS 4
+.ad l
+.\"    || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
+_XOPEN_SOURCE\ >=\ 500
+    || /* Glibc since 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _SVID_SOURCE
+.RE
+.ad
+.SH 説明
+これらの関数は 32 ビット long 整数と リトルエンディアン base\-64 ASCII 文字列 (長さ 0 〜 6) の間の変換を行う。
+\fBa64l\fP()  の引き数の文字列が 7 文字以上の場合、 最初の 6 バイトが使われる。 \fIlong\fP 型が 32 ビットより大きい場合、
+\fBl64a\fP()  は \fIvalue\fP の下位 32 ビットのみを使い、 \fBa64l\fP()  は 32 ビットの結果を符号拡張
+(sign\-extend) する。
+.PP
+base\-64 システムで使われる 64 個の文字は以下の通りである:
+.PP
+.RS
+.nf
+\&\(aq.\(aq    は 0 を表す。
+\&\(aq/\(aq    は 1 を表す。
+0\-9   は 2\-11 を表す。
+A\-Z   は 12\-37 を表す。
+a\-z   は 38\-63 を表す。
+.fi
+.RE
+.PP
+So 123 = 59*64\(ha0 + 1*64\(ha1 = "v/".
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBl64a\fP()
+T}     Thread safety   MT\-Unsafe race:l64a
+T{
+\fBa64l\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+\fBl64a\fP()  で返される値は静的バッファーへのポインターかもしれないので、 以降の呼び出しで上書きされる可能性がある。
+.PP
+\fIvalue\fP が負の場合、 \fBl64a\fP()  の動作は定義されていない。 \fIvalue\fP が 0 の場合は空文字列を返す。
+.PP
+これらの関数は glibc 2.2.5 以前では間違っている (最上位デジットを最初にしている)。
+.PP
+これは \fBuuencode\fP(1)  で使われるエンコーディングではない。
+.SH 関連項目
+.\" .BR itoa (3),
+\fBuuencode\fP(1), \fBstrtoul\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/abort.3 b/manual/LDP_man-pages/draft/man3/abort.3
new file mode 100644 (file)
index 0000000..1610d20
--- /dev/null
@@ -0,0 +1,94 @@
+.\" Copyright 2007 (C) Michael Kerrisk <mtk.manpages@gmail.com>
+.\" some parts Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified Sat Jul 24 21:46:21 1993 by Rik Faith (faith@cs.unc.edu)
+.\" Modified Fri Aug  4 10:51:53 2000 - patch from Joseph S. Myers
+.\" 2007-12-15, mtk, Mostly rewritten
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1996 Kentaro OGAWA
+.\"         all rights reserved.
+.\" Translated 1996-07-13, Kentaro OGAWA <k_ogawa@oyna.cc.muroran-it.ac.jp>
+.\" Updated 2008-02-09, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2010-12-26, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH ABORT 3 2020\-06\-09 GNU "Linux Programmer's Manual"
+.SH 名前
+abort \- プロセスの異常終了を生じさせる
+.SH 書式
+.nf
+\fB#include <stdlib.h>\fP
+.PP
+\fBvoid abort(void);\fP
+.fi
+.SH 説明
+The \fBabort\fP()  function first unblocks the \fBSIGABRT\fP signal, and then
+raises that signal for the calling process (as though \fBraise\fP(3)  was
+called).  This results in the abnormal termination of the process unless the
+\fBSIGABRT\fP signal is caught and the signal handler does not return (see
+\fBlongjmp\fP(3)).
+.PP
+\fBSIGABRT\fP シグナルが無視、または返って来るシグナルハンドラーで 捕捉されるようになっている場合であっても、 \fBabort\fP()
+関数はそのプロセスを終了する。 \fBSIGABRT\fP シグナルに対する処理方法をデフォルトに戻してから、再度 \fBSIGABRT\fP
+シグナルを上げることで、このような動作になる。
+.SH 返り値
+\fBabort\fP()  関数が返ることはない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBabort\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+SVr4, POSIX.1\-2001, POSIX.1\-2008, 4.3BSD, C89, C99.
+.SH 注意
+.\" glibc commit 91e7cf982d0104f0e71770f5ae8e3faf352dea9f
+Up until glibc 2.26, if the \fBabort\fP()  function caused process termination,
+all open streams were closed and flushed (as with \fBfclose\fP(3)).  However,
+in some cases this could result in deadlocks and data corruption.
+Therefore, starting with glibc 2.27, \fBabort\fP()  terminates the process
+without flushing streams.  POSIX.1 permits either possible behavior, saying
+that \fBabort\fP()  "may include an attempt to effect fclose() on all open
+streams".
+.SH 関連項目
+\fBgdb\fP(1), \fBsigaction\fP(2), \fBassert\fP(3), \fBexit\fP(3), \fBlongjmp\fP(3),
+\fBraise\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/abs.3 b/manual/LDP_man-pages/draft/man3/abs.3
new file mode 100644 (file)
index 0000000..1fd7642
--- /dev/null
@@ -0,0 +1,117 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified Mon Mar 29 22:31:13 1993, David Metcalfe
+.\" Modified Sun Jun  6 23:27:50 1993, David Metcalfe
+.\" Modified Sat Jul 24 21:45:37 1993, Rik Faith (faith@cs.unc.edu)
+.\" Modified Sat Dec 16 15:02:59 2000, Joseph S. Myers
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1996 Kentaro OGAWA
+.\"         all rights reserved.
+.\" Translated Sat, 13 Jul 1996 22:44:04 +0900
+.\"         by Kentaro OGAWA <k_ogawa@oyna.cc.muroran-it.ac.jp>
+.\" Updated Mon 29 Jan 2001 17:18:34 JST by Kentaro Shirakata <argrath@ub32.org>
+.\"
+.TH ABS 3 2020\-11\-01 GNU "Linux Programmer's Manual"
+.SH 名前
+abs, labs, llabs, imaxabs \- 整数の絶対値を計算する
+.SH 書式
+.nf
+\fB#include <stdlib.h>\fP
+.PP
+\fBint abs(int \fP\fIj\fP\fB);\fP
+\fBlong labs(long \fP\fIj\fP\fB);\fP
+\fBlong long llabs(long long \fP\fIj\fP\fB);\fP
+
+\fB#include <inttypes.h>\fP
+.PP
+\fBintmax_t imaxabs(intmax_t \fP\fIj\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBllabs\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+.RE
+.ad
+.SH 説明
+The \fBabs\fP()  function computes the absolute value of the integer argument
+\fIj\fP.  The \fBlabs\fP(), \fBllabs\fP(), and \fBimaxabs\fP()  functions compute the
+absolute value of the argument \fIj\fP of the appropriate integer type for the
+function.
+.SH 返り値
+それぞれの関数の型に応じた整数の引数の絶対値を返す。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.ad l
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBabs\fP(),
+\fBlabs\fP(),
+\fBllabs\fP(),
+\fBimaxabs\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.ad
+.SH 準拠
+.\" POSIX.1 (1996 edition) requires only the
+.\" .BR abs ()
+.\" function.
+POSIX.1\-2001, POSIX.1\-2008, C99, SVr4, 4.3BSD.  C89 only includes the
+\fBabs\fP()  and \fBlabs\fP()  functions; the functions \fBllabs\fP()  and
+\fBimaxabs\fP()  were added in C99.
+.SH 注意
+最大の負整数の絶対値は、定義されていない。
+.PP
+\fBllabs\fP()  関数はバージョン 2.0 から glibc に含まれるようになった。 \fBimaxabs\fP()  関数は バージョン 2.1.1
+から glibc に含まれるようになった。
+.PP
+\fBllabs\fP()  が宣言されるためには、標準ヘッダーを include する前に \fB_ISOC99_SOURCE\fP か
+\fB_ISOC9X_SOURCE\fP(どちらかは glibc の バージョンに依存する)を define しておく必要がある。
+.PP
+デフォルトで、GCC は \fBabs\fP(), \fBlabs\fP() および (GCC 3.0 以降では) \fBllabs\fP() と
+\fBimaxabs\fP() をビルドイン関数として扱う。
+.SH 関連項目
+\fBcabs\fP(3), \fBceil\fP(3), \fBfabs\fP(3), \fBfloor\fP(3), \fBrint\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/acos.3 b/manual/LDP_man-pages/draft/man3/acos.3
new file mode 100644 (file)
index 0000000..1872689
--- /dev/null
@@ -0,0 +1,118 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 2002-07-25 by Walter Harms
+.\"    (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1996 Kenji Kajiwara and Kentaro Ogawa
+.\"         all rights reserved.
+.\" Translated Sat, 13 Jul 1996 17:50:45 JST
+.\"         by Kenji Kajiwara and Kentaro Ogawa
+.\" Proof Reading: Takashi Yoshino
+.\" Updated Tue Aug  5 23:12:59 JST 2003
+.\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2008-09-14, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH ACOS 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+acos, acosf, acosl \- 逆余弦(arc cosine)関数
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBdouble acos(double \fP\fIx\fP\fB);\fP
+\fBfloat acosf(float \fP\fIx\fP\fB);\fP
+\fBlong double acosl(long double \fP\fIx\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBacosf\fP(), \fBacosl\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad b
+.SH 説明
+These functions calculate the arc cosine of \fIx\fP; that is the value whose
+cosine is \fIx\fP.
+.SH 返り値
+成功すると、これらの関数は \fIx\fP の逆余弦をラジアン単位で返す。 返り値は [0,\ pi] の範囲となる。
+.PP
+\fIx\fP が NaN の場合、NaN が返される。
+.PP
+\fIx\fP が +1 の場合、+0 が返される。
+.PP
+\fIx\fP が正の無限大か負の無限大の場合、 領域エラー (domain error) が発生し、NaN が返される。
+.PP
+\fIx\fP が [\-1,\ 1] の範囲に入っていない場合、 領域エラー (domain error) が発生し、NaN が返される。
+.SH エラー
+これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
+.PP
+以下のエラーが発生する可能性がある。
+.TP 
+領域エラー (domain error): \fIx\fP が [\-1,\ 1] の範囲に入っていない
+\fIerrno\fP に \fBEDOM\fP が設定される。 不正 (invalid) 浮動小数点例外 (\fBFE_INVALID\fP)  が上がる。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw24 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBacos\fP(),
+\fBacosf\fP(),
+\fBacosl\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.PP
+The variant returning \fIdouble\fP also conforms to SVr4, 4.3BSD, C89.
+.SH 関連項目
+\fBasin\fP(3), \fBatan\fP(3), \fBatan2\fP(3), \fBcacos\fP(3), \fBcos\fP(3), \fBsin\fP(3),
+\fBtan\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/acosh.3 b/manual/LDP_man-pages/draft/man3/acosh.3
new file mode 100644 (file)
index 0000000..90a4814
--- /dev/null
@@ -0,0 +1,126 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 2002-07-25 by Walter Harms
+.\"    (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1996 Kenji Kajiwara and Kentaro Ogawa
+.\"         all rights reserved.
+.\" Translated Sat, 13 Jul 1996 17:58:16 JST
+.\"         by Kenji Kajiwara and Kentaro Ogawa
+.\" Proof Reading: Takashi Yoshino
+.\" Updated Tue Aug  5 23:16:48 JST 2003
+.\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2008-09-14, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH ACOSH 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+acosh, acoshf, acoshl \- 逆双曲線余弦(inverse hyperbolic cosine)関数
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBdouble acosh(double \fP\fIx\fP\fB);\fP
+\fBfloat acoshf(float \fP\fIx\fP\fB);\fP
+\fBlong double acoshl(long double \fP\fIx\fP\fB);\fP
+.PP
+.fi
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBacosh\fP():
+.RS 4
+.\"    || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || _XOPEN_SOURCE\ >=\ 500
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.br
+\fBacoshf\fP(), \fBacoshl\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad b
+.SH 説明
+These functions calculate the inverse hyperbolic cosine of \fIx\fP; that is the
+value whose hyperbolic cosine is \fIx\fP.
+.SH 返り値
+成功すると、これらの関数は \fIx\fP の逆双曲線余弦を返す。
+.PP
+\fIx\fP が NaN の場合、NaN が返される。
+.PP
+\fIx\fP が +1 の場合、+0 が返される。
+.PP
+\fIx\fP が正の無限大の場合、正の無限大が返される。
+.PP
+\fIx\fP が 1 より小さい場合、 領域エラー (domain error) が発生し、NaN が返される。
+.SH エラー
+これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
+.PP
+以下のエラーが発生する可能性がある。
+.TP 
+領域エラー (domain error): \fIx\fP が 1 より小さい
+\fIerrno\fP に \fBEDOM\fP が設定される。 不正 (invalid) 浮動小数点例外 (\fBFE_INVALID\fP)  が上がる。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw28 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBacosh\fP(),
+\fBacoshf\fP(),
+\fBacoshl\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.PP
+The variant returning \fIdouble\fP also conforms to SVr4, 4.3BSD.
+.SH 関連項目
+\fBasinh\fP(3), \fBatanh\fP(3), \fBcacosh\fP(3), \fBcosh\fP(3), \fBsinh\fP(3), \fBtanh\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/addseverity.3 b/manual/LDP_man-pages/draft/man3/addseverity.3
new file mode 100644 (file)
index 0000000..d5295f1
--- /dev/null
@@ -0,0 +1,71 @@
+.\"  Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
+.\" Distributed under GPL
+.\" %%%LICENSE_END
+.\"  adapted glibc info page
+.\"
+.\"  polished a little, aeb
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2004 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated Thu Jul  1 01:12:35 JST 2004
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\"
+.TH ADDSEVERITY 3 2016\-03\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+addseverity \- 新しい重大度 (severity class) を導入する
+.SH 書式
+.nf
+.PP
+\fB#include <fmtmsg.h>\fP
+.PP
+\fBint addseverity(int \fP\fIseverity\fP\fB, const char *\fP\fIs\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBaddseverity\fP():
+    Since glibc 2.19:
+        _DEFAULT_SOURCE
+    Glibc 2.19 and earlier:
+        _SVID_SOURCE
+.SH 説明
+この関数により、新しい重大度を導入できる。 この重大度は、 \fBfmtmsg\fP(3)  関数の \fIseverity\fP 引き数に入れることができる。
+デフォルトでは、 \fBfmtmsg\fP(3)  関数は重大度 0\-4 (文字列では (none), HALT, ERROR, WARNING, INFO)
+の メッセージを表示する方法しか知らない。 この \fBaddseverity\fP(3)  の呼び出しにより、指定された文字列 \fIs\fP に指定された値
+\fIseverity\fP を付加する。 \fIs\fP が NULL の場合、数値 \fIseverity\fP の重大度が削除される。
+デフォルトの重大度のどれかを上書きしたり削除したりすることはできない。 重大度の値は負でない数としなければならない。
+.SH 返り値
+成功した場合、値 \fBMM_OK\fP が返される。 エラーの場合、返り値は \fBMM_NOTOK\fP である。
+起こる可能性があるエラーには、以下のものが含まれる: メモリーを使い果たした。 存在しない重大度またはデフォルトの重大度を削除しようとした。
+.SH バージョン
+\fBaddseverity\fP()  はバージョン 2.1 以降の glibc で提供されている。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBaddseverity\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+\fBfmtmsg\fP(3)  関数は X/Open Portability Guide に指定されているが、 この関数は指定されていない。 この関数は
+System V システムで利用可能である。
+.SH 注意
+新しい重大度は、環境変数 \fBSEV_LEVEL\fP を設定することで追加することもできる。
+.SH 関連項目
+\fBfmtmsg\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/adjtime.3 b/manual/LDP_man-pages/draft/man3/adjtime.3
new file mode 100644 (file)
index 0000000..23c2aee
--- /dev/null
@@ -0,0 +1,116 @@
+.\" Copyright (c) 2006 by Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI all rights reserved.
+.\" Translated 2006-07-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH ADJTIME 3 2017\-09\-15 Linux "Linux Programmer's Manual"
+.SH 名前
+adjtime \- システムクロックに同期する時刻を調整する
+.SH 書式
+.nf
+\fB#include <sys/time.h>\fP
+.PP
+\fBint adjtime(const struct timeval *\fP\fIdelta\fP\fB, struct timeval *\fP\fIolddelta\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBadjtime\fP():
+    Since glibc 2.19:
+        _DEFAULT_SOURCE
+    Glibc 2.19 and earlier:
+        _BSD_SOURCE
+.SH 説明
+\fBadjtime\fP()  関数は (\fBgettimeofday\fP(2)  が返す) システムクロックを徐々に調整する。 調整すべきクロックの時間量は
+\fIdelta\fP が指す構造体で指定される。 この構造体は以下の形である:
+.PP
+.in +4n
+.EX
+struct timeval {
+    time_t      tv_sec;     /* 秒 */
+    suseconds_t tv_usec;    /* マイクロ秒 */
+};
+.EE
+.in
+.PP
+\fIdelta\fP の調整量が正の場合、調整量に達するまでシステムクロックを 少し割合だけスピードアップさせる (つまり、毎秒クロック値に少しだけ
+時刻を加算する)。 \fIdelta\fP の調整量が負の場合、同様の方法でクロックを遅くする。
+.PP
+\fBadjtime\fP()  が呼び出されたときに以前の \fBadjtime\fP()  の呼び出しによるクロックの調整がまだ実行中で、かつ後の
+\fBadjtime\fP()  の \fIdelta\fP が NULL でない場合、実行中の調整は停止される。
+しかし、すでに実行された調整の取り消しは行われない。
+.PP
+\fIolddelta\fP が NULL でない場合、 \fIolddelta\fP が指すバッファーに、過去の調整要求でまだ完了せず残っている時間量が
+格納して返される。
+.SH 返り値
+成功すると、 \fBadjtime\fP()  は 0 を返す。失敗すると、\-1 を返し、 \fIerrno\fP にエラーを示す値をセットする。
+.SH エラー
+.TP 
+\fBEINVAL\fP
+\fIdelta\fP で指定された調整量が許可された範囲に入っていない。
+.TP 
+\fBEPERM\fP
+呼び出し者が時刻を調整するのに必要な権限を持っていない。 Linux では \fBCAP_SYS_TIME\fP ケーパビリティが必要である。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBadjtime\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+4.3BSD, System V.
+.SH 注意
+\fBadjtime\fP()  が行うクロックの調整は、クロックは常に単調増加するという範囲内で 実行される。 \fBadjtime\fP()
+を使って時刻を調整することで、システムタイムの突然の正や負のジャンプ により、いくつかのアプリケーション (例えば \fBmake\fP(1)  など)
+に起こる問題を防ぐことができる。
+.PP
+\fBadjtime\fP()  はシステム時刻に少しずつ調整を行うために使用されることを期待されている。 ほとんどのシステムでは、 \fIdelta\fP
+に指定できる調整量に制限を課している。 glibc の実装では、 \fIdelta\fP は (INT_MIN / 1000000 + 2) 以上
+(INT_MAX / 1000000 \- 2) 以下 (i386 では \-2145 以上 2145 以下) でなければならない。
+.SH バグ
+.\" http://sourceware.org/bugzilla/show_bug?id=2449
+.\" http://bugzilla.kernel.org/show_bug.cgi?id=6761
+.\" Thanks to the new adjtimex() ADJ_OFFSET_SS_READ flag
+ずっと昔から、 \fIdelta\fP に NULL を指定すると、未完了のクロック調整に関する有効な情報が \fIolddelta\fP
+に返されないというバグがあった (この場合、 \fBadjtime\fP()  は、未完了のクロック調整に関する情報を、変更せずに返すべきである)。
+このバグは、 glibc 2.8 以降で、Linux カーネル 2.6.26 以降のシステムで修正されている。
+.SH 関連項目
+\fBadjtimex\fP(2), \fBgettimeofday\fP(2), \fBtime\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/alloca.3 b/manual/LDP_man-pages/draft/man3/alloca.3
new file mode 100644 (file)
index 0000000..ce60b9d
--- /dev/null
@@ -0,0 +1,132 @@
+.\" Copyright (c) 1980, 1991 Regents of the University of California.
+.\" All rights reserved.
+.\"
+.\" %%%LICENSE_START(BSD_4_CLAUSE_UCB)
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\"    must display the following acknowledgement:
+.\"    This product includes software developed by the University of
+.\"    California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\"    may be used to endorse or promote products derived from this software
+.\"    without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\" %%%LICENSE_END
+.\"
+.\"     @(#)alloca.3   5.1 (Berkeley) 5/2/91
+.\"
+.\" Converted Mon Nov 29 11:05:55 1993 by Rik Faith <faith@cs.unc.edu>
+.\" Modified Tue Oct 22 23:41:56 1996 by Eric S. Raymond <esr@thyrsus.com>
+.\" Modified 2002-07-17, aeb
+.\" 2008-01-24, mtk:
+.\"     Various rewrites and additions (notes on longjmp() and SIGSEGV).
+.\"     Weaken warning against use of alloca() (as per Debian bug 461100).
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1996 Kentaro OGAWA
+.\"         all rights reserved.
+.\" Translated Sat, 13 Jul 1996 22:44:04 +0900
+.\"         by Kentaro OGAWA <k_ogawa@oyna.cc.muroran-it.ac.jp>
+.\" Updated & Modified Tue Oct 16 01:01:48 JST 2001
+.\"         by Yuichi SATO <ysato@mail.sbvl.muroran-it.ac.jp>
+.\" Updated & Modified Sat Aug 31 04:42:49 JST 2002 by Yuichi SATO
+.\" Updated 2013-03-26, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2013-07-24, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH ALLOCA 3 2019\-03\-06 GNU "Linux Programmer's Manual"
+.SH 名前
+alloca \- 自動的に解放されるメモリーを割り当てる
+.SH 書式
+\fB#include <alloca.h>\fP
+.PP
+\fBvoid *alloca(size_t \fP\fIsize\fP\fB);\fP
+.SH 説明
+\fBalloca\fP()  関数は、 \fIsize\fP バイトの領域を呼出元のスタックフレームに割り付ける。 この一時的な領域は、 \fBalloca\fP()
+を呼び出した関数が呼出元に返るときに自動的に解放される。
+.SH 返り値
+\fBalloca\fP()  関数は、割り付けた領域の始まりを指すポインターを返す。 割り付けによってスタックオーバーフローが起った場合の
+プログラムの動作は定義されていない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBalloca\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+This function is not in POSIX.1.
+.PP
+32V, PWB, PWB.2, 3BSD, 4BSD に \fBalloca\fP()  関数が登場した証拠がある。 4.3BSD
+には、マニュアルページがある。 Linux は、GNU 版を使っている。 この関数は POSIX.1\-2001 にはない。
+.SH 注意
+\fBalloca\fP()  関数は、機種とコンパイラに依存する。 特定のアプリケーションでは、この関数を使うと \fBmalloc\fP(3)  と
+\fBfree\fP(3)  を組み合わせて使った場合に比べて効率を改善することができる。 特定の場合では、この関数を使うことで、 \fBlongjmp\fP(3)
+や \fBsiglongjmp\fP(3)  を使うアプリケーションでのメモリーの開放を簡単にすることができる。
+それ以外の場合では、この関数の使用は推奨されない。
+.PP
+\fBalloca\fP()  により割り当てられる空間はスタックフレームから割り当てらるので、 関数の戻り先が \fBlongjmp\fP(3)  や
+\fBsiglongjmp\fP(3)  の呼び出しによりジャンプした場合には、 割り当てられた空間は自動的に解放される。
+.PP
+The space allocated by \fBalloca\fP()  is \fInot\fP automatically deallocated if
+the pointer that refers to it simply goes out of scope.
+.PP
+\fBalloca\fP()  で割り当てられた空間を \fBfree\fP(3)  しようとすることのないように!
+.SS "GNU 版についての注意"
+通常 \fBgcc\fP(1) は \fBalloca\fP()  の呼び出しをインラインコードに変換する。 \fI\-ansi\fP, \fI\-std=c89\fP,
+\fI\-std=c99\fP, \fI\-std=c11\fP のいずれかのオプションが指定され、\fBかつ\fP \fI<alloca.h>\fP
+がインクルードされていない場合、 この変換は行われない。 それ以外の場合 (\-ansi オプションも \-std=c* オプションも指定されない場合)
+には、 glibc 版の \fI<stdlib.h>\fP は \fI<alloca.h>\fP
+をインクルードするが、このファイルには以下の行が含まれており、
+.PP
+.in +4n
+.EX
+#ifdef  __GNUC__
+#define alloca(size)   __builtin_alloca (size)
+#endif
+.EE
+.in
+.PP
+独自版の __builtin_alloca (size) 関数がある場合、厄介な結果になる。
+.PP
+このコードはインライン化されているので、 この関数のアドレスを取得したり、 他のライブラリをリンクして動作を変更することはできない。
+.PP
+通常このインラインコードはスタックポインターを移動する 1 つの命令 (instruction) から構成されており、
+スタックオーバーフローをチェックしない。 よって NULL エラーが返されることはない。
+.SH バグ
+スタックフレームが拡張できなかった場合、エラー通知は行われない。 (しかしながら、割り当てに失敗した後で、プログラムが割り当てられなかった
+空間にアクセスしようとした場合に \fBSIGSEGV\fP シグナルを受信することだろう。)
+.PP
+多くのシステムにおいて、関数コールの引き数のリスト内では \fBalloca\fP()  が使えない。 これは、 \fBalloca\fP()
+によって予約されるスタック領域が、 関数引き数に使われるスタック領域の中に現れてしまうためである。
+.SH 関連項目
+\fBbrk\fP(2), \fBlongjmp\fP(3), \fBmalloc\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/asin.3 b/manual/LDP_man-pages/draft/man3/asin.3
new file mode 100644 (file)
index 0000000..2ef79d1
--- /dev/null
@@ -0,0 +1,119 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 2002-07-25 by Walter Harms
+.\"    (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1996 Kenji Kajiwara and Kentaro Ogawa
+.\"         all rights reserved.
+.\" Translated Sat, 13 Jul 1996 17:50:45 JST
+.\"         by Kenji Kajiwara and Kentaro Ogawa
+.\" Proof Reading: Takashi Yoshino
+.\" Updated Tue Aug  5 23:16:48 JST 2003
+.\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2008-09-14, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH ASIN 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+asin, asinf, asinl \- 逆正弦(arc sine)関数
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBdouble asin(double \fP\fIx\fP\fB);\fP
+\fBfloat asinf(float \fP\fIx\fP\fB);\fP
+\fBlong double asinl(long double \fP\fIx\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBasinf\fP(), \fBasinl\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad b
+.SH 説明
+These functions calculate the principal value of the arc sine of \fIx\fP; that
+is the value whose sine is \fIx\fP.
+.SH 返り値
+成功すると、これらの関数は \fIx\fP の逆正弦の主値をラジアン単位で返す。 返り値は [\-pi/2,\ pi/2] の範囲となる。
+.PP
+\fIx\fP が NaN の場合、NaN が返される。
+.PP
+\fIx\fP が +0 (\-0) の場合、+0 (\-0) が返される。
+.PP
+.\"
+.\" POSIX.1-2001 documents an optional range error for subnormal x;
+.\" glibc 2.8 does not do this.
+\fIx\fP が [\-1,\ 1] の範囲に入っていない場合、 領域エラー (domain error) が発生し、NaN が返される。
+.SH エラー
+これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
+.PP
+以下のエラーが発生する可能性がある。
+.TP 
+領域エラー (domain error): \fIx\fP が [\-1,\ 1] の範囲に入っていない
+\fIerrno\fP に \fBEDOM\fP が設定される。 不正 (invalid) 浮動小数点例外 (\fBFE_INVALID\fP)  が上がる。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw24 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBasin\fP(),
+\fBasinf\fP(),
+\fBasinl\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.PP
+The variant returning \fIdouble\fP also conforms to SVr4, 4.3BSD, C89.
+.SH 関連項目
+\fBacos\fP(3), \fBatan\fP(3), \fBatan2\fP(3), \fBcasin\fP(3), \fBcos\fP(3), \fBsin\fP(3),
+\fBtan\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/assert.3 b/manual/LDP_man-pages/draft/man3/assert.3
new file mode 100644 (file)
index 0000000..47784ae
--- /dev/null
@@ -0,0 +1,98 @@
+.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" Modified Sat Jul 24 21:42:42 1993 by Rik Faith <faith@cs.unc.edu>
+.\" Modified Tue Oct 22 23:44:11 1996 by Eric S. Raymond <esr@thyrsus.com>
+.\" Modified Thu Jun  2 23:44:11 2016 by Nikos Mavrogiannopoulos <nmav@redhat.com>
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1996 Kentaro OGAWA
+.\"         all rights reserved.
+.\" Translated Sun, 14 Jul 1996 01:33:26 +0900
+.\"         by Kentaro OGAWA <k_ogawa@oyna.cc.muroran-it.ac.jp>
+.\" Updated Fri  6 Oct JST 2000 by Kentaro Shirakata <argrath@ub32.org>
+.\" Updated Thu 19 Sep JST 2002 by Kentaro Shirakata <argrath@ub32.org>
+.\"
+.TH ASSERT 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+assert \- 診断が偽の時にプログラムを中止する
+.SH 書式
+.nf
+\fB#include <assert.h>\fP
+.PP
+\fBvoid assert(scalar \fP\fIexpression\fP\fB);\fP
+.fi
+.SH 説明
+This macro can help programmers find bugs in their programs, or handle
+exceptional cases via a crash that will produce limited debugging output.
+.PP
+If \fIexpression\fP is false (i.e., compares equal to zero), \fBassert\fP()
+prints an error message to standard error and terminates the program by
+calling \fBabort\fP(3).  The error message includes the name of the file and
+function containing the \fBassert\fP()  call, the source code line number of
+the call, and the text of the argument; something like:
+.PP
+.in +4n
+.EX
+prog: some_file.c:16: some_func: Assertion \`val == 0\(aq failed.
+.EE
+.in
+.PP
+If the macro \fBNDEBUG\fP is defined at the moment \fI<assert.h>\fP was
+last included, the macro \fBassert\fP()  generates no code, and hence does
+nothing at all.  It is not recommended to define \fBNDEBUG\fP if using
+\fBassert\fP()  to detect error conditions since the software may behave
+non\-deterministically.
+.SH 返り値
+値は返されない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBassert\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.sp 1
+.SH 準拠
+.\" See Defect Report 107 for more details.
+POSIX.1\-2001, POSIX.1\-2008, C89, C99.  In C89, \fIexpression\fP is required to
+be of type \fIint\fP and undefined behavior results if it is not, but in C99 it
+may have any scalar type.
+.SH バグ
+\fBassert\fP()  は、マクロとして実装されている。すなわち、 試されている式が副作用を持っている場合には、 マクロ \fBNDEBUG\fP
+が定義されているかどうかに依存して、プログラムの振舞いは異なるだろう。 これによって、バグ出しするときには消えてしまう
+ハイゼンバグ(Heisenbugs)を生み出すだろう。
+.SH 関連項目
+\fBabort\fP(3), \fBassert_perror\fP(3), \fBexit\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/assert_perror.3 b/manual/LDP_man-pages/draft/man3/assert_perror.3
new file mode 100644 (file)
index 0000000..c55ff2c
--- /dev/null
@@ -0,0 +1,79 @@
+.\" Copyright (C) 2002 Andries Brouwer <aeb@cwi.nl>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" This replaces an earlier man page written by Walter Harms
+.\" <walter.harms@informatik.uni-oldenburg.de>.
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2003  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated Tue Jul  8 05:09:37 JST 2003
+.\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH ASSERT_PERROR 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+assert_perror \- test errnum and abort
+.SH 書式
+.nf
+\fB#define _GNU_SOURCE\fP         /* feature_test_macros(7) 参照 */
+\fB#include <assert.h>\fP
+.PP
+\fBvoid assert_perror(int \fP\fIerrnum\fP\fB);\fP
+.fi
+.SH 説明
+最後に \fI<assert.h>\fP がインクルードされた時にマクロ \fBNDEBUG\fP が定義されていた場合、マクロ
+\fBassert_perror\fP()  は何のコードも生成せず、したがって全く何もしない。 そうでない場合、マクロ \fBassert_perror\fP()
+は標準エラーにエラーメッセージを表示し、 \fIerrnum\fP が 0 でない場合には \fBabort\fP(3)  を呼び出してプログラムを終了させる。
+メッセージには、ファイル名、マクロ呼び出しがあった関数名と行番号、 \fIstrerror(errnum)\fP の出力が含まれる。
+.SH 返り値
+値は返されない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBassert_perror\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.sp 1
+.SH 準拠
+これは GNU による拡張である。
+.SH バグ
+assert マクロの目的は、プログラマがプログラム中のバグを探す手助けをすることであり、コーディング間違いがない場合には何が起こることはありえない。
+しかしながら、システムコールやライブラリコールの場合、状況がかなり違っていて、
+エラーが返されることがありえるし、実際あるだろう。そしてそのような状況でも テストされるべきである。この場合には、 \fBNDEBUG\fP
+を定義することで無効にできる assert ではなく、適切なエラー処理コードで対処すべきである。 このマクロは決して使わないこと。
+.SH 関連項目
+\fBabort\fP(3), \fBassert\fP(3), \fBexit\fP(3), \fBstrerror\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/atan.3 b/manual/LDP_man-pages/draft/man3/atan.3
new file mode 100644 (file)
index 0000000..48e8aad
--- /dev/null
@@ -0,0 +1,114 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 2002-07-27 by Walter Harms
+.\"    (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1996 Kenji Kajiwara and Kentaro Ogawa
+.\"         all rights reserved.
+.\" Translated Sat, 13 Jul 1996 17:50:45 JST
+.\"         by Kenji Kajiwara and Kentaro Ogawa
+.\" Proof Reading: Takashi Yoshino
+.\" Updated Tue Aug  5 23:16:48 JST 2003
+.\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2008-09-14, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH ATAN 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+atan, atanf, atanl \- 逆正接(arc tangent)関数
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBdouble atan(double \fP\fIx\fP\fB);\fP
+\fBfloat atanf(float \fP\fIx\fP\fB);\fP
+\fBlong double atanl( long double \fP\fIx\fP\fB);\fP
+.PP
+.fi
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBatanf\fP(), \fBatanl\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad b
+.SH 説明
+These functions calculate the principal value of the arc tangent of \fIx\fP;
+that is the value whose tangent is \fIx\fP.
+.SH 返り値
+成功すると、これらの関数は \fIx\fP の逆正接の主値をラジアン単位で返す。 返り値は [\-pi/2,\ pi/2] の範囲となる。
+.PP
+\fIx\fP が NaN の場合、NaN が返される。
+.PP
+\fIx\fP が +0 (\-0) の場合、+0 (\-0) が返される。
+.PP
+.\"
+.\" POSIX.1-2001 documents an optional range error for subnormal x;
+.\" glibc 2.8 does not do this.
+\fIx\fP が正の無限大 (負の無限大) の場合、+pi/2 (\-pi/2) が返される。
+.SH エラー
+エラーは発生しない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw24 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBatan\fP(),
+\fBatanf\fP(),
+\fBatanl\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.PP
+The variant returning \fIdouble\fP also conforms to SVr4, 4.3BSD, C89.
+.SH 関連項目
+\fBacos\fP(3), \fBasin\fP(3), \fBatan2\fP(3), \fBcarg\fP(3), \fBcatan\fP(3), \fBcos\fP(3),
+\fBsin\fP(3), \fBtan\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/atan2.3 b/manual/LDP_man-pages/draft/man3/atan2.3
new file mode 100644 (file)
index 0000000..b964e1a
--- /dev/null
@@ -0,0 +1,145 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 2002-07-27 by Walter Harms
+.\"    (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1996 Kenji Kajiwara and Kentaro Ogawa
+.\"         all rights reserved.
+.\" Translated Sat, 13 Jul 1996 17:50:45 JST
+.\"         by Kenji Kajiwara and Kentaro Ogawa
+.\" Proof Reading: Takashi Yoshino
+.\" Updated Tue Aug  5 23:16:48 JST 2003
+.\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2008-09-15, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH ATAN2 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+atan2, atan2f, atan2l \- 二つの変数に対する逆正接(arc tangent)関数
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBdouble atan2(double \fP\fIy\fP\fB, double \fP\fIx\fP\fB);\fP
+\fBfloat atan2f(float \fP\fIy\fP\fB, float \fP\fIx\fP\fB);\fP
+\fBlong double atan2l(long double \fP\fIy\fP\fB, long double \fP\fIx\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBatan2f\fP(), \fBatan2l\fP():
+.RS
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad b
+.SH 説明
+These functions calculate the principal value of the arc tangent of \fIy/x\fP,
+using the signs of the two arguments to determine the quadrant of the
+result.
+.SH 返り値
+成功すると、これらの関数は \fIy/x\fP の逆正接の主値をラジアン単位で返す。 返り値は [\-pi,\ pi] の範囲となる。
+.PP
+\fIy\fP が +0 (\-0) で \fIx\fP が 0 未満の場合、+pi (\-pi) が返される。
+.PP
+\fIy\fP が +0 (\-0) で \fIx\fP が 0 より大きい場合、+0 (\-0) が返される。
+.PP
+\fIy\fP が 0 未満で \fIx\fP が +0 か \-0 の場合、\-pi/2 が返される。
+.PP
+\fIy\fP が 0 より大きく \fIx\fP が +0 か \-0 の場合、pi/2 が返される。
+.PP
+.\" POSIX.1 says:
+.\" If
+.\" .I x
+.\" is 0, a pole error shall not occur.
+.\"
+\fIx\fP か \fIy\fP のいずかが NaN の場合、NaN が返される。
+.PP
+.\" POSIX.1 says:
+.\" If the result underflows, a range error may occur and
+.\" .I y/x
+.\" should be returned.
+.\"
+\fIy\fP が +0 (\-0) で \fIx\fP が \-0 の場合、+pi (\-pi) が返される。
+.PP
+\fIy\fP が +0 (\-0) で \fIx\fP が +0 の場合、+0 (\-0) が返される。
+.PP
+\fIy\fP が 0 より大きい (小さい) 有限値で \fIx\fP が負の無限大の場合、+pi (\-pi) が返される。
+.PP
+\fIy\fP が 0 より大きい (小さい) 有限値で \fIx\fP が正の無限大の場合、+0 (\-0) が返される。
+.PP
+\fIy\fP が正の無限大 (負の無限大) で \fIx\fP が有限値の場合、pi/2 (\-pi/2) が返される。
+.PP
+\fIy\fP が正の無限大 (負の無限大) で \fIx\fP が負の無限大の場合、+3*pi/4 (\-3*pi/4) が返される。
+.PP
+.\"
+.\" POSIX.1 says:
+.\" If both arguments are 0, a domain error shall not occur.
+\fIy\fP が正の無限大 (負の無限大) で \fIx\fP が正の無限大の場合、+pi/4 (\-pi/4) が返される。
+.SH エラー
+.\" POSIX.1 documents an optional underflow error
+.\" glibc 2.8 does not do this.
+エラーは発生しない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw28 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBatan2\fP(),
+\fBatan2f\fP(),
+\fBatan2l\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.PP
+The variant returning \fIdouble\fP also conforms to SVr4, 4.3BSD, C89.
+.SH 関連項目
+\fBacos\fP(3), \fBasin\fP(3), \fBatan\fP(3), \fBcarg\fP(3), \fBcos\fP(3), \fBsin\fP(3),
+\fBtan\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/atanh.3 b/manual/LDP_man-pages/draft/man3/atanh.3
new file mode 100644 (file)
index 0000000..37cd316
--- /dev/null
@@ -0,0 +1,139 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 2002-07-27 by Walter Harms
+.\"    (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1996 Kenji Kajiwara and Kentaro Ogawa
+.\"         all rights reserved.
+.\" Translated Sat, 13 Jul 1996 17:58:16 JST
+.\"         by Kenji Kajiwara and Kentaro Ogawa
+.\" Proof Reading: Takashi Yoshino
+.\" Updated Tue Aug  5 23:16:48 JST 2003
+.\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2008-09-14, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH ATANH 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+atanh, atanhf, atanhl \- 逆双曲線正接(inverse hyperbolic tangent)関数
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBdouble atanh(double \fP\fIx\fP\fB);\fP
+\fBfloat atanhf(float \fP\fIx\fP\fB);\fP
+\fBlong double atanhl(long double \fP\fIx\fP\fB);\fP
+.PP
+.fi
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBatanh\fP():
+.RS 4
+.\"    || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || _XOPEN_SOURCE\ >=\ 500
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.PP
+\fBatanhf\fP(), \fBatanhl\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad b
+.SH 説明
+These functions calculate the inverse hyperbolic tangent of \fIx\fP; that is
+the value whose hyperbolic tangent is \fIx\fP.
+.SH 返り値
+成功すると、これらの関数は \fIx\fP の逆双曲線正接を返す。
+.PP
+\fIx\fP が NaN の場合、NaN が返される。
+.PP
+\fIx\fP が +0 (\-0) の場合、+0 (\-0) が返される。
+.PP
+\fIx\fP が +1 か \-1 の場合、 極エラー (pole error) が発生し、 関数の種類に応じて、数学的に正しい符号の
+\fBHUGE_VAL\fP, \fBHUGE_VALF\fP, \fBHUGE_VALL\fP がそれぞれ返される。
+.PP
+.\"
+.\" POSIX.1-2001 documents an optional range error for subnormal x;
+.\" glibc 2.8 does not do this.
+\fIx\fP の絶対値が 1 より大きい場合、 領域エラー (domain error) が発生し、 NaN が返される。
+.SH エラー
+これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
+.PP
+以下のエラーが発生する可能性がある。
+.TP 
+領域エラー (domain error): \fIx\fP が \-1 より小さいか +1 より大きい
+\fIerrno\fP に \fBEDOM\fP が設定される。 不正 (invalid) 浮動小数点例外 (\fBFE_INVALID\fP)  が上がる。
+.TP 
+極エラー (pole error): \fIx\fP が +1 か \-1
+\fIerrno\fP に \fBERANGE\fP が設定される (「バグ」の節も参照)。 0 による除算 (divide\-by\-zero) 浮動小数点例外
+(\fBFE_DIVBYZERO\fP)  が上がる。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw28 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBatanh\fP(),
+\fBatanhf\fP(),
+\fBatanhl\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.PP
+The variant returning \fIdouble\fP also conforms to SVr4, 4.3BSD.
+.SH バグ
+.\" Bug: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6759
+.\" This can be seen in sysdeps/ieee754/k_standard.c
+glibc 2.9 とそれ以前のバージョンでは、 極エラーが発生した場合、POSIX で要求されている \fBERANGE\fP ではなく \fBEDOM\fP が
+\fIerrno\fP に設定される。 バージョン 2.10 以降の glibc では、正しい動作をする。
+.SH 関連項目
+\fBacosh\fP(3), \fBasinh\fP(3), \fBcatanh\fP(3), \fBcosh\fP(3), \fBsinh\fP(3), \fBtanh\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/atexit.3 b/manual/LDP_man-pages/draft/man3/atexit.3
new file mode 100644 (file)
index 0000000..3d59df9
--- /dev/null
@@ -0,0 +1,146 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified 1993-03-29, David Metcalfe
+.\" Modified 1993-07-24, Rik Faith (faith@cs.unc.edu)
+.\" Modified 2003-10-25, Walter Harms
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1996 Kentaro OGAWA
+.\"         all rights reserved.
+.\" Translated 2006-07-14, Kentaro OGAWA <k_ogawa@oyna.cc.muroran-it.ac.jp>
+.\" Updated & Modified 2004-05-23, Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated 2008-12-26, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.15
+.\"
+.TH ATEXIT 3 2020\-06\-09 Linux "Linux Programmer's Manual"
+.SH 名前
+atexit \- プロセスが正常終了した時に呼び出される関数を登録する
+.SH 書式
+.nf
+\fB#include <stdlib.h>\fP
+.PP
+\fBint atexit(void (*\fP\fIfunction\fP\fB)(void));\fP
+.fi
+.SH 説明
+\fBatexit\fP()  関数は、与えられた \fIfunction\fP を、 \fBexit\fP(3)  やプログラムの \fImain\fP()
+関数からの返りを通じて、プロセスが正常終了した時に呼び出される 関数として登録する。 ここで定義された関数は、登録した順番とは逆の順番で呼び出される。
+登録した関数に引き数は渡されない。
+.PP
+同じ関数を複数回登録してもよい。 登録された関数は登録 1 回につき 1 回呼び出される。
+.PP
+.\" POSIX.1-2001, POSIX.1-2008
+POSIX.1 requires that an implementation allow at least \fBATEXIT_MAX\fP (32)
+such functions to be registered.  The actual limit supported by an
+implementation can be obtained using \fBsysconf\fP(3).
+.PP
+\fBfork\fP(2) で作成された場合、子プロセスは親プロセスの登録のコピーを継承する。
+\fBexec\fP(3) ファミリーの関数の場合、呼び出しに成功すると、 全ての登録が削除される。
+.SH 返り値
+\fBatexit\fP()  関数は、関数登録が成功した時には 0 を返す。 その他の場合には 0 以外の値を返す。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBatexit\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.sp 1
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, C89, C99, SVr4, 4.3BSD.
+.SH 注意
+\fBatexit\fP()  (と \fBon_exit\fP(3))  を使って登録された関数は、
+シグナルの配送によりプロセスが異常終了した場合には呼び出されない。
+.PP
+If one of the registered functions calls \fB_exit\fP(2), then any remaining
+functions are not invoked, and the other process termination steps performed
+by \fBexit\fP(3)  are not performed.
+.PP
+.\" POSIX.1-2001, POSIX.1-2008
+.\" This can happen on OpenBSD 4.2 for example, and is documented
+.\" as occurring on FreeBSD as well.
+.\" Glibc does "the Right Thing" -- invocation of the remaining
+.\" exit handlers carries on as normal.
+POSIX.1 says that the result of calling \fBexit\fP(3)  more than once (i.e.,
+calling \fBexit\fP(3)  within a function registered using \fBatexit\fP())  is
+undefined.  On some systems (but not Linux), this can result in an infinite
+recursion; portable programs should not invoke \fBexit\fP(3)  inside a function
+registered using \fBatexit\fP().
+.PP
+\fBatexit\fP()  と \fBon_exit\fP(3)  は、同じリストに対して関数を登録する。 プロセスが正常に終了した際には、
+これらの二つの関数で登録された順序の逆順で、 登録された関数が起動される。
+.PP
+.\" In glibc, things seem to be handled okay
+According to POSIX.1, the result is undefined if \fBlongjmp\fP(3)  is used to
+terminate execution of one of the functions registered using \fBatexit\fP().
+.SS "Linux での注意"
+glibc 2.2.3 以降では、共有ライブラリがアンロードされるときに呼ばれる 関数を登録するために、共有ライブラリの中で \fBatexit\fP()
+(と \fBon_exit\fP(3))  を使用することができる。
+.SH EXAMPLES
+.EX
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+void
+bye(void)
+{
+    printf("That was all, folks\en");
+}
+
+int
+main(void)
+{
+    long a;
+    int i;
+
+    a = sysconf(_SC_ATEXIT_MAX);
+    printf("ATEXIT_MAX = %ld\en", a);
+
+    i = atexit(bye);
+    if (i != 0) {
+        fprintf(stderr, "cannot set exit function\en");
+        exit(EXIT_FAILURE);
+    }
+
+    exit(EXIT_SUCCESS);
+}
+.EE
+.SH 関連項目
+\fB_exit\fP(2), \fBdlopen\fP(3), \fBexit\fP(3), \fBon_exit\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/atof.3 b/manual/LDP_man-pages/draft/man3/atof.3
new file mode 100644 (file)
index 0000000..b205dd9
--- /dev/null
@@ -0,0 +1,82 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified Mon Mar 29 22:39:24 1993, David Metcalfe
+.\" Modified Sat Jul 24 21:39:22 1993, Rik Faith (faith@cs.unc.edu)
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1996 Kentaro OGAWA
+.\"         all rights reserved.
+.\" Translated Sat, 13 Jul 1996 22:47:32 +0900
+.\"         by Kentaro OGAWA <k_ogawa@oyna.cc.muroran-it.ac.jp>
+.\"
+.TH ATOF 3 2016\-12\-12 GNU "Linux Programmer's Manual"
+.SH 名前
+atof \- 文字列を double 型の数値に変換
+.SH 書式
+.nf
+\fB#include <stdlib.h>\fP
+.PP
+\fBdouble atof(const char *\fP\fInptr\fP\fB);\fP
+.fi
+.SH 説明
+\fBatof\fP()  関数は、\fInptr\fPによって指示される文字列のはじめの部分を \fIdouble\fP 型の数値に変換する。 この振る舞いは、
+\fBatof\fP()  関数がエラーを見つけないことを除いては、
+.PP
+.in +4n
+.EX
+strtod(nptr, NULL);
+.EE
+.in
+.PP
+と同じである。
+.SH 返り値
+変換された値。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBatof\fP()
+T}     Thread safety   MT\-Safe locale
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, C89, C99, SVr4, 4.3BSD.
+.SH 関連項目
+\fBatoi\fP(3), \fBatol\fP(3), \fBstrfromd\fP(3), \fBstrtod\fP(3), \fBstrtol\fP(3),
+\fBstrtoul\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/basename.3 b/manual/LDP_man-pages/draft/man3/basename.3
new file mode 100644 (file)
index 0000000..7da10db
--- /dev/null
@@ -0,0 +1,146 @@
+.\" Copyright (c) 2000 by Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" Created, 14 Dec 2000 by Michael Kerrisk
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2001 NAKANO Takeo all rights reserved.
+.\" Translated 2001-03-31, NAKANO Takeo <nakano@apm.seikei.ac.jp>
+.\" Updated 2005-02-26, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2007-05-01, Akihiro MOTOKI, LDP v2.46
+.\"
+.TH BASENAME 3 2020\-06\-09 GNU "Linux Programmer's Manual"
+.SH 名前
+basename, dirname \- パス名を解析して各部分を取り出す
+.SH 書式
+.nf
+\fB#include <libgen.h>\fP
+.PP
+\fBchar *dirname(char *\fP\fIpath\fP\fB);\fP
+.PP
+\fBchar *basename(char *\fP\fIpath\fP\fB);\fP
+.fi
+.SH 説明
+警告: \fBbasename\fP()  には異なるバージョンが 2つ存在する。下記の「注意」の節を参照のこと。
+.PP
+\fBdirname\fP()  と \fBbasename\fP()  は、ヌルで終端されたパス名の文字列を、 ディレクトリ部分・ファイル名部分に分割する。
+通常は、 \fBdirname\fP()  は最後の \(aq/\(aq までの部分 (最後の \(aq/\(aq は含まない) を返し、
+\fBbasename\fP()  は最後の \(aq/\(aq 以降の部分を返す。 文字列の末尾についた \(aq/\(aq
+文字は、パス名の一部とはみなされない。
+.PP
+\fIpath\fP に '/' 文字がない場合は、 \fBdirname\fP()  は文字列 "." を返し、 \fBbasename\fP()  は \fIpath\fP
+と同じ内容を返す。 \fIpath\fP が文字列 "/" に等しい場合は、 \fBdirname\fP()  も \fBbasename\fP()  も文字列 "/"
+を返す。 \fIpath\fP が ヌルポインターだったり、空の文字列を指していた場合は、 \fBdirname\fP()  も \fBbasename\fP()
+も文字列 "." を返す。
+.PP
+\fBdirname\fP()  の返した文字列、 "/"、 \fBbasename\fP()  の返した文字列、 を順に結合すると、完全なパス名が得られる。
+.PP
+\fBdirname\fP()  と \fBbasename\fP()  は、いずれも \fIpath\fP の内容を変更することがある。
+したがって、これらの関数を呼び出す際には コピーを渡すのが望ましい。
+.PP
+これらの関数は、静的に割り当てられたメモリーへのポインターを返すことがあり、 これらの領域は後の関数呼び出しで上書きされるかもしれない。
+また、これらの関数は \fIpath\fP の一部分を指すポインターを返すこともある。そのため、 \fIpath\fP
+で参照される文字列は、関数が返すポインターが不要になるまでは 変更したり free したりすべきではない。
+.PP
+以下の一連の例 (SUSv2 から引用) は、 いろいろな path に対して \fBdirname\fP()  と \fBbasename\fP()
+が返す文字列を表したものである。
+.RS
+.TS
+lb lb lb
+l l l l.
+path           dirname basename
+/usr/lib       /usr    lib
+/usr/          /       usr
+usr            .       usr
+/              /       /
+\&.            .       .
+\&..           .       ..
+.TE
+.RE
+.SH 返り値
+\fBdirname\fP()  と \fBbasename\fP()  は、いずれもヌルで終端された文字列へのポインターを返す。 (これらのポインターを
+\fBfree\fP(3)  に渡さないこと。)
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw21 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBbasename\fP(),
+\fBdirname\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+\fBbasename\fP()  には 2種類の異なるバージョンがある。 一つはすでに説明した POSIX バージョンであり、 もう一つは GNU
+バージョンである。 GNU バージョンを使用するには以下のようにする。
+.PP
+.in +4n
+.EX
+\fB    #define _GNU_SOURCE\fP         /* See feature_test_macros(7) */
+\fB#include <string.h>\fP
+.EE
+.in
+.PP
+GNU バージョンは引き数を変更することはなく、 \fIpath\fP の末尾が '/'の場合は空の文字列を返す。 特に \fIpath\fP が "/"
+の場合も空文字列を返す。 \fBdirname\fP()  には GNU バージョンはない。
+.PP
+glibc では、 \fI<libgen.h>\fP をインクルードすると POSIX バージョンの \fBbasename\fP()
+が使用され、それ以外の場合は GNU バージョンとなる。
+.SH バグ
+In the glibc implementation, the POSIX versions of these functions modify
+the \fIpath\fP argument, and segfault when called with a static string such as
+"/usr/".
+.PP
+Before glibc 2.2.1, the glibc version of \fBdirname\fP()  did not correctly
+handle pathnames with trailing \(aq/\(aq characters, and generated a
+segfault if given a NULL argument.
+.SH EXAMPLES
+The following code snippet demonstrates the use of \fBbasename\fP()  and
+\fBdirname\fP():
+.in +4n
+.EX
+char *dirc, *basec, *bname, *dname;
+char *path = "/etc/passwd";
+
+dirc = strdup(path);
+basec = strdup(path);
+dname = dirname(dirc);
+bname = basename(basec);
+printf("dirname=%s, basename=%s\en", dname, bname);
+.EE
+.in
+.SH 関連項目
+\fBbasename\fP(1), \fBdirname\fP(1)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/bindresvport.3 b/manual/LDP_man-pages/draft/man3/bindresvport.3
new file mode 100644 (file)
index 0000000..86e10ac
--- /dev/null
@@ -0,0 +1,108 @@
+.\" Copyright (C) 2007, Michael Kerrisk <mtk.manpages@gmail.com>
+.\" and Copyright (C) 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" 2007-05-31, mtk: Rewrite and substantial additional text.
+.\" 2008-12-03, mtk: Rewrote some pieces and fixed some errors
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1999 Shouichi Saito all rights reserved.
+.\" Translated 1999-08-28, Shouichi Saito <ss236rx@ymg.urban.ne.jp>
+.\" Proofed 1999-09-25, NAKANO Takeo <nakano@apm.seikei.ac.jp>
+.\" Updated 2007-06-11, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.54
+.\" Updated 2008-12-24, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.15
+.\" Updated 2013-07-24, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH BINDRESVPORT 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+bindresvport \- ソケットを特権 IP ポートにバインドする
+.SH 書式
+.nf
+\fB#include <sys/types.h>\fP
+\fB#include <netinet/in.h>\fP
+.PP
+\fBint bindresvport(int \fP\fIsockfd\fP\fB, struct sockaddr_in *\fP\fIsin\fP\fB);\fP
+.fi
+.SH 説明
+.\" Glibc actually starts searching with a port # in the range 600 to 1023
+\fBbindresvport\fP()  is used to bind the socket referred to by the file
+descriptor \fIsockfd\fP to a privileged anonymous IP port, that is, a port
+number arbitrarily selected from the range 512 to 1023.
+.PP
+\fBbindresvport\fP()  によって実行された \fBbind\fP(2)  が成功し、 \fIsin\fP が NULL
+以外の場合、実際に割り当てられたポート番号が \fIsin\->sin_port\fP に入れて返される。
+.PP
+\fIsin\fP には NULL を指定することもでき、その場合には \fIsin\->sin_family\fP は暗黙のうちに \fBAF_INET\fP
+とみなされる。 しかし、この場合には、 \fBbindresvport\fP()  は実際に割り当てられたポート番号を返す手段を持たない
+(割り当てられたポート番号は、後で \fBgetsockname\fP(2)  を使って取得できる)。
+.SH 返り値
+\fBbindresvport\fP()  は成功すると 0 を返す。それ以外の場合、\-1 を返し、 \fIerrno\fP にエラーの原因を示す値を設定する。
+.SH エラー
+\fBbindresvport\fP()  は \fBbind\fP(2)  と同じ原因で失敗する可能性がある。 さらに、以下のエラーが発生することがある:
+.TP 
+\fBEACCES\fP
+The calling process was not privileged (on Linux: the calling process did
+not have the \fBCAP_NET_BIND_SERVICE\fP capability in the user namespace
+governing its network namespace).
+.TP 
+\fBEADDRINUSE\fP
+全ての特権ポートが使用中である。
+.TP 
+\fBEAFNOSUPPORT\fP (glibc 2.7 以前では \fBEPFNOSUPPORT\fP)
+\fIsin\fP が NULL 以外で、かつ \fIsin\->sin_family\fP が \fBAF_INET\fP でなかった。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l lw23.
+インターフェース       属性  値
+T{
+\fBbindresvport\fP()
+T}     Thread safety   T{
+.\" commit f6da27e53695ad1cc0e2a9490358decbbfdff5e5
+glibc >= 2.17: MT\-Safe
+.br
+glibc < 2.17: MT\-Unsafe
+T}
+.TE
+.PP
+The \fBbindresvport\fP()  function uses a static variable that was not
+protected by a lock before glibc 2.17, rendering the function MT\-Unsafe.
+.SH 準拠
+Not in POSIX.1.  Present on the BSDs, Solaris, and many other systems.
+.SH 注意
+\fBbindresvport\fP()  のいくつかの実装と異なり、glibc の実装では呼び出し元が \fIsin\->sin_port\fP
+で渡した値はどんな値であっても無視される。
+.SH 関連項目
+\fBbind\fP(2), \fBgetsockname\fP(2)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/bsd_signal.3 b/manual/LDP_man-pages/draft/man3/bsd_signal.3
new file mode 100644 (file)
index 0000000..e4a342c
--- /dev/null
@@ -0,0 +1,99 @@
+.\" Copyright (c) 2007 Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2007  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2007-06-02, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH BSD_SIGNAL 3 2019\-03\-06 "" "Linux Programmer's Manual"
+.SH 名前
+bsd_signal \- BSD 方式のシグナル処理
+.SH 書式
+\fB#include <signal.h>\fP
+.PP
+\fBtypedef void (*sighandler_t)(int);\fP
+.PP
+\fBsighandler_t bsd_signal(int \fP\fIsignum\fP\fB, sighandler_t \fP\fIhandler\fP\fB);\fP
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBbsd_signal\fP():
+.RS 4
+.\"    || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED
+Since glibc 2.26:
+    _XOPEN_SOURCE >= 500
+        && ! (_POSIX_C_SOURCE\ >=\ 200809L)
+.br
+Glibc 2.25 and earlier:
+    _XOPEN_SOURCE
+.RE
+.ad b
+.SH 説明
+\fBbsd_signal\fP()  関数は \fBsignal\fP(2)  と同じ引き数をとり、同じ処理を実行する。
+.PP
+両者の違いは、 \fBbsd_signal\fP()  では信頼性のあるシグナル処理方式の提供が保証されていることである。
+信頼性のあるシグナル処理方式は以下の特徴を持つ。 a) ハンドラーが起動された場合に、シグナルの処理方法 (disposition) が
+デフォルトにリセットされない、 b) シグナルハンドラーの実行中は、それ以降に発生した同じシグナルの配送が ブロックされない、 c)
+ハンドラーが停止中の (blocking している) システムコールを 中断した場合、そのシステムコールが自動的に再開される。
+移植性が必要なアプリケーションでは、 \fBsignal\fP(2)  でこれらが保証されることを前提にすべきではない。
+.SH 返り値
+\fBbsd_signal\fP()  関数はシグナルハンドラーの直前の値を返す。 エラーの場合、 \fBSIG_ERR\fP を返す。
+.SH エラー
+\fBsignal\fP(2)  と同じ。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBbsd_signal\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+4.2BSD, POSIX.1\-2001.  POSIX.1\-2008 では \fBbsd_signal\fP()  の仕様が削除されている。 代わりに、
+\fBsigaction\fP(2)  の使用が推奨されている。
+.SH 注意
+\fBbsd_signal\fP()  の使用は避けるべきである。代わりに \fBsigaction\fP(2)  を使うこと。
+.PP
+最近の Linux システムでは、 \fBbsd_signal\fP()  と \fBsignal\fP(2)  は等価である。しかし、以前のシステムでは、
+\fBsignal\fP(2)  は信頼性に欠けるシグナル処理方式を提供していた。 詳細は \fBsignal\fP(2)  を参照。
+.PP
+\fIsighandler_t\fP を使っているのは GNU による拡張である。 この型は機能検査マクロ \fB_GNU_SOURCE\fP
+を定義した場合にのみ定義される。
+.SH 関連項目
+\fBsigaction\fP(2), \fBsignal\fP(2), \fBsysv_signal\fP(3), \fBsignal\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/bsearch.3 b/manual/LDP_man-pages/draft/man3/bsearch.3
new file mode 100644 (file)
index 0000000..5bc79c7
--- /dev/null
@@ -0,0 +1,130 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified Mon Mar 29 22:41:16 1993, David Metcalfe
+.\" Modified Sat Jul 24 21:35:16 1993, Rik Faith (faith@cs.unc.edu)
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1998 NAKANO Takeo all rights reserved.
+.\" Translated 1998-03-18, NAKANO Takeo <nakano@apm.seikei.ac.jp>
+.\" Updated 2005-02-26, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH BSEARCH 3 2020\-11\-01 "" "Linux Programmer's Manual"
+.SH 名前
+bsearch \- ソートされた配列を二分木検索 (binary search) する
+.SH 書式
+.nf
+\fB#include <stdlib.h>\fP
+.PP
+\fBvoid *bsearch(const void *\fP\fIkey\fP\fB, const void *\fP\fIbase\fP\fB,\fP
+\fB              size_t \fP\fInmemb\fP\fB, size_t \fP\fIsize\fP\fB,\fP
+\fB              int (*\fP\fIcompar\fP\fB)(const void *, const void *));\fP
+.fi
+.SH 説明
+\fBbsearch\fP()  関数は \fInmemb\fP 個のオブジェクトからなる配列を検索 する。配列の最初のメンバーへのポインターは \fIbase\fP
+によって与える。 ポインター \fIkey\fP で参照されるオブジェクトと一致するメンバーが返される。 配列中の各々のメンバーのサイズは \fIsize\fP
+によって指定する。
+.PP
+配列の内容は比較関数 \fIcompar\fP に基づき、昇順にソートされていなけれ ばならない。 \fIcompar\fP
+ルーチンは二つの引き数を取る関数で、一つ 目に \fIkey\fP へのポインター、次に配列のメンバーへのポインターを取る。 この順に指定したとき、
+\fIkey\fP が配列メンバーより小さいときには 負の整数を、大きいときには正の整数を、一致したときには 0 を、それぞれ \fIcompar\fP
+は返さなければならない。
+.SH 返り値
+\fBbsearch\fP()  関数は、配列のメンバーのうち、一致したものへのポインターを 返す。見つからなかったときは NULL を返す。 \fIkey\fP
+と一致したメンバーが 複数あるとき、そのうちのどのメンバーが返されるかはわからない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBbsearch\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.sp 1
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, C89, C99, SVr4, 4.3BSD.
+.SH EXAMPLES
+以下の例は、 \fBqsort\fP(3)  を使って構造体の配列の並び換えを行った後、 所望の要素を \fBbsearch\fP()
+を使って取得するものである。
+.PP
+.EX
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+struct mi {
+    int nr;
+    char *name;
+} months[] = {
+    { 1, "jan" }, { 2, "feb" }, { 3, "mar" }, { 4, "apr" },
+    { 5, "may" }, { 6, "jun" }, { 7, "jul" }, { 8, "aug" },
+    { 9, "sep" }, {10, "oct" }, {11, "nov" }, {12, "dec" }
+};
+
+#define nr_of_months (sizeof(months)/sizeof(months[0]))
+
+static int
+compmi(const void *m1, const void *m2)
+{
+    const struct mi *mi1 = m1;
+    const struct mi *mi2 = m2;
+    return strcmp(mi1\->name, mi2\->name);
+}
+
+int
+main(int argc, char **argv)
+{
+    qsort(months, nr_of_months, sizeof(months[0]), compmi);
+    for (int i = 1; i < argc; i++) {
+        struct mi key;
+        struct mi *res;
+
+        key.name = argv[i];
+        res = bsearch(&key, months, nr_of_months,
+                      sizeof(months[0]), compmi);
+        if (res == NULL)
+            printf("\(aq%s\(aq: unknown month\en", argv[i]);
+        else
+            printf("%s: month #%d\en", res\->name, res\->nr);
+    }
+    exit(EXIT_SUCCESS);
+}
+.EE
+.\" this example referred to in qsort.3
+.SH 関連項目
+\fBhsearch\fP(3), \fBlsearch\fP(3), \fBqsort\fP(3), \fBtsearch\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/canonicalize_file_name.3 b/manual/LDP_man-pages/draft/man3/canonicalize_file_name.3
new file mode 100644 (file)
index 0000000..4e64660
--- /dev/null
@@ -0,0 +1,80 @@
+.\" Copyright 2013 Michael Kerrisk <mtk.manpages@gmail.com>
+.\" (Replaces an earlier page by Walter Harms and Michael Kerrisk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2005 Akihiro MOTOKI all rights reserved.
+.\" Translated 2005-09-06, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2013-05-04, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2013-07-15, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH CANONICALIZE_FILE_NAME 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+canonicalize_file_name \- 正規化された絶対パス名を返す
+.SH 書式
+\fB#define _GNU_SOURCE\fP /* feature_test_macros(7) 参照 */
+.br
+\fB#include <stdlib.h>\fP
+.PP
+\fBchar *canonicalize_file_name(const char *\fP\fIpath\fP\fB);\fP
+.SH 説明
+\fBcanonicalize_file_name\fP() 関数は \fIpath\fP
+に対応する正規化された絶対パス名を示すヌル終端された文字列を返す。返された文字列では、シンボリックリンクや、パス名に含まれる \fI.\fP や \fI..\fP
+は展開される。連続するスラッシュ (\fI/\fP) 文字はスラッシュ一つに置換される。
+.PP
+返される文字列は \fBcanonicalize_file_name\fP() により動的に割り当てられる。呼び出し側は、必要なくなった際にはこの文字列を
+\fBfree\fP(3) で解放すべきである。
+.PP
+\fIcanonicalize_file_name(path)\fP は以下と等価である。
+.PP
+    realpath(path, NULL);
+.SH 返り値
+成功すると、 \fBcanonicalize_file_name\fP() はヌル終端された文字列を返す。エラーの場合
+(例えば、パス名の中に読み込めなかったり存在しないパスが含まれている場合など)、 \fBcanonicalize_file_name\fP() は NULL
+を返し、 \fIerrno\fP にエラー内容を示す値を設定する。
+.SH エラー
+\fBrealpath\fP(3) 参照。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw24 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBcanonicalize_file_name\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+この関数は GNU による拡張である。
+.SH 関連項目
+\fBreadlink\fP(2), \fBrealpath\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/catgets.3 b/manual/LDP_man-pages/draft/man3/catgets.3
new file mode 100644 (file)
index 0000000..c29fb35
--- /dev/null
@@ -0,0 +1,80 @@
+.\" Copyright 1993 Mitchum DSouza <m.dsouza@mrc-applied-psychology.cambridge.ac.uk>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" Updated, aeb, 980809
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
+.\"    all rights reserved.
+.\" Translated Tue Dec 16 19:43:01 JST 1997
+.\"    by HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
+.\" Updated & Modified Mon Mar 1 1999
+.\"       by NAKANO Takeo <nakano@apm.seikei.ac.jp>
+.\"
+.TH CATGETS 3 2019\-03\-06 "" "Linux Programmer's Manual"
+.SH 名前
+catgets \- メッセージカタログからメッセージを取り出す
+.SH 書式
+.nf
+\fB#include <nl_types.h>\fP
+.PP
+\fBchar *catgets(nl_catd \fP\fIcatalog\fP\fB, int \fP\fIset_number\fP\fB, int \fP\fImessage_number\fP\fB,\fP
+\fB              const char *\fP\fImessage\fP\fB);\fP
+.fi
+.SH 説明
+\fBcatgets\fP()  は catalog で指定されたメッセージカタログから、 セット \fIset_number\fP のメッセージ
+\fImessage_number\fP を読み取る。 \fIcatalog\fP は、 \fBcatopen\fP(3)  の呼び出しによって得られたカタログ
+ディスクリプターを指定する。 4番目の引数 \fImessage\fP は、指定のメッセージカタログが現在利用できない 場合に \fBcatgets\fP()
+が返すデフォルトのメッセージを指す。 メッセージテキストは内部のバッファー領域に格納されており、
+保存や変更を行う場合にはアプリケーション側でコピーする必要がある。 返される文字列は常にヌルバイト (\(aq\e0\(aq) で終端される。
+.SH 返り値
+成功した場合、 \fBcatgets\fP()  は内部のバッファー領域へのポインターを返す。 ここにはヌル文字で終端されたメッセージ文字列が格納されている。
+失敗した場合は \fImessage\fP を返す。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBcatgets\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+\fBcatgets\fP() 関数は libc.so.4.4.4c 以降でしか使えない。 Jan 1987 X/Open Portability Guide
+では、エラーの時に 返される値により微妙な指定をしている。 \fIcatalog\fP で指定されたメッセージカタログが利用できない場合は
+\fImessage\fP を返し、一方メッセージカタログはあるが指定したメッセージがない場合は 空の文字列が返される。 SUSv2
+ではこの二種類のエラーリターンは廃止され、 常に \fImessage\fP を返すことにしたようである。
+.SH 関連項目
+\fBcatopen\fP(3), \fBsetlocale\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/catopen.3 b/manual/LDP_man-pages/draft/man3/catopen.3
new file mode 100644 (file)
index 0000000..b8993eb
--- /dev/null
@@ -0,0 +1,143 @@
+.\" Copyright 1993 Mitchum DSouza <m.dsouza@mrc-applied-psychology.cambridge.ac.uk>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" Modified Thu Dec 13 22:51:19 2001 by Martin Schulze <joey@infodrom.org>
+.\" Modified 2001-12-14 aeb
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
+.\"    all rights reserved.
+.\" Translated Tue Dec 16 19:43:18 JST 1997
+.\"    by HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
+.\" Updated & Modified Mon Jan 14 06:48:39 JST 2002
+.\"     by Yuichi SATO <ysato@h4.dion.ne.jp>
+.\"
+.TH CATOPEN 3 2015\-08\-08 GNU "Linux Programmer's Manual"
+.SH 名前
+catopen, catclose \- メッセージカタログのオープン/クローズ
+.SH 書式
+\fB#include <nl_types.h>\fP
+.PP
+\fBnl_catd catopen(const char *\fP\fIname\fP\fB, int \fP\fIflag\fP\fB);\fP
+.PP
+\fBint catclose(nl_catd \fP\fIcatalog\fP\fB);\fP
+.SH 説明
+関数 \fBcatopen\fP()  はメッセージカタログをオープンし、カタログディスクリプターを返す。 このディスクリプターは \fBcatclose\fP()
+または \fBexecve\fP(2)  が呼び出されるまで有効である。 カタログディスクリプターを実装するために ファイルディスクリプターを使用すると、
+\fBFD_CLOEXEC\fP フラグが設定される。
+.PP
+引き数 \fIname\fP はオープンするメッセージカタログの名前を指定する。 \fIname\fP が絶対パスで指定されている場合 (すなわち
+\(aq/\(aq を含んでいる場合)、 \fIname\fP はメッセージカタログへのパス名である。 それ以外の場合、環境変数 \fBNLSPATH\fP が
+\fIname\fP とともに使用され \fB%N\fP を置き換える (\fBlocale\fP(7)  参照)。 プロセスが root 権限を持っているときに
+\fBNLSPATH\fP が使われるかどうかは指定されていない。 \fBNLSPATH\fP 環境変数が存在しないか、 \fBNLSPATH\fP
+で指定されたパスの中の どのパスにおいてもメッセージカタログをオープンできない場合、 実装で定義されているパスが使われる。 後者のデフォルトパスは、
+\fIflag\fP 引き数が \fBNL_CAT_LOCALE\fP の場合には \fBLC_MESSAGES\fP のロケール設定に依存し、 \fIflag\fP 引き数が
+0 の場合には \fBLANG\fP 環境変数に依存する。 ロケールの \fBLC_MESSAGES\fP を変更すると、
+オープンされているカタログディスクリプターが無効になるかもしれない。
+.PP
+\fBcatopen\fP()  の \fIflag\fP 引き数は、使用される言語のソースを示すために使われる。 \fBNL_CAT_LOCALE\fP
+に設定されると、 \fBLC_MESSAGES\fP の現在のロケール設定が使われる。 それ以外の場合は \fBLANG\fP 環境変数が使われる。
+.PP
+関数 \fBcatclose\fP()  は \fIcatalog\fP で指定されたメッセージカタログをクローズする。 これは、以降の \fIcatalog\fP
+で指定されるメッセージカタログへの全ての参照を無効にする。
+.SH 返り値
+関数 \fBcatopen\fP()  が成功すると、 \fInl_catd\fP 型のメッセージカタログディスクリプターを返す。 失敗した場合は
+\fI(nl_catdv) \-1\fP を返し、 \fIerrno\fP を設定してエラーを示す。 ここで起こり得るエラーの値には、 \fBopen\fP(2)
+の呼び出しの際に起こり得る全てのエラーの値が含まれる。
+.PP
+関数 \fBcatclose\fP()  は、成功した場合 0 を、失敗した場合 \-1 を返す。
+.SH 環境変数
+.TP 
+\fBLC_MESSAGES\fP
+\fBLC_MESSAGES\fP ロケール設定のソースになることも可能なので、 \fIflag\fP が \fBNL_CAT_LOCALE\fP
+に設定されている場合は、使用する言語を決定するのに使われる。
+.TP 
+\fBLANG\fP
+\fIflag\fP が 0 の場合、使用する言語を決定する。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBcatopen\fP()
+T}     Thread safety   MT\-Safe env
+T{
+\fBcatclose\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+.\" In XPG 1987, Vol. 3 it says:
+.\" .I "The flag argument of catopen is reserved for future use"
+.\" .IR "and should be set to 0" .
+.\"
+.\" It is unclear what the source was for the constants
+.\" .B MCLoadBySet
+.\" and
+.\" .B MCLoadAll
+.\" (see below).
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+.\" (Compare
+.\" .B MCLoadAll
+.\" below.)
+.\" .SS Linux notes
+.\" These functions are available for Linux since libc 4.4.4c.
+.\" In the case of linux libc4 and libc5, the catalog descriptor
+.\" .I nl_catd
+.\" is a
+.\" .BR mmap (2)'ed
+.\" area of memory and not a file descriptor.
+.\" The
+.\" .I flag
+.\" argument to
+.\" .BR catopen ()
+.\" should be either
+.\" .B MCLoadBySet
+.\" (=0) or
+.\" .B MCLoadAll
+.\" (=1).
+.\" The former value indicates that a set from the catalog is to be
+.\" loaded when needed, whereas the latter causes the initial call to
+.\" .BR catopen ()
+.\" to load the entire catalog into memory.
+.\" The default search path varies, but usually looks at a number of places below
+.\" .I /etc/locale
+.\" and
+.\" .IR /usr/lib/locale .
+The above is the POSIX.1 description.  The glibc value for \fBNL_CAT_LOCALE\fP
+is 1.  The default path varies, but usually looks at a number of places
+below \fI/usr/share/locale\fP.
+.SH 関連項目
+\fBcatgets\fP(3), \fBsetlocale\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/cbrt.3 b/manual/LDP_man-pages/draft/man3/cbrt.3
new file mode 100644 (file)
index 0000000..a8862ed
--- /dev/null
@@ -0,0 +1,109 @@
+.\" Copyright 1995 Jim Van Zandt <jrv@vanzandt.mv.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" changed `square root' into `cube root' - aeb, 950919
+.\"
+.\" Modified 2002-07-27 Walter Harms
+.\" (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 YOSHINO Takashi
+.\"       all rights reserved.
+.\" Translated Mon Jan 20 17:29:27 JST 1997
+.\"       by YOSHINO Takashi Yoshino <yoshino@civil.jcn.nihon-u.ac.jp>
+.\" Updated & Modified Fri Jul 25 22:03:54 JST 2003
+.\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2008-09-15, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH CBRT 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+cbrt, cbrtf, cbrtl \- 立方根を計算する関数
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBdouble cbrt(double \fP\fIx\fP\fB);\fP
+\fBfloat cbrtf(float \fP\fIx\fP\fB);\fP
+\fBlong double cbrtl(long double \fP\fIx\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBcbrt\fP():
+.br
+.RS 4
+.\"    || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || _XOPEN_SOURCE\ >=\ 500
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+\fBcbrtf\fP(), \fBcbrtl\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad b
+.SH 説明
+These functions return the (real) cube root of \fIx\fP.  This function cannot
+fail; every representable real value has a representable real cube root.
+.SH 返り値
+これらの関数は \fIx\fP の立方根を返す。
+.PP
+\fIx\fP が +0、\-0、正の無限大、負の無限大、NaN のいずれかの場合、 \fIx\fP が返される。
+.SH エラー
+エラーは発生しない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw24 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBcbrt\fP(),
+\fBcbrtf\fP(),
+\fBcbrtl\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+.\" .BR cbrt ()
+.\" was a GNU extension. It is now a C99 requirement.
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.SH 関連項目
+\fBpow\fP(3), \fBsqrt\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/ceil.3 b/manual/LDP_man-pages/draft/man3/ceil.3
new file mode 100644 (file)
index 0000000..f09425f
--- /dev/null
@@ -0,0 +1,112 @@
+.\" Copyright 2001 Andries Brouwer <aeb@cwi.nl>.
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 Ueyama Rui
+.\"         all rights reserved.
+.\" Translated Tue Feb 21 0:47:30 JST 1997
+.\"         by Ueyama Rui <ueyama@campusnet.or.jp>
+.\" Updated & Modified Fri Jul  6 20:35:28 JST 2001
+.\"         by Yuichi SATO <ysato@h4.dion.ne.jp>
+.\" Updated & Modified Sun Jan  9 23:39:35 JST 2005
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated 2008-09-15, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH CEIL 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+ceil, ceilf, ceill \- 引き数を下回らない最小の整数値
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBdouble ceil(double \fP\fIx\fP\fB);\fP
+\fBfloat ceilf(float \fP\fIx\fP\fB);\fP
+\fBlong double ceill(long double \fP\fIx\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBceilf\fP(), \fBceill\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad
+.SH 説明
+これらの関数は \fIx\fP より小さくない最小の整数値を返す。
+.PP
+例えば、 \fIceil(0.5)\fP は 1.0 であり、 \fIceil(\-0.5)\fP は 0.0 である。
+.SH 返り値
+これらの関数は \fIx\fP を下回らない整数値を返す。
+.PP
+\fIx\fP が整数、+0、\-0、NaN、無限のいずれかの場合、 \fIx\fP そのものが返される。
+.SH エラー
+エラーは発生しない。 POSIX.1\-2001 にはオーバーフローでの範囲エラー (range error) の 記載がある。「注意」の節を参照のこと。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw24 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBceil\fP(),
+\fBceilf\fP(),
+\fBceill\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.PP
+The variant returning \fIdouble\fP also conforms to SVr4, 4.3BSD, C89.
+.SH 注意
+.\" The POSIX.1-2001 APPLICATION USAGE SECTION discusses this point.
+SUSv2 と POSIX.1\-2001 にはオーバーフローに関する記述があり、 オーバーフローの場合には、 \fIerrno\fP を \fBERANGE\fP
+に設定するか、 \fBFE_OVERFLOW\fP 例外を発生することとされている。
+実際のところ、どの現行のマシンでも結果がオーバーフローを起こすことはないので、 このエラー処理は意味がない。
+(より正確に言うと、オーバーフローは指数部の最大値が 仮数部を表すビットの数より小さい場合にしか起こらない。 IEEE\-754 規格の 32 ビットと
+64 ビットの浮動小数では、 指数部の最大値はそれぞれ 128 と 1024 であり、 仮数部のビット数はそれぞれ 24 と 53 である。)
+.PP
+これらの関数が返す整数値は整数型 (\fIint\fP, \fIlong\fP など) に格納するには大き過ぎるかもしれない。
+オーバーフローが起こった場合の結果は分からないので、 オーバーフローを避けるため、アプリケーションでは整数型に代入する前に
+返された値の範囲確認を実行すべきである。
+.SH 関連項目
+\fBfloor\fP(3), \fBlrint\fP(3), \fBnearbyint\fP(3), \fBrint\fP(3), \fBround\fP(3),
+\fBtrunc\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/cfree.3 b/manual/LDP_man-pages/draft/man3/cfree.3
new file mode 100644 (file)
index 0000000..262c0b4
--- /dev/null
@@ -0,0 +1,117 @@
+.\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl)
+.\"
+.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
+.\" This is free documentation; you can redistribute it and/or
+.\" modify it under the terms of the GNU General Public License as
+.\" published by the Free Software Foundation; either version 2 of
+.\" the License, or (at your option) any later version.
+.\"
+.\" The GNU General Public License's references to "object code"
+.\" and "executables" are to be interpreted as the output of any
+.\" document formatting or typesetting system, including
+.\" intermediate and printed output.
+.\"
+.\" This manual is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public
+.\" License along with this manual; if not, see
+.\" <http://www.gnu.org/licenses/>.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2004 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated Mon Jul 19 04:38:03 JST 2004
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\"
+.TH CFREE 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+cfree \- 割り当てられたメモリーを解放する
+.SH 書式
+.nf
+.PP
+\fB#include <stdlib.h>\fP
+.PP
+/* SunOS 4 では */
+\fBint cfree(void *\fP\fIptr\fP\fB);\fP
+.PP
+/* glibc と FreeBSD libcompat では */
+\fBvoid cfree(void *\fP\fIptr\fP\fB);\fP
+.PP
+/* SCO OpenServer では */
+\fBvoid cfree(char *\fP\fIptr\fP\fB, unsigned \fP\fInum\fP\fB, unsigned \fP\fIsize\fP\fB);\fP
+.PP
+/* Solaris watchmalloc.so.1 では */
+\fBvoid cfree(void *\fP\fIptr\fP\fB, size_t \fP\fInelem\fP\fB, size_t \fP\fIelsize\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBcfree\fP():
+    Since glibc 2.19:
+        _DEFAULT_SOURCE
+    Glibc 2.19 and earlier:
+        _BSD_SOURCE || _SVID_SOURCE
+.SH 説明
+This function should never be used.  Use \fBfree\fP(3)  instead.  Starting with
+version 2.26, it has been removed from glibc.
+.SS "引き数が 1 つの cfree"
+glibc では、関数 \fBcfree\fP()  は \fBfree\fP(3)  の別名であり、「SunOS との互換性のために追加された」。
+.PP
+他のシステムでは、この名前の別の関数がある。 この宣言は \fI<stdlib.h>\fP に存在する場合もあるし、
+\fI<malloc.h>\fP に存在する場合もある。
+.SS "引き数が 3 つの cfree"
+SCO と Solaris のいくつかのバージョンでは、 引き数が 3 つの \fBcfree\fP()  が含まれる malloc ライブラリがある。
+これは明らかに \fBcalloc\fP(3)  に類似している。
+.PP
+何かを移植する時にこの関数が必要な場合、
+.PP
+.in +4n
+.EX
+#define cfree(p, n, s) free((p))
+.EE
+.in
+.PP
+をファイルに追加すること。
+.PP
+よく尋ねられる質問は 「\fBcalloc\fP(3)  で割り当てられたメモリーを解放するのに \fBfree\fP(3)  を使うことができるか、 それとも
+\fBcfree\fP()  を使う必要があるか」というものである。 答え: \fBfree\fP(3)  を使うこと。
+.PP
+SCO のマニュアルには以下のように記述されている: 「cfree ルーチンは iBCSe2 規格に従うために提供されており、 単に free
+を呼んでいるだけである。 cfree の num と size 引き数は使用されない。」
+.SH 返り値
+SunOS 版の \fBcfree\fP()  (\fBfree\fP(3)  の別名) は、成功した場合に 1 を返し、失敗した場合に 0 を返す。
+エラーの場合、 \fIerrno\fP が \fBEINVAL\fP に設定される: \fIptr\fP の値が \fBmalloc\fP()  系のルーチンの 1
+つで以前に割り当てられた ブロックへのポインターでない。
+.SH バージョン
+.\" commit 025b33ae84bb8f15b2748a1d8605dca453fce112
+The \fBcfree\fP()  function was removed from glibc in version 2.26.
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBcfree\fP()
+T}     Thread safety   MT\-Safe /* glibc では */
+.TE
+.SH 準拠
+SCO で用いられている引き数が 3 つの \fBcfree\fP()  は、iBCSe2 規格: Intel386 Binary Compatibility
+Specification, Edition 2 (Intel386 バイナリ互換仕様、第 2 版) に準拠する。
+.SH 関連項目
+\fBmalloc\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/clock.3 b/manual/LDP_man-pages/draft/man3/clock.3
new file mode 100644 (file)
index 0000000..aa6dc20
--- /dev/null
@@ -0,0 +1,93 @@
+.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" Modified Sat Jul 24 21:27:01 1993 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 14 Jun 2002, Michael Kerrisk <mtk.manpages@gmail.com>
+.\"    Added notes on differences from other UNIX systems with respect to
+.\"    waited-for children.
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1996 Hiroaki Nagoya
+.\"         all rights reserved.
+.\" Translated Mon Feb  3 15:35:19 JST 1997
+.\"         by Hiroaki Nagoya <nagoya@is.titech.ac.jp>
+.\" Updated Fri Sep 27 JST 2002 by Kentaro Shirakata <argrath@ub32.org>
+.\" Updated 2007-05-28, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.48
+.\"
+.TH CLOCK 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+clock \- プロセッサ時間の取得
+.SH 書式
+.nf
+\fB#include <time.h>\fP
+.PP
+\fBclock_t clock(void);\fP
+.fi
+.SH 説明
+\fBclock\fP()  はプログラムの使用したプロセッサ時間の近似値を返す。
+.SH 返り値
+返り値は \fIclock_t\fP 単位での CPU 時間である。 秒単位での値を得るためには \fBCLOCKS_PER_SEC\fP で割ればよい。
+使用したプロセッサ時間が得られない場合や、その値を表現できない場合、 この関数は \fI(clock_t)\ \-1\fP を返す。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBclock\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.sp 1
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, C89, C99.  XSI requires that \fBCLOCKS_PER_SEC\fP
+equals 1000000 independent of the actual resolution.
+.SH 注意
+C の標準規格ではプログラムの開始の時点ではどんな値が返ってきても かまわない。 移植性を最大限確保するためには、プログラムの開始時に
+\fBclock\fP()  を呼び出してその値を差し引くこと。
+.PP
+時刻は桁あふれする可能性がある点に注意すること。 \fBCLOCKS_PER_SEC\fP が 1000000 である 32 ビットシステムでは、
+この関数は約 72 分毎に同じ値を返すことになる。
+.PP
+.\" I have seen this behavior on Irix 6.3, and the OSF/1, HP/UX, and
+.\" Solaris manual pages say that clock() also does this on those systems.
+.\" POSIX.1-2001 doesn't explicitly allow this, nor is there an
+.\" explicit prohibition. -- MTK
+実装によっては、 \fBclock\fP()  で返される値に \fBwait\fP(2)  (あるいはその他の wait のような関数) で収集された
+子プロセスの時間が含まれる場合もある。 Linux では、 \fBclock\fP()  が返す値には wait された子プロセスの時間は含まれない。
+\fBtimes\fP(2)  関数は呼び出し元とその子プロセスに関する情報を (別々に) 明示的に返すので、より好ましいだろう。
+.PP
+glibc 2.17 以前では、 \fBclock\fP() は \fBtimes\fP(2) を使って実装されていた。 glibc 2.18 以降では、
+精度を向上させるため、 \fBclock_gettime\fP(2) (の \fBCLOCK_PROCESS_CPUTIME_ID\fP クロック)
+を使って実装されている。
+.SH 関連項目
+\fBclock_gettime\fP(2), \fBgetrusage\fP(2), \fBtimes\fP(2)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/clock_getcpuclockid.3 b/manual/LDP_man-pages/draft/man3/clock_getcpuclockid.3
new file mode 100644 (file)
index 0000000..e9dfa8e
--- /dev/null
@@ -0,0 +1,149 @@
+.\" Copyright (c) 2008, Linux Foundation, written by Michael Kerrisk
+.\" <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2013  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2013-07-31, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH CLOCK_GETCPUCLOCKID 3 2020\-11\-01 Linux "Linux Programmer's Manual"
+.SH 名前
+clock_getcpuclockid \- プロセスの CPU 時刻のクロック ID を取得する
+.SH 書式
+\fB#include <time.h>\fP
+.nf
+.PP
+\fBint clock_getcpuclockid(pid_t \fP\fIpid\fP\fB, clockid_t *\fP\fIclockid\fP\fB);\fP
+.fi
+.PP
+\fI\-lrt\fP とリンクする (バージョン 2.17 より前の glibc のみ)
+.PP
+.ad l
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBclock_getcpuclockid\fP():
+.RS 4
+_POSIX_C_SOURCE\ >=\ 200112L
+.RE
+.ad
+.SH 説明
+The \fBclock_getcpuclockid\fP()  function obtains the ID of the CPU\-time clock
+of the process whose ID is \fIpid\fP, and returns it in the location pointed to
+by \fIclockid\fP.  If \fIpid\fP is zero, then the clock ID of the CPU\-time clock
+of the calling process is returned.
+.SH 返り値
+成功すると、 \fBclock_getcpuclockid\fP() は 0 を返す。 エラーの場合、
+「エラー」の節のリストにある正のエラー番号のいずれかを返す。
+.SH エラー
+.TP 
+\fBENOSYS\fP
+カーネルが他のプロセスのプロセス単位の CPU 時刻のクロックの取得に対応しておらず、 かつ \fIpid\fP が呼び出し元のプロセスを指していなかった。
+.TP 
+\fBEPERM\fP
+The caller does not have permission to access the CPU\-time clock of the
+process specified by \fIpid\fP.  (Specified in POSIX.1\-2001; does not occur on
+Linux unless the kernel does not support obtaining the per\-process CPU\-time
+clock of another process.)
+.TP 
+\fBESRCH\fP
+ID が \fIpid\fP のプロセスが存在しない。
+.SH バージョン
+\fBclock_getcpuclockid\fP() 関数は glibc バージョン 2.2 以降で利用可能である。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw21 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBclock_getcpuclockid\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+\fIpid\fP に 0 を指定して \fBclock_getcpuclockid\fP() を呼び出して得られたクロック ID を引き数として
+\fBclock_gettime\fP(2) の呼び出すのは、 クロック ID \fBCLOCK_PROCESS_CPUTIME_ID\fP を使って
+\fBclock_gettime\fP(2) の呼び出すのと同じである。
+.SH EXAMPLES
+以下のサンプルプログラムは、 コマンドラインで指定された ID を持つプロセスの CPU 時刻のクロック ID を取得し、
+\fBclock_gettime\fP(2) を使ってそのクロックの時刻を取得する。 以下は実行例である。
+.PP
+.in +4n
+.EX
+$\fB ./a.out 1\fP                 # Show CPU clock of init process
+CPU\-time clock for PID 1 is 2.213466748 seconds
+.EE
+.in
+.SS プログラムのソース
+\&
+.EX
+#define _XOPEN_SOURCE 600
+#include <stdint.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <time.h>
+
+int
+main(int argc, char *argv[])
+{
+    clockid_t clockid;
+    struct timespec ts;
+
+    if (argc != 2) {
+        fprintf(stderr, "%s <process\-ID>\en", argv[0]);
+        exit(EXIT_FAILURE);
+    }
+
+    if (clock_getcpuclockid(atoi(argv[1]), &clockid) != 0) {
+        perror("clock_getcpuclockid");
+        exit(EXIT_FAILURE);
+    }
+
+    if (clock_gettime(clockid, &ts) == \-1) {
+        perror("clock_gettime");
+        exit(EXIT_FAILURE);
+    }
+
+    printf("CPU\-time clock for PID %s is %jd.%09ld seconds\en",
+            argv[1], (intmax_t) ts.tv_sec, ts.tv_nsec);
+    exit(EXIT_SUCCESS);
+}
+.EE
+.SH 関連項目
+\fBclock_getres\fP(2), \fBtimer_create\fP(2), \fBpthread_getcpuclockid\fP(3),
+\fBtime\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/closedir.3 b/manual/LDP_man-pages/draft/man3/closedir.3
new file mode 100644 (file)
index 0000000..a3f39d0
--- /dev/null
@@ -0,0 +1,85 @@
+.\" Copyright (C) 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified Sat Jul 24 21:25:52 1993 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 11 June 1995 by Andries Brouwer (aeb@cwi.nl)
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 YOSHINO Takashi
+.\"       all rights reserved.
+.\" Translated Mon Jan 20 17:49:23 JST 1997
+.\"       by YOSHINO Takashi Yoshino <yoshino@civil.jcn.nihon-u.ac.jp>
+.\" Updated & Modified Tue Feb 15 04:01:41 JST 2005
+.\"       by Yuichi SATO <ysato444@yahoo.co.jp>
+.\"
+.TH CLOSEDIR 3 2015\-08\-08 "" "Linux Programmer's Manual"
+.SH 名前
+closedir \- ディレクトリをクローズする
+.SH 書式
+.nf
+\fB#include <sys/types.h>\fP
+.PP
+\fB#include <dirent.h>\fP
+.PP
+\fBint closedir(DIR *\fP\fIdirp\fP\fB);\fP
+.fi
+.SH 説明
+\fBclosedir\fP()  関数は \fIdirp\fP に関連付けられた ディレクトリストリームをクローズする。
+\fBclosedir\fP()  の呼び出しが成功すると、 \fIdirp\fP に関連付けられた
+ファイルディスクリプターもクローズされる。
+ディレクトリストリームディスクリプター (directory stream descriptor) \fIdirp\fP は、
+この呼び出しの後では使用することができない。
+.SH 返り値
+\fBclosedir\fP()  関数は成功時に 0 を返す。 エラーの場合は、\-1 が返されて、 \fIerrno\fP が適切に設定される。
+.SH エラー
+.TP 
+\fBEBADF\fP
+ディレクトリストリームディスクリプター \fIdirp\fP が無効である。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBclosedir\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, SVr4, 4.3BSD.
+.SH 関連項目
+\fBclose\fP(2), \fBopendir\fP(3), \fBreaddir\fP(3), \fBrewinddir\fP(3), \fBscandir\fP(3),
+\fBseekdir\fP(3), \fBtelldir\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/copysign.3 b/manual/LDP_man-pages/draft/man3/copysign.3
new file mode 100644 (file)
index 0000000..b588a33
--- /dev/null
@@ -0,0 +1,105 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 2002-08-10 by Walter Harms (walter.harms@informatik.uni-oldenburg.de)
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 Hiroaki Nagoya
+.\"         all rights reserved.
+.\" Translated Mon Feb 10 1997 by Hiroaki Nagoya <nagoya@is.titech.ac.jp>
+.\" Updated 2002-08-24 by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2007-06-01, Akihiro MOTOKI, LDP v2.50
+.\" Updated 2008-09-15, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH COPYSIGN 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+copysign, copysignf, copysignl \- 数の符号をコピーする
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBdouble copysign(double \fP\fIx\fP\fB, double \fP\fIy\fP\fB);\fP
+\fBfloat copysignf(float \fP\fIx\fP\fB, float \fP\fIy\fP\fB);\fP
+\fBlong double copysignl(long double \fP\fIx\fP\fB, long double \fP\fIy\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBcopysign\fP(), \fBcopysignf\fP(), \fBcopysignl\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad b
+.SH 説明
+These functions return a value whose absolute value matches that of \fIx\fP,
+but whose sign bit matches that of \fIy\fP.
+.PP
+例えば、
+\fIcopysign(42.0,\ \-1.0)\fP と \fIcopysign(\-42.0, \-1.0)\fP はどちらも \-42.0 を返す。
+.SH 返り値
+成功すると、これらの関数は、その絶対値は \fIx\fP に等しく、符号は \fIy\fP に等しい値を返す。
+.PP
+\fIx\fP が NaN の場合、NaN に \fIy\fP の符号ビットをつけて返す。
+.SH エラー
+エラーは発生しない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw36 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBcopysign\fP(),
+\fBcopysignf\fP(),
+\fBcopysignl\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+.\" 4.3BSD.
+C99, POSIX.1\-2001, POSIX.1\-2008.  This function is defined in IEC 559 (and
+the appendix with recommended functions in IEEE 754/IEEE 854).
+.SH 注意
+浮動小数点形式が IEEE 754 準拠でないアーキテクチャーでは、 これらの関数は負の 0 を正として扱うことがある。
+.SH 関連項目
+\fBsignbit\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/cos.3 b/manual/LDP_man-pages/draft/man3/cos.3
new file mode 100644 (file)
index 0000000..de5b637
--- /dev/null
@@ -0,0 +1,118 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 2002-07-27 by Walter Harms
+.\"    (walter.harms@informatik.uni-oldenburg.de)
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1996 Kenji Kajiwara and Kentaro Ogawa
+.\"         all rights reserved.
+.\" Translated Sat, 13 Jul 1996 17:42:24 JST
+.\"         by Kenji Kajiwara and Kentaro Ogawa
+.\" Proof Reading: Takashi Yoshino
+.\" Updated Tue Aug  5 23:16:48 JST 2003
+.\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated & Modified Tue Feb 15 04:17:01 JST 2005
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated 2008-09-15, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH COS 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+cos, cosf, cosl \- 余弦 (コサイン) 関数
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBdouble cos(double \fP\fIx\fP\fB);\fP
+\fBfloat cosf(float \fP\fIx\fP\fB);\fP
+\fBlong double cosl(long double \fP\fIx\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBcosf\fP(), \fBcosl\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad
+.SH 説明
+These functions return the cosine of \fIx\fP, where \fIx\fP is given in radians.
+.SH 返り値
+成功すると、これらの関数は \fIx\fP の余弦を返す。
+.PP
+\fIx\fP が NaN の場合、NaN が返される。
+.PP
+\fIx\fP が正の無限大か負の無限大の場合、 領域エラー (domain error) が発生し、NaN が返される。
+.SH エラー
+これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
+.PP
+以下のエラーが発生する可能性がある。
+.TP 
+領域エラー (domain error): \fIx\fP が無限大である
+\fIerrno\fP に \fBEDOM\fP が設定される (「バグ」の節も参照)。 不正 (invalid) 浮動小数点例外 (\fBFE_INVALID\fP)
+が上がる。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw21 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBcos\fP(),
+\fBcosf\fP(),
+\fBcosl\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.PP
+The variant returning \fIdouble\fP also conforms to SVr4, 4.3BSD.
+.SH バグ
+.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6780
+バージョン 2.10 より前の glibc の実装では、 領域エラーが発生した際に、 \fIerrno\fP に \fBEDOM\fP が設定されなかった。
+.SH 関連項目
+\fBacos\fP(3), \fBasin\fP(3), \fBatan\fP(3), \fBatan2\fP(3), \fBccos\fP(3), \fBsin\fP(3),
+\fBsincos\fP(3), \fBtan\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/cosh.3 b/manual/LDP_man-pages/draft/man3/cosh.3
new file mode 100644 (file)
index 0000000..8a011ea
--- /dev/null
@@ -0,0 +1,127 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 1996-06-08 by aeb
+.\" Modified 2002-07-27 by Walter Harms
+.\" (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1996 Kenji Kajiwara and Kentaro Ogawa
+.\"         all rights reserved.
+.\" Translated Sat, 13 Jul 1996 17:54:30 JST
+.\"         by Kenji Kajiwara and Kentaro Ogawa
+.\" Updated Tue Aug  5 23:16:48 JST 2003
+.\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated & Modified Tue Feb 15 04:28:36 JST 2005
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated 2008-09-15, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH COSH 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+cosh, coshf, coshl \- 双曲線余弦 (ハイパボリックコサイン) 関数
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBdouble cosh(double \fP\fIx\fP\fB);\fP
+\fBfloat coshf(float \fP\fIx\fP\fB);\fP
+\fBlong double coshl(long double \fP\fIx\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBcoshf\fP(), \fBcoshl\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad
+.SH 説明
+These functions return the hyperbolic cosine of \fIx\fP, which is defined
+mathematically as:
+.PP
+.nf
+    cosh(x) = (exp(x) + exp(\-x)) / 2
+.fi
+.SH 返り値
+成功すると、これらの関数は \fIx\fP の双曲線余弦を返す。
+.PP
+\fIx\fP が NaN の場合、NaN が返される。
+.PP
+\fIx\fP が +0 か \-0 の場合、1 が返される。
+.PP
+\fIx\fP が正の無限大か負の無限大の場合、正の無限大が返される。
+.PP
+結果がオーバーフローする場合、範囲エラーが発生し、 各関数はそれぞれ +\fBHUGE_VAL\fP, +\fBHUGE_VALF\fP,
++\fBHUGE_VALL\fP を返す。
+.SH エラー
+これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
+.PP
+以下のエラーが発生する可能性がある。
+.TP 
+範囲エラー (range error): 結果のオーバーフロー
+\fIerrno\fP に \fBERANGE\fP が設定される。 オーバーフロー浮動小数点例外 (\fBFE_OVERFLOW\fP)  が上がる。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw24 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBcosh\fP(),
+\fBcoshf\fP(),
+\fBcoshl\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.PP
+The variant returning \fIdouble\fP also conforms to SVr4, 4.3BSD.
+.SH バグ
+glibc バージョン 2.3.4 以前では、オーバーフローが発生したときに、 オーバーフロー浮動小数点例外 (\fBFE_OVERFLOW\fP)
+が上がらなかった。
+.SH 関連項目
+\fBacosh\fP(3), \fBasinh\fP(3), \fBatanh\fP(3), \fBccos\fP(3), \fBsinh\fP(3), \fBtanh\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/difftime.3 b/manual/LDP_man-pages/draft/man3/difftime.3
new file mode 100644 (file)
index 0000000..281824f
--- /dev/null
@@ -0,0 +1,83 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified Sat Jul 24 19:48:17 1993 by Rik Faith (faith@cs.unc.edu)
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 NAGOYA Hiroaki
+.\"         all rights reserved.
+.\" Translated Mon Feb 10 1997 by Hiroaki Nagoya <nagoya@is.titech.ac.jp>
+.\" Updated & Modified Sat Mar 23 23:57:43 JST 2002
+.\"          by Yuichi SATO <ysato@h4.dion.ne.jp>
+.\"
+.TH DIFFTIME 3 2015\-08\-08 GNU "Linux Programmer's Manual"
+.SH 名前
+difftime \- 時刻の間隔の計算
+.SH 書式
+.nf
+\fB#include <time.h>\fP
+.PP
+\fBdouble difftime(time_t \fP\fItime1\fP\fB, time_t \fP\fItime0\fP\fB);\fP
+.fi
+.SH 説明
+関数 \fBdifftime\fP()  は時刻 \fItime0\fP から 時刻 \fItime1\fP までの経過時間を \fIdouble\fP
+型で返す。各々の時刻はカレンダー時間で指定する。 つまり、紀元 (Epoch; 1970\-01\-01 00:00:00 +0000 (UTC)) からの
+経過時間を秒単位で指定する。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBdifftime\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, C89, C99, SVr4, 4.3BSD.
+.SH 注意
+POSIX システムでは \fItime_t\fP は数値型なので、引き算の際に起こる可能性のあるオーバーフローを 気にしない場合は、単純に
+.PP
+.in +4n
+.EX
+#define difftime(t1,t0) (double)(t1 \- t0)
+.EE
+.in
+.PP
+と定義できる。
+.SH 関連項目
+\fBdate\fP(1), \fBgettimeofday\fP(2), \fBtime\fP(2), \fBctime\fP(3), \fBgmtime\fP(3),
+\fBlocaltime\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/dirfd.3 b/manual/LDP_man-pages/draft/man3/dirfd.3
new file mode 100644 (file)
index 0000000..5004abb
--- /dev/null
@@ -0,0 +1,101 @@
+.\" Copyright (C) 2002 Andries Brouwer (aeb@cwi.nl)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2002-2003 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated Mon May  6 21:32:36 JST 2002
+.\"         by Yuichi SATO <ysato@h4.dion.ne.jp>
+.\" Updated & Modified Sun Sep  7 01:23:08 JST 2003
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\"
+.TH DIRFD 3 2020\-04\-11 Linux "Linux Programmer's Manual"
+.SH 名前
+dirfd \- ディレクトリストリームのファイルディスクリプターを取得する
+.SH 書式
+\fB#include <sys/types.h>\fP
+.br
+\fB#include <dirent.h>\fP
+.PP
+\fBint dirfd(DIR *\fP\fIdirp\fP\fB);\fP
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBdirfd\fP():
+.br
+.RS 4
+.PD 0
+.ad l
+/* Since glibc 2.10: */ _POSIX_C_SOURCE\ >=\ 200809L
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.PD
+.RE
+.ad
+.SH 説明
+関数 \fBdirfd\fP()  はディレクトリストリーム \fIdirp\fP に関連づけられたファイルディスクリプターを返す。
+.PP
+This file descriptor is the one used internally by the directory stream.  As
+a result, it is useful only for functions which do not depend on or alter
+the file position, such as \fBfstat\fP(2)  and \fBfchdir\fP(2).  It will be
+automatically closed when \fBclosedir\fP(3)  is called.
+.SH 返り値
+On success, \fBdirfd\fP()  returns a file descriptor (a nonnegative integer).
+On error, \-1 is returned, and \fIerrno\fP is set to indicate the cause of the
+error.
+.SH エラー
+.\" glibc 2.8
+POSIX.1\-2008 では 2 つのエラーが規定されている。 現在の実装ではどちらのエラーも返されない。
+.TP 
+\fBEINVAL\fP
+\fIdirp\fP が有効なディレクトリストリームを参照していない。
+.TP 
+\fBENOTSUP\fP
+この実装では、ファイルディスクリプターのディレクトリとの関連付けが サポートされていない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBdirfd\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+.\" It is present in libc5 (since 5.1.2) and in glibc2.
+POSIX.1\-2008.  この関数は BSD 拡張であった。 4.3BSD\-Reno には存在するが、4.2BSD には存在しない。
+.SH 関連項目
+\fBopen\fP(2), \fBopenat\fP(2), \fBclosedir\fP(3), \fBopendir\fP(3), \fBreaddir\fP(3),
+\fBrewinddir\fP(3), \fBscandir\fP(3), \fBseekdir\fP(3), \fBtelldir\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/div.3 b/manual/LDP_man-pages/draft/man3/div.3
new file mode 100644 (file)
index 0000000..678ad49
--- /dev/null
@@ -0,0 +1,116 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\"
+.\" Modified 1993-03-29, David Metcalfe
+.\" Modified 1993-07-24, Rik Faith (faith@cs.unc.edu)
+.\" Modified 2002-08-10, 2003-11-01 Walter Harms, aeb
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1996 Kenji Kajiwara
+.\"         all rights reserved.
+.\" Translated Mon Jul 15 18:00:00 JST 1996
+.\"         by Kenji Kajiwara
+.\" Proof Reading: Takashi Yoshino
+.\" Updated & Modified Sun May 30 13:03:43 JST 2004
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\"
+.TH DIV 3 2020\-06\-09 "" "Linux Programmer's Manual"
+.SH 名前
+div, ldiv, lldiv, imaxdiv \- integer 型の割算の商と余りを計算する
+.SH 書式
+.nf
+\fB#include <stdlib.h>\fP
+.PP
+\fBdiv_t div(int \fP\fInumerator\fP\fB, int \fP\fIdenominator\fP\fB);\fP
+\fBldiv_t ldiv(long \fP\fInumerator\fP\fB, long \fP\fIdenominator\fP\fB);\fP
+\fBlldiv_t lldiv(long long \fP\fInumerator\fP\fB, long long \fP\fIdenominator\fP\fB);\fP
+.PP
+\fB#include <inttypes.h>\fP
+.PP
+\fBimaxdiv_t imaxdiv(intmax_t \fP\fInumerator\fP\fB, intmax_t \fP\fIdenominator\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.ad l
+.PP
+\fBlldiv\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+.RE
+.ad
+.SH 説明
+\fBdiv\fP()  関数は \fInumerator\fP/\fIdenominator\fP の値を計算する。 商と余りは、 \fIquot\fP (商) と
+\fIrem\fP (余り) という名前の 2 つの integer 型メンバを含む \fIdiv_t\fP という構造体の中に返される
+(メンバの順番は不定である)。 商は 0 に近い方に丸められる。 結果は \fIquot\fP*\fIdenominator\fP+\fIrem\fP =
+\fInumerator\fP を満たす。
+.PP
+\fBldiv\fP(), \fBlldiv\fP(), \fBimaxdiv\fP()  関数は同様な動作をし、
+上に示した型の数値を割算して、上に示した名前の構造体に結果を返す。 どの場合でもフィールド \fIquot\fP と \fIrem\fP は、
+関数の引き数と同じ型である。
+.SH 返り値
+\fIdiv_t\fP (などの) 構造体。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw33 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBdiv\fP(),
+\fBldiv\fP(),
+\fBlldiv\fP(),
+\fBimaxdiv\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, C89, C99, SVr4, 4.3BSD.  The functions
+\fBlldiv\fP()  and \fBimaxdiv\fP()  were added in C99.
+.SH EXAMPLES
+以下の式を計算すると、
+.PP
+.in +4n
+.EX
+div_t q = div(\-5, 3);
+.EE
+.in
+.PP
+\fIq.quot\fP と \fIq.rem\fP はそれぞれ \-1 と \-2 になる。
+.SH 関連項目
+\fBabs\fP(3), \fBremainder\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/dysize.3 b/manual/LDP_man-pages/draft/man3/dysize.3
new file mode 100644 (file)
index 0000000..1941814
--- /dev/null
@@ -0,0 +1,82 @@
+.\"  Copyright 2001 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" aeb: some corrections
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2002 NAKANO Takeo all rights reserved.
+.\" Translated Sun 6 Jan 2002 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
+.\"
+.TH DYSIZE 3 2016\-03\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+dysize \- 与えた年の日数を返す
+.SH 書式
+\fB#include <time.h>\fP
+.PP
+\fBint dysize(int \fP\fIyear\fP\fB);\fP
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBdysize\fP():
+    Since glibc 2.19:
+        _DEFAULT_SOURCE
+    Glibc 2.19 and earlier:
+        _BSD_SOURCE || _SVID_SOURCE
+.SH 説明
+この関数は通常の年には 365 を返し、うるう年には 366 を返す。 うるう年の計算は次の式による:
+.PP
+.in +4n
+.EX
+(year) %4 == 0 && ((year) %100 != 0 || (year) %400 == 0)
+.EE
+.in
+.PP
+この式は \fI__isleap(year)\fP マクロで定義されており、 \fI<time.h>\fP にもある。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBdysize\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+この関数は SunOS 4.x で生まれた。
+.SH 注意
+.\" The SCO version of this function had a year-2000 problem.
+これは互換用の関数に過ぎない。新しいプログラムでは使わないこと。
+.SH 関連項目
+\fBstrftime\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/ecvt.3 b/manual/LDP_man-pages/draft/man3/ecvt.3
new file mode 100644 (file)
index 0000000..a052ee1
--- /dev/null
@@ -0,0 +1,118 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified Sat Jul 24 19:40:39 1993 by Rik Faith (faith@cs.unc.edu)
+.\" Modified Fri Jun 25 12:10:47 1999 by Andries Brouwer (aeb@cwi.nl)
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 Hiroaki Nagoya
+.\"         all rights reserved.
+.\" Translated Mon Feb 10 1997 by Hiroaki Nagoya <nagoya@is.titech.ac.jp>
+.\" Updated 2000-01-08 by Kentaro Shirakata <argrath@ub32.org>
+.\" Updated 2009-04-22 by Kentaro Shirakata <argrath@ub32.org>
+.\"
+.TH ECVT 3 2016\-03\-15 "" "Linux Programmer's Manual"
+.SH 名前
+ecvt, fcvt \- 浮動小数点数の文字列への変換
+.SH 書式
+\fB#include <stdlib.h>\fP
+.PP
+\fBchar *ecvt(double \fP\fInumber\fP\fB, int \fP\fIndigits\fP\fB, int *\fP\fIdecpt\fP\fB,\fP
+\fBint *\fP\fIsign\fP\fB);\fP
+.PP
+\fBchar *fcvt(double \fP\fInumber\fP\fB, int \fP\fIndigits\fP\fB, int *\fP\fIdecpt\fP\fB,\fP
+\fBint *\fP\fIsign\fP\fB);\fP
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBecvt\fP(), \fBfcvt\fP():
+.ad l
+.RS 4
+.PD 0
+.TP  4
+glibc 2.12 以降:
+.nf
+(_XOPEN_SOURCE\ >=\ 500) ! (_POSIX_C_SOURCE\ >=\ 200112L)
+    || /* Glibc since 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _SVID_SOURCE
+.fi
+.TP  4
+glibc 2.12 より前:
+.\"    || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
+_SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500
+.PD
+.RE
+.ad b
+.SH 説明
+関数 \fBecvt\fP()  は \fInumber\fP をヌル文字で終端された \fIndigits\fP 文字の文字列へ変換し、その文字列へのポインターを返す
+(\fIndigits\fP が \fIdouble\fP の精度によって決定されるシステム依存の上限値より大きい場合は、 その条件値が \fIndigits\fP
+の値となる)。 \fInumber\fP が 0 でなければ、最上位の桁は 0 以外である。 最下位の桁は丸められる。
+文字列には小数点は含まれない。そのかわりに、文字列の先頭からの小数点の 位置が \fI*decpt\fP に保持される。 \fI*decpt\fP
+が負の値の場合、小数点が文字列の先頭の左側にあることを意味する。 もし(\fInumber\fPの)符号が負ならば \fI*sign\fP は 0 以外の値に、
+そうでなければ 0 に設定される。 \fInumber\fP が 0 なら、\fI*decpt\fP が 0 か 1 かは未規定である。
+.PP
+関数 \fBfcvt\fP()  は \fBecvt\fP()  と同じ機能を持つが、\fIndigits\fP は小数点以下の文字数を指定する。
+.SH 返り値
+関数 \fBecvt\fP()  と \fBfcvt\fP()  は \fInumber\fP の ASCII 表現を含む 静的な領域内の文字列へのポインターを返す。
+この文字列は \fBecvt\fP()  や \fBfcvt\fP()  の呼び出しのたびに上書きされる。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBecvt\fP()
+T}     Thread safety   MT\-Unsafe race:ecvt
+T{
+\fBfcvt\fP()
+T}     Thread safety   MT\-Unsafe race:fcvt
+.TE
+.SH 準拠
+SVr2。 POSIX.1\-2001 では「過去の名残 (LEGACY)」と位置付けられている。 POSIX.1\-2008 では \fBecvt\fP()
+と \fBfcvt\fP()  の仕様が削除され、代わりに \fBsprintf\fP(3)  の使用が推奨されている(しかし \fBsnprintf\fP(3)
+がより適切かもしれない)。
+.SH 注意
+.\" Linux libc4 and libc5 specified the type of
+.\" .I ndigits
+.\" as
+.\" .IR size_t .
+小数点にピリオドを使わないロケールもある。
+.SH 関連項目
+\fBecvt_r\fP(3), \fBgcvt\fP(3), \fBqecvt\fP(3), \fBsetlocale\fP(3), \fBsprintf\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/ecvt_r.3 b/manual/LDP_man-pages/draft/man3/ecvt_r.3
new file mode 100644 (file)
index 0000000..e1e7efd
--- /dev/null
@@ -0,0 +1,101 @@
+.\" Copyright (C) 2002 Andries Brouwer <aeb@cwi.nl>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" This replaces an earlier man page written by Walter Harms
+.\" <walter.harms@informatik.uni-oldenburg.de>.
+.\"
+.\" Corrected return types; from Fabian; 2004-10-05
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2002 Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated Sun Sep 22 09:46:55 2002
+.\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH ECVT_R 3 2016\-03\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+ecvt_r, fcvt_r, qecvt_r, qfcvt_r \- 浮動小数点数の文字列への変換
+.SH 書式
+.nf
+\fB#include <stdlib.h>\fP
+.PP
+\fBint ecvt_r(double \fP\fInumber\fP\fB, int \fP\fIndigits\fP\fB, int *\fP\fIdecpt\fP\fB,\fP
+\fB           int *\fP\fIsign\fP\fB, char *\fP\fIbuf\fP\fB, size_t \fP\fIlen\fP\fB);\fP
+.PP
+\fBint fcvt_r(double \fP\fInumber\fP\fB, int \fP\fIndigits\fP\fB, int *\fP\fIdecpt\fP\fB,\fP
+\fB           int *\fP\fIsign\fP\fB, char *\fP\fIbuf\fP\fB, size_t \fP\fIlen\fP\fB);\fP
+.PP
+\fBint qecvt_r(long double \fP\fInumber\fP\fB, int \fP\fIndigits\fP\fB, int *\fP\fIdecpt\fP\fB,\fP
+\fB           int *\fP\fIsign\fP\fB, char *\fP\fIbuf\fP\fB, size_t \fP\fIlen\fP\fB);\fP
+.PP
+\fBint qfcvt_r(long double \fP\fInumber\fP\fB, int \fP\fIndigits\fP\fB, int *\fP\fIdecpt\fP\fB,\fP
+\fB           int *\fP\fIsign\fP\fB, char *\fP\fIbuf\fP\fB, size_t \fP\fIlen\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBecvt_r\fP(), \fBfcvt_r\fP(), \fBqecvt_r\fP(), \fBqfcvt_r\fP():
+.RS 4
+/* Glibc since 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
+.RE
+.ad b
+.SH 説明
+関数 \fBecvt_r\fP(), \fBfcvt_r\fP(), \fBqecvt_r\fP(), \fBqfcvt_r\fP()  は、それぞれ \fBecvt\fP(3),
+\fBfcvt\fP(3), \fBqecvt\fP(3), \fBqfcvt\fP(3)  と同じであるが、 静的バッファーの代わりに、長さ \fIlen\fP の指定された
+\fIbuf\fP に結果を格納する点が異なる。 \fBecvt\fP(3), \fBqecvt\fP(3)  を参照のこと。
+.SH 返り値
+これらの関数は成功すると 0 を、それ以外は \-1 を返す。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw20 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBecvt_r\fP(),
+\fBfcvt_r\fP(),
+.br
+\fBqecvt_r\fP(),
+\fBqfcvt_r\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+これらの関数は GNU による拡張である。
+.SH 注意
+これらの関数は廃止された。代わりに \fBsprintf\fP(3)  の使用を推奨する。
+.SH 関連項目
+\fBecvt\fP(3), \fBqecvt\fP(3), \fBsprintf\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/erfc.3 b/manual/LDP_man-pages/draft/man3/erfc.3
new file mode 100644 (file)
index 0000000..a7eeeef
--- /dev/null
@@ -0,0 +1,126 @@
+.\" Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2008  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2008-09-15, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH ERFC 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+erfc, erfcf, erfcl \- 相補誤差関数
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBdouble erfc(double \fP\fIx\fP\fB);\fP
+\fBfloat erfcf(float \fP\fIx\fP\fB);\fP
+\fBlong double erfcl(long double \fP\fIx\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBerfc\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L || _XOPEN_SOURCE
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.br
+\fBerfcf\fP(), \fBerfcl\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad b
+.SH 説明
+These functions return the complementary error function of \fIx\fP, that is,
+1.0 \- erf(x).
+.SH 返り値
+成功すると、これらの関数は \fIx\fP の相補誤差関数を返す。 返り値は [0,2] の範囲となる。
+.PP
+\fIx\fP が NaN の場合、NaN が返される。
+.PP
+\fIx\fP が +0 か \-0 の場合、1 が返される。
+.PP
+\fIx\fP が正の無限大の場合、+0 が返される。
+.PP
+\fIx\fP が負の無限大の場合、+2 が返される。
+.PP
+関数の結果がアンダーフローし、表現できない値となる場合は、 返り値は 0.0 となる。
+.PP
+.\" e.g., erfc(27) on x86-32
+関数の結果がアンダーフローするが、 表現できる値 (つまり非正規化数 (subnormal)) となる場合は、 その値が返され、範囲エラー (range
+error) が発生する。
+.SH エラー
+これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
+.PP
+以下のエラーが発生する可能性がある。
+.TP 
+範囲エラー: 結果のアンダーフロー (結果が非正規化数)
+.\" .I errno
+.\" is set to
+.\" .BR ERANGE .
+アンダーフロー浮動小数点例外 (\fBFE_UNDERFLOW\fP)  が上がる。
+.PP
+.\" It is intentional that these functions do not set errno for this case
+.\" see http://sources.redhat.com/bugzilla/show_bug.cgi?id=6785
+これらの関数は \fIerrno\fP を設定しない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw24 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBerfc\fP(),
+\fBerfcf\fP(),
+\fBerfcl\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.PP
+The variant returning \fIdouble\fP also conforms to SVr4, 4.3BSD.
+.SH 注意
+関数 \fBerfc\fP(), \fBerfcf\fP(), \fBerfcl\fP() が提供されているのは、 \fIx\fP が大きな値の場合に (erf(x) の値は
+1 に近付いていくことで)  1\-erf(x) の計算において精度が失われるのを避けるためである。
+.SH 関連項目
+\fBcerf\fP(3), \fBerf\fP(3), \fBexp\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/err.3 b/manual/LDP_man-pages/draft/man3/err.3
new file mode 100644 (file)
index 0000000..59e0a1d
--- /dev/null
@@ -0,0 +1,159 @@
+.\" Copyright (c) 1993
+.\"    The Regents of the University of California.  All rights reserved.
+.\"
+.\" %%%LICENSE_START(BSD_4_CLAUSE_UCB)
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\"    must display the following acknowledgement:
+.\"    This product includes software developed by the University of
+.\"    California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\"    may be used to endorse or promote products derived from this software
+.\"    without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\" %%%LICENSE_END
+.\"
+.\"    From: @(#)err.3 8.1 (Berkeley) 6/9/93
+.\" $FreeBSD: src/lib/libc/gen/err.3,v 1.11.2.5 2001/08/17 15:42:32 ru Exp $
+.\"
+.\" 2011-09-10, mtk, Converted from mdoc to man macros
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2003  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2003-03-10, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH ERR 3 2020\-06\-09 Linux "Linux Programmer's Manual"
+.SH 名前
+err, verr, errx, verrx, warn, vwarn, warnx, vwarnx \- エラーメッセージを整形する
+.SH 書式
+.nf
+\fB#include <err.h>\fP
+.PP
+\fBvoid err(int \fP\fIeval\fP\fB, const char *\fP\fIfmt\fP\fB, ...);\fP
+.PP
+\fBvoid errx(int \fP\fIeval\fP\fB, const char *\fP\fIfmt\fP\fB, ...);\fP
+.PP
+\fBvoid warn(const char *\fP\fIfmt\fP\fB, ...);\fP
+.PP
+\fBvoid warnx(const char *\fP\fIfmt\fP\fB, ...);\fP
+
+\fB#include <stdarg.h>\fP
+.PP
+\fBvoid verr(int \fP\fIeval\fP\fB, const char *\fP\fIfmt\fP\fB, va_list \fP\fIargs\fP\fB);\fP
+.PP
+\fBvoid verrx(int \fP\fIeval\fP\fB, const char *\fP\fIfmt\fP\fB, va_list \fP\fIargs\fP\fB);\fP
+.PP
+\fBvoid vwarn(const char *\fP\fIfmt\fP\fB, va_list \fP\fIargs\fP\fB);\fP
+.PP
+\fBvoid vwarnx(const char *\fP\fIfmt\fP\fB, va_list \fP\fIargs\fP\fB);\fP
+.fi
+.SH 説明
+\fBerr\fP()  関数群と \fBwarn\fP()  関数群は、エラーメッセージを整形して標準エラー出力に表示する。
+どの関数の場合も、(ディレクトリ部分を省いた)プログラム名、 コロン 1個、スペース 1個が出力される。 \fIfmt\fP 引き数が NULL でない場合、
+\fBprintf\fP(3)  と同様に整形が行われ、エラーメッセージが出力される。 出力は改行文字で終わる。
+.PP
+関数 \fBerr\fP(), \fBverr\fP(), \fBwarn\fP(), \fBvwarn\fP()  は、グローバル変数 \fIerrno\fP に基づいて
+\fBstrerror\fP(3)  から得たエラーメッセージを出力する。 \fIfmt\fP 引き数が NULL
+でない場合は、一個ずつのコロンとスペースに続けて出力する。
+.PP
+関数 \fBerrx\fP(), \fBwarnx\fP()  はエラーメッセージを付け加えない。
+.PP
+関数 \fBerr\fP(), \fBverr\fP(), \fBerrx\fP(), \fBverrx\fP()  は返り値を返さないが、引き数 \fIeval\fP の値を
+exit status に設定し終了する。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw17 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBerr\fP(),
+\fBerrx\fP(),
+.br
+\fBwarn\fP(),
+\fBwarnx\fP(),
+.br
+\fBverr\fP(),
+\fBverrx\fP(),
+.br
+\fBvwarn\fP(),
+\fBvwarnx\fP()
+T}     Thread safety   MT\-Safe locale
+.TE
+.sp 1
+.SH 準拠
+.\" .SH HISTORY
+.\" The
+.\" .BR err ()
+.\" and
+.\" .BR warn ()
+.\" functions first appeared in
+.\" 4.4BSD.
+これらの関数は非標準の BSD 拡張である。
+.SH EXAMPLES
+現在の \fIerrno\fP の情報を表示し、終了する:
+.PP
+.in +4n
+.EX
+p = malloc(size);
+if (p == NULL)
+    err(EXIT_FAILURE, NULL);
+fd = open(file_name, O_RDONLY, 0);
+if (fd == \-1)
+    err(EXIT_FAILURE, "%s", file_name);
+.EE
+.in
+.PP
+エラーメッセージを表示し、終了する:
+.PP
+.in +4n
+.EX
+if (tm.tm_hour < START_TIME)
+    errx(EXIT_FAILURE, "too early, wait until %s",
+            start_time_string);
+.EE
+.in
+.PP
+エラーを警告表示する:
+.PP
+.in +4n
+.EX
+fd = open(raw_device, O_RDONLY, 0);
+if (fd == \-1)
+    warnx("%s: %s: trying the block device",
+            raw_device, strerror(errno));
+fd = open(block_device, O_RDONLY, 0);
+if (fd == \-1)
+    err(EXIT_FAILURE, "%s", block_device);
+.EE
+.in
+.SH 関連項目
+\fBerror\fP(3), \fBexit\fP(3), \fBperror\fP(3), \fBprintf\fP(3), \fBstrerror\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/error.3 b/manual/LDP_man-pages/draft/man3/error.3
new file mode 100644 (file)
index 0000000..f7f4717
--- /dev/null
@@ -0,0 +1,119 @@
+.\" Copyright (C) 2006 Justin Pryzby <pryzbyj@justinpryzby.com>
+.\" and Copyright (C) 2006 Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(PERMISSIVE_MISC)
+.\" Permission is hereby granted, free of charge, to any person obtaining
+.\" a copy of this software and associated documentation files (the
+.\" "Software"), to deal in the Software without restriction, including
+.\" without limitation the rights to use, copy, modify, merge, publish,
+.\" distribute, sublicense, and/or sell copies of the Software, and to
+.\" permit persons to whom the Software is furnished to do so, subject to
+.\" the following conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+.\" CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+.\" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+.\" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\" %%%LICENSE_END
+.\"
+.\" References:
+.\"   glibc manual and source
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2006 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated 2006-08-04 by Yuichi SATO <ysato444@yahoo.co.jp>, LDP v2.36
+.\"
+.TH ERROR 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+error, error_at_line, error_message_count, error_one_per_line,
+error_print_progname \- glibc のエラー書き出し関数
+.SH 書式
+.nf
+\fB#include <error.h>\fP
+.PP
+\fBvoid error(int \fP\fIstatus\fP\fB, int \fP\fIerrnum\fP\fB, const char *\fP\fIformat\fP\fB, ...);\fP
+.PP
+\fBvoid error_at_line(int \fP\fIstatus\fP\fB, int \fP\fIerrnum\fP\fB, const char *\fP\fIfilename\fP\fB,\fP
+\fB                   unsigned int \fP\fIlinenum\fP\fB, const char *\fP\fIformat\fP\fB, ...);\fP
+.PP
+\fBextern unsigned int \fP\fIerror_message_count\fP\fB;\fP
+.PP
+\fBextern int \fP\fIerror_one_per_line\fP\fB;\fP
+.PP
+\fBextern void (*\fP\fIerror_print_progname\fP\fB) (void);\fP
+.fi
+.SH 説明
+\fBerror\fP()  は汎用的なエラー書き出し関数である。 この関数は標準出力 (\fIstdout\fP)  に書き出してから、標準エラー出力
+(\fIstderr\fP)  に書き出す。 書き出す内容は、プログラム名・コロン・スペース・ \fBprintf\fP(3)  形式の フォーマット文字列
+\fIformat\fP で指定されたメッセージである。 \fIerrnum\fP が 0 以外の場合、2 つ目のコロンとスペースの後に
+\fIstrerror(errnum)\fP で指定された文字列も書き出す。 \fIformat\fP に必要な任意の引き数が、引き数リストの \fIformat\fP
+の後に続く。 出力の終端には改行文字が付く。
+.PP
+\fBerror\fP()  で出力されるプログラム名は、大域変数 \fBprogram_invocation_name\fP(3)  の値である。
+\fIprogram_invocation_name\fP の初期値は \fImain\fP()  の \fIargv[0]\fP の値と等しい。
+この変数の値は変更可能であり、変更すると \fBerror\fP()  の出力が変わる。
+.PP
+\fIstatus\fP が 0 以外の場合、 \fBerror\fP()  は \fBexit\fP(3)
+を呼び出して、指定された終了ステータスでプログラムを終了させる。
+.PP
+\fBerror_at_line\fP()  関数は、引き数 \fIfilename\fP と \fIlinenum\fP が追加されている以外は、 \fBerror\fP()
+と同じである。 生成される出力は、プログラム名の後に コロン・\fIfilename\fP の値・コロン・\fIlinenum\fP の値が書き出される以外は、
+\fBerror\fP()  と同じである。 プリプロセッサの値 \fB__LINE__\fP と \fB__FILE__\fP は、
+\fBerror_at_line\fP()  を呼び出すときに役に立つ。 その他のプリプロセッサの値も使うことができる。
+例えば、これらの引き数で入力ファイルにおける位置を参照できる。
+.PP
+大域変数 \fIerror_one_per_line\fP が 0 以外に設定されている場合、 \fIfilename\fP と \fIlinenum\fP
+の値が共に等しい \fBerror_at_line\fP()  の呼び出しは、 1 つの (最初の) メッセージの出力にまとめられる。
+.PP
+大域変数 \fIerror_message_count\fP は、 \fBerror\fP()  と \fBerror_at_line\fP()
+で出力されたメッセージの数を表す。
+.PP
+大域変数 \fIerror_print_progname\fP に 関数のアドレスが割り当てられている場合 (つまり NULL ではない場合)、
+メッセージの前にプログラム名とコロンを書き出すのではなく、 この関数を呼び出す。 この関数は標準エラー出力 (\fIstderr\fP)
+に対しての適切な文字列を書き出さなければならない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.ad l
+.TS
+allbox;
+lb lb lbw33
+l l l.
+インターフェース       属性  値
+T{
+\fBerror\fP()
+T}     Thread safety   MT\-Safe locale
+T{
+\fBerror_at_line\fP()
+T}     Thread safety   T{
+MT\-Unsafe\ race: error_at_line/error_one_per_line locale
+T}
+.TE
+.ad
+.PP
+The internal \fIerror_one_per_line\fP variable is accessed (without any form of
+synchronization, but since it's an \fIint\fP used once, it should be safe
+enough) and, if \fIerror_one_per_line\fP is set nonzero, the internal static
+variables (not exposed to users)  used to hold the last printed filename and
+line number are accessed and modified without synchronization; the update is
+not atomic and it occurs before disabling cancellation, so it can be
+interrupted only after one of the two variables is modified.  After that,
+\fBerror_at_line\fP()  is very much like \fBerror\fP().
+.SH 準拠
+これらの関数と変数は GNU による拡張であり、 移植性を考えたプログラムでは使用すべきではない。
+.SH 関連項目
+\fBerr\fP(3), \fBerrno\fP(3), \fBexit\fP(3), \fBperror\fP(3),
+\fBprogram_invocation_name\fP(3), \fBstrerror\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/exp.3 b/manual/LDP_man-pages/draft/man3/exp.3
new file mode 100644 (file)
index 0000000..bc1f38f
--- /dev/null
@@ -0,0 +1,121 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 1995-08-14 by Arnt Gulbrandsen <agulbra@troll.no>
+.\" Modified 2002-07-27 by Walter Harms
+.\"    (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2003  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated Mon Sep  7 23:27:52 JST 2003
+.\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH EXP 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+exp, expf, expl \- 底が e の指数関数
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBdouble exp(double \fP\fIx\fP\fB);\fP
+\fBfloat expf(float \fP\fIx\fP\fB);\fP
+\fBlong double expl(long double \fP\fIx\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBexpf\fP(), \fBexpl\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad b
+.SH 説明
+These functions return the value of e (the base of natural logarithms)
+raised to the power of \fIx\fP.
+.SH 返り値
+成功すると、これらの関数は e の \fIx\fP 乗を返す。
+.PP
+\fIx\fP が NaN の場合、NaN が返される。
+.PP
+\fIx\fP が正の無限大の場合、正の無限大が返される。
+.PP
+\fIx\fP が負の無限大の場合、+0 が返される。
+.PP
+結果がアンダーフローする場合、 範囲エラー (range error) が発生し、0 が返される。
+.PP
+結果がオーバーフローする場合、範囲エラーが発生し、 各関数はそれぞれ +\fBHUGE_VAL\fP, +\fBHUGE_VALF\fP,
++\fBHUGE_VALL\fP を返す。
+.SH エラー
+これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
+.PP
+以下のエラーが発生する可能性がある。
+.TP 
+範囲エラー (range error)、オーバーフローの場合
+\fIerrno\fP に \fBERANGE\fP が設定される。 オーバーフロー浮動小数点例外 (\fBFE_OVERFLOW\fP)  が上がる。
+.TP 
+範囲エラー (range error)、アンダーフローの場合
+\fIerrno\fP に \fBERANGE\fP が設定される。 アンダーフロー浮動小数点例外 (\fBFE_UNDERFLOW\fP)  が上がる。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw21 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBexp\fP(),
+\fBexpf\fP(),
+\fBexpl\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.PP
+The variant returning \fIdouble\fP also conforms to SVr4, 4.3BSD, C89.
+.SH 関連項目
+\fBcbrt\fP(3), \fBcexp\fP(3), \fBexp10\fP(3), \fBexp2\fP(3), \fBexpm1\fP(3), \fBsqrt\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/exp10.3 b/manual/LDP_man-pages/draft/man3/exp10.3
new file mode 100644 (file)
index 0000000..56a57ef
--- /dev/null
@@ -0,0 +1,95 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 1995-08-14 by Arnt Gulbrandsen <agulbra@troll.no>
+.\" Modified 2002-07-27 by Walter Harms
+.\"    (walter.harms@informatik.uni-oldenburg.de)
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2003  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated Tue Sep 23 20:30:22 JST 2003
+.\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH EXP10 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+exp10, exp10f, exp10l \- 基数が 10 の指数関数
+.SH 書式
+.nf
+\fB#define _GNU_SOURCE\fP         /* feature_test_macros(7) 参照 */
+\fB#include <math.h>\fP
+.PP
+\fBdouble exp10(double \fP\fIx\fP\fB);\fP
+\fBfloat exp10f(float \fP\fIx\fP\fB);\fP
+\fBlong double exp10l(long double \fP\fIx\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.SH 説明
+These functions return the value of 10 raised to the power of \fIx\fP.
+.SH 返り値
+成功すると、これらの関数は 10 の \fIx\fP 乗を返す。
+.PP
+無限大や NaN の扱いや、オーバーフローとアンダーフローなどの さまざまな特別な状況については、 \fBexp\fP(3)  を参照のこと。
+.SH エラー
+これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
+.PP
+これらの関数で発生するエラーについては、 \fBexp\fP(3)  を参照のこと。
+.SH バージョン
+これらの関数は glibc バージョン 2.1 で初めて登場した。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw28 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBexp10\fP(),
+\fBexp10f\fP(),
+\fBexp10l\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+これらの関数は GNU による拡張である。
+.SH バグ
+.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6787
+バージョン 2.19 より前では、これらの関数の glibc 実装はアンダーフローエラーが発生した場合に \fIerrno\fP に \fBERANGE\fP
+を設定しなかった。
+.SH 関連項目
+\fBcbrt\fP(3), \fBexp\fP(3), \fBexp2\fP(3), \fBlog10\fP(3), \fBsqrt\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/exp2.3 b/manual/LDP_man-pages/draft/man3/exp2.3
new file mode 100644 (file)
index 0000000..f8a4886
--- /dev/null
@@ -0,0 +1,104 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 1995-08-14 by Arnt Gulbrandsen <agulbra@troll.no>
+.\" Modified 2002-07-27 by Walter Harms
+.\"    (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2003  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated Tue Sep 23 20:27:35 JST 2003
+.\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH EXP2 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+exp2, exp2f, exp2l \- 底が 2 の指数関数
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBdouble exp2(double \fP\fIx\fP\fB);\fP
+\fBfloat exp2f(float \fP\fIx\fP\fB);\fP
+\fBlong double exp2l(long double \fP\fIx\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBexp2\fP(), \fBexp2f\fP(), \fBexp2l\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+.RE
+.ad b
+.SH 説明
+These functions return the value of 2 raised to the power of \fIx\fP.
+.SH 返り値
+成功すると、これらの関数は 2 の \fIx\fP 乗を返す。
+.PP
+無限大や NaN の扱いや、オーバーフローとアンダーフローなどの さまざまな特別な状況については、 \fBexp\fP(3)  を参照のこと。
+.SH エラー
+これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
+.PP
+これらの関数で発生するエラーについては、 \fBexp\fP(3)  を参照のこと。
+.SH バージョン
+これらの関数は glibc バージョン 2.1 で初めて登場した。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw24 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBexp2\fP(),
+\fBexp2f\fP(),
+\fBexp2l\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.PP
+The variant returning \fIdouble\fP also conforms to SVr4, 4.3BSD.
+.SH 関連項目
+\fBcbrt\fP(3), \fBcexp2\fP(3), \fBexp\fP(3), \fBexp10\fP(3), \fBsqrt\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/fabs.3 b/manual/LDP_man-pages/draft/man3/fabs.3
new file mode 100644 (file)
index 0000000..339ef13
--- /dev/null
@@ -0,0 +1,107 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified Sat Jul 24 19:42:04 1993 by Rik Faith (faith@cs.unc.edu)
+.\" Added fabsl, fabsf, aeb, 2001-06-07
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 YOSHINO Takashi
+.\"       all rights reserved.
+.\" Translated Mon Jan 20 20:29:27 JST 1997
+.\"       by YOSHINO Takashi <yoshino@civil.jcn.nihon-u.ac.jp>
+.\" Updated & Modified Sun Jul  1 10:59:51 JST 2001
+.\"       by Yuichi SATO <ysato@h4.dion.ne.jp>
+.\" Updated & Modified Mon Jan 10 07:44:31 JST 2005
+.\"       by Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH FABS 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+fabs, fabsf, fabsl \- 浮動小数点実数の絶対値
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBdouble fabs(double \fP\fIx\fP\fB);\fP
+\fBfloat fabsf(float \fP\fIx\fP\fB);\fP
+\fBlong double fabsl(long double \fP\fIx\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBfabsf\fP(), \fBfabsl\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad b
+.SH 説明
+これらの関数は浮動小数点実数 \fIx\fP の絶対値を返す。
+.SH 返り値
+これらの関数は \fIx\fP の絶対値を返す。
+.PP
+\fIx\fP が NaN の場合、NaN が返される。
+.PP
+\fIx\fP が \-0 の場合、+0 が返される。
+.PP
+\fIx\fP が負の無限大か正の無限大の場合、正の無限大が返される。
+.SH エラー
+エラーは発生しない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw24 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBfabs\fP(),
+\fBfabsf\fP(),
+\fBfabsl\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.PP
+The variant returning \fIdouble\fP also conforms to SVr4, 4.3BSD, C89.
+.SH 関連項目
+\fBabs\fP(3), \fBcabs\fP(3), \fBceil\fP(3), \fBfloor\fP(3), \fBlabs\fP(3), \fBrint\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/fdim.3 b/manual/LDP_man-pages/draft/man3/fdim.3
new file mode 100644 (file)
index 0000000..550de6f
--- /dev/null
@@ -0,0 +1,87 @@
+.\" Copyright 2003 Walter Harms, Andries Brouwer
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
+.\" Distributed under GPL
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2004-2005 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated Sat Jul 24 10:14:17 JST 2004
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated & Modified Mon Jan 10 08:17:08 JST 2005 by Yuichi SATO
+.\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH FDIM 3 2020\-06\-09 "" "Linux Programmer's Manual"
+.SH 名前
+fdim, fdimf, fdiml \- 正の差分を計算する
+.SH 書式
+\fB#include <math.h>\fP
+.PP
+\fBdouble fdim(double \fP\fIx\fP\fB, double \fP\fIy\fP\fB);\fP
+.br
+\fBfloat fdimf(float \fP\fIx\fP\fB, float \fP\fIy\fP\fB);\fP
+.br
+\fBlong double fdiml(long double \fP\fIx\fP\fB, long double \fP\fIy\fP\fB);\fP
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBfdimf\fP(), \fBfdiml\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+.RE
+.ad
+.SH 説明
+これらの関数は、二つの引き数間の正の差分 max(\fIx\fP\-\fIy\fP,0) を返す。
+.SH 返り値
+成功すると、これらの関数は正の差分を返す。
+.PP
+\fIx\fP か \fIy\fP が NaN の場合、NaN が返される。
+.PP
+結果がオーバーフローする場合、範囲エラー (range error) が発生し、 各関数はそれぞれ \fBHUGE_VAL\fP, \fBHUGE_VALF\fP,
+\fBHUGE_VALL\fP を返す。
+.SH エラー
+これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
+.PP
+以下のエラーが発生する可能性がある。
+.TP 
+範囲エラー (range error): 結果のオーバーフロー
+\fIerrno\fP に \fBERANGE\fP が設定される。 オーバーフロー浮動小数点例外 (\fBFE_OVERFLOW\fP)  が上がる。
+.SH バージョン
+これらの関数は glibc バージョン 2.1 で初めて登場した。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw24 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBfdim\fP(),
+\fBfdimf\fP(),
+\fBfdiml\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.SH バグ
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6796
+Before glibc version 2.24 on certain architectures (e.g., x86, but not
+x86_64)  these functions did not set \fIerrno\fP.
+.SH 関連項目
+\fBfmax\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
index dd9f742..1372ef7 100644 (file)
@@ -158,14 +158,14 @@ C99 と POSIX.1\-2008 では \fBFLT_ROUNDS\fP という識別子が規定され
 .SH バージョン
 これらの関数は glibc バージョン 2.1 で初めて登場した。
 .SH 属性
-For an explanation of the terms used in this section, see \fBattributes\fP(7).
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
 .nh
 .ad l
 .TS
 allbox;
 lb lb lb
 lw35 l l.
-Interface      Attribute       Value
+インターフェース       属性  値
 T{
 \fBfeclearexcept\fP(),
 \fBfegetexceptflag\fP(),
diff --git a/manual/LDP_man-pages/draft/man3/fgetgrent.3 b/manual/LDP_man-pages/draft/man3/fgetgrent.3
new file mode 100644 (file)
index 0000000..9928b73
--- /dev/null
@@ -0,0 +1,114 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified Sat Jul 24 19:38:44 1993 by Rik Faith (faith@cs.unc.edu)
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
+.\"    all rights reserved.
+.\" Translated 1997-12-19, HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
+.\" Updated 2008-08-01, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH FGETGRENT 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+fgetgrent \- グループファイルエントリーの取り出し
+.SH 書式
+.nf
+\fB#include <stdio.h>\fP
+\fB#include <sys/types.h>\fP
+\fB#include <grp.h>\fP
+.PP
+\fBstruct group *fgetgrent(FILE *\fP\fIstream\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBfgetgrent\fP():
+    Since glibc 2.19:
+        _DEFAULT_SOURCE
+    Glibc 2.19 and earlier:
+        _SVID_SOURCE
+.SH 説明
+\fBfgetgrent\fP()  関数は、 \fIstream\fP で参照されるファイルから取り出したグループ情報
+を含む構造体へのポインターを返す。最初に呼び出された時は 最初のエントリーを返し、それ以降は、次のエントリーを返す。 \fIstream\fP
+で参照されるファイルは、 \fI/etc/group\fP と同じ形式でなければならない (\fBgroup\fP(5)  参照)。
+.PP
+\fIgroup\fP 構造体は \fI<grp.h>\fP で以下のように定義されている:
+.PP
+.in +4n
+.EX
+struct group {
+    char   *gr_name;        /* グループ名 */
+    char   *gr_passwd;      /* グループのパスワード */
+    gid_t   gr_gid;         /* グループ ID */
+    char  **gr_mem;         /* グループのメンバ名へのポインター
+                               の配列 (配列はヌルで終端する) */
+};
+.EE
+.in
+.SH 返り値
+\fBfgetgrent\fP()  関数は \fIgroup\fP 構造体へのポインターを返す。 これ以上エントリーが無いか、エラーが発生した場合は NULL
+を返す。 エラーの場合、 \fIerrno\fP に原因を示す値が設定される。
+.SH エラー
+.TP 
+\fBENOMEM\fP
+\fIgroup\fP 構造体を割り当てるためのメモリーが不十分。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBfgetgrent\fP()
+T}     Thread safety   MT\-Unsafe race:fgetgrent
+.TE
+.\" FIXME The marking is different from that in the glibc manual,
+.\" which has:
+.\"
+.\"    fgetgrent: MT-Unsafe race:fgrent
+.\"
+.\" We think race:fgrent in glibc may be hard for users to understand,
+.\" and have sent a patch to the GNU libc community for changing it to
+.\" race:fgetgrent, however, something about the copyright impeded the
+.\" progress.
+.SH 準拠
+SVr4.
+.SH 関連項目
+\fBendgrent\fP(3), \fBfgetgrent_r\fP(3), \fBfopen\fP(3), \fBgetgrent\fP(3),
+\fBgetgrgid\fP(3), \fBgetgrnam\fP(3), \fBputgrent\fP(3), \fBsetgrent\fP(3), \fBgroup\fP(5)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/fgetpwent.3 b/manual/LDP_man-pages/draft/man3/fgetpwent.3
new file mode 100644 (file)
index 0000000..9138212
--- /dev/null
@@ -0,0 +1,123 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\"
+.\" Modified Sat Jul 24 19:37:37 1993 by Rik Faith (faith@cs.unc.edu)
+.\" Modified Mon May 27 22:40:48 1996 by Martin Schulze (joey@linux.de)
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
+.\"    all rights reserved.
+.\" Translated 1997-12-18, HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
+.\" Updated 2008-08-01, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH FGETPWENT 3 2018\-02\-02 GNU "Linux Programmer's Manual"
+.SH 名前
+fgetpwent \- パスワードファイルエントリーの取り出し
+.SH 書式
+.nf
+\fB#include <stdio.h>\fP
+\fB#include <sys/types.h>\fP
+\fB#include <pwd.h>\fP
+.PP
+\fBstruct passwd *fgetpwent(FILE *\fP\fIstream\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBfgetpwent\fP():
+    Since glibc 2.19:
+        _DEFAULT_SOURCE
+    Glibc 2.19 and earlier:
+        _SVID_SOURCE
+.SH 説明
+\fBfgetpwent\fP()  関数は、\fIstream\fP から得られた行を分解したフィールド を含む構造体へのポインターを返す。
+最初に呼び出された時には最初のエントリーを返し、それ以降は 次のエントリーを返す。 \fIstream\fP で参照されるファイルは
+\fI/etc/passwd\fP と同じ形式でなければならない (\fBpasswd\fP(5)  参照)。
+.PP
+\fIpasswd\fP 構造体は、\fI<pwd.h>\fP で以下のように定義されている:
+.PP
+.in +4n
+.EX
+struct passwd {
+    char   *pw_name;       /* ユーザー名 */
+    char   *pw_passwd;     /* ユーザーのパスワード */
+    uid_t   pw_uid;        /* ユーザー ID */
+    gid_t   pw_gid;        /* グループ ID */
+    char   *pw_gecos;      /* 実名 */
+    char   *pw_dir;        /* ホームディレクトリ */
+    char   *pw_shell;      /* シェルプログラム */
+};
+.EE
+.in
+.SH 返り値
+\fBfgetpwent\fP()  関数は、 \fIpasswd\fP 構造体へのポインターを返す。 これ以上エントリーが無いか、エラーが発生した場合は NULL
+を返す。 エラーの場合、 \fIerrno\fP に原因を示す値が設定される。
+.SH エラー
+.TP 
+\fBENOMEM\fP
+\fIpasswd\fP 構造体に割り当てるメモリーが十分なかった。
+.SH ファイル
+.TP 
+\fI/etc/passwd\fP
+パスワードデータベースファイル
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBfgetpwent\fP()
+T}     Thread safety   MT\-Unsafe race:fgetpwent
+.TE
+.\" FIXME: The marking is different from that in the glibc manual,
+.\" which has:
+.\"
+.\"    fgetpwent: MT-Unsafe race:fpwent
+.\"
+.\" We think race:fpwent in glibc maybe hard for users to understand,
+.\" and have sent a patch to the GNU libc community for changing it to
+.\" race:fgetpwent, however, something about the copyright impeded the
+.\" progress.
+.SH 準拠
+SVr4.
+.SH 関連項目
+\fBendpwent\fP(3), \fBfgetpwent_r\fP(3), \fBfopen\fP(3), \fBgetpw\fP(3), \fBgetpwent\fP(3),
+\fBgetpwnam\fP(3), \fBgetpwuid\fP(3), \fBputpwent\fP(3), \fBsetpwent\fP(3), \fBpasswd\fP(5)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/floor.3 b/manual/LDP_man-pages/draft/man3/floor.3
new file mode 100644 (file)
index 0000000..774ba47
--- /dev/null
@@ -0,0 +1,108 @@
+.\" Copyright 2001 Andries Brouwer <aeb@cwi.nl>.
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 YOSHINO Takashi
+.\" and Copyright (c) 2008 Akihiro MOTOKI
+.\" Translated Mon Jan 20 18:35:18 JST 1997
+.\"       by YOSHINO Takashi <yoshino@civil.jcn.nihon-u.ac.jp>
+.\" Updated & Modified Fri Jul  6 20:37:36 JST 2001
+.\"       by Yuichi SATO <ysato@h4.dion.ne.jp>
+.\" Updated & Modified Mon Jan 10 08:45:45 JST 2005
+.\"       by Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH FLOOR 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+floor, floorf, floorl \- 引き数を越えない最大の整数値
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBdouble floor(double \fP\fIx\fP\fB);\fP
+\fBfloat floorf(float \fP\fIx\fP\fB);\fP
+\fBlong double floorl(long double \fP\fIx\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBfloorf\fP(), \fBfloorl\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad
+.SH 説明
+これらの関数は \fIx\fP より大きくない最大の整数値を返す。
+.PP
+例えば、 \fIfloor(0.5)\fP は 0.0 で、 \fIfloor(\-0.5)\fP は \-1.0 である。
+.SH 返り値
+これらの関数は \fIx\fP を越えない最小の整数値を返す。
+.PP
+\fIx\fP が整数、+0、\-0、NaN、無限大のいずれかの場合、 \fIx\fP そのものが返される。
+.SH エラー
+エラーは発生しない。 POSIX.1\-2001 にはオーバーフローでの範囲エラー (range error) の 記載がある。「注意」の節を参照のこと。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw27 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBfloor\fP(),
+\fBfloorf\fP(),
+\fBfloorl\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.PP
+The variant returning \fIdouble\fP also conforms to SVr4, 4.3BSD, C89.
+.SH 注意
+.\" The POSIX.1-2001 APPLICATION USAGE SECTION discusses this point.
+SUSv2 と POSIX.1\-2001 にはオーバーフローに関する記述があり、 オーバーフローの場合には、 \fIerrno\fP を \fBERANGE\fP
+に設定するか、 \fBFE_OVERFLOW\fP 例外を発生することとされている。
+実際のところ、どの現行のマシンでも結果がオーバーフローを起こすことはないので、 このエラー処理は意味がない。
+(より正確に言うと、オーバーフローは指数部の最大値が 仮数部を表すビットの数より小さい場合にしか起こらない。 IEEE\-754 規格の 32 ビットと
+64 ビットの浮動小数では、 指数部の最大値はそれぞれ 128 と 1024 であり、 仮数部のビット数はそれぞれ 24 と 53 である。)
+.SH 関連項目
+\fBceil\fP(3), \fBlrint\fP(3), \fBnearbyint\fP(3), \fBrint\fP(3), \fBround\fP(3),
+\fBtrunc\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/fma.3 b/manual/LDP_man-pages/draft/man3/fma.3
new file mode 100644 (file)
index 0000000..c0c4eb7
--- /dev/null
@@ -0,0 +1,123 @@
+.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
+.\" Distributed under GPL
+.\" %%%LICENSE_END
+.\"
+.\" Modified 2004-11-15, Added further text on FLT_ROUNDS
+.\"    as suggested by AEB and Fabian Kreutz
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2004-2005 Yuichi SATO
+.\" and Copyright (c) 2008 Akihiro MOTOKI
+.\" Translated Sat Jul 24 10:37:53 JST 2004
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated & Modified Mon Jan 10 09:11:49 JST 2005 by Yuichi SATO
+.\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH FMA 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+fma, fmaf, fmal \- 浮動小数点数の積と和を計算する
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBdouble fma(double \fP\fIx\fP\fB, double \fP\fIy\fP\fB, double \fP\fIz\fP\fB);\fP
+\fBfloat fmaf(float \fP\fIx\fP\fB, float \fP\fIy\fP\fB, float \fP\fIz\fP\fB);\fP
+\fBlong double fmal(long double \fP\fIx\fP\fB, long double \fP\fIy\fP\fB, long double \fP\fIz\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBfma\fP(), \fBfmaf\fP(), \fBfmal\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+.RE
+.ad
+.SH 説明
+These functions compute \fIx\fP * \fIy\fP + \fIz\fP.  The result is rounded as one
+ternary operation according to the current rounding mode (see \fBfenv\fP(3)).
+.SH 返り値
+これらの関数は \fIx\fP * \fIy\fP + \fIz\fP の、一つの三項演算として丸められた値を返す。
+.PP
+\fIx\fP か \fIy\fP が NaN の場合、NaN が返される。
+.PP
+\fIy\fP の \fIx\fP 倍がちょうど無限大で、 \fIz\fP がそれとは反対の符号の無限大の場合、 領域エラー (domain error)
+が発生し、NaN が返される。
+.PP
+.\" POSIX.1-2008 allows some possible differences for the following two
+.\" domain error cases, but on Linux they are treated the same (AFAICS).
+.\" Nevertheless, we'll mirror POSIX.1 and describe the two cases
+.\" separately.
+.\" POSIX.1 says that a NaN or an implementation-defined value shall
+.\" be returned for this case.
+\fIx\fP と \fIy\fP のうち一方が無限大で、もう一方が 0 で、 \fIz\fP が NaN でない場合、領域エラーが発生し、NaN が返される。
+.PP
+.\" POSIX.1 makes the domain error optional for this case.
+\fIx\fP と \fIy\fP のうち一方が無限大で、もう一方が 0 で、 \fIz\fP が NaN の場合、領域エラーが発生し、NaN が返される。
+.PP
+\fIy\fP の \fIx\fP 倍が 0 の無限大倍 (もしくはその逆) ではなく、 \fIz\fP が NaN の場合、NaN が返される。
+.PP
+結果がオーバーフローする場合、範囲エラー (range error) が発生し、 正しい符号の無限大が返される。
+.PP
+結果がアンダーフローする場合、 範囲エラーが発生し、符号付きの 0 が返される。
+.SH エラー
+これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
+.PP
+以下のエラーが発生する可能性がある。
+.TP 
+領域エラー: \fIx\fP * \fIy\fP + \fIz\fP か \fIx\fP * \fIy\fP が無効で、\fIz\fP が NaN ではない
+.\" .I errno
+.\" is set to
+.\" .BR EDOM .
+不正 (invalid) 浮動小数点例外 (\fBFE_INVALID\fP)  が上がる。
+.TP 
+範囲エラー (range error): 結果のオーバーフロー
+.\" .I errno
+.\" is set to
+.\" .BR ERANGE .
+オーバーフロー浮動小数点例外 (\fBFE_OVERFLOW\fP)  が上がる。
+.TP 
+範囲エラー (range error): 結果のアンダーフロー
+.\" .I errno
+.\" is set to
+.\" .BR ERANGE .
+アンダーフロー浮動小数点例外 (\fBFE_UNDERFLOW\fP)  が上がる。
+.PP
+.\" FIXME . Is it intentional that these functions do not set errno?
+.\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6801
+これらの関数は \fIerrno\fP を設定しない。
+.SH バージョン
+これらの関数は glibc バージョン 2.1 で初めて登場した。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw21 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBfma\fP(),
+\fBfmaf\fP(),
+\fBfmal\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.SH 関連項目
+\fBremainder\fP(3), \fBremquo\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/fmax.3 b/manual/LDP_man-pages/draft/man3/fmax.3
new file mode 100644 (file)
index 0000000..d983024
--- /dev/null
@@ -0,0 +1,75 @@
+.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
+.\" Distributed under GPL
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2004-2005 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated Sat Jul 24 10:45:05 JST 2004
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated & Modified Mon Jan 10 10:11:00 JST 2005 by Yuichi SATO
+.\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH FMAX 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+fmax, fmaxf, fmaxl \- 二つの浮動小数点数の最大値を求める
+.SH 書式
+\fB#include <math.h>\fP
+.PP
+\fBdouble fmax(double \fP\fIx\fP\fB, double \fP\fIy\fP\fB);\fP \fBfloat fmaxf(float \fP\fIx\fP\fB,
+float \fP\fIy\fP\fB);\fP \fBlong double fmaxl(long double \fP\fIx\fP\fB, long double
+\fP\fIy\fP\fB);\fP
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBfmax\fP(), \fBfmaxf\fP(), \fBfmaxl\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+.RE
+.ad
+.SH 説明
+これらの関数は \fIx\fP と \fIy\fP のうち大きい方の値を返す。
+.SH 返り値
+これらの関数は \fIx\fP と \fIy\fP の最大値を返す。
+.PP
+一方の引き数が NaN の場合、もう一方の値が返される。
+.PP
+両方の引き数が NaN の場合、NaN が返される。
+.SH エラー
+エラーは発生しない。
+.SH バージョン
+これらの関数は glibc バージョン 2.1 で初めて登場した。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw24 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBfmax\fP(),
+\fBfmaxf\fP(),
+\fBfmaxl\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.SH 関連項目
+\fBfdim\fP(3), \fBfmin\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/fmin.3 b/manual/LDP_man-pages/draft/man3/fmin.3
new file mode 100644 (file)
index 0000000..0496cf1
--- /dev/null
@@ -0,0 +1,77 @@
+.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
+.\" Distributed under GPL
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2004-2005 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated Sat Jul 24 11:09:37 JST 2004
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated & Modified Mon Jan 10 10:11:00 JST 2005 by Yuichi SATO
+.\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH FMIN 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+fmin, fminf, fminl \- 二つの浮動小数点数の最小値を求める
+.SH 書式
+\fB#include <math.h>\fP
+.PP
+\fBdouble fmin(double \fP\fIx\fP\fB, double \fP\fIy\fP\fB);\fP
+.br
+\fBfloat fminf(float \fP\fIx\fP\fB, float \fP\fIy\fP\fB);\fP
+.br
+\fBlong double fminl(long double \fP\fIx\fP\fB, long double \fP\fIy\fP\fB);\fP
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBfmin\fP(), \fBfminf\fP(), \fBfminl\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+.RE
+.ad
+.SH 説明
+これらの関数は \fIx\fP と \fIy\fP のうち小さい方の値を返す。
+.SH 返り値
+これらの関数は \fIx\fP と \fIy\fP の最小値を返す。
+.PP
+一方の引き数が NaN の場合、もう一方の値が返される。
+.PP
+両方の引き数が NaN の場合、NaN が返される。
+.SH エラー
+エラーは発生しない。
+.SH バージョン
+これらの関数は glibc バージョン 2.1 で初めて登場した。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw24 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBfmin\fP(),
+\fBfminf\fP(),
+\fBfminl\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.SH 関連項目
+\fBfdim\fP(3), \fBfmax\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/fmod.3 b/manual/LDP_man-pages/draft/man3/fmod.3
new file mode 100644 (file)
index 0000000..6e950ee
--- /dev/null
@@ -0,0 +1,126 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 2002-07-27 by Walter Harms
+.\"    (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 YOSHINO Takashi
+.\" and Copyright (c) 2008 Akihiro MOTOKI
+.\" Translated Mon Jan 20 18:39:17 JST 1997
+.\"       by YOSHINO Takashi <yoshino@civil.jcn.nihon-u.ac.jp>
+.\" Updated Wed Oct 15 JST 2003 by Kentaro Shirakata <argrath@ub32.org>
+.\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH FMOD 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+fmod, fmodf, fmodl \- 浮動小数点剰余関数
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBdouble fmod(double \fP\fIx\fP\fB, double \fP\fIy\fP\fB);\fP
+\fBfloat fmodf(float \fP\fIx\fP\fB, float \fP\fIy\fP\fB);\fP
+\fBlong double fmodl(long double \fP\fIx\fP\fB, long double \fP\fIy\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBfmodf\fP(), \fBfmodl\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad
+.SH 説明
+These functions compute the floating\-point remainder of dividing \fIx\fP by
+\fIy\fP.  The return value is \fIx\fP \- \fIn\fP * \fIy\fP, where \fIn\fP is the quotient of
+\fIx\fP / \fIy\fP, rounded toward zero to an integer.
+.SH 返り値
+成功すると、これらの関数は \fIx\fP\ \-\ \fIn\fP*\fIy\fP を返す。 \fIn\fP は、返り値が \fIx\fP と同じ符号で、その絶対値が \fIy\fP
+の絶対値よりも小さくなるような整数である。
+.PP
+\fIx\fP か \fIy\fP が NaN の場合、NaN が返される。
+.PP
+\fIx\fP が無限大の場合、領域エラー (domain error) が発生し、 NaN が返される。
+.PP
+\fIy\fP が 0 の場合、領域エラーが発生し、 NaN が返される。
+.PP
+\fIx\fP が +0 (\-0) で \fIy\fP が 0 でない場合、+0 (\-0) が返される。
+.SH エラー
+これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
+.PP
+以下のエラーが発生する可能性がある。
+.TP 
+領域エラー (domain error): \fIx\fP が無限大である
+\fIerrno\fP に \fBEDOM\fP が設定される (「バグ」の節も参照)。 不正 (invalid) 浮動小数点例外 (\fBFE_INVALID\fP)
+が上がる。
+.TP 
+領域エラー: \fIy\fP がゼロ
+.\" POSIX.1 documents an optional underflow error, but AFAICT it doesn't
+.\" (can't?) occur -- mtk, Jul 2008
+\fIerrno\fP に \fBEDOM\fP が設定される。 不正 (invalid) 浮動小数点例外 (\fBFE_INVALID\fP)  が上がる。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw24 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBfmod\fP(),
+\fBfmodf\fP(),
+\fBfmodl\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.PP
+The variant returning \fIdouble\fP also conforms to SVr4, 4.3BSD, C89.
+.SH バグ
+.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6784
+バージョン 2.10 より前の glibc の実装では、 無限大で領域エラーが発生した際に、 \fIerrno\fP に \fBEDOM\fP が設定されなかった。
+.SH 関連項目
+\fBremainder\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/fpclassify.3 b/manual/LDP_man-pages/draft/man3/fpclassify.3
new file mode 100644 (file)
index 0000000..37cd5f0
--- /dev/null
@@ -0,0 +1,130 @@
+.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
+.\" Distributed under GPL
+.\" %%%LICENSE_END
+.\"
+.\" This was done with the help of the glibc manual.
+.\"
+.\" 2004-10-31, aeb, corrected
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2004-2005 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated 2004-07-27, Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated & Modified 2005-01-10, Yuichi SATO
+.\" Updated & Modified 2005-09-04, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH FPCLASSIFY 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+fpclassify, isfinite, isnormal, isnan, isinf \- 浮動小数点数の分類マクロ
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBint fpclassify(\fP\fIx\fP\fB);\fP
+.PP
+\fBint isfinite(\fP\fIx\fP\fB);\fP
+.PP
+\fBint isnormal(\fP\fIx\fP\fB);\fP
+.PP
+\fBint isnan(\fP\fIx\fP\fB);\fP
+.PP
+\fBint isinf(\fP\fIx\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.\" I haven't fully grokked the source to determine the FTM requirements;
+.\" in part, the following has been tested by experiment.
+.ad l
+\fBfpclassify\fP(), \fBisfinite\fP(), \fBisnormal\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+.RE
+\fBisnan\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || _XOPEN_SOURCE
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+\fBisinf\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad
+.SH 説明
+浮動小数点数は無限大や NaN のような特別な値を持つことができる。 マクロ \fBfpclassify(\fP\fIx\fP\fB)\fP で \fIx\fP
+がどのような種別かを知ることができる。 マクロは任意の浮動小数点数表現を引き数としてとることができる。 結果は以下の値のいずれか一つである:
+.TP  14
+\fBFP_NAN\fP
+\fIx\fP が "Not a Number" である (数値ではない)。
+.TP 
+\fBFP_INFINITE\fP
+\fIx\fP が正の無限大または負の無限大である。
+.TP 
+\fBFP_ZERO\fP
+\fIx\fP が 0 である。
+.TP 
+\fBFP_SUBNORMAL\fP
+\fIx\fP を正規化形式で表現するには小さすぎる。
+.TP 
+\fBFP_NORMAL\fP
+上記のどれにも当てはまらない場合であり、 値は通常の浮動小数点数であるはずだ。
+.PP
+他のマクロは、いくつかの標準的な問いに対して、簡単な答えを提供する。
+.TP  14
+\fBisfinite(\fP\fIx\fP\fB)\fP
+以下の場合に 0 以外の値を返す。
+.br
+(fpclassify(x) != FP_NAN && fpclassify(x) != FP_INFINITE)
+.TP 
+\fBisnormal(\fP\fIx\fP\fB)\fP
+(fpclassify(x) == FP_NORMAL)  の場合に 0 以外の値を返す。
+.TP 
+\fBisnan(\fP\fIx\fP\fB)\fP
+(fpclassify(x) == FP_NAN)  の場合に 0 以外の値を返す。
+.TP 
+\fBisinf(\fP\fIx\fP\fB)\fP
+\fIx\fP が正の無限大の場合は 1 を、 負の無限大の場合は \-1 を返す。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.ad l
+.TS
+allbox;
+lbw28 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBfpclassify\fP(),
+\fBisfinite\fP(),
+\fBisnormal\fP(),
+\fBisnan\fP(),
+\fBisinf\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.ad
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, C99.
+.PP
+\fBisinf\fP()  に関して、標準規格で定められているのは、 返り値が 0 以外になるのは引き数が無限大の場合だけということだけである。
+.SH 注意
+glibc 2.01 以前では、 \fBisinf\fP()  は \fIx\fP が正の無限大か負の無限大の場合、 0 以外の値 (実際には 1) を返す
+(C99 の要求仕様で決まっているのは 0 以外の値を返すということだけである)。
+.SH 関連項目
+\fBfinite\fP(3), \fBINFINITY\fP(3), \fBisgreater\fP(3), \fBsignbit\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/fread.3 b/manual/LDP_man-pages/draft/man3/fread.3
new file mode 100644 (file)
index 0000000..f066f40
--- /dev/null
@@ -0,0 +1,164 @@
+.\" Copyright (c) 1990, 1991 The Regents of the University of California.
+.\" and Copyright (c) 2020 Arkadiusz Drabczyk <arkadiusz@drabczyk.org>
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to Berkeley by
+.\" Chris Torek and the American National Standards Committee X3,
+.\" on Information Processing Systems.
+.\"
+.\" %%%LICENSE_START(BSD_4_CLAUSE_UCB)
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\"    must display the following acknowledgement:
+.\"    This product includes software developed by the University of
+.\"    California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\"    may be used to endorse or promote products derived from this software
+.\"    without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\" %%%LICENSE_END
+.\"
+.\"     @(#)fread.3    6.6 (Berkeley) 6/29/91
+.\"
+.\" Converted for Linux, Mon Nov 29 15:37:33 1993, faith@cs.unc.edu
+.\" Sun Feb 19 21:26:54 1995 by faith, return values
+.\" Modified Thu Apr 20 20:43:53 1995 by Jim Van Zandt <jrv@vanzandt.mv.com>
+.\" Modified Fri May 17 10:21:51 1996 by Martin Schulze <joey@infodrom.north.de>
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 YOSHINO Takashi
+.\"       all rights reserved.
+.\" Translated Tue Jan 21 21:57:33 JST 1997
+.\"       by YOSHINO Takashi <yoshino@civil.jcn.nihon-u.ac.jp>
+.\" Updated & Modified Mon Mar 1 1999
+.\"       by NAKANO Takeo <nakano@apm.seikei.ac.jp>
+.\" Updated Sat Nov  3 JST 2001 by Kentaro Shirakata <argrath@ub32.org>
+.\" Updated 2012-04-30, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH FREAD 3 2020\-08\-13 GNU "Linux Programmer's Manual"
+.SH 名前
+fread, fwrite \- バイナリストリームの入出力
+.SH 書式
+.nf
+\fB#include <stdio.h>\fP
+.PP
+\fBsize_t fread(void *\fP\fIptr\fP\fB, size_t \fP\fIsize\fP\fB, size_t \fP\fInmemb\fP\fB, FILE *\fP\fIstream\fP\fB);\fP
+.PP
+\fBsize_t fwrite(const void *\fP\fIptr\fP\fB, size_t \fP\fIsize\fP\fB, size_t \fP\fInmemb\fP\fB,\fP
+\fB              FILE *\fP\fIstream\fP\fB);\fP
+.fi
+.SH 説明
+The function \fBfread\fP()  reads \fInmemb\fP items of data, each \fIsize\fP bytes
+long, from the stream pointed to by \fIstream\fP, storing them at the location
+given by \fIptr\fP.
+.PP
+The function \fBfwrite\fP()  writes \fInmemb\fP items of data, each \fIsize\fP bytes
+long, to the stream pointed to by \fIstream\fP, obtaining them from the
+location given by \fIptr\fP.
+.PP
+これらの処理を停止せずに行いたいときは、 \fBunlocked_stdio\fP(3)  を参照のこと。
+.SH 返り値
+On success, \fBfread\fP()  and \fBfwrite\fP()  return the number of items read or
+written.  This number equals the number of bytes transferred only when
+\fIsize\fP is 1.  If an error occurs, or the end of the file is reached, the
+return value is a short item count (or zero).
+.PP
+The file position indicator for the stream is advanced by the number of
+bytes successfully read or written.
+.PP
+\fBfread\fP()  は end\-of\-file とエラーを区別しないので、 どちらが生じたかを判断するためには、 呼び出し側で \fBfeof\fP(3)
+と \fBferror\fP(3)  とを使用しなければならない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw17 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBfread\fP(),
+\fBfwrite\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, C89.
+.SH 例
+The program below demonstrates the use of \fBfread\fP()  by parsing /bin/sh ELF
+executable in binary mode and printing its magic and class:
+.PP
+.in +4n
+.EX
+$ \fB./a.out\fP
+ELF magic: 0x7f454c46
+Class: 0x02
+.EE
+.in
+.SS プログラムのソース
+\&
+.EX
+#include <stdio.h>
+#include <stdlib.h>
+
+#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
+
+int
+main(void)
+{
+    FILE *fp = fopen("/bin/sh", "rb");
+    if (!fp) {
+        perror("fopen");
+        return EXIT_FAILURE;
+    }
+
+    unsigned char buffer[4];
+
+    size_t ret = fread(buffer, ARRAY_SIZE(buffer), sizeof(*buffer), fp);
+    if (ret != sizeof(*buffer)) {
+        fprintf(stderr, "fread() failed: %zu\en", ret);
+        exit(EXIT_FAILURE);
+    }
+
+    printf("ELF magic: %#04x%02x%02x%02x\en", buffer[0], buffer[1],
+           buffer[2], buffer[3]);
+
+    ret = fread(buffer, 1, 1, fp);
+    if (ret != 1) {
+        fprintf(stderr, "fread() failed: %zu\en", ret);
+        exit(EXIT_FAILURE);
+    }
+
+    printf("Class: %#04x\en", buffer[0]);
+
+    fclose(fp);
+
+    exit(EXIT_SUCCESS);
+}
+.EE
+.SH 関連項目
+\fBread\fP(2), \fBwrite\fP(2), \fBfeof\fP(3), \fBferror\fP(3), \fBunlocked_stdio\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/ftime.3 b/manual/LDP_man-pages/draft/man3/ftime.3
new file mode 100644 (file)
index 0000000..c03708d
--- /dev/null
@@ -0,0 +1,99 @@
+.\" Copyright (c) 1993 Michael Haardt
+.\" (michael@moria.de)
+.\" Fri Apr  2 11:32:09 MET DST 1993
+.\"
+.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
+.\" This is free documentation; you can redistribute it and/or
+.\" modify it under the terms of the GNU General Public License as
+.\" published by the Free Software Foundation; either version 2 of
+.\" the License, or (at your option) any later version.
+.\"
+.\" The GNU General Public License's references to "object code"
+.\" and "executables" are to be interpreted as the output of any
+.\" document formatting or typesetting system, including
+.\" intermediate and printed output.
+.\"
+.\" This manual is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public
+.\" License along with this manual; if not, see
+.\" <http://www.gnu.org/licenses/>.
+.\" %%%LICENSE_END
+.\"
+.\" Modified Sat Jul 24 14:23:14 1993 by Rik Faith (faith@cs.unc.edu)
+.\" Modified Sun Oct 18 17:31:43 1998 by Andries Brouwer (aeb@cwi.nl)
+.\" 2008-06-23, mtk, minor rewrites, added some details
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
+.\"    all rights reserved.
+.\" Translated Thu Dec 25 10:53:32 JST 1997
+.\"    by HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
+.\"
+.TH FTIME 3 2020\-02\-09 GNU "Linux Programmer's Manual"
+.SH 名前
+ftime \- 日付と時間を返す
+.SH 書式
+\fB#include <sys/timeb.h>\fP
+.PP
+\fBint ftime(struct timeb *\fP\fItp\fP\fB);\fP
+.SH 説明
+\fBNOTE\fP: This function is deprecated, and will be removed in a future
+version of the GNU C library.  Use \fBclock_gettime\fP(2)  instead.
+.PP
+この関数は現在の時刻を、紀元 (Epoch; 1970\-01\-01 00:00:00 +0000 (UTC))  からの秒数とミリ秒数で返す。 時刻は
+\fItp\fP で返され、これは以下のように定義されている:
+.PP
+.in +4n
+.EX
+struct timeb {
+    time_t         time;
+    unsigned short millitm;
+    short          timezone;
+    short          dstflag;
+};
+.EE
+.in
+.PP
+ここで、\fItime\fP は紀元 (the Epoch) からの秒数、 \fImillitm\fP は 紀元から \fItime\fP 秒後からのミリ秒数である。
+\fItimezone\fP フィールドはグリニッジから西周りの分で計測される ローカルタイムゾーンである(負数の場合はグリニッジからの東回りの分を 示す)。
+\fIdstflag\fP フィールドは、もし 0 でなければ一年の一部で夏時間が 存在することを示すフラグである。
+.PP
+POSIX.1\-2001 では、\fItimezone\fP と \fIdstflag\fP の内容は未定義である; これに頼るのは避けること。
+.SH 返り値
+この関数は常に 0 を返す。 (POSIX.1\-2001 仕様及びいくつかのシステムのドキュメントでは、 エラー時に \-1 を返す。)
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBftime\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+4.2BSD, POSIX.1\-2001.  POSIX.1\-2008 では \fBftime\fP()  の仕様が削除されている。
+.PP
+この関数は古いものである。使ってはならない。 秒単位の時間で十分なら、 \fBtime\fP(2)  が利用できる。 \fBgettimeofday\fP(2)
+でマイクロ秒が得られる。 \fBclock_gettime\fP(2)  でナノ秒が得られるが、広く利用可能な訳ではない。
+.SH バグ
+.\" .SH HISTORY
+.\" The
+.\" .BR ftime ()
+.\" function appeared in 4.2BSD.
+初期の glibc2 ではバグがあり、常に \fImillitm\fP フィールドに 0 を返す。 glibc 2.1.1 から再び正常になった。
+.SH 関連項目
+\fBgettimeofday\fP(2), \fBtime\fP(2)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/ftok.3 b/manual/LDP_man-pages/draft/man3/ftok.3
new file mode 100644 (file)
index 0000000..cc140c1
--- /dev/null
@@ -0,0 +1,93 @@
+.\" Copyright 1993 Giorgio Ciucci (giorgio@crcc.it)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" Modified 2001-11-28, by Michael Kerrisk, <mtk.manpages@gmail.com>
+.\"    Changed data type of proj_id; minor fixes
+.\"    aeb: further fixes; added notes.
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1998 NAKANO Takeo all rights reserved.
+.\" Translated Tue Apr 28 1998 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
+.\" Updated Sun 6 Jan 2002 by NAKANO Takeo
+.\"
+.TH FTOK 3 2020\-04\-11 GNU "Linux Programmer's Manual"
+.SH 名前
+ftok \- パス名とプロジェクト識別子を System V IPC キーに変換する
+.SH 書式
+.nf
+\fB#include <sys/types.h>\fP
+\fB#include <sys/ipc.h>\fP
+.fi
+.PP
+\fBkey_t ftok(const char *\fP\fIpathname\fP\fB, int \fP\fIproj_id\fP\fB);\fP
+.SH 説明
+\fBftok\fP()  関数は \fIpathname\fP で与えられたファイル (存在し、アクセス可能でなければならない)  のファイル名の識別情報
+(identity) と、 \fIproj_id\fP (0 であってはならない) の低位 8 ビットとを用いて、 \fIkey_t\fP 型の System V
+IPC キーを生成する。 このキーは \fBmsgget\fP(2), \fBsemget\fP(2), \fBshmget\fP(2)  などでの利用に適している。
+.PP
+同じファイルを示すあらゆるパス名と、同じ \fIproj_id\fP に対しては、結果の値は等しくなる。 ファイルが違ったり
+(この場合両者は同時に存在しているはず)、 \fIproj_id\fP が異なると、返り値も異なる。
+.SH 返り値
+成功した場合は生成された \fIkey_t\fP の値が返される。 失敗すると \-1 が返され、エラーの内容が \fBerrno\fP
+に書き込まれる。この内容はシステムコール \fBstat\fP(2)  のものと同じである。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBftok\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+いくつかの古いシステムでは、プロトタイプは以下のようになっていた。
+.PP
+.in +4n
+.EX
+\fBkey_t ftok(char *\fP\fIpathname\fP\fB, char \fP\fIproj_id\fP\fB);\fP
+.EE
+.in
+.PP
+現在では \fIproj_id\fP は \fIint\fP だが、依然として 8 ビットしか用いられない。 通常は ASCII キャラクターが
+\fIproj_id\fP に用いられる。 \fIproj_id\fP が 0 のときの振る舞いが未定義になっているのは、これが理由である。
+.PP
+もちろん \fIkey_t\fP が他と重ならないものであるかどうかは保証されない。 最善の場合の組み合わせを考えても、 \fIproj_id\fP の 1
+バイト、i ノード番号の低位 16 ビット、および デバイス番号の低位 8 ビットなので、結果は 32 ビットに過ぎない。 例えば
+\fI/dev/hda1\fP と \fI/dev/sda1\fP それぞれにあるファイルに対して、衝突は容易に起こりうる。
+.SH EXAMPLES
+See \fBsemget\fP(2).
+.SH 関連項目
+\fBmsgget\fP(2), \fBsemget\fP(2), \fBshmget\fP(2), \fBstat\fP(2), \fBsysvipc\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/fts.3 b/manual/LDP_man-pages/draft/man3/fts.3
new file mode 100644 (file)
index 0000000..5137bdb
--- /dev/null
@@ -0,0 +1,429 @@
+.\"    $NetBSD: fts.3,v 1.13.2.1 1997/11/14 02:09:32 mrg Exp $
+.\"
+.\" Copyright (c) 1989, 1991, 1993, 1994
+.\"    The Regents of the University of California.  All rights reserved.
+.\"
+.\" %%%LICENSE_START(BSD_4_CLAUSE_UCB)
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\"    must display the following acknowledgement:
+.\"    This product includes software developed by the University of
+.\"    California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\"    may be used to endorse or promote products derived from this software
+.\"    without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\" %%%LICENSE_END
+.\"
+.\"     @(#)fts.3      8.5 (Berkeley) 4/16/94
+.\"
+.\" 2007-12-08, mtk, Converted from mdoc to man macros
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2000 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated Tue Jul 11 19:02:58 JST 2000
+.\"         by Yuichi SATO <sato@complex.eng.hokudai.ac.jp>
+.\"
+.TH FTS 3 2020\-04\-11 Linux "Linux Programmer's Manual"
+.SH 名前
+fts, fts_open, fts_read, fts_children, fts_set, fts_close \- ファイル階層をたどる
+.SH 書式
+.nf
+\fB#include <sys/types.h>\fP
+\fB#include <sys/stat.h>\fP
+\fB#include <fts.h>\fP
+.PP
+\fBFTS *fts_open(char * const *\fP\fIpath_argv\fP\fB, int \fP\fIoptions\fP\fB,\fP
+\fB              int (*\fP\fIcompar\fP\fB)(const FTSENT **, const FTSENT **));\fP
+.PP
+\fBFTSENT *fts_read(FTS *\fP\fIftsp\fP\fB);\fP
+.PP
+\fBFTSENT *fts_children(FTS *\fP\fIftsp\fP\fB, int \fP\fIinstr\fP\fB);\fP
+.PP
+\fBint fts_set(FTS *\fP\fIftsp\fP\fB, FTSENT *\fP\fIf\fP\fB, int \fP\fIinstr\fP\fB);\fP
+.PP
+\fBint fts_close(FTS *\fP\fIftsp\fP\fB);\fP
+.fi
+.SH 説明
+The fts functions are provided for traversing file hierarchies.  A simple
+overview is that the \fBfts_open\fP()  function returns a "handle" (of type
+\fIFTS\ *\fP)  that refers to a file hierarchy "stream".  This handle is then
+supplied to the other fts functions.  The function \fBfts_read\fP()  returns a
+pointer to a structure describing one of the files in the file hierarchy.
+The function \fBfts_children\fP()  returns a pointer to a linked list of
+structures, each of which describes one of the files contained in a
+directory in the hierarchy.
+.PP
+In general, directories are visited two distinguishable times; in preorder
+(before any of their descendants are visited) and in postorder (after all of
+their descendants have been visited).  Files are visited once.  It is
+possible to walk the hierarchy "logically" (visiting the files that symbolic
+links point to)  or physically (visiting the symbolic links themselves),
+order the walk of the hierarchy or prune and/or revisit portions of the
+hierarchy.
+.PP
+Two structures (and associated types) are defined in the include file
+\fI<fts.h>\fP.  The first type is \fIFTS\fP, the structure that represents
+the file hierarchy itself.  The second type is \fIFTSENT\fP, the structure that
+represents a file in the file hierarchy.  Normally, an \fIFTSENT\fP structure
+is returned for every file in the file hierarchy.  In this manual page,
+"file" and "FTSENT structure" are generally interchangeable.
+.PP
+The \fIFTSENT\fP structure contains fields describing a file.  The structure
+contains at least the following fields (there are additional fields that
+should be considered private to the implementation):
+.PP
+.in +4n
+.EX
+.\" Also:
+.\"     ino_t fts_ino;                  /* inode (only for directories)*/
+.\"     dev_t fts_dev;                  /* device (only for directories)*/
+.\"     nlink_t fts_nlink;              /* link count (only for directories)*/
+.\"     u_short fts_flags;              /* private flags for FTSENT structure */
+.\"     u_short fts_instr;              /* fts_set() instructions */
+typedef struct _ftsent {
+    unsigned short  fts_info;     /* flags for FTSENT structure */
+    char           *fts_accpath;  /* access path */
+    char           *fts_path;     /* root path */
+    short           fts_pathlen;  /* strlen(fts_path) +
+                                     strlen(fts_name) */
+    char           *fts_name;     /* filename */
+    short           fts_namelen;  /* strlen(fts_name) */
+    short           fts_level;    /* depth (\-1 to N) */
+    int             fts_errno;    /* file errno */
+    long            fts_number;   /* local numeric value */
+    void           *fts_pointer;  /* local address value */
+    struct _ftsent *fts_parent;   /* parent directory */
+    struct _ftsent *fts_link;     /* next file structure */
+    struct _ftsent *fts_cycle;    /* cycle structure */
+    struct stat    *fts_statp;    /* stat(2) information */
+} FTSENT;
+.EE
+.in
+.PP
+.\" .Bl -tag -width "fts_namelen"
+これらのフィールドは、次のように定義されている。
+.TP 
+\fIfts_info\fP
+.\" .Bl  -tag -width FTS_DEFAULT
+One of the following values describing the returned \fIFTSENT\fP structure and
+the file it represents.  With the exception of directories without errors
+(\fBFTS_D\fP), all of these entries are terminal, that is, they will not be
+revisited, nor will any of their descendants be visited.
+.RS
+.TP 
+\fBFTS_D\fP
+preorder でたどられるディレクトリ。
+.TP 
+\fBFTS_DC\fP
+ツリーの中で循環しているディレクトリ。 (\fIFTSENT\fP 構造体の \fIfts_cycle\fP フィールドも同様に埋められる。)
+.TP 
+\fBFTS_DEFAULT\fP
+ファイルタイプを表現する \fIFTSENT\fP 構造体が、 \fIfts_info\fP の他のいずれかの値で明示的に説明されていない。
+.TP 
+\fBFTS_DNR\fP
+読み込みができないディレクトリ。 これはエラーの場合の返り値であり、 何がエラーを起こしたかを示すために \fIfts_errno\fP
+フィールドが設定される。
+.TP 
+\fBFTS_DOT\fP
+\fBfts_open\fP()  へのファイル名として指定されなかった "." または ".." という名前のファイル (\fBFTS_SEEDOT\fP
+を参照すること)。
+.TP 
+\fBFTS_DP\fP
+postorder でたどられるディレクトリ。 \fIFTSENT\fP 構造体の内容は、preorder のときに返された状態 (つまり、
+\fIfts_info\fP フィールドが \fBFTS_D\fP に設定されている状態) から変更されない。
+.TP 
+\fBFTS_ERR\fP
+これはエラーの場合の返り値であり、 \fIfts_errno\fP フィールドは、何がエラーを起こしたかを示す値に設定される。
+.TP 
+\fBFTS_F\fP
+通常のファイル。
+.TP 
+\fBFTS_NS\fP
+\fBstat\fP(2)  情報が得られなかったファイル。 \fIfts_statp\fP フィールドの内容は定義されない。 これはエラーの場合の返り値であり、
+\fIfts_errno\fP フィールドは、何がエラーを起こしたかを示す値に設定される。
+.TP 
+\fBFTS_NSOK\fP
+\fBstat\fP(2)  情報が要求されなかったファイル。 \fIfts_statp\fP フィールドの内容は定義されない。
+.TP 
+\fBFTS_SL\fP
+シンボリックリンク。
+.TP 
+\fBFTS_SLNONE\fP
+.\" .El
+リンク先の存在しないシンボリックリンク。 \fIfts_statp\fP フィールドの内容は、シンボリックリンクそのもののファイル特性情報を参照する。
+.RE
+.TP 
+\fIfts_accpath\fP
+現在のディレクトリからファイルにアクセスするためのパス。
+.TP 
+\fIfts_path\fP
+階層をたどるときのルートからみたファイルの相対的なパス。 このパスには、 \fBfts_open\fP()  に指定したパスがプレフィックスとして含まれる。
+.TP 
+\fIfts_pathlen\fP
+The sum of the lengths of the strings referenced by \fIfts_path\fP and
+\fIfts_name\fP.
+.TP 
+\fIfts_name\fP
+ファイルの名前。
+.TP 
+\fIfts_namelen\fP
+\fIfts_name\fP で参照される文字列の長さ。
+.TP 
+\fIfts_level\fP
+階層をたどって、このファイルがみつかった深さ。 \-1 〜 N の数値で表される。 階層をたどるときの出発点 (ルート) の親ディレクトリを表す
+\fIFTSENT\fP 構造体では \-1 となる。 また、ルート自身の \fIFTSENT\fP 構造体では 0 になる。
+.TP 
+\fIfts_errno\fP
+If \fBfts_children\fP()  or \fBfts_read\fP()  returns an \fIFTSENT\fP structure whose
+\fIfts_info\fP field is set to \fBFTS_DNR\fP, \fBFTS_ERR\fP, or \fBFTS_NS\fP, the
+\fIfts_errno\fP field contains the error number (i.e., the \fIerrno\fP value)
+specifying the cause of the error.  Otherwise, the contents of the
+\fIfts_errno\fP field are undefined.
+.TP 
+\fIfts_number\fP
+このフィールドは、アプリケーションプログラムから使用するために提供され、 fts 関数群では変更されない。 このフィールドは 0 で初期化される。
+.TP 
+\fIfts_pointer\fP
+このフィールドは、アプリケーションプログラムから使用するために提供され、 fts 関数群では変更されない。 このフィールドは \fBNULL\fP
+で初期化される。
+.TP 
+\fIfts_parent\fP
+A pointer to the \fIFTSENT\fP structure referencing the file in the hierarchy
+immediately above the current file, that is, the directory of which this
+file is a member.  A parent structure for the initial entry point is
+provided as well, however, only the \fIfts_level\fP, \fIfts_number\fP, and
+\fIfts_pointer\fP fields are guaranteed to be initialized.
+.TP 
+\fIfts_link\fP
+\fBfts_children\fP()  から返される場合、 \fIfts_link\fP フィールドはディレクトリメンバーのヌル終端されたリンクリストの形式で、
+次の構造体を指し示す。 それ以外の場合、 \fIfts_link\fP フィールドは定義されない。
+.TP 
+\fIfts_cycle\fP
+2 つのディレクトリにハードリンクが張られているため、 または、シンボリックリンクがあるディレクトリを指しているために、
+ディレクトリが循環する階層構造を作っている場合 (\fBFTS_DC\fP を参照)、 構造体の \fIfts_cycle\fP フィールドは、階層中で現在の
+\fIFTSENT\fP 構造体と同じファイルを参照している \fIFTSENT\fP 構造体を指し示す。 それ以外の場合、 \fIfts_cycle\fP
+フィールドは定義されない。
+.TP 
+\fIfts_statp\fP
+.\" .El
+このファイルの \fBstat\fP(2)  情報へのポインター。
+.PP
+ファイル階層中のすべてのファイルのパスに対して、 ただ 1 つのバッファーが使われる。 したがって、 \fIfts_path\fP と
+\fIfts_accpath\fP フィールドは、 \fBfts_read\fP()
+によって返された最も新しいファイルに対して「のみ」ヌル終端されることが保証される。 これらのフィールドを、他の \fIFTSENT\fP
+構造体で表現されるファイルを参照するために使うには、 \fIFTSENT\fP 構造体の \fIfts_pathlen\fP
+フィールドにある情報を使ってパスのバッファーを修正する必要がある。 これらの修正は、さらに \fBfts_read\fP()
+を呼び出そうとする場合には、元に戻しておかなければならない。 \fIfts_name\fP フィールドは、常に \fBNUL\fP 終端される。
+.SS fts_open()
+\fBfts_open\fP()  関数は、文字列ポインターの配列へのポインターを引き数に取る。 この文字列ポインターは、論理ファイル階層をつくる 1
+つ以上のパスの名前になる。 配列は、 null ポインターで終端されなければならない。
+.PP
+.\" .Bl -tag -width "FTS_PHYSICAL"
+多くのオプションがあり、少なくとも 1 つ (\fBFTS_LOGICAL\fP または \fBFTS_PHYSICAL\fP)  が指定されなければならない。
+オプションは以下の値の論理和をとって選択する。
+.TP 
+\fBFTS_COMFOLLOW\fP
+このオプションは、 \fBFTS_LOGICAL\fP の指定にかかわらず、 ルートパスに指定されたシンボリックリンクをすぐにたどらせる。
+.TP 
+\fBFTS_LOGICAL\fP
+このオプションは、 fts ルーチンにシンボリックリンクそのものではなく、 シンボリックリンクが指しているファイルの \fIFTSENT\fP
+構造体を返させる。 このオプションが設定された場合、 \fIFTSENT\fP 構造体がアプリケーションに返されるような
+シンボリックリンクのみが、存在しないファイルを参照している。 \fBFTS_LOGICAL\fP または \fBFTS_PHYSICAL\fP のどちらかを、
+\fBfts_open\fP()  関数に与えなければ「ならない」。
+.TP 
+\fBFTS_NOCHDIR\fP
+パフォーマンスの最適化のため、 fts 関数群はファイル階層をたどるときディレクトリを変える。 これには、階層をたどっている間は
+アプリケーションがある特定のディレクトリにいるということに 依存できない、という副作用がある。 \fBFTS_NOCHDIR\fP
+オプションで最適化を無効にすると、 fts 関数群は現在のディレクトリを変更しない。 \fBFTS_NOCHDIR\fP が指定され、かつ
+\fBfts_open\fP()  の引き数として絶対パス名が与えられたとき以外、アプリケーションは、 自らカレントディレクトリを変更したり、
+ファイルにアクセスしたりすべきではない、という点に注意すること。
+.TP 
+\fBFTS_NOSTAT\fP
+デフォルトでは、返された \fIFTSENT\fP 構造体は、たどられた各ファイルについてのファイル特徴情報 \fI( statp\fP フィールド) を参照する。
+このオプションは、 fts 関数群が \fIfts_info\fP フィールドを \fBFTS_NSOK\fP に設定し \fIstatp\fP
+の内容を定義されないままにすることを許すことにより、 パフォーマンスの最適化に必要なものを緩和する。
+.TP 
+\fBFTS_PHYSICAL\fP
+このオプションは、 fts ルーチンにシンボリックリンクが指しているファイルではなく、 シンボリックリンク自身の \fIFTSENT\fP 構造体を返させる。
+このオプションが設定されると、階層中のすべてのシンボリックリンクの \fIFTSENT\fP 構造体がアプリケーションに返される。
+\fBFTS_LOGICAL\fP または \fBFTS_PHYSICAL\fP のどちらかを \fBfts_open\fP()  関数に与えなければ「ならない」。
+.TP 
+\fBFTS_SEEDOT\fP
+デフォルトでは、 \fBfts_open\fP()  のパス引き数として指定されない限り、ファイル階層中にある "." または ".."
+という名前のファイルは無視される。 このオプションは、 fts ルーチンにこれらのファイルの \fIFTSENT\fP 構造体を返させる。
+.TP 
+\fBFTS_XDEV\fP
+.\" .El
+このオプションは、 fts が下り始めのファイルとは異なるデバイス番号を持っている ディレクトリに下りるのを阻止する。
+.PP
+The argument \fBcompar\fP()  specifies a user\-defined function which may be
+used to order the traversal of the hierarchy.  It takes two pointers to
+pointers to \fIFTSENT\fP structures as arguments and should return a negative
+value, zero, or a positive value to indicate if the file referenced by its
+first argument comes before, in any order with respect to, or after, the
+file referenced by its second argument.  The \fIfts_accpath\fP, \fIfts_path\fP,
+and \fIfts_pathlen\fP fields of the \fIFTSENT\fP structures may \fInever\fP be used
+in this comparison.  If the \fIfts_info\fP field is set to \fBFTS_NS\fP or
+\fBFTS_NSOK\fP, the \fIfts_statp\fP field may not either.  If the \fBcompar\fP()
+argument is NULL, the directory traversal order is in the order listed in
+\fIpath_argv\fP for the root paths, and in the order listed in the directory
+for everything else.
+.SS fts_read()
+\fBfts_read\fP()  関数は、階層中のファイルを記述する \fIFTSENT\fP 構造体へのポインターを返す。 (読み込み可能で、循環していない)
+ディレクトリは、 1 回は preorder で、もう 1 回は postorder で、少なくとも 2 回たどられる。 他のファイルは、少なくとも 1
+回たどられる。 (ディレクトリ間のハードリンクによって 循環やシンボリックリンクへのシンボリックリンクが起こらない場合、 ファイルは 2
+回以上、ディレクトリは 3 回以上たどられる。)
+.PP
+階層中のすべてのメンバーが返された場合、 \fBfts_read\fP()  は \fBNULL\fP を返し、外部変数 \fIerrno\fP を 0 にする。
+階層中のファイルに関係しないエラーが起こった場合、 \fBfts_read\fP()  は \fBNULL\fP を返し、 \fIerrno\fP
+をエラーに対応した値にする。 階層中のファイルに関係したエラーが起こった場合、 \fIFTSENT\fP 構造体へのポインターが返され、 \fIerrno\fP
+は設定される場合と設定されない場合がある (\fIfts_info\fP を参照すること)。
+.PP
+\fBfts_read\fP()  によって返される \fIFTSENT\fP 構造体は、同じファイル階層ストリームへの \fBfts_close\fP()
+の呼出しの後に上書きされる。 また、同じファイル階層ストリームへの \fBfts_read\fP()
+の呼出しの後でも、構造体がディレクトリを表現していない限り上書きされる。 この場合、 \fBfts_read\fP()  関数によって postorder で
+\fIFTSENT\fP 構造体が返された後、 \fBfts_read\fP()  の呼出しがあるまで、 これらの構造体は上書きされない。
+.SS fts_children()
+\fBfts_children\fP()  関数は、 \fIFTSENT\fP 構造体へのポインターを返す。 この構造体は、( \fBfts_read\fP()
+で最も新しく返された \fIFTSENT\fP 構造体で表現されるディレクトリにあるファイルの) ヌル終端されたリンクリストの最初のエントリーを記述する。
+このリストは、 \fIFTSENT\fP 構造体の \fIfts_link\fP フィールドを使ってリンクされ、
+ユーザー指定の比較関数がある場合は、それで順序づけられる。 \fBfts_children\fP()  の呼出しを繰り返すことで、
+このリンクリストは再生成される。
+.PP
+特別な場合として、 \fBfts_read\fP()  がファイル階層について呼ばれていない場合、 \fBfts_children\fP()  は
+\fBfts_open\fP()  に指定された論理ディレクトリ (つまり、 \fBfts_open\fP()  に指定された引き数)
+の中にあるファイルへのポインターを返す。 それ以外の場合で、 \fBfts_read\fP()  によって最も新しく返された \fIFTSENT\fP 構造体が
+preorder でたどられたディレクトリでない場合や 何も含んでいないディレクトリの場合は、 \fBfts_children\fP()  は \fBNULL\fP
+を返し、 \fIerrno\fP を 0 にする。 エラーが起こった場合、 \fBfts_children\fP()  は \fBNULL\fP を返し、
+\fIerrno\fP をエラーに対応した値にする。
+.PP
+The \fIFTSENT\fP structures returned by \fBfts_children\fP()  may be overwritten
+after a call to \fBfts_children\fP(), \fBfts_close\fP(), or \fBfts_read\fP()  on the
+same file hierarchy stream.
+.PP
+.\" .Bl -tag -width FTS_NAMEONLY
+The \fIinstr\fP argument is either zero or the following value:
+.TP 
+\fBFTS_NAMEONLY\fP
+.\" .El
+ファイル名のみが必要とされている。 返された構造体のリンクリストの \fIfts_name\fP, \fIfts_namelen\fP フィールド以外の
+すべてのフィールドの内容は定義されない。
+.SS fts_set()
+The function \fBfts_set\fP()  allows the user application to determine further
+processing for the file \fIf\fP of the stream \fIftsp\fP.  The \fBfts_set\fP()
+function returns 0 on success, and \-1 if an error occurs.
+.PP
+.\" .Bl -tag -width FTS_PHYSICAL
+The \fIinstr\fP argument is either 0 (meaning "do nothing") or one of the
+following values:
+.TP 
+\fBFTS_AGAIN\fP
+ファイルを再びたどる。すべてのファイルタイプが再びたどられる。 次の \fBfts_read\fP()  の呼出しにより、参照されているファイルが返される。
+構造体の \fIfts_stat\fP, \fIfts_info\fP フィールドはこの時に初期化されるが、他のフィールドは変更されない。 このオプションは、
+\fBfts_read\fP()  によって最も新しく返されたファイルについてのみ意味を持つ。 通常は、postorder
+でディレクトリをたどる場合に使用し、 その下の階層と同様に、 ディレクトリを (preorder と postorder の両方で) 再びたどらせる。
+.TP 
+\fBFTS_FOLLOW\fP
+参照されてるファイルは、シンボリックリンクでなければならない。 参照されているファイルが \fBfts_read\fP()
+によって最も新しく返されたものである場合、次の \fBfts_read\fP()  の呼出しでは、シンボリックリンクそのものではなく、
+シンボリックリンクが指している先を反映するように \fIfts_info\fP, \fIfts_statp\fP を再び初期化したファイルが返される。 ファイルが
+\fBfts_children\fP()  によって最も新しく返されたものの 1 つである場合、 \fBfts_read\fP()  によって返されたとき、構造体の
+\fIfts_info\fP, \fIfts_statp\fP フィールドは、シンボリックリンクそのものではなく、 シンボリックリンクが指している先を反映する。
+どちらの場合でも、シンボリックリンクが指している先がないときは、 返された構造体のフィールドは変更されず、 \fIfts_info\fP フィールドが
+\fBFTS_SLNONE\fP に設定される。
+.IP
+リンク先がディレクトリの場合、 ファイルが preorder で返された後、下の階層のすべてファイルが返され、 その後で postorder
+で返される。
+.TP 
+\fBFTS_SKIP\fP
+.\" .El
+このファイルの下の階層はたどられない。 このファイルは、 \fBfts_children\fP()  または \fBfts_read\fP()
+のどちらかによって最も新しく返されたものの 1 つである。
+.SS fts_close()
+The \fBfts_close\fP()  function closes the file hierarchy stream referred to by
+\fIftsp\fP and restores the current directory to the directory from which
+\fBfts_open\fP()  was called to open \fIftsp\fP.  The \fBfts_close\fP()  function
+returns 0 on success, and \-1 if an error occurs.
+.SH エラー
+関数 \fBfts_open\fP()  が失敗した場合、 \fIerrno\fP は、ライブラリ関数 \fBopen\fP(2)  と \fBmalloc\fP(3)
+に対して指定されるエラーに設定される。
+.PP
+関数 \fBfts_close\fP()  が失敗した場合、 \fIerrno\fP は、ライブラリ関数 \fBchdir\fP(2)  と \fBclose\fP(2)
+に対して指定されるエラーに設定される。
+.PP
+関数 \fBfts_read\fP()  と \fBfts_children\fP()  が失敗した場合、 \fIerrno\fP は、ライブラリ関数
+\fBchdir\fP(2), \fBmalloc\fP(3), \fBopendir\fP(3), \fBreaddir\fP(3), \fBstat\fP(2)
+に対して指定されるエラーに設定される。
+.PP
+更に、 \fBfts_children\fP(), \fBfts_open\fP(), \fBfts_set\fP()  が失敗した場合、 \fIerrno\fP
+が次の値にされる。
+.TP 
+\fBEINVAL\fP
+\fIoptions\fP or \fIinstr\fP was invalid.
+.SH バージョン
+これらの関数は、Linux では glibc2 から使用可能である。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw34 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBfts_open\fP(),
+\fBfts_set\fP(),
+\fBfts_close\fP()
+T}     Thread safety   MT\-Safe
+T{
+\fBfts_read\fP(),
+\fBfts_children\fP()
+T}     Thread safety   MT\-Unsafe
+.TE
+.sp 1
+.SH 準拠
+4.4BSD.
+.SH バグ
+.\" Fixed by commit 8b7b7f75d91f7bac323dd6a370aeb3e9c5c4a7d5
+.\" https://sourceware.org/bugzilla/show_bug.cgi?id=15838
+.\" https://sourceware.org/bugzilla/show_bug.cgi?id=11460
+.\"
+.\" The following statement is years old, and seems no closer to
+.\" being true -- mtk
+.\" The
+.\" .I fts
+.\" utility is expected to be included in a future
+.\" POSIX.1
+.\" revision.
+In versions of glibc before 2.23, all of the APIs described in this man page
+are not safe when compiling a program using the LFS APIs (e.g., when
+compiling with \fI\-D_FILE_OFFSET_BITS=64\fP).
+.SH 関連項目
+\fBfind\fP(1), \fBchdir\fP(2), \fBstat\fP(2), \fBftw\fP(3), \fBqsort\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/futimes.3 b/manual/LDP_man-pages/draft/man3/futimes.3
new file mode 100644 (file)
index 0000000..8116acf
--- /dev/null
@@ -0,0 +1,101 @@
+.\" Copyright (c) 2006, 2008, Michael Kerrisk
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI all rights reserved.
+.\" Translated 2006-07-31, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2008-08-07, Akihiro MOTOKI, LDP v3.05
+.\" Updated 2013-04-03, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH FUTIMES 3 2017\-09\-15 Linux "Linux Programmer's Manual"
+.SH 名前
+futimes, lutimes \- ファイルのタイムスタンプを変更する
+.SH 書式
+.nf
+\fB#include <sys/time.h>\fP
+.PP
+\fBint futimes(int \fP\fIfd\fP\fB, const struct timeval \fP\fItv\fP\fB[2]);\fP
+.PP
+\fBint lutimes(const char *\fP\fIfilename\fP\fB, const struct timeval \fP\fItv\fP\fB[2]);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBfutimes\fP(),
+\fBlutimes\fP():
+    Since glibc 2.19:
+        _DEFAULT_SOURCE
+    Glibc 2.19 and earlier:
+        _BSD_SOURCE
+.SH 説明
+\fBfutimes\fP()  は \fButimes\fP(2)  と同じ方法でファイルのアクセス時刻と修正時刻を変更する。
+違いは、タイムスタンプを変更するファイルを、 パス名ではなく、ファイルディスクリプター \fIfd\fP を用いて指定する点である。
+.PP
+\fBlutimes\fP() は \fButimes\fP(2) と同じ方法でファイルのアクセス時刻と修正時刻を変更する。違いは、 \fIfilename\fP
+がシンボリックリンクを参照している場合に、リンクの展開を行わず、代わりにシンボリックリンクのタイムスタンプを変更する点である。
+.SH 返り値
+成功した場合は 0 が返される。エラーの場合は \-1 が返され、 \fIerrno\fP が適切に設定される。
+.SH エラー
+エラーは \fButimes\fP(2)  と同じだが、 \fBfutimes\fP()  では以下のエラーが追加になっている:
+.TP 
+\fBEBADF\fP
+\fIfd\fP が有効なファイルディスクリプターでない。
+.TP 
+\fBENOSYS\fP
+\fI/proc\fP ファイルシステムにアクセスできなかった。
+.PP
+\fBlutimes\fP() では以下のエラーが追加になっている:
+.TP 
+\fBENOSYS\fP
+カーネルがこの関数をサポートしていない。 Linux 2.6.22 以降が必要である。
+.SH バージョン
+\fBfutimes\fP()  は glibc 2.3 以降で利用可能である。 \fBlutimes\fP()  は glibc 2.6 以降で利用可能であり、
+\fButimensat\fP(2)  システムコールを使って実装されている。 \fButimensat\fP(2)  はカーネル 2.6.22
+以降でサポートされている。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw20 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBfutimes\fP(),
+\fBlutimes\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+これらの関数はどの標準でも規定されていない。 Linux 以外では、これらは BSD でのみ利用可能である。
+.SH 関連項目
+\fButime\fP(2), \fButimensat\fP(2), \fBsymlink\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/gamma.3 b/manual/LDP_man-pages/draft/man3/gamma.3
new file mode 100644 (file)
index 0000000..6be2dd2
--- /dev/null
@@ -0,0 +1,106 @@
+.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
+.\" Distributed under GPL
+.\" %%%LICENSE_END
+.\"
+.\" Modified 2003-11-18, aeb: historical remarks
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2002 Akihiro MOTOKI
+.\"         all rights reserved.
+.\" historical remarks: Japanese Version Copyright (c) 2005 SAITOH Akira
+.\"         all rights reserved.
+.\" Translated Sun Sep 22 08:34:42 2002
+.\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated & Modified Sat Feb 19 05:50:00 2005
+.\"         by SAITOH Akira <s-akira@users.sourceforge.net>
+.\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH GAMMA 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+gamma, gammaf, gammal \- ガンマ関数 (の自然対数)
+.SH 書式
+\fB#include <math.h>\fP
+.PP
+\fBdouble gamma(double \fP\fIx\fP\fB);\fP
+.br
+\fBfloat gammaf(float \fP\fIx\fP\fB);\fP
+.br
+\fBlong double gammal(long double \fP\fIx\fP\fB);\fP
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBgamma\fP():
+.RS 4
+_XOPEN_SOURCE
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+\fBgammaf\fP(), \fBgammal\fP():
+.RS 4
+_XOPEN_SOURCE >= 600 || (_XOPEN_SOURCE && _ISOC99_SOURCE)
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad b
+.SH 説明
+これらの関数は非推奨である。その代わり、場面に応じて \fBtgamma\fP(3)  か \fBlgamma\fP(3)  を使うこと。
+.PP
+ガンマ関数の定義については、 \fBtgamma\fP(3)  を参照のこと。
+.SS *BSD版
+4.4BSD の libm と FreeBSD のいくつかのバージョンには、関数 \fBgamma\fP()
+が含まれており、期待通りガンマ関数を計算できる。
+.SS glibc版
+Glibcは、関数 \fBgamma\fP()  を含んでいるが、これは \fBlgamma\fP(3)  と等価であり、ガンマ関数の自然対数を計算する。
+.SH 返り値
+\fBlgamma\fP(3)  を参照。
+.SH エラー
+\fBlgamma\fP(3)  を参照。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw27 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBgamma\fP(),
+\fBgammaf\fP(),
+\fBgammal\fP()
+T}     Thread safety   MT\-Unsafe race:signgam
+.TE
+.SH 準拠
+Because of historical variations in behavior across systems, this function
+is not specified in any recent standard.  It was documented in SVID 2.
+.SH 注意
+.SS 歴史
+4.2BSDにおいては、関数 \fBgamma\fP()  が実際に計算するのは ln(|Gamma(|\fIx\fP|)|)  であり、
+Gamma(|\fIx\fP|)  の符号が extern int \fIsigngam\fP に格納されていた。 4.3BSDになって関数名が変更され、
+\fBlgamma\fP(3)  となり、そのマニュアルページでは
+.PP
+.in +4n
+"「いつの日か gamma の名は復活し、ガンマ関数に冠されるであろう」"
+.in
+.PP
+.\" The FreeBSD man page says about gamma() that it is like lgamma()
+.\" except that is does not set signgam.
+.\" Also, that 4.4BSD has a gamma() that computes the true gamma function.
+という誓いが述べられていた。 これは4.4BSDになって実現され、 \fBgamma\fP()  はまさにガンマ関数を計算するようになった。 (もう
+\fIsigngam\fP には作用しない。)  ところが、これが登場する時期が遅すぎたため、 \fBtgamma\fP(3)
+という「本当のガンマ関数」がすでに存在しているのである。
+.SH 関連項目
+\fBlgamma\fP(3), \fBsigngam\fP(3), \fBtgamma\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/gcvt.3 b/manual/LDP_man-pages/draft/man3/gcvt.3
new file mode 100644 (file)
index 0000000..d99c414
--- /dev/null
@@ -0,0 +1,101 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified Sat Jul 24 19:32:25 1993 by Rik Faith (faith@cs.unc.edu)
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 Hiroaki Nagoya
+.\"         all rights reserved.
+.\" Translated Mon Feb 10 1997 by Hiroaki Nagoya <nagoya@is.titech.ac.jp>
+.\" Updated & Modified Wed Feb 16 23:43:45 JST 2005
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2009-04-24, Akihiro MOTOKI, LDP v3.20
+.\"
+.TH GCVT 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+gcvt \- 浮動小数点数を文字列へ変換する
+.SH 書式
+.nf
+\fB#include <stdlib.h>\fP
+.PP
+\fBchar *gcvt(double \fP\fInumber\fP\fB, int \fP\fIndigit\fP\fB, char *\fP\fIbuf\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBgcvt\fP():
+.ad l
+.PD 0
+.RS 4
+.TP  4
+glibc 2.12 以降:
+.nf
+(_XOPEN_SOURCE\ >=\ 500) ! (_POSIX_C_SOURCE\ >=\ 200112L)
+    || /* Glibc since 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _SVID_SOURCE
+.fi
+.TP  4
+glibc 2.12 より前:
+.\"    || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED
+_SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500
+.RE
+.PD
+.ad b
+.SH 説明
+関数 \fBgcvt\fP()  は、 \fInumber\fP を、最短の長さのヌル終端された ASCII 文字列へ変換し、変換後の文字列を \fIbuf\fP
+に格納する。 \fBprintf\fP(3)  の F フォーマットや E フォーマットのように \fIndigit\fP 桁の 有効数字を生成する。
+.SH 返り値
+The \fBgcvt\fP()  function returns \fIbuf\fP.
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBgcvt\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.sp 1
+.SH 準拠
+POSIX.1\-2001 では、 この関数は「過去の名残 (LEGACY)」と位置付けられている。 POSIX.1\-2008 では、 \fBgcvt\fP()
+の仕様は削除され、 代わりに \fBsprintf\fP(3)  を使用することが推奨されている (\fBsnprintf\fP(3)
+の方が適切かもしれないが)。
+.SH 関連項目
+\fBecvt\fP(3), \fBfcvt\fP(3), \fBsprintf\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/getcontext.3 b/manual/LDP_man-pages/draft/man3/getcontext.3
new file mode 100644 (file)
index 0000000..56aa2ae
--- /dev/null
@@ -0,0 +1,129 @@
+.\" Copyright (C) 2001 Andries Brouwer (aeb@cwi.nl)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2013  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2013-03-25, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH GETCONTEXT 3 2020\-12\-21 Linux "Linux Programmer's Manual"
+.SH 名前
+getcontext, setcontext \- ユーザーコンテキストを取得/設定する
+.SH 書式
+\fB#include <ucontext.h>\fP
+.PP
+\fBint getcontext(ucontext_t *\fP\fIucp\fP\fB);\fP
+.br
+\fBint setcontext(const ucontext_t *\fP\fIucp\fP\fB);\fP
+.SH 説明
+System V 的な環境では、 \fImcontext_t\fP および \fIucontext_t\fP という 2 つの型と、
+\fBgetcontext\fP(), \fBsetcontext\fP(), \fBmakecontext\fP(3), \fBswapcontext\fP(3)  という
+4 つの関数が \fI<ucontext.h>\fP で定義されており、あるプロセス内部で制御下にある複数のスレッド間で、
+ユーザーレベルのコンテキスト切替えができるようになっている。
+.PP
+\fImcontext_t\fP 型はマシン依存で、外部からは隠蔽されている。 \fIucontext_t\fP 型は構造体で、少なくとも以下の 4
+つのフィールドを持つ。
+.PP
+.in +4n
+.EX
+typedef struct ucontext_t {
+    struct ucontext_t *uc_link;
+    sigset_t          uc_sigmask;
+    stack_t           uc_stack;
+    mcontext_t        uc_mcontext;
+    ...
+} ucontext_t;
+.EE
+.in
+.PP
+\fIsigset_t\fP と \fIstack_t\fP は \fI<signal.h>\fP で定義されている。 ここで \fIuc_link\fP は、
+現在のコンテキストが終了したとき、 続いて切り替わるコンテキストへのポインターである (現在のコンテキストが \fBmakecontext\fP(3)
+で生成されたものの場合)。 \fIuc_sigmask\fP はこのコンテキストでブロックされている シグナル群である (\fBsigprocmask\fP(2)
+を見よ)。 \fIuc_stack\fP はこのコンテキストが用いているスタックである (\fBsignalstack\fP(2)  を見よ)。
+\fIuc_mcontext\fP は保存されているコンテキストの マシン特有の表現形式であり、 ここには呼び出したスレッドのマシンレジスターが格納される。
+.PP
+The function \fBgetcontext\fP()  initializes the structure pointed to by \fIucp\fP
+to the currently active context.
+.PP
+The function \fBsetcontext\fP()  restores the user context pointed to by
+\fIucp\fP.  A successful call does not return.  The context should have been
+obtained by a call of \fBgetcontext\fP(), or \fBmakecontext\fP(3), or received as
+the third argument to a signal handler (see the discussion of the
+\fBSA_SIGINFO\fP flag in \fBsigaction\fP(2)).
+.PP
+コンテキストが \fBgetcontext\fP()  の呼び出しによって得られていたものの場合は、
+プログラムはこの呼び出しから返った直後からのように実行を継続する。
+.PP
+コンテキストが \fBmakecontext\fP(3)  の呼び出しによって得られていたものの場合は、 プログラムの実行はその
+\fBmakecontext\fP(3)  呼び出しの第二引数で指定された関数 \fIfunc\fP を呼び出すかたちで継続する。 \fIfunc\fP から返ると、
+\fBmakecontext\fP(3)  呼び出しの第一引数で指定されていた \fIucp\fP 構造体の \fIuc_link\fP メンバで継続する。 このメンバが
+NULL だった場合は、そのスレッドは終了する。
+.PP
+コンテキストがシグナルハンドラーの呼び出しによって得られていたものの場合は、 古い標準によれば
+「プログラムの実行はシグナルによって割り込まれた命令の次の命令から継続される」。 しかしこの文は SUSv2 で削除されたので、
+現在の判断は「結果は定義されていない」である。
+.SH 返り値
+成功すると、 \fBgetcontext\fP()  は 0 を返し、 \fBsetcontext\fP()  は返らない。 失敗すると、両者とも \-1
+を返し、\fIerrno\fP をエラーに応じて設定する。
+.SH エラー
+定義されていない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw26 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBgetcontext\fP(),
+\fBsetcontext\fP()
+T}     Thread safety   MT\-Safe race:ucp
+.TE
+.SH 準拠
+SUSv2, POSIX.1\-2001.  POSIX.1\-2008 では、移植性の問題から \fBgetcontext\fP()  の仕様が削除された。
+代わりに、アプリケーションを POSIX スレッドを使って書き直すことが 推奨されている。
+.SH 注意
+The earliest incarnation of this mechanism was the
+\fBsetjmp\fP(3)/\fBlongjmp\fP(3)  mechanism.  Since that does not define the
+handling of the signal context, the next stage was the
+\fBsigsetjmp\fP(3)/\fBsiglongjmp\fP(3)  pair.  The present mechanism gives much
+more control.  On the other hand, there is no easy way to detect whether a
+return from \fBgetcontext\fP()  is from the first call, or via a
+\fBsetcontext\fP()  call.  The user has to invent their own bookkeeping device,
+and a register variable won't do since registers are restored.
+.PP
+シグナルが発生すると、 現在のユーザーコンテキストは保存され、 シグナルハンドラー用のコンテキストがカーネルによって生成される。 今後はハンドラーに
+\fBlongjmp\fP(3)  を使わせないこと: この関数のコンテキスト下での動作は定義されていない。 代わりに \fBsiglongjmp\fP(3)  か
+\fBsetcontext\fP()  を使うこと。
+.SH 関連項目
+\fBsigaction\fP(2), \fBsigaltstack\fP(2), \fBsigprocmask\fP(2), \fBlongjmp\fP(3),
+\fBmakecontext\fP(3), \fBsigsetjmp\fP(3), \fBsignal\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/getdate.3 b/manual/LDP_man-pages/draft/man3/getdate.3
new file mode 100644 (file)
index 0000000..e1c1bb6
--- /dev/null
@@ -0,0 +1,254 @@
+.\" Copyright 2001 walter harms (walter.harms@informatik.uni-oldenburg.de)
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" Modified, 2001-12-26, aeb
+.\" 2008-09-07, mtk, Various rewrites; added an example program.
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2002 NAKANO Takeo
+.\" and Copyright (c) 2008, Akihiro MOTOKI all rights reserved.
+.\"
+.TH GETDATE 3 2020\-11\-01 "" "Linux Programmer's Manual"
+.SH 名前
+getdate, getdate_r \- 日付と時刻の文字列を要素別の時刻に変換する
+.SH 書式
+\fB#include <time.h>\fP
+.PP
+\fBstruct tm *getdate(const char *\fP\fIstring\fP\fB);\fP
+.PP
+\fBextern int getdate_err;\fP
+.PP
+\fB#include <time.h>\fP
+.PP
+\fBint getdate_r(const char *\fP\fIstring\fP\fB, struct tm *\fP\fIres\fP\fB);\fP
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBgetdate\fP():
+.ad l
+.RS 4
+.\"    || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
+_XOPEN_SOURCE\ >=\ 500
+.RE
+.br
+\fBgetdate_r\fP():
+.ad l
+.RS 4
+_GNU_SOURCE
+.RE
+.ad
+.SH 説明
+\fBgetdate\fP()  関数は、 \fIstring\fP が指すバッファーに格納された文字列表現の日付と時刻を、 要素別の時刻 (broken\-down
+time) に変換する。 要素別の時刻は \fItm\fP 構造体に格納され、この構造体へのポインターが関数の結果として返される。 この \fItm\fP
+構造体は静的なメモリー領域にあり、 \fBgetdate\fP()  のそれ以降の呼び出しで上書きされるかもされない。
+.PP
+(\fIformat\fP 引き数でフォーマットを指定する)  \fBstrptime\fP(3)  とは違い、 \fBgetdate\fP()  は環境変数
+\fBDATEMSK\fP で指定されたフルパス名のファイルに書いてあるフォーマットを用いる。
+.PP
+マッチの際には大文字小文字を区別しない。 パターン中でも変換される文字列中でも、余分な空白文字は無視される。
+.PP
+パターンに指定できる変換指定は、 \fBstrptime\fP(3)  のものと同じである。 POSIX.1\-2001
+では一つの変換指定が追加で規定されている。
+.TP 
+\fB%Z\fP
+.\" FIXME Is it (still) true that %Z is not supported in glibc?
+.\" Looking at the glibc 2.21 source code, where the implementation uses
+.\" strptime(), suggests that it might be supported.
+タイムゾーンの名前。 glibc では実装されていない。
+.PP
+\fB%Z\fP が指定された場合、要素別の時刻を格納する構造体は、 指定されたタイムゾーンにおける現在時刻に対応する値で初期化される。
+指定されていない場合、この構造体は現在のローカルタイムに対応する 要素別の時刻で初期化される (\fBlocaltime\fP(3)
+を呼び出した場合と同じ)。
+.PP
+曜日だけが指定された場合、 今日または今日以降で、 その曜日に合致する最初の日が採用される。
+.PP
+(年なしで) 月だけが指定された場合、 今月または今月以降で、 その月に合致する最初の月が採用される。
+.PP
+時・分・秒がいずれも指定されなかった場合、 現在の時・分・秒が採用される。
+.PP
+日付の指定がなかったが、時間 (hour) だけ指定された場合は、 現在の時間またはそれ以降で、その指定に合致する最初の時間が採用される。
+.PP
+\fBgetdate_r\fP()  は GNU 拡張で \fBgetdate\fP()  のリエントラント版を提供している。 \fBgetdate_r\fP()
+では、エラーを報告するのにグローバル変数を使用したり、 要素別の時刻を返すのに静的なバッファーを使用したりせず、
+エラーを関数の返り値経由で報告し、要素別の時刻を 引き数 \fIres\fP が指し示す呼び出し側で割り当てたバッファーに格納して返す。
+.SH 返り値
+成功すると、 \fBgetdate\fP()  は \fIstruct tm\fP へのポインターを返す。 失敗すると NULL を返し、グローバル変数
+\fIgetdate_err\fP に以下に示すエラー番号のいずれか一つを設定する。 \fIerrno\fP の変更については規定されていない。
+.PP
+成功すると、 \fBgetdate_r\fP()  は 0 を返す。 失敗すると、以下に示すエラー番号のいずれか一つを返す。
+.SH エラー
+以下のエラーが、 (\fBgetdate\fP()  では)  \fIgetdate_err\fP 経由で返され、 (\fBgetdate_r\fP()  では)
+関数の返り値として返される。
+.TP  4n
+\fB1\fP
+環境変数 \fBDATEMASK\fP が未定義、またはその値が空文字列である。
+.TP 
+\fB2\fP
+\fBDATEMSK\fP で指定されたテンプレートファイルを読み込み用にオープンできない。
+.TP 
+\fB3\fP
+.\" stat()
+ファイルのステータス情報が取得できない。
+.TP 
+\fB4\fP
+テンプレートファイルが通常のファイルでない。
+.TP 
+\fB5\fP
+テンプレートファイルの読み込み中にエラーが起こった。
+.TP 
+\fB6\fP
+.\" Error 6 doesn't seem to occur in glibc
+メモリーの割り当てに失敗した (メモリーが足りない)。
+.TP 
+\fB7\fP
+入力にマッチしたファイルに、行が含まれていない。
+.TP 
+\fB8\fP
+入力指定が正しくない。
+.SH 環境変数
+.TP 
+\fBDATEMSK\fP
+書式パターンを含むファイル。
+.TP 
+\fBTZ\fP, \fBLC_TIME\fP
+\fBstrptime\fP(3)  が用いる変数。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBgetdate\fP()
+T}     Thread safety   MT\-Unsafe race:getdate env locale
+T{
+\fBgetdate_r\fP()
+T}     Thread safety   MT\-Safe env locale
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+The POSIX.1 specification for \fBstrptime\fP(3)  contains conversion
+specifications using the \fB%E\fP or \fB%O\fP modifier, while such specifications
+are not given for \fBgetdate\fP().  In glibc, \fBgetdate\fP()  is implemented
+using \fBstrptime\fP(3), so that precisely the same conversions are supported
+by both.
+.SH EXAMPLES
+以下のプログラムは、コマンドライン引き数のそれぞれについて \fBgetdate\fP()  を呼び出し、それぞれについて返された \fItm\fP
+構造体のフィールド値を表示する。 次のシェルセッションは、プログラムの動作例である。
+.PP
+.in +4n
+.EX
+$\fB TFILE=$PWD/tfile\fP
+$\fB echo \(aq%A\(aq > $TFILE \fP      # Full name of the day of the week
+$\fB echo \(aq%T\(aq >> $TFILE\fP      # ISO date (YYYY\-MM\-DD)
+$\fB echo \(aq%F\(aq >> $TFILE\fP      # Time (HH:MM:SS)
+$\fB date\fP
+$\fB export DATEMSK=$TFILE\fP
+$\fB ./a.out Tuesday \(aq2009\-12\-28\(aq \(aq12:22:33\(aq\fP
+Sun Sep  7 06:03:36 CEST 2008
+Call 1 ("Tuesday") succeeded:
+    tm_sec   = 36
+    tm_min   = 3
+    tm_hour  = 6
+    tm_mday  = 9
+    tm_mon   = 8
+    tm_year  = 108
+    tm_wday  = 2
+    tm_yday  = 252
+    tm_isdst = 1
+Call 2 ("2009\-12\-28") succeeded:
+    tm_sec   = 36
+    tm_min   = 3
+    tm_hour  = 6
+    tm_mday  = 28
+    tm_mon   = 11
+    tm_year  = 109
+    tm_wday  = 1
+    tm_yday  = 361
+    tm_isdst = 0
+Call 3 ("12:22:33") succeeded:
+    tm_sec   = 33
+    tm_min   = 22
+    tm_hour  = 12
+    tm_mday  = 7
+    tm_mon   = 8
+    tm_year  = 108
+    tm_wday  = 0
+    tm_yday  = 250
+    tm_isdst = 1
+.EE
+.in
+.SS プログラムのソース
+\&
+.EX
+#define _GNU_SOURCE
+#include <time.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main(int argc, char *argv[])
+{
+    struct tm *tmp;
+
+    for (int j = 1; j < argc; j++) {
+        tmp = getdate(argv[j]);
+
+        if (tmp == NULL) {
+            printf("Call %d failed; getdate_err = %d\en",
+                   j, getdate_err);
+            continue;
+        }
+
+        printf("Call %d (\e"%s\e") succeeded:\en", j, argv[j]);
+        printf("    tm_sec   = %d\en", tmp\->tm_sec);
+        printf("    tm_min   = %d\en", tmp\->tm_min);
+        printf("    tm_hour  = %d\en", tmp\->tm_hour);
+        printf("    tm_mday  = %d\en", tmp\->tm_mday);
+        printf("    tm_mon   = %d\en", tmp\->tm_mon);
+        printf("    tm_year  = %d\en", tmp\->tm_year);
+        printf("    tm_wday  = %d\en", tmp\->tm_wday);
+        printf("    tm_yday  = %d\en", tmp\->tm_yday);
+        printf("    tm_isdst = %d\en", tmp\->tm_isdst);
+    }
+
+    exit(EXIT_SUCCESS);
+}
+.EE
+.SH 関連項目
+\fBtime\fP(2), \fBlocaltime\fP(3), \fBsetlocale\fP(3), \fBstrftime\fP(3), \fBstrptime\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/getdirentries.3 b/manual/LDP_man-pages/draft/man3/getdirentries.3
new file mode 100644 (file)
index 0000000..d505b38
--- /dev/null
@@ -0,0 +1,80 @@
+.\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
+.\" Portions extracted from /usr/include/dirent.h are:
+.\"                    Copyright 1991, 1992 Free Software Foundation
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1998 NAKANO Takeo all rights reserved.
+.\" Translated Thu Apr 30 1998 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
+.\"
+.TH GETDIRENTRIES 3 2016\-03\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+getdirentries \- ディレクトリのエントリーをファイルシステムに依存しない形式で取得する
+.SH 書式
+\fB#include <dirent.h>\fP
+.PP
+\fBssize_t getdirentries(int \fP\fIfd\fP\fB, char *\fP\fIbuf\fP\fB, size_t \fP\fInbytes\fP \fB,
+off_t *\fP\fIbasep\fP\fB);\fP
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBgetdirentries\fP():
+    Since glibc 2.19:
+        _DEFAULT_SOURCE
+    Glibc 2.19 and earlier:
+        _BSD_SOURCE || _SVID_SOURCE
+.SH 説明
+\fIfd\fP で指定されたディレクトリからエントリーを読み、 \fIbuf\fP に格納する。最大で \fInbytes\fP が読み込まれる。読み込みはオフセット
+\fI*basep\fP から開始され、読み込み終了時には \fI*basep\fP は新しい位置に更新される。
+.SH 返り値
+\fBgetdirentries\fP()  は読み込んだバイト数を返すか、ディレクトリの最後にきた場合は 0 を返す。 エラーが起こったら \-1 を返し、
+\fIerrno\fP をエラーに対応する値にセットする。
+.SH エラー
+詳細は Linux のライブラリソースコードを読んでほしい。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBgetdirentries\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+Not in POSIX.1.  Present on the BSDs, and a few other systems.  Use
+\fBopendir\fP(3)  and \fBreaddir\fP(3)  instead.
+.SH 関連項目
+\fBlseek\fP(2), \fBopen\fP(2)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/getenv.3 b/manual/LDP_man-pages/draft/man3/getenv.3
new file mode 100644 (file)
index 0000000..7ab1cad
--- /dev/null
@@ -0,0 +1,121 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\" and Copyright (C) 2007, 2012 Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's "POSIX Programmer's Guide" (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified Sat Jul 24 19:30:29 1993 by Rik Faith (faith@cs.unc.edu)
+.\" Modified Fri Feb 14 21:47:50 1997 by Andries Brouwer (aeb@cwi.nl)
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 Taro Morioka
+.\"         all rights reserved.
+.\" Translated Tue 08 04 06:00:00 JST 1997
+.\"         by Tarho Morioka (t-morioka@nri.co.jp)
+.\" Modified 2003-09-27 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
+.\" Updated 2008-08-07, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.05
+.\" Updated 2013-05-07, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH GETENV 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+getenv, secure_getenv \- 環境変数を得る
+.SH 書式
+.nf
+\fB#include <stdlib.h>\fP
+.PP
+\fBchar *getenv(const char *\fP\fIname\fP\fB);\fP
+.PP
+\fBchar *secure_getenv(const char *\fP\fIname\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBsecure_getenv\fP(): _GNU_SOURCE
+.SH 説明
+関数 \fBgetenv\fP()  は、環境リストから名前が \fIname\fP の環境変数を検索し、対応する \fIvalue\fP 文字列へのポインターを返す。
+.PP
+GNU 固有の \fBsecure_getenv\fP() 関数は \fBgetenv\fP() と同様だが、 "secure execution"
+(「安全な実行」) が必要な場合には NULL を返す点が異なる。 "secure execution" が必要となるのは、
+呼び出し元プロセスにより実行されるプログラムがロードされる際に、 以下の条件のいずれか一つが成立する場合である。
+.IP * 3
+プロセスの実効ユーザー ID がプロセスの実ユーザー ID と一致しない場合、またはプロセスの実効グループ ID がプロセスの実グループ ID
+と一致しない場合 (通常、この状況になるのは、 set\-user\-ID プログラムか set\-group\-ID プログラムを実行した場合である)。
+.IP *
+実行ファイルで実効ケーパビリティビットがセットされている場合。
+.IP *
+プロセスの許可ケーパビリティセットが空でない場合。
+.PP
+Secure execution may also be required if triggered by some Linux security
+modules.
+.PP
+\fBsecure_getenv\fP() 関数は、 set\-user\-ID プログラムや set\-group\-ID
+プログラムが実行環境を偶然信用してしまった場合に起こり得る脆弱性を、 汎用ライブラリで回避するために使うことを意図して作られた。
+.SH 返り値
+関数 \fBgetenv\fP()  は、環境における値 value へのポインターを返す。 \fIname\fP にマッチする環境変数が存在しないときには
+NULL を返す。
+.SH バージョン
+\fBsecure_getenv\fP() は glibc 2.17 で初めて登場した。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw25 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBgetenv\fP(),
+\fBsecure_getenv\fP()
+T}     Thread safety   MT\-Safe env
+.TE
+.SH 準拠
+\fBgetenv\fP(): POSIX.1\-2001, POSIX.1\-2008, C89, C99, SVr4, 4.3BSD.
+.PP
+\fBsecure_getenv\fP() は GNU による拡張である。
+.SH 注意
+環境リストの文字列は \fIname=value\fP という形式をしている。
+.PP
+通常の実装では、 \fBgetenv\fP()  は環境リスト内の文字列へのポインターを返す。
+呼び出し元はこの文字列を変更しないように注意しなければならない。 この文字列を変更すると、そのプロセスの環境を変化させることになるからである。
+.PP
+\fBgetenv\fP()  の実装はリエントラント (再入可能) であることを要求されていない。 \fBgetenv\fP()
+の返り値により参照される文字列は静的に割り当てられてもよく、 文字列の内容は後続の \fBgetenv\fP(), \fBputenv\fP(3),
+\fBsetenv\fP(3), \fBunsetenv\fP(3)  の呼び出しにより変更されることがある。
+.PP
+\fBsecure_getenv\fP() の "secure execution" モードは、 カーネルからユーザー空間に渡される補助ベクトル
+(auxiliary vector) の \fBAT_SECURE\fP フラグにより制御される。
+.SH 関連項目
+\fBclearenv\fP(3), \fBgetauxval\fP(3), \fBputenv\fP(3), \fBsetenv\fP(3), \fBunsetenv\fP(3),
+\fBcapabilities\fP(7), \fBenviron\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/getfsent.3 b/manual/LDP_man-pages/draft/man3/getfsent.3
new file mode 100644 (file)
index 0000000..9a8b27c
--- /dev/null
@@ -0,0 +1,126 @@
+.\" Copyright (C) 2002 Andries Brouwer (aeb@cwi.nl)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" Inspired by a page written by Walter Harms.
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2002 NAKANO Takeo all rights reserved.
+.\" Translated Wed 7 Aug 2002 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
+.\"
+.TH GETFSENT 3 2017\-09\-15 Linux "Linux Programmer's Manual"
+.SH 名前
+getfsent, getfsspec, getfsfile, setfsent, endfsent \- fstab エントリーの処理
+.SH 書式
+\fB#include <fstab.h>\fP
+.PP
+\fBvoid endfsent(void);\fP
+.PP
+\fBstruct fstab *getfsent(void);\fP
+.PP
+\fBstruct fstab *getfsfile(const char *\fP\fImount_point\fP\fB);\fP
+.PP
+\fBstruct fstab *getfsspec(const char *\fP\fIspecial_file\fP\fB);\fP
+.PP
+\fBint setfsent(void);\fP
+.SH 説明
+これらの関数は \fI/etc/fstab\fP ファイルから情報を読み込む。\fIfstab\fP 構造体は次のように定義されている。
+.PP
+.in +4n
+.EX
+struct fstab {
+    char       *fs_spec;       /* block device name */
+    char       *fs_file;       /* mount point */
+    char       *fs_vfstype;    /* file\-system type */
+    char       *fs_mntops;     /* mount options */
+    const char *fs_type;       /* rw/rq/ro/sw/xx option */
+    int         fs_freq;       /* dump frequency, in days */
+    int         fs_passno;     /* pass number on parallel dump */
+};
+.EE
+.in
+.PP
+*BSD システムの場合、 \fIfs_type\fP フィールドには、5 つの文字列 "rw", "rq", "ro", "sw", "xx"
+のいずれかが入る (それぞれ read\-write, quota 付き read\-write, read\-only, swap, ignore)。
+.PP
+関数 \fBsetfsent\fP()  は呼び出されると fstab ファイルをオープンし、 最初の行に移動する。
+.PP
+関数 \fBgetfsent\fP()  は fstab ファイルから次の行をパースする (必要な場合はファイルをオープンする)。
+.PP
+関数 \fBendfsent\fP()  は呼び出されると fstab ファイルをクローズする。
+.PP
+関数 \fBgetfsspec\fP()  は fstab ファイルを先頭から検索し、 \fIfs_spec\fP フィールドが \fIspecial_file\fP
+引数にマッチするエントリーが見つかったら、その最初のものを返す。
+.PP
+関数 \fBgetfsfile\fP()  は fstab ファイルを先頭から検索し、 \fIfs_file\fP フィールドが \fImount_point\fP
+引数にマッチするエントリーが見つかったら、その最初のものを返す。
+.SH 返り値
+.\" .SH HISTORY
+.\" The
+.\" .BR getfsent ()
+.\" function appeared in 4.0BSD; the other four functions appeared in 4.3BSD.
+成功すると、 \fBgetfsent\fP(), \fBgetfsfile\fP(), \fBgetfsspec\fP()  の各関数は \fIfstab\fP
+構造体へのポインターを返し、 \fBsetfsent\fP()  関数は 1 を返す。 失敗するとこれらの関数は NULL を返し、 end\-of\-file
+になったら 0 を返す。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lbw24
+l l l.
+インターフェース       属性  値
+T{
+\fBendfsent\fP(),
+.br
+\fBsetfsent\fP()
+T}     Thread safety   MT\-Unsafe race:fsent
+T{
+\fBgetfsent\fP(),
+.br
+\fBgetfsspec\fP(),
+.br
+\fBgetfsfile\fP()
+T}     Thread safety   MT\-Unsafe race:fsent locale
+.TE
+.SH 準拠
+These functions are not in POSIX.1.  Several operating systems have them,
+for example, *BSD, SunOS, Digital UNIX, AIX (which also has a
+\fBgetfstype\fP()).  HP\-UX has functions of the same names, that however use a
+\fIstruct checklist\fP instead of a \fIstruct fstab\fP, and calls these functions
+obsolete, superseded by \fBgetmntent\fP(3).
+.SH 注意
+これらの関数はスレッドセーフではない。
+.PP
+Linux ではブロックスペシャルデバイスを複数の場所にマウントでき、 また複数のデバイスが同じマウントポイントを共有できる
+(この場合はそのマウントポイントに最後にマウントされたデバイスが意味を持つ)  が、 \fBgetfsfile\fP()  と \fBgetfsspec\fP()
+はマッチした最初のエントリーしか返さないので、 これらの 2 つの関数は Linux での利用には適していない。
+.SH 関連項目
+\fBgetmntent\fP(3), \fBfstab\fP(5)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/getgrent.3 b/manual/LDP_man-pages/draft/man3/getgrent.3
new file mode 100644 (file)
index 0000000..144fa1b
--- /dev/null
@@ -0,0 +1,182 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified Sat Jul 24 19:29:54 1993 by Rik Faith (faith@cs.unc.edu)
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
+.\"    all rights reserved.
+.\" Translated 1997-12-19, HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
+.\" Updated & Modified 2004-05-30, Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated & Modified 2005-09-06, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH GETGRENT 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+getgrent, setgrent, endgrent \- グループファイルエントリーの取得
+.SH 書式
+.nf
+\fB#include <sys/types.h>\fP
+\fB#include <grp.h>\fP
+.PP
+\fBstruct group *getgrent(void);\fP
+.PP
+\fBvoid setgrent(void);\fP
+.PP
+\fBvoid endgrent(void);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.PD 0
+.ad l
+\fBsetgrent\fP():
+.RS 4
+.\"    || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
+_XOPEN_SOURCE\ >=\ 500
+    || /* Glibc since 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.PP
+\fBgetgrent\fP(), \fBendgrent\fP():
+.RS 4
+.\"        || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
+Since glibc 2.22:
+    _XOPEN_SOURCE\ >=\ 500 ||
+        _DEFAULT_SOURCE
+.br
+.\"        || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
+Glibc 2.21 and earlier
+    _XOPEN_SOURCE\ >=\ 500
+        || /* Since glibc 2.12: */ _POSIX_C_SOURCE\ >=\ 200809L
+        || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.PD
+.ad b
+.SH 説明
+\fBgetgrent\fP()  関数は、グループデータベースから取得したエントリーを 要素毎に分解し、各要素を格納した構造体へのポインターを返す
+(グループデータベースの例: ローカルのグループファイル \fI/etc/group\fP, NIS, LDAP)。 \fBgetgrent\fP()
+は、最初に呼び出された時は最初のエントリーを返し、 それ以降は呼び出される毎に次のエントリーを返す。
+.PP
+\fBsetgrent\fP()  関数を使うと、もう一度読み込めるように、 グループデータベースの先頭に戻る。
+.PP
+\fBendgrent\fP()  関数は、全ての処理が終わった後にグループ データベースをクローズする。
+.PP
+\fIgroup\fP 構造体は \fI<grp.h>\fP で以下のように定義されている:
+.PP
+.in +4n
+.EX
+struct group {
+    char   *gr_name;        /* グループ名 */
+    char   *gr_passwd;      /* グループのパスワード */
+    gid_t   gr_gid;         /* グループ ID */
+    char  **gr_mem;         /* グループのメンバ名へのポインター
+                               の配列 (配列はヌルで終端する) */
+};
+.EE
+.in
+.PP
+この構造体のフィールドの詳細は \fBgroup\fP(5)  を参照のこと。
+.SH 返り値
+\fBgetgrent\fP()  関数は \fIgroup\fP 構造体へのポインターを返す。 これ以上エントリーが無いか、エラーが発生した場合は NULL
+を返す。
+.PP
+エラーが発生すると、 \fIerrno\fP が適切に設定される。 この関数の呼び出し後に \fIerrno\fP をチェックしたい場合は、呼び出し前に
+\fIerrno\fP を 0 に設定しておかないといけない。
+.PP
+返り値は静的な領域を指しており、その後の \fBgetgrent\fP(), \fBgetgrgid\fP(3), \fBgetgrnam\fP(3)
+の呼び出しで上書きされるかもしれない。 (返されたポインターを \fBfree\fP(3)  に渡さないこと。)
+.SH エラー
+.TP 
+\fBEAGAIN\fP
+サービスが一時的に利用できなかったこと。あとでもう一度試してほしい。 NSS バックエンドの場合、glibc
+では、バックエンドとの通信中に一時的なエラーが発生したことを示す。 このエラーは直るかもしれないので、あとでもう一度試すよう提案している。
+.TP 
+\fBEINTR\fP
+A signal was caught; see \fBsignal\fP(7).
+.TP 
+\fBEIO\fP
+I/O エラー。
+.TP 
+\fBEMFILE\fP
+The per\-process limit on the number of open file descriptors has been
+reached.
+.TP 
+\fBENFILE\fP
+The system\-wide limit on the total number of open files has been reached.
+.TP 
+.\" not in POSIX
+\fBENOENT\fP
+必要な入力ファイルが見つからなかった。 NSS バックエンドの場合、glibc では、このエラーはバックエンドが正しく設定されていないことを示す。
+.TP 
+\fBENOMEM\fP
+.\" not in POSIX
+\fIgroup\fP 構造体を割り当てるためのメモリーが不十分。
+.TP 
+\fBERANGE\fP
+与えられたバッファー空間が不十分である。
+.SH ファイル
+.TP 
+\fI/etc/group\fP
+ローカルのグループデータベースファイル
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw11 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBgetgrent\fP()
+T}     Thread safety   T{
+MT\-Unsafe race:grent
+.br
+race:grentbuf locale
+T}
+T{
+\fBsetgrent\fP(),
+\fBendgrent\fP()
+T}     Thread safety   MT\-Unsafe race:grent locale
+.TE
+.PP
+In the above table, \fIgrent\fP in \fIrace:grent\fP signifies that if any of the
+functions \fBsetgrent\fP(), \fBgetgrent\fP(), or \fBendgrent\fP()  are used in
+parallel in different threads of a program, then data races could occur.
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, SVr4, 4.3BSD.
+.SH 関連項目
+\fBfgetgrent\fP(3), \fBgetgrent_r\fP(3), \fBgetgrgid\fP(3), \fBgetgrnam\fP(3)
+\fBgetgrouplist\fP(3), \fBputgrent\fP(3), \fBgroup\fP(5)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/getgrent_r.3 b/manual/LDP_man-pages/draft/man3/getgrent_r.3
new file mode 100644 (file)
index 0000000..8d5d71f
--- /dev/null
@@ -0,0 +1,186 @@
+.\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl)
+.\"
+.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
+.\" This is free documentation; you can redistribute it and/or
+.\" modify it under the terms of the GNU General Public License as
+.\" published by the Free Software Foundation; either version 2 of
+.\" the License, or (at your option) any later version.
+.\"
+.\" The GNU General Public License's references to "object code"
+.\" and "executables" are to be interpreted as the output of any
+.\" document formatting or typesetting system, including
+.\" intermediate and printed output.
+.\"
+.\" This manual is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public
+.\" License along with this manual; if not, see
+.\" <http://www.gnu.org/licenses/>.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2004 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated Thu Jul 29 02:26:07 JST 2004
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\"
+.TH GETGRENT_R 3 2020\-11\-01 GNU "Linux Programmer's Manual"
+.SH 名前
+getgrent_r, fgetgrent_r \- グループファイルエントリーをリエントラント (reentrant) に取り出す
+.SH 書式
+.nf
+\fB#include <grp.h>\fP
+.PP
+\fBint getgrent_r(struct group *\fP\fIgbuf\fP\fB, char *\fP\fIbuf\fP\fB,\fP
+\fB               size_t \fP\fIbuflen\fP\fB, struct group **\fP\fIgbufp\fP\fB);\fP
+.PP
+\fBint fgetgrent_r(FILE *\fP\fIstream\fP\fB, struct group *\fP\fIgbuf\fP\fB, char *\fP\fIbuf\fP\fB,\fP
+\fB                size_t \fP\fIbuflen\fP\fB, struct group **\fP\fIgbufp\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.\" FIXME . The FTM requirements seem inconsistent here.  File a glibc bug?
+\fBgetgrent_r\fP(): _GNU_SOURCE
+.br
+\fBfgetgrent_r\fP():
+    Since glibc 2.19:
+        _DEFAULT_SOURCE
+    Glibc 2.19 and earlier:
+        _SVID_SOURCE
+.SH 説明
+関数 \fBgetgrent_r\fP()  と \fBfgetgrent_r\fP()  は \fBgetgrent\fP(3)  と \fBfgetgrent\fP(3)
+のリエントラント版である。 前者は、 \fBsetgrent\fP(3)  によって初期化されたストリームから、次のグループファイルのエントリーを読み込む。
+後者は、 \fIstream\fP から次のグループファイルのエントリーを読み込む。
+.PP
+\fIgroup\fP 構造体は \fI<grp.h>\fP で以下のように定義されている:
+.PP
+.in +4n
+.EX
+struct group {
+    char   *gr_name;        /* グループ名 */
+    char   *gr_passwd;      /* グループのパスワード */
+    gid_t   gr_gid;         /* グループ ID */
+    char  **gr_mem;         /* グループのメンバ名へのポインター
+                               の配列 (配列はヌルで終端する) */
+};
+.EE
+.in
+.PP
+この構造体のフィールドの詳細は \fBgroup\fP(5)  を参照のこと。
+.PP
+リエントラントでない関数は静的な格納領域へのポインターを返す。 この静的な格納領域には、更にグループ名・パスワード・ メンバへのポインターが含まれる。
+ここで説明されているリエントラントな関数は、 呼び出し側から提供されるバッファーにグループ名など全てを返す。 最初の引き数として \fIstruct
+group\fP を保持できるバッファー \fIgbuf\fP がある。 次にその他の文字列を保持できるサイズ \fIbuflen\fP のバッファー \fIbuf\fP
+がある。 これらの関数の結果 (ストリームから読み込まれた \fIstruct group\fP) は、 提供されたバッファー \fI*gbuf\fP
+に格納され、この \fIstruct group\fP へのポインターは \fI*gbufp\fP に返される。
+.SH 返り値
+成功した場合、これらの関数は 0 を返し、 *\fIgbufp\fP は \fIstruct group\fP へのポインターとなる。
+エラーの場合、これらの関数はエラー値を返し、 *\fIgbufp\fP は NULL になる。
+.SH エラー
+.TP 
+\fBENOENT\fP
+次のエントリーがない。
+.TP 
+\fBERANGE\fP
+十分なバッファー空間が与えられていない。 もっと大きなバッファーで再度実行すること。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lbw27
+l l l.
+インターフェース       属性  値
+T{
+\fBgetgrent_r\fP()
+T}     Thread safety   MT\-Unsafe race:grent locale
+T{
+\fBfgetgrent_r\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.sp 1
+In the above table, \fIgrent\fP in \fIrace:grent\fP signifies that if any of the
+functions \fBsetgrent\fP(3), \fBgetgrent\fP(3), \fBendgrent\fP(3), or \fBgetgrent_r\fP()
+are used in parallel in different threads of a program, then data races
+could occur.
+.SH 準拠
+これらの関数は GNU 拡張であり、POSIX 版の関数 \fBgetpwnam_r\fP(3)  の形式に似せてある。
+他のシステムでは以下のプロトタイプが使われている。
+.PP
+.in +4n
+.EX
+struct group *getgrent_r(struct group *grp, char *buf,
+                         int buflen);
+.EE
+.in
+.PP
+より良いものでは、以下のようになっている。
+.PP
+.in +4n
+.EX
+int getgrent_r(struct group *grp, char *buf, int buflen,
+               FILE **gr_fp);
+.EE
+.in
+.SH 注意
+関数 \fBgetgrent_r\fP()  は本当のリエントラントではない。 なぜなら、ストリームの読み込み位置を
+他の全てのスレッドと共有しているためである。
+.SH EXAMPLES
+.EX
+#define _GNU_SOURCE
+#include <grp.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+#define BUFLEN 4096
+
+int
+main(void)
+{
+    struct group grp;
+    struct group *grpp;
+    char buf[BUFLEN];
+    int i;
+
+    setgrent();
+    while (1) {
+        i = getgrent_r(&grp, buf, sizeof(buf), &grpp);
+        if (i)
+            break;
+        printf("%s (%jd):", grpp\->gr_name, (intmax_t) grpp\->gr_gid);
+        for (int j = 0; ; j++) {
+            if (grpp\->gr_mem[j] == NULL)
+                break;
+            printf(" %s", grpp\->gr_mem[j]);
+        }
+        printf("\en");
+    }
+    endgrent();
+    exit(EXIT_SUCCESS);
+}
+.EE
+.\" perhaps add error checking - should use strerror_r
+.\" #include <errno.h>
+.\" #include <stdlib.h>
+.\"         if (i) {
+.\"               if (i == ENOENT)
+.\"                     break;
+.\"               printf("getgrent_r: %s", strerror(i));
+.\"               exit(EXIT_FAILURE);
+.\"         }
+.SH 関連項目
+\fBfgetgrent\fP(3), \fBgetgrent\fP(3), \fBgetgrgid\fP(3), \fBgetgrnam\fP(3),
+\fBputgrent\fP(3), \fBgroup\fP(5)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/getgrnam.3 b/manual/LDP_man-pages/draft/man3/getgrnam.3
new file mode 100644 (file)
index 0000000..4521550
--- /dev/null
@@ -0,0 +1,201 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\"
+.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 2003-11-15 by aeb
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
+.\"    all rights reserved.
+.\" Translated 1997-12-19, HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
+.\" Updated & Modefied 1999-02-26, Shouichi Saito
+.\" Updated & Modified 2004-06-05, Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated & Modified 2005-09-06, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2008-12-24, Akihiro MOTOKI, LDP v3.14
+.\" Updated 2012-05-01, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2013-07-17, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2013-08-16, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH GETGRNAM 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+getgrnam, getgrnam_r, getgrgid, getgrgid_r \- グループファイルエントリーの取り出し
+.SH 書式
+.nf
+\fB#include <sys/types.h>\fP
+\fB#include <grp.h>\fP
+.PP
+\fBstruct group *getgrnam(const char *\fP\fIname\fP\fB);\fP
+.PP
+\fBstruct group *getgrgid(gid_t \fP\fIgid\fP\fB);\fP
+.PP
+\fBint getgrnam_r(const char *\fP\fIname\fP\fB, struct group *\fP\fIgrp\fP\fB,\fP
+\fB          char *\fP\fIbuf\fP\fB, size_t \fP\fIbuflen\fP\fB, struct group **\fP\fIresult\fP\fB);\fP
+.PP
+\fBint getgrgid_r(gid_t \fP\fIgid\fP\fB, struct group *\fP\fIgrp\fP\fB,\fP
+\fB          char *\fP\fIbuf\fP\fB, size_t \fP\fIbuflen\fP\fB, struct group **\fP\fIresult\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.ad l
+.RE
+.PP
+\fBgetgrnam_r\fP(), \fBgetgrgid_r\fP():
+.RS 4
+_POSIX_C_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad b
+.SH 説明
+\fBgetgrnam\fP()  関数は、グループ名 \fIname\fP にマッチするグループデータベースのエントリーを
+要素毎に分解し、各要素を格納した構造体へのポインターを返す (パスワードデータベースの例: ローカルのグループファイル \fI/etc/group\fP,
+NIS, LDAP)。
+.PP
+\fBgetgrgid\fP()  関数は、グループ ID \fIuid\fP にマッチするグループデータベースのエントリーを
+要素毎に分解し、各要素を格納した構造体へのポインターを返す。
+.PP
+\fIgroup\fP 構造体は \fI<grp.h>\fP で以下のように定義されている:
+.PP
+.in +4n
+.EX
+struct group {
+    char   *gr_name;        /* グループ名 */
+    char   *gr_passwd;      /* グループのパスワード */
+    gid_t   gr_gid;         /* グループ ID */
+    char  **gr_mem;         /* グループのメンバ名へのポインター
+                               の配列 (配列はヌルで終端する) */
+};
+.EE
+.in
+.PP
+この構造体のフィールドの詳細は \fBgroup\fP(5)  を参照のこと。
+.PP
+\fBgetgrnam_r\fP() と \fBgetgrgid_r\fP() 関数は、それぞれ \fBgetgrnam\fP() と
+\fBgetgrgid\fP() と同じ情報を取得するが、取得した \fIgroup\fP 構造体を
+\fIgrp\fP が指す領域に格納する。\fIgroup\fP 構造体のメンバーが指す文字列は、
+サイズ \fIbuflen\fP のバッファー \fIbuf\fP に格納される。成功した場合
+\fI*gbufp\fP には結果へのポインターが格納される。エントリーが見つからなかった
+場合やエラーが発生した場合には \fI*result\fP には NULL が入る。
+.PP
+呼び出し
+.PP
+    sysconf(_SC_GETGR_R_SIZE_MAX)
+.PP
+は、 \fIerrno\fP を変更せずに \-1 を返すか、 \fIbuf\fP の初期サイズの推奨値を
+返す。(このサイズが小さすぎる場合、呼び出しは \fBERANGE\fP で失敗し、この
+場合には呼び出し側はバッファーを大きくしてから再度呼び出すことができる。)
+.SH 返り値
+\fBgetgrnam\fP()  と \fBgetgrgid\fP()  関数は、 \fIgroup\fP 構造体へのポインターを返す。
+マッチするエントリーが見つからなかった場合や、 エラーが発生した場合は NULL を返す。 エラーが起こった場合、 \fIerrno\fP
+が適切に設定される。 呼び出しの後で \fIerrno\fP をチェックしたい場合は、 呼び出しの前に (この値を) 0 に設定しておくべきである。
+.PP
+返り値は静的な領域を指しており、その後の \fBgetgrent\fP(3), \fBgetgrgid\fP(), \fBgetgrnam\fP()
+の呼び出しで上書きされるかもしれない。 (返されたポインターを \fBfree\fP(3)  に渡さないこと。)
+.PP
+成功すると、 \fBgetgrnam_r\fP()  と \fBgetgrgid_r\fP()  は 0 を返し、 \fI*result\fP に \fIgrp\fP
+を設定する。 マッチするグループエントリーが見つからなかった場合には、 0 を返し、 \fI*result\fP に NULL を設定する。
+エラーの場合、エラー番号を返し、 \fI*result\fP に NULL を設定する。
+.SH エラー
+.TP 
+\fB0\fP or \fBENOENT\fP or \fBESRCH\fP or \fBEBADF\fP or \fBEPERM\fP or ...
+指定された \fIname\fP または \fIgid\fP が見つからなかった。
+.TP 
+\fBEINTR\fP
+A signal was caught; see \fBsignal\fP(7).
+.TP 
+\fBEIO\fP
+I/O エラー。
+.TP 
+\fBEMFILE\fP
+The per\-process limit on the number of open file descriptors has been
+reached.
+.TP 
+\fBENFILE\fP
+The system\-wide limit on the total number of open files has been reached.
+.TP 
+\fBENOMEM\fP
+.\" not in POSIX
+.\" to allocate the group structure, or to allocate buffers
+\fIgroup\fP 構造体を割り当てるためのメモリーが不十分。
+.TP 
+\fBERANGE\fP
+与えられたバッファー空間が不十分である。
+.SH ファイル
+.TP 
+\fI/etc/group\fP
+ローカルのグループデータベースファイル
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBgetgrnam\fP()
+T}     Thread safety   MT\-Unsafe race:grnam locale
+T{
+\fBgetgrgid\fP()
+T}     Thread safety   MT\-Unsafe race:grgid locale
+T{
+\fBgetgrnam_r\fP(),
+.br
+\fBgetgrgid_r\fP()
+T}     Thread safety   MT\-Safe locale
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, SVr4, 4.3BSD.
+.SH 注意
+.\" POSIX.1-2001, POSIX.1-2008
+.\" more precisely:
+.\" AIX 5.1 - gives ESRCH
+.\" OSF1 4.0g - gives EWOULDBLOCK
+.\" libc, glibc up to version 2.6, Irix 6.5 - give ENOENT
+.\" glibc since version 2.7 - give 0
+.\" FreeBSD 4.8, OpenBSD 3.2, NetBSD 1.6 - give EPERM
+.\" SunOS 5.8 - gives EBADF
+.\" Tru64 5.1b, HP-UX-11i, SunOS 5.7 - give 0
+The formulation given above under "RETURN VALUE" is from POSIX.1.  It does
+not call "not found" an error, hence does not specify what value \fIerrno\fP
+might have in this situation.  But that makes it impossible to recognize
+errors.  One might argue that according to POSIX \fIerrno\fP should be left
+unchanged if an entry is not found.  Experiments on various UNIX\-like
+systems show that lots of different values occur in this situation: 0,
+ENOENT, EBADF, ESRCH, EWOULDBLOCK, EPERM, and probably others.
+.SH 関連項目
+\fBendgrent\fP(3), \fBfgetgrent\fP(3), \fBgetgrent\fP(3), \fBgetpwnam\fP(3),
+\fBsetgrent\fP(3), \fBgroup\fP(5)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/getgrouplist.3 b/manual/LDP_man-pages/draft/man3/getgrouplist.3
new file mode 100644 (file)
index 0000000..13fd55a
--- /dev/null
@@ -0,0 +1,174 @@
+.\" Copyright (C) 2008, Linux Foundation, written by Michael Kerrisk
+.\" <mtk.manpages@gmail.com>
+.\"
+.\" A few pieces remain from an earlier version written in
+.\" 2002 by Walter Harms (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2004 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated 2004-08-07, Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated 2008-08-11, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.05
+.\"
+.TH GETGROUPLIST 3 2020\-11\-01 GNU "Linux Programmer's Manual"
+.SH 名前
+getgrouplist \- ユーザーが所属するグループのリストを取得する
+.SH 書式
+\fB#include <grp.h>\fP
+.PP
+\fBint getgrouplist(const char *\fP\fIuser\fP\fB, gid_t \fP\fIgroup\fP\fB,\fP
+.br
+\fB gid_t *\fP\fIgroups\fP\fB, int *\fP\fIngroups\fP\fB);\fP
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBgetgrouplist\fP():
+    Since glibc 2.19:
+        _DEFAULT_SOURCE
+    Glibc 2.19 and earlier:
+        _BSD_SOURCE
+.SH 説明
+\fBgetgrouplist\fP()  関数は、グループデータベース (\fBgroup\fP(5)  参照) を調べて、 \fIuser\fP
+が所属するグループのリストを取得する。 見つかったグループのうち最大 \fI*ngroups\fP 個のグループが、配列 \fIgroups\fP
+に格納されて返される。
+.PP
+引き数 \fIgroup\fP がグループデータベースに \fIuser\fP が所属するグループがなかった場合、 \fBgetgrouplist\fP()
+が返すグループのリストに引き数 \fIgroup\fP も追加される。 通常は、この引き数にはユーザー \fIuser\fP
+のパスワードレコードに書かれているグループ ID を指定する。
+.PP
+引き数 \fIngroups\fP は、値渡しと結果の両方に使用される引き数 (value\-result argument) であり、 リターン時には、常に
+\fIgroup\fP も含めた \fIuser\fP が所属するグループ数が格納される。 この値は \fIgroups\fP
+に格納されたグループ数より大きくなる可能性がある。
+.SH 返り値
+\fIuser\fP が所属しているグループ数が \fI*ngroups\fP 以下の場合、 \fI*ngroups\fP の値が返される。
+.PP
+指定されたユーザーが \fI*ngroups\fP より多くのグループに所属している場合、 \fBgetgrouplist\fP()  は \-1 を返す。
+この場合、 \fI*ngroups\fP で返される値を使って、バッファーのサイズを変更してから、 \fBgetgrouplist\fP()
+をもう一度呼び出すことができる。
+.SH バージョン
+この関数は glibc 2.2.4 から存在する。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBgetgrouplist\fP()
+T}     Thread safety   MT\-Safe locale
+.TE
+.SH 準拠
+この関数は非標準である。ほとんどの BSD に存在する。
+.SH バグ
+バージョン 2.3.3 より前の glibc では、 この関数の実装にはバッファーオーバーフローのバグがあり、 \fIuser\fP が所属するグループ数が
+\fI*ngroups\fP より多い場合であっても、 \fIuser\fP が所属するグループの全リストを配列 \fIgroups\fP に格納してしまう。
+.SH EXAMPLES
+以下のプログラムは、一つ目のコマンドライン引き数で指定された名前のユーザー が所属するグループのリストを表示する。 二番目のコマンドライン引き数には、
+\fBgetgrouplist\fP()  に渡す \fIngroups\fP の値を指定する。
+以下のシェルのセッションはこのプログラムの使用例を示したものである。
+.PP
+.in +4n
+.EX
+$\fB ./a.out cecilia 0\fP
+getgrouplist() returned \-1; ngroups = 3
+$\fB ./a.out cecilia 3\fP
+ngroups = 3
+16 (dialout)
+33 (video)
+100 (users)
+.EE
+.in
+.SS プログラムのソース
+\&
+.EX
+#include <stdio.h>
+#include <stdlib.h>
+#include <grp.h>
+#include <pwd.h>
+
+int
+main(int argc, char *argv[])
+{
+    int ngroups;
+    struct passwd *pw;
+    struct group *gr;
+
+    if (argc != 3) {
+        fprintf(stderr, "Usage: %s <user> <ngroups>\en", argv[0]);
+        exit(EXIT_FAILURE);
+    }
+
+    ngroups = atoi(argv[2]);
+
+    gid_t *groups = malloc(sizeof(*groups) * ngroups);
+    if (groups == NULL) {
+        perror("malloc");
+        exit(EXIT_FAILURE);
+    }
+
+    /* Fetch passwd structure (contains first group ID for user) */
+
+    pw = getpwnam(argv[1]);
+    if (pw == NULL) {
+        perror("getpwnam");
+        exit(EXIT_SUCCESS);
+    }
+
+    /* Retrieve group list */
+
+    if (getgrouplist(argv[1], pw\->pw_gid, groups, &ngroups) == \-1) {
+        fprintf(stderr, "getgrouplist() returned \-1; ngroups = %d\en",
+                ngroups);
+        exit(EXIT_FAILURE);
+    }
+
+    /* Display list of retrieved groups, along with group names */
+
+    fprintf(stderr, "ngroups = %d\en", ngroups);
+    for (int j = 0; j < ngroups; j++) {
+        printf("%d", groups[j]);
+        gr = getgrgid(groups[j]);
+        if (gr != NULL)
+            printf(" (%s)", gr\->gr_name);
+        printf("\en");
+    }
+
+    exit(EXIT_SUCCESS);
+}
+.EE
+.SH 関連項目
+\fBgetgroups\fP(2), \fBsetgroups\fP(2), \fBgetgrent\fP(3), \fBgroup_member\fP(3),
+\fBgroup\fP(5), \fBpasswd\fP(5)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/gethostbyname.3 b/manual/LDP_man-pages/draft/man3/gethostbyname.3
new file mode 100644 (file)
index 0000000..9dde6d6
--- /dev/null
@@ -0,0 +1,377 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified 1993-05-22, David Metcalfe
+.\" Modified 1993-07-25, Rik Faith (faith@cs.unc.edu)
+.\" Modified 1997-02-16, Andries Brouwer (aeb@cwi.nl)
+.\" Modified 1998-12-21, Andries Brouwer (aeb@cwi.nl)
+.\" Modified 2000-08-12, Andries Brouwer (aeb@cwi.nl)
+.\" Modified 2001-05-19, Andries Brouwer (aeb@cwi.nl)
+.\" Modified 2002-08-05, Michael Kerrisk
+.\" Modified 2004-10-31, Andries Brouwer
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1998-2000 NAKANO Takeo all rights reserved.
+.\" Translated 1998-04-30, NAKANO Takeo <nakano@apm.seikei.ac.jp>
+.\" Modified 1998-12-06, NAKANO Takeo
+.\" Updated & Modified 1999-10-12, NAKANO Takeo
+.\" Updated & Modified 2001-07-01, Yuichi SATO <ysato@h4.dion.ne.jp>
+.\" Updated & Modified 2002-01-03, Yuichi SATO
+.\" Updated & Modified 2003-11-27, Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated & Modified 2005-01-10, Yuichi SATO
+.\" Updated 2006-01-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2007-06-11, Akihiro MOTOKI, LDP v2.54
+.\" Updated 2008-08-08, Akihiro MOTOKI, LDP v3.05
+.\"
+.TH GETHOSTBYNAME 3 2020\-12\-21 "" "Linux Programmer's Manual"
+.SH 名前
+gethostbyname, gethostbyaddr, sethostent, gethostent, endhostent, h_errno,
+herror, hstrerror, gethostbyaddr_r, gethostbyname2, gethostbyname2_r,
+gethostbyname_r, gethostent_r \- ネットワーク上のホストのエントリーを取得する
+.SH 書式
+.nf
+\fB#include <netdb.h>\fP
+\fBextern int h_errno;\fP
+.PP
+\fBstruct hostent *gethostbyname(const char *\fP\fIname\fP\fB);\fP
+
+\fB#include <sys/socket.h>\fP       /* AF_INET を使う場合 */
+\fBstruct hostent *gethostbyaddr(const void *\fP\fIaddr\fP\fB,\fP
+\fB                              socklen_t \fP\fIlen\fP\fB, int \fP\fItype\fP\fB);\fP
+.PP
+\fBvoid sethostent(int \fP\fIstayopen\fP\fB);\fP
+.PP
+\fBvoid endhostent(void);\fP
+.PP
+\fBvoid herror(const char *\fP\fIs\fP\fB);\fP
+.PP
+\fBconst char *hstrerror(int \fP\fIerr\fP\fB);\fP
+.PP
+/* System V/POSIX extension */
+\fBstruct hostent *gethostent(void);\fP
+.PP
+/* GNU extensions */
+\fBstruct hostent *gethostbyname2(const char *\fP\fIname\fP\fB, int \fP\fIaf\fP\fB);\fP
+.PP
+\fBint gethostent_r(\fP
+\fB        struct hostent *\fP\fIret\fP\fB, char *\fP\fIbuf\fP\fB, size_t \fP\fIbuflen\fP\fB,\fP
+\fB        struct hostent **\fP\fIresult\fP\fB, int *\fP\fIh_errnop\fP\fB);\fP
+.PP
+\fBint gethostbyaddr_r(const void *\fP\fIaddr\fP\fB, socklen_t \fP\fIlen\fP\fB, int \fP\fItype\fP\fB,\fP
+\fB        struct hostent *\fP\fIret\fP\fB, char *\fP\fIbuf\fP\fB, size_t \fP\fIbuflen\fP\fB,\fP
+\fB        struct hostent **\fP\fIresult\fP\fB, int *\fP\fIh_errnop\fP\fB);\fP
+.PP
+\fBint gethostbyname_r(const char *\fP\fIname\fP\fB,\fP
+\fB        struct hostent *\fP\fIret\fP\fB, char *\fP\fIbuf\fP\fB, size_t \fP\fIbuflen\fP\fB,\fP
+\fB        struct hostent **\fP\fIresult\fP\fB, int *\fP\fIh_errnop\fP\fB);\fP
+.PP
+\fBint gethostbyname2_r(const char *\fP\fIname\fP\fB, int \fP\fIaf,\fP
+\fB        struct hostent *\fP\fIret\fP\fB, char *\fP\fIbuf\fP\fB, size_t \fP\fIbuflen\fP\fB,\fP
+\fB        struct hostent **\fP\fIresult\fP\fB, int *\fP\fIh_errnop\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.PD 0
+.ad l
+\fBgethostbyname2\fP(), \fBgethostent_r\fP(), \fBgethostbyaddr_r\fP(),
+\fBgethostbyname_r\fP(), \fBgethostbyname2_r\fP():
+.RS 4
+.TP  4
+Since glibc 2.19:
+_DEFAULT_SOURCE
+.TP  4
+Glibc versions up to and including 2.19:
+_BSD_SOURCE || _SVID_SOURCE
+.RE
+.PD
+.PP
+.PD 0
+\fBherror\fP(), \fBhstrerror\fP():
+.RS 4
+.TP  4
+Since glibc 2.19:
+_DEFAULT_SOURCE
+.TP  4
+Glibc 2.8 to 2.19:
+_BSD_SOURCE || _SVID_SOURCE
+.TP 
+glibc 2.8 より前:
+なし
+.RE
+.PD
+.PP
+.PD 0
+\fBh_errno\fP:
+.RS 4
+.TP  4
+Since glibc 2.19
+_DEFAULT_SOURCE || _POSIX_C_SOURCE < 200809L
+.TP  4
+Glibc 2.12 to 2.19:
+_BSD_SOURCE || _SVID_SOURCE || _POSIX_C_SOURCE < 200809L
+.TP 
+glibc 2.12 より前:
+なし
+.RE
+.ad b
+.PD
+.SH 説明
+関数 \fBgethostbyname*\fP(), \fBgethostbyaddr*\fP(), \fBherror\fP(), \fBhstrerror\fP
+は過去のものである。 アプリケーションは、代わりに \fBgetaddrinfo\fP(3), \fBgetnameinfo\fP(3),
+\fBgai_strerror\fP(3) を使用すること。
+.PP
+The \fBgethostbyname\fP()  function returns a structure of type \fIhostent\fP for
+the given host \fIname\fP.  Here \fIname\fP is either a hostname or an IPv4
+address in standard dot notation (as for \fBinet_addr\fP(3)).  If \fIname\fP is an
+IPv4 address, no lookup is performed and \fBgethostbyname\fP()  simply copies
+\fIname\fP into the \fIh_name\fP field and its \fIstruct in_addr\fP equivalent into
+the \fIh_addr_list[0]\fP field of the returned \fIhostent\fP structure.  If
+\fIname\fP doesn't end in a dot and the environment variable \fBHOSTALIASES\fP is
+set, the alias file pointed to by \fBHOSTALIASES\fP will first be searched for
+\fIname\fP (see \fBhostname\fP(7)  for the file format).  The current domain and
+its parents are searched unless \fIname\fP ends in a dot.
+.PP
+\fBgethostbyaddr\fP()  関数は与えられたホストアドレス \fIaddr\fP (長さ \fIlen\fP、 タイプ \fItype\fP)
+に対応する構造体 \fIhostent\fP を返す。 用いることのできるタイプは \fBAF_INET\fP と \fBAF_INET6\fP である。
+ホストアドレス引き数はアドレスタイプに依存した 構造体へのポインターである。 例えば、アドレスタイプ \fBAF_INET\fP に対しては
+(\fBinet_addr\fP(3)  の呼び出しで得られる)  \fIstruct in_addr *\fP である。
+.PP
+\fBsethostent\fP()  関数は、ネームサーバへの接続形態を指定する。 \fIstayopen\fP が真 (1)
+ならば、ネームサーバへの問い合わせには、 接続された TCP ソケットを用い、連続した問い合わせの間に接続を維持する。
+偽ならばネームサーバへの問い合わせに UDP データグラムを用いる。
+.PP
+\fBendhostent\fP()  関数はネームサーバへの問い合わせに用いた TCP 接続の利用を終了する。
+.PP
+(廃止予定の)  \fBherror\fP()  関数は現在の \fIh_errno\fP に対応するエラーメッセージを標準エラー \fIstderr\fP に出力する。
+.PP
+(廃止予定の)  \fBhstrerror\fP()  関数はエラー番号 (通常は \fIh_errno\fP) を引き数に取り、
+対応するエラーメッセージ文字列を返す。
+.PP
+.\"
+The domain name queries carried out by \fBgethostbyname\fP()  and
+\fBgethostbyaddr\fP()  rely on the Name Service Switch (\fBnsswitch.conf\fP(5))
+configured sources or a local name server (\fBnamed\fP(8)).  The default action
+is to query the Name Service Switch (\fBnsswitch.conf\fP(5))  configured
+sources, failing that, a local name server (\fBnamed\fP(8)).
+.SS Historical
+The \fBnsswitch.conf\fP(5)  file is the modern way of controlling the order of
+host lookups.
+.PP
+In glibc 2.4 and earlier, the \fIorder\fP keyword was used to control the order
+of host lookups as defined in \fI/etc/host.conf\fP (\fBhost.conf\fP(5)).
+.PP
+\fIhostent\fP 構造体は \fI<netdb.h>\fP で以下のように定義されている:
+.PP
+.in +4n
+.EX
+struct hostent {
+    char  *h_name;            /* official name of host */
+    char **h_aliases;         /* alias list */
+    int    h_addrtype;        /* host address type */
+    int    h_length;          /* length of address */
+    char **h_addr_list;       /* list of addresses */
+}
+#define h_addr h_addr_list[0] /* 過去との互換性のため */
+.EE
+.in
+.PP
+\fIhostent\fP 構造体のメンバは以下の通り。
+.TP 
+\fIh_name\fP
+ホストの正式名 (official name)。
+.TP 
+\fIh_aliases\fP
+ホストの別名の配列。配列はヌルポインターで終端される。
+.TP 
+\fIh_addrtype\fP
+アドレスのタイプ。現在はすべて \fBAF_INET\fP または \fBAF_INET6\fP である。
+.TP 
+\fIh_length\fP
+バイト単位で表したアドレスの長さ。
+.TP 
+\fIh_addr_list\fP
+ホストのネットワークアドレスへのポインターの配列。 配列はヌルポインターで終端される。 ネットワークアドレスはネットワークバイトオーダ形式である。
+.TP 
+\fIh_addr\fP
+\fIh_addr_list\fP の最初のアドレス。過去との互換性を保つためのものである。
+.SH 返り値
+\fBgethostbyname\fP()  および \fBgethostbyaddr\fP()  関数は \fIhostent\fP
+構造体を返す。エラーが起こったらヌルポインターを返す。エラーの際には \fIh_errno\fP 変数がエラーの番号を保持する。 返り値が NULL
+でない場合、静的データをポインターで指していることもある。 以下の「注意」を参照すること。
+.SH エラー
+\fIh_errno\fP 変数は以下の値を取りうる。
+.TP 
+\fBHOST_NOT_FOUND\fP
+指定したホストが見つからない。
+.TP 
+\fBNO_DATA\fP
+The requested name is valid but does not have an IP address.  Another type
+of request to the name server for this domain may return an answer.  The
+constant \fBNO_ADDRESS\fP is a synonym for \fBNO_DATA\fP.
+.TP 
+\fBNO_RECOVERY\fP
+ネームサーバの復旧不能なエラーが起こった。
+.TP 
+\fBTRY_AGAIN\fP
+authoritative なネームサーバで一時的なエラーが起こった。 時間をおいてもう一度試すこと。
+.SH ファイル
+.TP 
+\fI/etc/host.conf\fP
+名前解決の設定ファイル
+.TP 
+\fI/etc/hosts\fP
+ホストのデータベースファイル
+.TP 
+\fI/etc/nsswitch.conf\fP
+ネームサービス切替設定
+.SH 属性
+この節で使用されている用語の説明は \fBattributes\fP(7) を参照のこと。
+.TS
+allbox;
+lbw18 lb lbw29
+l l l.
+Interface      Attribute       Value
+T{
+\fBgethostbyname\fP()
+T}     Thread safety   T{
+MT\-Unsafe race:hostbyname env
+.br
+locale
+T}
+T{
+\fBgethostbyaddr\fP()
+T}     Thread safety   T{
+MT\-Unsafe race:hostbyaddr env
+.br
+locale
+T}
+T{
+\fBsethostent\fP(),
+.br
+\fBendhostent\fP(),
+.br
+\fBgethostent_r\fP()
+T}     Thread safety   T{
+MT\-Unsafe race:hostent env
+.br
+locale
+T}
+T{
+\fBherror\fP(),
+.br
+\fBhstrerror\fP()
+T}     Thread safety   MT\-Safe
+T{
+\fBgethostent\fP()
+T}     Thread safety   T{
+MT\-Unsafe race:hostent
+.br
+race:hostentbuf env locale
+T}
+T{
+\fBgethostbyname2\fP()
+T}     Thread safety   T{
+MT\-Unsafe race:hostbyname2
+.br
+env locale
+T}
+T{
+\fBgethostbyaddr_r\fP(),
+\fBgethostbyname_r\fP(),
+\fBgethostbyname2_r\fP()
+T}     Thread safety   MT\-Safe env locale
+.TE
+.sp 1
+In the above table, \fIhostent\fP in \fIrace:hostent\fP signifies that if any of
+the functions \fBsethostent\fP(), \fBgethostent\fP(), \fBgethostent_r\fP(), or
+\fBendhostent\fP()  are used in parallel in different threads of a program,
+then data races could occur.
+.SH 準拠
+POSIX.1\-2001 では、 \fBgethostbyname\fP(), \fBgethostbyaddr\fP(), \fBsethostent\fP(),
+\fBendhostent\fP(), \fBgethostent\fP(), \fIh_errno\fP が規定されており、 \fBgethostbyaddr\fP()  と
+\fBgethostbyname\fP()  は廃止予定であるとされている。 POSIX.1\-2008 では \fBgethostbyname\fP(),
+\fBgethostbyaddr\fP(), \fIh_errno\fP の仕様が削除されている。 代わりに、 \fBgetaddrinfo\fP(3)  と
+\fBgetnameinfo\fP(3)  の使用が推奨されている。
+.SH 注意
+\fBgethostbyname\fP()  および \fBgethostbyaddr\fP()  関数は静的データへのポインターを返す。
+このポインターは、その後の呼び出しで上書きされるかもしれない。 \fIhostent\fP
+構造体はポインターを含んでいるので、構造体のコピーだけでは不十分である; より深いコピーが必要である。
+.PP
+オリジナルの BSD の実装では、 \fBgethostbyname\fP()  の \fIlen\fP 引き数は \fIint\fP であった。 SUSv2
+標準はバグが多く、 \fBgethostbyaddr\fP()  の \fIlen\fP パラメーターを \fIsize_t\fP 型として宣言している。
+(これは誤りで、 \fIsize_t\fP 型ではなく \fIint\fP 型でなければならない。 POSIX.1\-2001 ではこれを \fIsocklen_t\fP
+としているが、これは OK。)  \fBaccept\fP(2)  も参照。
+.PP
+\fBgethostbyaddr\fP()  の BSD のプロトタイプは、最初の引き数として \fIconst char\ *\fP を使う。
+.SS "System V/POSIX 拡張"
+.\" e.g., Linux, FreeBSD, UnixWare, HP-UX
+.\" e.g., FreeBSD, AIX
+POSIX requires the \fBgethostent\fP()  call, which should return the next entry
+in the host data base.  When using DNS/BIND this does not make much sense,
+but it may be reasonable if the host data base is a file that can be read
+line by line.  On many systems, a routine of this name reads from the file
+\fI/etc/hosts\fP.  It may be available only when the library was built without
+DNS support.  The glibc version will ignore ipv6 entries.  This function is
+not reentrant, and glibc adds a reentrant version \fBgethostent_r\fP().
+.SS "GNU 拡張"
+glibc2 には \fBgethostbyname2\fP()  もあり、 \fBgethostbyname\fP()  と同じように動作するが、
+こちらはアドレスが属するアドレスファミリーを指定することができる。
+.PP
+Glibc2 also has reentrant versions \fBgethostent_r\fP(), \fBgethostbyaddr_r\fP(),
+\fBgethostbyname_r\fP(), and \fBgethostbyname2_r\fP().  The caller supplies a
+\fIhostent\fP structure \fIret\fP which will be filled in on success, and a
+temporary work buffer \fIbuf\fP of size \fIbuflen\fP.  After the call, \fIresult\fP
+will point to the result on success.  In case of an error or if no entry is
+found \fIresult\fP will be NULL.  The functions return 0 on success and a
+nonzero error number on failure.  In addition to the errors returned by the
+nonreentrant versions of these functions, if \fIbuf\fP is too small, the
+functions will return \fBERANGE\fP, and the call should be retried with a
+larger buffer.  The global variable \fIh_errno\fP is not modified, but the
+address of a variable in which to store error numbers is passed in
+\fIh_errnop\fP.
+.SH バグ
+.\" http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=482973
+\fBgethostbyname\fP()  は、16進数表現のドット区切りの IPv4 アドレス文字列の要素を認識しない。
+.SH 関連項目
+.\" .BR getipnodebyaddr (3),
+.\" .BR getipnodebyname (3),
+.\" .BR resolv+ (8)
+\fBgetaddrinfo\fP(3), \fBgetnameinfo\fP(3), \fBinet\fP(3), \fBinet_ntop\fP(3),
+\fBinet_pton\fP(3), \fBresolver\fP(3), \fBhosts\fP(5), \fBnsswitch.conf\fP(5),
+\fBhostname\fP(7), \fBnamed\fP(8)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
index e78ebad..c396936 100644 (file)
@@ -117,12 +117,12 @@ struct ifaddrs {
 アドレスだけがサポートされていた。 IPv6 のサポートは glibc 2.3.3 で追加された。 IPv4 以外のアドレスファミリーが
 \fBgetifaddrs\fP で利用できるのは、 netlink をサポートするカーネルの場合だけである。
 .SH 属性
-For an explanation of the terms used in this section, see \fBattributes\fP(7).
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
 .TS
 allbox;
 lbw27 lb lb
 l l l.
-Interface      Attribute       Value
+インターフェース       属性  値
 T{
 \fBgetifaddrs\fP(),
 \fBfreeifaddrs\fP()
diff --git a/manual/LDP_man-pages/draft/man3/getloadavg.3 b/manual/LDP_man-pages/draft/man3/getloadavg.3
new file mode 100644 (file)
index 0000000..6d465bf
--- /dev/null
@@ -0,0 +1,97 @@
+.\" Copyright (c) 1989, 1991, 1993
+.\"    The Regents of the University of California.  All rights reserved.
+.\"
+.\" %%%LICENSE_START(BSD_3_CLAUSE_UCB)
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\"    may be used to endorse or promote products derived from this software
+.\"    without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\" %%%LICENSE_END
+.\"
+.\"     @(#)getloadavg.3       8.1 (Berkeley) 6/4/93
+.\"
+.\" 2007-12-08, mtk, Converted from mdoc to man macros
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2002 NAKANO Takeo all rights reserved.
+.\" Translated Sun 6 Jan 2002 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
+.\"
+.TH GETLOADAVG 3 2016\-03\-15 Linux "Linux Programmer's Manual"
+.SH 名前
+getloadavg \- get system load averages
+.SH 書式
+.nf
+\fB#include <stdlib.h>\fP
+.PP
+\fBint getloadavg(double \fP\fIloadavg[]\fP\fB, int \fP\fInelem\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBgetloadavg\fP():
+.nf
+    Since glibc 2.19:
+        _DEFAULT_SOURCE
+    In glibc up to and including 2.19:
+        _BSD_SOURCE
+.fi
+.SH 説明
+The \fBgetloadavg\fP()  function returns the number of processes in the system
+run queue averaged over various periods of time.  Up to \fInelem\fP samples are
+retrieved and assigned to successive elements of \fIloadavg[]\fP.  The system
+imposes a maximum of 3 samples, representing averages over the last 1, 5,
+and 15 minutes, respectively.
+.SH 返り値
+.\" .SH HISTORY
+.\" The
+.\" BR getloadavg ()
+.\" function appeared in
+.\" 4.3BSD Reno .
+負荷平均が取得できないと \-1 を返す。 取得できた場合は、実際に取得したサンプル値の数を返す。
+.SH バージョン
+この関数は glibc のバージョン 2.2 以降で利用可能である。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBgetloadavg\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+.\" mdoc seems to have a bug - there must be no newline here
+Not in POSIX.1.  Present on the BSDs and Solaris.
+.SH 関連項目
+\fBuptime\fP(1), \fBproc\fP(5)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/getlogin.3 b/manual/LDP_man-pages/draft/man3/getlogin.3
new file mode 100644 (file)
index 0000000..a0d3baa
--- /dev/null
@@ -0,0 +1,183 @@
+.\" Copyright 1995  James R. Van Zandt <jrv@vanzandt.mv.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" Changed Tue Sep 19 01:49:29 1995, aeb: moved from man2 to man3
+.\"  added ref to /etc/utmp, added BUGS section, etc.
+.\" modified 2003 Walter Harms, aeb - added getlogin_r, note on stdin use
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1998 NAKANO Takeo all rights reserved.
+.\" Translated 1998-03-01, NAKANO Takeo <nakano@apm.seikei.ac.jp>
+.\" Updated & Modified 1999-08-21, NAKANO Takeo <nakano@apm.seikei.ac.jp>
+.\" Updated & Modified 2005-03-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2013-03-25, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2013-07-24, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH GETLOGIN 3 2019\-03\-06 GNU "Linux Programmer's Manual"
+.SH 名前
+getlogin, getlogin_r, cuserid \- ユーザー名を取得する
+.SH 書式
+\fB#include <unistd.h>\fP
+.PP
+\fBchar *getlogin(void);\fP
+.br
+\fBint getlogin_r(char *\fP\fIbuf\fP\fB, size_t \fP\fIbufsize\fP\fB);\fP
+.PP
+\fB#include <stdio.h>\fP
+.PP
+\fBchar *cuserid(char *\fP\fIstring\fP\fB);\fP
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.\" Deprecated: _REENTRANT ||
+\fBgetlogin_r\fP(): _POSIX_C_SOURCE\ >=\ 199506L
+.PP
+\fBcuserid\fP():
+.nf
+    Since glibc 2.24:
+        (_XOPEN_SOURCE && ! (_POSIX_C_SOURCE >= 200112L)
+        || _GNU_SOURCE
+    Up to and including glibc 2.23:
+        _XOPEN_SOURCE
+.fi
+.SH 説明
+\fBgetlogin\fP()  は、現在のプロセスの制御端末にログインしているユーザー名の文字列への
+ポインターを返す。ユーザー名が決定できない場合はヌルポインターを返す。 文字列は静的領域に割り当てられており、この後でこの関数や
+\fBcuserid\fP()  が呼び出された際に上書きされることがある。
+.PP
+\fBgetlogin_r\fP()  は、上記の同じユーザー名を、大きさ \fIbufsize\fP の配列 \fIbuf\fP に入れて返す。
+.PP
+\fBcuserid\fP()  は、現在のプロセスの実効ユーザーID に対応するユーザー名の 文字列へのポインターを返す。 \fIstring\fP
+がヌルポインター以外の場合、\fIstring\fP は少なくとも \fBL_cuserid\fP 文字を保持できる配列でなければならない。 \fIstring\fP が
+ヌルポインターの場合には、静的領域に置かれた文字列への ポインターが返される。この文字列は静的領域に割り当てられており、後で この関数や
+\fBgetlogin\fP()  が呼び出された際に上書きされることがある。
+.PP
+マクロ \fBL_cuserid\fP は integer の定数で、ユーザー名を保持するために 必要な配列の長さを示す。 \fBL_cuserid\fP は
+\fBstdio.h\fP で宣言されて いる。
+.PP
+これらの関数を使うと、プログラムを実行しているユーザー (\fBcuserid\fP())  や このセッションにログインしているユーザー
+(\fBgetlogin\fP())  を明確に特定することができる (ただし set\-user\-ID プログラムでは、状況が違うこともある)。
+.PP
+たいていの目的では、ユーザーの特定には環境変数 \fBLOGNAME\fP を調べ るほうが便利である。LOGNAME 変数はユーザーが自由に設定できるので
+より柔軟な対応が可能になる。
+.SH 返り値
+\fBgetlogin\fP()  は成功した場合はユーザー名へのポインターを返す。 失敗した場合は NULL を返し、 \fIerrno\fP
+にエラーの原因を示す値を設定する。 \fBgetlogin_r\fP()  は成功すると 0 を返し、失敗すると 0 以外を返す。
+.SH エラー
+POSIX specifies:
+.TP 
+\fBEMFILE\fP
+The per\-process limit on the number of open file descriptors has been
+reached.
+.TP 
+\fBENFILE\fP
+The system\-wide limit on the total number of open files has been reached.
+.TP 
+\fBENXIO\fP
+呼び出し元プロセスには制御端末がない。
+.TP 
+\fBERANGE\fP
+(getlogin_r)  (終端のヌルバイト (\(aq\e0\(aq) も含めた) ユーザー名の長さが \fIbufsize\fP よりも長い。
+.PP
+Linux/glibc also has:
+.TP 
+\fBENOENT\fP
+utmp ファイルに対応するエントリーがなかった。
+.TP 
+\fBENOMEM\fP
+passwd 構造体を割り当てるのに十分なメモリーがない。
+.TP 
+\fBENOTTY\fP
+標準入力が端末を参照していない (「バグ」の節を参照)。
+.SH ファイル
+.TP 
+\fI/etc/passwd\fP
+パスワードデータベースのファイル
+.TP 
+\fI/var/run/utmp\fP
+(伝統的には \fI/etc/utmp\fP が使われている; libc の中には \fI/var/adm/utmp\fP を使うものもある)
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBgetlogin\fP()
+T}     Thread safety   T{
+MT\-Unsafe race:getlogin race:utent
+.br
+sig:ALRM timer locale
+T}
+T{
+\fBgetlogin_r\fP()
+T}     Thread safety   T{
+MT\-Unsafe race:utent sig:ALRM timer
+.br
+locale
+T}
+T{
+\fBcuserid\fP()
+T}     Thread safety   MT\-Unsafe race:cuserid/!string locale
+.TE
+.sp 1
+In the above table, \fIutent\fP in \fIrace:utent\fP signifies that if any of the
+functions \fBsetutent\fP(3), \fBgetutent\fP(3), or \fBendutent\fP(3)  are used in
+parallel in different threads of a program, then data races could occur.
+\fBgetlogin\fP()  and \fBgetlogin_r\fP()  call those functions, so we use
+race:utent to remind users.
+.SH 準拠
+\fBgetlogin\fP()  and \fBgetlogin_r\fP(): POSIX.1\-2001, POSIX.1\-2008.
+.PP
+System V にも \fBcuserid\fP()  があるが、 これは実効ユーザー ID ではなく、実ユーザー ID を使用する。
+\fBcuserid\fP()  関数は 1988 年版の POSIX には含まれていたが、 1990 年版では削除された。 SUSv2
+に存在したが、POSIX.1\-2001 で削除された。
+.PP
+OpenBSD には \fBgetlogin\fP()  と \fBsetlogin\fP()  があり、 セッションに対応したユーザー名がある。制御端末がない
+セッションの場合であっても、対応するユーザー名がある。
+.SH バグ
+残念ながら、 \fBgetlogin\fP() をだますのはそれほど難しいことではない。別のプログラムが utmp ファイルを
+壊してしまうと、全く動作しないこともある。またログイン名の最初の 8 文字
+しか返さないことも多い。また、プログラムの制御端末に現在ログインしているユーザーは、プログラムを実行したユーザーでない場合もある。
+セキュリティの絡む用途には \fBgetlogin\fP() を用いるべきではない。
+.PP
+glibc は POSIX 仕様には従っておらず、 \fI/dev/tty\fP ではなく \fI標準入力 (stdin)\fP を使う。これはバグである。
+(SunOS 5.8 や HP\-UX 11.11 や FreeBSD 4.8 といった他の最近のシステムはいずれも、 \fI標準入力\fP
+がリダイレクトされた場合でもログイン名を返す。)
+.PP
+\fBcuserid\fP()  が何を行っているのか、実際のところを知っている者は誰もいない; 移植性が求められるプログラムでは \fBcuserid\fP()
+は使うべきではない。 というかどんなプログラムでも使うべきではない: 代わりに \fIgetpwuid(geteuid())\fP を用いるべきである
+(これが意図していることならば、だが)。 \fBcuserid\fP()  は「使わない」こと。
+.SH 関連項目
+\fBlogname\fP(1), \fBgeteuid\fP(2), \fBgetuid\fP(2), \fButmp\fP(5)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/getnetent.3 b/manual/LDP_man-pages/draft/man3/getnetent.3
new file mode 100644 (file)
index 0000000..803ff12
--- /dev/null
@@ -0,0 +1,161 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified Sat Jul 24 21:48:06 1993 by Rik Faith (faith@cs.unc.edu)
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1998 NAKANO Takeo all rights reserved.
+.\" Translated 1998-03-01, NAKANO Takeo <nakano@apm.seikei.ac.jp>
+.\" Modified 1998-06-22, NAKANO Takeo
+.\" Updated 2008-09-19, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH GETNETENT 3 2020\-12\-21 GNU "Linux Programmer's Manual"
+.SH 名前
+getnetent, getnetbyname, getnetbyaddr, setnetent, endnetent \-
+ネットワークエントリーを取得する
+.SH 書式
+.nf
+\fB#include <netdb.h>\fP
+.PP
+\fBstruct netent *getnetent(void);\fP
+.PP
+\fBstruct netent *getnetbyname(const char *\fP\fIname\fP\fB);\fP
+.PP
+\fBstruct netent *getnetbyaddr(uint32_t \fP\fInet\fP\fB, int \fP\fItype\fP\fB);\fP
+.PP
+\fBvoid setnetent(int \fP\fIstayopen\fP\fB);\fP
+.PP
+\fBvoid endnetent(void);\fP
+.fi
+.SH 説明
+\fBgetnetent\fP()  関数はネットワークデータベースから次のエントリーを読み込み、 そのエントリーを \fInetent\fP
+構造体の要素別のフィールドに格納し、 その構造体を返す。 必要であれば、データベースへの接続がオープンされる。
+.PP
+\fBgetnetbyname\fP()  関数は、ネットワーク名 \fIname\fP にマッチするエントリーを データベースから探し、そのエントリーを収めた
+\fInetent\fP 構造体を返す。
+.PP
+\fBgetnetbyaddr\fP()  関数は、\fItype\fP 型のネットワーク番号 \fInet\fP にマッチするエントリーを
+データベースから探し、そのエントリーを収めた \fInetent\fP 構造体を返す。 \fInet\fP 引き数はホストバイトオーダでなければならない。
+.PP
+\fBsetnetent\fP()  関数はデータベースへの接続をオープンし、 次の読み込みエントリーを先頭のエントリーに設定する。 \fIstayopen\fP
+が 0 でない場合、 一つ一つの \fBgetnet*\fP()  関数の呼び出し間でデータベースへの接続をクローズしない。
+.PP
+\fBendnetent\fP()  関数はデータベースへの接続をクローズする。
+.PP
+\fInetent\fP 構造体は \fI<netdb.h>\fP で以下のように定義されている。
+.PP
+.in +4n
+.EX
+struct netent {
+    char      *n_name;     /* official network name */
+    char     **n_aliases;  /* alias list */
+    int        n_addrtype; /* net address type */
+    uint32_t   n_net;      /* network number */
+}
+.EE
+.in
+.PP
+\fInetent\fP 構造体のメンバは以下の通り。
+.TP 
+\fIn_name\fP
+ネットワークの正式名 (official name)。
+.TP 
+\fIn_aliases\fP
+ネットワークの別名からなるリスト。 リストはヌルで終端される。
+.TP 
+\fIn_addrtype\fP
+ネットワーク番号の形式。現在は \fBAF_INET\fP のみ。
+.TP 
+\fIn_net\fP
+ホストバイトオーダ形式のネットワーク番号。
+.SH 返り値
+The \fBgetnetent\fP(), \fBgetnetbyname\fP(), and \fBgetnetbyaddr\fP()  functions
+return a pointer to a statically allocated \fInetent\fP structure, or a null
+pointer if an error occurs or the end of the file is reached.
+.SH ファイル
+.TP 
+\fI/etc/networks\fP
+ネットワークデータベースファイル
+.SH 属性
+この節で使用されている用語の説明は \fBattributes\fP(7) を参照のこと。
+.TS
+allbox;
+lbw14 lb lbw25
+l l l.
+Interface      Attribute       Value
+T{
+\fBgetnetent\fP()
+T}     Thread safety   T{
+MT\-Unsafe race:netent
+.br
+race:netentbuf env locale
+T}
+T{
+\fBgetnetbyname\fP()
+T}     Thread safety   T{
+MT\-Unsafe race:netbyname
+.br
+env locale
+T}
+T{
+\fBgetnetbyaddr\fP()
+T}     Thread safety   T{
+MT\-Unsafe race:netbyaddr
+.br
+locale
+T}
+T{
+\fBsetnetent\fP(),
+.br
+\fBendnetent\fP()
+T}     Thread safety   T{
+MT\-Unsafe race:netent env
+.br
+locale
+T}
+.TE
+.sp 1
+In the above table, \fInetent\fP in \fIrace:netent\fP signifies that if any of the
+functions \fBsetnetent\fP(), \fBgetnetent\fP(), or \fBendnetent\fP()  are used in
+parallel in different threads of a program, then data races could occur.
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, 4.3BSD.
+.SH 注意
+バージョン 2.2 より前の glibc では、 \fBgetnetbyaddr\fP()  の引き数 \fInet\fP は \fIlong\fP 型だった。
+.SH 関連項目
+.\" .BR networks (5)
+\fBgetnetent_r\fP(3), \fBgetprotoent\fP(3), \fBgetservent\fP(3)
+.br
+RFC\ 1101
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
index b4f1250..abad63f 100644 (file)
@@ -86,12 +86,12 @@ echo をオフにし、一行 (「パスワード」)  を読み込み、端末
 .\" function appeared in Version 7 AT&T UNIX.
 \fI/dev/tty\fP
 .SH 属性
-For an explanation of the terms used in this section, see \fBattributes\fP(7).
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
 .TS
 allbox;
 lb lb lb
 l l l.
-Interface      Attribute       Value
+インターフェース       属性  値
 T{
 \fBgetpass\fP()
 T}     Thread safety   MT\-Unsafe term
diff --git a/manual/LDP_man-pages/draft/man3/getprotoent.3 b/manual/LDP_man-pages/draft/man3/getprotoent.3
new file mode 100644 (file)
index 0000000..5d0dfaa
--- /dev/null
@@ -0,0 +1,154 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified Sat Jul 24 19:26:03 1993 by Rik Faith (faith@cs.unc.edu)
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1998 NAKANO Takeo all rights reserved.
+.\" Translated Fri Mar 15 1998 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
+.\" Updated 2008-09-19, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH GETPROTOENT 3 2020\-12\-21 GNU "Linux Programmer's Manual"
+.SH 名前
+getprotoent, getprotobyname, getprotobynumber, setprotoent, endprotoent \-
+プロトコルのエントリーを取得する
+.SH 書式
+.nf
+\fB#include <netdb.h>\fP
+.PP
+\fBstruct protoent *getprotoent(void);\fP
+.PP
+\fBstruct protoent *getprotobyname(const char *\fP\fIname\fP\fB);\fP
+.PP
+\fBstruct protoent *getprotobynumber(int \fP\fIproto\fP\fB);\fP
+.PP
+\fBvoid setprotoent(int \fP\fIstayopen\fP\fB);\fP
+.PP
+\fBvoid endprotoent(void);\fP
+.fi
+.SH 説明
+\fBgetprotoent\fP()  関数は、プロトコルのデータベース (\fBprotocols\fP(5)  参照) から次のエントリーを読み込み、
+そのエントリーを \fIprotoent\fP 構造体の要素別のフィールドに格納し、 その構造体を返す。 必要であれば、データベースへの接続がオープンされる。
+.PP
+\fBgetprotobyname\fP()  関数は、プロトコル名 \fIname\fP にマッチするエントリーを データベースから探し、そのエントリーを収めた
+\fIprotoent\fP 構造体を返す。 必要であれば、データベースへの接続がオープンされる。
+.PP
+\fBgetprotobynumber\fP()  関数は、プロトコル番号 \fInumber\fP にマッチするエントリーを
+データベースから探し、そのエントリーを収めた \fIprotoent\fP 構造体を返す。 必要であれば、データベースへの接続がオープンされる。
+.PP
+\fBsetprotoent\fP()  関数はデータベースへの接続をオープンし、 次の読み込みエントリーを先頭のエントリーに設定する。
+\fIstayopen\fP が 0 でない場合、 一つ一つの \fBgetproto*\fP()  関数の呼び出し間でデータベースへの接続をクローズしない。
+.PP
+\fBendprotoent\fP()  関数はデータベースへの接続をクローズする。
+.PP
+\fIprotoent\fP 構造体は \fI<netdb.h>\fP で以下のように定義されている。
+.PP
+.in +4n
+.EX
+struct protoent {
+    char  *p_name;       /* official protocol name */
+    char **p_aliases;    /* alias list */
+    int    p_proto;      /* protocol number */
+}
+.EE
+.in
+.PP
+\fIprotoent\fP 構造体のメンバーは以下の通り。
+.TP 
+\fIp_name\fP
+プロトコルの正式名 (official name)。
+.TP 
+\fIp_aliases\fP
+プロトコルの別名のリスト。 リストはヌルで終端される。
+.TP 
+\fIp_proto\fP
+プロトコルの番号
+.SH 返り値
+The \fBgetprotoent\fP(), \fBgetprotobyname\fP(), and \fBgetprotobynumber\fP()
+functions return a pointer to a statically allocated \fIprotoent\fP structure,
+or a null pointer if an error occurs or the end of the file is reached.
+.SH ファイル
+.PD 0
+.TP 
+\fI/etc/protocols\fP
+プロトコルのデータベースファイル
+.PD
+.SH 属性
+この節で使用されている用語の説明は \fBattributes\fP(7) を参照のこと。
+.TS
+allbox;
+lbw18 lb lbw28
+l l l.
+Interface      Attribute       Value
+T{
+\fBgetprotoent\fP()
+T}     Thread safety   T{
+MT\-Unsafe race:protoent
+.br
+race:protoentbuf locale
+T}
+T{
+\fBgetprotobyname\fP()
+T}     Thread safety   T{
+MT\-Unsafe race:protobyname
+.br
+locale
+T}
+T{
+\fBgetprotobynumber\fP()
+T}     Thread safety   T{
+MT\-Unsafe race:protobynumber
+.br
+locale
+T}
+T{
+\fBsetprotoent\fP(),
+.br
+\fBendprotoent\fP()
+T}     Thread safety   T{
+MT\-Unsafe race:protoent
+.br
+locale
+T}
+.TE
+.sp 1
+In the above table, \fIprotoent\fP in \fIrace:protoent\fP signifies that if any of
+the functions \fBsetprotoent\fP(), \fBgetprotoent\fP(), or \fBendprotoent\fP()  are
+used in parallel in different threads of a program, then data races could
+occur.
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, 4.3BSD.
+.SH 関連項目
+\fBgetnetent\fP(3), \fBgetprotoent_r\fP(3), \fBgetservent\fP(3), \fBprotocols\fP(5)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/getpt.3 b/manual/LDP_man-pages/draft/man3/getpt.3
new file mode 100644 (file)
index 0000000..712c755
--- /dev/null
@@ -0,0 +1,66 @@
+.\" This man page was written by Jeremy Phelps <jphelps@notreached.net>.
+.\"
+.\" %%%LICENSE_START(FREELY_REDISTRIBUTABLE)
+.\" Redistribute and modify at will.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2003  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated Tue Jul  8 01:44:54 JST 2003
+.\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH GETPT 3 2020\-08\-13 GNU "Linux Programmer's Manual"
+.SH 名前
+getpt \- open a new pseudoterminal master
+.SH 書式
+.nf
+\fB#define _GNU_SOURCE\fP             /* feature_test_macros(7) 参照 */
+\fB#include <stdlib.h>\fP
+.PP
+\fBint getpt(void);\fP
+.fi
+.SH 説明
+\fBgetpt\fP()  opens a new pseudoterminal device and returns a file descriptor
+that refers to that device.  It is equivalent to opening the pseudoterminal
+multiplexor device
+.PP
+.in +4n
+.EX
+open("/dev/ptmx", O_RDWR);
+.EE
+.in
+.PP
+on Linux systems, though the pseudoterminal multiplexor device is located
+elsewhere on some systems that use the GNU C library.
+.SH 返り値
+成功した場合、 \fBgetpt\fP()  はオープンしたファイルのディスクリプターを返す。 そうでない場合、\-1 を返し、 \fIerrno\fP
+にエラーを示す値がセットされる。
+.SH エラー
+\fBgetpt\fP()  は \fBopen\fP(2)  で説明されている種々のエラーで失敗する可能性がある。
+.SH バージョン
+\fBgetpt\fP()  は、バージョン 2.1 以降の glibc で提供されている。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBgetpt\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+\fBgetpt\fP()  は glibc 独自である。代わりに \fBposix_openpt\fP(3)  を使用すること。
+.SH 関連項目
+\fBgrantpt\fP(3), \fBposix_openpt\fP(3), \fBptsname\fP(3), \fBunlockpt\fP(3),
+\fBptmx\fP(4), \fBpty\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/getpw.3 b/manual/LDP_man-pages/draft/man3/getpw.3
new file mode 100644 (file)
index 0000000..c89c866
--- /dev/null
@@ -0,0 +1,124 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified Sat Jul 24 19:23:25 1993 by Rik Faith (faith@cs.unc.edu)
+.\" Modified Mon May 27 21:37:47 1996 by Martin Schulze (joey@linux.de)
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
+.\"    all rights reserved.
+.\" Translated 1997-12-19, HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
+.\" Modified 1999-12-08, Kentaro Shirakata <argrath@yo.rim.or.jp>
+.\" Modified 2005-09-04, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Modified 2008-07-23, Kentaro Shirakata <argrath@ub32.org>
+.\"
+.TH GETPW 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+getpw \- パスワード行エントリーを取得する
+.SH 書式
+.nf
+\fB#define _GNU_SOURCE\fP             /* feature_test_macros(7) 参照 */
+\fB#include <sys/types.h>\fP
+\fB#include <pwd.h>\fP
+.PP
+\fBint getpw(uid_t \fP\fIuid\fP\fB, char *\fP\fIbuf\fP\fB);\fP
+.fi
+.SH 説明
+\fBgetpw\fP()  関数は、バッファー \fIbuf\fP に指定ユーザー ID \fIuid\fP の パスワード行エントリーを取得する。
+返されるバッファーは、以下の形式の行を含む。
+.PP
+.in +4n
+.EX
+\fBname:passwd:uid:gid:gecos:dir:shell\fP
+.EE
+.in
+.PP
+\fIpasswd\fP 構造体は、\fI<pwd.h>\fP で以下のように定義されている:
+.PP
+.in +4n
+.EX
+struct passwd {
+    char   *pw_name;       /* ユーザー名 */
+    char   *pw_passwd;     /* ユーザーのパスワード */
+    uid_t   pw_uid;        /* ユーザー ID */
+    gid_t   pw_gid;        /* グループ ID */
+    char   *pw_gecos;      /* ユーザー情報 */
+    char   *pw_dir;        /* ホームディレクトリ */
+    char   *pw_shell;      /* シェルプログラム */
+};
+.EE
+.in
+.PP
+この構造体のフィールドの詳細は \fBpasswd\fP(5)  を参照のこと。
+.SH 返り値
+\fBgetpw\fP()  関数は、成功した場合 0 を返す; エラーが発生した場合 \-1 を返し、エラーを 示すために \fIerrno\fP がセットされる。
+.PP
+\fIuid\fP がパスワードデータベースに見つからない場合、 \fBgetpw\fP() は \-1 を返し、 \fIerrno\fP に 0 を設定し、 \fIbuf\fP
+は変更しない。
+.SH エラー
+.TP 
+\fB0\fP または \fBENOENT\fP
+\fIuid\fP に対応するユーザーがいない。
+.TP 
+\fBEINVAL\fP
+\fIbuf\fP が NULL。
+.TP 
+\fBENOMEM\fP
+\fIpasswd\fP 構造体に割り当てるメモリーが十分なかった。
+.SH ファイル
+.TP 
+\fI/etc/passwd\fP
+パスワードデータベースファイル
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBgetpw\fP()
+T}     Thread safety   MT\-Safe locale
+.TE
+.sp 1
+.SH 準拠
+SVr2
+.SH バグ
+\fBgetpw\fP()  関数は、与えられたバッファー \fIbuf\fP がオーバーフローするかもしれないので危険である。 この関数は
+\fBgetpwuid\fP(3)  によって古いものとなった。
+.SH 関連項目
+\fBendpwent\fP(3), \fBfgetpwent\fP(3), \fBgetpwent\fP(3), \fBgetpwnam\fP(3),
+\fBgetpwuid\fP(3), \fBputpwent\fP(3), \fBsetpwent\fP(3), \fBpasswd\fP(5)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/getpwent.3 b/manual/LDP_man-pages/draft/man3/getpwent.3
new file mode 100644 (file)
index 0000000..4ee74aa
--- /dev/null
@@ -0,0 +1,163 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\"
+.\" Modified Sat Jul 24 19:22:14 1993 by Rik Faith (faith@cs.unc.edu)
+.\" Modified Mon May 27 21:37:47 1996 by Martin Schulze (joey@linux.de)
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
+.\"    all rights reserved.
+.\" Translated 1997-12-18, HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
+.\" Updated 2005-09-06, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH GETPWENT 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+getpwent, setpwent, endpwent \- パスワードファイルのエントリーの取得
+.SH 書式
+.nf
+\fB#include <sys/types.h>\fP
+\fB#include <pwd.h>\fP
+.PP
+\fBstruct passwd *getpwent(void);\fP
+.PP
+\fBvoid setpwent(void);\fP
+.PP
+\fBvoid endpwent(void);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBgetpwent\fP(), \fBsetpwent\fP(), \fBendpwent\fP():
+.RS 4
+.\"    || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
+_XOPEN_SOURCE\ >=\ 500
+    || /* Glibc since 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad b
+.SH 説明
+\fBgetpwent\fP()  関数は、パスワードデータベースから取得したエントリーを 要素毎に分解し、各要素を格納した構造体へのポインターを返す
+(パスワードデータベースの例: ローカルのパスワードファイル \fI/etc/passwd\fP, NIS, LDAP)。 \fBgetpwent\fP()
+は、最初に呼び出された時は最初のエントリーを返し、それ以降は 呼び出される毎に次のエントリーを返す。
+.PP
+\fBsetpwent\fP()  関数を使うと、パスワードデータベースの先頭に戻る。
+.PP
+\fBendpwent\fP()  関数は、全ての処理が終わった後にパスワード データベースをクローズする。
+.PP
+\fIpasswd\fP 構造体は、\fI<pwd.h>\fP で以下のように定義されている:
+.PP
+.in +4n
+.EX
+struct passwd {
+    char   *pw_name;       /* ユーザー名 */
+    char   *pw_passwd;     /* ユーザーのパスワード */
+    uid_t   pw_uid;        /* ユーザー ID */
+    gid_t   pw_gid;        /* グループ ID */
+    char   *pw_gecos;      /* ユーザー情報 */
+    char   *pw_dir;        /* ホームディレクトリ */
+    char   *pw_shell;      /* シェルプログラム */
+};
+.EE
+.in
+.PP
+この構造体のフィールドの詳細は \fBpasswd\fP(5)  を参照のこと。
+.SH 返り値
+\fBgetpwent\fP()  関数は \fIpasswd\fP 構造体へのポインターを返す。 これ以上エントリーが無いか、エラーが発生した場合は NULL
+を返す。 エラーが発生すると、 \fIerrno\fP が適切に設定される。 この関数の呼び出し後に \fIerrno\fP をチェックしたい場合は、呼び出し前に
+\fIerrno\fP を 0 に設定しておかないといけない。
+.PP
+返り値は静的な領域を指しており、その後の \fBgetpwent\fP(), \fBgetpwnam\fP(3), \fBgetpwuid\fP(3)
+の呼び出しで上書きされるかもしれない。 (返されたポインターを \fBfree\fP(3)  に渡さないこと。)
+.SH エラー
+.TP 
+\fBEINTR\fP
+A signal was caught; see \fBsignal\fP(7).
+.TP 
+\fBEIO\fP
+I/O エラー。
+.TP 
+\fBEMFILE\fP
+The per\-process limit on the number of open file descriptors has been
+reached.
+.TP 
+\fBENFILE\fP
+The system\-wide limit on the total number of open files has been reached.
+.TP 
+\fBENOMEM\fP
+.\" not in POSIX
+.\" to allocate the passwd structure, or to allocate buffers
+\fIpasswd\fP 構造体に割り当てるメモリーが十分なかった。
+.TP 
+\fBERANGE\fP
+与えられたバッファー空間が不十分である。
+.SH ファイル
+.TP 
+\fI/etc/passwd\fP
+ローカルのパスワードデータベースファイル
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw11 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBgetpwent\fP()
+T}     Thread safety   T{
+MT\-Unsafe race:pwent
+.br
+race:pwentbuf locale
+T}
+T{
+\fBsetpwent\fP(),
+.br
+\fBendpwent\fP()
+T}     Thread safety   MT\-Unsafe race:pwent locale
+.TE
+.sp 1
+In the above table, \fIpwent\fP in \fIrace:pwent\fP signifies that if any of the
+functions \fBsetpwent\fP(), \fBgetpwent\fP(), or \fBendpwent\fP()  are used in
+parallel in different threads of a program, then data races could occur.
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, SVr4, 4.3BSD.  The \fIpw_gecos\fP field is not
+specified in POSIX, but is present on most implementations.
+.SH 関連項目
+\fBfgetpwent\fP(3), \fBgetpw\fP(3), \fBgetpwent_r\fP(3), \fBgetpwnam\fP(3),
+\fBgetpwuid\fP(3), \fBputpwent\fP(3), \fBpasswd\fP(5)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/getpwnam.3 b/manual/LDP_man-pages/draft/man3/getpwnam.3
new file mode 100644 (file)
index 0000000..c34edd9
--- /dev/null
@@ -0,0 +1,263 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's "POSIX Programmer's Guide" (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\"
+.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 1996-05-27 by Martin Schulze (joey@linux.de)
+.\" Modified 2003-11-15 by aeb
+.\" 2008-11-07, mtk, Added an example program for getpwnam_r().
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
+.\"    all rights reserved.
+.\" Translated 1997-12-18, HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
+.\" Updated & Modified 2004-01-06, Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated & Modified 2005-09-06, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated & Modified 2005-10-08, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2008-12-24, Akihiro MOTOKI, LDP v3.14
+.\" Updated 2012-05-01, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2013-08-16, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH GETPWNAM 3 2020\-11\-01 GNU "Linux Programmer's Manual"
+.SH 名前
+getpwnam, getpwnam_r, getpwuid, getpwuid_r \- パスワードファイルのエントリーの取得
+.SH 書式
+.nf
+\fB#include <sys/types.h>\fP
+\fB#include <pwd.h>\fP
+.PP
+\fBstruct passwd *getpwnam(const char *\fP\fIname\fP\fB);\fP
+.PP
+\fBstruct passwd *getpwuid(uid_t \fP\fIuid\fP\fB);\fP
+.PP
+\fBint getpwnam_r(const char *\fP\fIname\fP\fB, struct passwd *\fP\fIpwd\fP\fB,\fP
+\fB               char *\fP\fIbuf\fP\fB, size_t \fP\fIbuflen\fP\fB, struct passwd **\fP\fIresult\fP\fB);\fP
+.PP
+\fBint getpwuid_r(uid_t \fP\fIuid\fP\fB, struct passwd *\fP\fIpwd\fP\fB,\fP
+\fB               char *\fP\fIbuf\fP\fB, size_t \fP\fIbuflen\fP\fB, struct passwd **\fP\fIresult\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBgetpwnam_r\fP(), \fBgetpwuid_r\fP():
+.RS 4
+_POSIX_C_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad b
+.SH 説明
+\fBgetpwnam\fP()  関数は、ユーザー名 \fIname\fP にマッチするパスワードデータベースのエントリーを
+要素毎に分解し、各要素を格納した構造体へのポインターを返す (パスワードデータベースの例: ローカルのパスワードファイル \fI/etc/passwd\fP,
+NIS, LDAP)。
+.PP
+\fBgetpwuid\fP()  関数は、ユーザー ID \fIuid\fP にマッチするパスワードデータベースのエントリーを
+要素毎に分解し、各要素を格納した構造体へのポインターを返す。
+.PP
+\fIpasswd\fP 構造体は、\fI<pwd.h>\fP で以下のように定義されている:
+.PP
+.in +4n
+.EX
+struct passwd {
+    char   *pw_name;       /* ユーザー名 */
+    char   *pw_passwd;     /* ユーザーのパスワード */
+    uid_t   pw_uid;        /* ユーザー ID */
+    gid_t   pw_gid;        /* グループ ID */
+    char   *pw_gecos;      /* ユーザー情報 */
+    char   *pw_dir;        /* ホームディレクトリ */
+    char   *pw_shell;      /* シェルプログラム */
+};
+.EE
+.in
+.PP
+これらのフィールドの詳しい情報については \fBpasswd\fP(5) を参照のこと。
+.PP
+\fBgetpwnam_r\fP() と \fBgetpwuid_r\fP() 関数は、それぞれ\fBgetpwnam\fP() と
+\fBgetpwuid\fP() と同じ情報を取得するが、取得した \fIpasswd\fP 構造体を
+\fIpwd\fP が指す領域に格納する。\fIpasswd\fP 構造体のメンバーが指す文字列は、
+サイズ \fIbuflen\fP のバッファー \fIbuf\fP に格納される。成功した場合
+\fI*result\fP には結果へのポインターが格納される。エントリーが見つからなかった
+場合やエラーが発生した場合には \fI*result\fP には NULL が入る。
+.PP
+呼び出し
+.PP
+    sysconf(_SC_GETPW_R_SIZE_MAX)
+.PP
+は、 \fIerrno\fP を変更せずに \-1 を返すか、 \fIbuf\fP の初期サイズの推奨値を
+返す。(このサイズが小さすぎる場合、呼び出しは \fBERANGE\fP で失敗し、この
+場合には呼び出し側はバッファーを大きくしてから再度呼び出すことができる。)
+.SH 返り値
+\fBgetpwnam\fP()  と \fBgetpwuid\fP()  関数は、 \fIpasswd\fP 構造体へのポインターを返す。
+一致するエントリーが見つからなかった場合や、エラーが発生した場合は NULL を返す。 エラーが起こった場合、 \fIerrno\fP が適切に設定される。
+呼び出しの後で \fIerrno\fP をチェックしたい場合は、 呼び出しの前に (この値を) 0 に設定しておくべきである。
+.PP
+返り値は静的な領域を指しており、その後の \fBgetpwent\fP(3), \fBgetpwnam\fP(), \fBgetpwuid\fP()
+の呼び出しで上書きされるかもしれない。 (返されたポインターを \fBfree\fP(3)  に渡さないこと。)
+.PP
+成功すると、 \fBgetpwnam_r\fP()  と \fBgetpwuid_r\fP()  は 0 を返し、 \fI*result\fP に \fIpwd\fP
+を設定する。 マッチするパスワードエントリーが見つからなかった場合には、 0 を返し、 \fI*result\fP に NULL を設定する。
+エラーの場合、エラー番号を返し、 \fI*result\fP に NULL を設定する。
+.SH エラー
+.TP 
+\fB0\fP or \fBENOENT\fP or \fBESRCH\fP or \fBEBADF\fP or \fBEPERM\fP or ...
+指定された \fIname\fP または \fIuid\fP が見つからなかった。
+.TP 
+\fBEINTR\fP
+A signal was caught; see \fBsignal\fP(7).
+.TP 
+\fBEIO\fP
+I/O エラー。
+.TP 
+\fBEMFILE\fP
+The per\-process limit on the number of open file descriptors has been
+reached.
+.TP 
+\fBENFILE\fP
+The system\-wide limit on the total number of open files has been reached.
+.TP 
+\fBENOMEM\fP
+.\" not in POSIX
+.\" This structure is static, allocated 0 or 1 times. No memory leak. (libc45)
+\fIpasswd\fP 構造体に割り当てるメモリーが十分なかった。
+.TP 
+\fBERANGE\fP
+与えられたバッファー空間が不十分である。
+.SH ファイル
+.TP 
+\fI/etc/passwd\fP
+ローカルのパスワードデータベースファイル
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBgetpwnam\fP()
+T}     Thread safety   MT\-Unsafe race:pwnam locale
+T{
+\fBgetpwuid\fP()
+T}     Thread safety   MT\-Unsafe race:pwuid locale
+T{
+\fBgetpwnam_r\fP(),
+.br
+\fBgetpwuid_r\fP()
+T}     Thread safety   MT\-Safe locale
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, SVr4, 4.3BSD.  The \fIpw_gecos\fP field is not
+specified in POSIX, but is present on most implementations.
+.SH 注意
+.\" more precisely:
+.\" AIX 5.1 - gives ESRCH
+.\" OSF1 4.0g - gives EWOULDBLOCK
+.\" libc, glibc up to version 2.6, Irix 6.5 - give ENOENT
+.\" glibc since version 2.7 - give 0
+.\" FreeBSD 4.8, OpenBSD 3.2, NetBSD 1.6 - give EPERM
+.\" SunOS 5.8 - gives EBADF
+.\" Tru64 5.1b, HP-UX-11i, SunOS 5.7 - give 0
+上記の「返り値」以下の記述は POSIX.1\-2001 に拠る。 この標準は「(エントリーが) 見つからないこと」をエラーとしていないので、
+そのような場合に \fIerrno\fP がどのような値になるかを定めていない。 そのため、エラーを認識することは不可能である。 POSIX
+に準拠して、エントリーが見つからない場合は \fIerrno\fP を変更しないようにすべきである、と主張する人もいるかもしれない。 様々な UNIX
+系のシステムで試してみると、そのような場合には 0, ENOENT, EBADF, ESRCH, EWOULDBLOCK, EPERM
+といった様々な値が返される。 他の値が返されるかもしれない。
+.PP
+フィールド \fIpw_dir\fP には、ユーザーの作業ディレクトリ名の初期値が格納される。 ログインプロセスは、このフィールドの値を使って、
+ログインシェルの \fBHOME\fP 環境変数を初期化する。 アプリケーションが、ユーザーのホームディレクトリを決定する場合には、
+(\fIgetpwuid(getuid())\->pw_dir\fP の値ではなく)  \fBHOME\fP の値を検査するようにすべきである。
+なぜなら、このようにすることで、ユーザーがログインセッション中で 「ホームディレクトリ」の意味を変更できるようになるからである。
+別のユーザーのホームディレクトリ (の初期値) を知るには \fIgetpwnam("username")\->pw_dir\fP
+か同様の方法を使う必要がある。
+.SH EXAMPLES
+以下のプログラムは \fBgetpwnam_r\fP()  の使用例を示したもので、コマンドライン引き数で渡されたユーザー名に対する
+完全なユーザー名とユーザー ID を探すものである。
+.PP
+.EX
+#include <pwd.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <errno.h>
+
+int
+main(int argc, char *argv[])
+{
+    struct passwd pwd;
+    struct passwd *result;
+    char *buf;
+    size_t bufsize;
+    int s;
+
+    if (argc != 2) {
+        fprintf(stderr, "Usage: %s username\en", argv[0]);
+        exit(EXIT_FAILURE);
+    }
+
+    bufsize = sysconf(_SC_GETPW_R_SIZE_MAX);
+    if (bufsize == \-1)          /* 値を決定できなかった */
+        bufsize = 16384;        /* 十分大きな値にすべき */
+
+    buf = malloc(bufsize);
+    if (buf == NULL) {
+        perror("malloc");
+        exit(EXIT_FAILURE);
+    }
+
+    s = getpwnam_r(argv[1], &pwd, buf, bufsize, &result);
+    if (result == NULL) {
+        if (s == 0)
+            printf("Not found\en");
+        else {
+            errno = s;
+            perror("getpwnam_r");
+        }
+        exit(EXIT_FAILURE);
+    }
+
+    printf("Name: %s; UID: %jd\en", pwd.pw_gecos,
+            (intmax_t) pwd.pw_uid);
+    exit(EXIT_SUCCESS);
+}
+.EE
+.SH 関連項目
+\fBendpwent\fP(3), \fBfgetpwent\fP(3), \fBgetgrnam\fP(3), \fBgetpw\fP(3),
+\fBgetpwent\fP(3), \fBgetspnam\fP(3), \fBputpwent\fP(3), \fBsetpwent\fP(3), \fBpasswd\fP(5)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/getrpcent.3 b/manual/LDP_man-pages/draft/man3/getrpcent.3
new file mode 100644 (file)
index 0000000..b3124a1
--- /dev/null
@@ -0,0 +1,105 @@
+.\" This page was taken from the 4.4BSD-Lite CDROM (BSD license)
+.\"
+.\" %%%LICENSE_START(BSD_ONELINE_CDROM)
+.\" This page was taken from the 4.4BSD-Lite CDROM (BSD license)
+.\" %%%LICENSE_END
+.\"
+.\" @(#)getrpcent.3n   2.2 88/08/02 4.0 RPCSRC; from 1.11 88/03/14 SMI
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1999 HANATAKA Shinya
+.\"         all rights reserved.
+.\" Translated 2000-01-11, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
+.\" Updated 2008-09-19, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH GETRPCENT 3 2020\-04\-11 "" "Linux Programmer's Manual"
+.SH 名前
+getrpcent, getrpcbyname, getrpcbynumber, setrpcent, endrpcent \- RPC
+エントリーを取得する
+.SH 書式
+.nf
+\fB#include <netdb.h>\fP
+.PP
+\fBstruct rpcent *getrpcent(void);\fP
+.PP
+\fBstruct rpcent *getrpcbyname(const char *\fP\fIname\fP\fB);\fP
+.PP
+\fBstruct rpcent *getrpcbynumber(int \fP\fInumber\fP\fB);\fP
+.PP
+\fBvoid setrpcent(int \fP\fIstayopen\fP\fB);\fP
+.PP
+\fBvoid endrpcent(void);\fP
+.fi
+.SH 説明
+\fBgetrpcent\fP(), \fBgetrpcbyname\fP(), \fBgetrpcbynumber\fP()
+はそれぞれ以下の構造体へのポインターを返す。 この構造体は RPC プログラム番号データベース の各行のフィールドを含んでいる。
+.PP
+.in +4n
+.EX
+struct rpcent {
+    char  *r_name;     /* name of server for this RPC program */
+    char **r_aliases;  /* alias list */
+    long   r_number;   /* RPC program number */
+};
+.EE
+.in
+.PP
+この構造体のメンバーは以下の通り。
+.TP 
+\fIr_name\fP
+この RPC プログラムのサーバの名前
+.TP 
+\fIr_aliases\fP
+RPC プログラムの別名のリスト。ゼロで終端されている。
+.TP 
+\fIr_number\fP
+このサービスの RPC プログラム番号。
+.PP
+\fBgetrpcent\fP() はファイルの次のエントリーを読み込む。必要ならばデータベースへの接続がオープンされる。
+.PP
+\fBsetrpcent\fP()  はデータベースへの接続をオープンし、 次の読み込みエントリーを先頭のエントリーに設定する。 \fIstayopen\fP が
+0 でない場合、 一つ一つの \fBgetrpc*\fP()  関数の呼び出し間でデータベースへの接続をクローズしない。
+.PP
+\fBendrpcent\fP()  はデータベースへの接続をクローズする。
+.PP
+\fBgetrpcbyname\fP() と \fBgetrpcbynumber\fP() はファイルの最初から一致する RPC プログラム名かプログラム番号が
+見つかるか、ファイルの最後 (end\-of\-file) に到達するまで、順番に 探していく。
+.SH 返り値
+成功すると、 \fBgetrpcent\fP(), \fBgetrpcbyname\fP(), \fBgetrpcbynumber\fP()  は、静的に割り当てられた
+\fIrpcent\fP 構造体へのポインターを返す。 EOF か エラーに遭遇した場合には NULL を返す。
+.SH ファイル
+.TP 
+\fI/etc/rpc\fP
+RPC プログラム番号データベース
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw28 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBgetrpcent\fP(),
+\fBgetrpcbyname\fP(),
+.br
+\fBgetrpcbynumber\fP()
+T}     Thread safety   MT\-Unsafe
+T{
+\fBsetrpcent\fP(),
+\fBendrpcent\fP()
+T}     Thread safety   MT\-Safe locale
+.TE
+.sp 1
+.SH 準拠
+Not in POSIX.1.  Present on the BSDs, Solaris, and many other systems.
+.SH バグ
+全ての情報は静的領域に格納される。 保存するためには全てをコピーする必要がある。
+.SH 関連項目
+\fBgetrpcent_r\fP(3), \fBrpc\fP(5), \fBrpcinfo\fP(8), \fBypserv\fP(8)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/getrpcent_r.3 b/manual/LDP_man-pages/draft/man3/getrpcent_r.3
new file mode 100644 (file)
index 0000000..63ee47e
--- /dev/null
@@ -0,0 +1,132 @@
+.\" Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"    <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2012  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2012-05-06, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH GETRPCENT_R 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+getrpcent_r, getrpcbyname_r, getrpcbynumber_r \- RPC エントリーを
+取得する (リエントラント版)
+.SH 書式
+.nf
+\fB#include <netdb.h>\fP
+.PP
+\fBint getrpcent_r(struct rpcent *\fP\fIresult_buf\fP\fB, char *\fP\fIbuf\fP\fB,\fP
+\fB                size_t \fP\fIbuflen\fP\fB, struct rpcent **\fP\fIresult\fP\fB);\fP
+.PP
+\fBint getrpcbyname_r(const char *\fP\fIname\fP\fB,\fP
+\fB                struct rpcent *\fP\fIresult_buf\fP\fB, char *\fP\fIbuf\fP\fB,\fP
+\fB                size_t \fP\fIbuflen\fP\fB, struct rpcent **\fP\fIresult\fP\fB);\fP
+.PP
+\fBint getrpcbynumber_r(int \fP\fInumber\fP\fB,\fP
+\fB                struct rpcent *\fP\fIresult_buf\fP\fB, char *\fP\fIbuf\fP\fB,\fP
+\fB                size_t \fP\fIbuflen\fP\fB, struct rpcent **\fP\fIresult\fP\fB);\fP
+.PP
+.fi
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照):
+.ad l
+.RE
+.PP
+\fBgetrpcent_r\fP(),
+\fBgetrpcbyname_r\fP(),
+\fBgetrpcbynumber_r\fP():
+    Since glibc 2.19:
+        _DEFAULT_SOURCE
+    Glibc 2.19 and earlier:
+        _BSD_SOURCE || _SVID_SOURCE
+.ad b
+.SH 説明
+関数 \fBgetrpcent_r\fP(), \fBgetrpcbyname_r\fP(), \fBgetrpcbynumber_r\fP() は、
+それぞれ \fBgetrpcent\fP(3), \fBgetrpcbyname\fP(3), \fBgetrpcbynumber\fP(3) の
+リエントラント版である。
+\fIrpcent\fP 構造体の返し方と、関数呼び出し時の引き数と返り値が異なる。
+このマニュアルページでは、リエントラントでない関数との違いだけを
+説明する。
+.PP
+これらの関数は、関数の結果として静的に割り当てられた \fIrpcent\fP 構造体
+へのポインターを返すのではなく、 \fIrpcent\fP 構造体を \fIresult_buf\fP が
+指す場所にコピーする。
+.PP
+.\" I can find no information on the required/recommended buffer size;
+.\" the nonreentrant functions use a 1024 byte buffer -- mtk.
+配列 \fIbuf\fP は、返される \fIrpcent\fP 構造体が指す文字列フィールドを
+格納するのに使用される (リエントラントでない関数の場合は、
+これらの文字列は静的な領域に格納される)。
+この配列の大きさは \fIbuflen\fP で指定される。
+\fIbuf\fP が小さすぎる場合、関数呼び出しはエラー \fBERANGE\fP で失敗し、
+呼び出し側ではもっと大きなバッファーで再度呼び出す必要がある (ほとんどの
+アプリケーションでは、長さ 1024 バイトのバッファーで十分なはずである)。
+.PP
+関数呼び出しで RPC レコードの取得に成功すると、
+\fI*result\fP は \fIresult_buf\fP を指すように設定される。
+それ以外の場合は \fI*result\fP に NULL が設定される。
+.SH 返り値
+成功すると、これらの関数は 0 を返す。エラーの場合、「エラー」の節の
+リストにある正のエラー番号のいずれかを返す。
+.PP
+エラーの場合、レコードが見つからなかった場合 (\fBgetrpcbyname_r\fP(),
+\fBgetrpcbyaddr_r\fP()) やこれ以上レコードがない場合 (\fBgetrpcent_r\fP())、
+\fIresult\fP には NULL が設定される。
+.SH エラー
+.TP 
+\fBENOENT\fP
+(\fBgetrpcent_r\fP())  データベースにこれ以上レコードがない。
+.TP 
+\fBERANGE\fP
+\fIbuf\fP が小さすぎる。もっと大きなバッファーにして
+(または \fIbuflen\fP を増やして) 再度呼び出すこと。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.ad l
+.TS
+allbox;
+lbw19 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBgetrpcent_r\fP(),
+\fBgetrpcbyname_r\fP(),
+\fBgetrpcbynumber_r\fP()
+T}     Thread safety   MT\-Safe locale
+.TE
+.ad
+.SH 準拠
+これらの関数は GNU による拡張である。
+他のシステムにも同様の名前の関数が存在する場合があるが、
+通常は関数の引き数が異なる。
+.SH 関連項目
+\fBgetrpcent\fP(3), \fBrpc\fP(5)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/getrpcport.3 b/manual/LDP_man-pages/draft/man3/getrpcport.3
new file mode 100644 (file)
index 0000000..1448571
--- /dev/null
@@ -0,0 +1,51 @@
+.\" This page was taken from the 4.4BSD-Lite CDROM (BSD license)
+.\"
+.\" %%%LICENSE_START(BSD_ONELINE_CDROM)
+.\" This page was taken from the 4.4BSD-Lite CDROM (BSD license)
+.\" %%%LICENSE_END
+.\"
+.\" @(#)getrpcport.3r  2.2 88/08/02 4.0 RPCSRC; from 1.12 88/02/26 SMI
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1999 HANATAKA Shinya
+.\"         all rights reserved.
+.\" Translated Tue Jan 11 00:56:31 JST 2000
+.\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
+.\"
+.TH GETRPCPORT 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+getrpcport \- RPC ポート番号を取得する
+.SH 書式
+.nf
+\fB#include <rpc/rpc.h>\fP
+.PP
+\fBint getrpcport(const char *\fP\fIhost\fP\fB, unsigned long \fP\fIprognum\fP\fB,\fP
+\fB               unsigned long \fP\fIversnum\fP\fB, unsigned \fP\fIproto\fP\fB);\fP
+.fi
+.SH 説明
+\fBgetrpcport\fP()  は \fIhost\fP 上で \fIproto\fP プロトコルを使用しているバージョン \fIversnum\fP の RPC
+プログラム \fIprognum\fP のポート番号を返す。 ポートマッパーと連絡が取れない場合や \fIprognum\fP が登録されていない場合には 0
+を返す。 \fIprognum\fP が登録されているが、バージョン \fIversnum\fP
+でない場合にも、そのプログラムが実際に登録されていることを示すために (そのプログラムのバージョンの)ポート番号を返す。
+バージョンの不一致は最初にそのサービスを呼び出した時に検出される。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBgetrpcport\fP()
+T}     Thread safety   MT\-Safe env locale
+.TE
+.sp 1
+.SH 準拠
+Not in POSIX.1.  Present on the BSDs, Solaris, and many other systems.
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/getservent.3 b/manual/LDP_man-pages/draft/man3/getservent.3
new file mode 100644 (file)
index 0000000..af64eb6
--- /dev/null
@@ -0,0 +1,163 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified Sat Jul 24 19:19:11 1993 by Rik Faith (faith@cs.unc.edu)
+.\" Modified Wed Oct 18 20:23:54 1995 by Martin Schulze <joey@infodrom.north.de>
+.\" Modified Mon Apr 22 01:50:54 1996 by Martin Schulze <joey@infodrom.north.de>
+.\" 2001-07-25 added a clause about NULL proto (Martin Michlmayr or David N. Welton)
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1998 NAKANO Takeo all rights reserved.
+.\" Translated Fri Mar 15 1998 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
+.\" Updated Thu 16 Aug 2001 by NAKANO Takeo
+.\" Updated 2008-09-19, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH GETSERVENT 3 2020\-12\-21 GNU "Linux Programmer's Manual"
+.SH 名前
+getservent, getservbyname, getservbyport, setservent, endservent \-
+サービスのエントリーを取得する
+.SH 書式
+.nf
+\fB#include <netdb.h>\fP
+.PP
+\fBstruct servent *getservent(void);\fP
+.PP
+\fBstruct servent *getservbyname(const char *\fP\fIname\fP\fB, const char *\fP\fIproto\fP\fB);\fP
+.PP
+\fBstruct servent *getservbyport(int \fP\fIport\fP\fB, const char *\fP\fIproto\fP\fB);\fP
+.PP
+\fBvoid setservent(int \fP\fIstayopen\fP\fB);\fP
+.PP
+\fBvoid endservent(void);\fP
+.fi
+.SH 説明
+\fBgetservent\fP()  関数はサービスのデータベース (\fBservices\fP(5)  参照) から次のエントリーを読み込み、
+そのエントリーを \fIservent\fP 構造体の要素別のフィールドに格納し、 その構造体を返す。 必要であれば、データベースへの接続がオープンされる。
+.PP
+\fBgetservbyname\fP()  関数は、 プロトコル \fIproto\fP を用いるサービスの名前 \fIname\fP
+にマッチするエントリーをデータベースから探し、 そのエントリーを収めた \fIservent\fP 構造体を返す。 \fIproto\fP が NULL
+の場合は、任意のプロトコルにマッチする。 必要であれば、データベースへの接続がオープンされる。
+.PP
+\fBgetservbyport\fP()  関数は、 プロトコル \fIproto\fP を用いるサービスのポート番号 \fIport\fP
+にマッチするエントリーをデータベースから探し、 そのエントリーの内容を収めた \fIservent\fP 構造体を返す (ポート番号 \fIport\fP
+はネットワークバイトオーダで指定する)。 \fIproto\fP が NULL の場合は任意のプロトコルにマッチする。
+必要であれば、データベースへの接続がオープンされる。
+.PP
+\fBsetservent\fP()  関数はデータベースへの接続をオープンし、 次の読み込みエントリーを先頭のエントリーに設定する。 \fIstayopen\fP
+が 0 でない場合、 一つ一つの \fBgetserv*\fP()  関数の呼び出し間でデータベースへの接続をクローズしない。
+.PP
+\fBendservent\fP()  関数はデータベースへの接続をクローズする。
+.PP
+\fIservent\fP 構造体は \fI<netdb.h>\fP で以下のように定義されている。
+.PP
+.in +4n
+.EX
+struct servent {
+    char  *s_name;       /* official service name */
+    char **s_aliases;    /* alias list */
+    int    s_port;       /* port number */
+    char  *s_proto;      /* protocol to use */
+}
+.EE
+.in
+.PP
+\fIservent\fP 構造体のメンバーは以下の通り。
+.TP 
+\fIs_name\fP
+サービスの正式名 (official name)。
+.TP 
+\fIs_aliases\fP
+サービスの別名のリスト。 リストはヌルで終端される。
+.TP 
+\fIs_port\fP
+サービスのポート番号。ネットワークバイトオーダで指定される。
+.TP 
+\fIs_proto\fP
+このサービスと共に用いるプロトコルの名前。
+.SH 返り値
+The \fBgetservent\fP(), \fBgetservbyname\fP(), and \fBgetservbyport\fP()  functions
+return a pointer to a statically allocated \fIservent\fP structure, or NULL if
+an error occurs or the end of the file is reached.
+.SH ファイル
+.TP 
+\fI/etc/services\fP
+サービスのデータベースファイル
+.SH 属性
+この節で使用されている用語の説明は \fBattributes\fP(7) を参照のこと。
+.TS
+allbox;
+lbw15 lb lbw25
+l l l.
+Interface      Attribute       Value
+T{
+\fBgetservent\fP()
+T}     Thread safety   T{
+MT\-Unsafe race:servent
+.br
+race:serventbuf locale
+T}
+T{
+\fBgetservbyname\fP()
+T}     Thread safety   T{
+MT\-Unsafe race:servbyname
+.br
+locale
+T}
+T{
+\fBgetservbyport\fP()
+T}     Thread safety   T{
+MT\-Unsafe race:servbyport
+.br
+locale
+T}
+T{
+\fBsetservent\fP(),
+.br
+\fBendservent\fP()
+T}     Thread safety   T{
+MT\-Unsafe race:servent
+.br
+locale
+T}
+.TE
+.sp 1
+In the above table, \fIservent\fP in \fIrace:servent\fP signifies that if any of
+the functions \fBsetservent\fP(), \fBgetservent\fP(), or \fBendservent\fP()  are used
+in parallel in different threads of a program, then data races could occur.
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, 4.3BSD.
+.SH 関連項目
+\fBgetnetent\fP(3), \fBgetprotoent\fP(3), \fBgetservent_r\fP(3), \fBservices\fP(5)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/getspnam.3 b/manual/LDP_man-pages/draft/man3/getspnam.3
new file mode 100644 (file)
index 0000000..4b25ae8
--- /dev/null
@@ -0,0 +1,241 @@
+.\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl) and
+.\" Walter Harms (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
+.\" Distributed under GPL
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2004 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated 2004-08-20, Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated 2013-03-25, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2013-07-17, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH GETSPNAM 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+getspnam, getspnam_r, getspent, getspent_r, setspent, endspent,fgetspent,
+fgetspent_r, sgetspent, sgetspent_r, putspent, lckpwdf, ulckpwdf \- shadow
+パスワードファイルのエントリーを取得する
+.SH 書式
+.nf
+/* General shadow password file API */
+\fB#include <shadow.h>\fP
+.PP
+\fBstruct spwd *getspnam(const char *\fP\fIname\fP\fB);\fP
+.PP
+\fBstruct spwd *getspent(void);\fP
+.PP
+\fBvoid setspent(void);\fP
+.PP
+\fBvoid endspent(void);\fP
+.PP
+\fBstruct spwd *fgetspent(FILE *\fP\fIstream\fP\fB);\fP
+.PP
+\fBstruct spwd *sgetspent(const char *\fP\fIs\fP\fB);\fP
+.PP
+\fBint putspent(const struct spwd *\fP\fIp\fP\fB, FILE *\fP\fIstream\fP\fB);\fP
+.PP
+\fBint lckpwdf(void);\fP
+.PP
+\fBint ulckpwdf(void);\fP
+
+/* GNU extension */
+\fB#include <shadow.h>\fP
+.PP
+\fBint getspent_r(struct spwd *\fP\fIspbuf\fP\fB,\fP
+\fB        char *\fP\fIbuf\fP\fB, size_t \fP\fIbuflen\fP\fB, struct spwd **\fP\fIspbufp\fP\fB);\fP
+.PP
+\fBint getspnam_r(const char *\fP\fIname\fP\fB, struct spwd *\fP\fIspbuf\fP\fB,\fP
+\fB        char *\fP\fIbuf\fP\fB, size_t \fP\fIbuflen\fP\fB, struct spwd **\fP\fIspbufp\fP\fB);\fP
+.PP
+\fBint fgetspent_r(FILE *\fP\fIstream\fP\fB, struct spwd *\fP\fIspbuf\fP\fB,\fP
+\fB        char *\fP\fIbuf\fP\fB, size_t \fP\fIbuflen\fP\fB, struct spwd **\fP\fIspbufp\fP\fB);\fP
+.PP
+\fBint sgetspent_r(const char *\fP\fIs\fP\fB, struct spwd *\fP\fIspbuf\fP\fB,\fP
+\fB        char *\fP\fIbuf\fP\fB, size_t \fP\fIbuflen\fP\fB, struct spwd **\fP\fIspbufp\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBgetspent_r\fP(),
+\fBgetspnam_r\fP(),
+\fBfgetspent_r\fP(),
+\fBsgetspent_r\fP():
+    Since glibc 2.19:
+        _DEFAULT_SOURCE
+    Glibc 2.19 and earlier:
+        _BSD_SOURCE || _SVID_SOURCE
+.ad b
+.SH 説明
+昔は暗号化されたパスワードをパスワードファイルに 見えるように公開しておいても安全だと考えられていた。 Julianne Frances Haugh は
+shadow パスワードスイートを実装した。 これは暗号化されたパスワードを、root のみが読むことができる shadow パスワードデータベース
+(例えば、 ローカルの shadow パスワードファイル \fI/etc/shadow\fP, NIS, LDAP)  に保持する。
+.PP
+.\" FIXME . I've commented out the following for the
+.\" moment.  The relationship between PAM and nsswitch.conf needs
+.\" to be clearly documented in one place, which is pointed to by
+.\" the pages for the user, group, and shadow password functions.
+.\" (Jul 2005, mtk)
+.\"
+.\" This shadow password setup has been superseded by PAM
+.\" (pluggable authentication modules), and the file
+.\" .I /etc/nsswitch.conf
+.\" now describes the sources to be used.
+以下で説明する関数は、伝統的なパスワードデータベースに対する 関数に似ている (例えば \fBgetpwnam\fP(3)  や \fBgetpwent\fP(3)
+を参照)。
+.PP
+\fBgetspnam\fP()  関数は、ユーザー名 \fIname\fP にマッチする shadow パスワードデータベースのエントリーを
+要素毎に分解し、各要素を格納した構造体へのポインターを返す。
+.PP
+.\" some systems require a call of setspent() before the first getspent()
+.\" glibc does not
+\fBgetspent\fP()  関数は shadow パスワードデータベースにおける次のエントリーへのポインターを返す。 入力ストリームにおける位置は、
+\fBsetspent\fP()  で初期化される。 読み込みが終わった後に、 \fBendspent\fP()  を呼び出すと、リソースを解放できる。
+.PP
+\fBfgetspent\fP()  関数は \fBgetspent\fP()  に似ているが、 \fBsetspent\fP()
+で暗黙のうちにオープンされるストリームではなく、与えられたストリームを使う。
+.PP
+\fBsgetspent\fP()  関数は与えられた文字列 \fIs\fP を解析し struct \fIspwd\fP に格納する。
+.PP
+\fBputspent\fP()  関数は与えられた struct \fIspwd\fP \fI*p\fP の内容を shadow パスワードファイル形式のテキスト行で
+\fIstream\fP に書き出す。 空文字列として、 値が NULL の文字列エントリーと値が \-1 の数値エントリーが 書き出される。
+.PP
+\fBlckpwdf\fP()  関数は、 shadow パスワードデータベースを 多重同時アクセスから守るためのものである。 この関数はロックの獲得を試み、
+成功した場合は 0 を返す。 失敗した場合 (15 秒以内にロックが取得できなかった場合) は \-1 を返す。 \fBulckpwdf\fP()
+関数はロックを再び解放する。 shadow パスワードファイルへの直接アクセスから 保護する手段がない点に注意すること。 \fBlckpwdf\fP()
+を使うプログラムだけがロックを通知できる。
+.PP
+.\" Also in libc5
+.\" SUN doesn't have sgetspent()
+これらの関数はオリジナルの shadow API を構成していた関数であり、 いろいろなシステムで広く利用可能である。
+.SS リエントラント版
+パスワードデータベースに対するリエントラント版と同じように、 glibc には shadow パスワードファイルに対してリエントラント版がある。
+\fBgetspnam_r\fP()  関数は \fBgetspnam\fP()  と似ているが、取得した shadow パスワード構造体を \fIspbuf\fP
+が指す領域に格納する。 shadow パスワード構造体は文字列群へのポインターを含み、 これらの文字列群はサイズ \fIbuflen\fP のバッファー
+\fIbuf\fP に格納される。 \fI*spbufp\fP には (成功した場合は) 結果へのポインターが格納され、
+(エントリーが見つからなかった場合またはエラーが起こった場合は)  NULL が格納される。
+.PP
+関数 \fBgetspent_r\fP(), \fBfgetspent_r\fP(), \fBsgetspent_r\fP()
+はそれぞれリエントラントでないバージョンと同様の機能を持つ。
+.PP
+.\" SUN doesn't have sgetspent_r()
+glibc でないシステムにもこれらと同じ名前の関数があるが、 プロトタイプが異なることも多い。
+.SS 構造体
+shadow パスワード構造体は \fI<shadow.h>\fP で以下のように定義されている:
+.PP
+.in +4n
+.EX
+struct spwd {
+    char *sp_namp;     /* ログイン名 */
+    char *sp_pwdp;     /* 暗号化されたパスワード */
+    long  sp_lstchg;   /* 最終更新日
+                          (1970\-01\-01 00:00:00 +0000 (UTC)
+                           からの日数) */
+    long  sp_min;      /* 変更が出来るようになるまでの最短日数 */
+    long  sp_max;      /* 変更をしなくてもよい最長日数 */
+    long  sp_warn;     /* パスワードが期限切れになる前に
+                          ユーザーに変更の警告を出す日数 */
+    long  sp_inact;    /* パスワードが期限切れになってから
+                          アカウントが無効になるまでの日数 */
+    long  sp_expire;   /* アカウントが無効になる日付
+                          (1970\-01\-01 00:00:00 +0000 (UTC)
+                           からの日数) */
+    unsigned long sp_flag;  /* 予約フィールド */
+};
+.EE
+.in
+.SH 返り値
+ポインターを返す関数は、これ以上エントリーがない場合や 処理中にエラーが発生した場合 NULL を返す。 \fIint\fP を返り値として持つ関数は、
+成功した場合 0 を返し、失敗した場合、 \-1 を返し、 \fIerrno\fP にエラーの原因を示す値を設定する。
+.PP
+リエントラント版でない関数では、返り値が静的な領域を指しており、 引き続いてこれらの関数を呼び出した場合に上書きされる可能性がある。
+.PP
+リエントラント版の関数は、成功した場合に 0 を返す。 エラーの場合は、エラー番号が返される。
+.SH エラー
+.TP 
+\fBEACCES\fP
+呼び出し元が shadow パスワードファイルにアクセスする許可を持っていない。
+.TP 
+\fBERANGE\fP
+与えられたバッファーが小さすぎる。
+.SH ファイル
+.TP 
+\fI/etc/shadow\fP
+ローカルの shadow パスワードデータベースファイル
+.TP 
+\fI/etc/.pwd.lock\fP
+ロックファイル
+.PP
+インクルードファイル \fI<paths.h>\fP は定数 \fB_PATH_SHADOW\fP を定義している。 これは shadow
+パスワードファイルのパス名である。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw13 lb lbw30
+l l l.
+インターフェース       属性  値
+T{
+\fBgetspnam\fP()
+T}     Thread safety   T{
+MT\-Unsafe race:getspnam locale
+T}
+T{
+\fBgetspent\fP()
+T}     Thread safety   T{
+MT\-Unsafe race:getspent
+.br
+race:spentbuf locale
+T}
+T{
+\fBsetspent\fP(),
+.br
+\fBendspent\fP(),
+.br
+\fBgetspent_r\fP()
+T}     Thread safety   T{
+MT\-Unsafe race:getspent locale
+T}
+T{
+\fBfgetspent\fP()
+T}     Thread safety   MT\-Unsafe race:fgetspent
+T{
+\fBsgetspent\fP()
+T}     Thread safety   MT\-Unsafe race:sgetspent
+T{
+\fBputspent\fP(),
+.br
+\fBgetspnam_r\fP(),
+.br
+\fBsgetspent_r\fP()
+T}     Thread safety   MT\-Safe locale
+T{
+\fBlckpwdf\fP(),
+.br
+\fBulckpwdf\fP(),
+.br
+\fBfgetspent_r\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.sp 1
+In the above table, \fIgetspent\fP in \fIrace:getspent\fP signifies that if any of
+the functions \fBsetspent\fP(), \fBgetspent\fP(), \fBgetspent_r\fP(), or
+\fBendspent\fP()  are used in parallel in different threads of a program, then
+data races could occur.
+.SH 準拠
+The shadow password database and its associated API are not specified in
+POSIX.1.  However, many other systems provide a similar API.
+.SH 関連項目
+\fBgetgrnam\fP(3), \fBgetpwnam\fP(3), \fBgetpwnam_r\fP(3), \fBshadow\fP(5)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/getsubopt.3 b/manual/LDP_man-pages/draft/man3/getsubopt.3
new file mode 100644 (file)
index 0000000..e40cd02
--- /dev/null
@@ -0,0 +1,200 @@
+.\" Copyright (C) 2007 Michael Kerrisk <mtk.manpages@gmail.com>
+.\" and Copyright (C) 2007 Justin Pryzby <pryzbyj@justinpryzby.com>
+.\"
+.\" %%%LICENSE_START(PERMISSIVE_MISC)
+.\" Permission is hereby granted, free of charge, to any person obtaining
+.\" a copy of this software and associated documentation files (the
+.\" "Software"), to deal in the Software without restriction, including
+.\" without limitation the rights to use, copy, modify, merge, publish,
+.\" distribute, sublicense, and/or sell copies of the Software, and to
+.\" permit persons to whom the Software is furnished to do so, subject to
+.\" the following conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+.\" CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+.\" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+.\" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2007  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2007-06-02, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH GETSUBOPT 3 2020\-06\-09 GNU "Linux Programmer's Manual"
+.SH 名前
+getsubopt \- 文字列中のサブオプション引き数の解釈を行う
+.SH 書式
+\fB#include <stdlib.h>\fP
+.PP
+\fBint getsubopt(char **\fP\fIoptionp\fP\fB, char * const *\fP\fItokens\fP\fB, char
+**\fP\fIvaluep\fP\fB);\fP
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBgetsubopt\fP():
+.ad l
+.RS 4
+.PD 0
+.\"    || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
+_XOPEN_SOURCE\ >= 500
+    || /* Since glibc 2.12: */ _POSIX_C_SOURCE\ >=\ 200809L
+.PD
+.RE
+.ad
+.SH 説明
+\fBgetsubopt\fP()  は、 \fIoptionp\fP で与えられたカンマ区切りのサブオプションリストを解析する。
+(このようなサブオプションリストは \fBgetopt\fP(3)  を使ってコマンドラインを解釈した場合に現れることが多い。 例えば、
+\fBmount\fP(8)  の \fI\-o\fP オプションを見るとよい。)  それぞれのサブオプションには対応する値を指定することができる。
+サブオプションの名前と対応する値は等号 (\(aq=\(aq) で区切られる。 例えば、以下のような文字列を \fIoptionp\fP に渡すことができる。
+.PP
+.in +4n
+.EX
+\fBro,name=xyz\fP
+.EE
+.in
+.PP
+\fItokens\fP 引き数はトークンへのポインターの配列へのポインターで、 配列は NULL で終端される。 \fBgetsubopt\fP()
+はこのトークンを \fIoptionp\fP 内で探す。 それぞれのトークンは、NULL 終端された 1文字以上の文字列で、
+他のトークンと区別できる必要がある。 また、等号とカンマを含んではならない。
+.PP
+\fBgetsubopt\fP()  は呼び出されるたびに、 \fIoptionp\fP 中の次の未処理のサブオプションの情報を返す。
+サブオプション内に等号があった場合、最初の等号は そのサブオプションの名前と値の区切りと解釈される。 区切りから次のカンマ
+(最後のサブオプションの場合、文字列の末尾)  までが、サブオプションの値となる。 サブオプションの名前が \fItokens\fP
+内の名前と一致し、値を表す文字列が見つかった場合、 \fBgetsubopt\fP()  は \fI*valuep\fP を値を表す文字列のアドレスに設定する。
+\fIoptionp\fP 中の最初のカンマはヌルバイトで上書きされる。そのため、 \fI*valuep\fP はそのサブオプションの「値の文字列」そのものとなる。
+.PP
+サブオプションが認識されたが、値を表す文字列が見つからなかった場合、 *\fIvaluep\fP は NULL に設定される。
+.PP
+\fBgetsubopt\fP()  が返る時、 \fIoptionp\fP は次のサブオプションを指している。 ちょうど最後のサブオプションが処理された場合は、
+文字列末尾のヌルバイト (\(aq\e0\(aq) を指している。
+.SH 返り値
+\fIoptionp\fP 内でサブオプションが見つかった場合、 \fBgetsubopt\fP()  は最初のサブオプションにマッチする \fItokens\fP
+の要素の添字を返す。 見つからなかった場合、\-1 を返す。この場合、 \fI*valuep\fP は \fIname\fP\fB[=\fP\fIvalue\fP\fB]\fP
+の文字列全体となる。
+.PP
+\fI*optionp\fP は変更されるので、 \fBgetsubopt\fP()  を呼び出す前の最初のサブオプションは \fBgetsubopt\fP()
+を呼び出し後のサブオプションと必ずしも同じとは限らない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBgetsubopt\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+\fBgetsubopt\fP()  は、文字列 *\fIoptionp\fP 中に見つけたカンマを上書きするので、文字列 \fI*optionp\fP
+は書き込み可能でなければならず、 文字列定数にすることはできない。
+.SH EXAMPLES
+以下のプログラムは "\-o" オプションに続いてサブオプションがあることを 期待している。
+.PP
+.EX
+#define _XOPEN_SOURCE 500
+#include <stdlib.h>
+#include <assert.h>
+#include <stdio.h>
+
+int
+main(int argc, char **argv)
+{
+    enum {
+        RO_OPT = 0,
+        RW_OPT,
+        NAME_OPT
+    };
+    char *const token[] = {
+        [RO_OPT]   = "ro",
+        [RW_OPT]   = "rw",
+        [NAME_OPT] = "name",
+        NULL
+    };
+    char *subopts;
+    char *value;
+    int opt;
+
+    int readonly = 0;
+    int readwrite = 0;
+    char *name = NULL;
+    int errfnd = 0;
+
+    while ((opt = getopt(argc, argv, "o:")) != \-1) {
+        switch (opt) {
+        case \(aqo\(aq:
+            subopts = optarg;
+            while (*subopts != \(aq\e0\(aq && !errfnd) {
+
+            switch (getsubopt(&subopts, token, &value)) {
+            case RO_OPT:
+                readonly = 1;
+                break;
+
+            case RW_OPT:
+                readwrite = 1;
+                break;
+
+            case NAME_OPT:
+                if (value == NULL) {
+                    fprintf(stderr, "Missing value for "
+                            "suboption \(aq%s\(aq\en", token[NAME_OPT]);
+                    errfnd = 1;
+                    continue;
+                }
+
+                name = value;
+                break;
+
+            default:
+                fprintf(stderr, "No match found "
+                        "for token: /%s/\en", value);
+                errfnd = 1;
+                break;
+            }
+        }
+        if (readwrite && readonly) {
+            fprintf(stderr, "Only one of \(aq%s\(aq and \(aq%s\(aq can be "
+                    "specified\en", token[RO_OPT], token[RW_OPT]);
+            errfnd = 1;
+        }
+        break;
+
+        default:
+            errfnd = 1;
+        }
+    }
+
+    if (errfnd || argc == 1) {
+        fprintf(stderr, "\enUsage: %s \-o <suboptstring>\en", argv[0]);
+        fprintf(stderr, "suboptions are \(aqro\(aq, \(aqrw\(aq, "
+                "and \(aqname=<value>\(aq\en");
+        exit(EXIT_FAILURE);
+    }
+
+    /* Remainder of program... */
+
+    exit(EXIT_SUCCESS);
+}
+.EE
+.SH 関連項目
+\fBgetopt\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/getttyent.3 b/manual/LDP_man-pages/draft/man3/getttyent.3
new file mode 100644 (file)
index 0000000..dea646c
--- /dev/null
@@ -0,0 +1,87 @@
+.\"  Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
+.\" Distributed under GPL
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2004 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated Fri Aug 20 03:27:22 JST 2004
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\"
+.TH GETTTYENT 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+getttyent, getttynam, setttyent, endttyent \- ttys ファイルのエントリーを取得する
+.SH 書式
+\fB#include <ttyent.h>\fP
+.PP
+\fBstruct ttyent *getttyent(void);\fP
+.PP
+\fBstruct ttyent *getttynam(const char *\fP\fIname\fP\fB);\fP
+.PP
+\fBint setttyent(void);\fP
+.PP
+\fBint endttyent(void);\fP
+.SH 説明
+これらの関数はファイル \fB_PATH_TTYS\fP (例えば \fI/etc/ttys\fP)  へのインターフェースを提供する。
+.PP
+関数 \fBsetttyent\fP()  はファイルをオープンする。 また既にオープンされている場合は、巻き戻す。
+.PP
+関数 \fBendttyent\fP()  はファイルをクローズする。
+.PP
+関数 \fBgetttynam\fP()  は指定された端末名についてファイルを検索する。 この関数は (以下で説明されている)  \fIttyent\fP
+構造体へのポインターを返す。
+.PP
+関数 \fBgetttyent\fP()  は (もし必要であれば) ファイル \fB_PATH_TTYS\fP をオープンし、最初のエントリーを返す。
+ファイルが既にオープンされている場合は、次のエントリーを返す。 \fIttyent\fP 構造体は以下の通りである。
+.PP
+.in +4n
+.EX
+struct ttyent {
+    char *ty_name;     /* 端末デバイス名 */
+    char *ty_getty;    /* 実行するコマンド。通常は getty */
+    char *ty_type;     /* termcap のための端末タイプ */
+    int   ty_status;   /* 状態フラグ */
+    char *ty_window;   /* ウィンドウマネージャを起動するコマンド */
+    char *ty_comment;  /* コメントフィールド */
+};
+.EE
+.in
+.PP
+\fIty_status\fP は以下のいずれか値をとることができる。
+.PP
+.in +4n
+.EX
+#define TTY_ON     0x01  /* ログインを有効にする (ty_getty プログラムを開始する) */
+#define TTY_SECURE 0x02  /* ユーザー ID 0 でのログインを許可する */
+.EE
+.in
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw25 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBgetttyent\fP(),
+\fBsetttyent\fP(),
+\fBendttyent\fP(),
+\fBgetttynam\fP()
+T}     Thread safety   MT\-Unsafe race:ttyent
+.TE
+.SH 準拠
+Not in POSIX.1.  Present on the BSDs, and perhaps other systems.
+.SH 注意
+Linux では、ファイル \fI/etc/ttys\fP と上で説明した関数は使われていない。
+.SH 関連項目
+\fBttyname\fP(3), \fBttyslot\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/glob.3 b/manual/LDP_man-pages/draft/man3/glob.3
new file mode 100644 (file)
index 0000000..5b0e383
--- /dev/null
@@ -0,0 +1,231 @@
+.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" Modified Wed Jul 28 11:12:17 1993 by Rik Faith (faith@cs.unc.edu)
+.\" Modified Mon May 13 23:08:50 1996 by Martin Schulze (joey@linux.de)
+.\" Modified 11 May 1998 by Joseph S. Myers (jsm28@cam.ac.uk)
+.\" Modified 990912 by aeb
+.\" 2007-10-10 mtk
+.\"     Added description of GLOB_TILDE_NOMATCH
+.\"     Expanded the description of various flags
+.\"     Various wording fixes.
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1998 Ken Wakasa all rights reserved.
+.\" Translated 1998-06-24, Ken Wakasa <wakasa@iname.com>
+.\" Updated 1999-01-04, Kentaro Shirakata <argrath@yo.rim.or.jp>
+.\" Updated 2008-02-12, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.77
+.\"
+.TH GLOB 3 2020\-06\-09 GNU "Linux Programmer's Manual"
+.SH 名前
+glob, globfree \- パターンにマッチするパス名を見付ける。glob() によっ て確保されたメモリー領域を解放する。
+.SH 書式
+.nf
+\fB#include <glob.h>\fP
+.PP
+\fBint glob(const char *\fP\fIpattern\fP\fB, int \fP\fIflags\fP\fB,\fP
+\fB         int (*\fP\fIerrfunc\fP\fB) (const char *\fP\fIepath\fP\fB, int \fP\fIeerrno\fP\fB),\fP
+\fB         glob_t *\fP\fIpglob\fP\fB);\fP
+\fBvoid globfree(glob_t *\fP\fIpglob\fP\fB);\fP
+.fi
+.SH 説明
+\fBglob\fP()  関数はシェルが用いているルール (\fBglob\fP(7)  参照) に基づいてパターン \fIpattern\fP
+にマッチするすべてのパス名を検索する。 チルダ (~) の展開やパラメーター置換は行われない。それらを行いたい場合は \fBwordexp\fP(3)
+を使うとよい。
+.PP
+\fBglobfree\fP()  関数は前に呼ばれた \fBglob\fP()  により動的に確保された記憶領域を解放する。
+.PP
+\fBglob\fP()  の結果は \fIpglob\fP がポイントする構造体に返される。 \fIpglob\fP は \fIglob_t\fP 型の構造体である。
+\fIglob_t\fP 型は \fI<glob.h>\fP 内で宣言されており、以下の要素を含んでいる。これらの要素は POSIX.2 で定義
+されている (さらに多くの要素が拡張として入っているかもしれない)。
+.PP
+.in +4n
+.EX
+typedef struct {
+    size_t   gl_pathc;    /* 今までにマッチしたパスの数 */
+    char   **gl_pathv;    /* マッチしたパス名のリスト */
+    size_t   gl_offs;     /* \fIgl_pathv\fP 内に確保するスロット数 */
+} glob_t;
+.EE
+.in
+.PP
+結果は動的に確保された記憶領域に入れられる。
+.PP
+パラメーター \fIflags\fP には以下の示す定数のうち、指定したいものをビットごとの OR で与える (一つも 指定しなくてもよい)。これによって
+\fBglob\fP()  の動作を変更できる。
+.TP 
+\fBGLOB_ERR\fP
+(例えば、ディレクトリに読み取り許可属性が無い場合などで)  読み取りエラーが発生した際に関数から戻る。 デフォルトでは、エラーに関わらず
+読み取り可能なディレクトリを全てについて読み取りを実行しようとする。
+.TP 
+\fBGLOB_MARK\fP
+ディレクトリに対応する各々のパスにスラッシュを付加する。
+.TP 
+\fBGLOB_NOSORT\fP
+返されるパス名のソートを行わない。 ソートを行わない理由は、処理時間を節約するためだけである。 デフォルトでは、返されるパス名はソートされる。
+.TP 
+\fBGLOB_DOOFFS\fP
+\fIpglob\->pathv\fP の文字列リストの先頭に \fIpglob\->gl_offs\fP スロット分の領域を予約する。
+予約されたスロットにはヌルポインターが入る。
+.TP 
+\fBGLOB_NOCHECK\fP
+マッチするパターンがなければ、元のパターンを返す。 デフォルトでは、 \fBglob\fP()  はマッチするパターンがなければ
+\fBGLOB_NOMATCH\fP を返す。
+.TP 
+\fBGLOB_APPEND\fP
+この呼び出しでの結果を直前の \fBglob\fP()  の呼び出しで返された結果のベクトルに追加する。最初の \fBglob\fP()
+の呼び出しの際にはこのフラグを設定してはいけない。
+.TP 
+\fBGLOB_NOESCAPE\fP
+バックスラッシュ (\(aq\e\(aq) をエスケープ用文字として使用できない。 通常は、バックスラッシュを使って、次に続く文字をクォートすることで、
+特別な意味を持つメタキャラクターを無効することができる。
+.PP
+\fIflags\fP には以下に示すものも指定できる。 これらは GNU で拡張されたもので、POSIX.2 では定義されていない。
+.TP 
+\fBGLOB_PERIOD\fP
+先頭のピリオドがメタキャラクターにマッチできるようにする。 デフォルトでは、メタキャラクターは先頭のピリオドにはマッチできない。
+.TP 
+\fBGLOB_ALTDIRFUNC\fP
+ファイルシステムにアクセスする際に、通常のライブラリ関数の代わりに 代替関数 \fIpglob\->gl_closedir\fP,
+\fIpglob\->gl_readdir\fP, \fIpglob\->gl_opendir\fP, \fIpglob\->gl_lstat\fP,
+\fIpglob\->gl_stat\fP が用いられる。
+.TP 
+\fBGLOB_BRACE\fP
+\fB{a,b}\fP という形式の \fBcsh\fP(1)  スタイルの括弧表現を展開する。 括弧表現は入れ子にすることができる。
+したがって、例えば、"{foo/{,cat,dog},bar}" というパターンを 指定した場合に得られる結果は、 4つの文字列 "foo/",
+"foo/cat", "foo/dog", "bar" のそれぞれについて \fBglob\fP()  を呼び出した場合と同じになる。
+.TP 
+\fBGLOB_NOMAGIC\fP
+パターンにメタキャラクターが含まれていない場合、 マッチ結果として指定されたパターンだけを返す。
+パターンで指定された名前のファイルが存在しない場合であっても、 そのパターンが返される。
+.TP 
+\fBGLOB_TILDE\fP
+Carry out tilde expansion.  If a tilde (\(aq\(ti\(aq) is the only character
+in the pattern, or an initial tilde is followed immediately by a slash
+(\(aq/\(aq), then the home directory of the caller is substituted for the
+tilde.  If an initial tilde is followed by a username (e.g.,
+"\(tiandrea/bin"), then the tilde and username are substituted by the home
+directory of that user.  If the username is invalid, or the home directory
+cannot be determined, then no substitution is performed.
+.TP 
+\fBGLOB_TILDE_CHECK\fP
+このフラグを指定すると \fBGLOB_TILDE\fP と同様の振舞いをする。 \fBGLOB_TILDE\fP との違いは、ユーザー名が無効だった場合や
+ホームディレクトリが決定できなかった場合に、 パターン自身を使用するのではなく、 \fBglob\fP()  がエラーを示す \fBGLOB_NOMATCH\fP
+を返すことである。
+.TP 
+\fBGLOB_ONLYDIR\fP
+このフラグは、 \fBglob\fP()  に対する「ヒント」であり、 呼び出し側がパターンにマッチするディレクトリにしか興味がないことを知らせる。
+実装においてファイルの種別情報を簡単に決定できる場合は、ディレクトリでない ファイルは呼び出し側に返されない。しかしながら、呼び出し側では、返された
+ファイルリストがディレクトリかどうかを確認しなければならない。 (このフラグが存在するのは、呼び出し側がディレクトリにしか興味がない際に
+性能を最適化する目的のためだけである。)
+.PP
+\fIerrfunc\fP が NULL でなければ、 エラーが起こった場合には関数 \fIerrfunc\fP が呼び出される。関数の引数には、失敗したパス名
+\fIepath\fP と \fIerrno\fP (\fBopendir\fP(3), \fBreaddir\fP(3), \fBstat\fP(2).
+のいずれかによってセットされた値) が与えられる。 \fIerrfunc\fP が 0 以外の値を返すかもしくは \fBGLOB_ERR\fP がセットされた場合
+\fBglob\fP()  は \fIerrfunc\fP の呼び出し後に終了する。
+.PP
+呼び出しが成功して戻った場合 \fIpglob\->gl_pathc\fP にはマッチしたパス名が含まれ、 \fIpglob\->gl_pathv\fP
+はマッチしたパス名へのポインターのリストへのポインターとなる。 ポインターのリストはヌルポインターで終端される。
+.PP
+\fBglob\fP()  を何度か続けて呼び出すことができる。その際2回目以降の呼び出しでは \fBGLOB_APPEND\fP フラグが \fIflags\fP
+に設定されていなければならない。
+.PP
+GNU の拡張として、 \fIpglob\->gl_flags\fP には指定したフラグがセットされる。もし一つでもメタキャラクターが見付かれば
+このフラグと \fBGLOB_MAGCHAR\fP との \fBOR\fP を取った結果がセットされる。
+.SH 返り値
+呼び出しが成功して完了すると \fBglob\fP()  は 0 を返す。 それ以外の返り値は以下の通り:
+.TP 
+\fBGLOB_NOSPACE\fP
+メモリーを使い果たした
+.TP 
+\fBGLOB_ABORTED\fP
+読み取りエラー
+.TP 
+\fBGLOB_NOMATCH\fP
+一つもマッチしなかった
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lbw24
+l l l.
+インターフェース       属性  値
+T{
+\fBglob\fP()
+T}     Thread safety   T{
+MT\-Unsafe race:utent env
+.br
+sig:ALRM timer locale
+T}
+T{
+\fBglobfree\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.sp 1
+In the above table, \fIutent\fP in \fIrace:utent\fP signifies that if any of the
+functions \fBsetutent\fP(3), \fBgetutent\fP(3), or \fBendutent\fP(3)  are used in
+parallel in different threads of a program, then data races could occur.
+\fBglob\fP()  calls those functions, so we use race:utent to remind users.
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, POSIX.2.
+.SH 注意
+glibc 2.1 では、 \fIgl_pathc\fP と \fIgl_offs\fP は POSIX.2 で指定されているように \fIsize_t\fP
+として宣言されている。 glibc 2.0 では、 \fIint\fP として宣言されている。
+.SH バグ
+\fBglob\fP()  関数はその中で呼び出している \fBmalloc\fP(3)  や \fBopendir\fP(3)
+などの関数の呼び出しで失敗が起こると失敗する。 これにより \fIerrno\fP にそのエラーコードが入る。
+.SH EXAMPLES
+使用法の一例を以下に示す。以下はシェルで
+.PP
+.in +4n
+.EX
+ls \-l *.c ../*.c
+.EE
+.in
+.PP
+をタイプした場合をシミュレートしている。
+.PP
+.in +4n
+.EX
+glob_t globbuf;
+
+globbuf.gl_offs = 2;
+glob("*.c", GLOB_DOOFFS, NULL, &globbuf);
+glob("../*.c", GLOB_DOOFFS | GLOB_APPEND, NULL, &globbuf);
+globbuf.gl_pathv[0] = "ls";
+globbuf.gl_pathv[1] = "\-l";
+execvp("ls", &globbuf.gl_pathv[0]);
+.EE
+.in
+.SH 関連項目
+\fBls\fP(1), \fBsh\fP(1), \fBstat\fP(2), \fBexec\fP(3), \fBfnmatch\fP(3), \fBmalloc\fP(3),
+\fBopendir\fP(3), \fBreaddir\fP(3), \fBwordexp\fP(3), \fBglob\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/gnu_get_libc_version.3 b/manual/LDP_man-pages/draft/man3/gnu_get_libc_version.3
new file mode 100644 (file)
index 0000000..4e3cf7c
--- /dev/null
@@ -0,0 +1,96 @@
+.\" Copyright (c) 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2008  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2008-08-21, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.04
+.\"
+.TH GNU_GET_LIBC_VERSION 3 2020\-06\-09 Linux "Linux Programmer's Manual"
+.SH 名前
+gnu_get_libc_version, gnu_get_libc_release \- glibc のバージョンと リリース状態を取得する
+.SH 書式
+.nf
+\fB#include <gnu/libc\-version.h>\fP
+.PP
+\fBconst char *gnu_get_libc_version(void);\fP
+\fBconst char *gnu_get_libc_release(void);\fP
+.fi
+.SH 説明
+\fBgnu_get_libc_version\fP()  関数は、システムで利用可能な glibc のバージョンを特定する文字列を返す。
+.PP
+\fBgnu_get_libc_release\fP()  関数は、システムで利用可能な glibc バージョンのリリース状態を示す 文字列を返す。
+\fIstable\fP といった文字列が返される。
+.SH バージョン
+これらの関数は glibc バージョン 2.1 で初めて登場した。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw23 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBgnu_get_libc_version\fP(),
+\fBgnu_get_libc_release\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+これらの関数は glibc 固有である。
+.SH EXAMPLES
+下記のプログラムを実行すると、次のような出力が得られる。
+.PP
+.in +4n
+.EX
+$\fB ./a.out\fP
+GNU libc version: 2.8
+GNU libc release: stable
+.EE
+.in
+.SS プログラムのソース
+\&
+.EX
+#include <gnu/libc\-version.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+int
+main(int argc, char *argv[])
+{
+    printf("GNU libc version: %s\en", gnu_get_libc_version());
+    printf("GNU libc release: %s\en", gnu_get_libc_release());
+    exit(EXIT_SUCCESS);
+}
+.EE
+.SH 関連項目
+\fBconfstr\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/gsignal.3 b/manual/LDP_man-pages/draft/man3/gsignal.3
new file mode 100644 (file)
index 0000000..52b0e6a
--- /dev/null
@@ -0,0 +1,100 @@
+.\" Copyright (C) 2002 Andries Brouwer <aeb@cwi.nl>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" This replaces an earlier man page written by Walter Harms
+.\" <walter.harms@informatik.uni-oldenburg.de>.
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2002 Akihiro MOTOKI, all rights reserved.
+.\" Translated Mon Feb  2 2003 by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH GSIGNAL 3 2020\-04\-11 "" "Linux Programmer's Manual"
+.SH 名前
+gsignal, ssignal \- ソフトウェアシグナル機能
+.SH 書式
+.nf
+\fB#include <signal.h>\fP
+.PP
+\fBtypedef void (*sighandler_t)(int);\fP
+.PP
+\fBint gsignal(int \fP\fIsignum\fP\fB);\fP
+.PP
+\fBsighandler_t ssignal(int \fP\fIsignum\fP\fB, sighandler_t \fP\fIaction\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBgsignal\fP(),
+\fBssignal\fP():
+    Since glibc 2.19:
+        _DEFAULT_SOURCE
+    Glibc 2.19 and earlier:
+        _SVID_SOURCE
+.SH 説明
+Linux ではこれらの関数を使用しないこと。 過去に間違いがあり、Linux では \fBgsignal\fP()  と \fBssignal\fP()
+はそれぞれ \fBraise\fP(3)  と \fBsignal\fP(2)  の別名になっている。
+.PP
+Elsewhere, on System V\-like systems, these functions implement software
+signaling, entirely independent of the classical \fBsignal\fP(2)  and
+\fBkill\fP(2)  functions.  The function \fBssignal\fP()  defines the action to
+take when the software signal with number \fIsignum\fP is raised using the
+function \fBgsignal\fP(), and returns the previous such action or \fBSIG_DFL\fP.
+The function \fBgsignal\fP()  does the following: if no action (or the action
+\fBSIG_DFL\fP)  was specified for \fIsignum\fP, then it does nothing and returns
+0.  If the action \fBSIG_IGN\fP was specified for \fIsignum\fP, then it does
+nothing and returns 1.  Otherwise, it resets the action to \fBSIG_DFL\fP and
+calls the action function with argument \fIsignum\fP, and returns the value
+returned by that function.  The range of possible values \fIsignum\fP varies
+(often 1\(en15 or 1\(en17).
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBgsignal\fP()
+T}     Thread safety   MT\-Safe
+T{
+\fBssignal\fP()
+T}     Thread safety   MT\-Safe sigintr
+.TE
+.sp 1
+.SH 準拠
+.\" Linux libc and
+These functions are available under AIX, DG/UX, HP\-UX, SCO, Solaris, Tru64.
+They are called obsolete under most of these systems, and are broken under
+glibc.  Some systems also have \fBgsignal_r\fP()  and \fBssignal_r\fP().
+.SH 関連項目
+\fBkill\fP(2), \fBsignal\fP(2), \fBraise\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/hsearch.3 b/manual/LDP_man-pages/draft/man3/hsearch.3
new file mode 100644 (file)
index 0000000..4176343
--- /dev/null
@@ -0,0 +1,240 @@
+.\" Copyright 1993 Ulrich Drepper (drepper@karlsruhe.gmd.de)
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
+.\" This is free documentation; you can redistribute it and/or
+.\" modify it under the terms of the GNU General Public License as
+.\" published by the Free Software Foundation; either version 2 of
+.\" the License, or (at your option) any later version.
+.\"
+.\" The GNU General Public License's references to "object code"
+.\" and "executables" are to be interpreted as the output of any
+.\" document formatting or typesetting system, including
+.\" intermediate and printed output.
+.\"
+.\" This manual is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public
+.\" License along with this manual; if not, see
+.\" <http://www.gnu.org/licenses/>.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     SunOS 4.1.1 man pages
+.\" Modified Sat Sep 30 21:52:01 1995 by Jim Van Zandt <jrv@vanzandt.mv.com>
+.\" Remarks from dhw@gamgee.acad.emich.edu Fri Jun 19 06:46:31 1998
+.\" Modified 2001-12-26, 2003-11-28, 2004-05-20, aeb
+.\" 2008-09-02, mtk: various additions and rewrites
+.\" 2008-09-03, mtk, restructured somewhat, in part after suggestions from
+.\"     Timothy S. Nelson <wayland@wayland.id.au>
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1998 George Momma,
+.\"     Copyright (c) 2001-2005 Yuichi SATO,
+.\"     and Copyright (c) 2008 Akihiro MOTOKI
+.\" Translated 1998-05-23, George Momma <momma@wakhok.ac.jp>
+.\" Updated & Modified 2001-10-15, Yuichi SATO <ysato@h4.dion.ne.jp>
+.\" Updated & Modified 2002-01-03, Yuichi SATO
+.\" Updated & Modified 2004-01-17, Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated & Modified 2005-01-10, Yuichi SATO
+.\" Updated 2008-09-20, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH HSEARCH 3 2020\-11\-01 GNU "Linux Programmer's Manual"
+.SH 名前
+hcreate, hdestroy, hsearch, hcreate_r, hdestroy_r, hsearch_r \- ハッシュテーブルの管理
+.SH 書式
+.nf
+\fB#include <search.h>\fP
+.PP
+\fBint hcreate(size_t \fP\fInel\fP\fB);\fP
+.PP
+\fBENTRY *hsearch(ENTRY \fP\fIitem\fP\fB, ACTION \fP\fIaction\fP\fB);\fP
+.PP
+\fBvoid hdestroy(void);\fP
+.PP
+\fB#define _GNU_SOURCE\fP         /* See feature_test_macros(7) */
+\fB#include <search.h>\fP
+.PP
+\fBint hcreate_r(size_t \fP\fInel\fP\fB, struct hsearch_data *\fP\fIhtab\fP\fB);\fP
+.PP
+\fBint hsearch_r(ENTRY \fP\fIitem\fP\fB, ACTION \fP\fIaction\fP\fB, ENTRY **\fP\fIretval\fP\fB,\fP
+\fB              struct hsearch_data *\fP\fIhtab\fP\fB);\fP
+.PP
+\fBvoid hdestroy_r(struct hsearch_data *\fP\fIhtab\fP\fB);\fP
+.fi
+.SH 説明
+\fBhcreate\fP(), \fBhsearch\fP(), \fBhdestroy\fP()  の 3 つの関数を利用すると、キー (文字列)
+と対応するデータから構成される エントリーを格納できるハッシュ検索テーブルを作成、管理することができる。
+これらの関数を使って、一度に使用できるのは一つのハッシュテーブルだけである。
+.PP
+\fBhcreate_r\fP(), \fBhsearch_r\fP(), \fBhdestroy_r\fP()  の 3
+つの関数はリエントラント版で、これらを利用すると、 一つのプログラムで同時に複数のハッシュテーブルを使うことができる。 最後の引き数 \fIhtab\fP
+は関数の操作対象となるテーブルを示す構造体へのポインターである。 プログラマはこの構造体をブラックボックスとして扱うべきである
+(つまり、この構造体のフィールドに直接アクセスしたり変更したり しないこと)。
+.PP
+.\" e.g., in glibc it is raised to the next higher prime number
+最初に、 \fBhcreate\fP()  関数によってハッシュテーブルを作成しなければならない。 引き数 \fInel\fP
+でテーブルの最大エントリー数を指定する (この最大値は後で変更することはできないので、よく考えて選択すること)。
+作成されるハッシュテーブルの性能を向上させるために、 関数内部の実装によりこの値は増やされる場合もある。
+.PP
+\fBhcreate_r\fP()  関数は \fBhcreate\fP()  と同じ動作をするが、構造体 \fI*htab\fP
+で示されるテーブルを対象として動作する。 \fIhtab\fP が指し示す構造体は、 \fBhcreate_r\fP()  を初めて呼び出す前に 0
+で埋めておかなければならない。
+.PP
+The function \fBhdestroy\fP()  frees the memory occupied by the hash table that
+was created by \fBhcreate\fP().  After calling \fBhdestroy\fP(), a new hash table
+can be created using \fBhcreate\fP().  The \fBhdestroy_r\fP()  function performs
+the analogous task for a hash table described by \fI*htab\fP, which was
+previously created using \fBhcreate_r\fP().
+.PP
+\fBhsearch\fP()  関数は、\fIitem\fP と同じキーを持つ項目をハッシュテーブルから
+検索し、項目が見つかった場合にはその項目へのポインターを返す (「同じ」かどうかは \fBstrcmp\fP(3)  を使って判定する)。
+.PP
+引き数 \fIitem\fP は \fBENTRY\fP 型であり、\fI<search.h>\fP の中で 以下のように定義されている。
+.PP
+.in +4n
+.EX
+typedef struct entry {
+    char *key;
+    void *data;
+} ENTRY;
+.EE
+.in
+.PP
+フィールド \fIkey\fP は検索キーとなるヌル終端された文字列を指す。 フィールド \fIdata\fP は、このキーに対応するデータを指す。
+.PP
+検索が失敗した後の動作は、引き数 \fIaction\fP により決まる。 この引き数には \fBENTER\fP か \fBFIND\fP
+のいずれかの値を指定しなければならない。 \fBENTER\fP は \fIitem\fP のコピーを挿入することを
+(関数の結果として新しいハッシュテーブルエントリーへのポインターを返す)、 \fBFIND\fP は NULL を返すことを意味する (\fIaction\fP が
+\fBFIND\fP の場合、 \fIdata\fP は無視される)。
+.PP
+\fBhsearch_r\fP()  関数は \fBhsearch\fP()  と同様だが、 \fI*htab\fP で示されるハッシュテーブルに対して処理を行う。
+\fBhsearch_r\fP()  関数が \fBhsearch\fP()  と異なるのは、見つかった項目へのポインターを、 関数の結果としてではなく、
+\fI*retval\fP に格納して返す点である。
+.SH 返り値
+\fBhcreate\fP()  と \fBhcreate_r\fP()  は、成功した場合 0 以外の値を返す。 エラーの場合 0 を返し、 \fIerrno\fP
+にエラーの原因を示す値を設定する。
+.PP
+成功すると、 \fBhsearch\fP()  は、ハッシュテーブル内のエントリーへのポインターを返す。 エラーの場合、 \fBhsearch\fP()  は
+NULL を返す。 エラーとなるのは、 \fIaction\fP が \fBENTER\fP でハッシュテーブルがいっぱいの場合か、 \fIaction\fP が
+\fBFIND\fP で \fIitem\fP がハッシュテーブル内に 見つからない場合である。 \fBhsearch_r\fP()  は、成功すると 0
+以外を返し、エラーの場合 0 を返す。 エラーの場合、 これら二つの関数は \fIerrno\fP にエラーの原因を示す値を設定する。
+.SH エラー
+\fBhcreate_r\fP()  と \fBhdestroy_r\fP()  は以下の理由で失敗する可能性がある。
+.TP 
+\fBEINVAL\fP
+\fIhtab\fP が NULL である。
+.PP
+\fBhsearch\fP()  と \fBhsearch_r\fP()  は以下の理由で失敗する可能性がある。
+.TP 
+\fBENOMEM\fP
+\fIaction\fP が \fBENTER\fP で、 \fIkey\fP がテーブル内に見つからず、 テーブルに新しいエントリーを追加する余地がなかった。
+.TP 
+\fBESRCH\fP
+\fIaction\fP が \fBFIND\fP で、 \fIkey\fP がテーブル内に見つからなかった。
+.PP
+.\" PROX.1-2001, POSIX.1-2008
+POSIX.1 specifies only the \fBENOMEM\fP error.
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw25 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBhcreate\fP(),
+\fBhsearch\fP(),
+.br
+\fBhdestroy\fP()
+T}     Thread safety   MT\-Unsafe race:hsearch
+T{
+\fBhcreate_r\fP(),
+\fBhsearch_r\fP(),
+.br
+\fBhdestroy_r\fP()
+T}     Thread safety   MT\-Safe race:htab
+.TE
+.SH 準拠
+The functions \fBhcreate\fP(), \fBhsearch\fP(), and \fBhdestroy\fP()  are from SVr4,
+and are described in POSIX.1\-2001 and POSIX.1\-2008.
+.PP
+The functions \fBhcreate_r\fP(), \fBhsearch_r\fP(), and \fBhdestroy_r\fP()  are GNU
+extensions.
+.SH 注意
+通常、ハッシュテーブルの実装は、衝突を最小限にするために テーブルに十分な空き領域がある場合に効率がよくなる。 このため、普通は、 \fInel\fP
+を、呼び出し側がテーブルに格納しようと思っている エントリーの最大数より少なくとも 25% は大きな値にすべきである。
+.PP
+\fBhdestroy\fP()  と \fBhdestroy_r\fP()  は、ハッシュテーブルのエントリーの要素である \fIkey\fP と \fIdata\fP
+が指すバッファーを解放しない (これができないのは、これらのバッファーが動的に割り当てられたのかを 知ることができないからである)。
+これらのバッファーを解放する必要がある場合、 プログラムでは、これらのバッファーを解放できるように管理用のデータ構造を
+設けて、これを管理しなければならない (解放が必要となる理由は、たいていは、プログラム自身と生存期間が同じ
+ハッシュテーブルを一つだけ作成するのではなく、そのプログラムでは複数の ハッシュテーブルを繰り返して作成したり破棄したりするからであろう)。
+.SH バグ
+SVr4 と POSIX.1\-2001 の規定では、 \fIaction\fP は検索が失敗したときにだけ意味を持つとなっている。
+よって、検索が成功した場合、\fIaction\fP の値が \fBENTER\fP でも 何もすべきではない。 (バージョン 2.3 より前の) libc と
+glibc の実装はこの規格に違反しており、 この状況で、指定された \fIkey\fP に対応する \fIdata\fP が更新される。
+.PP
+ハッシュテーブルエントリーの追加はできるが、削除ができない。
+.SH EXAMPLES
+次のプログラムは、ハッシュテーブルに 24 個の項目を挿入し、 それからそのうちのいくつかを表示する。
+.PP
+.EX
+#include <stdio.h>
+#include <stdlib.h>
+#include <search.h>
+
+static char *data[] = { "alpha", "bravo", "charlie", "delta",
+     "echo", "foxtrot", "golf", "hotel", "india", "juliet",
+     "kilo", "lima", "mike", "november", "oscar", "papa",
+     "quebec", "romeo", "sierra", "tango", "uniform",
+     "victor", "whisky", "x\-ray", "yankee", "zulu"
+};
+
+int
+main(void)
+{
+    ENTRY e;
+    ENTRY *ep;
+
+    hcreate(30);
+
+    for (int i = 0; i < 24; i++) {
+        e.key = data[i];
+        /* data is just an integer, instead of a
+           pointer to something */
+        e.data = (void *) i;
+        ep = hsearch(e, ENTER);
+        /* there should be no failures */
+        if (ep == NULL) {
+            fprintf(stderr, "entry failed\en");
+            exit(EXIT_FAILURE);
+        }
+    }
+
+    for (int i = 22; i < 26; i++) {
+        /* print two entries from the table, and
+           show that two are not in the table */
+        e.key = data[i];
+        ep = hsearch(e, FIND);
+        printf("%9.9s \-> %9.9s:%d\en", e.key,
+               ep ? ep\->key : "NULL", ep ? (int)(ep\->data) : 0);
+    }
+    hdestroy();
+    exit(EXIT_SUCCESS);
+}
+.EE
+.SH 関連項目
+\fBbsearch\fP(3), \fBlsearch\fP(3), \fBmalloc\fP(3), \fBtsearch\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/hypot.3 b/manual/LDP_man-pages/draft/man3/hypot.3
new file mode 100644 (file)
index 0000000..e9bd67c
--- /dev/null
@@ -0,0 +1,141 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 2002-07-27 by Walter Harms
+.\"    (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1996 Kenji Kajiwara
+.\"         all rights reserved.
+.\" Translated Mon Jul 15 18:20:00 JST 1996
+.\"         by Kenji Kajiwara
+.\" Proof Reading: Takashi Yoshino
+.\" Updated & Modified Sun Jun  6 05:30:45 JST 2004
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated & Modified Sat Jan 15 02:32:55 JST 2005 by Yuichi SATO
+.\" Updated 2008-09-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH HYPOT 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+hypot, hypotf, hypotl \- ユークリッド距離関数
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBdouble hypot(double \fP\fIx\fP\fB, double \fP\fIy\fP\fB);\fP
+\fBfloat hypotf(float \fP\fIx\fP\fB, float \fP\fIy\fP\fB);\fP
+\fBlong double hypotl(long double \fP\fIx\fP\fB, long double \fP\fIy\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBhypot\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || _XOPEN_SOURCE
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.br
+\fBhypotf\fP(), \fBhypotl\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad b
+.SH 説明
+These functions return sqrt(\fIx\fP*\fIx\fP+\fIy\fP*\fIy\fP).  This is the length of the
+hypotenuse of a right\-angled triangle with sides of length \fIx\fP and \fIy\fP, or
+the distance of the point (\fIx\fP,\fIy\fP)  from the origin.
+.PP
+.\" e.g., hypot(DBL_MIN, DBL_MIN) does the right thing, as does, say
+.\" hypot(DBL_MAX/2.0, DBL_MAX/2.0).
+計算の中間ステップでは、必要以上のオーバーフローやアンダーフローが 起きないようにして計算が実行される。
+.SH 返り値
+On success, these functions return the length of the hypotenuse of a
+right\-angled triangle with sides of length \fIx\fP and \fIy\fP.
+.PP
+\fIx\fP か \fIy\fP が無限大の場合、正の無限大が返される。
+.PP
+\fIx\fP か \fIy\fP の一方が NaN で、もう一方が無限大でない場合、 NaN が返される。
+.PP
+結果がオーバーフローする場合、範囲エラー (range error) が発生し、 各関数はそれぞれ \fBHUGE_VAL\fP, \fBHUGE_VALF\fP,
+\fBHUGE_VALL\fP を返す。
+.PP
+.\" Actually, could the result not be subnormal if both arguments
+.\" are subnormal?  I think not -- mtk, Jul 2008
+両方の引き数が非正規化数 (subnormal) で、結果も非正規化数 (subnormal) の場合、 範囲エラーが発生し、正しい結果が返される。
+.SH エラー
+これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
+.PP
+以下のエラーが発生する可能性がある。
+.TP 
+範囲エラー (range error): 結果のオーバーフロー
+\fIerrno\fP に \fBERANGE\fP が設定される。 オーバーフロー浮動小数点例外 (\fBFE_OVERFLOW\fP)  が上がる。
+.TP 
+範囲エラー (range error): 結果のアンダーフロー
+アンダーフロー浮動小数点例外 (\fBFE_UNDERFLOW\fP)  が上がる。
+.IP
+.\" This is intentional; see
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6795
+これらの関数は、この場合に \fIerrno\fP を設定しない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw27 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBhypot\fP(),
+\fBhypotf\fP(),
+\fBhypotl\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.sp 1
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.PP
+The variant returning \fIdouble\fP also conforms to SVr4, 4.3BSD.
+.SH 関連項目
+\fBcabs\fP(3), \fBsqrt\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/iconv.3 b/manual/LDP_man-pages/draft/man3/iconv.3
new file mode 100644 (file)
index 0000000..8aa2d35
--- /dev/null
@@ -0,0 +1,140 @@
+.\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
+.\"
+.\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA)
+.\" This is free documentation; you can redistribute it and/or
+.\" modify it under the terms of the GNU General Public License as
+.\" published by the Free Software Foundation; either version 2 of
+.\" the License, or (at your option) any later version.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"   GNU glibc-2 source code and manual
+.\"   OpenGroup's Single UNIX specification
+.\"    http://www.UNIX-systems.org/online.html
+.\"
+.\" 2000-06-30 correction by Yuichi SATO <sato@complex.eng.hokudai.ac.jp>
+.\" 2000-11-15 aeb, fixed prototype
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2000 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated 2000-07-11, Yuichi SATO <sato@complex.eng.hokudai.ac.jp>
+.\" Updated 2008-09-14, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.09
+.\" Updated 2012-05-30, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH ICONV 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+iconv \- 文字セット変換を行う
+.SH 書式
+.nf
+\fB#include <iconv.h>\fP
+.PP
+\fBsize_t iconv(iconv_t \fP\fIcd\fP\fB,\fP
+\fB             char **\fP\fIinbuf\fP\fB, size_t *\fP\fIinbytesleft\fP\fB,\fP
+\fB             char **\fP\fIoutbuf\fP\fB, size_t *\fP\fIoutbytesleft\fP\fB);\fP
+.fi
+.SH 説明
+\fBiconv\fP() 関数は、ある文字エンコーディングの文字シーケンス列を別の文字
+エンコーディングの文字シーケンスに変換する。\fIcd\fP 引き数は変換ディスク
+リプタ (conversion descriptor) であり、以前は \fBiconv_open\fP(3) を呼び出
+すことで生成されていた。変換ディスクリプターは \fBiconv\fP() が変換に使用す
+る文字エンコーディングを定義するものである。 \fIinbuf\fP 引き数は入力シー
+ケンスの先頭バイトを指す変数のアドレスであり、\fIinbytesleft\fP は入力シー
+ケンスのバッファーのバイト数を示す。\fIoutbuf\fP 引き数は出力バッファーで利用
+できる先頭バイトを指す変数のアドレスであり、 \fIoutbytesleft\fP は出力
+バッファーのバイト数を示す。
+.PP
+主に使われるのは、 「\fIinbuf\fP が NULL でなく、かつ \fI*inbuf\fP が NULL でない」 という場合である。 この場合、
+\fBiconv\fP()  関数は、 \fI*inbuf\fP で始まるマルチバイト文字列を \fI*outbuf\fP で始まるマルチバイト文字列に変換する。
+\fI*inbuf\fP を先頭として最大 \fI*inbytesleft\fP バイトが読み込まれ、 \fI*outbuf\fP を先頭として最大
+\fI*outbytesleft\fP バイトが書き出される。
+.PP
+\fBiconv\fP()  関数は 1 度に 1 つのマルチバイト文字を変換する。 そして、各文字変換毎に、変換された入力バイトの数だけ \fI*inbuf\fP
+を増加させ、\fI*inbytesleft\fP を減少させる。 また、変換された出力バイトの数だけ \fI*outbuf\fP
+を増加させ、\fI*outbytesleft\fP を減少させる。 さらに、\fIcd\fP に含まれる変換状態を更新する。
+入力の文字エンコーディングがが状態を持つ場合、 \fBiconv\fP()  関数は入力バイトの列に対して変換にも対応しており、
+バイト出力を伴わずに変換状態を更新することができる。 変換は、次の 4 つの場合に停止する。
+.IP 1. 3
+入力に無効なマルチバイト文字列があった場合。この場合、
+関数は \fIerrno\fP を \fBEILSEQ\fP に設定し、 \fI(size_t)\ \-1\fP を返す。
+\fI*inbuf\fP は、無効なマルチバイト文字列の先頭を指したままになる。
+.IP 2.
+入力バイト文字列が完全に変換され、\fI*inbytesleft\fP が 0 になった場合。
+この場合、 \fBiconv\fP() は呼出しの間に非可逆変換が行われた回数を返す。
+.IP 3.
+入力に不完全なマルチバイト文字列があり、入力バイト文字列がその後で終了
+している場合。この場合、関数は、\fIerrno\fP を \fBEINVAL\fP に設定し、
+\fI(size_t)\ \-1\fP を返す。 \fI*inbuf\fP は、不完全なマルチバイト文字列の先頭
+を指したままにされる。
+.IP 4.
+出力バッファーに次の変換された文字列のための空きがない場合。 この場合、
+\fIerrno\fP が \fBE2BIG\fP に設定され、 \fI(size_t)\ \-1\fP が返される。
+.PP
+別のケースとしては、 「\fIinbuf\fP が NULL、または \fI*inbuf\fP が NULL である。 しかし、\fIoutbuf\fP が NULL
+でなく、かつ \fI*outbuf\fP が NULL でない」 という場合がある。 この場合、 \fBiconv\fP()  関数は、\fIcd\fP
+の変換状態を初期状態にして、 対応するシフト文字列を \fI*outbuf\fP に保存しようとする。 最大 \fI*outbytesleft\fP
+バイトが、\fI*outbuf\fP を始めとして書き出される。 このリセットされた文字列に対して、出力バッファーに空きがない場合、 この関数は
+\fIerrno\fP を \fBE2BIG\fP に設定し、 \fI(size_t)\ \-1\fP を返す。 それ以外の場合、この関数は、書き込まれたバイトの数だけ
+\fI*outbuf\fP を増加させ、\fI*outbytesleft\fP を減少させる。
+.PP
+3 番目のケースしては、 「\fIinbuf\fP が NULL、または \fI*inbuf\fP が NULL である。 かつ、\fIoutbuf\fP が
+NULL、または \fI*outbuf\fP が NULL である」 という場合がある。 この場合、 \fBiconv\fP()  関数は、\fIcd\fP
+の変換状態を初期状態にする。
+.SH 返り値
+\fBiconv\fP()  関数は、呼出しの間に非可逆な方法で変換された文字数を返す。 つまり、可逆変換はカウントされない。 エラーの場合、この関数は
+\fIerrno\fP を設定し、 \fI(size_t)\ \-1\fP を返す。
+.SH エラー
+他のいろいろなエラーのうちから、以下のエラーが起こりうる。
+.TP 
+\fBE2BIG\fP
+\fI*outbuf\fP に十分な空きがない。
+.TP 
+\fBEILSEQ\fP
+入力に無効なマルチバイト文字列があった。
+.TP 
+\fBEINVAL\fP
+入力に不完全なマルチバイト文字列があった。
+.SH バージョン
+この関数はバージョン 2.1 以降の glibc で利用可能である。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBiconv\fP()
+T}     Thread safety   MT\-Safe race:cd
+.TE
+.PP
+The \fBiconv\fP()  function is MT\-Safe, as long as callers arrange for mutual
+exclusion on the \fIcd\fP argument.
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+In each series of calls to \fBiconv\fP(), the last should be one with \fIinbuf\fP
+or \fI*inbuf\fP equal to NULL, in order to flush out any partially converted
+input.
+.PP
+\fIinbuf\fP と \fIoutbuf\fP は \fIchar\ **\fP 型だが、これらの変数が指す
+オブジェクトが C の文字列、つまり文字の配列として解釈されることを意味
+するわけではない。文字バイトシーケンスの解釈は変換関数の内部で行われる。
+エンコーディングによっては、バイト 0 もマルチバイト文字の有効な
+構成要素の場合がある。
+.PP
+\fBiconv\fP() の呼び出し元は、 \fBiconv\fP() に渡すポインターが、
+必要な文字集合の文字にアクセスするのに適したものとなっていることを
+保証しなければならない。これには、アライメントに関して厳しい制限が
+あるプラットフォームにおいて正しいアライメントになっていることを
+保証するといったことも含まれる。
+.SH 関連項目
+\fBiconv_close\fP(3), \fBiconv_open\fP(3), \fBiconvconfig\fP(8)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/iconv_close.3 b/manual/LDP_man-pages/draft/man3/iconv_close.3
new file mode 100644 (file)
index 0000000..253d394
--- /dev/null
@@ -0,0 +1,59 @@
+.\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
+.\"
+.\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA)
+.\" This is free documentation; you can redistribute it and/or
+.\" modify it under the terms of the GNU General Public License as
+.\" published by the Free Software Foundation; either version 2 of
+.\" the License, or (at your option) any later version.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"   GNU glibc-2 source code and manual
+.\"   OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2000 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated Tue Jul 11 19:02:58 JST 2000
+.\"         by Yuichi SATO <sato@complex.eng.hokudai.ac.jp>
+.\"
+.TH ICONV_CLOSE 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+iconv_close \- 文字セット変換のためのディスクリプターを解放する
+.SH 書式
+.nf
+\fB#include <iconv.h>\fP
+.PP
+\fBint iconv_close(iconv_t \fP\fIcd\fP\fB);\fP
+.fi
+.SH 説明
+\fBiconv_close\fP()  関数は、 \fBiconv_open\fP(3)  を使って以前に割り当てられた 変換ディスクリプター \fIcd\fP
+を解放する。
+.SH 返り値
+成功した場合、 \fBiconv_close\fP()  関数は 0 を返す。 エラーの場合、この関数は \fIerrno\fP を設定し \-1 を返す。
+.SH バージョン
+この関数はバージョン 2.1 以降の glibc で利用可能である。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBiconv_close\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.sp 1
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, SUSv2.
+.SH 関連項目
+\fBiconv\fP(3), \fBiconv_open\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/iconv_open.3 b/manual/LDP_man-pages/draft/man3/iconv_open.3
new file mode 100644 (file)
index 0000000..f777ca0
--- /dev/null
@@ -0,0 +1,89 @@
+.\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
+.\"
+.\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA)
+.\" This is free documentation; you can redistribute it and/or
+.\" modify it under the terms of the GNU General Public License as
+.\" published by the Free Software Foundation; either version 2 of
+.\" the License, or (at your option) any later version.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"   GNU glibc-2 source code and manual
+.\"   OpenGroup's Single UNIX specification
+.\"     http://www.UNIX-systems.org/online.html
+.\"
+.\" 2007-03-31 Bruno Haible, Describe the glibc/libiconv //TRANSLIT
+.\" and //IGNORE extensions for 'tocode'.
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2000 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated Tue Jul 11 19:02:58 JST 2000
+.\"         by Yuichi SATO <sato@complex.eng.hokudai.ac.jp>
+.\" Updated 2007-06-01, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.50
+.\"
+.TH ICONV_OPEN 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+iconv_open \- 文字セット変換のためのディスクリプターを割り当てる
+.SH 書式
+.nf
+\fB#include <iconv.h>\fP
+.PP
+\fBiconv_t iconv_open(const char *\fP\fItocode\fP\fB, const char *\fP\fIfromcode\fP\fB);\fP
+.fi
+.SH 説明
+\fBiconv_open\fP()  関数は、文字エンコーディング \fIfromcode\fP から 文字エンコーディング \fItocode\fP
+へのバイト文字列変換に適した 変換ディスクリプターを割り当てる。
+.PP
+\fIfromcode\fP と \fItocode\fP に使うことのできる値と、 サポートされる組み合わせは、システムに依存する。 GNU C
+ライブラリでは、使うことのできる値は \fIiconv \-\-list\fP コマンドでリストされ、 リストされたすべての値の組み合わせがサポートされる。
+さらに、 GNU C ライブラリと GNU libiconv ライブラリでは、 以下の接尾辞がサポートされている。
+.TP 
+//TRANSLIT
+\fItocode\fP の後ろに文字列 "//TRANSLIT" が付いている場合、 翻訳 (transliteration) が有効になる。この場合、
+変換先の文字セットで表現できない文字を、その文字と同じように見える 文字 (複数文字の場合もある) で表現することができる。
+.TP 
+//IGNORE
+\fItocode\fP の後ろに文字列 "//IGNORE" が付いている場合、 変換先の文字セットで表現できない文字は黙って無視される。
+.PP
+この関数を読んで得られた変換ディスクリプターは、 \fBiconv\fP(3)  で 何度でも使うことができる。 これは \fBiconv_close\fP(3)
+を使って解放されるまで有効である。
+.PP
+A conversion descriptor contains a conversion state.  After creation using
+\fBiconv_open\fP(), the state is in the initial state.  Using \fBiconv\fP(3)
+modifies the descriptor's conversion state.  To bring the state back to the
+initial state, use \fBiconv\fP(3)  with NULL as \fIinbuf\fP argument.
+.SH 返り値
+\fBiconv_open\fP()  関数は、新たに割り当てられた変換ディスクリプターを返す。 エラーの場合、この関数は \fIerrno\fP を設定し、
+\fI(iconv_t)\ \-1\fP を返す。
+.SH エラー
+他のいろいろなエラーのうち、以下のエラーが起こりうる。
+.TP 
+\fBEINVAL\fP
+\fIfromcode\fP から \fItocode\fP への変換は、この実装ではサポートされていない。
+.SH バージョン
+この関数はバージョン 2.1 以降の glibc で利用可能である。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBiconv_open\fP()
+T}     Thread safety   MT\-Safe locale
+.TE
+.sp 1
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, SUSv2.
+.SH 関連項目
+\fBiconv\fP(1), \fBiconv\fP(3), \fBiconv_close\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/if_nameindex.3 b/manual/LDP_man-pages/draft/man3/if_nameindex.3
new file mode 100644 (file)
index 0000000..4b311cc
--- /dev/null
@@ -0,0 +1,140 @@
+.\" Copyright (c) 2012 YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
+.\" and Copyright (c) 2012 Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of
+.\" this manual under the conditions for verbatim copying, provided that
+.\" the entire resulting derived work is distributed under the terms of
+.\" a permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume
+.\" no responsibility for errors or omissions, or for damages resulting
+.\" from the use of the information contained herein.  The author(s) may
+.\" not have taken the same level of care in the production of this
+.\" manual, which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2013  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2013-05-22, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH IF_NAMEINDEX 3 2020\-06\-09 GNU "Linux Programmer's Manual"
+.SH 名前
+if_nameindex, if_freenameindex \- ネットワークインターフェースの名前とインデックスを取得する
+.SH 書式
+.nf
+\fB#include <net/if.h>\fP
+.PP
+\fBstruct if_nameindex *if_nameindex(\fP\fIvoid\fP\fB);\fP
+\fBvoid if_freenameindex(struct if_nameindex *\fP\fIptr\fP\fB);\fP
+.fi
+.SH 説明
+\fBif_nameindex\fP() 関数は \fIif_nameindex\fP 構造体の配列を返す。
+各構造体にはローカルシステムのネットワークインターフェースのいずれかの情報が入る。 \fIif_nameindex\fP
+構造体には少なくとも以下のフィールドがある。
+.PP
+.in +4n
+.EX
+unsigned int if_index; /* Index of interface (1, 2, ...) */
+char        *if_name;  /* Null\-terminated name ("eth0", etc.) */
+.EE
+.in
+.PP
+The \fIif_index\fP field contains the interface index.  The \fIif_name\fP field
+points to the null\-terminated interface name.  The end of the array is
+indicated by entry with \fIif_index\fP set to zero and \fIif_name\fP set to NULL.
+.PP
+\fBif_nameindex\fP() が返すデータ構造体は動的に確保される。 必要なくなった際には \fBif_freenameindex\fP()
+で解放すべきである。
+.SH 返り値
+成功した場合には \fBif_nameindex\fP() は配列へのポインターを返す。エラー時には NULL が返され、 \fIerrno\fP
+が適切に設定される。
+.SH エラー
+\fBif_nameindex\fP() が失敗した場合には以下の \fIerrno\fP が設定される。
+.TP 
+\fBENOBUFS\fP
+利用可能なリソースが十分にない。
+.PP
+\fBif_nameindex\fP() は、 \fBsocket\fP(2), \fBbind\fP(2), \fBioctl\fP(2),
+\fBgetsockname\fP(2), \fBrecvmsg\fP(2), \fBsendto\fP(2), \fBmalloc\fP(3)
+に対して規定されているエラーのいずれかで失敗する場合がある。
+.SH バージョン
+\fBif_nameindex\fP() 関数は glibc 2.1 で初めて登場したが、 glibc 2.3.4 より前のバージョンの実装では IPv4
+アドレスを持つインターフェースのみをサポートしていた。 IPv4 アドレスを持たないインターフェースがサポートされているのは、 netlink
+をサポートするカーネルにおいてのみである。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBif_nameindex\fP(),
+.br
+\fBif_freenameindex\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.sp 1
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, RFC\ 3493.
+.PP
+この関数は BSDi 初めて登場した。
+.SH EXAMPLES
+以下のプログラムはこのページで説明した関数の使い方を示している。このプログラムが生成する出力は以下のようになる。
+.PP
+.in +4n
+.EX
+$ \fB./a.out\fP\fI
+1: lo
+2: wlan0
+3: em1\fP
+.EE
+.in
+.SS プログラムのソース
+.EX
+#include <net/if.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+int
+main(int argc, char *argv[])
+{
+    struct if_nameindex *if_ni, *i;
+
+    if_ni = if_nameindex();
+    if (if_ni == NULL) {
+        perror("if_nameindex");
+        exit(EXIT_FAILURE);
+    }
+
+    for (i = if_ni; ! (i\->if_index == 0 && i\->if_name == NULL); i++)
+        printf("%u: %s\en", i\->if_index, i\->if_name);
+
+    if_freenameindex(if_ni);
+
+    exit(EXIT_SUCCESS);
+}
+.EE
+.SH 関連項目
+\fBgetsockopt\fP(2), \fBsetsockopt\fP(2), \fBgetifaddrs\fP(3), \fBif_indextoname\fP(3),
+\fBif_nametoindex\fP(3), \fBifconfig\fP(8)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/if_nametoindex.3 b/manual/LDP_man-pages/draft/man3/if_nametoindex.3
new file mode 100644 (file)
index 0000000..c50607d
--- /dev/null
@@ -0,0 +1,91 @@
+.\" Copyright (c) 2012 YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of
+.\" this manual under the conditions for verbatim copying, provided that
+.\" the entire resulting derived work is distributed under the terms of
+.\" a permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume
+.\" no responsibility for errors or omissions, or for damages resulting
+.\" from the use of the information contained herein.  The author(s) may
+.\" not have taken the same level of care in the production of this
+.\" manual, which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2013  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2013-05-22, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH IF_NAMETOINDEX 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+if_nametoindex, if_indextoname \- ネットワークインターフェースの名前とインデックスのマッピングを行う
+.SH 書式
+.nf
+\fB#include <net/if.h>\fP
+.PP
+\fBunsigned int if_nametoindex(const char *\fP\fIifname\fP\fB);\fP
+.PP
+\fBchar *if_indextoname(unsigned int ifindex, char *\fP\fIifname\fP\fB);\fP
+.fi
+.SH 説明
+\fBif_nametoindex\fP() 関数は、 名前が \fIifname\fP のネットワークインターフェースのインデックスを返す。
+.PP
+\fBif_indextoname\fP() 関数は、 インターフェースのインデックスが \fIifindex\fP
+に対応するネットワークインターフェースの名前を返す。 名前は \fIifname\fP が指すバッファーに格納される。 バッファーは少なくとも
+\fBIF_NAMESIZE\fP バイトの領域が必要である。
+.SH 返り値
+成功した場合、 \fBif_nametoindex\fP() はネットワークインターフェースのインデックス番号を返す。エラーの場合、 0 を返し、
+\fIerrno\fP を適切に設定にする。
+.PP
+成功した場合には \fBif_indextoname\fP() は \fIifname\fP を返す。エラー時には NULL が返され、 \fIerrno\fP
+が適切に設定される。
+.SH エラー
+\fBif_nametoindex\fP()  may fail and set \fIerrno\fP if:
+.TP 
+\fBENODEV\fP
+No interface found with given name.
+.PP
+\fBif_indextoname\fP() は以下の \fIerrno\fP で失敗する場合がある。
+.TP 
+\fBENXIO\fP
+インデックスに対応するインターフェースがない。
+.PP
+\fBif_nametoindex\fP() と \fBif_indextoname\fP() は、 \fBsocket\fP(2) と \fBioctl\fP(2)
+に対して規定されているエラーのいずれかで失敗する場合がある。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw34 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBif_nametoindex\fP(),
+\fBif_indextoname\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, RFC\ 3493.
+.PP
+この関数は BSDi 初めて登場した。
+.SH 関連項目
+\fBgetifaddrs\fP(3), \fBif_nameindex\fP(3), \fBifconfig\fP(8)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/ilogb.3 b/manual/LDP_man-pages/draft/man3/ilogb.3
new file mode 100644 (file)
index 0000000..ae9cb36
--- /dev/null
@@ -0,0 +1,138 @@
+.\" Copyright 2004 Andries Brouwer <aeb@cwi.nl>.
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" Inspired by a page by Walter Harms created 2002-08-10
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2005 Yuichi SATO
+.\" and Copyright (c) 2008 Akihiro MOTOKI
+.\" Translated Sat Jan 29 05:17:36 JST 2005
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated 2008-09-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH ILOGB 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+ilogb, ilogbf, ilogbl \- 浮動小数点数の指数部を整数として取得する
+.SH 書式
+\fB#include <math.h>\fP
+.PP
+\fBint ilogb(double \fP\fIx\fP\fB);\fP
+.br
+\fBint ilogbf(float \fP\fIx\fP\fB);\fP
+.br
+\fBint ilogbl(long double \fP\fIx\fP\fB);\fP
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBilogb\fP():
+.RS 4
+.\"    || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || _XOPEN_SOURCE\ >=\ 500
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.br
+\fBilogbf\fP(), \fBilogbl\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad b
+.SH 説明
+これらの関数は引き数の指数部を符号付き整数として返す。 エラーが起らなかった場合、これらの関数は、対応する \fBlogb\fP(3)  関数を \fIint\fP
+でキャストしたものと等価である。
+.SH 返り値
+成功すると、これらの関数は \fIx\fP の指数部を符号付き整数として返す。
+.PP
+.\" the POSIX.1 spec for logb() says logb() gives pole error for this
+.\" case, but for ilogb() it says domain error.
+.\" glibc: The numeric value is either `INT_MIN' or `-INT_MAX'.
+\fIx\fP がゼロの場合、領域エラー (domain error) が発生し、 \fBFP_ILOGB0\fP が返される。
+.PP
+.\" glibc: The numeric value is either `INT_MIN' or `INT_MAX'.
+.\" On i386, FP_ILOGB0 and FP_ILOGBNAN have the same value.
+\fIx\fP が NaN の場合、領域エラー (domain error) が発生し、 \fBFP_ILOGBNAN\fP が返される。
+.PP
+.\"
+.\" POSIX.1-2001 also says:
+.\" If the correct value is greater than {INT_MAX}, {INT_MAX}
+.\" shall be returned and a domain error shall occur.
+.\"
+.\" If the correct value is less than {INT_MIN}, {INT_MIN}
+.\" shall be returned and a domain error shall occur.
+\fIx\fP が負の無限大か正の無限大の場合、 領域エラー (domain error) が発生し、 \fBINT_MAX\fP が返される。
+.SH エラー
+これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
+.PP
+以下のエラーが発生する可能性がある。
+.TP 
+領域エラー: \fIx\fP が 0 か NaN
+不正 (invalid) 浮動小数点例外 (\fBFE_INVALID\fP)  が上がり、 \fIerrno\fP に \fBEDOM\fP が設定される
+(ただし、「バグ」を参照)。
+.TP 
+領域エラー (domain error): \fIx\fP が無限大である
+不正 (invalid) 浮動小数点例外 (\fBFE_INVALID\fP)  が上がり、 \fIerrno\fP に \fBEDOM\fP が設定される
+(ただし、「バグ」を参照)。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw27 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBilogb\fP(),
+\fBilogbf\fP(),
+\fBilogbl\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.SH バグ
+.\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6794
+バージョン 2.16 より前では、これらの関数の glibc 実装には以下のバグが存在した。
+.IP * 3
+The domain error case where \fIx\fP is 0 or a NaN did not cause \fIerrno\fP to be
+set or (on some architectures) raise a floating\-point exception.
+.IP * 3
+\fIx\fP が無限大の場合の領域エラーで、\fIerrno\fP が設定されず、浮動小数点例外が上がらなかった。
+.SH 関連項目
+\fBlog\fP(3), \fBlogb\fP(3), \fBsignificand\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/initgroups.3 b/manual/LDP_man-pages/draft/man3/initgroups.3
new file mode 100644 (file)
index 0000000..d903503
--- /dev/null
@@ -0,0 +1,101 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified 1993-07-24 by Rik Faith <faith@cs.unc.edu>
+.\" Modified 2004-10-10 by aeb
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1998
+.\"             ISHIKAWA Mutsumi, all rights reserved.
+.\" Translated 1998-05-23, ISHIKAWA Mutsumi <ishikawa@linux.or.jp>
+.\" Updated 2002-01-09, Kentaro Shirakata <argrath@ub32.org>
+.\" Updated 2005-02-26, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH INITGROUPS 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+initgroups \- 追加のグループアクセスリストの初期化
+.SH 書式
+.nf
+\fB#include <sys/types.h>\fP
+\fB#include <grp.h>\fP
+.PP
+\fBint initgroups(const char *\fP\fIuser\fP\fB, gid_t \fP\fIgroup\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBinitgroups\fP():
+    Since glibc 2.19:
+        _DEFAULT_SOURCE
+    Glibc 2.19 and earlier:
+        _BSD_SOURCE
+.SH 説明
+\fBinitgroups\fP()  関数はグループデータベース \fI/etc/group\fP を読み 込んで、\fIuser\fP
+が所属している全てのグループを使って、グループアク セスリストを初期化する。さらに、\fIgroup\fP に示されるグループもグルー
+プアクセスリストに追加される。
+.PP
+\fIuser\fP 引数は NULL であってはならない。
+.SH 返り値
+\fBinitgroups\fP()  関数は、成功すると 0 を返す。 エラーの場合は \-1 を返し、 \fIerrno\fP を適切に設定する。
+.SH エラー
+.TP 
+\fBENOMEM\fP
+グループ情報構造体を配置するためのメモリーが不足している。
+.TP 
+\fBEPERM\fP
+呼出しプロセスが十分な特権を持っていない。 この関数の裏で実行されるシステムコール \fBsetgroups\fP(2)  も参照のこと。
+.SH ファイル
+.TP 
+\fI/etc/group\fP
+group database file
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBinitgroups\fP()
+T}     Thread safety   MT\-Safe locale
+.TE
+.sp 1
+.SH 準拠
+SVr4, 4.3BSD.
+.SH 関連項目
+\fBgetgroups\fP(2), \fBsetgroups\fP(2), \fBcredentials\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/insque.3 b/manual/LDP_man-pages/draft/man3/insque.3
new file mode 100644 (file)
index 0000000..b486cc8
--- /dev/null
@@ -0,0 +1,248 @@
+.\" peter memishian -- meem@gnu.ai.mit.edu
+.\" $Id: insque.3,v 1.2 1996/10/30 21:03:39 meem Exp meem $
+.\" and Copyright (c) 2010, Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"   Linux libc source code (5.4.7)
+.\"   Solaris 2.x, OSF/1, and HP-UX manpages
+.\"   Curry's "UNIX Systems Programming for SVR4" (O'Reilly & Associates 1996)
+.\"
+.\" Changed to POSIX, 2003-08-11, aeb+wh
+.\" mtk, 2010-09-09: Noted glibc 2.4 bug, added info on circular
+.\"    lists, added example program
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1998 AKAMATSU Kazuo
+.\"         all rights reserved.
+.\" Translated Thu Jan 7 16:00 JST 1999
+.\"         by AKAMATSU Kazuo
+.\" Updated Sun Sep 14 JST 2003 by Kentaro Shirakata <argrath@ub32.org>
+.\" Updated 2012-04-30, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH INSQUE 3 2020\-11\-01 "" "Linux Programmer's Manual"
+.SH 名前
+insque, remque \- キューにアイテムを挿入/削除する
+.SH 書式
+.nf
+\fB#include <search.h>\fP
+.PP
+\fBvoid insque(void *\fP\fIelem\fP\fB, void *\fP\fIprev\fP\fB);\fP
+.PP
+\fBvoid remque(void *\fP\fIelem\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBinsque\fP(), \fBremque\fP():
+.RS 4
+.\"    || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
+_XOPEN_SOURCE\ >=\ 500
+    || /* Glibc since 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _SVID_SOURCE
+.RE
+.ad
+.SH 説明
+The \fBinsque\fP()  and \fBremque\fP()  functions manipulate doubly linked lists.
+Each element in the list is a structure of which the first two elements are
+a forward and a backward pointer.  The linked list may be linear (i.e., NULL
+forward pointer at the end of the list and NULL backward pointer at the
+start of the list)  or circular.
+.PP
+\fBinsque\fP() 関数は \fIelem\fP で示される要素を \fIprev\fP で示される
+要素の直後に挿入する。
+.PP
+リストが線形の場合、\fIinsque(elem, NULL)\fP を呼び出すと、
+リストの最初の要素を挿入することができる。
+この呼び出しを行うと \fIelem\fP の次へのポインターと前へのポインターに
+共に NULL が設定される。
+.PP
+リストが環状の場合、呼び出す側が、最初の要素の次へのポインターと前へのポインター
+が自分自身を指し、また  \fBinsque\fP() の呼び出しで \fIprev\fP 引き数が最初の要素
+を指すように保証しなければならない。
+.PP
+The \fBremque\fP()  function removes the element pointed to by \fIelem\fP from the
+doubly linked list.
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBinsque\fP(),
+\fBremque\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.sp 1
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+.\" e.g., SunOS, Linux libc4 and libc5
+On ancient systems, the arguments of these functions were of type \fIstruct
+qelem *\fP, defined as:
+.PP
+.in +4n
+.EX
+struct qelem {
+    struct qelem *q_forw;
+    struct qelem *q_back;
+    char          q_data[1];
+};
+.EE
+.in
+.PP
+この定義は \fI<search.h>\fP をインクルードする前に \fB_GNU_SOURCE\fP を定義することで得られる。
+.PP
+.\" Linux libc4 and libc 5 placed them
+.\" in \fI<stdlib.h>\fP.
+これらの関数のプロトタイプの置かれる場所は、UNIX の種類により異なる。
+上記は POSIX 版である。 \fI<string.h>\fP にあるシステムもある。
+.SH バグ
+glibc 2.4 以前では \fIprev\fP に NULL を指定することができなかった。
+その結果、線形のリストを作成するためには、
+呼び出し側は、最初の呼び出しで、リストの最初の 2 つの要素を持ち、
+各要素の次へのポインターと前へのポインターを適切に初期化したリストを
+作成しなければならなかった。
+.SH EXAMPLES
+次のプログラムは \fBinsque\fP() の使用法を示したものである。
+下記はプログラムの実行例である。
+.PP
+.in +4n
+.EX
+$ \fB./a.out \-c a b c\fP
+Traversing completed list:
+    a
+    b
+    c
+That was a circular list
+.EE
+.in
+.SS プログラムのソース
+\&
+.EX
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <search.h>
+
+struct element {
+    struct element *forward;
+    struct element *backward;
+    char *name;
+};
+
+static struct element *
+new_element(void)
+{
+    struct element *e = malloc(sizeof(*e));
+    if (e == NULL) {
+        fprintf(stderr, "malloc() failed\en");
+        exit(EXIT_FAILURE);
+    }
+
+    return e;
+}
+
+int
+main(int argc, char *argv[])
+{
+    struct element *first, *elem, *prev;
+    int circular, opt, errfnd;
+
+    /* The "\-c" command\-line option can be used to specify that the
+       list is circular */
+
+    errfnd = 0;
+    circular = 0;
+    while ((opt = getopt(argc, argv, "c")) != \-1) {
+        switch (opt) {
+        case \(aqc\(aq:
+            circular = 1;
+            break;
+        default:
+            errfnd = 1;
+            break;
+        }
+    }
+
+    if (errfnd || optind >= argc) {
+        fprintf(stderr,  "Usage: %s [\-c] string...\en", argv[0]);
+        exit(EXIT_FAILURE);
+    }
+
+    /* Create first element and place it in the linked list */
+
+    elem = new_element();
+    first = elem;
+
+    elem\->name = argv[optind];
+
+    if (circular) {
+        elem\->forward = elem;
+        elem\->backward = elem;
+        insque(elem, elem);
+    } else {
+        insque(elem, NULL);
+    }
+
+    /* Add remaining command\-line arguments as list elements */
+
+    while (++optind < argc) {
+        prev = elem;
+
+        elem = new_element();
+        elem\->name = argv[optind];
+        insque(elem, prev);
+    }
+
+    /* Traverse the list from the start, printing element names */
+
+    printf("Traversing completed list:\en");
+    elem = first;
+    do {
+        printf("    %s\en", elem\->name);
+        elem = elem\->forward;
+    } while (elem != NULL && elem != first);
+
+    if (elem == first)
+        printf("That was a circular list\en");
+
+    exit(EXIT_SUCCESS);
+}
+.EE
+.SH "SEE ALSO"
+\fBqueue\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
index 7e86528..f489b94 100644 (file)
@@ -186,13 +186,13 @@ _GNU_SOURCE
 \fBispunct_l\fP(), \fBisspace_l\fP(), \fBisupper_l\fP(), \fBisxdigit_l\fP(),
 \fBisascii_l\fP() は glibc 2.3 以降で利用可能である。
 .SH 属性
-For an explanation of the terms used in this section, see \fBattributes\fP(7).
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
 .ad l
 .TS
 allbox;
 lbw32 lb lb
 l l l.
-Interface      Attribute       Value
+インターフェース       属性  値
 T{
 \fBisalnum\fP(),
 \fBisalpha\fP(),
diff --git a/manual/LDP_man-pages/draft/man3/isatty.3 b/manual/LDP_man-pages/draft/man3/isatty.3
new file mode 100644 (file)
index 0000000..2ab7af8
--- /dev/null
@@ -0,0 +1,77 @@
+.\" Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 Hiroaki Nagoya
+.\"         all rights reserved.
+.\" Translated Mon Feb 10 1997 by Hiroaki Nagoya <nagoya@is.titech.ac.jp>
+.\"
+.TH ISATTY 3 2019\-03\-06 Linux "Linux Programmer's Manual"
+.SH 名前
+isatty \- ファイルディスクリプターが端末を参照しているかをチェックする
+.SH 書式
+.nf
+\fB#include <unistd.h>\fP
+.PP
+\fBint isatty(int \fP\fIfd\fP\fB);\fP
+.fi
+.SH 説明
+\fBisatty\fP()  関数は、 \fIfd\fP が端末を参照するオープンされたファイルディスクリプターかどうかを チェックする。
+.SH 返り値
+\fBisatty\fP()  は、 \fIfd\fP が端末を参照するオープンされたファイルディスクリプターであれば 1 を返す。 そうでなければ 0 を返し、
+\fIerrno\fP にエラーを示す値を設定する。
+.SH エラー
+.TP 
+\fBEBADF\fP
+\fIfd\fP が有効なファイルディスクリプターではない。
+.TP 
+\fBENOTTY\fP
+.\" e.g., FIFOs and pipes on 2.6.32
+\fIfd\fP refers to a file other than a terminal.  On some older kernels, some
+types of files resulted in the error \fBEINVAL\fP in this case (which is a
+violation of POSIX, which specifies the error \fBENOTTY\fP).
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBisatty\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, SVr4, 4.3BSD.
+.SH 関連項目
+\fBfstat\fP(2), \fBttyname\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/isgreater.3 b/manual/LDP_man-pages/draft/man3/isgreater.3
new file mode 100644 (file)
index 0000000..b787bed
--- /dev/null
@@ -0,0 +1,119 @@
+.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
+.\" Distributed under GPL
+.\" %%%LICENSE_END
+.\"
+.\" 2002-07-27 Walter Harms
+.\" this was done with the help of the glibc manual
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2004-2005 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated Fri Aug 20 04:03:26 JST 2004
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated & Modified Sat Jan 15 02:32:55 JST 2005 by Yuichi SATO
+.\" Updated 2008-09-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2012-05-29, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH ISGREATER 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+isgreater, isgreaterequal, isless, islessequal, islessgreater, isunordered \-
+NaN に対して例外を発生せずに、浮動小数点数の大小関係の判定を行う
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBint isgreater(\fP\fIx\fP\fB, \fP\fIy\fP\fB);\fP
+.PP
+\fBint isgreaterequal(\fP\fIx\fP\fB, \fP\fIy\fP\fB);\fP
+.PP
+\fBint isless(\fP\fIx\fP\fB, \fP\fIy\fP\fB);\fP
+.PP
+\fBint islessequal(\fP\fIx\fP\fB, \fP\fIy\fP\fB);\fP
+.PP
+\fBint islessgreater(\fP\fIx\fP\fB, \fP\fIy\fP\fB);\fP
+.PP
+\fBint isunordered(\fP\fIx\fP\fB, \fP\fIy\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+ここで説明する全ての関数:
+.RS
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+.RE
+.ad b
+.SH 説明
+The normal relational operations (like \fB<\fP, "less than")  fail if one
+of the operands is NaN.  This will cause an exception.  To avoid this, C99
+defines the macros listed below.
+.PP
+これらのマクロでは、引き数を 1 回だけ評価することが保証されている。
+引き数には実数の浮動小数点数型を指定しなければならない。
+(注意: これらのマクロの引き数に整数値を渡さないこと。なぜなら
+整数値の引き数は実数の浮動小数点型に変換されないからである。)
+.TP 
+\fBisgreater\fP()
+\fI(x)\ >\ (y)\fP を決定する。 \fIx\fP または \fIy\fP が NaN でも例外を発生しない。
+.TP 
+\fBisgreaterequal\fP()
+\fI(x)\ >=\ (y)\fP を決定する。 \fIx\fP または \fIy\fP が NaN でも例外を発生しない。
+.TP 
+\fBisless\fP()
+\fI(x)\ <\ (y)\fP を決定する。 \fIx\fP または \fIy\fP が NaN でも例外を発生しない。
+.TP 
+\fBislessequal\fP()
+\fI(x)\ <=\ (y)\fP を決定する。 \fIx\fP または \fIy\fP が NaN でも例外を発生しない。
+.TP 
+\fBislessgreater\fP()
+\fI(x)\ < (y) || (x) >\ (y)\fP を決定する。 \fIx\fP または \fIy\fP が NaN でも例外を発生しない。
+このマクロは \fIx\ !=\ y\fP と等価ではない。 なぜなら、この評価式は \fIx\fP または \fIy\fP が NaN の場合に true
+となるためである。
+.TP 
+\fBisunordered\fP()
+引き数が unordered かどうか、つまり引き数の少なくとも一方が NaN かどうか を判定する。
+.SH 返り値
+\fBisunordered\fP()  以外のマクロは関係操作の結果を返す。 一方の引き数が NaN の場合、これらのマクロは 0 を返す。
+.PP
+\fBisunordered\fP()  は \fIx\fP か \fIy\fP が NaN の場合 1 を、 それ以外の場合 0 を返す。
+.SH エラー
+エラーは発生しない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.ad l
+.TS
+allbox;
+lbw30 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBisgreater\fP(),
+\fBisgreaterequal\fP(),
+\fBisless\fP(),
+\fBislessequal\fP(),
+\fBislessgreater\fP(),
+\fBisunordered\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.ad
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, C99.
+.SH 注意
+これらの関数は全てのハードウェアでサポートされているわけではない。 サポートされていない場合は、マクロでエミュレートされる。
+エミュレートされる場合は、性能上での不利となる。 NaN について心配しなくて構わない場合は、 これらの関数を使わないこと。
+.SH 関連項目
+\fBfpclassify\fP(3), \fBisnan\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/j0.3 b/manual/LDP_man-pages/draft/man3/j0.3
new file mode 100644 (file)
index 0000000..2360202
--- /dev/null
@@ -0,0 +1,147 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified Sat Jul 24 19:08:17 1993 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 2002-08-25, aeb
+.\" Modified 2004-11-12 as per suggestion by Fabian Kreutz/AEB
+.\" 2008-07-24, mtk, moved yxx() material into separate y0.3 page
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1998 Ishii Tatsuo all rights reserved.
+.\" Translated Sun May 24 1998 by Ishii Tatsuo <rfun@azusa.shinshu-u.ac.jp>
+.\" Updated 2002-09-24 by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH J0 3 2020\-12\-21 "" "Linux Programmer's Manual"
+.SH 名前
+j0, j0f, j0l, j1, j1f, j1l, jn, jnf, jnl \- 第一種ベッセル関数
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBdouble j0(double \fP\fIx\fP\fB);\fP
+\fBdouble j1(double \fP\fIx\fP\fB);\fP
+\fBdouble jn(int \fP\fIn\fP\fB, double \fP\fIx\fP\fB);\fP
+.PP
+\fBfloat j0f(float \fP\fIx\fP\fB);\fP
+\fBfloat j1f(float \fP\fIx\fP\fB);\fP
+\fBfloat jnf(int \fP\fIn\fP\fB, float \fP\fIx\fP\fB);\fP
+.PP
+\fBlong double j0l(long double \fP\fIx\fP\fB);\fP
+\fBlong double j1l(long double \fP\fIx\fP\fB);\fP
+\fBlong double jnl(int \fP\fIn\fP\fB, long double \fP\fIx\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBj0\fP(), \fBj1\fP(), \fBjn\fP():
+.RS 4
+_XOPEN_SOURCE
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
+.RE
+.br
+\fBj0f\fP(), \fBj0l\fP(), \fBj1f\fP(), \fBj1l\fP(), \fBjnf\fP(), \fBjnl\fP():
+.RS 4
+_XOPEN_SOURCE \ >=\ 600
+    || (_ISOC99_SOURCE && _XOPEN_SOURCE)
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
+.RE
+.ad b
+.SH 説明
+関数 \fBj0\fP(), \fBj1\fP()  はそれぞれ \fIx\fP の0次、1次の 第一種ベッセル関数の値を返す。 関数 \fBjn\fP()  は \fIx\fP の
+\fIn\fP 次の 第一種ベッセル関数の値を返す。
+.PP
+関数 \fBj0f\fP(), \fBj1f\fP(), \fBjnf\fP() は、 \fIfloat\fP 型を引数に取り、返り値として返す。 関数 \fBj0l\fP(),
+\fBj1l\fP(), and \fBjnl\fP() は、 \fIlong double\fP 型を引数に取り、返り値として返す。
+.SH 返り値
+成功すると、これらの関数は \fIx\fP に対する第一種ベッセル関数の値を返す。
+.PP
+\fIx\fP が NaN の場合、NaN が返される。
+.PP
+\fIx\fP の絶対値が大き過ぎる場合や結果がアンダーフローする場合、 範囲エラー (range error) が発生し、返り値が 0 となる。
+.SH エラー
+これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
+.PP
+以下のエラーが発生する可能性がある。
+.TP 
+範囲エラー: 結果のアンダーフローや、\fIx\fP の絶対値が大き過ぎる
+\fIerrno\fP に \fBERANGE\fP が設定される。
+.PP
+.\" e.g., j0(1.5e16)
+.\" This is intentional.
+.\" See http://sources.redhat.com/bugzilla/show_bug.cgi?id=6805
+これらの関数は、 \fBfetestexcept\fP(3)  でチェックできる例外を上げない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBj0\fP(),
+\fBj0f\fP(),
+\fBj0l\fP()
+T}     Thread safety   MT\-Safe
+T{
+\fBj1\fP(),
+\fBj1f\fP(),
+\fBj1l\fP()
+T}     Thread safety   MT\-Safe
+T{
+\fBjn\fP(),
+\fBjnf\fP(),
+\fBjnl\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+The functions returning \fIdouble\fP conform to SVr4, 4.3BSD, POSIX.1\-2001, and
+POSIX.1\-2008.  The others are nonstandard functions that also exist on the
+BSDs.
+.SH バグ
+There are errors of up to 2e\-16 in the values returned by \fBj0\fP(), \fBj1\fP(),
+and \fBjn\fP()  for values of \fIx\fP between \-8 and 8.
+.SH 関連項目
+\fBy0\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/key_setsecret.3 b/manual/LDP_man-pages/draft/man3/key_setsecret.3
new file mode 100644 (file)
index 0000000..5fb875d
--- /dev/null
@@ -0,0 +1,82 @@
+.\"  Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
+.\" Distributed under GPL
+.\" %%%LICENSE_END
+.\"
+.\"  I had no way the check the functions out
+.\"  be careful
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2003 Akihiro MOTOKI all rights reserved.
+.\" Translated Mon Jan 27 2003 by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH KEY_SETSECRET 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+key_decryptsession, key_encryptsession, key_setsecret, key_gendes,
+key_secretkey_is_set \- rpc 鍵サーバデーモンとのインターフェース
+.SH 書式
+\fB#include <rpc/rpc.h>\fP
+.PP
+\fBint key_decryptsession(char *\fP\fIremotename\fP\fB,\fP \fBdes_block
+*\fP\fIdeskey\fP\fB);\fP
+.PP
+\fBint key_encryptsession(char *\fP\fIremotename\fP\fB,\fP \fBdes_block
+*\fP\fIdeskey\fP\fB);\fP
+.PP
+\fBint key_gendes(des_block *\fP\fIdeskey\fP\fB);\fP
+.PP
+\fBint key_setsecret(char *\fP\fIkey\fP\fB);\fP
+.PP
+\fBint key_secretkey_is_set(void);\fP
+.SH 説明
+これらの関数は RPC の安全な認証機構 (AUTH_DES) で使用される。 ユーザープログラムでこれらの関数を使用する必要はない。
+.PP
+関数 \fBkey_decryptsession\fP()  は(リモート)サーバのネット名を用いて、復号用の DES 鍵を取得する。
+サーバの公開鍵と、呼び出し元プロセスの実効 UID に対応する秘密鍵が使用される。
+.PP
+関数 \fBkey_encryptsession\fP()  は \fBkey_decryptsession\fP()  の逆の処理を行う。
+サーバの公開鍵と、呼び出し元プロセスの実効 UID に対応する秘密鍵で DES 鍵を暗号する。
+.PP
+関数 \fBkey_gendes\fP()  は、鍵サーバに安全な通信を行うための鍵を要求するために使用される。
+.PP
+関数 \fBkey_setsecret\fP()  は、呼び出し元プロセスの実効 UID に対して鍵を設定するために使用される。
+.PP
+関数 \fBkey_secretkey_is_set\fP()  は、呼び出し元プロセスの実効 UID に対して鍵が設定されているかどうかを
+調べるために使用される。
+.SH 返り値
+これらの関数は成功した場合 1 を、失敗した場合 0 を返す。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw22 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBkey_decryptsession\fP(),
+.br
+\fBkey_encryptsession\fP(),
+.br
+\fBkey_gendes\fP(),
+.br
+\fBkey_setsecret\fP(),
+.br
+\fBkey_secretkey_is_set\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.sp 1
+.SH 注意
+ここでは 2 種類の暗号方式が登場することに注意すること。 一つは公開鍵と秘密鍵を使用する非対称鍵暗号であり、 もう一つは対称鍵暗号である 64 ビット
+DES である。
+.PP
+これらの関数は Linux/Doors\-project の成果の一部だったが、 現在までに該当箇所はすべて破棄された。
+.SH 関連項目
+\fBcrypt\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/ldexp.3 b/manual/LDP_man-pages/draft/man3/ldexp.3
new file mode 100644 (file)
index 0000000..dad2d7e
--- /dev/null
@@ -0,0 +1,122 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 2004-10-31 by aeb
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 YOSHINO Takashi
+.\"       all rights reserved.
+.\" Translated Thu Feb 13 23:14:00 JST 1997
+.\"       by YOSHINO Takashi <yoshino@civil.jcn.nihon-u.ac.jp>
+.\" Updated & Modified Sun Jun  6 10:35:26 JST 2004
+.\"       by Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated & Modified Sat Jan 15 05:40:56 JST 2005 by Yuichi SATO
+.\" Updated 2008-09-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH LDEXP 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+ldexp, ldexpf, ldexpl \- 浮動小数点実数と 2 の整数乗との積を計算する
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBdouble ldexp(double \fP\fIx\fP\fB, int \fP\fIexp\fP\fB);\fP
+\fBfloat ldexpf(float \fP\fIx\fP\fB, int \fP\fIexp\fP\fB);\fP
+\fBlong double ldexpl(long double \fP\fIx\fP\fB, int \fP\fIexp\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBldexpf\fP(), \fBldexpl\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad
+.SH 説明
+These functions return the result of multiplying the floating\-point number
+\fIx\fP by 2 raised to the power \fIexp\fP.
+.SH 返り値
+成功すると、これらの関数は \fIx * (2^exp)\fP を返す。
+.PP
+\fIexp\fP がゼロの場合、 \fIx\fP が返される。
+.PP
+\fIx\fP が NaN の場合、NaN が返される。
+.PP
+\fIx\fP が正の無限大 (負の無限大) の場合、正の無限大 (負の無限大) が返される。
+.PP
+結果がアンダーフローする場合、 範囲エラー (range error) が発生し、0 が返される。
+.PP
+結果がオーバーフローする場合、 範囲エラー (range error) が発生し、 各関数はそれぞれ \fBHUGE_VAL\fP,
+\fBHUGE_VALF\fP, \fBHUGE_VALL\fP を返す。符号は \fIx\fP と同じになる。
+.SH エラー
+これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
+.PP
+以下のエラーが発生する可能性がある。
+.TP 
+範囲エラー (range error)、オーバーフローの場合
+\fIerrno\fP に \fBERANGE\fP が設定される。 オーバーフロー浮動小数点例外 (\fBFE_OVERFLOW\fP)  が上がる。
+.TP 
+範囲エラー (range error)、アンダーフローの場合
+\fIerrno\fP に \fBERANGE\fP が設定される。 アンダーフロー浮動小数点例外 (\fBFE_UNDERFLOW\fP)  が上がる。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw27 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBldexp\fP(),
+\fBldexpf\fP(),
+\fBldexpl\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.PP
+The variant returning \fIdouble\fP also conforms to SVr4, 4.3BSD, C89.
+.SH 関連項目
+\fBfrexp\fP(3), \fBmodf\fP(3), \fBscalbln\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/localeconv.3 b/manual/LDP_man-pages/draft/man3/localeconv.3
new file mode 100644 (file)
index 0000000..a8ebe75
--- /dev/null
@@ -0,0 +1,76 @@
+.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" Modified Sat Jul 24 19:01:20 1993 by Rik Faith (faith@cs.unc.edu)
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 YOSHINO Takashi
+.\"       all rights reserved.
+.\" Translated Tue May 26 00:11:13 JST 1998
+.\"       by YOSHINO Takashi <yoshino@eng.toyo.ac.jp>
+.\" Updated 2013-07-24, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH LOCALECONV 3 2015\-03\-02 GNU "Linux Programmer's Manual"
+.SH 名前
+localeconv \- 数値に関する書式情報を得る
+.SH 書式
+.nf
+\fB#include <locale.h>\fP
+.PP
+\fBstruct lconv *localeconv(void);\fP
+.fi
+.SH 説明
+\fBlocaleconv\fP()  関数は、現在のロケール情報を表す \fIstruct lconv\fP へのポインターを返す。 この構造体は
+\fBlocale\fP(7)  で説明されており、ロケールカテゴリー \fBLC_NUMERIC\fP と \fBLC_MONETARY\fP
+に関連するすべての値を含んでいる。 この関数を用いるプログラムは、おそらく同時に \fBprintf\fP(3)  や \fBstrfmon\fP(3)
+のような関数も用いるだろう。 これらの関数は、現在使用されているロケールに従った動作をする。
+.SH 返り値
+\fBlocaleconv\fP() 関数は、情報が格納された \fIstruct lconv\fP へのポインターを返す。
+この構造体は静的に割り当てられる場合があり (glibc では「そうだ」)、後の呼び出しで上書きされる可能性がある。 POSIX
+では、呼び出し元はこの構造体の内容を変更すべきではないとされている。 \fBlocaleconv\fP() 関数は常に成功する。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBlocaleconv\fP()
+T}     Thread safety   MT\-Unsafe race:localeconv locale
+.TE
+.SH 準拠
+C89, C99
+.SH バグ
+\fBprintf\fP(3)  グループの関数は現在のロケールを反映するかもしれないし、 しないかもしれない。
+.SH 関連項目
+\fBlocale\fP(1), \fBlocaledef\fP(1), \fBisalpha\fP(3), \fBnl_langinfo\fP(3),
+\fBsetlocale\fP(3), \fBstrcoll\fP(3), \fBstrftime\fP(3), \fBlocale\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/log.3 b/manual/LDP_man-pages/draft/man3/log.3
new file mode 100644 (file)
index 0000000..9086c22
--- /dev/null
@@ -0,0 +1,124 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 1995-08-14 by Arnt Gulbrandsen <agulbra@troll.no>
+.\" Modified 2002-07-27 by Walter Harms
+.\"    (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2003  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated Wed Aug  6 00:35:20 JST 2003
+.\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH LOG 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+log, logf, logl \- 自然対数関数
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBdouble log(double \fP\fIx\fP\fB);\fP
+\fBfloat logf(float \fP\fIx\fP\fB);\fP
+\fBlong double logl(long double \fP\fIx\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBlogf\fP(), \fBlogl\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad
+.SH 説明
+These functions return the natural logarithm of \fIx\fP.
+.SH 返り値
+成功すると、これらの関数は \fIx\fP の自然対数を返す。
+.PP
+\fIx\fP が NaN の場合、NaN が返される。
+.PP
+\fIx\fP が 1 の場合、+0 が返される。
+.PP
+\fIx\fP が正の無限大の場合、正の無限大が返される。
+.PP
+\fIx\fP が 0 の場合、極エラー (pole error) が発生し、 各関数はそれぞれ \-\fBHUGE_VAL\fP, \-\fBHUGE_VALF\fP,
+\-\fBHUGE_VALL\fP を返す。
+.PP
+\fIx\fP が負の場合 (負の無限大も含む)、領域エラー (domain error) が発生し、 NaN (not a number) が返される。
+.SH エラー
+これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
+.PP
+以下のエラーが発生する可能性がある。
+.TP 
+領域エラー (domain error): \fIx\fP が負である
+\fIerrno\fP に \fBEDOM\fP が設定される。 不正 (invalid) 浮動小数点例外 (\fBFE_INVALID\fP)  が上がる。
+.TP 
+極エラー (pole error): \fIx\fP が 0 である
+\fIerrno\fP に \fBERANGE\fP が設定される。 0 による除算 (divide\-by\-zero) 浮動小数点例外
+(\fBFE_DIVBYZERO\fP)  が上がる。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw21 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBlog\fP(),
+\fBlogf\fP(),
+\fBlogl\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.PP
+The variant returning \fIdouble\fP also conforms to SVr4, 4.3BSD, C89.
+.SH バグ
+glibc 2.5 以前では、 NaN に対して \fBlog\fP()  をとると、間違って不正浮動小数点例外 (\fBFE_INVALID\fP)
+が発生していた。
+.SH 関連項目
+\fBcbrt\fP(3), \fBclog\fP(3), \fBlog10\fP(3), \fBlog1p\fP(3), \fBlog2\fP(3), \fBsqrt\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/log10.3 b/manual/LDP_man-pages/draft/man3/log10.3
new file mode 100644 (file)
index 0000000..09f50a3
--- /dev/null
@@ -0,0 +1,105 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 1995-08-14 by Arnt Gulbrandsen <agulbra@troll.no>
+.\" Modified 2002-07-27 by Walter Harms
+.\"    (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2003  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated Wed Aug  6 00:35:20 JST 2003
+.\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH LOG10 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+log10, log10f, log10l \- 底が 10 の対数関数
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBdouble log10(double \fP\fIx\fP\fB);\fP
+\fBfloat log10f(float \fP\fIx\fP\fB);\fP
+\fBlong double log10l(long double \fP\fIx\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBlog10f\fP(), \fBlog10l\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad
+.SH 説明
+These functions return the base 10 logarithm of \fIx\fP.
+.SH 返り値
+成功すると、これらの関数は \fIx\fP の常用対数 (底が 10 の対数) を返す。
+.PP
+\fIx\fP が 0、1、負、無限大、NaN などのさまざまな特別な状況については、 \fBlog\fP(3)  を参照のこと。
+.SH エラー
+これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
+.PP
+これらの関数で発生するエラーについては、 \fBlog\fP(3)  を参照のこと。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw28 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBlog10\fP(),
+\fBlog10f\fP(),
+\fBlog10l\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.PP
+The variant returning \fIdouble\fP also conforms to SVr4, 4.3BSD, C89.
+.SH 関連項目
+\fBcbrt\fP(3), \fBclog10\fP(3), \fBexp10\fP(3), \fBlog\fP(3), \fBlog2\fP(3), \fBsqrt\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/log2.3 b/manual/LDP_man-pages/draft/man3/log2.3
new file mode 100644 (file)
index 0000000..1c787e0
--- /dev/null
@@ -0,0 +1,106 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 1995-08-14 by Arnt Gulbrandsen <agulbra@troll.no>
+.\" Modified 2002-07-27 by Walter Harms
+.\"    (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2004-2005 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated 2004-08-20, Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated & Modified 2005-01-16, Yuichi SATO
+.\" Updated & Modified 2005-09-06, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH LOG2 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+log2, log2f, log2l \- 底が 2 の対数関数
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBdouble log2(double \fP\fIx\fP\fB);\fP
+\fBfloat log2f(float \fP\fIx\fP\fB);\fP
+\fBlong double log2l(long double \fP\fIx\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBlog2\fP(), \fBlog2f\fP(), \fBlog2l\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+.RE
+.ad b
+.SH 説明
+These functions return the base 2 logarithm of \fIx\fP.
+.SH 返り値
+成功すると、これらの関数は \fIx\fP の底を 2 とする対数を返す。
+.PP
+\fIx\fP が 0、1、負、無限大、NaN などのさまざまな特別な状況については、 \fBlog\fP(3)  を参照のこと。
+.SH エラー
+これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
+.PP
+これらの関数で発生するエラーについては、 \fBlog\fP(3)  を参照のこと。
+.SH バージョン
+これらの関数は glibc バージョン 2.1 で初めて登場した。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw24 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBlog2\fP(),
+\fBlog2f\fP(),
+\fBlog2l\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.PP
+The variant returning \fIdouble\fP also conforms to SVr4, 4.3BSD.
+.SH 関連項目
+\fBcbrt\fP(3), \fBclog2\fP(3), \fBlog\fP(3), \fBlog10\fP(3), \fBsqrt\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/logb.3 b/manual/LDP_man-pages/draft/man3/logb.3
new file mode 100644 (file)
index 0000000..ae225ed
--- /dev/null
@@ -0,0 +1,131 @@
+.\" Copyright 2004 Andries Brouwer <aeb@cwi.nl>.
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" Inspired by a page by Walter Harms created 2002-08-10
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2005 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated Sat Jan 29 06:47:42 JST 2005
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH LOGB 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+logb, logbf, logbl \- 浮動小数点数の指数を取得する
+.SH 書式
+\fB#include <math.h>\fP
+.PP
+\fBdouble logb(double \fP\fIx\fP\fB);\fP
+.br
+\fBfloat logbf(float \fP\fIx\fP\fB);\fP
+.br
+\fBlong double logbl(long double \fP\fIx\fP\fB);\fP
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBlogb\fP():
+.RS 4
+.\"    || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || _XOPEN_SOURCE\ >=\ 500
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.br
+\fBlogbf\fP(), \fBlogbl\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad b
+.SH 説明
+これらの関数は、 \fIx\fP の浮動小数点の内部表現から指数部を抽出し、浮動小数点数値として返す。 \fI<float.h>\fP
+で定義されている整数定数 \fBFLT_RADIX\fP は、システムの浮動小数点表現で使用されている基数を表す。 \fBFLT_RADIX\fP が 2 の場合、
+\fBlogb(\fP\fIx\fP\fB)\fP は \fBfloor(log2(\fP\fIx\fP\fB))\fP と等しいが、後者の方がたぶん高速である。
+.PP
+\fIx\fP が非正規化数の場合、 \fBlogb\fP()  は \fIx\fP が正規化された場合の指数を返す。
+.SH 返り値
+成功すると、これらの関数は \fIx\fP の指数部を返す。
+.PP
+\fIx\fP が NaN の場合、NaN が返される。
+.PP
+\fIx\fP が 0 の場合、極エラー (pole error) が発生し、 各関数はそれぞれ \-\fBHUGE_VAL\fP, \-\fBHUGE_VALF\fP,
+\-\fBHUGE_VALL\fP を返す。
+.PP
+\fIx\fP が負の無限大か正の無限大の場合、正の無限大が返される。
+.SH エラー
+これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
+.PP
+以下のエラーが発生する可能性がある。
+.TP 
+極エラー (pole error): \fIx\fP が 0 である
+.\" .I errno
+.\" is set to
+.\" .BR ERANGE .
+0 による除算 (divide\-by\-zero) 浮動小数点例外 (\fBFE_DIVBYZERO\fP)  が上がる。
+.PP
+.\" FIXME . Is it intentional that these functions do not set errno?
+.\" log(), log2(), log10() do set errno
+.\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6793
+.\"
+.\" .SH HISTORY
+.\" The
+.\" .BR logb ()
+.\" function occurs in 4.3BSD.
+.\" see IEEE.3 in the 4.3BSD manual
+これらの関数は \fIerrno\fP を設定しない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw24 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBlogb\fP(),
+\fBlogbf\fP(),
+\fBlogbl\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.SH 関連項目
+\fBilogb\fP(3), \fBlog\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/lrint.3 b/manual/LDP_man-pages/draft/man3/lrint.3
new file mode 100644 (file)
index 0000000..999a688
--- /dev/null
@@ -0,0 +1,119 @@
+.\" Copyright 2001 Andries Brouwer <aeb@cwi.nl>.
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2001, 2005 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated Sun Jul  8 11:59:22 JST 2001
+.\"         by Yuichi SATO <ysato@h4.dion.ne.jp>
+.\" Updated & Modified Sat Jan 15 22:39:05 JST 2005
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated 2008-09-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH LRINT 3 2020\-11\-01 "" "Linux Programmer's Manual"
+.SH 名前
+lrint, lrintf, lrintl, llrint, llrintf, llrintl \- 最も近い整数値に丸める
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBlong lrint(double \fP\fIx\fP\fB);\fP
+\fBlong lrintf(float \fP\fIx\fP\fB);\fP
+\fBlong lrintl(long double \fP\fIx\fP\fB);\fP
+.PP
+\fBlong long llrint(double \fP\fIx\fP\fB);\fP
+\fBlong long llrintf(float \fP\fIx\fP\fB);\fP
+\fBlong long llrintl(long double \fP\fIx\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+上記の全ての関数:
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+.RE
+.ad
+.SH 説明
+これらの関数は、現在の丸め方向に基づき、最も近い整数に引き数を丸める (現在の丸め方向については \fBfesetround\fP(3)  を参照)。
+.PP
+\fBrint\fP(3) 系の関数と違い、これらの関数の返り値の型は引き数の型と異なる点に注意すること。
+.SH 返り値
+これらの関数は丸めた整数値を返す。
+.PP
+.\" The return value is -(LONG_MAX - 1) or -(LLONG_MAX -1)
+\fIx\fP が NaN か無限大の場合、もしくは丸めた値が大き過ぎて \fIlong\fP (\fBll*\fP 関数の場合には \fIlong long\fP)
+に格納できない場合、 領域エラー (domain error) が発生し、返り値は不定となる。
+.SH エラー
+これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
+.PP
+以下のエラーが発生する可能性がある。
+.TP 
+領域エラー (domain error): \fIx\fP が NaN か無限大、もしくは丸めた値が大き過ぎる
+.\" .I errno
+.\" is set to
+.\" .BR EDOM .
+不正 (invalid) 浮動小数点例外 (\fBFE_INVALID\fP)  が上がる。
+.PP
+.\" FIXME . Is it intentional that these functions do not set errno?
+.\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6798
+これらの関数は \fIerrno\fP を設定しない。
+.SH バージョン
+これらの関数は glibc バージョン 2.1 で初めて登場した。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw30 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBlrint\fP(),
+\fBlrintf\fP(),
+\fBlrintl\fP(),
+.br
+\fBllrint\fP(),
+\fBllrintf\fP(),
+\fBllrintl\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.SH 関連項目
+\fBceil\fP(3), \fBfloor\fP(3), \fBlround\fP(3), \fBnearbyint\fP(3), \fBrint\fP(3),
+\fBround\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/lsearch.3 b/manual/LDP_man-pages/draft/man3/lsearch.3
new file mode 100644 (file)
index 0000000..6a6ce7e
--- /dev/null
@@ -0,0 +1,84 @@
+.\" Copyright 1995 Jim Van Zandt <jrv@vanzandt.mv.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" Corrected prototype and include, aeb, 990927
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1998 Ueyama Rui
+.\"         all rights reserved.
+.\" Translated 1998-05-23, Ueyama Rui <rui@linux.or.jp>
+.\" Updated 2005-02-26, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH LSEARCH 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+lfind, lsearch \- 配列を線形検索する
+.SH 書式
+.nf
+\fB#include <search.h>\fP
+.PP
+\fBvoid *lfind(const void *\fP\fIkey\fP\fB, const void *\fP\fIbase\fP\fB, size_t *\fP\fInmemb\fP\fB,\fP
+\fB         size_t \fP\fIsize\fP\fB, int(*\fP\fIcompar\fP\fB)(const void *, const void *));\fP
+.PP
+\fBvoid *lsearch(const void *\fP\fIkey\fP\fB, void *\fP\fIbase\fP\fB, size_t *\fP\fInmemb\fP\fB,\fP
+\fB         size_t \fP\fIsize\fP\fB, int(*\fP\fIcompar\fP\fB)(const void *, const void *));\fP
+.fi
+.SH 説明
+\fBlfind\fP()  と \fBlsearch\fP()  は、 \fIsize\fP バイトの要素 \fI*nmemb\fP 個からなる配列 \fIbase\fP から、
+\fIkey\fP を線形検索する。比較を行うのは \fIcompar\fP が参照している関数で、 これは 2つの引き数を持ち、1つめの引き数が \fIkey\fP
+を、2つめの引き数は配列メンバーを指す。また \fIcompar\fP は、 \fIkey\fP が配列のメンバーとマッチしたなら 0、そうでなければ 0
+以外を返すことが期待されている。
+.PP
+\fBlsearch\fP()  は、マッチする要素を見つけられなかったとき、 配列の最後に \fIkey\fP をつけ加える。そして \fI*nmemb\fP を 1
+ふやす。 したがって、この関数を使用する際には、マッチする要素が存在するか、 もしくは配列に要素を追加するための領域があるか、を把握しておく必要がある。
+.SH 返り値
+\fBlfind\fP()  の返り値は、配列のマッチしたメンバーへのポインターである。 もしマッチするメンバーが見つからないと NULL を返す。
+\fBlsearch\fP()  の返り値も、配列のマッチしたメンバーへのポインターである。 マッチするメンバーが見つからなかったときは、
+新たにつけ加えたメンバーへのポインターを返す。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw18 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBlfind\fP(),
+\fBlsearch\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.sp 1
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, SVr4, 4.3BSD.  Present in libc since
+libc\-4.6.27.
+.SH バグ
+関数の名前の選び方がよくない。
+.SH 関連項目
+\fBbsearch\fP(3), \fBhsearch\fP(3), \fBtsearch\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/lseek64.3 b/manual/LDP_man-pages/draft/man3/lseek64.3
new file mode 100644 (file)
index 0000000..fe57cbb
--- /dev/null
@@ -0,0 +1,181 @@
+.\" Copyright 2004 Andries Brouwer <aeb@cwi.nl>.
+.\" and Copyright (c) 2020 Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2005 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated Sun Jan 30 03:23:04 JST 2005
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\"
+.TH LSEEK64 3 2020\-11\-01 Linux "Linux Programmer's Manual"
+.SH 名前
+lseek64 \- ファイルの 64 ビットの読み書きオフセットの位置を変える
+.SH 書式
+\fB#define _LARGEFILE64_SOURCE\fP /* feature_test_macros(7) 参照 */
+.br
+\fB#include <sys/types.h>\fP
+.br
+\fB#include <unistd.h>\fP
+.PP
+\fBoff64_t lseek64(int \fP\fIfd\fP\fB, off64_t \fP\fIoffset\fP\fB, int \fP\fIwhence\fP\fB);\fP
+.SH 説明
+\fBlseek\fP() 関数ファミリーは、ファイルディスクリプター \fIfd\fP に関連するオープンされたファイルのオフセットを、
+ファイルの開始位置・現在位置・終端から \fIoffset\fP の位置へ変更する。 これは \fIwhence\fP がそれぞれ \fBSEEK_SET\fP,
+\fBSEEK_CUR\fP, \fBSEEK_END\fP の場合に対応する。
+.PP
+更に詳しい説明・返り値・エラーは、 \fBlseek\fP(2)  を参照すること。
+.PP
+.\"
+.\" For some background details, see:
+.\" https://lore.kernel.org/linux-man/CAKgNAkhNSWR3uYhYYaxx74fZfJ3JrpfAAPVrK0AFk_cAOUsbDg@mail.gmail.com/
+.\"
+Four interfaces are available: \fBlseek\fP(), \fBlseek64\fP(), \fBllseek\fP(), and
+\fB_llseek\fP().
+.SS lseek()
+プロトタイプ:
+.PP
+.in +4n
+.EX
+\fBoff_t lseek(int \fP\fIfd\fP\fB, off_t \fP\fIoffset\fP\fB, int \fP\fIwhence\fP\fB);\fP
+.EE
+.in
+.PP
+The C library's \fBlseek\fP()  wrapper function uses the type \fIoff_t\fP.  This
+is a 32\-bit signed type on 32\-bit architectures, unless one compiles with
+.PP
+.in +4n
+.EX
+#define _FILE_OFFSET_BITS 64
+.EE
+.in
+.PP
+を定義してコンパイルした場合は 64 ビット符号付き型である。
+.SS lseek64()
+プロトタイプ:
+.PP
+.in +4n
+.EX
+\fBoff64_t lseek64(int \fP\fIfd\fP\fB, off64_t \fP\fIoffset\fP\fB, int \fP\fIwhence\fP\fB);\fP
+.EE
+.in
+.PP
+The \fBlseek64\fP()  library function uses a 64\-bit type even when \fIoff_t\fP is
+a 32\-bit type.  Its prototype (and the type \fIoff64_t\fP)  is available only
+when one compiles with
+.PP
+.in +4n
+.EX
+#define _LARGEFILE64_SOURCE
+.EE
+.in
+.PP
+.\" in glibc 2.0.94, not in 2.0.6
+.\"
+The function \fBlseek64\fP()  is available since glibc 2.1.
+.SS llseek()
+プロトタイプ:
+.PP
+.in +4n
+.EX
+\fBloff_t llseek(int \fP\fIfd\fP\fB, loff_t \fP\fIoffset\fP\fB, int \fP\fIwhence\fP\fB);\fP
+.EE
+.in
+.PP
+The type \fIloff_t\fP is a 64\-bit signed type.  The \fBllseek\fP()  library
+function is available in glibc and works without special defines.  However,
+the glibc headers do not provide a prototype.  Users should add the above
+prototype, or something equivalent, to their own source.  When users
+complained about data loss caused by a miscompilation of \fBe2fsck\fP(8), glibc
+2.1.3 added the link\-time warning
+.PP
+.in +4n
+"the \`llseek\' function may be dangerous; use \`lseek64\' instead."
+.in
+.PP
+これにより、警告なしでコンパイルしたい場合には、この関数を使用不可にできる。
+.PP
+.\" glibc commit 5c5c0dd747070db624c8e2c43691cec854f114ef
+.\"
+Since glibc 2.28, this function symbol is no longer available to newly
+linked applications.
+.SS _llseek()
+On 32\-bit architectures, this is the system call that is used (by the C
+library wrapper functions)  to implement all of the above functions.  The
+prototype is:
+.PP
+.in +4n
+.EX
+\fBint _llseek(int \fP\fIfd\fP\fB, off_t \fP\fIoffset_hi\fP\fB, off_t \fP\fIoffset_lo\fP\fB,\fP
+\fB            loff_t *\fP\fIresult\fP\fB, int \fP\fIwhence\fP\fB);\fP
+.EE
+.in
+.PP
+更に詳しい情報は、 \fBllseek\fP(2)  を参照すること。
+.PP
+.\" In arch/x86/entry/syscalls/syscall_32.tbl,
+.\" we see the following line:
+.\"
+.\"    140     i386    _llseek                 sys_llseek
+.\"
+.\" This is essentially telling us that 'sys_llseek' (the name generated
+.\" by SYSCALL_DEFINE5(llseek...)) is exposed to user-space as system call
+.\" number 140, and that system call number will (IIUC) be exposed in
+.\" autogenerated headers with the name "__NR__llseek" (i.e., "_llseek").
+.\" The "i386" is telling us that this happens in i386 (32-bit Intel).
+.\" There is nothing equivalent on x86-64, because 64 bit systems don't
+.\" need an _llseek system call.
+64\-bit systems don't need an \fB_llseek\fP()  system call.  Instead, they have
+an \fBlseek\fP(2)  system call that supports 64\-bit file offsets.
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBlseek64\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 注意
+\fBlseek64\fP()  is one of the functions that was specified in the Large File
+Summit (LFS)  specification that was completed in 1996.  The purpose of the
+specification was to provide transitional support that allowed applications
+on 32\-bit systems to access files whose size exceeds that which can be
+represented with a 32\-bit \fIoff_t\fP type.  As noted above, this symbol is
+exposed by header files if the \fB_LARGEFILE64_SOURCE\fP feature test macro is
+defined.  ALternatively, on a 32\-bit system, the symbol \fIlseek\fP is aliased
+to \fIlseek64\fP if the macro \fB_FILE_OFFSET_BITS\fP is defined with the value
+64.
+.SH 関連項目
+\fBllseek\fP(2), \fBlseek\fP(2)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/makecontext.3 b/manual/LDP_man-pages/draft/man3/makecontext.3
new file mode 100644 (file)
index 0000000..10d7737
--- /dev/null
@@ -0,0 +1,188 @@
+.\" Copyright (C) 2001 Andries Brouwer (aeb@cwi.nl)
+.\" and Copyright (C) 2006 Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" 2006-08-02, mtk, Added example program
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2001 NAKANO Takeo all rights reserved.
+.\" Translated Sat Dec 15 2001 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
+.\" Updated 2008-12-24, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.15
+.\"
+.TH MAKECONTEXT 3 2020\-12\-21 GNU "Linux Programmer's Manual"
+.SH 名前
+makecontext, swapcontext \- ユーザーコンテキストを操作する
+.SH 書式
+\fB#include <ucontext.h>\fP
+.PP
+\fBvoid makecontext(ucontext_t *\fP\fIucp\fP\fB, void (*\fP\fIfunc\fP\fB)(),\fP \fBint
+\fP\fIargc\fP\fB, ...);\fP
+.PP
+\fBint swapcontext(ucontext_t *\fP\fIoucp\fP\fB, const ucontext_t *\fP\fIucp\fP\fB);\fP
+.SH 説明
+In a System V\-like environment, one has the type \fIucontext_t\fP (defined in
+\fI<ucontext.h>\fP and described in \fBgetcontext\fP(3))  and the four
+functions \fBgetcontext\fP(3), \fBsetcontext\fP(3), \fBmakecontext\fP(), and
+\fBswapcontext\fP()  that allow user\-level context switching between multiple
+threads of control within a process.
+.PP
+\fBmakecontext\fP()  関数は、ポインター \fIucp\fP が指すコンテキストを変更する (\fIucp\fP は以前の
+\fBgetcontext\fP(3)  呼び出しで得られたものである)。 \fBmakecontext\fP()
+を起動する前には、呼び出し者は、このコンテキスト用に 新しいスタックを確保し、そのアドレスを \fIucp\->uc_stack\fP に代入し、
+さらに後継のコンテキストを定義し、そのアドレスを \fIucp\->uc_link\fP に 代入しなければならない。
+.PP
+このコンテキストが将来 (\fBsetcontext\fP(3)  または \fBswapcontext\fP()  によって)  有効にされると、関数
+\fIfunc\fP が呼ばれ、 引き数として \fIargc\fP 以降の整数 (\fIint\fP)  引き数の列が渡される。 呼び出し者は \fIargc\fP
+にこれらの引き数の個数を指定しなければならない。 この関数が戻ると、後継のコンテキストが有効になる。 後継コンテキストのポインターが NULL
+の場合、そのスレッドが終了する。
+.PP
+\fBswapcontext\fP()  関数は現在のコンテキストを ポインター \fIoucp\fP が指す構造体に保存し、 ポインター \fIucp\fP
+が指すコンテキストを有効にする。
+.SH 返り値
+成功すると、 \fBswapcontext\fP()  は返らない (しかし後に \fIoucp\fP が有効になった場合には返ることがある。 このときには
+\fBswapcontext\fP()  は 0 を返すように見える。)  失敗すると、 \fBswapcontext\fP()  は \-1 を返し、
+\fIerrno\fP をエラーに応じて設定する。
+.SH エラー
+.TP 
+\fBENOMEM\fP
+スタックに割り当てる空間が残っていない。
+.SH バージョン
+\fBmakecontext\fP()  と \fBswapcontext\fP()  は、バージョン 2.1 以降の glibc で提供されている。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBmakecontext\fP()
+T}     Thread safety   MT\-Safe race:ucp
+T{
+\fBswapcontext\fP()
+T}     Thread safety   MT\-Safe race:oucp race:ucp
+.TE
+.SH 準拠
+SUSv2, POSIX.1\-2001.  POSIX.1\-2008 では、移植性の問題から \fBmakecontext\fP()  と
+\fBswapcontext\fP()  の仕様が削除されている。 代わりに、アプリケーションを POSIX スレッドを使って書き直すことが 推奨されている。
+.SH 注意
+\fIucp\->uc_stack\fP の解釈は \fBsigaltstack\fP(2)  の場合と同じである。 すなわちこの構造体には、
+スタックとして用いられるメモリー領域の開始アドレスと長さが含まれ、 これはスタックが伸びる方向がどちらであるかには関係しない。
+したがって、ユーザープログラムはこの件については心配しなくてよい。
+.PP
+\fIint\fP とポインター型が同じ大きさであるアーキテクチャーでは (x86\-32 はその例であり、両方の型とも 32 ビットである)、
+\fBmakecontext\fP()  の \fIargc\fP 以降の引き数としてポインターを渡してもうまく動くかもしれない。
+しかしながら、このようにすると、移植性は保証されず、 標準に従えば動作は未定義であり、ポインターが \fIint\fP
+よりも大きいアーキテクチャーでは正しく動作しないことだろう。 それにも関わらず、バージョン 2.8 以降の glibc では、
+\fBmakecontext\fP()  に変更が行われ、(x86\-64 などの) いくつかの 64 ビットアーキテクチャーで
+引き数としてポインターを渡すことができるようになっている。
+.SH EXAMPLES
+以下のサンプルプログラムは、 \fBgetcontext\fP(3), \fBmakecontext\fP(), \fBswapcontext\fP()
+の使用方法の例を示すものである。 このプログラムを実行すると、以下のような出力が得られる:
+.PP
+.in +4n
+.EX
+$\fB ./a.out\fP
+main: swapcontext(&uctx_main, &uctx_func2)
+func2: started
+func2: swapcontext(&uctx_func2, &uctx_func1)
+func1: started
+func1: swapcontext(&uctx_func1, &uctx_func2)
+func2: returning
+func1: returning
+main: exiting
+.EE
+.in
+.SS プログラムのソース
+\&
+.EX
+#include <ucontext.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+static ucontext_t uctx_main, uctx_func1, uctx_func2;
+
+#define handle_error(msg) \e
+    do { perror(msg); exit(EXIT_FAILURE); } while (0)
+
+static void
+func1(void)
+{
+    printf("func1: started\en");
+    printf("func1: swapcontext(&uctx_func1, &uctx_func2)\en");
+    if (swapcontext(&uctx_func1, &uctx_func2) == \-1)
+        handle_error("swapcontext");
+    printf("func1: returning\en");
+}
+
+static void
+func2(void)
+{
+    printf("func2: started\en");
+    printf("func2: swapcontext(&uctx_func2, &uctx_func1)\en");
+    if (swapcontext(&uctx_func2, &uctx_func1) == \-1)
+        handle_error("swapcontext");
+    printf("func2: returning\en");
+}
+
+int
+main(int argc, char *argv[])
+{
+    char func1_stack[16384];
+    char func2_stack[16384];
+
+    if (getcontext(&uctx_func1) == \-1)
+        handle_error("getcontext");
+    uctx_func1.uc_stack.ss_sp = func1_stack;
+    uctx_func1.uc_stack.ss_size = sizeof(func1_stack);
+    uctx_func1.uc_link = &uctx_main;
+    makecontext(&uctx_func1, func1, 0);
+
+    if (getcontext(&uctx_func2) == \-1)
+        handle_error("getcontext");
+    uctx_func2.uc_stack.ss_sp = func2_stack;
+    uctx_func2.uc_stack.ss_size = sizeof(func2_stack);
+    /* Successor context is f1(), unless argc > 1 */
+    uctx_func2.uc_link = (argc > 1) ? NULL : &uctx_func1;
+    makecontext(&uctx_func2, func2, 0);
+
+    printf("main: swapcontext(&uctx_main, &uctx_func2)\en");
+    if (swapcontext(&uctx_main, &uctx_func2) == \-1)
+        handle_error("swapcontext");
+
+    printf("main: exiting\en");
+    exit(EXIT_SUCCESS);
+}
+.EE
+.SH 関連項目
+\fBsigaction\fP(2), \fBsigaltstack\fP(2), \fBsigprocmask\fP(2), \fBgetcontext\fP(3),
+\fBsigsetjmp\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/makedev.3 b/manual/LDP_man-pages/draft/man3/makedev.3
new file mode 100644 (file)
index 0000000..5555579
--- /dev/null
@@ -0,0 +1,100 @@
+.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2012  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2012-05-08, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH MAKEDEV 3 2018\-04\-30 Linux "Linux Programmer's Manual"
+.SH 名前
+makedev, major, minor \- デバイス番号の操作
+.SH 書式
+.nf
+\fB#include <sys/sysmacros.h>\fP
+.PP
+\fBdev_t makedev(unsigned int \fP\fImaj\fP\fB, unsigned int \fP\fImin\fP\fB);\fP
+.PP
+\fBunsigned int major(dev_t \fP\fIdev\fP\fB);\fP
+\fBunsigned int minor(dev_t \fP\fIdev\fP\fB);\fP
+.fi
+.SH 説明
+デバイス ID は、メジャー ID とマイナー ID の二つの部分から構成される。
+メジャー ID はデバイスクラスの識別に使用され、マイナー ID は
+そのクラス内の特定のデバイスインスタンスの識別に使用される。
+デバイス ID は \fIdev_t\fP 型を用いて表現される。
+.PP
+\fBmakedev\fP() は、指定されたメジャー ID とマイナー ID を組み合わせて
+デバイス ID を生成し、関数の結果として返す。
+このデバイス ID は \fBmknod\fP(2) などに渡すことができる。
+.PP
+関数 \fBmajor\fP() と \fBminor\fP() は \fBmakedev\fP() と反対の処理を行う。
+つまり、device ID を渡すと、それぞれメジャー ID 部分とマイナー ID 部分
+を返す。これらのマクロは、例えば、 \fBstat\fP(2) が返す構造体に含まれる
+デバイス ID を分解する場合などで役に立つ。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw27 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBmakedev\fP(),
+\fBmajor\fP(),
+\fBminor\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+.\" The BSDs, HP-UX, Solaris, AIX, Irix.
+.\" The header location is inconsistent:
+.\" Could be sys/mkdev.h, sys/sysmacros.h, or sys/types.h.
+関数 \fBmakedev\fP(), \fBmajor\fP(), \fBminor\fP() は
+POSIX.1 では規定されていないが、他の多くのシステムにも存在する。
+.SH 注意
+これらのインターフェースはマクロとして定義されている。
+glibc 2.3.3 以降では、これらは GNU 固有の 3 つの関数
+\fBgnu_dev_makedev\fP(), \fBgnu_dev_major\fP(), \fBgnu_dev_minor\fP() の
+エイリアス (別名) となっている。後者の名前がエクスポートされるが、
+以前から使われている前者の名前の方が移植性がある。
+.PP
+.\" glibc commit dbab6577c6684c62bd2521c1c29dc25c3cac966f
+.\" glibc commit e16deca62e16f645213dffd4ecd1153c37765f17
+The BSDs expose the definitions for these macros via
+\fI<sys/types.h>\fP.  Depending on the version, glibc also exposes
+definitions for these macros from that header file if suitable feature test
+macros are defined.  However, this behavior was deprecated in glibc 2.25,
+and since glibc 2.28, \fI<sys/types.h>\fP no longer provides these
+definitions.
+.SH 関連項目
+\fBmknod\fP(2), \fBstat\fP(2)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/mallinfo.3 b/manual/LDP_man-pages/draft/man3/mallinfo.3
new file mode 100644 (file)
index 0000000..e3c659c
--- /dev/null
@@ -0,0 +1,274 @@
+.\" Copyright (c) 2012 by Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH MALLINFO 3 2020\-11\-01 Linux "Linux Programmer's Manual"
+.SH 名前
+mallinfo \- メモリー割り当て情報を取得する
+.SH 書式
+\fB#include <malloc.h>\fP
+.PP
+\fBstruct mallinfo mallinfo(void);\fP
+.SH 説明
+The \fBmallinfo\fP()  function returns a copy of a structure containing
+information about memory allocations performed by \fBmalloc\fP(3)  and related
+functions.
+.PP
+Note that not all allocations are visible to \fBmallinfo\fP(); see BUGS and
+consider using \fBmalloc_info\fP(3)  instead.
+.PP
+The returned structure is defined as follows:
+.PP
+.in +4n
+.EX
+struct mallinfo {
+    int arena;     /* Non\-mmapped space allocated (bytes) */
+    int ordblks;   /* Number of free chunks */
+    int smblks;    /* Number of free fastbin blocks */
+    int hblks;     /* Number of mmapped regions */
+    int hblkhd;    /* Space allocated in mmapped regions (bytes) */
+    int usmblks;   /* See below */
+    int fsmblks;   /* Space in freed fastbin blocks (bytes) */
+    int uordblks;  /* Total allocated space (bytes) */
+    int fordblks;  /* Total free space (bytes) */
+    int keepcost;  /* Top\-most, releasable space (bytes) */
+};
+.EE
+.in
+.PP
+\fImallinfo\fP 構造体の各フィールドには以下の情報が格納される。
+.TP  10
+\fIarena\fP
+\fBmmap\fP(2) 以外の手段で割り当てられた総メモリー量 (例えばヒープに割り当てられたメモリー) 。
+この数字には使用中のブロックやフリーリスト上のブロックも含まれる。
+.TP 
+\fIordblks\fP
+通常の (つまり fastbin ではない) 未使用ブロック数。
+.TP 
+\fIsmblks\fP
+.\" the glibc info page wrongly says this field is unused
+.\" https://sourceware.org/bugzilla/show_bug.cgi?id=26746
+fastbin 未使用ブロック数 (\fBmallopt\fP(3) 参照)。
+.TP 
+\fIhblks\fP
+\fBmmap\fP(2) を使って現在割り当てられているブロック数 (\fBmallopt\fP(3) の \fBM_MMAP_THRESHOLD\fP
+の議論を参照)。
+.TP 
+\fIhblkhd\fP
+\fBmmap\fP(2) を使って現在割り当てられているブロックのバイト数。
+.TP 
+\fIusmblks\fP
+.\" It seems to have been zero since at least as far back as glibc 2.15
+This field is unused, and is always 0.  Historically, it was the "highwater
+mark" for allocated space\(emthat is, the maximum amount of space that was
+ever allocated (in bytes); this field was maintained only in nonthreading
+environments.
+.TP 
+\fIfsmblks\fP
+.\" the glibc info page wrongly says this field is unused
+.\" https://sourceware.org/bugzilla/show_bug.cgi?id=26746
+fastbin フリーブロックの総バイト数。
+.TP 
+\fIuordblks\fP
+使用中の割り当てメモリーで使われているバイト数。
+.TP 
+\fIfordblks\fP
+フリーブロックの総バイト数。
+.TP 
+\fIkeepcost\fP
+.\" .SH VERSIONS
+.\" Available already in glibc 2.0, possibly earlier
+ヒープの一番上にある解放可能な未使用の空間の大きさ。 この値は \fBmalloc_trim\fP(3) で理想的な場合に解放できる最大のバイト数である
+(理想的というのは、 ページ境界の制限などを無視した場合である。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lbw28
+l l l.
+インターフェース       属性  値
+T{
+\fBmallinfo\fP()
+T}     Thread safety   MT\-Unsafe init const:mallopt
+.TE
+.sp 1
+\fBmallinfo\fP()  would access some global internal objects.  If modify them
+with non\-atomically, may get inconsistent results.  The identifier
+\fImallopt\fP in \fIconst:mallopt\fP mean that \fBmallopt\fP()  would modify the
+global internal objects with atomics, that make sure \fBmallinfo\fP()  is safe
+enough, others modify with non\-atomically maybe not.
+.SH 準拠
+この関数は POSIX や C 標準では規定されていない。 多くの System V 由来のシステムに同様の関数が存在し、 SVID
+では同様の関数が規定されていた。
+.SH バグ
+.\" FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=208
+.\" See the 24 Aug 2011 mail by Paul Pluzhnikov:
+.\"     "[patch] Fix mallinfo() to accumulate results for all arenas"
+.\" on libc-alpha@sourceware.org
+\fBこれらの情報はメインのメモリー割り当て領域に対するもののみである。\fP 他の領域の割り当ては対象にならない。
+他の領域の情報も取得できる別の手段については \fBmalloc_stats\fP(3) や \fBmalloc_info\fP(3) を参照。
+.PP
+\fImallinfo\fP 構造体の各フィールドは \fIint\fP 型である。 しかし、 いくつかの内部管理用の値は \fIlong\fP 型の場合もあるので、
+報告される値が一周してしまい、 不正確になる可能性がある。
+.SH EXAMPLES
+以下のプログラムは \fBmallinfo\fP() を利用して、 メモリーブロックの割り当て、解放のそれぞれ前後でメモリー割り当ての統計情報を取得する。
+統計情報は標準出力に表示される。
+.PP
+最初の 2 つのコマンドライン引き数は \fBmalloc\fP(3) で割り当てるブロック数とサイズを指定する。
+.PP
+残りの 3 つの引き数は、どの割り当てられたブロックを \fBfree\fP(3) で解放すべきかを指定する。 これらの 3 つの引き数の指定は任意で、
+最初のものから順に以下の情報を指定する。 1 つ目の引き数は、 ブロックを解放するループで使用するステップサイズを指定する (デフォルト値は 1 で、
+1 は指定した範囲のすべてのブロックを解放することを意味する)。 2 つ目の引き数は、 解放する先頭ブロックの場所番号を指定する (デフォルト値は 0
+で、 0 は先頭の割り当て済みブロックを意味する)。 3 つ目の引き数は、 解放する最終ブロックの場所番号よりひとつ大きい値を指定する
+(デフォルト値は最大ブロック番号よりもひとつ大きい値である)。 これらの 3 つの引き数が省略された場合、
+デフォルトではすべての割り当てられたブロックが解放される。
+.PP
+以下のプログラムの実行例では、 100 バイトの割り当てを 1000 回実行し、 割り当てたブロックの 2 つに 1 つを解放する。
+.PP
+.in +4n
+.EX
+$ \fB./a.out 1000 100 2\fP
+============== Before allocating blocks ==============
+Total non\-mmapped bytes (arena):       0
+# of free chunks (ordblks):            1
+# of free fastbin blocks (smblks):     0
+# of mapped regions (hblks):           0
+Bytes in mapped regions (hblkhd):      0
+Max. total allocated space (usmblks):  0
+Free bytes held in fastbins (fsmblks): 0
+Total allocated space (uordblks):      0
+Total free space (fordblks):           0
+Topmost releasable block (keepcost):   0
+
+============== After allocating blocks ==============
+Total non\-mmapped bytes (arena):       135168
+# of free chunks (ordblks):            1
+# of free fastbin blocks (smblks):     0
+# of mapped regions (hblks):           0
+Bytes in mapped regions (hblkhd):      0
+Max. total allocated space (usmblks):  0
+Free bytes held in fastbins (fsmblks): 0
+Total allocated space (uordblks):      104000
+Total free space (fordblks):           31168
+Topmost releasable block (keepcost):   31168
+
+============== After freeing blocks ==============
+Total non\-mmapped bytes (arena):       135168
+# of free chunks (ordblks):            501
+# of free fastbin blocks (smblks):     0
+# of mapped regions (hblks):           0
+Bytes in mapped regions (hblkhd):      0
+Max. total allocated space (usmblks):  0
+Free bytes held in fastbins (fsmblks): 0
+Total allocated space (uordblks):      52000
+Total free space (fordblks):           83168
+Topmost releasable block (keepcost):   31168
+.EE
+.in
+.SS プログラムのソース
+\&
+.EX
+#include <malloc.h>
+#include <stdlib.h>
+#include <string.h>
+
+static void
+display_mallinfo(void)
+{
+    struct mallinfo mi;
+
+    mi = mallinfo();
+
+    printf("Total non\-mmapped bytes (arena):       %d\en", mi.arena);
+    printf("# of free chunks (ordblks):            %d\en", mi.ordblks);
+    printf("# of free fastbin blocks (smblks):     %d\en", mi.smblks);
+    printf("# of mapped regions (hblks):           %d\en", mi.hblks);
+    printf("Bytes in mapped regions (hblkhd):      %d\en", mi.hblkhd);
+    printf("Max. total allocated space (usmblks):  %d\en", mi.usmblks);
+    printf("Free bytes held in fastbins (fsmblks): %d\en", mi.fsmblks);
+    printf("Total allocated space (uordblks):      %d\en", mi.uordblks);
+    printf("Total free space (fordblks):           %d\en", mi.fordblks);
+    printf("Topmost releasable block (keepcost):   %d\en", mi.keepcost);
+}
+
+int
+main(int argc, char *argv[])
+{
+#define MAX_ALLOCS 2000000
+    char *alloc[MAX_ALLOCS];
+    int numBlocks, freeBegin, freeEnd, freeStep;
+    size_t blockSize;
+
+    if (argc < 3 || strcmp(argv[1], "\-\-help") == 0) {
+        fprintf(stderr, "%s num\-blocks block\-size [free\-step "
+                "[start\-free [end\-free]]]\en", argv[0]);
+        exit(EXIT_FAILURE);
+    }
+
+    numBlocks = atoi(argv[1]);
+    blockSize = atoi(argv[2]);
+    freeStep = (argc > 3) ? atoi(argv[3]) : 1;
+    freeBegin = (argc > 4) ? atoi(argv[4]) : 0;
+    freeEnd = (argc > 5) ? atoi(argv[5]) : numBlocks;
+
+    printf("============== Before allocating blocks ==============\en");
+    display_mallinfo();
+
+    for (int j = 0; j < numBlocks; j++) {
+        if (numBlocks >= MAX_ALLOCS) {
+            fprintf(stderr, "Too many allocations\en");
+            exit(EXIT_FAILURE);
+        }
+
+        alloc[j] = malloc(blockSize);
+        if (alloc[j] == NULL) {
+            perror("malloc");
+            exit(EXIT_FAILURE);
+        }
+    }
+
+    printf("\en============== After allocating blocks ==============\en");
+    display_mallinfo();
+
+    for (int j = freeBegin; j < freeEnd; j += freeStep)
+        free(alloc[j]);
+
+    printf("\en============== After freeing blocks ==============\en");
+    display_mallinfo();
+
+    exit(EXIT_SUCCESS);
+}
+.EE
+.SH 関連項目
+.ad l
+.nh
+\fBmmap\fP(2), \fBmalloc\fP(3), \fBmalloc_info\fP(3), \fBmalloc_stats\fP(3),
+\fBmalloc_trim\fP(3), \fBmallopt\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/malloc_get_state.3 b/manual/LDP_man-pages/draft/man3/malloc_get_state.3
new file mode 100644 (file)
index 0000000..e40f725
--- /dev/null
@@ -0,0 +1,93 @@
+.\" Copyright (c) 2012 by Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH MALLOC_GET_STATE 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+malloc_get_state, malloc_set_state \- malloc 実装の状態を保存/復元する
+.SH 書式
+.nf
+\fB#include <malloc.h>\fP
+.PP
+\fBvoid *malloc_get_state(void);\fP
+.PP
+\fBint malloc_set_state(void *\fP\fIstate\fP\fB);\fP
+.fi
+.SH 説明
+\fINote\fP: these function are removed in glibc version 2.25.
+.PP
+\fBmalloc_get_state\fP() 関数は \fBmalloc\fP(3) 内部のすべての管理用変数を記録する (ただし、 ヒープの実際の内容と
+\fBmalloc_hook\fP(3) 関数ポインターの状態は記録されない)。 状態は \fBmalloc\fP(3) で動的に確保されたシステム依存の
+opaque な (内部構造は分からない) データ構造体に記録され、 関数の結果としてそのデータ構造体へのポインターが返される
+(このメモリーは呼び出し元が責任をもって \fBfree\fP(3) する必要がある)。
+.PP
+\fBmalloc_set_state\fP() 関数は、 \fBmalloc\fP(3) 内部のすべての管理用変数を \fIstate\fP が指す opaque
+なデータ構造体から復元する。
+.SH 返り値
+成功すると、 \fBmalloc_get_state\fP() は新しく割り当てられたデータ構造体へのポインターを返す。 エラーの場合
+(例えば、データ構造体に必要なメモリーが割り当てられなかったなど)、 \fBmalloc_get_state\fP() は NULL を返す。
+.PP
+.\" if(ms->magic != MALLOC_STATE_MAGIC) return -1;
+.\" /* Must fail if the major version is too high. */
+.\" if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
+成功すると、 \fBmalloc_set_state\fP() は 0 を返す。 実装が \fIstate\fP
+が正しく作成されたデータ構造体を指していないと検出した場合、 \fBmalloc_set_state\fP() は \-1 を返す。 \fIstate\fP
+が参照するデータ構造体のバージョンがこの実装が認識するバージョンよりも新しいと実装が検出した場合、 \fBmalloc_set_state\fP() は \-2
+を返す。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw19 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBmalloc_get_state\fP(),
+\fBmalloc_set_state\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.sp 1
+.SH 準拠
+これらの関数は GNU による拡張である。
+.SH 注意
+これらの関数が役に立つのは、 この \fBmalloc\fP(3) の実装が共有ライブラリの一部として使用され、
+ヒープの内容が何か他の方法で保存/復元される場合である。 この手法は GNU Emacs が「ダンプ」関数 ("dumping" function)
+を実装するのに使用されている。
+.PP
+.\" i.e., calls __malloc_check_init()
+.\" i.e., malloc checking is not already in use
+.\" and the caller requested malloc checking
+これらの関数がフック関数ポインターの保存と復元を行うことはない。 ただし、 2 つ例外がある。 \fBmalloc_get_state\fP()
+が呼び出された際に malloc チェック (\fBmallopt\fP(3) 参照) が使用中の場合、 \fBmalloc_set_state\fP()
+は可能なら malloc チェックフックをリセットする。 また、 保存された状態の malloc チェックが使用中でないが、 呼び出し元が malloc
+チェックを要求していた場合、 フックは 0 にリセットされる。
+.SH 関連項目
+\fBmalloc\fP(3), \fBmallopt\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/malloc_info.3 b/manual/LDP_man-pages/draft/man3/malloc_info.3
new file mode 100644 (file)
index 0000000..b544922
--- /dev/null
@@ -0,0 +1,241 @@
+.\" Copyright (c) 2012 by Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2013  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2013-07-22, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2013-07-31, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH MALLOC_INFO 3 2020\-11\-01 GNU "Linux Programmer's Manual"
+.SH 名前
+malloc_info \- malloc の状態をストリームに出力する
+.SH 書式
+.nf
+\fB#include <malloc.h>\fP
+.PP
+\fBint malloc_info(int \fP\fIoptions\fP\fB, FILE *\fP\fIstream\fP\fB);\fP
+.fi
+.SH 説明
+\fBmalloc_info\fP() 関数は、 呼び出し元のメモリー割り当て実装の現在の状態を表す XML 文字列を出力する。 文字列は、
+ファイルストリーム \fIstream\fP に出力される。 出力された文字列には、 全ての割り当て領域の情報が含まれる (\fBmalloc\fP(3) 参照)。
+.PP
+現在の実装では、 \fIoptions\fP は 0 でなければならない。
+.SH 返り値
+\fBmalloc_info\fP() は、成功すると 0 を返す。 エラーの場合、\-1 を返し、 \fIerrno\fP にエラーの原因を示す値を設定する。
+.SH エラー
+.TP 
+\fBEINVAL\fP
+\fIoptions\fP が 0 でなかった。
+.SH バージョン
+\fBmalloc_info\fP() は glibc バージョン 2.10 で追加された。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBmalloc_info\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.sp 1
+.SH 準拠
+この関数は GNU による拡張である。
+.SH 注意
+メモリー割り当て情報は (C の構造体ではなく) XML 文字列として提供される。 これは、 この情報は時間をたつと (内部で使用している実装によって)
+変わる可能性があるからである。 出力される XML 文字列にはバージョンフィールドが付いている。
+.PP
+\fBopen_memstream\fP(3) 関数を使うと、 \fBmalloc_info\fP() の出力を、
+ファイルではなくメモリー内のバッファーに直接送ることができる。
+.PP
+\fBmalloc_info\fP() 関数は、 \fBmalloc_stats\fP(3) と \fBmallinfo\fP(3) の不備を解決するために設定された。
+.SH EXAMPLES
+以下のプログラムは最大で 4 つのコマンドライン引数を取り、 最初の 3 つは必須である。 最初の引数は、このプログラムが生成するスレッド数を指定する。
+メインスレッドを含む全てのスレッドが第 2 引数で指定した数のメモリーブロックの割り当てを行う。 第 3 引数は割り当てるブロックのサイズを制御する。
+メインスレッドはこのサイズのブロックを作成し、 このプログラムが生成する 2 番目のスレッドはこのサイズの 2 倍のサイズのブロックを、 3
+番目のスレッドはこのサイズの 3 倍のサイズのブロックを割り当て、 以下同様である。
+.PP
+このプログラムは \fBmalloc_info\fP() を 2 回呼び出し、メモリー割り当て状態を表示する。
+最初の呼び出しはスレッドの生成もメモリーの割り当ても行われる前に実行される。 2
+回目の呼び出しは全てのスレッドがメモリー割り当てを行った後に実行される。
+.PP
+以下の例では、 コマンドライン引数で、 追加でスレッドを一つ生成し、メインスレッドと追加のスレッドの両方が 10000
+個のメモリーブロックを割り当てるように指定している。 メモリーブロックの割り当て後の \fBmalloc_info\fP() では、 2
+つの割り当て領域の状態が表示されている。
+.PP
+.in +4n
+.EX
+$ \fBgetconf GNU_LIBC_VERSION\fP
+glibc 2.13
+$ \fB./a.out 1 10000 100\fP
+============ Before allocating blocks ============
+<malloc version="1">
+<heap nr="0">
+<sizes>
+</sizes>
+<total type="fast" count="0" size="0"/>
+<total type="rest" count="0" size="0"/>
+<system type="current" size="135168"/>
+<system type="max" size="135168"/>
+<aspace type="total" size="135168"/>
+<aspace type="mprotect" size="135168"/>
+</heap>
+<total type="fast" count="0" size="0"/>
+<total type="rest" count="0" size="0"/>
+<system type="current" size="135168"/>
+<system type="max" size="135168"/>
+<aspace type="total" size="135168"/>
+<aspace type="mprotect" size="135168"/>
+</malloc>
+
+============ After allocating blocks ============
+<malloc version="1">
+<heap nr="0">
+<sizes>
+</sizes>
+<total type="fast" count="0" size="0"/>
+<total type="rest" count="0" size="0"/>
+<system type="current" size="1081344"/>
+<system type="max" size="1081344"/>
+<aspace type="total" size="1081344"/>
+<aspace type="mprotect" size="1081344"/>
+</heap>
+<heap nr="1">
+<sizes>
+</sizes>
+<total type="fast" count="0" size="0"/>
+<total type="rest" count="0" size="0"/>
+<system type="current" size="1032192"/>
+<system type="max" size="1032192"/>
+<aspace type="total" size="1032192"/>
+<aspace type="mprotect" size="1032192"/>
+</heap>
+<total type="fast" count="0" size="0"/>
+<total type="rest" count="0" size="0"/>
+<system type="current" size="2113536"/>
+<system type="max" size="2113536"/>
+<aspace type="total" size="2113536"/>
+<aspace type="mprotect" size="2113536"/>
+</malloc>
+.EE
+.in
+.SS プログラムのソース
+.EX
+#include <unistd.h>
+#include <stdlib.h>
+#include <pthread.h>
+#include <malloc.h>
+#include <errno.h>
+
+static size_t blockSize;
+static int numThreads, numBlocks;
+
+#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \e
+                        } while (0)
+
+static void *
+thread_func(void *arg)
+{
+    int tn = (int) arg;
+
+    /* The multiplier \(aq(2 + tn)\(aq ensures that each thread (including
+       the main thread) allocates a different amount of memory */
+
+    for (int j = 0; j < numBlocks; j++)
+        if (malloc(blockSize * (2 + tn)) == NULL)
+            errExit("malloc\-thread");
+
+    sleep(100);         /* Sleep until main thread terminates */
+    return NULL;
+}
+
+int
+main(int argc, char *argv[])
+{
+    int sleepTime;
+
+    if (argc < 4) {
+        fprintf(stderr,
+                "%s num\-threads num\-blocks block\-size [sleep\-time]\en",
+                argv[0]);
+        exit(EXIT_FAILURE);
+    }
+
+    numThreads = atoi(argv[1]);
+    numBlocks = atoi(argv[2]);
+    blockSize = atoi(argv[3]);
+    sleepTime = (argc > 4) ? atoi(argv[4]) : 0;
+
+    pthread_t *thr = calloc(numThreads, sizeof(*thr));
+    if (thr == NULL)
+        errExit("calloc");
+
+    printf("============ Before allocating blocks ============\en");
+    malloc_info(0, stdout);
+
+    /* Create threads that allocate different amounts of memory */
+
+    for (int tn = 0; tn < numThreads; tn++) {
+        errno = pthread_create(&thr[tn], NULL, thread_func,
+                               (void *) tn);
+        if (errno != 0)
+            errExit("pthread_create");
+
+        /* If we add a sleep interval after the start\-up of each
+           thread, the threads likely won\(aqt contend for malloc
+           mutexes, and therefore additional arenas won\(aqt be
+           allocated (see malloc(3)). */
+
+        if (sleepTime > 0)
+            sleep(sleepTime);
+    }
+
+    /* The main thread also allocates some memory */
+
+    for (int j = 0; j < numBlocks; j++)
+        if (malloc(blockSize) == NULL)
+            errExit("malloc");
+
+    sleep(2);           /* Give all threads a chance to
+                           complete allocations */
+
+    printf("\en============ After allocating blocks ============\en");
+    malloc_info(0, stdout);
+
+    exit(EXIT_SUCCESS);
+}
+.EE
+.SH 関連項目
+\fBmallinfo\fP(3), \fBmalloc\fP(3), \fBmalloc_stats\fP(3), \fBmallopt\fP(3),
+\fBopen_memstream\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/malloc_stats.3 b/manual/LDP_man-pages/draft/man3/malloc_stats.3
new file mode 100644 (file)
index 0000000..90d8508
--- /dev/null
@@ -0,0 +1,70 @@
+.\" Copyright (c) 2012 by Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2013  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2013-05-07, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH MALLOC_STATS 3 2020\-08\-13 Linux "Linux Programmer's Manual"
+.SH 名前
+malloc_stats \- メモリー割り当ての統計を表示する
+.SH 書式
+\fB#include <malloc.h>\fP
+.PP
+\fBvoid malloc_stats(void);\fP
+.SH 説明
+.\" .SH VERSIONS
+.\" Available already in glibc 2.0, possibly earlier
+\fBmalloc_stats\fP() 関数は \fBmalloc\fP(3) や関連する関数により割り当てられたメモリーに関する統計を (標準エラーに)
+出力する。 各領域 (割り当てエリア) について、 この関数は割り当てられているメモリーの総量と現在の割り当てが使用している総バイト数を出力する
+(これらの二つの値は \fBmallinfo\fP(3) で取得できる \fIarena\fP と \fIuordblks\fP フィールドに対応している)。
+また、この関数は、 すべての領域のこれら二つの統計情報の合計値と、 \fBmmap\fP(2)
+を使って同時に割り当てられたブロック数とバイト数の最大値を表示する。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBmalloc_stats\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.sp 1
+.SH 準拠
+この関数は GNU による拡張である。
+.SH 注意
+\fBmallinfo\fP(3) を使用すると、 メイン領域のメモリー割り当てに関するより詳細な情報を取得できる。
+.SH 関連項目
+\fBmmap\fP(2), \fBmallinfo\fP(3), \fBmalloc\fP(3), \fBmalloc_info\fP(3), \fBmallopt\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/malloc_trim.3 b/manual/LDP_man-pages/draft/man3/malloc_trim.3
new file mode 100644 (file)
index 0000000..6ab6668
--- /dev/null
@@ -0,0 +1,84 @@
+.\" Copyright (c) 2012 by Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH MALLOC_TRIM 3 2020\-08\-13 Linux "Linux Programmer's Manual"
+.SH 名前
+malloc_trim \- release free memory from the heap
+.SH 書式
+\fB#include <malloc.h>\fP
+.PP
+\fBint malloc_trim(size_t \fP\fIpad\fP\fB);\fP
+.SH 説明
+The \fBmalloc_trim\fP()  function attempts to release free memory from the heap
+(by calling \fBsbrk\fP(2)  or \fBmadvise\fP(2)  with suitable arguments).
+.PP
+\fIpad\fP 引き数は、 ヒープの一番上から切り詰める際に残す未使用領域の量を指定する。 この引き数が 0 の場合、
+ヒープの一番上の最小量のメモリーだけを維持できる (つまり 1 ページかそれ未満)。 0 以外の引き数を指定すると、
+ヒープの一番上にある程度の量の未使用領域を残し、 将来の割り当てを \fBsbrk\fP(2) でヒープを拡張せずに行えるようにできる。
+.SH 返り値
+\fBmalloc_trim\fP() 関数はメモリーが実際に解放されシステムに戻された場合に 1 を返し、 どのメモリーも解放できなかった場合は 0
+を返す。
+.SH エラー
+.\" .SH VERSIONS
+.\" Available already in glibc 2.0, possibly earlier
+エラーは定義されていない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBmalloc_trim\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.sp 1
+.SH 準拠
+この関数は GNU による拡張である。
+.SH 注意
+この関数は、 特定の状況では \fBfree\fP(3) により自動的に呼び出される。 \fBmallopt\fP(3) の \fBM_TOP_PAD\fP と
+\fBM_TRIM_THRESHOLD\fP の議論を参照。
+.PP
+Only the main heap (using \fBsbrk\fP(2))  honors the \fIpad\fP argument; thread
+heaps do not.
+.PP
+.\" See commit 68631c8eb92ff38d9da1ae34f6aa048539b199cc
+.\" (dated 2007-12-16) which adds iteration over all
+.\" arenas and frees all pages in chunks which are free.
+Since glibc 2.8 this function frees memory in all arenas and in all chunks
+with whole free pages.
+.PP
+Before glibc 2.8 this function only freed memory at the top of the heap in
+the main arena.
+.SH 関連項目
+\fBsbrk\fP(2), \fBmalloc\fP(3), \fBmallopt\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/malloc_usable_size.3 b/manual/LDP_man-pages/draft/man3/malloc_usable_size.3
new file mode 100644 (file)
index 0000000..6fe340f
--- /dev/null
@@ -0,0 +1,66 @@
+.\" Copyright (c) 2012 by Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH MALLOC_USABLE_SIZE 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+malloc_usable_size \- ヒープから確保したメモリーブロックのサイズを取得する
+.SH 書式
+\fB#include <malloc.h>\fP
+.PP
+\fBsize_t malloc_usable_size (void *\fP\fIptr\fP\fB);\fP
+.SH 説明
+\fBmalloc_usable_size\fP() 関数は、 \fIptr\fP が指すブロックで使用可能なバイト数を返す。 \fIptr\fP
+は、\fBmalloc\fP(3) や同様の関数で割り当てられたメモリーブロックへのポインターである。
+.SH 返り値
+\fBmalloc_usable_size\fP() は \fIptr\fP が指す割り当て済みメモリーブロックで使用可能なバイト数を返す。 \fIptr\fP が
+NULL の場合、 0 が返される。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw20 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBmalloc_usable_size\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+この関数は GNU による拡張である。
+.SH 注意
+\fBmalloc_usable_size\fP() が返す値は、 要求された割り当てサイズよりも大きい場合がある。
+これは、メモリーアラインメントと最小サイズの制約のためである。 この超過バイトをアプリケーションは悪影響なしで上書きすることができるが、
+これを行うのはプログラミングマナーとしてはよいこととは言えない。 アプリケーションの超過バイトの量は、内部の実装に依存する。
+.PP
+この関数の主な使用目的はデバッグと内部調査である。
+.SH 関連項目
+\fBmalloc\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
index 4d86e73..143088a 100644 (file)
@@ -227,12 +227,12 @@ fmod(x,0) DOMAIN  x       y       EDOM
 remainder(x,0) DOMAIN  NAN     y       EDOM    
 .TE
 .SH 属性
-For an explanation of the terms used in this section, see \fBattributes\fP(7).
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
 .TS
 allbox;
 lb lb lb
 l l l.
-Interface      Attribute       Value
+インターフェース       属性  値
 T{
 \fBmatherr\fP()
 T}     Thread safety   MT\-Safe
diff --git a/manual/LDP_man-pages/draft/man3/mblen.3 b/manual/LDP_man-pages/draft/man3/mblen.3
new file mode 100644 (file)
index 0000000..3b4ac6d
--- /dev/null
@@ -0,0 +1,74 @@
+.\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
+.\"
+.\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA)
+.\" This is free documentation; you can redistribute it and/or
+.\" modify it under the terms of the GNU General Public License as
+.\" published by the Free Software Foundation; either version 2 of
+.\" the License, or (at your option) any later version.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"   GNU glibc-2 source code and manual
+.\"   Dinkumware C library reference http://www.dinkumware.com/
+.\"   OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
+.\"   ISO/IEC 9899:1999
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1999 HANATAKA Shinya
+.\"         all rights reserved.
+.\" Translated Tue Jan 11 00:56:22 JST 2000
+.\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
+.\"
+.TH MBLEN 3 2015\-08\-08 GNU "Linux Programmer's Manual"
+.SH 名前
+mblen \- 次のマルチバイト文字のバイト数を返す
+.SH 書式
+.nf
+\fB#include <stdlib.h>\fP
+.PP
+\fBint mblen(const char *\fP\fIs\fP\fB, size_t \fP\fIn\fP\fB);\fP
+.fi
+.SH 説明
+\fIs\fP が NULL でなければ、 \fBmblen\fP()  関数は \fIs\fP から始まる最大 \fIn\fP バイトのマルチバイト文字列を検査して、
+次の完全なマルチバイト文字を取り出す。これには \fBmblen\fP()  関数のみが使用する静的で名前のないシフト状態が使用される。
+マルチバイト文字がヌルワイド文字でなければ \fIs\fP から消費される バイト数を返す。マルチバイト文字がヌルワイド文字ならば 0 を返す。
+.PP
+\fIs\fP から始まる \fIn\fP バイトが完全なマルチバイト文字を含んで いなければ、 \fBmblen\fP()  は \-1 を返す。マルチバイト文字列
+に冗長なシフトシーケンスが含まれていると、 \fIn\fP が \fIMB_CUR_MAX\fP 以上の場合にも このようなことが起こりえる。
+.PP
+\fIs\fP から始まるマルチバイト文字列が次の完全な文字の前に 不正なマルチバイト列を含んでいる場合にも、 \fBmblen\fP()  は \-1 を返す。
+.PP
+.\" The Dinkumware doc and the Single UNIX specification say this, but
+.\" glibc doesn't implement this.
+\fIs\fP が NULL ならば、 \fBmblen\fP()  関数はこの関数のみが
+使用するシフト状態を初期化状態に戻し、シフト状態を使用した文字符号の場合に はゼロ以外を、文字符号がシフト状態を持たない場合にはゼロを返す。
+.SH 返り値
+\fBmblen\fP()  関数は \fIs\fP から始まるマルチバイト列を検査して ヌルワイド文字以外を確認した場合にはそのバイト数を返す。
+ヌルワイド文字を確認した場合にはゼロを返す。不正なマルチバイト列に 遭遇した場合や完全なマルチバイト文字を解析できなかった場合には \-1 を返す。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBmblen\fP()
+T}     Thread safety   MT\-Unsafe race
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, C99.
+.SH 注意
+\fBmblen\fP()  の動作は現在のロケールの \fBLC_CTYPE\fP カテゴリーに依存している。
+.PP
+\fBmbrlen\fP(3)  関数は同じ機能のより良いインターフェースを提供する。
+.SH 関連項目
+\fBmbrlen\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/mbstowcs.3 b/manual/LDP_man-pages/draft/man3/mbstowcs.3
new file mode 100644 (file)
index 0000000..9612b71
--- /dev/null
@@ -0,0 +1,190 @@
+.\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
+.\" and Copyright 2014 Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA)
+.\" This is free documentation; you can redistribute it and/or
+.\" modify it under the terms of the GNU General Public License as
+.\" published by the Free Software Foundation; either version 2 of
+.\" the License, or (at your option) any later version.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"   GNU glibc-2 source code and manual
+.\"   Dinkumware C library reference http://www.dinkumware.com/
+.\"   OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
+.\"   ISO/IEC 9899:1999
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1999 HANATAKA Shinya
+.\"         all rights reserved.
+.\" Translated Tue Jan 11 00:56:04 JST 2000
+.\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
+.\"
+.TH MBSTOWCS 3 2020\-11\-01 GNU "Linux Programmer's Manual"
+.SH 名前
+mbstowcs \- マルチバイト文字列をワイド文字列に変換する
+.SH 書式
+.nf
+\fB#include <stdlib.h>\fP
+.PP
+\fBsize_t mbstowcs(wchar_t *\fP\fIdest\fP\fB, const char *\fP\fIsrc\fP\fB, size_t \fP\fIn\fP\fB);\fP
+.fi
+.SH 説明
+If \fIdest\fP is not NULL, the \fBmbstowcs\fP()  function converts the multibyte
+string \fIsrc\fP to a wide\-character string starting at \fIdest\fP.  At most \fIn\fP
+wide characters are written to \fIdest\fP.  The sequence of characters in the
+string \fIsrc\fP shall begin in the initial shift state.  The conversion can
+stop for three reasons:
+.IP 1. 3
+不正なマルチバイト列に遭遇した。この場合には \fI(size_t)\ \-1\fP を返す。
+.IP 2.
+\fIn\fP 文字の L\(aq\e0\(aq 以外のワイド文字を \fIdest\fP に格納した場合。 この場合は \fI*src\fP
+が次に変換されるマルチバイト列を指すようにして、 \fIdest\fP に書き込まれたワイド文字の数を返す。しかしこの指している 場所のシフト状態は失われる。
+.IP 3.
+The multibyte string has been completely converted, including the
+terminating null character (\(aq\e0\(aq).  In this case, the number of wide
+characters written to \fIdest\fP, excluding the terminating null wide
+character, is returned.
+.PP
+プログラマーは \fIdest\fP に最低でも \fIn\fP ワイド文字を書き込むこ とができる空間があることを保証しなければならない。
+.PP
+\fIdest\fP が NULL の場合、\fIn\fP は無視され、上記と同様の変換が 行われるが、変換されたワイド文字はメモリーに書き込まれず、変換先の上限
+が存在しない。
+.PP
+上記の 2. の場合を避けるためにプログラマーは \fIn\fP が \fImbstowcs(NULL,src,0)+1\fP 以上であることを保証すべきである。
+.SH 返り値
+\fBmbstowcs\fP()  関数はワイド文字列に変換完了したワイド文字の数を返す。
+終端のヌルワイド文字は含まない。不正なマルチバイト列に遭遇した場合には \fI(size_t)\ \-1\fP を返す。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBmbstowcs\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, C99.
+.SH 注意
+\fBmbstowcs\fP()  の動作は現在のロケールの \fBLC_CTYPE\fP カテゴリーに依存している。
+.PP
+\fBmbsrtowcs\fP(3)  関数は同じ機能のより良いインターフェースを提供する。
+.SH EXAMPLES
+下記のプログラムは \fBmbstowcs\fP() といくつかのワイド文字分類関数の使用方法を示したものである。実行例は以下のようになる。
+.PP
+.in +4n
+.EX
+$ ./t_mbstowcs de_DE.UTF\-8 Grüße!
+Length of source string (excluding terminator):
+    8 bytes
+    6 multibyte characters
+
+Wide character string is: Grüße! (6 characters)
+    G alpha upper
+    r alpha lower
+    ü alpha lower
+    ß alpha lower
+    e alpha lower
+    ! !alpha
+.EE
+.in
+.SS プログラムのソース
+\&
+.EX
+#include <wctype.h>
+#include <locale.h>
+#include <wchar.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+int
+main(int argc, char *argv[])
+{
+    size_t mbslen;      /* Number of multibyte characters in source */
+    wchar_t *wcs;       /* Pointer to converted wide character string */
+
+    if (argc < 3) {
+        fprintf(stderr, "Usage: %s <locale> <string>\en", argv[0]);
+        exit(EXIT_FAILURE);
+    }
+
+    /* Apply the specified locale */
+
+    if (setlocale(LC_ALL, argv[1]) == NULL) {
+        perror("setlocale");
+        exit(EXIT_FAILURE);
+    }
+
+    /* Calculate the length required to hold argv[2] converted to
+       a wide character string */
+
+    mbslen = mbstowcs(NULL, argv[2], 0);
+    if (mbslen == (size_t) \-1) {
+        perror("mbstowcs");
+        exit(EXIT_FAILURE);
+    }
+
+    /* Describe the source string to the user */
+
+    printf("Length of source string (excluding terminator):\en");
+    printf("    %zu bytes\en", strlen(argv[2]));
+    printf("    %zu multibyte characters\en\en", mbslen);
+
+    /* Allocate wide character string of the desired size.  Add 1
+       to allow for terminating null wide character (L\(aq\e0\(aq). */
+
+    wcs = calloc(mbslen + 1, sizeof(*wcs));
+    if (wcs == NULL) {
+        perror("calloc");
+        exit(EXIT_FAILURE);
+    }
+
+    /* Convert the multibyte character string in argv[2] to a
+       wide character string */
+
+    if (mbstowcs(wcs, argv[2], mbslen + 1) == (size_t) \-1) {
+        perror("mbstowcs");
+        exit(EXIT_FAILURE);
+    }
+
+    printf("Wide character string is: %ls (%zu characters)\en",
+            wcs, mbslen);
+
+    /* Now do some inspection of the classes of the characters in
+       the wide character string */
+
+    for (wchar_t *wp = wcs; *wp != 0; wp++) {
+        printf("    %lc ", (wint_t) *wp);
+
+        if (!iswalpha(*wp))
+            printf("!");
+        printf("alpha ");
+
+        if (iswalpha(*wp)) {
+            if (iswupper(*wp))
+                printf("upper ");
+
+            if (iswlower(*wp))
+                printf("lower ");
+        }
+
+        putchar(\(aq\en\(aq);
+    }
+
+    exit(EXIT_SUCCESS);
+}
+.EE
+.SH 関連項目
+\fBmblen\fP(3), \fBmbsrtowcs\fP(3), \fBmbtowc\fP(3), \fBwcstombs\fP(3), \fBwctomb\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/mbtowc.3 b/manual/LDP_man-pages/draft/man3/mbtowc.3
new file mode 100644 (file)
index 0000000..4b5f384
--- /dev/null
@@ -0,0 +1,80 @@
+.\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
+.\"
+.\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA)
+.\" This is free documentation; you can redistribute it and/or
+.\" modify it under the terms of the GNU General Public License as
+.\" published by the Free Software Foundation; either version 2 of
+.\" the License, or (at your option) any later version.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"   GNU glibc-2 source code and manual
+.\"   Dinkumware C library reference http://www.dinkumware.com/
+.\"   OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
+.\"   ISO/IEC 9899:1999
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1999 HANATAKA Shinya
+.\"         all rights reserved.
+.\" Translated Tue Jan 11 00:56:02 JST 2000
+.\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
+.\"
+.TH MBTOWC 3 2019\-03\-06 GNU "Linux Programmer's Manual"
+.SH 名前
+mbtowc \- マルチバイト列をワイド文字に変換する
+.SH 書式
+.nf
+\fB#include <stdlib.h>\fP
+.PP
+\fBint mbtowc(wchar_t *\fP\fIpwc\fP\fB, const char *\fP\fIs\fP\fB, size_t \fP\fIn\fP\fB);\fP
+.fi
+.SH 説明
+この関数が用いられる場合、通常 \fIs\fP が NULL でなく \fIpwc\fP も NULL でない。この場合は \fBmbtowc\fP()  関数は
+\fIs\fP から始まる 最大 \fIn\fP バイトのマルチバイト文字列を検査して、次の完全なマルチバイト 文字を取り出し、それをワイド文字に変換して
+\fI*pwc\fP に格納する。 同時に mbtowc 関数のみが使用する内部状態を更新する。\fIs\fP がヌルバイト (\(aq\e0\(aq)
+以外を指している場合は、\fIs\fP から消費するバイト数を返す。 \fIs\fP がヌルバイトを指している場合には 0 を返す。
+.PP
+\fIs\fP から始まる \fIn\fP バイトが完全なマルチバイト文字を含んで いない場合や不正なマルチバイト列を含んでいる場合には \fBmbtowc\fP()
+は \-1 を返す。マルチバイト文字列に冗長なシフトシーケンスが 含まれていると \fIn\fP >= \fIMB_CUR_MAX\fP
+の場合もこのようなことが 起こりえる。
+.PP
+\fIs\fP が NULL でなく \fIpwc\fP が NULL の場合は \fBmbtowc\fP()  関数は
+上記と同様に動作するが、変換したワイド文字はメモリーには書き込まれない。
+.PP
+.\" The Dinkumware doc and the Single UNIX specification say this, but
+.\" glibc doesn't implement this.
+三番目の場合として \fIs\fP が NULL の場合は \fIpwc\fP と \fIn\fP は 無視される。 \fBmbtowc\fP()
+関数のみが使用するシフト状態は初期状態に 戻される。そして文字符号がシフト状態に依存するならばゼロ以外を、文字符号が 状態によらないならばゼロを返す。
+.SH 返り値
+\fIs\fP が NULL でなければ \fBmbtowc\fP()  関数は \fIs\fP から消費した バイト数を、\fIs\fP がヌル文字を指している場合はゼロを、
+変換に失敗した場合は \-1 を返す。
+.PP
+\fIs\fP が NULL ならば \fBmbtowc\fP()  関数は文字符号がシフト状態に依存 していればゼロ以外を、状態によらなければゼロを返す。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBmbtowc\fP()
+T}     Thread safety   MT\-Unsafe race
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, C99.
+.SH 注意
+\fBmbtowc\fP()  の動作は現在のロケールの \fBLC_CTYPE\fP カテゴリーに依存している。
+.PP
+この関数はマルチスレッドでは安全ではない。 \fBmbrtowc\fP(3)  関数は 同じ機能のより良いインターフェースを提供する。
+.SH 関連項目
+\fBMB_CUR_MAX\fP(3), \fBmblen\fP(3), \fBmbrtowc\fP(3), \fBmbstowcs\fP(3),
+\fBwcstombs\fP(3), \fBwctomb\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/mkdtemp.3 b/manual/LDP_man-pages/draft/man3/mkdtemp.3
new file mode 100644 (file)
index 0000000..1eb4cb1
--- /dev/null
@@ -0,0 +1,99 @@
+.\" Copyright 2001 John Levon <moz@compsoc.man.ac.uk>
+.\" Based on mkstemp(3), Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\" and GNU libc documentation
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2001 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated Sun Oct 21 03:28:34 JST 2001
+.\"         by Yuichi SATO <ysato@h4.dion.ne.jp>
+.\"
+.TH MKDTEMP 3 2016\-07\-17 GNU "Linux Programmer's Manual"
+.SH 名前
+mkdtemp \- 他と重ならない一時的なディレクトリを作成する
+.SH 書式
+.nf
+\fB#include <stdlib.h>\fP
+.PP
+\fBchar *mkdtemp(char *\fP\fItemplate\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBmkdtemp\fP():
+.br
+.ad l
+.RS 4
+.PD 0
+/* Since glibc 2.19: */ _DEFAULT_SOURCE
+.br
+|| /* Glibc 2.19 and earlier: */ _BSD_SOURCE
+.br
+|| /* Since glibc 2.10: */ _POSIX_C_SOURCE\ >=\ 200809L
+.ad
+.PD
+.RE
+.SH 説明
+\fBmkdtemp\fP()  関数は、他と重ならない名前の一時的なディレクトリを \fItemplate\fP から作成する。 \fItemplate\fP の後から
+6 文字は XXXXXX でなければならない。 この部分はディレクトリ名を他と重ならなくするための 文字列で置き換えられる。 ディレクトリは許可属性を
+0700 として作成される。 \fItemplate\fP は変更されるので、文字列定数にしてはならず、文字配列にすべきである。
+.SH 返り値
+成功した場合、 \fBmkdtemp\fP()  関数は 変更された template 文字列へのポインターを返す。 失敗した場合は、NULL を返して、
+\fIerrno\fP を適切に設定する。
+.SH エラー
+.TP 
+\fBEINVAL\fP
+\fItemplate\fP の最後の 6 文字が XXXXXX でない。この場合、\fItemplate\fP は変更されない。
+.PP
+\fIerrno\fP に設定される他の値については、 \fBmkdir\fP(2)  を参照すること。
+.SH バージョン
+glibc 2.1.91 以降で利用可能。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBmkdtemp\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+.\" As at 2006, this function is being considered for a revision of POSIX.1
+.\" Also in NetBSD 1.4.
+POSIX.1\-2008.  この関数は BSD に存在する。
+.SH 関連項目
+\fBmktemp\fP(1), \fBmkdir\fP(2), \fBmkstemp\fP(3), \fBmktemp\fP(3), \fBtempnam\fP(3),
+\fBtmpfile\fP(3), \fBtmpnam\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
index 46ed1f0..010b425 100644 (file)
@@ -139,12 +139,12 @@ FIFOスペシャルファイルをブロックせずに扱う方法について
 \fBmkfifoat\fP() は glibc 2.4 で追加された。これは、カーネル 2.6.16 以降の Linux で利用できる
 \fBmknodat\fP(2) を使って実装されている。
 .SH 属性
-For an explanation of the terms used in this section, see \fBattributes\fP(7).
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
 .TS
 allbox;
 lbw20 lb lb
 l l l.
-Interface      Attribute       Value
+インターフェース       属性  値
 T{
 \fBmkfifo\fP(),
 \fBmkfifoat\fP()
diff --git a/manual/LDP_man-pages/draft/man3/mkstemp.3 b/manual/LDP_man-pages/draft/man3/mkstemp.3
new file mode 100644 (file)
index 0000000..b611126
--- /dev/null
@@ -0,0 +1,182 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\" and Copyright (C) 2008, Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified Sat Jul 24 18:48:48 1993 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 980310, aeb
+.\" Modified 990328, aeb
+.\" 2008-06-19, mtk, Added mkostemp(); various other changes
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 Kazuyuki Tanisako
+.\"         all rights reserved.
+.\" Translated 1997-05-17, Kazuyuki Tanisako <tanisako@osa.dec-j.co.jp>
+.\" Modified 1997-05-27, Kazuyuki Tanisako <tanisako@osa.dec-j.co.jp>
+.\" Modified 1998-02-05, Kazuyuki Tanisako <tanisako@osa.dec-j.co.jp>
+.\" Modified 1998-09-27, Kazuyuki Tanisako <tanisako@osa.dec-j.co.jp>
+.\" Modified 1999-04-10, Kazuyuki Tanisako <tanisako@osa.dec.com>
+.\" Updated 2001-01-17, Kentaro Shirakata <argrath@ub32.org>
+.\" Updated 2005-02-26, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2008-08-10, Akihiro MOTOKI, LDP v3.05
+.\" Updated 2012-04-27, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2012-05-01, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2013-03-26, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH MKSTEMP 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+mkstemp, mkostemp, mkstemps, mkostemps \- 他と重ならない名前を持つ一時ファイルを作成する
+.SH 書式
+.nf
+\fB#include <stdlib.h>\fP
+.PP
+\fBint mkstemp(char *\fP\fItemplate\fP\fB);\fP
+.PP
+\fBint mkostemp(char *\fP\fItemplate\fP\fB, int \fP\fIflags\fP\fB);\fP
+.PP
+\fBint mkstemps(char *\fP\fItemplate\fP\fB, int \fP\fIsuffixlen\fP\fB);\fP
+.PP
+\fBint mkostemps(char *\fP\fItemplate\fP\fB, int \fP\fIsuffixlen\fP\fB, int \fP\fIflags\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBmkstemp\fP():
+.ad l
+.RS 4
+.PD 0
+.\"    || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
+_XOPEN_SOURCE\ >=\ 500
+    || /* Since glibc 2.12: */ _POSIX_C_SOURCE\ >=\ 200809L
+    || /* Glibc versions <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
+.PD
+.RE
+.ad b
+.PP
+\fBmkostemp\fP(): _GNU_SOURCE
+.br
+\fBmkstemps\fP():
+    /* Glibc since 2.19: */ _DEFAULT_SOURCE
+        || /* Glibc versions <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
+.br
+\fBmkostemps\fP(): _GNU_SOURCE
+.SH 説明
+関数 \fBmkstemp\fP()  は引数 \fItemplate\fP から他と重ならない一時ファイル名を生成し、 そのファイルの作成とオープンを行い、
+そのファイルに対するオープン済みのファイルディスクリプターを返す。
+.PP
+引数 \fItemplate\fP で指示する文字列の後ろの 6 文字は XXXXXX である必要がある。
+この部分がファイル名を他と重ならないようにする文字で置き換えられる。 \fItemplate\fP は書き換えられるため、文字列定数ではなく文字配列として
+宣言するようにしなければならない。
+.PP
+ファイルは許可モード 0600 で作成され、所有者のみが読み書き可能である。返されるファイルディスクリプターで、このファイルへの読み書き両方のアクセスが
+可能である。 呼び出し者がそのファイルを作成するプロセスであることを保証するために、 ファイルは \fBopen\fP(2)  の \fBO_EXCL\fP
+フラグ付きでオープンされる。
+.PP
+.\" Reportedly, FreeBSD
+\fBmkostemp\fP() 関数は \fBmkstemp\fP() と同様だが、 \fIflags\fP に \fBO_APPEND\fP, \fBO_CLOEXEC\fP,
+\fBO_SYNC\fP のビットを指定できる点が異なる (意味は \fBopen\fP(2) と同じである)。ファイルを作成する際、 \fBmkostemp\fP()
+は \fBopen\fP(2) に渡す \fIflags\fP 引き数に \fBO_RDWR\fP, \fBO_CREAT\fP, \fBO_EXCL\fP を含める。そのため、
+\fBmkostemp\fP() に渡す \fIflags\fP 引き数にこれらの値を含める必要はなく、システムによってはエラーが発生する点に注意すること。
+.PP
+\fBmkstemps\fP() 関数は \fBmkstemp\fP() と同様だが、 \fItemplate\fP 内の文字列に長さ
+が \fIsuffixlen\fP 文字の接尾辞 (suffix) が含まれる点が異なる。
+したがって、 \fItemplate\fP は \fIprefixXXXXXXsuffix\fP の形式となる。
+文字列 XXXXXX の部分は \fBmkstemp\fP() により更新される。
+.PP
+\fBmkostemps\fP() と \fBmkstemps\fP() の関係は、
+\fBmkostemp\fP() と \fBmkstemp\fP() の関係と同じである。
+.SH 返り値
+成功すると、これらの関数は一時ファイルのファイルディスクリプターを返す。 エラーの場合は、\-1 を返し、 \fIerrno\fP を適切に設定する。
+.SH エラー
+.TP 
+\fBEEXIST\fP
+すでに同じ名前を持つファイルが存在した。 \fItemplate\fP の内容は不定である。
+.TP 
+\fBEINVAL\fP
+\fBmkstemp\fP() と \fBmkostemp\fP() の場合:
+\fItemplate\fP の最後の 6 文字が XXXXXX でなかった。
+この場合、\fItemplate\fP は変更されない。
+.IP
+\fBmkstemps\fP() と \fBmkostemps\fP() の場合:
+\fItemplate\fP の長さが \fI(6 + suffixlen)\fP 文字より短い、または
+\fItemplate\fP の接尾辞の直前の 6 文字が XXXXXX ではなかった。
+.PP
+これらの関数は \fBopen\fP(2) に書かれているエラーのいずれかで失敗することもある。
+.SH バージョン
+\fBmkostemp\fP() は glibc 2.7 以降で利用できる。
+\fBmkstemps\fP() と \fBmkostemps\fP() は glibc 2.11 以降で利用できる。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw23 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBmkstemp\fP(),
+\fBmkostemp\fP(),
+.br
+\fBmkstemps\fP(),
+\fBmkostemps\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+\fBmkstemp\fP(): 4.3BSD, POSIX.1\-2001.
+.PP
+.\" mkstemps() appears to be at least on the BSDs, Mac OS X, Solaris,
+.\" and Tru64.
+\fBmkstemps\fP(): 標準化されていないが、他のいくつかのシステムにも存在する。
+.PP
+\fBmkostemp\fP() と \fBmkostemps\fP(): glibc による拡張。
+.SH 注意
+glibc バージョン 2.06 以前では、ファイルは許可モード 0666 で作成され、全てのユーザーが読み書き可能であった。この古い動作は、
+セキュリティ上のリスクになり得る。特に、他の UNIX では許可モードとして 0600
+を使うため、プログラムを移植する際、この細かな違いを見落とす可能性があるからだ。 POSIX.1\-2008 では、ファイルを許可モード 0600
+で作成することが必須要件として追加された。
+.PP
+.\"
+.\" The prototype for
+.\" .BR mkstemp ()
+.\" is in
+.\" .I <unistd.h>
+.\" for libc4, libc5, glibc1; glibc2 follows POSIX.1 and has the prototype in
+.\" .IR <stdlib.h> .
+より一般的には、 \fBmkstemp\fP()  の POSIX 規定ではファイルモードについて何も述べていない。 従って、アプリケーションは
+\fBmkstemp\fP()  (や \fBmkostemp\fP())  を呼び出す前にファイルモード生成マスク (\fBumask\fP(2)  参照)
+が適切に設定されているか確認するべきである。
+.SH 関連項目
+\fBmkdtemp\fP(3), \fBmktemp\fP(3), \fBtempnam\fP(3), \fBtmpfile\fP(3), \fBtmpnam\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/mktemp.3 b/manual/LDP_man-pages/draft/man3/mktemp.3
new file mode 100644 (file)
index 0000000..a31516c
--- /dev/null
@@ -0,0 +1,120 @@
+.\" Copyright (C) 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified Sat Jul 24 18:48:06 1993 by Rik Faith (faith@cs.unc.edu)
+.\" Modified Fri Jun 23 01:26:34 1995 by Andries Brouwer (aeb@cwi.nl)
+.\" (prompted by Scott Burkett <scottb@IntNet.net>)
+.\" Modified Sun Mar 28 23:44:38 1999 by Andries Brouwer (aeb@cwi.nl)
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 Kazuyuki Tanisako
+.\"         all rights reserved.
+.\" Translated Sat Apr 10 02:12:40 JST 1999
+.\"         by Kazuyuki Tanisako <tanisako@osa.dec.com>
+.\"
+.TH MKTEMP 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+mktemp \- 他と重ならないテンポラリファイル名を作成する
+.SH 書式
+.nf
+\fB#include <stdlib.h>\fP
+.PP
+\fBchar *mktemp(char *\fP\fItemplate\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBmktemp\fP():
+.ad l
+.PD 0
+.RS 4
+.TP  4
+glibc 2.12 以降:
+(_XOPEN_SOURCE\ >=\ 500) && ! (_POSIX_C_SOURCE\ >=\ 200112L)
+    || /* Glibc since 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
+.TP 
+glibc 2.12 より前:
+.\"    || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
+_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500
+.RE
+.PD
+.ad b
+.SH 説明
+\fINever use this function\fP; see BUGS.
+.PP
+関数 \fBmktemp\fP()  は引数 \fItemplate\fP から他と重ならない テンポラリファイル名を作成する。引数 \fItemplate\fP
+で指示する文字配列 の後6文字は XXXXXX である必要がある。この部分がファイル名を他と 重ならないにするような文字で置き換えられる。
+\fItemplate\fP は書き換えられるため、文字列定数ではなく文字配列として宣言するように しなければならない。
+.SH 返り値
+関数 \fBmktemp\fP()  は常に \fItemplate\fP を戻す。 一意な名前が作成された場合、 \fItemplate\fP の最後の 6 バイトに
+他と重ならない名前 (それまでに出ていない名前) になるような値が格納される。 一意な名前が作成できなかった場合には、 \fItemplate\fP
+には空文字列がセットされ、 \fIerrno\fP にエラーを示す値がセットされる。
+.SH エラー
+.TP 
+\fBEINVAL\fP
+引数 \fItemplate\fP で指示された文字列の後6文字が XXXXXX でない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBmktemp\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+.\" .SH NOTES
+.\" The prototype is in
+.\" .I <unistd.h>
+.\" for libc4, libc5, glibc1; glibc2 follows the Single UNIX Specification
+.\" and has the prototype in
+.\" .IR <stdlib.h> .
+4.3BSD, POSIX.1\-2001.  POSIX.1\-2008 では \fBmktemp\fP()  の仕様が削除されている。
+.SH バグ
+Never use \fBmktemp\fP().  Some implementations follow 4.3BSD and replace
+XXXXXX by the current process ID and a single letter, so that at most 26
+different names can be returned.  Since on the one hand the names are easy
+to guess, and on the other hand there is a race between testing whether the
+name exists and opening the file, every use of \fBmktemp\fP()  is a security
+risk.  The race is avoided by \fBmkstemp\fP(3)  and \fBmkdtemp\fP(3).
+.SH 関連項目
+\fBmktemp\fP(1), \fBmkdtemp\fP(3), \fBmkstemp\fP(3), \fBtempnam\fP(3), \fBtmpfile\fP(3),
+\fBtmpnam\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/mq_close.3 b/manual/LDP_man-pages/draft/man3/mq_close.3
new file mode 100644 (file)
index 0000000..1b7d57c
--- /dev/null
@@ -0,0 +1,77 @@
+.\" Copyright (C) 2006 Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI all rights reserved.
+.\" Translated 2006-04-23, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH MQ_CLOSE 3 2020\-08\-13 Linux "Linux Programmer's Manual"
+.SH 名前
+mq_close \- メッセージキュー記述子をクローズする
+.SH 書式
+.nf
+\fB#include <mqueue.h>\fP
+.PP
+\fBint mq_close(mqd_t \fP\fImqdes\fP\fB);\fP
+.fi
+.PP
+\fI\-lrt\fP でリンクする。
+.SH 説明
+\fBmq_close\fP()  はメッセージキュー記述子 (message queue descriptor)  \fImqdes\fP をクローズする。
+.PP
+If the calling process has attached a notification request (see
+(\fBmq_notify\fP(3))  to this message queue via \fImqdes\fP, then this request is
+removed, and another process can now attach a notification request.
+.SH 返り値
+成功すると、 \fBmq_close\fP()  は 0 を返す。エラーの場合、\-1 を返し、 \fIerrno\fP にエラーを示す値を設定する。
+.SH エラー
+.TP 
+\fBEBADF\fP
+The message queue descriptor specified in \fImqdes\fP is invalid.
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBmq_close\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+プロセス終了時、もしくは \fBexecve\fP(2)  実行時に、全てのオープンされたメッセージキューは自動的にクローズされる。
+.SH 関連項目
+\fBmq_getattr\fP(3), \fBmq_notify\fP(3), \fBmq_open\fP(3), \fBmq_receive\fP(3),
+\fBmq_send\fP(3), \fBmq_unlink\fP(3), \fBmq_overview\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/mq_getattr.3 b/manual/LDP_man-pages/draft/man3/mq_getattr.3
new file mode 100644 (file)
index 0000000..4d9ccff
--- /dev/null
@@ -0,0 +1,182 @@
+.\" Copyright (C) 2006 Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI all rights reserved.
+.\" Translated 2006-04-23, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2008-11-09, Akihiro MOTOKI, LDP v3.13
+.\"
+.TH MQ_GETATTR 3 2020\-06\-09 Linux "Linux Programmer's Manual"
+.SH 名前
+mq_getattr, mq_setattr \- メッセージキューの属性を設定/取得する
+.SH 書式
+.nf
+\fB#include <mqueue.h>\fP
+.PP
+\fBint mq_getattr(mqd_t \fP\fImqdes\fP\fB, struct mq_attr *\fP\fIattr\fP\fB);\fP
+.PP
+\fBint mq_setattr(mqd_t \fP\fImqdes\fP\fB, const struct mq_attr *\fP\fInewattr\fP\fB,\fP
+\fB                 struct mq_attr *\fP\fIoldattr\fP\fB);\fP
+.fi
+.PP
+\fI\-lrt\fP でリンクする。
+.SH 説明
+\fBmq_getattr\fP()  and \fBmq_setattr\fP()  respectively retrieve and modify
+attributes of the message queue referred to by the message queue descriptor
+\fImqdes\fP.
+.PP
+\fBmq_getattr\fP()  は、 \fIattr\fP が指すバッファーに \fImq_attr\fP
+構造体を格納して返す。この構造体は以下のように定義されている:
+.PP
+.in +4n
+.EX
+struct mq_attr {
+    long mq_flags;       /* フラグ: 0 か O_NONBLOCK */
+    long mq_maxmsg;      /* キューの最大メッセージ数 */
+    long mq_msgsize;     /* 最大メッセージサイズ (バイト単位) */
+    long mq_curmsgs;     /* キューに現在入っているメッセージ数 */
+};
+.EE
+.in
+.PP
+\fImq_flags\fP フィールドには、オープンメッセージキュー記述 (open message queue description)
+に関連付けられているフラグが格納される。 このフィールドは \fBmq_open\fP(3)  でキューが作成される際に初期化される。
+このフィールドに現れるフラグは \fBO_NONBLOCK\fP だけである。
+.PP
+\fImq_maxmsg\fP と \fImq_msgsize\fP フィールドは \fBmq_open\fP(3)  でメッセージキューが作成される際にセットされる。
+\fImq_maxmsg\fP フィールドは、 \fBmq_send\fP(3)  を使ってキューに入れることができるメッセージ数の上限である。
+\fImq_msgsize\fP フィールドは、キューに入れることができるメッセージの 上限サイズである。 これらのフィールドはどちらも 0
+より大きな値でなければならない。 これらのフィールドに設定できる値の上限は \fI/proc\fP ファイルにより決まる。 \fI/proc\fP ファイルの詳細は
+\fBmq_overview\fP(7)  に説明されている。
+.PP
+\fImq_curmsgs\fP フィールドはキューに現在格納されているメッセージ数を返す。
+.PP
+\fBmq_setattr\fP()  は、 \fInewattr\fP が指す \fImq_attr\fP
+構造体で与えられた情報を使って、メッセージキューの属性を設定する。 変更することができる属性は、 \fImq_flags\fP の \fBO_NONBLOCK\fP
+フラグの設定だけである。 \fInewattr\fP の他のフィールドは無視される。 \fIoldattr\fP フィールドが NULL 以外の場合、
+\fBmq_getattr\fP()  が返すのと同じ情報を格納した \fImq_attr\fP 構造体を \fIoldattr\fP が指すバッファーに入れて返す。
+.SH 返り値
+成功すると、 \fImq_getattr ()\fP と \fImq_setattr ()\fP は 0 を返す。エラーの場合、\-1 を返し、 \fIerrno\fP
+にエラーを示す値を設定する。
+.SH エラー
+.TP 
+\fBEBADF\fP
+The message queue descriptor specified in \fImqdes\fP is invalid.
+.TP 
+\fBEINVAL\fP
+\fInewattr\->mq_flags\fP に \fBO_NONBLOCK\fP 以外のビットがセットされていた。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw26 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBmq_getattr\fP(),
+\fBmq_setattr\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+Linux では、 \fBmq_getattr\fP()  と \fBmq_setattr\fP()  はライブラリ関数であり、
+\fBmq_getsetattr\fP(2)  システムコールを用いて実装されている。
+.SH EXAMPLES
+下記のプログラムを使うと、 \fIattr\fP 引き数に NULL を指定して \fBmq_open\fP(3)
+を呼び出した際に作成されるメッセージキューに割り当てられるデフォルトの \fImq_maxmsg\fP と \fImq_msgsize\fP の値を表示できる。
+このプログラムの実行例を以下に示す。
+.PP
+.in +4n
+.EX
+$ \fB./a.out /testq\fP
+Maximum # of messages on queue:   10
+Maximum message size:             8192
+.EE
+.in
+.PP
+Linux 3.5 以降では、 (\fBmq_overview\fP(7) に説明がある) 以下の \fI/proc\fP
+ファイルを使ってデフォルト値を制御できる。
+.PP
+.in +4n
+.EX
+$ \fBuname \-sr\fP
+Linux 3.8.0
+$ \fBcat /proc/sys/fs/mqueue/msg_default\fP
+10
+$ \fBcat /proc/sys/fs/mqueue/msgsize_default\fP
+8192
+.EE
+.in
+.SS プログラムのソース
+\&
+.EX
+#include <mqueue.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \e
+                        } while (0)
+
+int
+main(int argc, char *argv[])
+{
+    mqd_t mqd;
+    struct mq_attr attr;
+
+    if (argc != 2) {
+        fprintf(stderr, "Usage: %s mq\-name\en", argv[0]);
+        exit(EXIT_FAILURE);
+    }
+
+    mqd = mq_open(argv[1], O_CREAT | O_EXCL, S_IRUSR | S_IWUSR, NULL);
+    if (mqd == (mqd_t) \-1)
+        errExit("mq_open");
+
+    if (mq_getattr(mqd, &attr) == \-1)
+        errExit("mq_getattr");
+
+    printf("Maximum # of messages on queue:   %ld\en", attr.mq_maxmsg);
+    printf("Maximum message size:             %ld\en", attr.mq_msgsize);
+
+    if (mq_unlink(argv[1]) == \-1)
+        errExit("mq_unlink");
+
+    exit(EXIT_SUCCESS);
+}
+.EE
+.SH 関連項目
+\fBmq_close\fP(3), \fBmq_notify\fP(3), \fBmq_open\fP(3), \fBmq_receive\fP(3),
+\fBmq_send\fP(3), \fBmq_unlink\fP(3), \fBmq_overview\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
index 2637697..d94a144 100644 (file)
@@ -109,12 +109,12 @@ The message queue descriptor specified in \fImqdes\fP is invalid.
 POSIX.1\-2008 では、 \fIsevp\fP が NULL で、呼び出し元のプロセスがキュー \fImqdes\fP
 に関する通知を受信するように登録されていない場合、エラー \fBEINVAL\fP を生成するような実装を行っても「よい」ことになっている。
 .SH 属性
-For an explanation of the terms used in this section, see \fBattributes\fP(7).
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
 .TS
 allbox;
 lb lb lb
 l l l.
-Interface      Attribute       Value
+インターフェース       属性  値
 T{
 \fBmq_notify\fP()
 T}     Thread safety   MT\-Safe
diff --git a/manual/LDP_man-pages/draft/man3/mq_open.3 b/manual/LDP_man-pages/draft/man3/mq_open.3
new file mode 100644 (file)
index 0000000..f4adf7c
--- /dev/null
@@ -0,0 +1,192 @@
+.\" Copyright (C) 2006 Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI all rights reserved.
+.\" Translated 2006-04-23, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH MQ_OPEN 3 2020\-08\-13 Linux "Linux Programmer's Manual"
+.SH 名前
+mq_open \- メッセージキューをオープンする
+.SH 書式
+.nf
+\fB#include <fcntl.h>\fP           /* For O_* constants */
+\fB#include <sys/stat.h>\fP        /* For mode constants */
+\fB#include <mqueue.h>\fP
+.PP
+\fBmqd_t mq_open(const char *\fP\fIname\fP\fB, int \fP\fIoflag\fP\fB);\fP
+\fBmqd_t mq_open(const char *\fP\fIname\fP\fB, int \fP\fIoflag\fP\fB, mode_t \fP\fImode\fP\fB,\fP
+\fB              struct mq_attr *\fP\fIattr\fP\fB);\fP
+.fi
+.PP
+\fI\-lrt\fP でリンクする。
+.SH 説明
+\fBmq_open\fP()  は、新しい POSIX メッセージキューを作成するか、既存のキューを オープンする。キューは \fIname\fP で識別される。
+\fIname\fP の構成の詳細については \fBmq_overview (7)\fP を参照。
+.PP
+\fIoflag\fP 引き数には、関数呼び出しの操作を制御するフラグを指定する (oflag の値の定義は \fI<fcntl.h>\fP
+のインクルードにより得られる)。 \fIoflag\fP には、以下のうちいずれか一つを必ず指定しなければならない。
+.TP 
+\fBO_RDONLY\fP
+メッセージの受信専用としてキューをオープンする。
+.TP 
+\fBO_WRONLY\fP
+メッセージの送信専用としてキューをオープンする。
+.TP 
+\fBO_RDWR\fP
+メッセージの送受信両用としてキューをオープンする。
+.PP
+0 個以上の下記のフラグを、ビット単位の OR (論理和) で \fIoflag\fP に追加で指定できる。
+.TP 
+\fBO_CLOEXEC\fP (Linux 2.6.26 以降)
+.\" commit 269f21344b23e552c21c9e2d7ca258479dcd7a0a
+メッセージキュー記述子に close\-on\-exec フラグをセットする。 なぜこのフラグが有用かについての議論は \fBopen\fP(2) を参照。
+.TP 
+\fBO_CREAT\fP
+.\" In reality the filesystem IDs are used on Linux.
+存在しない場合、メッセージキューを作成する。 メッセージキューの所有者 (ユーザー ID) とグループ所有権 (グループ ID) は、
+それぞれ呼び出し元プロセスの実効ユーザー ID と実効グループ ID に設定される。
+.TP 
+\fBO_EXCL\fP
+\fBO_CREAT\fP が \fIoflag\fP に指定され、かつ指定された名前 \fIname\fP を持つキューがすでに存在する場合、エラー \fBEEXIST\fP
+で失敗する。
+.TP 
+\fBO_NONBLOCK\fP
+非停止 (nonblocking) モードでキューをオープンする。 \fBmq_receive\fP(3)  と \fBmq_send\fP(3)  は、通常は停止
+(block) する状況において、エラー \fBEAGAIN\fP で失敗するようになる。
+.PP
+\fIoflag\fP に \fBO_CREAT\fP を指定する場合、追加で 2つの引き数を与える必要がある。 \fImode\fP
+引き数は、新しいキューに適用される許可設定 (permission) を、 \fBopen\fP(2)  と同じように指定する (許可ビットのシンボル定義は
+\fI<sys/stat.h>\fP のインクルードにより得られる)。 許可設定はプロセスの umask でマスクされる。
+.PP
+The fields of the \fIstruct mq_attr\fP pointed to \fIattr\fP specify the maximum
+number of messages and the maximum size of messages that the queue will
+allow.  This structure is defined as follows:
+.PP
+.in +4n
+.EX
+struct mq_attr {
+    long mq_flags;       /* Flags (ignored for mq_open()) */
+    long mq_maxmsg;      /* Max. # of messages on queue */
+    long mq_msgsize;     /* Max. message size (bytes) */
+    long mq_curmsgs;     /* # of messages currently in queue
+                            (ignored for mq_open()) */
+};
+.EE
+.in
+.PP
+Only the \fImq_maxmsg\fP and \fImq_msgsize\fP fields are employed when calling
+\fBmq_open\fP(); the values in the remaining fields are ignored.
+.PP
+If \fIattr\fP is NULL, then the queue is created with implementation\-defined
+default attributes.  Since Linux 3.5, two \fI/proc\fP files can be used to
+control these defaults; see \fBmq_overview\fP(7)  for details.
+.SH 返り値
+成功すると、 \fBmq_open\fP()  はメッセージキュー記述子 (message queue descriptor) を返す。
+メッセージキュー記述子は他のメッセージキュー関連の関数で使用される。 エラーの場合、 \fBmq_open\fP()  は \fI(mqd_t)\ \-1\fP
+を返し、 \fIerrno\fP にエラーを示す値を設定する。
+.SH エラー
+.TP 
+\fBEACCES\fP
+キューは存在するが、呼び出し元が指定されたモードでそのキュー をオープンする許可を持たない。
+.TP 
+\fBEACCES\fP
+.\" Note that this isn't consistent with the same case for sem_open()
+\fIname\fP にスラッシュが 2 個以上含まれていた。
+.TP 
+\fBEEXIST\fP
+\fIoflag\fP に \fBO_CREAT\fP と \fBO_EXCL\fP の両方が指定されたが、指定された名前 \fIname\fP を持つキューがすでに存在する。
+.TP 
+\fBEINVAL\fP
+.\" glibc checks whether the name starts with a "/" and if not,
+.\" gives this error
+\fIname\fP doesn't follow the format in \fBmq_overview\fP(7).
+.TP 
+\fBEINVAL\fP
+\fIoflag\fP に \fBO_CREAT\fP が指定され、かつ \fIattr\fP が NULL 以外だが、 \fIattr\->mq_maxmsg\fP か
+\fIattr\->mq_msqsize\fP が不正であった。 これらのフィールドは両方とも 0 より大きくなければならない。
+プロセスが特権を持たない (\fBCAP_SYS_RESOURCE\fP ケーパビリティを持たない) 場合、 \fIattr\->mq_maxmsg\fP と
+\fIattr\->mq_msgsize\fP は、それぞれ上限 \fImsg_max\fP、 \fImsgsize_max\fP 以下でなければならない。
+また、特権プロセスの場合でも、 \fIattr\->mq_maxmsg\fP は \fBHARD_MAX\fP 上限を超えることはできない。
+(これらの上限に関する詳細は \fBmq_overview\fP(7)  を参照。)
+.TP 
+\fBEMFILE\fP
+The per\-process limit on the number of open file and message queue
+descriptors has been reached (see the description of \fBRLIMIT_NOFILE\fP in
+\fBgetrlimit\fP(2)).
+.TP 
+\fBENAMETOOLONG\fP
+\fIname\fP が長過ぎる。
+.TP 
+\fBENFILE\fP
+The system\-wide limit on the total number of open files and message queues
+has been reached.
+.TP 
+\fBENOENT\fP
+\fBO_CREAT\fP フラグが \fIoflag\fP に指定されなかったが、指定された名前 \fIname\fP を持つキューが存在しない。
+.TP 
+\fBENOENT\fP
+.\" Note that this isn't consistent with the same case for sem_open()
+\fIname\fP が "/" だけで、その後ろに他の文字が続いていなかった。
+.TP 
+\fBENOMEM\fP
+十分なメモリーがない。
+.TP 
+\fBENOSPC\fP
+新しいメッセージキューを作成するのに十分な空間がない。 このエラーはおそらく \fIqueues_max\fP 上限に抵触したため起こったのだろう。
+\fBmq_overview\fP(7)  を参照。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBmq_open\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+.SS "C library/kernel differences"
+The \fBmq_open\fP()  library function is implemented on top of a system call of
+the same name.  The library function performs the check that the \fIname\fP
+starts with a slash (/), giving the \fBEINVAL\fP error if it does not.  The
+kernel system call expects \fIname\fP to contain no preceding slash, so the C
+library function passes \fIname\fP without the preceding slash (i.e.,
+\fIname+1\fP)  to the system call.
+.SH バグ
+2.6.14 より前のカーネルには、 プロセスの umask が \fImode\fP で指定された許可設定に適用されなかった。
+.SH 関連項目
+\fBmq_close\fP(3), \fBmq_getattr\fP(3), \fBmq_notify\fP(3), \fBmq_receive\fP(3),
+\fBmq_send\fP(3), \fBmq_unlink\fP(3), \fBmq_overview\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/mq_receive.3 b/manual/LDP_man-pages/draft/man3/mq_receive.3
new file mode 100644 (file)
index 0000000..d527b92
--- /dev/null
@@ -0,0 +1,140 @@
+.\" Copyright (C) 2006 Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI all rights reserved.
+.\" Translated 2006-04-23, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2008-11-09, Akihiro MOTOKI, LDP v3.13
+.\"
+.TH MQ_RECEIVE 3 2020\-08\-13 Linux "Linux Programmer's Manual"
+.SH 名前
+mq_receive, mq_timedreceive \- メッセージキューからメッセージを受信する
+.SH 書式
+.nf
+\fB#include <mqueue.h>\fP
+.PP
+\fBssize_t mq_receive(mqd_t \fP\fImqdes\fP\fB, char *\fP\fImsg_ptr\fP\fB,\fP
+\fB                   size_t \fP\fImsg_len\fP\fB, unsigned int *\fP\fImsg_prio\fP\fB);\fP
+.PP
+\fB#include <time.h>\fP
+\fB#include <mqueue.h>\fP
+.PP
+\fBssize_t mq_timedreceive(mqd_t \fP\fImqdes\fP\fB, char *\fP\fImsg_ptr\fP\fB,\fP
+\fB                   size_t \fP\fImsg_len\fP\fB, unsigned int *\fP\fImsg_prio\fP\fB,\fP
+\fB                   const struct timespec *\fP\fIabs_timeout\fP\fB);\fP
+.fi
+.PP
+\fI\-lrt\fP でリンクする。
+.PP
+.ad l
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBmq_timedreceive\fP():
+.RS 4
+_POSIX_C_SOURCE\ >=\ 200112L
+.RE
+.ad
+.SH 説明
+\fBmq_receive\fP()  removes the oldest message with the highest priority from
+the message queue referred to by the message queue descriptor \fImqdes\fP, and
+places it in the buffer pointed to by \fImsg_ptr\fP.  The \fImsg_len\fP argument
+specifies the size of the buffer pointed to by \fImsg_ptr\fP; this must be
+greater than or equal to the \fImq_msgsize\fP attribute of the queue (see
+\fBmq_getattr\fP(3)).  If \fImsg_prio\fP is not NULL, then the buffer to which it
+points is used to return the priority associated with the received message.
+.PP
+キューが空の場合、デフォルトでは、 \fBmq_receive\fP()  は、新しいメッセージが届くか、関数呼び出しがシグナルハンドラーにより
+中断されるまで、停止 (block) する。 メッセージキュー記述 (message queue description) で
+\fBO_NONBLOCK\fP フラグが有効になっている場合は、 \fBmq_receive\fP()  はエラー \fBEAGAIN\fP ですぐに失敗する。
+.PP
+\fBmq_timedreceive\fP()  behaves just like \fBmq_receive\fP(), except that if the
+queue is empty and the \fBO_NONBLOCK\fP flag is not enabled for the message
+queue description, then \fIabs_timeout\fP points to a structure which specifies
+how long the call will block.  This value is an absolute timeout in seconds
+and nanoseconds since the Epoch, 1970\-01\-01 00:00:00 +0000 (UTC), specified
+in the following structure:
+.PP
+.in +4n
+.EX
+struct timespec {
+    time_t tv_sec;        /* 秒 */
+    long   tv_nsec;       /* ナノ秒 */
+};
+.EE
+.in
+.PP
+メッセージがキューになく、関数呼び出し時にすでにタイムアウト時刻が 過ぎている場合、 \fBmq_timedreceive\fP()  はすぐに返る。
+.SH 返り値
+成功すると、 \fBmq_receive\fP()  と \fBmq_timedreceive\fP()  は受信したメッセージのバイト数を返す。
+エラーの場合、\-1 を返し、 \fIerrno\fP にエラーを示す値を設定する。
+.SH エラー
+.TP 
+\fBEAGAIN\fP
+キューが空で、かつ \fImqdes\fP で参照されるメッセージキュー記述で \fBO_NONBLOCK\fP フラグがセットされていた。
+.TP 
+\fBEBADF\fP
+The descriptor specified in \fImqdes\fP was invalid or not opened for reading.
+.TP 
+\fBEINTR\fP
+関数呼び出しがシグナルハンドラーにより中断された。 \fBsignal\fP(7)  参照。
+.TP 
+\fBEINVAL\fP
+関数呼び出しは停止するはずであったが、 \fIabs_timeout\fP が不正であった。 \fIabs_timeout\fP が不正とは、 \fItv_sec\fP
+が 0 未満、もしくは \fItv_nsec\fP が 0 未満か 1,000,000,000 より大きい、ということである。
+.TP 
+\fBEMSGSIZE\fP
+\fImsg_len\fP がメッセージキューの \fImq_msgsize\fP 属性よりも小さかった。
+.TP 
+\fBETIMEDOUT\fP
+メッセージが転送される前に関数呼び出しがタイムアウトした。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw31 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBmq_receive\fP(),
+\fBmq_timedreceive\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+Linux では、 \fBmq_timedreceive\fP()  はシステムコールである。 \fBmq_receive\fP()  はライブラリ関数で、
+\fBmq_timedreceive\fP()  システムコールを用いて実装されている。
+.SH 関連項目
+\fBmq_close\fP(3), \fBmq_getattr\fP(3), \fBmq_notify\fP(3), \fBmq_open\fP(3),
+\fBmq_send\fP(3), \fBmq_unlink\fP(3), \fBmq_overview\fP(7), \fBtime\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/mq_send.3 b/manual/LDP_man-pages/draft/man3/mq_send.3
new file mode 100644 (file)
index 0000000..a69660e
--- /dev/null
@@ -0,0 +1,145 @@
+.\" Copyright (C) 2006 Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI all rights reserved.
+.\" Translated 2006-04-23, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2008-11-09, Akihiro MOTOKI, LDP v3.13
+.\"
+.TH MQ_SEND 3 2020\-08\-13 Linux "Linux Programmer's Manual"
+.SH 名前
+mq_send, mq_timedsend \- メッセージキューにメッセージを送信する
+.SH 書式
+.nf
+\fB#include <mqueue.h>\fP
+.PP
+\fBint mq_send(mqd_t \fP\fImqdes\fP\fB, const char *\fP\fImsg_ptr\fP\fB,\fP
+\fB              size_t \fP\fImsg_len\fP\fB, unsigned int \fP\fImsg_prio\fP\fB);\fP
+.PP
+\fB#include <time.h>\fP
+\fB#include <mqueue.h>\fP
+.PP
+\fBint mq_timedsend(mqd_t \fP\fImqdes\fP\fB, const char *\fP\fImsg_ptr\fP\fB,\fP
+\fB              size_t \fP\fImsg_len\fP\fB, unsigned int \fP\fImsg_prio\fP\fB,\fP
+\fB              const struct timespec *\fP\fIabs_timeout\fP\fB);\fP
+.fi
+.PP
+\fI\-lrt\fP でリンクする。
+.PP
+.ad l
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBmq_timedsend\fP():
+.RS 4
+_POSIX_C_SOURCE\ >=\ 200112L
+.RE
+.ad
+.SH 説明
+\fBmq_send\fP()  adds the message pointed to by \fImsg_ptr\fP to the message queue
+referred to by the message queue descriptor \fImqdes\fP.  The \fImsg_len\fP
+argument specifies the length of the message pointed to by \fImsg_ptr\fP; this
+length must be less than or equal to the queue's \fImq_msgsize\fP attribute.
+Zero\-length messages are allowed.
+.PP
+The \fImsg_prio\fP argument is a nonnegative integer that specifies the
+priority of this message.  Messages are placed on the queue in decreasing
+order of priority, with newer messages of the same priority being placed
+after older messages with the same priority.  See \fBmq_overview\fP(7)  for
+details on the range for the message priority.
+.PP
+メッセージキューがすでに一杯の場合 (すなわち、キューに入っているメッセージ数がキューの \fImq_maxmsg\fP 属性と等しい場合)、デフォルトでは、
+\fBmq_send ()\fP は、メッセージをキューイングするのに十分な空間ができるか、 関数呼び出しがシグナルハンドラーにより中断されるまで、停止
+(block) する。 メッセージキュー記述 (message queue description) で \fBO_NONBLOCK\fP
+フラグが有効になっている場合は、 \fBmq_send\fP()  はエラー \fBEAGAIN\fP ですぐに失敗する。
+.PP
+\fBmq_timedsend\fP()  behaves just like \fBmq_send\fP(), except that if the queue
+is full and the \fBO_NONBLOCK\fP flag is not enabled for the message queue
+description, then \fIabs_timeout\fP points to a structure which specifies how
+long the call will block.  This value is an absolute timeout in seconds and
+nanoseconds since the Epoch, 1970\-01\-01 00:00:00 +0000 (UTC), specified in
+the following structure:
+.PP
+.in +4n
+.EX
+struct timespec {
+    time_t tv_sec;        /* 秒 */
+    long   tv_nsec;       /* ナノ秒 */
+};
+.EE
+.in
+.PP
+メッセージキューが一杯で、関数呼び出し時にすでにタイムアウト時刻が 過ぎている場合、 \fBmq_timedsend\fP()  はすぐに返る。
+.SH 返り値
+成功すると、 \fBmq_send\fP()  と \fBmq_timedsend\fP()  は 0 を返す。 エラーの場合、\-1 を返し、 \fIerrno\fP
+にエラーを示す値を設定する。
+.SH エラー
+.TP 
+\fBEAGAIN\fP
+キューが一杯で、かつ \fImqdes\fP で参照されるメッセージキュー記述で \fBO_NONBLOCK\fP フラグがセットされていた。
+.TP 
+\fBEBADF\fP
+The descriptor specified in \fImqdes\fP was invalid or not opened for writing.
+.TP 
+\fBEINTR\fP
+関数呼び出しがシグナルハンドラーにより中断された。 \fBsignal\fP(7)  参照。
+.TP 
+\fBEINVAL\fP
+関数呼び出しは停止するはずであったが、 \fIabs_timeout\fP が不正であった。 \fIabs_timeout\fP が不正とは、 \fItv_sec\fP
+が 0 未満、もしくは \fItv_nsec\fP が 0 未満か 1,000,000,000 より大きい、ということである。
+.TP 
+\fBEMSGSIZE\fP
+\fImsg_len\fP がメッセージキューの \fImq_msgsize\fP 属性よりも大きかった。
+.TP 
+\fBETIMEDOUT\fP
+メッセージが転送される前に関数呼び出しがタイムアウトした。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw25 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBmq_send\fP(),
+\fBmq_timedsend\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+Linux では、 \fBmq_timedsend\fP()  はシステムコールである。 \fBmq_send\fP()  はライブラリ関数で、
+\fBmq_timedsend\fP()  システムコールを用いて実装されている。
+.SH 関連項目
+\fBmq_close\fP(3), \fBmq_getattr\fP(3), \fBmq_notify\fP(3), \fBmq_open\fP(3),
+\fBmq_receive\fP(3), \fBmq_unlink\fP(3), \fBmq_overview\fP(7), \fBtime\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/mq_unlink.3 b/manual/LDP_man-pages/draft/man3/mq_unlink.3
new file mode 100644 (file)
index 0000000..f3d93be
--- /dev/null
@@ -0,0 +1,78 @@
+.\" Copyright (C) 2006 Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI all rights reserved.
+.\" Translated 2006-04-23, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH MQ_UNLINK 3 2020\-08\-13 Linux "Linux Programmer's Manual"
+.SH 名前
+mq_unlink \- メッセージキューを削除する
+.SH 書式
+.nf
+\fB#include <mqueue.h>\fP
+.PP
+\fBint mq_unlink(const char *\fP\fIname\fP\fB);\fP
+.fi
+.PP
+\fI\-lrt\fP でリンクする。
+.SH 説明
+\fBmq_unlink\fP()  は指定されたメッセージキュー \fIname\fP を削除する。 メッセージキュー名は直ちに削除される。
+キュー自体は、そのキューをオープンした他のすべてのプロセスが そのキューを参照する記述子をクローズした時点で破棄される。
+.SH 返り値
+成功すると、 \fBmq_unlink\fP()  は 0 を返す。エラーの場合、\-1 を返し、 \fIerrno\fP にエラーを示す値を設定する。
+.SH エラー
+.TP 
+\fBEACCES\fP
+呼び出し元プロセスがこのメッセージキューを削除 (unlink) する 許可を持たない。
+.TP 
+\fBENAMETOOLONG\fP
+\fIname\fP が長過ぎる。
+.TP 
+\fBENOENT\fP
+指定された名前 \fIname\fP を持つメッセージキューが存在しない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBmq_unlink\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 関連項目
+\fBmq_close\fP(3), \fBmq_getattr\fP(3), \fBmq_notify\fP(3), \fBmq_open\fP(3),
+\fBmq_receive\fP(3), \fBmq_send\fP(3), \fBmq_overview\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/nan.3 b/manual/LDP_man-pages/draft/man3/nan.3
new file mode 100644 (file)
index 0000000..b3201c7
--- /dev/null
@@ -0,0 +1,84 @@
+.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
+.\" Distributed under GPL
+.\" %%%LICENSE_END
+.\"
+.\" Based on glibc infopages
+.\"
+.\" Corrections by aeb
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2002 Akihiro MOTOKI all rights reserved.
+.\" Translated Thu 05 Dec 2002 by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH NAN 3 2016\-03\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+nan, nanf, nanl \- 無効値 ('Not a Number') を返す
+.SH 書式
+\fB#include <math.h>\fP
+.PP
+\fBdouble nan(const char *\fP\fItagp\fP\fB);\fP
+.br
+\fBfloat nanf(const char *\fP\fItagp\fP\fB);\fP
+.br
+\fBlong double nanl(const char *\fP\fItagp\fP\fB);\fP
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBnan\fP(), \fBnanf\fP(), \fBnanl\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+.RE
+.ad
+.SH 説明
+これらの関数は、SIGFPE シグナルなしの無効値 (NaN) を示す表現を返す (どの表現を使用するかは \fItagp\fP で指定する)。SIGFPE
+シグナルなしの NaN をサポートしていない実装では 0 を返す。
+.PP
+\fInan("char\-sequence")\fP を呼び出すのは、以下と等価である。
+.PP
+.in +4n
+.EX
+strtod("NAN(char\-sequence)", NULL);
+.EE
+.in
+.PP
+同様に、 \fBnanf\fP()  や \fBnanl\fP()  を呼び出すのは、 \fBstrtof\fP()  や \fBstrtold\fP()
+を呼ぶのと同じである。
+.PP
+引き数 \fItagp\fP の使い方は規定されていない。 IEEE 754 準拠のシステムでは、NaN にも複数の表現が存在し、 \fItagp\fP
+はその選択に使用される。 他のシステムでは、何の意味もないかもしれない。
+.SH バージョン
+これらの関数は glibc バージョン 2.1 で初めて登場した。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw21 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBnan\fP(),
+\fBnanf\fP(),
+\fBnanl\fP()
+T}     Thread safety   MT\-Safe locale
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.  See also IEC 559 and the appendix with
+recommended functions in IEEE 754/IEEE 854.
+.SH 関連項目
+\fBisnan\fP(3), \fBstrtod\fP(3), \fBmath_error\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/nextafter.3 b/manual/LDP_man-pages/draft/man3/nextafter.3
new file mode 100644 (file)
index 0000000..9a47bfe
--- /dev/null
@@ -0,0 +1,132 @@
+.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
+.\" Distributed under GPL
+.\" %%%LICENSE_END
+.\"
+.\" Based on glibc infopages
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2003 Akihiro MOTOKI all rights reserved.
+.\" Translated Mon Jan 27 2003 by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2008-09-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH NEXTAFTER 3 2020\-12\-21 GNU "Linux Programmer's Manual"
+.SH 名前
+nextafter, nextafterf, nextafterl, nexttoward, nexttowardf, nexttowardl \-
+浮動小数点数の操作
+.SH 書式
+\fB#include <math.h>\fP
+.PP
+\fBdouble nextafter(double \fP\fIx\fP\fB, double \fP\fIy\fP\fB);\fP
+.br
+\fBfloat nextafterf(float \fP\fIx\fP\fB, float \fP\fIy\fP\fB);\fP
+.br
+\fBlong double nextafterl(long double \fP\fIx\fP\fB, long double \fP\fIy\fP\fB);\fP
+.PP
+\fBdouble nexttoward(double \fP\fIx\fP\fB, long double \fP\fIy\fP\fB);\fP
+.br
+\fBfloat nexttowardf(float \fP\fIx\fP\fB, long double \fP\fIy\fP\fB);\fP
+.br
+\fBlong double nexttowardl(long double \fP\fIx\fP\fB, long double \fP\fIy\fP\fB);\fP
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBnextafter\fP():
+.RS 4
+.\"    || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || _XOPEN_SOURCE\ >=\ 500
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.br
+\fBnextafterf\fP(), \fBnextafterl\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.br
+\fBnexttoward\fP(), \fBnexttowardf\fP(), \fBnexttowardl\fP():
+.RS 4
+_XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+.RE
+.ad b
+.SH 説明
+関数 \fBnextafter\fP(), \fBnextafterf\fP(), \fBnextafterl\fP() は、\fIy\fP に向かう方向で \fIx\fP
+のすぐ次の浮動小数点数表現を返す。 \fIy\fP が \fIx\fP より小さい場合、 \fIx\fP より小さい最大の浮動小数点表現の値を返す。
+.PP
+\fIx\fP が \fIy\fP と等しい場合、\fIy\fP が返される。
+.PP
+関数 \fBnexttoward\fP(), \fBnexttowardf\fP(), \fBnexttowardl\fP() は、2 番目の引き数が \fIlong
+double\fP 型である点以外、 対応する \fBnextafter\fP() 関数と同じはたらきをする。
+.SH 返り値
+成功すると、これらの関数は \fIy\fP に向かう方向で \fIx\fP の すぐ次の浮動小数点数表現を返す。
+.PP
+\fIx\fP が \fIy\fP と等しい場合、 (\fIx\fP と同じ型にキャストされた)  \fIy\fP が返される。
+.PP
+\fIx\fP か \fIy\fP が NaN の場合、NaN が返される。
+.PP
+.\" e.g., DBL_MAX
+\fIx\fP が有限値で 結果がオーバーフローする場合、 範囲エラー (range error) が発生し、 各関数はそれぞれ \fBHUGE_VAL\fP,
+\fBHUGE_VALF\fP, \fBHUGE_VALL\fP を返す。返り値には数学的に正しい符号が付与される。
+.PP
+\fIx\fP が \fIy\fP と同じではなく、正しい関数の結果が非正規化数かゼロかアンダーフローの場合、 範囲エラーが発生し、 (表現可能な場合には)
+正しい値が、(そうでない場合には) 0.0 が返される。
+.SH エラー
+これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
+.PP
+以下のエラーが発生する可能性がある。
+.TP 
+範囲エラー (range error): 結果のオーバーフロー
+.\" e.g., nextafter(DBL_MAX, HUGE_VAL);
+\fIerrno\fP に \fBERANGE\fP が設定される。 オーバーフロー浮動小数点例外 (\fBFE_OVERFLOW\fP)  が上がる。
+.TP 
+範囲エラー: 結果が非正規化数かアンダーフロー
+.\" e.g., nextafter(DBL_MIN, 0.0);
+\fIerrno\fP に \fBERANGE\fP が設定される。 アンダーフロー浮動小数点例外 (\fBFE_UNDERFLOW\fP)  が上がる。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw28 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBnextafter\fP(),
+\fBnextafterf\fP(),
+.br
+\fBnextafterl\fP(),
+\fBnexttoward\fP(),
+.br
+\fBnexttowardf\fP(),
+\fBnexttowardl\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.  This function is defined in IEC 559 (and
+the appendix with recommended functions in IEEE 754/IEEE 854).
+.SH バグ
+glibc バージョン 2.5 以前では、アンダーフローが発生した際に、 これらの関数はアンダーフロー浮動小数点例外 (\fBFE_UNDERFLOW\fP)
+を上がない。
+.PP
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6799
+Before glibc version 2.23 these functions did not set \fIerrno\fP.
+.SH 関連項目
+\fBnearbyint\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/on_exit.3 b/manual/LDP_man-pages/draft/man3/on_exit.3
new file mode 100644 (file)
index 0000000..fe13eb7
--- /dev/null
@@ -0,0 +1,99 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified 1993-04-02, David Metcalfe
+.\" Modified 1993-07-25, Rik Faith (faith@cs.unc.edu)
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 Seiichi Yoshida
+.\"       all rights reserved.
+.\" Translated 1997-02-14, Seiichi Yoshida <seiichi@muraoka.info.waseda.ac.jp>
+.\" Updated 2002-09-27, Kentaro Shirakata <argrath@ub32.org>
+.\" Updated 2005-02-26, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2008-12-26, Akihiro MOTOKI, LDP v3.15
+.\"
+.TH ON_EXIT 3 2019\-08\-02 GNU "Linux Programmer's Manual"
+.SH 名前
+on_exit \- プロセスが正常に終了した際に呼ばれる関数を登録する
+.SH 書式
+.nf
+\fB#include <stdlib.h>\fP
+.PP
+\fBint on_exit(void (*\fP\fIfunction\fP\fB)(int , void *), void *\fP\fIarg\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBon_exit\fP():
+    Since glibc 2.19:
+        _DEFAULT_SOURCE
+    Glibc 2.19 and earlier:
+        _BSD_SOURCE || _SVID_SOURCE
+.SH 説明
+\fBon_exit\fP()  関数は、指定された関数 \fIfunction\fP を、プロセスが
+正常に終了した際に呼ばれる関数として登録する。正常な終了とは、 \fBexit\fP(3)  またはプログラムの \fImain\fP()  関数の中の
+return 命令による終了である。 関数 \fIfunction\fP には、直近の \fBexit\fP(3)  の呼び出しで渡された status 引数と
+\fBon_exit\fP()  の \fIarg\fP 引数が渡される。
+.PP
+同じ関数を複数回登録してもよい。 登録された関数は登録 1 回につき 1 回呼び出される。
+.PP
+\fBfork\fP(2) で作成された場合、子プロセスは親プロセスの登録のコピーを継承する。
+\fBexec\fP(3) ファミリーの関数の場合、呼び出しに成功すると、 全ての登録が削除される。
+.SH 返り値
+\fBon_exit\fP()  関数は、成功したら 0 を、そうでなければ 0 以外を返す。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBon_exit\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.sp 1
+.SH 準拠
+この関数は SunOS 4 由来であるが、 glibc にも存在する。 Solaris (SunOS 5)
+にはもはや存在しない。移植性が必要なアプリケーションではこの関数の使用は避け、代わりに標準の \fBatexit\fP(3) を使うこと。
+.SH 注意
+By the time \fIfunction\fP is executed, stack (\fIauto\fP)  variables may already
+have gone out of scope.  Therefore, \fIarg\fP should not be a pointer to a
+stack variable; it may however be a pointer to a heap variable or a global
+variable.
+.SH 関連項目
+\fB_exit\fP(2), \fBatexit\fP(3), \fBexit\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/opendir.3 b/manual/LDP_man-pages/draft/man3/opendir.3
new file mode 100644 (file)
index 0000000..6ff5776
--- /dev/null
@@ -0,0 +1,138 @@
+.\" Copyright (C) 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified Sat Jul 24 18:46:01 1993 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 11 June 1995 by Andries Brouwer (aeb@cwi.nl)
+.\" 2007-07-30 Ulrich Drepper <drepper@redhat.com>: document fdopendir().
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 Seiichi Yoshida
+.\"       all rights reserved.
+.\" Translated Fri Feb 14 14:53:20 JST 1997
+.\"         by Seiichi Yoshida <seiichi@muraoka.info.waseda.ac.jp>
+.\" Updated & Modified Thu Feb 17 00:37:46 JST 2005
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\"
+.TH OPENDIR 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+opendir, fdopendir \- ディレクトリをオープンする
+.SH 書式
+.nf
+\fB#include <sys/types.h>\fP
+\fB#include <dirent.h>\fP
+.PP
+\fBDIR *opendir(const char *\fP\fIname\fP\fB);\fP
+\fBDIR *fdopendir(int \fP\fIfd\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBfdopendir\fP():
+.PD 0
+.ad l
+.RS 4
+.TP  4
+glibc 2.10 以降:
+_POSIX_C_SOURCE\ >=\ 200809L
+.TP 
+glibc 2.10 より前:
+_GNU_SOURCE
+.RE
+.ad
+.PD
+.SH 説明
+\fBopendir\fP()  関数はディレクトリ \fIname\fP に対応する ディレクトリストリームをオープンし、そのストリームへのポインターを返す。
+ストリームの位置はディレクトリの先頭のエントリーに設定される。
+.PP
+\fBfdopendir\fP()  関数は \fBopendir\fP()  と同様だが、オープン済みのファイルディスクリプター \fIfd\fP
+により参照されるディレクトリに対する ディレクトリストリームを返す。 \fBfdopendir\fP()  の呼び出しが成功した後は、 \fIfd\fP
+は実装の内部で使用される。アプリケーションは \fIfd\fP を他の場面で使用すべきではない。
+.SH 返り値
+関数 \fBopendir\fP()  と \fBfdopendir\fP()  はディレクトリストリームへのポインターを返す。 エラーの場合は、NULL
+が返されて、 \fIerrno\fP が適切に設定される。
+.SH エラー
+.TP 
+\fBEACCES\fP
+アクセス権限がない。
+.TP 
+\fBEBADF\fP
+\fIfd\fP が読み出し用にオープンされた、有効なファイルディスクリプターではない。
+.TP 
+\fBEMFILE\fP
+The per\-process limit on the number of open file descriptors has been
+reached.
+.TP 
+\fBENFILE\fP
+The system\-wide limit on the total number of open files has been reached.
+.TP 
+\fBENOENT\fP
+ディレクトリが存在しないか、または \fIname\fP が空文字列である。
+.TP 
+\fBENOMEM\fP
+操作を完了するのに十分なメモリーがない。
+.TP 
+\fBENOTDIR\fP
+\fIname\fP はディレクトリではない。
+.SH バージョン
+\fBfdopendir\fP()  は glibc 2.4 以降で利用可能である。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw22 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBopendir\fP(),
+\fBfdopendir\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+\fBopendir\fP()  は SVr4 と 4.3BSD に存在し、 POSIX.1\-2001 で規定されている。 \fBfdopendir\fP()  は
+POSIX.1\-2008 で規定されている。
+.SH 注意
+Filename entries can be read from a directory stream using \fBreaddir\fP(3).
+.PP
+ディレクトリストリームに対応するファイルディスクリプターは \fBdirfd\fP(3)  を使用して得ることができる。
+.PP
+\fBopendir\fP()  関数は、 \fIDIR *\fP の背後にあるファイルディスクリプターの close\-on\-exec フラグを設定する。
+\fBfdopendir\fP()  関数は、ファイルディスクリプターの close\-on\-exec フラグの設定を変更しない。 \fBfdopendir\fP()
+の呼び出しが成功した際に、ファイルディスクリプター \fIfd\fP の close\-on\-exec を設定するかどうかは、 POSIX.1\-200x
+では規定されていない。
+.SH 関連項目
+\fBopen\fP(2), \fBclosedir\fP(3), \fBdirfd\fP(3), \fBreaddir\fP(3), \fBrewinddir\fP(3),
+\fBscandir\fP(3), \fBseekdir\fP(3), \fBtelldir\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/openpty.3 b/manual/LDP_man-pages/draft/man3/openpty.3
new file mode 100644 (file)
index 0000000..fe38b5a
--- /dev/null
@@ -0,0 +1,134 @@
+.\" Copyright (c) OpenBSD Group
+.\" All rights reserved.
+.\"
+.\" %%%LICENSE_START(BSD_3_CLAUSE_UCB)
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\"    may be used to endorse or promote products derived from this software
+.\"    without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\" %%%LICENSE_END
+.\"
+.\" Converted into a manpage again by Martin Schulze <joey@infodrom.org>
+.\"
+.\" Added -lutil remark, 030718
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2002 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated Tue Jan 22 21:42:05 JST 2002
+.\"         by Yuichi SATO <ysato@h4.dion.ne.jp>
+.\" Updated Mon Mar  8 2003 by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated Sun Sep 14 2003 by Akihiro MOTOKI
+.\"
+.TH OPENPTY 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+openpty, login_tty, forkpty \- 端末ユーティリティ関数
+.SH 書式
+.nf
+\fB#include <pty.h>\fP
+.PP
+\fBint openpty(int *\fP\fIamaster\fP\fB, int *\fP\fIaslave\fP\fB, char *\fP\fIname\fP\fB,\fP
+\fB            const struct termios *\fP\fItermp\fP\fB,\fP
+\fB            const struct winsize *\fP\fIwinp\fP\fB);\fP
+.PP
+\fBpid_t forkpty(int *\fP\fIamaster\fP\fB, char *\fP\fIname\fP\fB,\fP
+\fB              const struct termios *\fP\fItermp\fP\fB,\fP
+\fB              const struct winsize *\fP\fIwinp\fP\fB);\fP
+
+\fB#include <utmp.h>\fP
+.PP
+\fBint login_tty(int \fP\fIfd\fP\fB);\fP
+.PP
+\fI\-lutil\fP でリンクする。
+.fi
+.SH 説明
+\fBopenpty\fP()  関数は、使用可能な疑似端末 (pseudoterminal) を見つけて、 マスタとスレーブのファイルディスクリプターを
+\fIamaster\fP と \fIaslave\fP に入れて返す。 \fIname\fP が NULL でない場合、スレーブのファイル名が \fIname\fP
+に返される。 \fItermp\fP が NULL でない場合、スレーブの端末パラメーターは \fItermp\fP の値に設定される。 \fIwinp\fP が
+NULL でない場合、スレーブのウインドウサイズは \fIwinp\fP に設定される。
+.PP
+The \fBlogin_tty\fP()  function prepares for a login on the terminal referred
+to by the file descriptor \fIfd\fP (which may be a real terminal device, or the
+slave of a pseudoterminal as returned by \fBopenpty\fP())  by creating a new
+session, making \fIfd\fP the controlling terminal for the calling process,
+setting \fIfd\fP to be the standard input, output, and error streams of the
+current process, and closing \fIfd\fP.
+.PP
+The \fBforkpty\fP()  function combines \fBopenpty\fP(), \fBfork\fP(2), and
+\fBlogin_tty\fP()  to create a new process operating in a pseudoterminal.  A
+file descriptor referring to master side of the pseudoterminal is returned
+in \fIamaster\fP.  If \fIname\fP is not NULL, the buffer it points to is used to
+return the filename of the slave.  The \fItermp\fP and \fIwinp\fP arguments, if
+not NULL, will determine the terminal attributes and window size of the
+slave side of the pseudoterminal.
+.SH 返り値
+\fBopenpty\fP(), \fBlogin_tty\fP(), \fBforkpty\fP()  の呼び出しが成功しなかった場合、 \-1 が返されて、
+\fIerrno\fP はエラーを示す値に設定される。 成功した場合、 \fBopenpty\fP(), \fBlogin_tty\fP()  および  
+\fBforkpty\fP()  の子プロセスは 0 を返し、 \fBforkpty\fP()  の親プロセスは子プロセスのプロセス ID を返す。
+.SH エラー
+\fBopenpty\fP()  fails if:
+.TP 
+\fBENOENT\fP
+使用可能な端末がない。
+.PP
+\fBlogin_tty\fP()  fails if \fBioctl\fP(2)  fails to set \fIfd\fP to the controlling
+terminal of the calling process.
+.PP
+\fBforkpty\fP()  fails if either \fBopenpty\fP()  or \fBfork\fP(2)  fails.
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw20 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBforkpty\fP(),
+\fBopenpty\fP()
+T}     Thread safety   MT\-Safe locale
+T{
+\fBlogin_tty\fP()
+T}     Thread safety   MT\-Unsafe race:ttyname
+.TE
+.sp 1
+.SH 準拠
+これらは BSD の関数であり、 glibc2 に存在する。 POSIX での標準化はされていない。
+.SH 注意
+glibc 2.8 で、 \fBopenpty\fP()  と \fBforkpty\fP()  の構造体へのポインターの引き数に \fBconst\fP
+修飾子が追加された。
+.PP
+2.0.92 より前のバージョンの glibc では、 \fBopenpty\fP()  は BSD 疑似端末ペアのファイルディスクリプターを返す。
+2.0.92 以降の glibc では、 \fBopenpty\fP()  はまず Unix 98 疑似端末ペアをオープンしようとし、それに失敗した場合に
+BSD 疑似端末ペアのオープンへと移行する。
+.SH バグ
+誰も \fIname\fP に対してどのくらい大きさを予約しておけばいいか分からない。 したがって、NULL でない \fIname\fP を引き数として
+\fBopenpty\fP()  や \fBforkpty\fP()  を呼び出すのは安全であるとは言えない。
+.SH 関連項目
+\fBfork\fP(2), \fBttyname\fP(3), \fBpty\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/posix_fallocate.3 b/manual/LDP_man-pages/draft/man3/posix_fallocate.3
new file mode 100644 (file)
index 0000000..8b2cf23
--- /dev/null
@@ -0,0 +1,143 @@
+.\" Copyright (c) 2006, Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2006 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated 2006-07-13, Yuichi SATO <ysato444@yahoo.co.jp>. LDP v2.29
+.\" Updated 2010-04-11, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.24
+.\"
+.TH POSIX_FALLOCATE 3 2020\-11\-01 GNU "Linux Programmer's Manual"
+.SH 名前
+posix_fallocate \- ファイルのスペースを確保する
+.SH 書式
+.nf
+\fB#include <fcntl.h>\fP
+.PP
+\fBint posix_fallocate(int \fP\fIfd\fP\fB, off_t \fP\fIoffset\fP\fB, off_t \fP\fIlen\fP\fB);\fP
+.fi
+.PP
+.ad l
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBposix_fallocate\fP():
+.RS 4
+_POSIX_C_SOURCE\ >=\ 200112L
+.RE
+.ad
+.SH 説明
+The function \fBposix_fallocate\fP()  ensures that disk space is allocated for
+the file referred to by the file descriptor \fIfd\fP for the bytes in the range
+starting at \fIoffset\fP and continuing for \fIlen\fP bytes.  After a successful
+call to \fBposix_fallocate\fP(), subsequent writes to bytes in the specified
+range are guaranteed not to fail because of lack of disk space.
+.PP
+ファイルのサイズが \fIoffset\fP+\fIlen\fP より小さい場合、ファイルはこのサイズになるように拡大される。
+それ以外の場合、ファイルサイズは変わらない。
+.SH 返り値
+\fBposix_fallocate\fP()  は成功した場合、0 を返す。 失敗した場合、エラー番号を返す。 \fIerrno\fP
+が設定されない点に注意すること。
+.SH エラー
+.TP 
+\fBEBADF\fP
+\fIfd\fP が有効なファイルディスクリプターでないか、 書き込み用としてオープンされていない。
+.TP 
+\fBEFBIG\fP
+\fIoffset+len\fP が最大ファイルサイズを超えている。
+.TP 
+\fBEINTR\fP
+実行中にシグナルが捕捉された。
+.TP 
+\fBEINVAL\fP
+\fIoffset\fP was less than 0, or \fIlen\fP was less than or equal to 0, or the
+underlying filesystem does not support the operation.
+.TP 
+\fBENODEV\fP
+\fIfd\fP が通常のファイルとして参照されていない。
+.TP 
+\fBENOSPC\fP
+\fIfd\fP が参照するファイルを含むデバイスに十分な空き領域がない。
+.TP 
+\fBEOPNOTSUPP\fP
+The filesystem containing the file referred to by \fIfd\fP does not support
+this operation.  This error code can be returned by C libraries that don't
+perform the emulation shown in NOTES, such as musl libc.
+.TP 
+\fBESPIPE\fP
+\fIfd\fP がパイプを参照している。
+.SH バージョン
+\fBposix_fallocate\fP()  は glibc 2.1.94 以降で利用可能である。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBposix_fallocate\fP()
+T}     Thread safety   MT\-Safe (ただし「注意」を参照)
+.TE
+.SH 準拠
+POSIX.1\-2001.
+.PP
+POSIX.1\-2008 では、 \fIlen\fP が 0 の場合、もしくは \fIoffset\fP が 0 未満の場合、 \fBEINVAL\fP
+エラーを返すものとされている。 POSIX.1\-2001 では、 \fIlen\fP が 0 未満の場合、もしくは \fIoffset\fP が 0 未満の場合、
+\fBEINVAL\fP エラーを返すものとされている。また、 \fIlen\fP が 0 の場合、 \fBEINVAL\fP エラーを返してもよいとされている。
+.SH 注意
+In the glibc implementation, \fBposix_fallocate\fP()  is implemented using the
+\fBfallocate\fP(2)  system call, which is MT\-safe.  If the underlying
+filesystem does not support \fBfallocate\fP(2), then the operation is emulated
+with the following caveats:
+.IP * 2
+The emulation is inefficient.
+.IP *
+There is a race condition where concurrent writes from another thread or
+process could be overwritten with null bytes.
+.IP *
+There is a race condition where concurrent file size increases by another
+thread or process could result in a file whose size is smaller than
+expected.
+.IP *
+If \fIfd\fP has been opened with the \fBO_APPEND\fP or \fBO_WRONLY\fP flags, the
+function fails with the error \fBEBADF\fP.
+.PP
+In general, the emulation is not MT\-safe.  On Linux, applications may use
+\fBfallocate\fP(2)  if they cannot tolerate the emulation caveats.  In general,
+this is only recommended if the application plans to terminate the operation
+if \fBEOPNOTSUPP\fP is returned, otherwise the application itself will need to
+implement a fallback with all the same problems as the emulation provided by
+glibc.
+.SH 関連項目
+\fBfallocate\fP(1), \fBfallocate\fP(2), \fBlseek\fP(2), \fBposix_fadvise\fP(2)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/posix_memalign.3 b/manual/LDP_man-pages/draft/man3/posix_memalign.3
new file mode 100644 (file)
index 0000000..2e7c8e6
--- /dev/null
@@ -0,0 +1,223 @@
+.\" Copyright (c) 2001 by John Levon <moz@compsoc.man.ac.uk>
+.\" Based in part on GNU libc documentation.
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" 2001-10-11, 2003-08-22, aeb, added some details
+.\" 2012-03-23, Michael Kerrisk <mtk.manpages@mail.com>
+.\"     Document pvalloc() and aligned_alloc()
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2001 Akihiro MOTOKI
+.\"       all rights reserved.
+.\" Translated 2001-11-05, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2003-09-05, Akihiro MOTOKI, catch up to v1.60
+.\" Updated 2005-11-19, Akihiro MOTOKI
+.\" Updated 2010-04-18, Akihiro MOTOKI, LDP v3.24
+.\" Updated 2012-05-01, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2012-05-08, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2013-03-26, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2013-07-22, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH POSIX_MEMALIGN 3 2020\-12\-21 GNU "Linux Programmer's Manual"
+.SH 名前
+posix_memalign, aligned_alloc, memalign, valloc, pvalloc \- アラインメント
+されたメモリーの割り当てを行う
+.SH 書式
+.nf
+\fB#include <stdlib.h>\fP
+.PP
+\fBint posix_memalign(void **\fP\fImemptr\fP\fB, size_t \fP\fIalignment\fP\fB, size_t \fP\fIsize\fP\fB);\fP
+\fBvoid *aligned_alloc(size_t \fP\fIalignment\fP\fB, size_t \fP\fIsize\fP\fB);\fP
+\fBvoid *valloc(size_t \fP\fIsize\fP\fB);\fP
+
+\fB#include <malloc.h>\fP
+.PP
+\fBvoid *memalign(size_t \fP\fIalignment\fP\fB, size_t \fP\fIsize\fP\fB);\fP
+\fBvoid *pvalloc(size_t \fP\fIsize\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBposix_memalign\fP(): _POSIX_C_SOURCE\ >=\ 200112L
+.PP
+\fBaligned_alloc\fP(): _ISOC11_SOURCE
+.PP
+\fBvalloc\fP():
+.br
+.PD 0
+.RS 4
+.TP  4
+glibc 2.12 以降:
+.nf
+(_XOPEN_SOURCE\ >=\ 500) && !(_POSIX_C_SOURCE\ >=\ 200112L)
+    || /* Glibc since 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
+.br
+.fi
+.TP 
+glibc 2.12 より前:
+.\"    || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
+_BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500
+.ad b
+.br
+((非標準の) ヘッダーファイル \fI<malloc.h>\fP も
+\fBvalloc\fP() の宣言も公開する。機能検査マクロは不要である。
+.RE
+.PD
+.SH 説明
+.\" glibc does this:
+The function \fBposix_memalign\fP()  allocates \fIsize\fP bytes and places the
+address of the allocated memory in \fI*memptr\fP.  The address of the allocated
+memory will be a multiple of \fIalignment\fP, which must be a power of two and
+a multiple of \fIsizeof(void\ *)\fP.  This address can later be successfully
+passed to \fBfree\fP(3).  If \fIsize\fP is 0, then the value placed in \fI*memptr\fP
+is either NULL or a unique pointer value.
+.PP
+.\" The behavior of memalign() for size==0 is as for posix_memalign()
+.\" but no standards govern this.
+廃止された関数である \fBmemalign\fP() は、 \fIsize\fP バイトのメモリーを割り当て、
+割り当てられたメモリーへのポインターを返す。 メモリーのアドレスは \fIalignment\fP
+の倍数になっているはずである。 \fIalignment\fP は 2 のべき乗でなければならない。
+.PP
+関数 \fBaligned_alloc\fP() は \fBmemalign\fP() と同じだが、\fIsize\fP が \fIalignment\fP
+の倍数でなければならないという追加の制限がある点が異なる。
+.PP
+廃止された関数である \fBvalloc\fP()  は \fIsize\fP バイトのメモリーを割り当て、割り当てられたメモリーへのポインターを返す。
+メモリーのアドレスはページサイズの倍数になっているはずである。 これは \fImemalign(sysconf(_SC_PAGESIZE),size)\fP
+と等価である。
+.PP
+廃止された関数 \fBpvalloc\fP() は \fBvalloc\fP() と同様だが、
+割り当てられるサイズがシステムのページサイズの倍数に切り上げられる。
+.PP
+これらの関数はいずれもメモリーのゼロクリアを行わない。
+.SH 返り値
+\fBaligned_alloc\fP(), \fBmemalign\fP(), \fBvalloc\fP(), and \fBpvalloc\fP()  return a
+pointer to the allocated memory on success.  On error, NULL is returned, and
+\fIerrno\fP is set to indicate the cause of the error.
+.PP
+.\" http://austingroupbugs.net/view.php?id=520
+\fBposix_memalign\fP()  returns zero on success, or one of the error values
+listed in the next section on failure.  The value of \fIerrno\fP is not set.
+On Linux (and other systems), \fBposix_memalign\fP()  does not modify \fImemptr\fP
+on failure.  A requirement standardizing this behavior was added in
+POSIX.1\-2008 TC2.
+.SH エラー
+.TP 
+\fBEINVAL\fP
+\fIalignment\fP 引き数が 2 のべき乗でなかったか、 \fIsizeof(void\ *)\fP の倍数でなかった。
+.TP 
+\fBENOMEM\fP
+割り当て要求を満たすのに十分なメモリーがなかった。
+.SH バージョン
+The functions \fBmemalign\fP(), \fBvalloc\fP(), and \fBpvalloc\fP()  have been
+available since at least glibc 2.0.
+.PP
+関数 \fBaligned_alloc\fP() は glibc バージョン 2.16 で追加された。
+.PP
+関数 \fBposix_fallocate\fP() は glibc 2.1.91 以降で利用可能である。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBaligned_alloc\fP(),
+.br
+\fBmemalign\fP(),
+.br
+\fBposix_memalign\fP()
+T}     Thread safety   MT\-Safe
+T{
+\fBvalloc\fP(),
+.br
+\fBpvalloc\fP()
+T}     Thread safety   MT\-Unsafe init
+.TE
+.sp 1
+.SH 準拠
+The function \fBvalloc\fP()  appeared in 3.0BSD.  It is documented as being
+obsolete in 4.3BSD, and as legacy in SUSv2.  It does not appear in POSIX.1.
+.PP
+関数 \fBpvalloc\fP() は GNU による拡張である。
+.PP
+関数 \fBmemalign\fP() は SunOS 4.1.3 で登場したが、4.4BSD にはない。
+.PP
+The function \fBposix_memalign\fP()  comes from POSIX.1d and is specified in
+POSIX.1\-2001 and POSIX.1\-2008.
+.PP
+.\"
+関数 \fIaligned_alloc\fP() は C11 標準で規定されている。
+.SS ヘッダー
+\fBposix_memalign\fP()  の宣言を \fI<stdlib.h>\fP で行うことに関しては、 皆の意見が一致している。
+.PP
+いくつかのシステムでは、 \fBmemalign\fP()  は \fI<malloc.h>\fP ではなく
+\fI<stdlib.h>\fP で宣言されている。
+.PP
+.\" Libc4,5 and
+According to SUSv2, \fBvalloc\fP()  is declared in \fI<stdlib.h>\fP.
+Glibc declares it in \fI<malloc.h>\fP, and also in
+\fI<stdlib.h>\fP if suitable feature test macros are defined (see
+above).
+.SH 注意
+多くのシステムでは、アラインメントに関して制限がある。例えば、 ブロックデバイスに対するダイレクト I/O に使用するバッファーには
+アラインメントに関する制限がある。 POSIX では、どんなアラインメントが必要かを知るために
+\fIpathconf(path,_PC_REC_XFER_ALIGN)\fP コールを規定している。ここで \fBposix_memalign\fP()
+を使うと、この必要条件を満たすことができる。
+.PP
+\fBposix_memalign\fP() は \fIalignment\fP が上で詳細に述べた必要条件を満たすか
+どうかを確かめる。 \fBmemalign\fP() は \fIalignment\fP 引き数が正しいかどうかの
+確認を行わないかもしれない。
+.PP
+.\" Other systems allow passing the result of
+.\" .IR valloc ()
+.\" to
+.\" .IR free (3),
+.\" but not to
+.\" .IR realloc (3).
+POSIX では \fBposix_memalign\fP() によって獲得したメモリーは \fBfree\fP(3) を
+使って解放することができる必要がある。 いくつかのシステムでは
+\fBmemalign\fP() や\fBvalloc\fP() で割り当てられたメモリーを再利用する手段が
+提供されていない(なぜなら \fBfree\fP(3) に渡すことができるのは
+\fBmalloc\fP(3) から受け取ったポインターだけだが、例えば \fBmemalign\fP() は
+\fBmalloc\fP(3) を呼び出し、得た値をアラインメントしてしまうからである)。
+glibc の実装では、 ここに述べた関数のいずれで獲得したメモリーも
+\fBfree\fP(3) で再利用することができる。
+.PP
+glibc の \fBmalloc\fP(3) は常に 8 バイトにアラインメントされたメモリーアドレスを
+返すので、ここで述べた関数が必要になるのは 8 バイトよりも大きなアラインメント
+が必要な場合だけである。
+.SH 関連項目
+\fBbrk\fP(2), \fBgetpagesize\fP(2), \fBfree\fP(3), \fBmalloc\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/posix_openpt.3 b/manual/LDP_man-pages/draft/man3/posix_openpt.3
new file mode 100644 (file)
index 0000000..133fa08
--- /dev/null
@@ -0,0 +1,114 @@
+.\" Copyright (C) 2004 Michael Kerrisk
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2005 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated Sun Jan 30 08:55:16 JST 2005
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated 2012-05-01, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH POSIX_OPENPT 3 2020\-08\-13 "" "Linux Programmer's Manual"
+.SH 名前
+posix_openpt \- 疑似端末 (pseudoterminal) デバイスをオープンする
+.SH 書式
+.nf
+\fB#include <stdlib.h>\fP
+\fB#include <fcntl.h>\fP
+.PP
+\fBint posix_openpt(int \fP\fIflags\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBposix_openpt\fP(): _XOPEN_SOURCE\ >=\ 600
+.ad b
+.SH 説明
+\fBposix_openpt\fP()  関数は使用されていない疑似端末マスタデバイスをオープンし、
+そのデバイスを参照するために使うファイルディスクリプターを返す。
+.PP
+\fIflags\fP 引き数は、以下のフラグのうち 0 個以上の OR をとったビットマスクである。
+.TP 
+\fBO_RDWR\fP
+読み書きのためにデバイスをオープンする。 普通はこのフラグを指定する。
+.TP 
+\fBO_NOCTTY\fP
+このデバイスをプロセスの制御端末としない。
+.SH 返り値
+On success, \fBposix_openpt\fP()  returns a file descriptor (a nonnegative
+integer) which is the lowest numbered unused file descriptor.  On failure,
+\-1 is returned, and \fIerrno\fP is set to indicate the error.
+.SH エラー
+\fBopen\fP(2)  を参照すること。
+.SH バージョン
+\fBposix_openpt\fP()  の glibc でのサポートはバージョン 2.2.1 以降で提供されている。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBposix_openpt\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.PP
+\fBposix_openpt\fP()  is part of the UNIX 98 pseudoterminal support (see
+\fBpts\fP(4)).
+.SH 注意
+Some older UNIX implementations that support System V (aka UNIX 98)
+pseudoterminals don't have this function, but it can be easily implemented
+by opening the pseudoterminal multiplexor device:
+.PP
+.in +4n
+.EX
+int
+posix_openpt(int flags)
+{
+    return open("/dev/ptmx", flags);
+}
+.EE
+.in
+.PP
+\fBposix_openpt\fP() を呼び出すと、対応する擬似端末スレーブデバイスのパス
+名が生成される。スレーブデバイスのパス名は \fBptsname\fP(3) を使って取得
+できる。スレーブデバイスのパス名はマスターデバイスがオープンされている
+間だけ存在する。
+.SH 関連項目
+\fBopen\fP(2), \fBgetpt\fP(3), \fBgrantpt\fP(3), \fBptsname\fP(3), \fBunlockpt\fP(3),
+\fBpts\fP(4), \fBpty\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/pow.3 b/manual/LDP_man-pages/draft/man3/pow.3
new file mode 100644 (file)
index 0000000..6c4d2ac
--- /dev/null
@@ -0,0 +1,210 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 1995-08-14 by Arnt Gulbrandsen <agulbra@troll.no>
+.\" Modified 2002-07-27 by Walter Harms
+.\"    (walter.harms@informatik.uni-oldenburg.de)
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2003, 2008  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated Mon Sep  7 23:27:52 JST 2003
+.\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2008-09-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH POW 3 2020\-06\-09 "" "Linux Programmer's Manual"
+.SH 名前
+pow, powf, powl \- 累乗関数
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBdouble pow(double \fP\fIx\fP\fB, double \fP\fIy\fP\fB);\fP
+\fBfloat powf(float \fP\fIx\fP\fB, float \fP\fIy\fP\fB);\fP
+\fBlong double powl(long double \fP\fIx\fP\fB, long double \fP\fIy\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBpowf\fP(), \fBpowl\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad
+.SH 説明
+These functions return the value of \fIx\fP raised to the power of \fIy\fP.
+.SH 返り値
+成功すると、これらの関数は \fIx\fP の \fIy\fP 乗の値を返す。
+.PP
+.\" The domain error is generated at least as far back as glibc 2.4
+\fIx\fP が 0 未満の有限値で \fIy\fP が整数でない有限値の場合、領域エラー (domain error) が発生し、 NaN が返される。
+.PP
+.\" The range error is generated at least as far back as glibc 2.4
+結果がオーバーフローする場合、 範囲エラー (range error) が発生し、 各関数はそれぞれ \fBHUGE_VAL\fP,
+\fBHUGE_VALF\fP, \fBHUGE_VALL\fP を返す。返り値には数学的に正しい符号が付与される。
+.PP
+.\" POSIX.1 does not specify the sign of the zero,
+.\" but http://sources.redhat.com/bugzilla/show_bug.cgi?id=2678
+.\" points out that the zero has the wrong sign in some cases.
+結果がアンダーフローし、その値が表現可能でない場合、 範囲エラーが発生し、 0.0 が返される。
+.PP
+以下で規定されていない場合で、 \fIx\fP か \fIy\fP が NaN の場合、返り値は NaN となる。
+.PP
+\fIx\fP が +1 の場合、 (\fIy\fP が NaN であったとしても) 返り値は 1.0 となる。
+.PP
+\fIy\fP が 0 の場合、 (\fIx\fP が NaN であったとしても) 返り値は 1.0 となる。
+.PP
+\fIx\fP が +0 (\-0) で \fIy\fP が 0 より大きな奇数の場合、返り値は +0 (\-0) となる。
+.PP
+\fIx\fP が 0 で、 \fIy\fP が 0 より大きく奇数でない場合、返り値は +0 となる。
+.PP
+\fIx\fP が \-1 で、 \fIy\fP が正の無限大か負の無限大の場合、返り値は 1.0 となる。
+.PP
+\fIx\fP の絶対値が 1 未満で、 \fIy\fP が負の無限大の場合、返り値は正の無限大となる。
+.PP
+\fIx\fP 絶対値が 1 より大きく、 \fIy\fP が負の無限大の場合、返り値は +0 となる。
+.PP
+\fIx\fP の絶対値が 1 未満で、 \fIy\fP が正の無限大の場合、返り値は +0 となる。
+.PP
+\fIx\fP の絶対値が 1 より大きく、 \fIy\fP が正の無限大の場合、返り値は正の無限大となる。
+.PP
+\fIx\fP が負の無限大で、 \fIy\fP が 0 より小さい奇数の場合、返り値は \-0 となる。
+.PP
+\fIx\fP が負の無限大で、 \fIy\fP が 0 より小さく奇数でない場合、返り値は +0 となる。
+.PP
+\fIx\fP が負の無限大で、 \fIy\fP が 0 より大きい奇数の場合、返り値は負の無限大となる。
+.PP
+\fIx\fP が負の無限大で、 \fIy\fP が 0 より大きく奇数でない場合、返り値は正の無限大となる。
+.PP
+\fIx\fP が正の無限大で、 \fIy\fP が 0 未満の場合、返り値は +0 となる。
+.PP
+\fIx\fP が正の無限大で、 \fIy\fP が 0 より大きい場合、返り値は正の無限大となる。
+.PP
+\fIx\fP が +0 か \-0 で、 \fIy\fP が 0 より小さい奇数の場合、 極エラー (pole error) が発生し、返り値は
+\fBHUGE_VAL\fP, \fBHUGE_VALF\fP, \fBHUGE_VALL\fP となる。 \fIx\fP と同じ符号が付与される。
+.PP
+.\" The pole error is generated at least as far back as glibc 2.4
+\fIx\fP が +0 か \-0 で、 \fIy\fP が 0 より小さく奇数でない場合、 極エラーが発生し、 返り値は \fB+\fPHUGE_VAL\fB,\fP
+\fB+\fPHUGE_VALF\fB,\fP \fB+\fPHUGE_VALL となる。
+.SH エラー
+.\" FIXME . review status of this error
+.\" longstanding bug report for glibc:
+.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=369
+.\" For negative x, and -large and +large y, glibc 2.8 gives incorrect
+.\" results
+.\" pow(-0.5,-DBL_MAX)=nan
+.\" EDOM FE_INVALID nan; fail-errno fail-except fail-result;
+.\" FAIL (expected: range-error-overflow (ERANGE, FE_OVERFLOW); +INF)
+.\"
+.\" pow(-1.5,-DBL_MAX)=nan
+.\" EDOM FE_INVALID nan; fail-errno fail-except fail-result;
+.\" FAIL (expected: range-error-underflow (ERANGE, FE_UNDERFLOW); +0)
+.\"
+.\" pow(-0.5,DBL_MAX)=nan
+.\" EDOM FE_INVALID nan; fail-errno fail-except fail-result;
+.\" FAIL (expected: range-error-underflow (ERANGE, FE_UNDERFLOW); +0)
+.\"
+.\" pow(-1.5,DBL_MAX)=nan
+.\" EDOM FE_INVALID nan; fail-errno fail-except fail-result;
+.\" FAIL (expected: range-error-overflow (ERANGE, FE_OVERFLOW); +INF)
+これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
+.PP
+以下のエラーが発生する可能性がある。
+.TP 
+領域エラー: \fIx\fP が負で、\fIy\fP が整数でない有限値
+\fIerrno\fP に \fBEDOM\fP が設定される。 不正 (invalid) 浮動小数点例外 (\fBFE_INVALID\fP)  が上がる。
+.TP 
+極エラー: \fIx\fP がゼロで、\fIy\fP が負
+\fIerrno\fP に \fBERANGE\fP が設定される (「バグ」の節も参照)。 0 による除算 (divide\-by\-zero) 浮動小数点例外
+(\fBFE_DIVBYZERO\fP)  が上がる。
+.TP 
+範囲エラー: 結果がオーバーフロー
+\fIerrno\fP に \fBERANGE\fP が設定される。 オーバーフロー浮動小数点例外 (\fBFE_OVERFLOW\fP)  が上がる。
+.TP 
+範囲エラー: 結果がアンダーフロー
+\fIerrno\fP に \fBERANGE\fP が設定される。 アンダーフロー浮動小数点例外 (\fBFE_UNDERFLOW\fP)  が上がる。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw21 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBpow\fP(),
+\fBpowf\fP(),
+\fBpowl\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.PP
+The variant returning \fIdouble\fP also conforms to SVr4, 4.3BSD, C89.
+.SH バグ
+.SS "Historical bugs (now fixed)"
+.\" https://sourceware.org/bugzilla/show_bug.cgi?id=13932
+.\" commit c3d466cba1692708a19c6ff829d0386c83a0c6e5
+Before glibc 2.28, on some architectures (e.g., x86\-64)  \fBpow\fP()  may be
+more than 10,000 times slower for some inputs than for other nearby inputs.
+This affects only \fBpow\fP(), and not \fBpowf\fP()  nor \fBpowl\fP().  This problem
+was fixed in glibc 2.28.
+.PP
+.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=3866
+A number of bugs in the glibc implementation of \fBpow\fP()  were fixed in
+glibc version 2.16.
+.PP
+.\"
+.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6776
+.\" or possibly 2.9, I haven't found the source code change
+.\" and I don't have a 2.9 system to test
+glibc 2.9 とそれ以前のバージョンでは、 極エラーが発生した場合、POSIX で要求されている \fBERANGE\fP ではなく \fBEDOM\fP が
+\fIerrno\fP に設定される。 バージョン 2.10 以降の glibc では、正しい動作をする。
+.PP
+.\" Actually, 2.3.2 is the earliest test result I have; so yet
+.\" to confirm if this error occurs only in 2.3.2.
+glibc バージョン 2.3.2 以前では、 アンダーフローやアンダーフローのエラーが発生する場合、 glibc の \fBpow\fP()
+は、オーバーフロー例外やアンダーフロー例外を上げるだけでなく、 不正浮動小数点例外 (\fBFE_INVALID\fP)  を間違って発生する。
+.SH 関連項目
+\fBcbrt\fP(3), \fBcpow\fP(3), \fBsqrt\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/profil.3 b/manual/LDP_man-pages/draft/man3/profil.3
new file mode 100644 (file)
index 0000000..48e0702
--- /dev/null
@@ -0,0 +1,99 @@
+.\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" Modified Fri Jun 23 01:35:19 1995 Andries Brouwer <aeb@cwi.nl>
+.\" (prompted by Bas V. de Bakker <bas@phys.uva.nl>)
+.\" Corrected (and moved to man3), 980612, aeb
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
+.\"         all rights reserved.
+.\" Translated San Feb 23 20:40:50 JST 1997
+.\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
+.\" Modified Sun Jun 21 17:30:21 JST 1998
+.\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
+.\" Updated & Modified Thu Feb 17 00:57:49 JST 2005
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\"
+.TH PROFIL 3 2020\-12\-21 Linux "Linux Programmer's Manual"
+.SH 名前
+profil \- 実行時間プロファイル (profile)
+.SH 書式
+.nf
+\fB#include <unistd.h>\fP
+.PP
+\fBint profil(unsigned short *\fP\fIbuf\fP\fB, size_t \fP\fIbufsiz\fP\fB,\fP
+\fB           size_t \fP\fIoffset\fP\fB, unsigned int \fP\fIscale\fP\fB);\fP
+.PP
+.fi
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBprofil\fP():
+.nf
+.\"             commit 266865c0e7b79d4196e2cc393693463f03c90bd8
+    Since glibc 2.21:
+        _DEFAULT_SOURCE
+    In glibc 2.19 and 2.20:
+        _DEFAULT_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\ <\ 500)
+    Up to and including glibc 2.19:
+        _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\ <\ 500)
+.fi
+.SH 説明
+このルーティンはプログラムのどこの部分で時間を費やしているかを調べる 手段を提供する。引き数 \fIbuf\fP は \fIbufsiz\fP
+バイトのメモリーを指している。仮想の 10 ミリ秒ごとに、ユーザーの プログラムカウンター (PC) が検査される: \fIoffset\fP
+が引かれ、その結果が \fIscale\fP 倍され 65536 で割られる。 結果が \fIbufsiz\fP より小さい場合は \fIbuf\fP
+の対応するエントリーがインクリメントされる。 \fIbuf\fP が NULL ならば、プロファイル (profile) は無効にされる。
+.SH 返り値
+常に 0 が返される。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBprofil\fP()
+T}     Thread safety   MT\-Unsafe
+.TE
+.sp 1
+.SH 準拠
+Similar to a call in SVr4 (but not POSIX.1).
+.SH バグ
+\fBprofil\fP()  は \fBITIMER_PROF\fP インターバルタイマーも使用しているプログラムでは使用できない
+(\fBsetitimer\fP(2)  参照)。
+.PP
+.\" Libc 4.4 contained a kernel patch providing a system call profil.
+True kernel profiling provides more accurate results.
+.SH 関連項目
+\fBgprof\fP(1), \fBsprof\fP(1), \fBsetitimer\fP(2), \fBsigaction\fP(2), \fBsignal\fP(2)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/psignal.3 b/manual/LDP_man-pages/draft/man3/psignal.3
new file mode 100644 (file)
index 0000000..2b4b9a5
--- /dev/null
@@ -0,0 +1,108 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified Sat Jul 24 18:45:17 1993 by Rik Faith (faith@cs.unc.edu)
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
+.\"    all rights reserved.
+.\" Translated Fri Dec 26 13:19:15 JST 1997
+.\"    by HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
+.\" Updated 2013-05-01, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2013-05-06, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH PSIGNAL 3 2020\-11\-01 GNU "Linux Programmer's Manual"
+.SH 名前
+psignal, psiginfo \- print signal description
+.SH 書式
+.nf
+\fB#include <signal.h>\fP
+.PP
+\fBvoid psignal(int \fP\fIsig\fP\fB, const char *\fP\fIs\fP\fB);\fP
+\fBvoid psiginfo(const siginfo_t *\fP\fIpinfo\fP\fB, const char *\fP\fIs\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBpsignal\fP():
+    Since glibc 2.19:
+        _DEFAULT_SOURCE
+    Glibc 2.19 and earlier:
+        _BSD_SOURCE || _SVID_SOURCE
+.br
+\fBpsiginfo\fP(): _POSIX_C_SOURCE\ >=\ 200809L
+.SH 説明
+\fBpsignal\fP() 関数は、文字列 \fIs\fP、コロン、スペース、シグナル番号 \fIsig\fP を説明する文字列、終端の改行から構成されるメッセージを
+\fIstderr\fP に表示する。 文字列 \fIs\fP が NULL か空の場合、コロンとスペースは省略される。 \fIsig\fP が不正ならば、表示される
+メッセージは未知のシグナルを示す。
+.PP
+\fBpsiginfo\fP() 関数は \fBpsignal\fP() と同じだが、 \fIpinfo\fP に書かれたシグナルの情報を表示する点が異なる。
+\fIpinfo\fP は有効な \fIsiginfo_t\fP 構造体を指している必要がある。 \fBpsiginfo\fP() は、 シグナルの説明だけでなく、
+シグナルの送信元やそのシグナルに関連するその他の情報も表示する (例えば、ハードウェアが発生したシグナルの関連メモリーアドレス、 \fBSIGCHLD\fP
+の子プロセス ID、 \fIkill\fP(2) や \fBsigqueue\fP(3) を使って送信されたシグナルの送信元プロセスのユーザー ID とプロセス
+ID など)。
+.SH 返り値
+関数 \fBpsignal\fP() と \fBpsiginfo\fP() は、値を返さない。
+.SH バージョン
+\fBpsiginfo\fP() 関数は glibc バージョン 2.10 で追加された。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw21 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBpsignal\fP(),
+\fBpsiginfo\fP()
+T}     Thread safety   MT\-Safe locale
+.TE
+.sp 1
+.SH 準拠
+POSIX.1\-2008, 4.3BSD.
+.SH バグ
+バージョン 2.12 までの glibc では \fBpsiginfo\fP() には以下のバグがあった。
+.IP * 3
+.\" FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=12107
+.\" Reportedly now fixed; check glibc 2.13
+特定の状況で、末尾の改行が出力されない。
+.IP *
+.\" FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=12108
+.\" Reportedly now fixed; check glibc 2.13
+リアルタイムシグナルの場合に、追加の詳細情報が表示されない。
+.SH 関連項目
+\fBsigaction\fP(2), \fBperror\fP(3), \fBstrsignal\fP(3), \fBsignal\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/pthread_attr_init.3 b/manual/LDP_man-pages/draft/man3/pthread_attr_init.3
new file mode 100644 (file)
index 0000000..b72d537
--- /dev/null
@@ -0,0 +1,313 @@
+.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2012  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2012-05-03, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH PTHREAD_ATTR_INIT 3 2020\-11\-01 Linux "Linux Programmer's Manual"
+.SH 名前
+pthread_attr_init, pthread_attr_destroy \-
+スレッド属性オブジェクトの初期化と破棄を行う
+.SH 書式
+.nf
+\fB#include <pthread.h>\fP
+.PP
+\fBint pthread_attr_init(pthread_attr_t *\fP\fIattr\fP\fB);\fP
+\fBint pthread_attr_destroy(pthread_attr_t *\fP\fIattr\fP\fB);\fP
+.PP
+\fI\-pthread\fP でコンパイルしてリンクする。
+.fi
+.SH 説明
+\fBpthread_attr_init\fP() 関数は \fIattr\fP が指すスレッド属性オブジェクト
+(thread attributes object) をデフォルトの属性値で初期化する。
+この呼び出しの後、オブジェクトの各属性は (関連項目に載っている) 種々の
+関数を使って設定することができ、このオブジェクトはスレッドの作成を行う
+\fBpthread_create\fP(3) の呼び出しにおいて使用することができる (一つの
+オブジェクトを複数の \fBpthread_create\fP(3) に渡してもよい)。
+.PP
+すでに初期化されているスレッド属性オブジェクトに対して
+\fBpthread_attr_init\fP() を呼び出した場合、
+どのような動作になるかは不定である。
+.PP
+スレッド属性オブジェクトがもはや必要なくなった際には、
+そのオブジェクトは \fBpthread_attr_destroy\fP() 関数を使って破棄すべきである。
+スレッド属性オブジェクトを破棄しても、
+そのオブジェクトを使って作成されたスレッドには影響はない。
+.PP
+いったん破棄したスレッド属性オブジェクトは、
+\fBpthread_attr_init\fP() を使って再初期化することができる。
+破棄したスレッド属性オブジェクトをこれ以外の用途で
+使った場合の結果は不定である。
+.SH 返り値
+成功すると、これらの関数は 0 を返す。
+エラーの場合、0 以外のエラー番号を返す。
+.SH エラー
+POSIX.1 documents an \fBENOMEM\fP error for \fBpthread_attr_init\fP(); on Linux
+these functions always succeed (but portable and future\-proof applications
+should nevertheless handle a possible error return).
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.ad l
+.TS
+allbox;
+lbw22 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBpthread_attr_init\fP(),
+\fBpthread_attr_destroy\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.ad
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+\fIpthread_attr_t\fP 型の内部構造は意識すべきではない。
+pthreads 関数経由以外でのオブジェクトへのアクセスは移植性がなく、
+どのような結果が得られるかも分からない。
+.SH EXAMPLES
+下記のプログラムは、\fBpthread_attr_init\fP() と種々の関連関数を使って、
+スレッド属性オブジェクトの初期化を行い、
+そのオブジェクトを使ってスレッドを一つ作成する。
+作成されたスレッドは、作成後に \fBpthread_getattr_np\fP(3) 関数
+(非標準の GNU 拡張) を使ってスレッドの属性を取得し、
+取得した属性を表示する。
+.PP
+コマンドライン引き数なしでプログラムを実行した場合、
+\fBpthread_create\fP(3) の \fIattr\fP 引き数には NULL が渡される。
+この場合、スレッドはデフォルトの属性で作成される。
+このプログラムを NPTL スレッド実装が使われている Linux/x86\-32 で
+動作させると、以下のような出力が得られる。
+.PP
+.in +4n
+.EX
+.\" Results from glibc 2.8, SUSE 11.0; Oct 2008
+$\fB ulimit \-s\fP       # No stack limit ==> default stack size is 2 MB
+unlimited
+$\fB ./a.out\fP
+Thread attributes:
+        Detach state        = PTHREAD_CREATE_JOINABLE
+        Scope               = PTHREAD_SCOPE_SYSTEM
+        Inherit scheduler   = PTHREAD_INHERIT_SCHED
+        Scheduling policy   = SCHED_OTHER
+        Scheduling priority = 0
+        Guard size          = 4096 bytes
+        Stack address       = 0x40196000
+        Stack size          = 0x201000 bytes
+.EE
+.in
+.PP
+コマンドライン引き数でスタックサイズが与えられた場合、
+このプログラムは、スレッド属性オブジェクトを初期化し、
+そのオブジェクトの各種属性を設定し、
+\fBpthread_create\fP(3) の呼び出しでこのオブジェクトへのポインターを渡す。
+このプログラムを NPTL スレッド実装が使われている Linux/x86\-32 で
+動作させると、以下のような出力が得られる。
+.PP
+.in +4n
+.EX
+.\" Results from glibc 2.8, SUSE 11.0; Oct 2008
+$\fB ./a.out 0x3000000\fP
+posix_memalign() allocated at 0x40197000
+Thread attributes:
+        Detach state        = PTHREAD_CREATE_DETACHED
+        Scope               = PTHREAD_SCOPE_SYSTEM
+        Inherit scheduler   = PTHREAD_EXPLICIT_SCHED
+        Scheduling policy   = SCHED_OTHER
+        Scheduling priority = 0
+        Guard size          = 0 bytes
+        Stack address       = 0x40197000
+        Stack size          = 0x3000000 bytes
+.EE
+.in
+.SS プログラムのソース
+\&
+.EX
+#define _GNU_SOURCE     /* To get pthread_getattr_np() declaration */
+#include <pthread.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <errno.h>
+
+#define handle_error_en(en, msg) \e
+        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)
+
+static void
+display_pthread_attr(pthread_attr_t *attr, char *prefix)
+{
+    int s, i;
+    size_t v;
+    void *stkaddr;
+    struct sched_param sp;
+
+    s = pthread_attr_getdetachstate(attr, &i);
+    if (s != 0)
+        handle_error_en(s, "pthread_attr_getdetachstate");
+    printf("%sDetach state        = %s\en", prefix,
+            (i == PTHREAD_CREATE_DETACHED) ? "PTHREAD_CREATE_DETACHED" :
+            (i == PTHREAD_CREATE_JOINABLE) ? "PTHREAD_CREATE_JOINABLE" :
+            "???");
+
+    s = pthread_attr_getscope(attr, &i);
+    if (s != 0)
+        handle_error_en(s, "pthread_attr_getscope");
+    printf("%sScope               = %s\en", prefix,
+            (i == PTHREAD_SCOPE_SYSTEM)  ? "PTHREAD_SCOPE_SYSTEM" :
+            (i == PTHREAD_SCOPE_PROCESS) ? "PTHREAD_SCOPE_PROCESS" :
+            "???");
+
+    s = pthread_attr_getinheritsched(attr, &i);
+    if (s != 0)
+        handle_error_en(s, "pthread_attr_getinheritsched");
+    printf("%sInherit scheduler   = %s\en", prefix,
+            (i == PTHREAD_INHERIT_SCHED)  ? "PTHREAD_INHERIT_SCHED" :
+            (i == PTHREAD_EXPLICIT_SCHED) ? "PTHREAD_EXPLICIT_SCHED" :
+            "???");
+
+    s = pthread_attr_getschedpolicy(attr, &i);
+    if (s != 0)
+        handle_error_en(s, "pthread_attr_getschedpolicy");
+    printf("%sScheduling policy   = %s\en", prefix,
+            (i == SCHED_OTHER) ? "SCHED_OTHER" :
+            (i == SCHED_FIFO)  ? "SCHED_FIFO" :
+            (i == SCHED_RR)    ? "SCHED_RR" :
+            "???");
+
+    s = pthread_attr_getschedparam(attr, &sp);
+    if (s != 0)
+        handle_error_en(s, "pthread_attr_getschedparam");
+    printf("%sScheduling priority = %d\en", prefix, sp.sched_priority);
+
+    s = pthread_attr_getguardsize(attr, &v);
+    if (s != 0)
+        handle_error_en(s, "pthread_attr_getguardsize");
+    printf("%sGuard size          = %zu bytes\en", prefix, v);
+
+    s = pthread_attr_getstack(attr, &stkaddr, &v);
+    if (s != 0)
+        handle_error_en(s, "pthread_attr_getstack");
+    printf("%sStack address       = %p\en", prefix, stkaddr);
+    printf("%sStack size          = %#zx bytes\en", prefix, v);
+}
+
+static void *
+thread_start(void *arg)
+{
+    int s;
+    pthread_attr_t gattr;
+
+    /* pthread_getattr_np() is a non\-standard GNU extension that
+       retrieves the attributes of the thread specified in its
+       first argument */
+
+    s = pthread_getattr_np(pthread_self(), &gattr);
+    if (s != 0)
+        handle_error_en(s, "pthread_getattr_np");
+
+    printf("Thread attributes:\en");
+    display_pthread_attr(&gattr, "\et");
+
+    exit(EXIT_SUCCESS);         /* Terminate all threads */
+}
+
+int
+main(int argc, char *argv[])
+{
+    pthread_t thr;
+    pthread_attr_t attr;
+    pthread_attr_t *attrp;      /* NULL or &attr */
+    int s;
+
+    attrp = NULL;
+
+    /* If a command\-line argument was supplied, use it to set the
+       stack\-size attribute and set a few other thread attributes,
+       and set attrp pointing to thread attributes object */
+
+    if (argc > 1) {
+        size_t stack_size;
+        void *sp;
+
+        attrp = &attr;
+
+        s = pthread_attr_init(&attr);
+        if (s != 0)
+            handle_error_en(s, "pthread_attr_init");
+
+        s = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+        if (s != 0)
+            handle_error_en(s, "pthread_attr_setdetachstate");
+
+        s = pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);
+        if (s != 0)
+            handle_error_en(s, "pthread_attr_setinheritsched");
+
+        stack_size = strtoul(argv[1], NULL, 0);
+
+        s = posix_memalign(&sp, sysconf(_SC_PAGESIZE), stack_size);
+        if (s != 0)
+            handle_error_en(s, "posix_memalign");
+
+        printf("posix_memalign() allocated at %p\en", sp);
+
+        s = pthread_attr_setstack(&attr, sp, stack_size);
+        if (s != 0)
+            handle_error_en(s, "pthread_attr_setstack");
+    }
+
+    s = pthread_create(&thr, attrp, &thread_start, NULL);
+    if (s != 0)
+        handle_error_en(s, "pthread_create");
+
+    if (attrp != NULL) {
+        s = pthread_attr_destroy(attrp);
+        if (s != 0)
+            handle_error_en(s, "pthread_attr_destroy");
+    }
+
+    pause();    /* Terminates when other thread calls exit() */
+}
+.EE
+.SH 関連項目
+.ad l
+.nh
+\fBpthread_attr_setaffinity_np\fP(3), \fBpthread_attr_setdetachstate\fP(3),
+\fBpthread_attr_setguardsize\fP(3), \fBpthread_attr_setinheritsched\fP(3),
+\fBpthread_attr_setschedparam\fP(3), \fBpthread_attr_setschedpolicy\fP(3),
+\fBpthread_attr_setscope\fP(3), \fBpthread_attr_setsigmask_np\fP(3),
+\fBpthread_attr_setstack\fP(3), \fBpthread_attr_setstackaddr\fP(3),
+\fBpthread_attr_setstacksize\fP(3), \fBpthread_create\fP(3),
+\fBpthread_getattr_np\fP(3), \fBpthread_setattr_default_np\fP(3), \fBpthreads\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
index a1a1d87..3bec81f 100644 (file)
@@ -93,12 +93,12 @@ CPU 集合の操作や取得を行う際に利用できるマクロ群の説明
 .SH バージョン
 これらの関数は glibc バージョン 2.3.4 以降で提供されている。
 .SH 属性
-For an explanation of the terms used in this section, see \fBattributes\fP(7).
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
 .TS
 allbox;
 lbw30 lb lb
 l l l.
-Interface      Attribute       Value
+インターフェース       属性  値
 T{
 \fBpthread_attr_setaffinity_np\fP(),
 \fBpthread_attr_getaffinity_np\fP()
diff --git a/manual/LDP_man-pages/draft/man3/pthread_attr_setdetachstate.3 b/manual/LDP_man-pages/draft/man3/pthread_attr_setdetachstate.3
new file mode 100644 (file)
index 0000000..10f5ccd
--- /dev/null
@@ -0,0 +1,113 @@
+.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2012  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2012-05-03, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH PTHREAD_ATTR_SETDETACHSTATE 3 2020\-06\-09 Linux "Linux Programmer's Manual"
+.SH 名前
+pthread_attr_setdetachstate, pthread_attr_getdetachstate \-
+スレッド属性オブジェクトの detach state 属性の設定/取得を行う
+.SH 書式
+.nf
+\fB#include <pthread.h>\fP
+.PP
+\fBint pthread_attr_setdetachstate(pthread_attr_t *\fP\fIattr\fP\fB, int \fP\fIdetachstate\fP\fB);\fP
+\fBint pthread_attr_getdetachstate(const pthread_attr_t *\fP\fIattr\fP\fB,\fP
+\fB                                int *\fP\fIdetachstate\fP\fB);\fP
+.PP
+\fI\-pthread\fP でコンパイルしてリンクする。
+.fi
+.SH 説明
+\fBpthread_attr_setdetachstate\fP() 関数は、
+\fIattr\fP が参照するスレッド属性オブジェクトの detach state 属性を
+\fIdetachstate\fP で指定された値に設定する。
+detach state 属性により、スレッド属性オブジェクト \fIattr\fP を使って
+作成されるスレッドが、 join 可能な状態で作成されるか、
+detached (切り離された) 状態で作成されるかが決定される。
+.PP
+\fIdetachstate\fP には以下の値を指定できる。
+.TP 
+\fBPTHREAD_CREATE_DETACHED\fP
+\fIattr\fP を使って作成されるスレッドは detached 状態で作成される。
+.TP 
+\fBPTHREAD_CREATE_JOINABLE\fP
+\fIattr\fP を使って作成されるスレッドは join 可能な状態で作成される。
+.PP
+新規に初期化されたスレッド属性オブジェクトの detach state 属性の
+デフォルト設定は \fBPTHREAD_CREATE_JOINABLE\fP である。
+.PP
+\fBpthread_attr_getdetachstate\fP() は、
+スレッド属性オブジェクト \fIattr\fP の detach state 属性を
+\fIdetachstate\fP が指すバッファーに入れて返す。
+.SH 返り値
+成功すると、これらの関数は 0 を返す。
+エラーの場合、0 以外のエラー番号を返す。
+.SH エラー
+\fBpthread_attr_setdetachstate\fP() は以下のエラーで失敗する場合がある。
+.TP 
+\fBEINVAL\fP
+無効な値が \fIdetachstate\fP で指定された。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw30 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBpthread_attr_setdetachstate\fP(),
+\fBpthread_attr_getdetachstate\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+detached 状態のスレッド、join 可能状態のスレッドの詳細については、
+\fBpthread_create\fP(3) を参照。
+.PP
+join 可能状態で作成されたスレッドは、最終的に
+\fBpthread_join\fP(3) を使って join するか、
+\fBpthread_detach\fP(3) を使って切り離すか、
+のどちらかを行うべきである。
+.PP
+detached 状態で作成されたスレッドのスレッド ID を指定して、
+\fBpthread_detach\fP(3) や \fBpthread_join\fP(3) を後から呼び出すのは
+エラーである。
+.SH EXAMPLES
+\fBpthread_attr_init\fP(3) を参照。
+.SH 関連項目
+\fBpthread_attr_init\fP(3), \fBpthread_create\fP(3), \fBpthread_detach\fP(3),
+\fBpthread_join\fP(3), \fBpthreads\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/pthread_attr_setguardsize.3 b/manual/LDP_man-pages/draft/man3/pthread_attr_setguardsize.3
new file mode 100644 (file)
index 0000000..2359ff0
--- /dev/null
@@ -0,0 +1,147 @@
+.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2012  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2012-05-03, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH PTHREAD_ATTR_SETGUARDSIZE 3 2020\-06\-09 Linux "Linux Programmer's Manual"
+.SH 名前
+pthread_attr_setguardsize, pthread_attr_getguardsize \-
+スレッド属性オブジェクトの guard size 属性の設定/取得を行う
+.SH 書式
+.nf
+\fB#include <pthread.h>\fP
+.PP
+\fBint pthread_attr_setguardsize(pthread_attr_t *\fP\fIattr\fP\fB, size_t \fP\fIguardsize\fP\fB);\fP
+\fBint pthread_attr_getguardsize(const pthread_attr_t *\fP\fIattr\fP\fB,\fP
+\fB                              size_t *\fP\fIguardsize\fP\fB);\fP
+.PP
+\fI\-pthread\fP でコンパイルしてリンクする。
+.fi
+.SH 説明
+\fBpthread_attr_setguardsize\fP() 関数は、
+\fIattr\fP が参照するスレッド属性オブジェクトの guard size 属性を
+\fIguardsize\fP で指定された値に設定する。
+.PP
+\fIguardsize\fP が 0 より大きい場合、
+\fIattr\fP を使って新しく作成された各スレッドに対して、
+システムはスレッドのスタックの末尾に少なくとも \fIguardsize\fP バイトの
+追加領域を割り当てる。この追加領域はスタックに対するガード領域として
+機能する (ただし「バグ」の節も参照)。
+.PP
+\fIguardsize\fP が 0 の場合、
+\fIattr\fP を使って新しく作成されたスレッドはガード領域を持たない。
+.PP
+デフォルトの guard size はシステムのページサイズと同じである。
+.PP
+(\fBpthread_attr_setstack\fP(3) や \fBpthread_attr_setstackaddr\fP(3)を使って)
+\fIattr\fP でスタックアドレス属性が設定されている場合には、呼び出し側がそ
+のスレッドのスタックを割り当てていることを意味するので、guard size 属性
+は無視される (すなわち、システムによるガード領域の作成は行われない)。
+この場合、スタックオーバーフローが起こらないように対処するのはアプリ
+ケーション側の責任となる (おそらく \fBmprotect\fP(2) を使って、割り当て
+られたスタックの最後に手動でガード領域を定義することになるだろう)。
+.PP
+\fBpthread_attr_getguardsize\fP() は、
+スレッド属性オブジェクト \fIattr\fP の guard size 属性を
+\fIguardsize\fP が指すバッファーに入れて返す。
+.SH 返り値
+成功すると、これらの関数は 0 を返す。
+エラーの場合、0 以外のエラー番号を返す。
+.SH エラー
+POSIX.1 documents an \fBEINVAL\fP error if \fIattr\fP or \fIguardsize\fP is invalid.
+On Linux these functions always succeed (but portable and future\-proof
+applications should nevertheless handle a possible error return).
+.SH バージョン
+これらの関数は glibc バージョン 2.1 以降で提供されている。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw28 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBpthread_attr_setguardsize\fP(),
+\fBpthread_attr_getguardsize\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+ガード領域は、読み出し/書き込みアクセスが行われないように保護がかけ
+られた仮想メモリーページで構成で構成される。スレッドがスタックをガード
+領域までオーバーフローさせた場合、ほとんどのハードウェアアーキテクチャー
+では、スレッドに \fBSIGSEGV\fP シグナルが送られ、オーバーフローが発生した
+ことが通知される。ガード領域はページ境界から開始され、ガード領域の
+大きさはスレッド作成時に内部的にシステムのページサイズに切り上げられる
+(その場合も \fBpthread_attr_getguardsize\fP() では
+\fBpthread_attr_setguardsize\fP() で設定された guard size が返される)。
+.PP
+多くのスレッドを作成するアプリケーションで、かつ、スタックオーバーフロー
+が決して発生しないことが分かっている場合には、guard size を 0 に設定
+することで、メモリーを節約できることもある。
+.PP
+スレッドがスタックに大きなデータ構造を割り当てる場合には、
+スタックオーバーフローを検出するためには、デフォルトサイズよりも
+大きな guard size を選ぶ必要があるかもしれない。
+.SH バグ
+glibc 2.8 の時点では、 NPTL スレッド実装ではガード領域はスタックサイズ
+で割り当てられる領域の中に含まれている。一方、POSIX.1 では、スタックの
+末尾に追加の領域を割り当てることが求められている。
+(このため、ガード領域が大きすぎて、
+実際のスタック用の場所がなくなってしまう場合、
+\fBpthread_create\fP(3) で \fBEINVAL\fP エラーが発生することになる。)
+.PP
+.\" glibc includes the guardsize within the allocated stack size,
+.\" which looks pretty clearly to be in violation of POSIX.
+.\"
+.\" Filed bug, 22 Oct 2008:
+.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6973
+.\"
+.\" Older reports:
+.\" https//bugzilla.redhat.com/show_bug.cgi?id=435337
+.\" Reportedly, LinuxThreads did the right thing, allocating
+.\" extra space at the end of the stack:
+.\" http://sourceware.org/ml/libc-alpha/2008-05/msg00086.html
+廃止予定の LinuxThreads 実装では、
+POSIX.1 で求められている通りの動作で、
+ガード領域がスタックの末尾に追加の領域が割り当てられる。
+.SH EXAMPLES
+\fBpthread_getattr_np\fP(3) を参照。
+.SH 関連項目
+\fBmmap\fP(2), \fBmprotect\fP(2), \fBpthread_attr_init\fP(3),
+\fBpthread_attr_setstack\fP(3), \fBpthread_attr_setstacksize\fP(3),
+\fBpthread_create\fP(3), \fBpthreads\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/pthread_attr_setinheritsched.3 b/manual/LDP_man-pages/draft/man3/pthread_attr_setinheritsched.3
new file mode 100644 (file)
index 0000000..78ba70f
--- /dev/null
@@ -0,0 +1,129 @@
+.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2012  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2012-05-03, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2013-07-17, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2013-07-31, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH PTHREAD_ATTR_SETINHERITSCHED 3 2020\-06\-09 Linux "Linux Programmer's Manual"
+.SH 名前
+pthread_attr_setinheritsched, pthread_attr_getinheritsched \- スレッド属性オブジェクトの
+inherit\-scheduler 属性の設定/取得を行う
+.SH 書式
+.nf
+\fB#include <pthread.h>\fP
+.PP
+\fBint pthread_attr_setinheritsched(pthread_attr_t *\fP\fIattr\fP\fB,\fP
+\fB                                 int \fP\fIinheritsched\fP\fB);\fP
+\fBint pthread_attr_getinheritsched(const pthread_attr_t *\fP\fIattr\fP\fB,\fP
+\fB                                 int *\fP\fIinheritsched\fP\fB);\fP
+.PP
+\fI\-pthread\fP でコンパイルしてリンクする。
+.fi
+.SH 説明
+\fBpthread_attr_setinheritsched\fP() 関数は、 \fIattr\fP が参照するスレッド属性オブジェクトの
+inherit\-scheduler 属性を \fIinheritsched\fP で指定された値に設定する。 inherit\-scheduler
+属性により、スレッド属性オブジェクト \fIattr\fP を使って作成されるスレッドが、呼び出したスレッドのスケジューリング属性を継承するか、
+\fIattr\fP からスケジューリング属性を取得するかが決定される。
+.PP
+次に挙げるスケジューリング属性は inherit\-scheduler 属性の影響を受ける: スケジューリングポリシー
+(\fBpthread_attr_setschedpolicy\fP(3))、 スケジューリング優先度
+(\fBpthread_attr_setschedparam\fP(3))、 contention scope
+(\fBpthread_attr_setscope\fP(3))。
+.PP
+以下の値を \fIinheritsched\fP に指定できる。
+.TP 
+\fBPTHREAD_INHERIT_SCHED\fP
+\fIattr\fP を使って作成されたスレッドは、
+スレッドを作成するスレッドからスケジューリング属性を継承する。
+\fIattr\fP 内のスケジューリング属性は無視される。
+.TP 
+\fBPTHREAD_EXPLICIT_SCHED\fP
+.\" FIXME Document the defaults for scheduler settings
+\fIattr\fP を使って作成されたスレッドは、スレッド属性オブジェクトで
+指定された値からスケジューリング属性を取得する。
+.PP
+新たに初期化されたスレッド属性オブジェクトの inherit\-scheduler 属性のデフォルト設定は
+\fBPTHREAD_INHERIT_SCHED\fP である。
+.PP
+\fBpthread_attr_getinheritsched\fP() は、 スレッド属性オブジェクト \fIattr\fP の
+inherit\-scheduler 属性を \fIinheritsched\fP が指すバッファーに入れて返す。
+.SH 返り値
+成功すると、これらの関数は 0 を返す。
+エラーの場合、0 以外のエラー番号を返す。
+.SH エラー
+\fBpthread_attr_setinheritsched\fP() は以下のエラーで失敗する場合がある。
+.TP 
+\fBEINVAL\fP
+\fIinheritsched\fP に無効な値が指定された。
+.PP
+.\" .SH VERSIONS
+.\" Available since glibc 2.0.
+POSIX.1 also documents an optional \fBENOTSUP\fP error ("attempt was made to
+set the attribute to an unsupported value") for
+\fBpthread_attr_setinheritsched\fP().
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw31 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBpthread_attr_setinheritsched\fP(),
+\fBpthread_attr_getinheritsched\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH バグ
+.\" FIXME . Track status of the following bug:
+.\" http://sourceware.org/bugzilla/show_bug.cgi?id=7007
+glibc 2.8 の時点では、スレッド属性オブジェクトが \fBpthread_attr_init\fP(3) を使って初期化された場合、
+スレッド属性オブジェクトのスケジューリングポリシーが \fBSCHED_OTHER\fP に、 スケジューリング優先度が 0 に設定される。一方、その後
+inherit\-scheduler 属性に \fBPTHREAD_EXPLICIT_SCHED\fP
+が設定されると、このスレッド属性オブジェクトを使って作成されたスレッドでは、スレッドを作成するスレッドのスケジューリング属性が間違って継承されてしまう。
+\fBpthread_create\fP(3) を呼び出す前にスケジューリングポリシー属性かスケジューリング優先度属性のどちらかが明示的に設定された場合には、
+このバグは発生しない。
+.SH EXAMPLES
+\fBpthread_setschedparam\fP(3) を参照。
+.SH 関連項目
+.ad l
+.nh
+\fBpthread_attr_init\fP(3), \fBpthread_attr_setschedparam\fP(3),
+\fBpthread_attr_setschedpolicy\fP(3), \fBpthread_attr_setscope\fP(3),
+\fBpthread_create\fP(3), \fBpthread_setschedparam\fP(3),
+\fBpthread_setschedprio\fP(3), \fBpthreads\fP(7), \fBsched\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/pthread_attr_setschedparam.3 b/manual/LDP_man-pages/draft/man3/pthread_attr_setschedparam.3
new file mode 100644 (file)
index 0000000..0435457
--- /dev/null
@@ -0,0 +1,125 @@
+.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2012  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2012-05-03, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2013-07-17, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2013-07-31, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH PTHREAD_ATTR_SETSCHEDPARAM 3 2020\-06\-09 Linux "Linux Programmer's Manual"
+.SH 名前
+pthread_attr_setschedparam, pthread_attr_getschedparam \-
+スレッド属性オブジェクトのスケジューリングパラメーター属性の設定/取得を行う
+.SH 書式
+.nf
+\fB#include <pthread.h>\fP
+.PP
+\fBint pthread_attr_setschedparam(pthread_attr_t *\fP\fIattr\fP\fB,\fP
+\fB                               const struct sched_param *\fP\fIparam\fP\fB);\fP
+\fBint pthread_attr_getschedparam(const pthread_attr_t *\fP\fIattr\fP\fB,\fP
+\fB                               struct sched_param *\fP\fIparam\fP\fB);\fP
+.PP
+\fI\-pthread\fP でコンパイルしてリンクする。
+.fi
+.SH 説明
+\fBpthread_attr_setschedparam\fP() 関数は、
+\fIattr\fP が参照するスレッド属性オブジェクトのスケジューリング
+パラメーター属性を \fIparam\fP が指すバッファーで指定された値に設定する。
+これらの属性により、スレッド属性オブジェクト \fIattr\fP を使って
+作成されるスレッドのスケジューリングパラメーターが決定される。
+.PP
+\fBpthread_attr_getschedparam\fP() は、
+スレッド属性オブジェクト \fIattr\fP のスケジューリングパラメーター属性を
+\fIparam\fP が指すバッファーに入れて返す。
+.PP
+スケジューリングパラメーターは以下の構造体で管理される。
+.PP
+.in +4n
+.EX
+struct sched_param {
+    int sched_priority;     /* Scheduling priority */
+};
+.EE
+.in
+.PP
+見て分かる通り、サポートされているスケジューリングパラメーターは一つだけである。各スケジューリングポリシーで許可されるスケジューリング優先度の詳細については、\fBsched\fP(7)
+を参照のこと。
+.PP
+\fBpthread_create\fP(3) を呼び出した際に \fBpthread_attr_setschedparam\fP()
+で行ったパラメーター設定を有効にするには、 呼び出し側で \fBpthread_attr_setinheritsched\fP(3) を使って
+属性オブジェクト \fIattr\fP の inherit\-scheduler 属性を \fBPTHREAD_EXPLICIT_SCHED\fP
+に設定しておかなければならない。
+.SH 返り値
+成功すると、これらの関数は 0 を返す。
+エラーの場合、0 以外のエラー番号を返す。
+.SH エラー
+\fBpthread_attr_setschedparam\fP()  can fail with the following error:
+.TP 
+\fBEINVAL\fP
+The priority specified in \fIparam\fP does not make sense for the current
+scheduling policy of \fIattr\fP.
+.PP
+.\" .SH VERSIONS
+.\" Available since glibc 2.0.
+POSIX.1 also documents an \fBENOTSUP\fP error for
+\fBpthread_attr_setschedparam\fP().  This value is never returned on Linux (but
+portable and future\-proof applications should nevertheless handle this error
+return value).
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw29 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBpthread_attr_setschedparam\fP(),
+\fBpthread_attr_getschedparam\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+Linux でサポートされているスレッドのスケジューリングポリシーのリストに
+ついては、 \fBpthread_attr_setschedpolicy\fP(3) を参照。
+.SH EXAMPLES
+\fBpthread_setschedparam\fP(3) を参照。
+.SH 関連項目
+.ad l
+.nh
+\fBsched_get_priority_min\fP(2), \fBpthread_attr_init\fP(3),
+\fBpthread_attr_setinheritsched\fP(3), \fBpthread_attr_setschedpolicy\fP(3),
+\fBpthread_create\fP(3), \fBpthread_setschedparam\fP(3),
+\fBpthread_setschedprio\fP(3), \fBpthreads\fP(7), \fBsched\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/pthread_attr_setschedpolicy.3 b/manual/LDP_man-pages/draft/man3/pthread_attr_setschedpolicy.3
new file mode 100644 (file)
index 0000000..cf541ce
--- /dev/null
@@ -0,0 +1,109 @@
+.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2012  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2012-05-03, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2013-07-31, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH PTHREAD_ATTR_SETSCHEDPOLICY 3 2020\-06\-09 Linux "Linux Programmer's Manual"
+.SH 名前
+pthread_attr_setschedpolicy, pthread_attr_getschedpolicy \- スレッド属性
+オブジェクトのスケジューリングポリシー属性の設定/取得を行う
+.SH 書式
+.nf
+\fB#include <pthread.h>\fP
+.PP
+\fBint pthread_attr_setschedpolicy(pthread_attr_t *\fP\fIattr\fP\fB, int \fP\fIpolicy\fP\fB);\fP
+\fBint pthread_attr_getschedpolicy(const pthread_attr_t *\fP\fIattr\fP\fB, int \fP\fI*policy\fP\fB);\fP
+.PP
+\fI\-pthread\fP でコンパイルしてリンクする。
+.fi
+.SH 説明
+\fBpthread_attr_setschedpolicy\fP() 関数は、
+\fIattr\fP が参照するスレッド属性オブジェクトのスケジューリング
+ポリシー属性を \fIpolicy\fP で指定された値に設定する。
+この属性により、スレッド属性オブジェクト \fIattr\fP を使って
+作成されるスレッドのスケジューリングポリシーが決定される。
+.PP
+.\" FIXME . pthread_setschedparam() places no restriction on the policy,
+.\" but pthread_attr_setschedpolicy() restricts policy to RR/FIFO/OTHER
+.\" http://sourceware.org/bugzilla/show_bug.cgi?id=7013
+\fIpolicy\fP に指定できる値は \fBSCHED_FIFO\fP, \fBSCHED_RR\fP, \fBSCHED_OTHER\fP である。それぞれの意味は
+\fBsched\fP(7) で説明している通りである。
+.PP
+\fBpthread_attr_getschedpolicy\fP() は、
+スレッド属性オブジェクト \fIattr\fP のスケジューリングポリシー属性を
+\fIpolicy\fP が指すバッファーに入れて返す。
+.PP
+\fBpthread_create\fP(3) を呼び出した際に \fBpthread_attr_setschedpolicy\fP()
+で行ったポリシー設定を有効にするには、 呼び出し側で \fBpthread_attr_setinheritsched\fP(3) を使って 属性オブジェクト
+\fIattr\fP の inherit\-scheduler 属性を \fBPTHREAD_EXPLICIT_SCHED\fP に設定しておかなければならない。
+.SH 返り値
+成功すると、これらの関数は 0 を返す。
+エラーの場合、0 以外のエラー番号を返す。
+.SH エラー
+\fBpthread_attr_setschedpolicy\fP() は以下のエラーで失敗する場合がある。
+.TP 
+\fBEINVAL\fP
+\fIpolicy\fP に無効な値が指定された。
+.PP
+.\" .SH VERSIONS
+.\" Available since glibc 2.0.
+POSIX.1 also documents an optional \fBENOTSUP\fP error ("attempt was made to
+set the attribute to an unsupported value") for
+\fBpthread_attr_setschedpolicy\fP().
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw30 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBpthread_attr_setschedpolicy\fP(),
+\fBpthread_attr_getschedpolicy\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH EXAMPLES
+\fBpthread_setschedparam\fP(3) を参照。
+.SH 関連項目
+.ad l
+.nh
+\fBpthread_attr_init\fP(3), \fBpthread_attr_setinheritsched\fP(3),
+\fBpthread_attr_setschedparam\fP(3), \fBpthread_create\fP(3),
+\fBpthread_setschedparam\fP(3), \fBpthread_setschedprio\fP(3), \fBpthreads\fP(7),
+\fBsched\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/pthread_attr_setscope.3 b/manual/LDP_man-pages/draft/man3/pthread_attr_setscope.3
new file mode 100644 (file)
index 0000000..fd4c657
--- /dev/null
@@ -0,0 +1,129 @@
+.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2012  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2012-05-04, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2013-07-17, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2013-07-31, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH PTHREAD_ATTR_SETSCOPE 3 2017\-09\-15 Linux "Linux Programmer's Manual"
+.SH 名前
+pthread_attr_setscope, pthread_attr_getscope \-
+スレッド属性オブジェクトの contention scope 属性の設定/取得を行う
+.SH 書式
+.nf
+\fB#include <pthread.h>\fP
+.PP
+\fBint pthread_attr_setscope(pthread_attr_t *\fP\fIattr\fP\fB, int \fP\fIscope\fP\fB);\fP
+\fBint pthread_attr_getscope(const pthread_attr_t *\fP\fIattr\fP\fB, int *\fP\fIscope\fP\fB);\fP
+.PP
+\fI\-pthread\fP でコンパイルしてリンクする。
+.fi
+.SH 説明
+The \fBpthread_attr_setscope\fP()  function sets the contention scope attribute
+of the thread attributes object referred to by \fIattr\fP to the value
+specified in \fIscope\fP.  The contention scope attribute defines the set of
+threads against which a thread competes for resources such as the CPU.
+POSIX.1 specifies two possible values for \fIscope\fP:
+.TP 
+\fBPTHREAD_SCOPE_SYSTEM\fP
+スレッドは、同じスケジューリング割り当てドメイン (一つ以上のプロセッサ
+のグループ) にある、システム上の全てのプロセスの自分以外の全ての
+スレッドとリソースを取り合う。
+\fBPTHREAD_SCOPE_SYSTEM\fP のスレッドは、スケジューリングポリシーと
+優先度に基づき、互いに相対的にスケジューリングされる。
+.TP 
+\fBPTHREAD_SCOPE_PROCESS\fP
+The thread competes for resources with all other threads in the same process
+that were also created with the \fBPTHREAD_SCOPE_PROCESS\fP contention scope.
+\fBPTHREAD_SCOPE_PROCESS\fP threads are scheduled relative to other threads in
+the process according to their scheduling policy and priority.  POSIX.1
+leaves it unspecified how these threads contend with other threads in other
+process on the system or with other threads in the same process that were
+created with the \fBPTHREAD_SCOPE_SYSTEM\fP contention scope.
+.PP
+POSIX.1 requires that an implementation support at least one of these
+contention scopes.  Linux supports \fBPTHREAD_SCOPE_SYSTEM\fP, but not
+\fBPTHREAD_SCOPE_PROCESS\fP.
+.PP
+複数の contention scope をサポートしているシステムで、 \fBpthread_create\fP(3) を呼び出した際に
+\fBpthread_attr_setscope\fP() で行ったパラメーター設定を有効にするには、 呼び出し側で
+\fBpthread_attr_setinheritsched\fP(3) を使って 属性オブジェクト \fIattr\fP の inherit\-scheduler
+属性を \fBPTHREAD_EXPLICIT_SCHED\fP に設定しておかなければならない。
+.PP
+\fBpthread_attr_getscope\fP() は、
+スレッド属性オブジェクト \fIattr\fP の contention scope 属性を
+\fIscope\fP が指すバッファーに入れて返す。
+.SH 返り値
+成功すると、これらの関数は 0 を返す。
+エラーの場合、0 以外のエラー番号を返す。
+.SH エラー
+\fBpthread_attr_setscope\fP() は以下のエラーで失敗する場合がある。
+.TP 
+\fBEINVAL\fP
+\fIscope\fP に無効な値が指定された。
+.TP 
+\fBENOTSUP\fP
+\fIscope\fP に値 \fBPTHREAD_SCOPE_PROCESS\fP が指定された。
+この値は Linux でサポートされていない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw24 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBpthread_attr_setscope\fP(),
+\fBpthread_attr_getscope\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+\fBPTHREAD_SCOPE_SYSTEM\fP contention scope では、通常は、一つの
+ユーザー空間スレッドは一つのカーネルスケジューリングエンティティに
+直接結び付けられる。
+Linux では、廃止予定の LinuxThreads 実装も新しい NPTL 実装もこれに
+該当し、両方とも 1:1 で結び付けられるスレッド実装となっている。
+.PP
+POSIX.1 specifies that the default contention scope is
+implementation\-defined.
+.SH 関連項目
+.ad l
+.nh
+\fBpthread_attr_init\fP(3), \fBpthread_attr_setaffinity_np\fP(3),
+\fBpthread_attr_setinheritsched\fP(3), \fBpthread_attr_setschedparam\fP(3),
+\fBpthread_attr_setschedpolicy\fP(3), \fBpthread_create\fP(3), \fBpthreads\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/pthread_attr_setstack.3 b/manual/LDP_man-pages/draft/man3/pthread_attr_setstack.3
new file mode 100644 (file)
index 0000000..75b3927
--- /dev/null
@@ -0,0 +1,147 @@
+.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2012  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2012-05-03, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH PTHREAD_ATTR_SETSTACK 3 2020\-06\-09 Linux "Linux Programmer's Manual"
+.SH 名前
+pthread_attr_setstack, pthread_attr_getstack \-
+スレッド属性オブジェクトのスタック属性の設定/取得を行う
+.SH 書式
+.nf
+\fB#include <pthread.h>\fP
+.PP
+\fBint pthread_attr_setstack(pthread_attr_t *\fP\fIattr\fP\fB,\fP
+\fB                          void *\fP\fIstackaddr\fP\fB, size_t \fP\fIstacksize\fP\fB);\fP
+\fBint pthread_attr_getstack(const pthread_attr_t *\fP\fIattr\fP\fB,\fP
+\fB                          void **\fP\fIstackaddr\fP\fB, size_t *\fP\fIstacksize\fP\fB);\fP
+.PP
+\fI\-pthread\fP でコンパイルしてリンクする。
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBpthread_attr_getstack\fP(), \fBpthread_attr_setstack\fP():
+.RS 4
+_POSIX_C_SOURCE\ >=\ 200112L
+.RE
+.ad b
+.SH 説明
+\fBpthread_attr_setstack\fP() 関数は、
+\fIattr\fP が参照するスレッド属性オブジェクトのスタックアドレス属性と
+スタックサイズ属性をそれぞれ \fIstackaddr\fP と \fIstacksize\fP で
+指定された値に設定する。
+これらの属性により、スレッド属性オブジェクト \fIattr\fP を使って
+作成されるスレッドが使用すべきスタックの位置とサイズが指定される。
+.PP
+\fIstackaddr\fP は、呼び出し側で割り当てた、大きさが \fIstacksize\fP バイトの
+バッファー内の指定できる最小のアドレスバイトを指すべきである。
+割り当てられたバッファーのページは読み書き両方が可能なページとなっている
+べきである。
+.PP
+\fBpthread_attr_getstack\fP() 関数は、
+スレッド属性オブジェクト \fIattr\fP のスタックアドレス属性と
+スタックサイズ属性をそれぞれ \fIstackaddr\fP と \fIstacksize\fP が
+指すバッファーに入れて返す。
+.SH 返り値
+成功すると、これらの関数は 0 を返す。
+エラーの場合、0 以外のエラー番号を返す。
+.SH エラー
+\fBpthread_attr_setstack\fP() は以下のエラーで失敗する場合がある。
+.TP 
+\fBEINVAL\fP
+\fIstacksize\fP が \fBPTHREAD_STACK_MIN\fP (16384) よりも小さい。
+システムによっては、 \fIstackaddr\fP か
+\fIstackaddr\ +\ stacksize\fP のアライメントが適切でない場合にも
+このエラーが発生する。
+.PP
+POSIX.1 also documents an \fBEACCES\fP error if the stack area described by
+\fIstackaddr\fP and \fIstacksize\fP is not both readable and writable by the
+caller.
+.SH バージョン
+これらの関数は glibc バージョン 2.2 以降で提供されている。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw24 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBpthread_attr_setstack\fP(),
+\fBpthread_attr_getstack\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+これらの関数は、スレッドのスタックが特定の場所に配置されることを保証
+しなければならないアプリケーションのために提供されている。
+ほとんどのアプリケーションでは、このようなことは必要なく、
+これらの関数を使うのは避けるべきである。
+(アプリケーションが単にスタックサイズだけをデフォルトの値から変更する
+必要がある場合には \fBpthread_attr_setstacksize\fP(3) を使うこと)
+.PP
+アプリケーションが \fBpthread_attr_setstack\fP() を利用する際には、
+スタックの割り当てに責任を持つ必要がある。
+\fBpthread_attr_setguardsize\fP(3) を使って設定された
+guard size の値は無視される。
+必要と思われる場合は、アプリケーションが責任を持ってガード領域 (読み書
+きが行われないように保護された 1 個かそれ以上のページ) の割り当てを行い、
+スタックオーバーフローの可能性に対処するようにする必要がある。
+.PP
+\fIstackaddr\fP に指定するアドレスは適切なアライメントとなっているべきである。
+完全な移植性を持たせるためには、
+ページ境界 (\fIsysconf(_SC_PAGESIZE)\fP) に揃えること。
+割り当てには \fBposix_memalign\fP(3) を使うとよい。
+たいていは、 \fIstacksize\fP はシステムのページサイズの倍数とすべきである。
+.PP
+一つの \fIattr\fP を使って複数のスレッドを作成する場合、
+\fBpthread_create\fP(3) の次の呼び出しを行う前に、
+呼び出し側でスタックアドレス属性を変更しなければならない。
+さもなければ、複数のスレッドがスタックとして同じメモリー領域を
+使おうとするため、訳の分からない状況が発生してしまう。
+.SH EXAMPLES
+\fBpthread_attr_init\fP(3) を参照。
+.SH 関連項目
+.ad l
+.nh
+\fBmmap\fP(2), \fBmprotect\fP(2), \fBposix_memalign\fP(3), \fBpthread_attr_init\fP(3),
+\fBpthread_attr_setguardsize\fP(3), \fBpthread_attr_setstackaddr\fP(3),
+\fBpthread_attr_setstacksize\fP(3), \fBpthread_create\fP(3), \fBpthreads\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/pthread_attr_setstackaddr.3 b/manual/LDP_man-pages/draft/man3/pthread_attr_setstackaddr.3
new file mode 100644 (file)
index 0000000..01e2491
--- /dev/null
@@ -0,0 +1,108 @@
+.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2012  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2012-05-03, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH PTHREAD_ATTR_SETSTACKADDR 3 2017\-09\-15 Linux "Linux Programmer's Manual"
+.SH 名前
+pthread_attr_setstackaddr, pthread_attr_getstackaddr \-
+スレッド属性オブジェクトのスタックアドレス属性の設定/取得を行う
+.SH 書式
+.nf
+\fB#include <pthread.h>\fP
+.PP
+\fBint pthread_attr_setstackaddr(pthread_attr_t *\fP\fIattr\fP\fB, void *\fP\fIstackaddr\fP\fB);\fP
+\fBint pthread_attr_getstackaddr(const pthread_attr_t *\fP\fIattr\fP\fB,\fP
+\fB                              void **\fP\fIstackaddr\fP\fB);\fP
+.PP
+\fI\-pthread\fP でコンパイルしてリンクする。
+.fi
+.SH 説明
+これらの関数は廃止予定であり、\fB使用しないこと\fP。
+代わりに \fBpthread_attr_setstack\fP(3) と \fBpthread_attr_getstack\fP(3) を使うこと。
+.PP
+\fBpthread_attr_setstackaddr\fP() 関数は、
+\fIattr\fP が参照するスレッド属性オブジェクトのスタックアドレス
+属性を \fIstackaddr\fP で指定された値に設定する。
+この属性により、スレッド属性オブジェクト \fIattr\fP を使って
+作成されるスレッドが使用すべきスタックの位置が指定される。
+.PP
+\fIstackaddr\fP は呼び出し側が割り当てたバッファー (大きさは
+少なくとも \fBPTHREAD_STACK_MIN\fP バイト)を指すべきである。
+割り当てられたバッファーのページは読み書き両方が可能なページと
+なっているべきである。
+.PP
+\fBpthread_attr_getstackaddr\fP() は、
+スレッド属性オブジェクト \fIattr\fP のスタックアドレス属性を
+\fIstackaddr\fP が指すバッファーに入れて返す。
+.SH 返り値
+成功すると、これらの関数は 0 を返す。
+エラーの場合、0 以外のエラー番号を返す。
+.SH エラー
+エラーは定義されていない (ただし、アプリケーションは正のエラーの
+返り値を処理するようにすべきである)。
+.SH バージョン
+これらの関数は glibc バージョン 2.1 以降で提供されている。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw28 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBpthread_attr_setstackaddr\fP(),
+\fBpthread_attr_getstackaddr\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001 では、これらの関数が規定されているが、廃止予定となっている。
+POSIX.1\-2008 では、これらの関数の規定は削除されている。
+.SH 注意
+\fIこれらの関数を使用しないこと!\fP これらの関数は移植性がある形では使用で
+きない。なぜなら、これらの関数ではスタック領域がどちらの方向に伸びるの
+かを指定する手段が提供されていないからである。
+例えば、スタックが下向き (アドレスが小さい方向) に伸びるアーキテクチャー
+では、\fIstackaddr\fP には割り当てられたスタック領域の\fI最も大きな\fPアドレ
+スの次のアドレスを指定する。一方、スタックが上向き (アドレスが大きい
+方向) に伸びるアーキテクチャーでは、\fIstackaddr\fP には割り当てられた
+スタック領域の\fI最も小さい\fPアドレスを指定する。これに対して、
+\fBpthread_attr_setstack\fP(3) と \fBpthread_attr_getstack\fP(3) が使用する
+\fIstackaddr\fP は、常に割り当てられたスタック領域の最も小さいアドレス
+へのポインターである (\fIstacksize\fP 引き数はスタックの範囲を指定する)。
+.SH 関連項目
+\fBpthread_attr_init\fP(3), \fBpthread_attr_setstack\fP(3),
+\fBpthread_attr_setstacksize\fP(3), \fBpthread_create\fP(3), \fBpthreads\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/pthread_attr_setstacksize.3 b/manual/LDP_man-pages/draft/man3/pthread_attr_setstacksize.3
new file mode 100644 (file)
index 0000000..971116a
--- /dev/null
@@ -0,0 +1,113 @@
+.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2012  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2012-05-03, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH PTHREAD_ATTR_SETSTACKSIZE 3 2020\-06\-09 Linux "Linux Programmer's Manual"
+.SH 名前
+pthread_attr_setstacksize, pthread_attr_getstacksize \-
+スレッド属性オブジェクトのスタックサイズ属性の設定/取得を行う
+.SH 書式
+.nf
+\fB#include <pthread.h>\fP
+.PP
+\fBint pthread_attr_setstacksize(pthread_attr_t *\fP\fIattr\fP\fB, size_t \fP\fIstacksize\fP\fB);\fP
+\fBint pthread_attr_getstacksize(const pthread_attr_t *\fP\fIattr\fP\fB,\fP
+\fB                              size_t *\fP\fIstacksize\fP\fB);\fP
+.PP
+\fI\-pthread\fP でコンパイルしてリンクする。
+.fi
+.SH 説明
+\fBpthread_attr_setstacksize\fP() 関数は、
+\fIattr\fP が参照するスレッド属性オブジェクトのスタックアドレス
+属性を \fIstacksize\fP で指定された値に設定する。
+.PP
+スタックサイズ属性により、
+スレッド属性オブジェクト \fIattr\fP を使って作成されたスレッド
+に割り当てられる最小サイズ (バイト単位) が決定される。
+.PP
+\fBpthread_attr_getstacksize\fP() は、
+スレッド属性オブジェクト \fIattr\fP のスタックアドレス属性を
+\fIstacksize\fP が指すバッファーに入れて返す。
+.SH 返り値
+成功すると、これらの関数は 0 を返す。
+エラーの場合、0 以外のエラー番号を返す。
+.SH エラー
+\fBpthread_attr_setstacksize\fP() は以下のエラーで失敗する場合がある。
+.TP 
+\fBEINVAL\fP
+スタックサイズが \fBPTHREAD_STACK_MIN\fP (16384) バイト未満である。
+.PP
+.\" e.g., MacOS
+いくつかのシステムでは、 \fBpthread_attr_setstacksize\fP() は
+\fIstacksize\fP がシステムのページサイズの倍数でない場合にも
+エラー \fBEINVAL\fP で失敗する。
+.SH バージョン
+これらの関数は glibc バージョン 2.1 以降で提供されている。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw28 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBpthread_attr_setstacksize\fP(),
+\fBpthread_attr_getstacksize\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+新しいスレッドのデフォルトのスタックサイズの詳細については
+\fBpthread_create\fP(3) を参照。
+.PP
+スレッドのスタックサイズは、スレッド作成時点では固定である。
+メインスレッドだけがスタックを動的に伸ばすことができる。
+.PP
+\fBpthread_attr_setstack\fP(3) 関数を使うと、
+アプリケーションは、スレッドが使用するスタックとして、
+呼び出し側で割り当てたスタックのサイズと場所を指定できる。
+.SH バグ
+As at glibc 2.8, if the specified \fIstacksize\fP is not a multiple of
+\fBSTACK_ALIGN\fP (16 bytes on most architectures), it may be rounded
+\fIdownward\fP, in violation of POSIX.1, which says that the allocated stack
+will be at least \fIstacksize\fP bytes.
+.SH EXAMPLES
+\fBpthread_create\fP(3) を参照。
+.SH 関連項目
+\fBgetrlimit\fP(2), \fBpthread_attr_init\fP(3), \fBpthread_attr_setguardsize\fP(3),
+\fBpthread_attr_setstack\fP(3), \fBpthread_create\fP(3), \fBpthreads\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
index 707e08c..d41f32f 100644 (file)
@@ -99,12 +99,12 @@ cancelability type によって、いつキャンセルが発生するかが決
 .\" Available since glibc 2.0
 ID が \fIthread\fP のスレッドが見つからなかった。
 .SH 属性
-For an explanation of the terms used in this section, see \fBattributes\fP(7).
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
 .TS
 allbox;
 lb lb lb
 l l l.
-Interface      Attribute       Value
+インターフェース       属性  値
 T{
 \fBpthread_cancel\fP()
 T}     Thread safety   MT\-Safe
index 4b43953..c2ec847 100644 (file)
@@ -101,12 +101,12 @@ POSIX.1 では、 \fBpthread_cleanup_push\fP() と \fBpthread_cleanup_pop\fP() 
 .\" Available since glibc 2.0
 エラーはない。
 .SH 属性
-For an explanation of the terms used in this section, see \fBattributes\fP(7).
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
 .TS
 allbox;
 lbw23 lb lb
 l l l.
-Interface      Attribute       Value
+インターフェース       属性  値
 T{
 \fBpthread_cleanup_push\fP(),
 \fBpthread_cleanup_pop\fP()
diff --git a/manual/LDP_man-pages/draft/man3/pthread_detach.3 b/manual/LDP_man-pages/draft/man3/pthread_detach.3
new file mode 100644 (file)
index 0000000..6d880f0
--- /dev/null
@@ -0,0 +1,108 @@
+.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2012  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2012-05-04, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH PTHREAD_DETACH 3 2020\-06\-09 Linux "Linux Programmer's Manual"
+.SH 名前
+pthread_detach \- スレッドを切り離す (detach する)
+.SH 書式
+.nf
+\fB#include <pthread.h>\fP
+.PP
+\fBint pthread_detach(pthread_t \fP\fIthread\fP\fB);\fP
+.fi
+.PP
+\fI\-pthread\fP を付けてコンパイルとリンクを行う。
+.SH 説明
+\fBpthread_detach\fP() 関数は \fIthread\fP で識別されるスレッドに
+detached (切り離された状態) という印を付ける。
+detached 状態のスレッドが終了すると、
+別のスレッドが終了されたスレッドを join しなくても、
+そのスレッドのリソースは自動的に解放されてシステムに戻される。
+.PP
+すでに detach 状態のスレッドを detach しようとした場合に
+どのような結果となるかは規定されていない。
+.SH 返り値
+成功すると、\fBpthread_detach\fP() は 0 を返す。
+エラーの場合、エラー番号を返す。
+.SH エラー
+.TP 
+\fBEINVAL\fP
+\fIthread\fP が join 可能なスレッドではない。
+.TP 
+\fBESRCH\fP
+ID が \fIthread\fP のスレッドが見つからなかった。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBpthread_detach\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.sp 1
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+いったんスレッドを detached 状態にすると、
+そのスレッドを \fBpthread_join\fP(3) で join したり、
+もう一度 join 可能にしたりすることはできない。
+.PP
+\fBpthread_attr_setdetachstate\fP(3) を使って
+\fBpthread_create\fP(3) の \fIattr\fP 引き数の detached 属性を設定することで、
+新しいスレッドを detached 状態で作成することができる。
+.PP
+detached 属性は、スレッドが終了した際のシステムの動作を決めるだけである。
+プロセスが \fBexit\fP(3) を使って終了した場合に、そのスレッドが終了され
+なくなるようなことはない (なお、メインスレッドが return した場合も
+プロセスが \fBexit\fP(3) を使って終了した場合と全く同じである)。
+.PP
+Either \fBpthread_join\fP(3)  or \fBpthread_detach\fP()  should be called for each
+thread that an application creates, so that system resources for the thread
+can be released.  (But note that the resources of any threads for which one
+of these actions has not been done will be freed when the process
+terminates.)
+.SH EXAMPLES
+以下の文は、呼び出したスレッド自身を detach する。
+.PP
+    pthread_detach(pthread_self());
+.SH 関連項目
+\fBpthread_attr_setdetachstate\fP(3), \fBpthread_cancel\fP(3),
+\fBpthread_create\fP(3), \fBpthread_exit\fP(3), \fBpthread_join\fP(3), \fBpthreads\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/pthread_equal.3 b/manual/LDP_man-pages/draft/man3/pthread_equal.3
new file mode 100644 (file)
index 0000000..a592270
--- /dev/null
@@ -0,0 +1,76 @@
+.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2012  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2012-05-03, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH PTHREAD_EQUAL 3 2015\-08\-08 Linux "Linux Programmer's Manual"
+.SH 名前
+pthread_equal \- スレッド ID を比較する
+.SH 書式
+.nf
+\fB#include <pthread.h>\fP
+.PP
+\fBint pthread_equal(pthread_t \fP\fIt1\fP\fB, pthread_t \fP\fIt2\fP\fB);\fP
+.PP
+\fI\-pthread\fP でコンパイルしてリンクする。
+.fi
+.SH 説明
+\fBpthread_equal\fP() 関数は 2 つのスレッド識別子の比較を行う。
+.SH 返り値
+\fBpthread_equal\fP() は、2 つのスレッド ID が等しければ 0 以外の値を返し、
+そうでなければ 0 を返す。
+.SH エラー
+この関数は常に成功する。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBpthread_equal\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+\fBpthread_equal\fP() 関数が必要なのは、
+スレッド ID はその内部構造を意識すべきではないためである。
+アプリケーションが 2 つの \fIpthread_t\fP の値を直接比較する場合、
+移植性を確保できる形で比較する方法はない。
+.SH 関連項目
+\fBpthread_create\fP(3), \fBpthread_self\fP(3), \fBpthreads\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/pthread_exit.3 b/manual/LDP_man-pages/draft/man3/pthread_exit.3
new file mode 100644 (file)
index 0000000..b13c7de
--- /dev/null
@@ -0,0 +1,112 @@
+.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2012  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2012-05-04, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH PTHREAD_EXIT 3 2017\-09\-15 Linux "Linux Programmer's Manual"
+.SH 名前
+pthread_exit \- 呼び出したスレッドを終了する
+.SH 書式
+.nf
+\fB#include <pthread.h>\fP
+.PP
+\fBvoid pthread_exit(void *\fP\fIretval\fP\fB);\fP
+.PP
+\fI\-pthread\fP でコンパイルしてリンクする。
+.fi
+.SH 説明
+\fBpthread_exit\fP() 関数は、呼び出したスレッドを終了し、
+\fIretval\fP 経由で値を返す。
+この値は (そのスレッドが join 可能な場合に) \fBpthread_join\fP(3) を
+呼び出した同じプロセス内の別のスレッドが参照できる値と同じである。
+.PP
+\fBpthread_cleanup_push\fP(3) で設定されたクリーンアップハンドラーのうち、
+まだ pop (取り出されていない) ハンドラーを (push されたのと逆の順序で)
+取り出して実行する。そのスレッドがスレッド固有のデータを持っている
+場合は、クリーンアップハンドラーが実行された後に、スレッド固有のデータ
+に対応するデストラクタ (destructor) 関数が呼び出される (呼び出し順序
+は規定されていない)。
+.PP
+スレッドが終了する際に、プロセスの共有リソース (例えば、mutex、状態変数
+(condition variables)、セマフォ、ファイルディスクリプター)が解放される。
+\fBatexit\fP(3) を使って登録された関数は呼び出されない。
+.PP
+プロセスの最後のスレッドが終了すると、そのプロセスは、終了ステータス 0
+で \fBexit\fP(3) を呼び出した場合と全く同じように終了する。したがって、
+プロセスの共有リソースは解放され、\fBatexit\fP(3) を使って登録された関数
+が呼び出される。
+.SH 返り値
+この関数は呼び出し側には返らない。
+.SH エラー
+この関数は常に成功する。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBpthread_exit\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+メインスレッド以外のスレッドの開始関数 (start function) がreturn を
+行うと、暗黙のうちに \fBpthread_exit\fP() が呼び出され、
+関数の返り値がスレッドの終了ステータスとして使用される。
+.PP
+他のスレッドが実行を継続できるように、メインスレッドは \fBexit\fP(3) では
+なく \fBpthread_exit\fP() を呼び出して終了すべきである。
+.PP
+\fIretval\fP が指す値は、呼び出したスレッドのスタックに置くべきではない。
+呼び出したスレッドが終了した後は、そのスタックの内容が不定となるから
+である。
+.SH バグ
+.\" Linux 2.6.27
+.\" FIXME . review a later kernel to see if this gets fixed
+.\" http://thread.gmane.org/gmane.linux.kernel/611611
+.\" http://marc.info/?l=linux-kernel&m=122525468300823&w=2
+現在のところ、停止 (stop) されたスレッドグループを、すでに終了した
+(dead) スレッドグループリーダーで \fBwait\fP(2) する場合の、
+カーネル実装の論理には制限がある。
+この制限は、すでにスレッドグループリーダーが \fBpthread_exit\fP() を
+呼び出しているようなフォアグラウンドプロセスにストップシグナルが送信
+された場合に、端末がロックされてしまう、といった問題として表に見える
+場合がある。
+.SH 関連項目
+\fBpthread_create\fP(3), \fBpthread_join\fP(3), \fBpthreads\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
index abd1034..9df56b4 100644 (file)
@@ -92,13 +92,13 @@ guard size.
 .SH バージョン
 この関数は glibc バージョン 2.2.3 以降で利用できる。
 .SH 属性
-For an explanation of the terms used in this section, see \fBattributes\fP(7).
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
 .ad l
 .TS
 allbox;
 lbw20 lb lb
 l l l.
-Interface      Attribute       Value
+インターフェース       属性  値
 T{
 \fBpthread_getattr_np\fP()
 T}     Thread safety   MT\-Safe
diff --git a/manual/LDP_man-pages/draft/man3/pthread_getcpuclockid.3 b/manual/LDP_man-pages/draft/man3/pthread_getcpuclockid.3
new file mode 100644 (file)
index 0000000..ed80a0b
--- /dev/null
@@ -0,0 +1,188 @@
+.\" Copyright (c) 2009 Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2012  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2012-05-03, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH PTHREAD_GETCPUCLOCKID 3 2020\-11\-01 Linux "Linux Programmer's Manual"
+.SH 名前
+pthread_getcpuclockid \- スレッドの CPU 時間時計の ID を取得する
+.SH 書式
+.nf
+\fB#include <pthread.h>\fP
+\fB#include <time.h>\fP
+.PP
+\fBint pthread_getcpuclockid(pthread_t \fP\fIthread\fP\fB, clockid_t *\fP\fIclockid\fP\fB);\fP
+.PP
+\fI\-pthread\fP でコンパイルしてリンクする。
+.fi
+.SH 説明
+.\" The clockid is constructed as follows:
+.\" *clockid = CLOCK_THREAD_CPUTIME_ID | (pd->tid << CLOCK_IDFIELD_SIZE)
+.\" where CLOCK_IDFIELD_SIZE is 3.
+The \fBpthread_getcpuclockid\fP()  function obtains the ID of the CPU\-time
+clock of the thread whose ID is given in \fIthread\fP, and returns it in the
+location pointed to by \fIclockid\fP.
+.SH 返り値
+成功すると、この関数は 0 を返す。
+エラーの場合、 0 以外のエラー番号を返す。
+.SH エラー
+.TP 
+\fBENOENT\fP
+.\" CLOCK_THREAD_CPUTIME_ID not defined
+.\"
+.\" Looking at nptl/pthread_getcpuclockid.c an ERANGE error would
+.\" be possible if kernel thread IDs took more than 29 bits (which
+.\" they currently cannot).
+スレッド単位の CPU 時間時計はこのシステムではサポートされていない。
+.TP 
+\fBESRCH\fP
+ID が \fIthread\fP のスレッドが見つからなかった。
+.SH バージョン
+この関数は glibc バージョン 2.2 以降で利用できる。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw23 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBpthread_getcpuclockid\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+\fIthread\fP が呼び出したスレッドを参照している場合、
+クロック ID \fBCLOCK_THREAD_CPUTIME_ID\fP が指定されていれば、
+\fBclock_gettime\fP(2) と \fBclock_settime\fP(2) が操作するのと同じ時計
+を参照する ID が返される。
+.SH EXAMPLES
+以下のプログラムは、スレッドを作成し、それから
+\fBclock_gettime\fP(2) を使ってプロセス全体の CPU 時間を取得し、
+\fBpthread_getcpuclockid\fP(3) を使って 2 つのスレッドが消費した
+スレッド毎の CPU 時間を取得する。
+下記のシェルのセッションは実行例である。
+.PP
+.in +4n
+.EX
+$ \fB./a.out\fP
+Main thread sleeping
+Subthread starting infinite loop
+Main thread consuming some CPU time...
+Process total CPU time:    1.368
+Main thread CPU time:      0.376
+Subthread CPU time:        0.992
+.EE
+.in
+.SS プログラムのソース
+\&
+.EX
+/* "\-lrt" でリンクする */
+
+#include <time.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <pthread.h>
+#include <string.h>
+#include <errno.h>
+
+#define handle_error(msg) \e
+        do { perror(msg); exit(EXIT_FAILURE); } while (0)
+
+#define handle_error_en(en, msg) \e
+        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)
+
+static void *
+thread_start(void *arg)
+{
+    printf("Subthread starting infinite loop\en");
+    for (;;)
+        continue;
+}
+
+static void
+pclock(char *msg, clockid_t cid)
+{
+    struct timespec ts;
+
+    printf("%s", msg);
+    if (clock_gettime(cid, &ts) == \-1)
+        handle_error("clock_gettime");
+    printf("%4jd.%03ld\en", (intmax_t) ts.tv_sec, ts.tv_nsec / 1000000);
+}
+
+int
+main(int argc, char *argv[])
+{
+    pthread_t thread;
+    clockid_t cid;
+    int s;
+
+    s = pthread_create(&thread, NULL, thread_start, NULL);
+    if (s != 0)
+        handle_error_en(s, "pthread_create");
+
+    printf("Main thread sleeping\en");
+    sleep(1);
+
+    printf("Main thread consuming some CPU time...\en");
+    for (int j = 0; j < 2000000; j++)
+        getppid();
+
+    pclock("Process total CPU time: ", CLOCK_PROCESS_CPUTIME_ID);
+
+    s = pthread_getcpuclockid(pthread_self(), &cid);
+    if (s != 0)
+        handle_error_en(s, "pthread_getcpuclockid");
+    pclock("Main thread CPU time:   ", cid);
+
+    /* The preceding 4 lines of code could have been replaced by:
+       pclock("Main thread CPU time:   ", CLOCK_THREAD_CPUTIME_ID); */
+
+    s = pthread_getcpuclockid(thread, &cid);
+    if (s != 0)
+        handle_error_en(s, "pthread_getcpuclockid");
+    pclock("Subthread CPU time: 1    ", cid);
+
+    exit(EXIT_SUCCESS);         /* Terminates both threads */
+}
+.EE
+.SH 関連項目
+\fBclock_gettime\fP(2), \fBclock_settime\fP(2), \fBtimer_create\fP(2),
+\fBclock_getcpuclockid\fP(3), \fBpthread_self\fP(3), \fBpthreads\fP(7), \fBtime\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/pthread_join.3 b/manual/LDP_man-pages/draft/man3/pthread_join.3
new file mode 100644 (file)
index 0000000..2cb071e
--- /dev/null
@@ -0,0 +1,126 @@
+.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2012  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2012-05-04, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH PTHREAD_JOIN 3 2020\-06\-09 Linux "Linux Programmer's Manual"
+.SH 名前
+pthread_join \- 終了したスレッドを join する
+.SH 書式
+.nf
+\fB#include <pthread.h>\fP
+.PP
+\fBint pthread_join(pthread_t \fP\fIthread\fP\fB, void **\fP\fIretval\fP\fB);\fP
+.fi
+.PP
+\fI\-pthread\fP を付けてコンパイルとリンクを行う。
+.SH 説明
+\fBpthread_join\fP() 関数は、\fIthread\fP で指定されたスレッドが
+終了するのを待つ。そのスレッドがすでに終了している場合、
+\fBpthread_join\fP() はすぐに返る。
+\fIthread\fP で指定されたスレッドは join 可能でなければならない。
+.PP
+If \fIretval\fP is not NULL, then \fBpthread_join\fP()  copies the exit status of
+the target thread (i.e., the value that the target thread supplied to
+\fBpthread_exit\fP(3))  into the location pointed to by \fIretval\fP.  If the
+target thread was canceled, then \fBPTHREAD_CANCELED\fP is placed in the
+location pointed to by \fIretval\fP.
+.PP
+複数のスレッドが同時に同じスレッドを join しようとした場合、その結果
+は不定である。\fBpthread_join\fP() を呼び出しているスレッドがキャンセル
+された場合、対象スレッドは join 可能のままとなる (detached 状態には
+ならない)。
+.SH 返り値
+成功すると、 \fBpthread_join\fP() は 0 を返す。
+エラーの場合、エラー番号を返す。
+.SH エラー
+.TP 
+\fBEDEADLK\fP
+.\" The following verified by testing on glibc 2.8/NPTL:
+.\" The following verified by testing on glibc 2.8/NPTL:
+デッドロックが検出された (例えば、二つのスレッドが互いに join しようと
+した場合)、または \fIthread\fP に呼び出したスレッドが指定されている。
+.TP 
+\fBEINVAL\fP
+\fIthread\fP が join 可能なスレッドではない。
+.TP 
+\fBEINVAL\fP
+.\" POSIX.1-2001 does not specify this error case.
+別のスレッドがすでにこのスレッドの join 待ちである。
+.TP 
+\fBESRCH\fP
+ID が \fIthread\fP のスレッドが見つからなかった。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBpthread_join\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.sp 1
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+After a successful call to \fBpthread_join\fP(), the caller is guaranteed that
+the target thread has terminated.  The caller may then choose to do any
+clean\-up that is required after termination of the thread (e.g., freeing
+memory or other resources that were allocated to the target thread).
+.PP
+すでに join されたスレッドを join した場合の結果は不定である。
+.PP
+join 可能なスレッド (detached 状態でないスレッド) の join に失敗した場合、
+"ゾンビスレッド (zombie thread)" が生成される。
+各ゾンビスレッドはシステムリソースをいくらかは消費し、
+ゾンビスレッドがたくさん生成されてしまうと、
+新しいスレッド (やプロセス) がそれ以上作成できなくなってしまうので、
+このようなことが起きるのは避けること。
+.PP
+pthreads には、 \fIwaitpid(\-1,\ &status,\ 0)\fP、つまり
+"終了されたスレッドのどれかを join する" といった機能はない。
+この機能が必要だと思うような場合には、おそらく
+自分のアプリケーションの設計を考え直す必要があるだろう。
+.PP
+プロセス内の全てのスレッドは対等であり、
+どのスレッドでもプロセス内の他のスレッドを join できる。
+.SH EXAMPLES
+\fBpthread_create\fP(3) を参照。
+.SH 関連項目
+\fBpthread_cancel\fP(3), \fBpthread_create\fP(3), \fBpthread_detach\fP(3),
+\fBpthread_exit\fP(3), \fBpthread_tryjoin_np\fP(3), \fBpthreads\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/pthread_kill.3 b/manual/LDP_man-pages/draft/man3/pthread_kill.3
new file mode 100644 (file)
index 0000000..87099b1
--- /dev/null
@@ -0,0 +1,104 @@
+.\" Copyright (c) 2009 Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2012  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2012-05-04, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH PTHREAD_KILL 3 2017\-09\-15 Linux "Linux Programmer's Manual"
+.SH 名前
+pthread_kill \- スレッドにシグナルを送信する
+.SH 書式
+.nf
+\fB#include <signal.h>\fP
+.PP
+\fBint pthread_kill(pthread_t \fP\fIthread\fP\fB, int \fP\fIsig\fP\fB);\fP
+.fi
+.PP
+\fI\-pthread\fP を付けてコンパイルとリンクを行う。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBpthread_kill\fP():
+.RS 4
+_POSIX_C_SOURCE\ >=\ 199506L || _XOPEN_SOURCE\ >=\ 500
+.RE
+.ad b
+.SH 説明
+\fBpthread_kill\fP() 関数は、呼び出したスレッドと同じプロセスの
+スレッド \fIthread\fP にシグナル \fIsig\fP を送信する。
+シグナルは非同期に \fIthread\fP へ直接送られる。
+.PP
+\fIsig\fP が 0 の場合、シグナルは送信されないが、エラーチェックだけは実行される。
+.SH 返り値
+成功すると、 \fBpthread_kill\fP() は 0 を返す。
+エラーの場合、エラー番号を返し、シグナルの送信は行わない。
+.SH エラー
+.TP 
+\fBEINVAL\fP
+無効なシグナルが指定された。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBpthread_kill\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+シグナルの配送はプロセス全体で行われる。
+シグナルハンドラーが設定されている場合、
+そのハンドラーがスレッド \fIthread\fP で起動されるが、
+シグナルの配送が "stop", "continue", "terminate" のいずれかの場合、
+シグナルに対するアクションはプロセス全体に影響がある。
+.PP
+The glibc implementation of \fBpthread_kill\fP()  gives an error (\fBEINVAL\fP)
+on attempts to send either of the real\-time signals used internally by the
+NPTL threading implementation.  See \fBnptl\fP(7)  for details.
+.PP
+POSIX.1\-2008 では、 スレッドが終了した後にそのスレッド ID が使用されたことを検出した場合に、 \fBpthread_kill\fP()
+はエラー \fBESRCH\fP を返すことを推奨されている。 glibc の実装では、無効なスレッド ID を検出できる場合にはこのエラーを返す。 しかし、
+POSIX では、 終了したスレッド ID を使おうとした場合の動作は不定であり、 \fBpthread_kill\fP() で無効なスレッド ID
+を使おうとした場合には、 例えば、 セグメンテーションフォールトになる可能性もある点に注意すること。
+.SH 関連項目
+\fBkill\fP(2), \fBsigaction\fP(2), \fBsigpending\fP(2), \fBpthread_self\fP(3),
+\fBpthread_sigmask\fP(3), \fBraise\fP(3), \fBpthreads\fP(7), \fBsignal\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/pthread_kill_other_threads_np.3 b/manual/LDP_man-pages/draft/man3/pthread_kill_other_threads_np.3
new file mode 100644 (file)
index 0000000..0075535
--- /dev/null
@@ -0,0 +1,85 @@
+.\" Copyright (c) 2009 Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2012  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2012-05-04, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH PTHREAD_KILL_OTHER_THREADS_NP 3 2017\-09\-15 Linux "Linux Programmer's Manual"
+.SH 名前
+pthread_kill_other_threads_np \- プロセス内の他の全スレッドを終了する
+.SH 書式
+.nf
+\fB#include <pthread.h>\fP
+.PP
+\fBvoid pthread_kill_other_threads_np(void);\fP
+.fi
+.SH 説明
+.\" .SH VERSIONS
+.\" Available since glibc 2.0
+\fBpthread_kill_other_threads_np\fP() は、
+LinuxThreads スレッド実装においてのみ効果がある。
+LinuxThreads スレッド実装では、この関数を呼び出すと
+アプリケーション内の全てのスレッドがすぐに終了される。
+終了対象のスレッドの cancelability state と cancelability type は
+無視され、それらのスレッドのクリーンアップハンドラーは呼び出されない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw31 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBpthread_kill_other_threads_np\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+この関数は非標準の GNU による拡張である。
+そのため、名前に "_np" (nonportable; 移植性がない) という接尾辞が
+付いている。
+.SH 注意
+\fBpthread_kill_other_threads_np\fP() は、
+スレッドが \fBexecve\fP(2) や同様の関数を呼び出す直前に
+呼ばれることを目的として用意されている。
+この関数は、(廃止予定の) LinuxThreads スレッド実装における、
+\fBexecve\fP(2) の際にアプリケーションの他のスレッドが自動的に
+終了されないという制限を解決するために設計された。
+.PP
+NPTL スレッド実装では、 \fBpthread_kill_other_threads_np\fP() は存在するが、
+何もしない(NPTL 実装は \fBexecve\fP(2) の際に適切な動作をするので、
+何もする必要がないということだ)。
+.SH 関連項目
+\fBexecve\fP(2), \fBpthread_cancel\fP(3), \fBpthread_setcancelstate\fP(3),
+\fBpthread_setcanceltype\fP(3), \fBpthreads\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/pthread_self.3 b/manual/LDP_man-pages/draft/man3/pthread_self.3
new file mode 100644 (file)
index 0000000..7a99bbe
--- /dev/null
@@ -0,0 +1,91 @@
+.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2012  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2012-05-04, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH PTHREAD_SELF 3 2017\-09\-15 Linux "Linux Programmer's Manual"
+.SH 名前
+pthread_self \- 呼び出したスレッドの ID を取得する
+.SH 書式
+.nf
+\fB#include <pthread.h>\fP
+.PP
+\fBpthread_t pthread_self(void);\fP
+.PP
+\fI\-pthread\fP でコンパイルしてリンクする。
+.fi
+.SH 説明
+\fBpthread_self\fP() 関数は、呼び出したスレッドの ID を返す。
+得られる ID は、このスレッドが作成された \fBpthread_create\fP(3) の
+呼び出しで \fI*thread\fP で返されるのと同じ値である。
+.SH 返り値
+この関数は常に成功し、呼び出したスレッドの ID を返す。
+.SH エラー
+この関数は常に成功する。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBpthread_self\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+POSIX.1 では、スレッド ID を表現するのに使用する型は、
+スレッド実装が完全に自由に選択してよいことになっている。
+例えば、スレッド ID を表現するのに数値型を使っても構造体を使ってもよい。
+そのため、移植性を確保しつつ、 C 言語の等価演算子 (\fB==\fP) を使って、
+\fIpthread_t\fP 型の変数の比較を行うことはできない。
+代わりに \fBpthread_equal\fP(3) を使うこと。
+.PP
+スレッド識別子はその内部構造を意識すべきではない。
+pthreads 関数以外でスレッド ID を利用しようとした場合、
+移植性がなくなり、どのような結果が得られるかも分からない。
+.PP
+スレッド ID の一意性が保証されるのは、あるプロセス内においてのみである。
+終了したスレッドが join されたり、
+切り離された (detached) スレッドが終了されたりした後は、
+そのスレッド ID は再利用されることがある。
+.PP
+\fBpthread_self\fP() が返すスレッド ID は、
+\fBgettid\fP(2) が返すカーネルスレッド ID とは違うものである。
+.SH 関連項目
+\fBpthread_create\fP(3), \fBpthread_equal\fP(3), \fBpthreads\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/pthread_setaffinity_np.3 b/manual/LDP_man-pages/draft/man3/pthread_setaffinity_np.3
new file mode 100644 (file)
index 0000000..d615c1c
--- /dev/null
@@ -0,0 +1,195 @@
+.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2012  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2012-05-03, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH PTHREAD_SETAFFINITY_NP 3 2020\-11\-01 Linux "Linux Programmer's Manual"
+.SH 名前
+pthread_setaffinity_np, pthread_getaffinity_np \- スレッドの
+CPU affinity の設定/取得を行う
+.SH 書式
+.nf
+\fB#define _GNU_SOURCE\fP             /* See feature_test_macros(7) */
+\fB#include <pthread.h>\fP
+.PP
+\fBint pthread_setaffinity_np(pthread_t \fP\fIthread\fP\fB, size_t \fP\fIcpusetsize\fP\fB,\fP
+\fB                           const cpu_set_t *\fP\fIcpuset\fP\fB);\fP
+\fBint pthread_getaffinity_np(pthread_t \fP\fIthread\fP\fB, size_t \fP\fIcpusetsize\fP\fB,\fP
+\fB                           cpu_set_t *\fP\fIcpuset\fP\fB);\fP
+.PP
+\fI\-pthread\fP でコンパイルしてリンクする。
+.fi
+.SH 説明
+\fBpthread_setaffinity_np\fP() 関数は、スレッド \fIthread\fP の CPU affinity
+マスクに \fIcpuset\fP が指す CPU 集合を設定する。呼び出しが成功し、
+そのスレッドが現在 \fIcpuset\fP で指定された CPU 上でが実行されていない
+場合は、スレッドは指定された CPU のいずれかに移動される。
+.PP
+\fBpthread_getaffinity_np\fP() 関数は、スレッド \fIthread\fP の CPU affinity
+マスクを、\fIcpuset\fP が指すバッファーに入れて返す。
+.PP
+CPU affinity マスクの詳細については、
+\fBsched_setaffinity\fP(2) を参照してほしい。
+CPU 集合の操作や取得を行う際に利用できるマクロ群の説明は
+\fBCPU_SET\fP(3) を参照してほしい。
+.PP
+引き数 \fIcpusetsize\fP は \fIcpuset\fP が指すバッファーの長さ (バイト単位) で
+ある。通常は、この引き数には \fIsizeof(cpu_set_t)\fP を指定する
+(\fBCPU_SET\fP(3) に書かれているマクロを使って CPU 集合を動的に
+割り当てている場合には、別の値になることもある)。
+.SH 返り値
+成功すると、これらの関数は 0 を返す。
+エラーの場合、0 以外のエラー番号を返す。
+.SH エラー
+.TP 
+\fBEFAULT\fP
+指定されたメモリーアドレスが無効である。
+.TP 
+\fBEINVAL\fP
+(\fBpthread_setaffinity_np\fP()) affinity ビットマスク \fImask\fP に、
+その時点でシステム上に物理的に存在して、かつそのスレッドに対して許可
+されているプロセッサが一つも含まれていない。
+スレッドに対してどのプロセッサの利用が許可されるかは、\fBcpuset\fP(7) で
+説明されている "cpuset" 機構に適用される制限に基づいて決まる。
+.TP 
+\fBEINVAL\fP
+.\" cpumask_t
+.\" The raw sched_getaffinity() system call returns the size (in bytes)
+.\" of the cpumask_t type.
+(\fBpthread_setaffinity_np\fP()) \fIcpuset\fP が、カーネルがサポートする CPU
+集合に含まれない CPU を指定していた。(カーネルの設定オプション
+\fBCONFIG_NR_CPUS\fP により、CPU 集合を表現するのに使われるカーネルの
+データ型がサポートする CPU 集合の範囲が定義される。)
+.TP 
+\fBEINVAL\fP
+(\fBpthread_getaffinity_np\fP()) \fIcpusetsize\fP がカーネルが使用する
+affinity マスクの大きさよりも小さい。
+.TP 
+\fBESRCH\fP
+ID が \fIthread\fP のスレッドが見つからなかった。
+.SH バージョン
+これらの関数は glibc バージョン 2.3.4 以降で提供されている。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw25 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBpthread_setaffinity_np\fP(),
+\fBpthread_getaffinity_np\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+これらの関数は非標準の GNU による拡張である。
+そのため、名前に "_np" (nonportable; 移植性がない) という接尾辞が
+付いている。
+.SH 注意
+\fBpthread_setaffinity_np\fP() を呼び出した後、
+そのスレッドが実際に実行される CPU 集合は、
+\fIcpuset\fP 引き数で指定された集合と
+システムに実際に存在する CPU 集合の共通部分になる。
+また、 \fBcpuset\fP(7) で説明されている "cpuset" 機構が使われている場合
+には、そのスレッドが実行される CPU 集合がシステムによってさらに制限
+される場合がある。そのスレッドが実行される実際の CPU 集合に対する
+これらの制限は、カーネルにより黙って適用される。
+.PP
+これらの関数は、システムコール \fBsched_setaffinity\fP(2) と
+\fBsched_getaffinity\fP(2) を使って実装されている。
+.PP
+(このバージョンだけであるが) glibc 2.3.3 では、
+これらの関数は \fIcpusetsize\fP 引き数を持っていなかった。
+内部で呼ばれるシステムコールに渡される CPU セットの大きさは
+常に \fIsizeof(cpu_set_t)\fP であった。
+.PP
+\fBpthread_create\fP(3) で作成される新しいスレッドは、
+作成者の CPU affinity マスクを継承する。
+.SH EXAMPLES
+以下のプログラムでは、メインスレッドは
+\fBpthread_setaffinity_np\fP() を使って自分の CPU affinity マスクに
+CPU 0 から 7 が含まれるように設定し
+(システム上には 0 から 7 に対応する CPU が全て存在するとは限らない)、
+その後で \fBpthread_getaffinity_np\fP() を使って
+スレッドに実際に設定された CPU affinity マスクを確認している。
+.PP
+.EX
+#define _GNU_SOURCE
+#include <pthread.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+
+#define handle_error_en(en, msg) \e
+        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)
+
+int
+main(int argc, char *argv[])
+{
+    int s;
+    cpu_set_t cpuset;
+    pthread_t thread;
+
+    thread = pthread_self();
+
+    /* Set affinity mask to include CPUs 0 to 7 */
+
+    CPU_ZERO(&cpuset);
+    for (int j = 0; j < 8; j++)
+        CPU_SET(j, &cpuset);
+
+    s = pthread_setaffinity_np(thread, sizeof(cpuset), &cpuset);
+    if (s != 0)
+        handle_error_en(s, "pthread_setaffinity_np");
+
+    /* Check the actual affinity mask assigned to the thread */
+
+    s = pthread_getaffinity_np(thread, sizeof(cpuset), &cpuset);
+    if (s != 0)
+        handle_error_en(s, "pthread_getaffinity_np");
+
+    printf("Set returned by pthread_getaffinity_np() contained:\en");
+    for (int j = 0; j < CPU_SETSIZE; j++)
+        if (CPU_ISSET(j, &cpuset))
+            printf("    CPU %d\en", j);
+
+    exit(EXIT_SUCCESS);
+}
+.EE
+.SH 関連項目
+\fBsched_setaffinity\fP(2), \fBCPU_SET\fP(3), \fBpthread_attr_setaffinity_np\fP(3),
+\fBpthread_self\fP(3), \fBsched_getcpu\fP(3), \fBcpuset\fP(7), \fBpthreads\fP(7),
+\fBsched\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/pthread_setcancelstate.3 b/manual/LDP_man-pages/draft/man3/pthread_setcancelstate.3
new file mode 100644 (file)
index 0000000..e874f68
--- /dev/null
@@ -0,0 +1,171 @@
+.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2012  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2012-05-31, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH PTHREAD_SETCANCELSTATE 3 2020\-06\-09 Linux "Linux Programmer's Manual"
+.SH 名前
+pthread_setcancelstate, pthread_setcanceltype \- cancelability state と
+cancelability type を設定する
+.SH 書式
+.nf
+\fB#include <pthread.h>\fP
+.PP
+\fBint pthread_setcancelstate(int \fP\fIstate\fP\fB, int *\fP\fIoldstate\fP\fB);\fP
+\fBint pthread_setcanceltype(int \fP\fItype\fP\fB, int *\fP\fIoldtype\fP\fB);\fP
+.PP
+\fI\-pthread\fP でコンパイルしてリンクする。
+.fi
+.SH 説明
+\fBpthread_setcancelstate\fP() は、呼び出したスレッドの
+cancelability state に \fIstate\fP で指定された
+値を設定する。変更前のスレッドの cancelability state は
+\fIoldstate\fP が指すバッファーで返される。
+\fIstate\fP 引き数には以下の値のいずれか一つを指定しなければならない。
+.TP 
+\fBPTHREAD_CANCEL_ENABLE\fP
+スレッドは取り消し可能 (cancelable) である。
+これが全ての新しく作成されるスレッドでのデフォルトの
+cancelability state である。これには最初のスレッドも含まれる。
+スレッドの cancelability type により、取り消し可能なスレッドが
+取り消し要求にいつ反応するかが決まる。
+.TP 
+\fBPTHREAD_CANCEL_DISABLE\fP
+スレッドは取り消しできない。取り消し要求を受信した際は、
+取り消し可能に設定されるまでその要求はブロックされる。
+.PP
+\fBpthread_setcanceltype\fP() は、呼び出したスレッドの
+cancelability type に \fItype\fP で指定された値を設定する。
+変更前のスレッドの cancelability type は
+\fIoldtype\fP が指すバッファーで返される。
+\fItype\fP 引き数には以下の値のいずれか一つを指定しなければならない。
+.TP 
+\fBPTHREAD_CANCEL_DEFERRED\fP
+そのスレッドが次に取り消しポイント (cancellation point) の関数を
+呼び出すまで取り消し要求が遅延される。これが全ての新しく作成される
+スレッドでのデフォルトの cancelability type である。
+これには最初のスレッドも含まれる。
+.IP
+Even with deferred cancellation, a cancellation point in an asynchronous
+signal handler may still be acted upon and the effect is as if it was an
+asynchronous cancellation.
+.TP 
+\fBPTHREAD_CANCEL_ASYNCHRONOUS\fP
+スレッドはいつでも取り消すことができる (通常はすぐにキャンセルされるが、
+システムがそのことを保証しているわけではない)。
+.PP
+これらの関数により実行される「設定と取得」操作 (set\-and\-get operation) は、
+同じ関数を呼び出したプロセス内の他のスレッドがあっても、
+アトミックに行われる。
+.SH 返り値
+成功すると、これらの関数は 0 を返す。
+エラーの場合、0 以外のエラー番号を返す。
+.SH エラー
+\fBpthread_setcancelstate\fP() は以下のエラーで失敗する場合がある。
+.TP 
+\fBEINVAL\fP
+\fIstate\fP に無効な値が指定された。
+.PP
+\fBpthread_setcanceltype\fP() は以下のエラーで失敗する場合がある。
+.TP 
+\fBEINVAL\fP
+.\" .SH VERSIONS
+.\" Available since glibc 2.0
+\fItype\fP に無効な値が指定された。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.ad l
+.TS
+allbox;
+lb lb lb
+lw25 l l.
+インターフェース       属性  値
+T{
+\fBpthread_setcancelstate\fP(),
+\fBpthread_setcanceltype\fP()
+T}     Thread safety   T{
+MT\-Safe
+T}
+T{
+\fBpthread_setcancelstate\fP(),
+\fBpthread_setcanceltype\fP()
+T}     Async\-cancel\-safety   T{
+AC\-Safe
+T}
+.TE
+.ad
+.hy
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+スレッドが取り消された場合に何が起こるかの詳細については
+\fBpthread_cancel\fP(3) を参照。
+.PP
+取り消し要求により中断されてはならない重要なアクションをスレッドが
+実行する場合、短い時間だけ cancelability を無効にするのは有用である。
+長い時間 cancelability を無効にしたり、長い時間停止 (block) される
+可能性のある操作の前後で cancelability を無効にしたりする際には
+注意すること。なぜなら、無効にしてしまうと、キャンセル要求に対して
+スレッドが応答しない状態になってしまうからである。
+.SS 非同期キャンセル
+cancelability type を \fBPTHREAD_CANCEL_ASYNCHRONOUS\fP
+に設定して役に立つことはめったにない。スレッドは\fIいつでも\fPキャンセルすることができることになるので、スレッドが安全にリソースの確保 (例えば
+\fBmalloc\fP(3) でメモリーを割り当てる) や
+mutex、セマフォ、ロックなどの獲得を行うことができない。アプリケーションは、スレッドがキャンセルされる際に、これらのリソースがどのような状態にあるかを知る術はないので、リソースの確保が安全ではなくなる。つまり、キャンセルが起こったのが、リソースの確保前なのか、確保中なのか、確保後なのかが分からない。さらに、関数呼び出しの最中にキャンセルが発生すると、いくつかの内部データ構造
+(例えば、\fBmalloc\fP(3) 関連の関数が管理している未使用ブロックのリンクリスト)
+が一貫性のない状態のままになってしまう可能性がある。その結果、クリーンアップハンドラーが役に立たないものになってしまう。
+.PP
+Functions that can be safely asynchronously canceled are called
+\fIasync\-cancel\-safe functions\fP.  POSIX.1\-2001 and POSIX.1\-2008 require only
+that \fBpthread_cancel\fP(3), \fBpthread_setcancelstate\fP(), and
+\fBpthread_setcanceltype\fP()  be async\-cancel\-safe.  In general, other library
+functions can't be safely called from an asynchronously cancelable thread.
+.PP
+非同期でのキャンセルが有効な数少ない状況としては、純粋に計算だけを行うループに入っているスレッドをキャンセルするといった場面がある。
+.SS 移植性に関する注意
+.\" It looks like at least Solaris, FreeBSD and Tru64 support this.
+The Linux threading implementations permit the \fIoldstate\fP argument of
+\fBpthread_setcancelstate\fP()  to be NULL, in which case the information about
+the previous cancelability state is not returned to the caller.  Many other
+implementations also permit a NULL \fIoldstat\fP argument, but POSIX.1 does not
+specify this point, so portable applications should always specify a
+non\-NULL value in \fIoldstate\fP.  A precisely analogous set of statements
+applies for the \fIoldtype\fP argument of \fBpthread_setcanceltype\fP().
+.SH EXAMPLES
+\fBpthread_cancel\fP(3) を参照。
+.SH 関連項目
+\fBpthread_cancel\fP(3), \fBpthread_cleanup_push\fP(3), \fBpthread_testcancel\fP(3),
+\fBpthreads\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/pthread_setconcurrency.3 b/manual/LDP_man-pages/draft/man3/pthread_setconcurrency.3
new file mode 100644 (file)
index 0000000..8116e73
--- /dev/null
@@ -0,0 +1,112 @@
+.\" Copyright (c) 2009 Michael Kerrisk, <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2012  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2012-05-31, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH PTHREAD_SETCONCURRENCY 3 2017\-09\-15 Linux "Linux Programmer's Manual"
+.SH 名前
+pthread_setconcurrency, pthread_getconcurrency \- 並列処理レベルの設定/取得を行う
+.SH 書式
+.nf
+\fB#include <pthread.h>\fP
+.PP
+\fBint pthread_setconcurrency(int \fP\fInew_level\fP\fB);\fP
+\fBint pthread_getconcurrency(\fP\fIvoid\fP\fB);\fP
+.PP
+\fI\-pthread\fP でコンパイルしてリンクする。
+.fi
+.SH 説明
+\fBpthread_setconcurrency\fP() 関数は、アプリケーションが希望する
+並列処理レベル (concurrency level) をスレッド実装に通知する。
+希望する並列処理レベルは \fInew_level\fP で指定する。
+スレッド実装はこの情報をヒントとしてのみ利用する。
+POSIX.1 では、 \fBpthread_setconcurrency\fP() の呼び出した結果、
+どのような並列度になるべきかは規定されていない。
+.PP
+\fInew_level\fP に 0 を指定すると、スレッド実装は並列処理レベルを
+実装側で適切とみなしたレベルに設定するようになる。
+.PP
+\fBpthread_getconcurrency\fP() は、このプロセスの concurrency level
+の現在値を返す。
+.SH 返り値
+成功すると、 \fBpthread_setconcurrency\fP() は 0 を返す。
+エラーの場合、 0 以外のエラー番号を返す。
+.PP
+\fBpthread_getconcurrency\fP() は常に成功し、最後の
+\fBpthread_getconcurrency\fP() の呼び出しで設定された
+concurrency level を返す。 \fBpthread_getconcurrency\fP() が
+それまでに一度も呼び出されていない場合は 0 が返る。
+.SH エラー
+\fBpthread_setconcurrency\fP() は以下のエラーで失敗する場合がある。
+.TP 
+\fBEINVAL\fP
+\fInew_level\fP が負である。
+.PP
+POSIX.1 also documents an \fBEAGAIN\fP error ("the value specified by
+\fInew_level\fP would cause a system resource to be exceeded").
+.SH バージョン
+これらの関数は glibc バージョン 2.1 以降で利用できる。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw25 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBpthread_setconcurrency\fP(),
+\fBpthread_getconcurrency\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+デフォルトの concurrency level は 0 である。
+.PP
+並列処理レベルが意味を持つのは M:N スレッド実装の場合のみである。
+M:N スレッド実装では、ある瞬間において、あるプロセスのユーザーレベルスレッ
+ドの集合のサブ集合が、そのサブ集合のサイズよりも少ない数のカーネルの
+スケジューリング実体 (kernel\-scheduling entity) に結び付けられる。
+並列処理レベルを設定すると、そのアプリケーションの効率的な実行に必要な
+カーネルのスケジューリング実体の数のヒントを、アプリケーションはシステ
+ムに伝えることができる。
+.PP
+LinuxThreads と NPTL のどちらも 1:1 スレッド実装であり、
+並列処理レベルを設定しても何の意味もない。
+言い換えると、 Linux では、これらの関数は、
+他のシステムとの互換性のためだけに存在し、
+プログラムの実行には何の影響も与えないということである。
+.SH 関連項目
+\fBpthread_attr_setscope\fP(3), \fBpthreads\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
index 8f0dc05..bc408e7 100644 (file)
@@ -77,12 +77,12 @@ pthread_setname_np, pthread_getname_np \- スレッド名の設定/取得を行
 .SH バージョン
 これらの関数は glibc バージョン 2.12 で初めて登場した。
 .SH 属性
-For an explanation of the terms used in this section, see \fBattributes\fP(7).
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
 .TS
 allbox;
 lbw21 lb lb
 l l l.
-Interface      Attribute       Value
+インターフェース       属性  値
 T{
 \fBpthread_setname_np\fP(),
 \fBpthread_getname_np\fP()
index a149aed..c6428d0 100644 (file)
@@ -114,12 +114,12 @@ POSIX.1 also documents an \fBENOTSUP\fP ("attempt was made to set the policy or
 scheduling parameters to an unsupported value") error for
 \fBpthread_setschedparam\fP().
 .SH 属性
-For an explanation of the terms used in this section, see \fBattributes\fP(7).
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
 .TS
 allbox;
 lbw24 lb lb
 l l l.
-Interface      Attribute       Value
+インターフェース       属性  値
 T{
 \fBpthread_setschedparam\fP(),
 \fBpthread_getschedparam\fP()
diff --git a/manual/LDP_man-pages/draft/man3/pthread_setschedprio.3 b/manual/LDP_man-pages/draft/man3/pthread_setschedprio.3
new file mode 100644 (file)
index 0000000..ca13c04
--- /dev/null
@@ -0,0 +1,103 @@
+.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2012  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2012-05-04, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH PTHREAD_SETSCHEDPRIO 3 2015\-08\-08 Linux "Linux Programmer's Manual"
+.SH 名前
+pthread_setschedprio \- スレッドのスケジューリング優先度を設定する
+.SH 書式
+.nf
+\fB#include <pthread.h>\fP
+.PP
+\fBint pthread_setschedprio(pthread_t \fP\fIthread\fP\fB, int \fP\fIprio\fP\fB);\fP
+.PP
+\fI\-pthread\fP でコンパイルしてリンクする。
+.fi
+.SH 説明
+.\" FIXME . nptl/pthread_setschedprio.c has the following
+.\"   /* If the thread should have higher priority because of some
+.\"      PTHREAD_PRIO_PROTECT mutexes it holds, adjust the priority. */
+.\" Eventually (perhaps after writing the mutexattr pages), we
+.\" may want to add something on the topic to this page.
+.\" nptl/pthread_setschedparam.c has a similar case.
+\fBpthread_setschedprio\fP() 関数は、スレッド \fIthread\fP のスケジューリング
+優先度に \fIprio\fP で指定された値を設定する
+(一方、\fBpthread_setschedparam\fP(3) はスレッドのスケジューリングポリシー
+と優先度の両方を変更する)。
+.SH 返り値
+成功すると、この関数は 0 を返す。
+エラーの場合、0 以外のエラー番号を返す。
+\fBpthread_setschedprio\fP() が失敗した場合、 \fIthread\fP の
+スケジューリング優先度は変更されない。
+.SH エラー
+.TP 
+\fBEINVAL\fP
+指定されたスレッドのスケジューリングポリシーでは、 \fIprio\fP は無効である。
+.TP 
+\fBEPERM\fP
+呼び出し側が、指定された優先度を設定するのに必要な特権を持っていない。
+.TP 
+\fBESRCH\fP
+ID が \fIthread\fP のスレッドが見つからなかった。
+.PP
+POSIX.1 also documents an \fBENOTSUP\fP ("attempt was made to set the priority
+to an unsupported value") error for \fBpthread_setschedparam\fP(3).
+.SH バージョン
+この関数は glibc バージョン 2.3.4 以降で利用できる。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw22 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBpthread_setschedprio\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+スレッドのスケジューリング優先度を変更するために必要な許可や変更した場合の影響、および各スケジューリングポリシーで認められる優先度の範囲の詳細については、
+\fBsched\fP(7) を参照。
+.SH 関連項目
+.ad l
+.nh
+\fBgetrlimit\fP(2), \fBsched_get_priority_min\fP(2), \fBpthread_attr_init\fP(3),
+\fBpthread_attr_setinheritsched\fP(3), \fBpthread_attr_setschedparam\fP(3),
+\fBpthread_attr_setschedpolicy\fP(3), \fBpthread_create\fP(3), \fBpthread_self\fP(3),
+\fBpthread_setschedparam\fP(3), \fBpthreads\fP(7), \fBsched\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/pthread_sigmask.3 b/manual/LDP_man-pages/draft/man3/pthread_sigmask.3
new file mode 100644 (file)
index 0000000..209ab32
--- /dev/null
@@ -0,0 +1,169 @@
+.\" Copyright (c) 2009 Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2012  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2012-05-04, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH PTHREAD_SIGMASK 3 2020\-11\-01 Linux "Linux Programmer's Manual"
+.SH 名前
+pthread_sigmask \- 禁止するシグナルマスクの確認と変更を行う
+.SH 書式
+.nf
+\fB#include <signal.h>\fP
+.PP
+\fBint pthread_sigmask(int \fP\fIhow\fP\fB, const sigset_t *\fP\fIset\fP\fB, sigset_t *\fP\fIoldset\fP\fB);\fP
+.fi
+.PP
+\fI\-pthread\fP を付けてコンパイルとリンクを行う。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBpthread_sigmask\fP():
+.RS 4
+_POSIX_C_SOURCE\ >=\ 199506L || _XOPEN_SOURCE\ >=\ 500
+.RE
+.ad b
+.SH 説明
+The \fBpthread_sigmask\fP()  function is just like \fBsigprocmask\fP(2), with the
+difference that its use in multithreaded programs is explicitly specified by
+POSIX.1.  Other differences are noted in this page.
+.PP
+この関数の引き数と動作の説明は \fBsigprocmask\fP(2) を参照。
+.SH 返り値
+成功すると、 \fBpthread_sigmask\fP() は 0 を返す。
+エラーの場合、エラー番号を返す。
+.SH エラー
+\fBsigprocmask\fP(2) を参照。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBpthread_sigmask\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+新しいスレッドは、スレッドを作成したスレッドのシグナルマスクのコピーを
+継承する。
+.PP
+The glibc \fBpthread_sigmask\fP()  function silently ignores attempts to block
+the two real\-time signals that are used internally by the NPTL threading
+implementation.  See \fBnptl\fP(7)  for details.
+.SH EXAMPLES
+以下のプログラムは、メインスレッドでシグナルのいくつかを禁止 (block)
+するように設定を行い、 \fBsigwait\fP(3) 経由でそれらのシグナルを集める
+専用のスレッドを作成する。
+下記のシェルのセッションはその利用例を示したものである。
+.PP
+.in +4n
+.EX
+$\fB ./a.out &\fP
+[1] 5423
+$\fB kill \-QUIT %1\fP
+Signal handling thread got signal 3
+$\fB kill \-USR1 %1\fP
+Signal handling thread got signal 10
+$\fB kill \-TERM %1\fP
+[1]+  Terminated              ./a.out
+.EE
+.in
+.SS プログラムのソース
+\&
+.EX
+#include <pthread.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <signal.h>
+#include <errno.h>
+
+/* Simple error handling functions */
+
+#define handle_error_en(en, msg) \e
+        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)
+
+static void *
+sig_thread(void *arg)
+{
+    sigset_t *set = arg;
+    int s, sig;
+
+    for (;;) {
+        s = sigwait(set, &sig);
+        if (s != 0)
+            handle_error_en(s, "sigwait");
+        printf("Signal handling thread got signal %d\en", sig);
+    }
+}
+
+int
+main(int argc, char *argv[])
+{
+    pthread_t thread;
+    sigset_t set;
+    int s;
+
+    /* Block SIGQUIT and SIGUSR1; other threads created by main()
+       will inherit a copy of the signal mask. */
+
+    sigemptyset(&set);
+    sigaddset(&set, SIGQUIT);
+    sigaddset(&set, SIGUSR1);
+    s = pthread_sigmask(SIG_BLOCK, &set, NULL);
+    if (s != 0)
+        handle_error_en(s, "pthread_sigmask");
+
+    s = pthread_create(&thread, NULL, &sig_thread, &set);
+    if (s != 0)
+        handle_error_en(s, "pthread_create");
+
+    /* Main thread carries on to create other threads and/or do
+       other work */
+
+    pause();            /* Dummy pause so we can test program */
+}
+.EE
+.SH 関連項目
+\fBsigaction\fP(2), \fBsigpending\fP(2), \fBsigprocmask\fP(2),
+\fBpthread_attr_setsigmask_np\fP(3), \fBpthread_create\fP(3), \fBpthread_kill\fP(3),
+\fBsigsetops\fP(3), \fBpthreads\fP(7), \fBsignal\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/pthread_sigqueue.3 b/manual/LDP_man-pages/draft/man3/pthread_sigqueue.3
new file mode 100644 (file)
index 0000000..9c84e65
--- /dev/null
@@ -0,0 +1,105 @@
+.\" Copyright (c) 2010 Michael Kerrisk, <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2012  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2012-05-04, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH PTHREAD_SIGQUEUE 3 2017\-09\-15 Linux "Linux Programmer's Manual"
+.SH 名前
+pthread_sigqueue \- スレッドに対するシグナルとデータをキューに入れる
+.SH 書式
+.nf
+\fB#include <signal.h>\fP
+\fB#include <pthread.h>\fP
+.PP
+\fBint pthread_sigqueue(pthread_t \fP\fIthread\fP\fB, int \fP\fIsig\fP\fB,\fP
+\fB                     const union sigval \fP\fIvalue\fP\fB);\fP
+.fi
+.PP
+\fI\-pthread\fP を付けてコンパイルとリンクを行う。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBpthread_sigqueue\fP(): _GNU_SOURCE
+.SH 説明
+\fBpthread_sigqueue\fP() 関数は \fBsigqueue\fP(3) と同様の処理を実行するが、
+プロセスにシグナルを送信するのではなく、呼び出したスレッドと
+同じプロセス内のスレッドにシグナルを送信する。
+.PP
+\fIthread\fP 引き数は、呼び出し側と同じプロセスのスレッドの ID である。
+\fIsig\fP 引き数は送信するシグナルを指定する。
+\fIvalue\fP 引き数はシグナルと一緒に渡すデータを指定する。
+詳細は \fBsigqueue\fP(3) を参照。
+.SH 返り値
+成功すると、 \fBpthread_sigmask\fP() は 0 を返す。
+エラーの場合、エラー番号を返す。
+.SH エラー
+.TP 
+\fBEAGAIN\fP
+キューに入れられるシグナル数が上限に達していた
+(詳しい情報は (\fBsignal\fP(7) を参照)。
+.TP 
+\fBEINVAL\fP
+\fIsig\fP が無効であった。
+.TP 
+\fBENOSYS\fP
+\fBpthread_sigqueue\fP() がこのシステムではサポートされていない。
+.TP 
+\fBESRCH\fP
+\fIthread\fP が無効である。
+.SH バージョン
+\fBpthread_sigqueue\fP() 関数は glibc 2.11 で初めて登場した。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBpthread_sigqueue\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+この関数は GNU による拡張である。
+.SH 注意
+The glibc implementation of \fBpthread_sigqueue\fP()  gives an error
+(\fBEINVAL\fP)  on attempts to send either of the real\-time signals used
+internally by the NPTL threading implementation.  See \fBnptl\fP(7)  for
+details.
+.SH 関連項目
+\fBrt_tgsigqueueinfo\fP(2), \fBsigaction\fP(2), \fBpthread_sigmask\fP(3),
+\fBsigqueue\fP(3), \fBsigwait\fP(3), \fBpthreads\fP(7), \fBsignal\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/pthread_testcancel.3 b/manual/LDP_man-pages/draft/man3/pthread_testcancel.3
new file mode 100644 (file)
index 0000000..595c91e
--- /dev/null
@@ -0,0 +1,83 @@
+.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2012  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2012-05-04, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH PTHREAD_TESTCANCEL 3 2020\-06\-09 Linux "Linux Programmer's Manual"
+.SH 名前
+pthread_testcancel \- 処理待ちの取り消し要求の配送を要求する
+.SH 書式
+.nf
+\fB#include <pthread.h>\fP
+.PP
+\fBvoid pthread_testcancel(void);\fP
+.PP
+\fI\-pthread\fP でコンパイルしてリンクする。
+.fi
+.SH 説明
+\fBpthread_testcancel\fP() を呼び出すと、呼び出したスレッド内に取り消し
+ポイント (cancellation point) が作成される。
+これにより、これ以外には取り消しポイントを含まないコードを実行して
+いるスレッドが取り消し要求に対応することができるようになる。
+.PP
+(\fBpthread_setcancelstate\fP(3) を使って) キャンセルが無効になっている
+場合や処理待ちの取り消し要求がない場合は、\fBpthread_testcancel\fP() を
+呼び出しても何の影響もない。
+.SH 返り値
+この関数は値を返さない。この関数の呼び出しの結果、呼び出したスレッドが
+キャンセルされた場合、この関数が返ることはない。
+.SH エラー
+.\" SH VERSIONS
+.\" Available since glibc 2.0
+この関数は常に成功する。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw20 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBpthread_testcancel\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH EXAMPLES
+\fBpthread_cleanup_push\fP(3) を参照。
+.SH 関連項目
+\fBpthread_cancel\fP(3), \fBpthread_cleanup_push\fP(3),
+\fBpthread_setcancelstate\fP(3), \fBpthreads\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/pthread_tryjoin_np.3 b/manual/LDP_man-pages/draft/man3/pthread_tryjoin_np.3
new file mode 100644 (file)
index 0000000..3e0faf3
--- /dev/null
@@ -0,0 +1,147 @@
+.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2012  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2012-05-04, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH PTHREAD_TRYJOIN_NP 3 2020\-12\-21 Linux "Linux Programmer's Manual"
+.SH 名前
+pthread_tryjoin_np, pthread_timedjoin_np \- 終了したスレッドの join を
+試みる
+.SH 書式
+.nf
+\fB#define _GNU_SOURCE\fP             /* See feature_test_macros(7) */
+\fB#include <pthread.h>\fP
+.PP
+\fBint pthread_tryjoin_np(pthread_t \fP\fIthread\fP\fB, void **\fP\fIretval\fP\fB);\fP
+.PP
+\fBint pthread_timedjoin_np(pthread_t \fP\fIthread\fP\fB, void **\fP\fIretval\fP\fB,\fP
+\fB                         const struct timespec *\fP\fIabstime\fP\fB);\fP
+.fi
+.PP
+\fI\-pthread\fP を付けてコンパイルとリンクを行う。
+.SH 説明
+これらの関数は \fBpthread_join\fP(3) と同じように動作するが、
+このページで説明する違いがある。
+.PP
+\fBpthread_tryjoin_np\fP() 関数は、スレッド \fIthread\fP の非停止
+(nonblocking) での join を実行し、スレッドの終了ステータスを
+\fI*retval\fP に入れて返す。\fIthread\fP がまだ終了していない場合は、
+\fBpthread_join\fP(3) のように停止 (block) せずに、エラーを返す。
+.PP
+The \fBpthread_timedjoin_np\fP()  function performs a join\-with\-timeout.  If
+\fIthread\fP has not yet terminated, then the call blocks until a maximum time,
+specified in \fIabstime\fP, measured against the \fBCLOCK_REALTIME\fP clock.  If
+the timeout expires before \fIthread\fP terminates, the call returns an error.
+The \fIabstime\fP argument is a structure of the following form, specifying an
+absolute time measured since the Epoch (see \fBtime\fP(2)):
+.PP
+.in +4n
+.EX
+struct timespec {
+    time_t tv_sec;     /* seconds */
+    long   tv_nsec;    /* nanoseconds */
+};
+.EE
+.in
+.SH 返り値
+成功すると、これらの関数は 0 を返す。
+エラーの場合、エラー番号を返す。
+.SH エラー
+これらの関数は \fBpthread_join\fP(3) と同じエラーで失敗する。
+\fBpthread_tryjoin_np\fP() はさらに以下のエラーで失敗する場合がある。
+.TP 
+\fBEBUSY\fP
+呼び出しを行った時点では \fIthread\fP はまだ終了していない。
+.PP
+\fBpthread_timedjoin_np\fP() はさらに以下のエラーで失敗する場合がある。
+.TP 
+\fBETIMEDOUT\fP
+\fIthread\fP が終了する前に呼び出しがタイムアウトとなった。
+.TP 
+\fBEINVAL\fP
+\fIabstime\fP の値が無効である (\fItv_sec\fP が 0 より小さいか、 \fItv_nsec\fP 1e9 がより大きい)。
+.PP
+\fBpthread_timedjoin_np\fP() がエラー \fBEINTR\fP を返すことはない。
+.SH バージョン
+これらの関数は glibc バージョン 2.3.3 で初めて登場した。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.ad l
+.TS
+allbox;
+lbw22 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBpthread_tryjoin_np\fP(),
+\fBpthread_timedjoin_np\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.ad
+.SH 準拠
+これらの関数は非標準の GNU による拡張である。
+そのため、名前に "_np" (nonportable; 移植性がない) という接尾辞が
+付いている。
+.SH EXAMPLES
+以下のコードは、最大 5 秒まで join を待つ。
+.PP
+.in +4n
+.EX
+struct timespec ts;
+int s;
+
+\&...
+
+if (clock_gettime(CLOCK_REALTIME, &ts) == \-1) {
+    /* Handle error */
+}
+
+ts.tv_sec += 5;
+
+s = pthread_timedjoin_np(thread, NULL, &ts);
+if (s != 0) {
+    /* Handle error */
+}
+.EE
+.in
+.SH バグ
+The \fBpthread_timedjoin_np\fP()  function measures time by internally
+calculating a relative sleep interval that is then measured against the
+\fBCLOCK_MONOTONIC\fP clock instead of the \fBCLOCK_REALTIME\fP clock.
+Consequently, the timeout is unaffected by discontinuous changes to the
+\fBCLOCK_REALTIME\fP clock.
+.SH 関連項目
+\fBclock_gettime\fP(2), \fBpthread_exit\fP(3), \fBpthread_join\fP(3), \fBpthreads\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/pthread_yield.3 b/manual/LDP_man-pages/draft/man3/pthread_yield.3
new file mode 100644 (file)
index 0000000..87e1c02
--- /dev/null
@@ -0,0 +1,86 @@
+.\" Copyright (c) 2009 Michael Kerrisk, <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2012  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2012-05-04, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH PTHREAD_YIELD 3 2017\-11\-26 Linux "Linux Programmer's Manual"
+.SH 名前
+pthread_yield \- プロセッサを明け渡す (yield)
+.SH 書式
+.nf
+\fB#define _GNU_SOURCE\fP             /* See feature_test_macros(7) */
+\fB#include <pthread.h>\fP
+.PP
+\fBint pthread_yield(void);\fP
+.fi
+.PP
+\fI\-pthread\fP を付けてコンパイルとリンクを行う。
+.SH 説明
+\fBpthread_yield\fP() を呼び出すと、呼び出したスレッドは CPU を手放す。
+スレッドはそのスレッドの静的優先度の実行キューの末尾に回り、
+別のスレッドが実行されるようにスケジューリングされる。
+詳細は \fBsched_yield\fP(2) を参照。
+.SH 返り値
+成功すると、 \fBpthread_yield\fP() は 0 を返す。
+エラーの場合、エラー番号を返す。
+.SH エラー
+Linux では、この関数の呼び出しは常に成功する
+(ただし、移植性や将来も動作することを保証したいアプリケーションでは
+正のエラーの返り値を処理するようにすべきである)。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBpthread_yield\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+.\" e.g., the BSDs, Tru64, AIX, and Irix.
+この関数は非標準だが、他のいくつかのシステムにも存在する。
+代わりに、標準化されている \fBsched_yield\fP(2) を使うこと。
+.SH 注意
+Linux では、この関数は \fBsched_yield\fP(2) を呼び出す形で実装されている。
+.PP
+\fBpthread_yield\fP()  is intended for use with real\-time scheduling policies
+(i.e., \fBSCHED_FIFO\fP or \fBSCHED_RR\fP).  Use of \fBpthread_yield\fP()  with
+nondeterministic scheduling policies such as \fBSCHED_OTHER\fP is unspecified
+and very likely means your application design is broken.
+.SH 関連項目
+.\" FIXME . .BR pthread_cond_wait (3),
+\fBsched_yield\fP(2), \fBpthreads\fP(7), \fBsched\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/putenv.3 b/manual/LDP_man-pages/draft/man3/putenv.3
new file mode 100644 (file)
index 0000000..9738cce
--- /dev/null
@@ -0,0 +1,136 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\"    Single UNIX Specification, Version 2
+.\" Modified Thu Apr  8 15:00:12 1993, David Metcalfe
+.\" Modified Sat Jul 24 18:44:45 1993, Rik Faith (faith@cs.unc.edu)
+.\" Modified Fri Feb 14 21:47:50 1997 by Andries Brouwer (aeb@cwi.nl)
+.\" Modified Mon Oct 11 11:11:11 1999 by Andries Brouwer (aeb@cwi.nl)
+.\" Modified Wed Nov 10 00:02:26 1999 by Andries Brouwer (aeb@cwi.nl)
+.\" Modified Sun May 20 22:17:20 2001 by Andries Brouwer (aeb@cwi.nl)
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
+.\"    all rights reserved.
+.\" Translated 1997-12-19, HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
+.\" Updated 2000-06-18, Kentaro Shirakata <argrath@ub32.org>
+.\" Updated 2005-11-19, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH PUTENV 3 2019\-03\-06 GNU "Linux Programmer's Manual"
+.SH 名前
+putenv \- 環境変数の変更または追加
+.SH 書式
+.nf
+\fB#include <stdlib.h>\fP
+.PP
+.\" Not: const char *
+\fBint putenv(char *\fP\fIstring\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBputenv\fP():
+_XOPEN_SOURCE
+    || /* Glibc since 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _SVID_SOURCE
+.SH 説明
+\fBputenv\fP()  関数は、環境変数の追加または値の変更を行う。 引数 \fIstring\fP は \fIname\fP=\fIvalue\fP
+という形式を取る。 \fIname\fP が環境に存在しない場合は \fIstring\fP が環境に追加される。 \fIname\fP が環境に存在する場合は
+\fIname\fP の値は \fIvalue\fP に変更される。 \fIstring\fP が指している文字列は環境の一部となるので、
+文字列を変更すると環境も変更される。
+.SH 返り値
+\fBputenv\fP() 関数は、成功すると 0 を返し、エラーの場合は 0 以外の値を返す。エラーが発生した場合、 \fIerrno\fP
+に原因を示す値が設定される。
+.SH エラー
+.TP 
+\fBENOMEM\fP
+新しい環境を割り当てるのに十分な空きがない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBputenv\fP()
+T}     Thread safety   MT\-Unsafe const:env
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, SVr4, 4.3BSD.
+.SH 注意
+.\" .LP
+.\" Description for libc4, libc5, glibc:
+.\" If the argument \fIstring\fP is of the form \fIname\fP,
+.\" and does not contain an \(aq=\(aq character, then the variable \fIname\fP
+.\" is removed from the environment.
+.\" If
+.\" .BR putenv ()
+.\" has to allocate a new array \fIenviron\fP,
+.\" and the previous array was also allocated by
+.\" .BR putenv (),
+.\" then it will be freed.
+.\" In no case will the old storage associated
+.\" to the environment variable itself be freed.
+\fBputenv\fP()  はリエントラントであることを求められていない。 glibc 2.0 ではリエントラントではない。 glibc 2.1
+ではリエントラントである。
+.PP
+Since version 2.1.2, the glibc implementation conforms to SUSv2: the pointer
+\fIstring\fP given to \fBputenv\fP()  is used.  In particular, this string becomes
+part of the environment; changing it later will change the environment.
+(Thus, it is an error to call \fBputenv\fP()  with an automatic variable as the
+argument, then return from the calling function while \fIstring\fP is still
+part of the environment.)  However, glibc versions 2.0 to 2.1.1 differ: a
+copy of the string is used.  On the one hand this causes a memory leak, and
+on the other hand it violates SUSv2.
+.PP
+4.4BSD バージョンでは、glibc 2.0 と同様にコピーを使う。
+.PP
+SUSv2 ではプロトタイプから \fIconst\fP が取り除かれており、 glibc 2.1.3 もそのようになっている。
+.PP
+The GNU C library implementation provides a nonstandard extension.  If
+\fIstring\fP does not include an equal sign:
+.PP
+.in +4n
+.EX
+putenv("NAME");
+.EE
+.in
+.PP
+then the named variable is removed from the caller's environment.
+.SH 関連項目
+\fBclearenv\fP(3), \fBgetenv\fP(3), \fBsetenv\fP(3), \fBunsetenv\fP(3), \fBenviron\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/putgrent.3 b/manual/LDP_man-pages/draft/man3/putgrent.3
new file mode 100644 (file)
index 0000000..8bcc69c
--- /dev/null
@@ -0,0 +1,63 @@
+.\" Copyright 2003 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
+.\" Distributed under GPL
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2004 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated Sat Aug 28 14:07:20 JST 2004
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\"
+.TH PUTGRENT 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+putgrent \- グループデータベースエントリーをファイルに書き込む
+.SH 書式
+\fB#define _GNU_SOURCE\fP /* feature_test_macros(7) 参照 */
+.br
+\fB#include <grp.h>\fP
+.PP
+\fBint putgrent(const struct group *\fP\fIgrp\fP\fB, FILE *\fP\fIstream\fP\fB);\fP
+.SH 説明
+\fBputgrent\fP()  関数は \fBfgetgrent\fP(3)  の逆である。 この関数は与えられた \fIstruct group\fP を
+\fIstream\fP に書き込む。 グループメンバのリストは、 NULL で終端されるか、 NULL で初期化されなければならない。
+.PP
+\fIstruct group\fP は以下のように定義される:
+.PP
+.in +4n
+.EX
+struct group {
+    char   *gr_name;      /* グループ名 */
+    char   *gr_passwd;    /* グループパスワード */
+    gid_t   gr_gid;       /* グループ ID */
+    char  **gr_mem;       /* グループメンバ */
+};
+.EE
+.in
+.SH 返り値
+この関数は、成功した場合は 0 を返し、エラーの場合は 0 以外の値を返す。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBputgrent\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.sp 1
+.SH 準拠
+この関数は GNU による拡張である。
+.SH 関連項目
+\fBfgetgrent\fP(3), \fBgetgrent\fP(3), \fBgroup\fP(5)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/putpwent.3 b/manual/LDP_man-pages/draft/man3/putpwent.3
new file mode 100644 (file)
index 0000000..dc8b33b
--- /dev/null
@@ -0,0 +1,105 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified Sat Jul 24 18:43:46 1993 by Rik Faith (faith@cs.unc.edu)
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
+.\"    all rights reserved.
+.\" Translated Thu Dec 18 17:43:46 JST 1997
+.\"    by HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
+.\"
+.TH PUTPWENT 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+putpwent \- パスワードファイルエントリーの書き込み
+.SH 書式
+.nf
+\fB#include <stdio.h>\fP
+\fB#include <sys/types.h>\fP
+\fB#include <pwd.h>\fP
+.PP
+\fBint putpwent(const struct passwd *\fP\fIp\fP\fB, FILE *\fP\fIstream\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBputpwent\fP():
+    Since glibc 2.19:
+        _DEFAULT_SOURCE
+    Glibc 2.19 and earlier:
+        _SVID_SOURCE
+.SH 説明
+\fBputpwent\fP()  関数は、構造体 \fIp\fP からのパスワードエントリーを \fIstream\fP に結びつけられたファイルに書き込む。
+.PP
+\fIpasswd\fP 構造体は、\fI<pwd.h>\fP で以下のように定義されている:
+.PP
+.in +4n
+.EX
+struct passwd {
+    char    *pw_name;        /* ユーザー名 */
+    char    *pw_passwd;      /* ユーザーのパスワード */
+    uid_t    pw_uid;         /* ユーザー ID */
+    gid_t    pw_gid;         /* グループ ID */
+    char    *pw_gecos;       /* 本名 */
+    char    *pw_dir;         /* ホームディレクトリ */
+    char    *pw_shell;       /* シェルプログラム */
+};
+.EE
+.in
+.SH 返り値
+\fBputpwent\fP() 関数は、成功した場合 0 を返す。 エラーが発生した場合 \-1 を返し、 \fIerrno\fPに原因を示す値が設定される。
+.SH エラー
+.TP 
+\fBEINVAL\fP
+無効な(NULL)引数が渡された。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBputpwent\fP()
+T}     Thread safety   MT\-Safe locale
+.TE
+.sp 1
+.SH 準拠
+SVr4.
+.SH 関連項目
+\fBendpwent\fP(3), \fBfgetpwent\fP(3), \fBgetpw\fP(3), \fBgetpwent\fP(3),
+\fBgetpwnam\fP(3), \fBgetpwuid\fP(3), \fBsetpwent\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/qecvt.3 b/manual/LDP_man-pages/draft/man3/qecvt.3
new file mode 100644 (file)
index 0000000..c4666c2
--- /dev/null
@@ -0,0 +1,102 @@
+.\" Copyright (C) 2002 Andries Brouwer <aeb@cwi.nl>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" This replaces an earlier man page written by Walter Harms
+.\" <walter.harms@informatik.uni-oldenburg.de>.
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2002 Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated Sun Sep 22 10:42:23 2002
+.\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH QECVT 3 2016\-03\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+qecvt, qfcvt, qgcvt \- 浮動小数点数の文字列への変換
+.SH 書式
+\fB#include <stdlib.h>\fP
+.PP
+\fBchar *qecvt(long double \fP\fInumber\fP\fB, int \fP\fIndigits\fP\fB, int
+*\fP\fIdecpt\fP\fB,\fP \fBint *\fP\fIsign\fP\fB);\fP
+.PP
+\fBchar *qfcvt(long double \fP\fInumber\fP\fB, int \fP\fIndigits\fP\fB, int
+*\fP\fIdecpt\fP\fB,\fP \fBint *\fP\fIsign\fP\fB);\fP
+.PP
+\fBchar *qgcvt(long double \fP\fInumber\fP\fB, int \fP\fIndigit\fP\fB, char *\fP\fIbuf\fP\fB);\fP
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBqecvt\fP(), \fBqfcvt\fP(), \fBqgcvt\fP(): _SVID_SOURCE
+.ad b
+.\" FIXME . The full FTM picture looks to have be something like the
+.\" following mess:
+.\"    glibc 2.20 onward
+.\"        _DEFAULT_SOURCE
+.\"    glibc 2.18 to glibc 2.19
+.\"        _BSD_SOURCE || _SVID_SOURCE
+.\"    glibc 2.10 to glibc 2.17
+.\"        _SVID_SOURCE || (_XOPEN_SOURCE >= 500 ||
+.\"            (_XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED) &&
+.\"                ! (_POSIX_C_SOURCE >= 200809L))
+.\"    Before glibc 2.10:
+.\"        _SVID_SOURCE || _XOPEN_SOURCE >= 500 ||
+.\"            (_XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED)
+.SH 説明
+関数 \fBqecvt\fP(), \fBqfcvt\fP(), \fBqgcvt\fP()  は、それぞれ \fBecvt\fP(3), \fBfcvt\fP(3),
+\fBgcvt\fP(3)  と同じである。 引き数 \fInumber\fP が \fIlong double\fP 型である点だけが異なる。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBqecvt\fP()
+T}     Thread safety   MT\-Unsafe race:qecvt
+T{
+\fBqfcvt\fP()
+T}     Thread safety   MT\-Unsafe race:qfcvt
+T{
+\fBqgcvt\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+.\" Not supported by libc4 and libc5.
+SVr4.  多くの一般的な UNIX には実装されていないが、SunOS には実装されている。 glibc ではサポートされている。
+.SH 注意
+これらの関数は廃止された。代わりに \fBsnprintf\fP(3) の使用を推奨する。
+.SH 関連項目
+\fBecvt\fP(3), \fBecvt_r\fP(3), \fBgcvt\fP(3), \fBsprintf\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/qsort.3 b/manual/LDP_man-pages/draft/man3/qsort.3
new file mode 100644 (file)
index 0000000..72cefc1
--- /dev/null
@@ -0,0 +1,147 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\"
+.\" Modified 1993-03-29, David Metcalfe
+.\" Modified 1993-07-24, Rik Faith (faith@cs.unc.edu)
+.\" 2006-01-15, mtk, Added example program.
+.\" Modified 2012-03-08, Mark R. Bannister <cambridge@users.sourceforge.net>
+.\"                  and Ben Bacarisse <software@bsb.me.uk>
+.\"     Document qsort_r()
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 YOSHINO Takashi
+.\"       all rights reserved.
+.\" Translated 1997-01-21, YOSHINO Takashi <yoshino@civil.jcn.nihon-u.ac.jp>
+.\" Updated & Modified 2004-06-06, Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated 2006-01-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2012-04-30, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH QSORT 3 2020\-11\-01 "" "Linux Programmer's Manual"
+.SH 名前
+qsort, qsort_r \- 配列を並べ変える
+.SH 書式
+.nf
+\fB#include <stdlib.h>\fP
+.PP
+\fBvoid qsort(void *\fP\fIbase\fP\fB, size_t \fP\fInmemb\fP\fB, size_t \fP\fIsize\fP\fB,\fP
+\fB           int (*\fP\fIcompar\fP\fB)(const void *, const void *));\fP
+.PP
+\fBvoid qsort_r(void *\fP\fIbase\fP\fB, size_t \fP\fInmemb\fP\fB, size_t \fP\fIsize\fP\fB,\fP
+\fB           int (*\fP\fIcompar\fP\fB)(const void *, const void *, void *),\fP
+\fB           void *\fP\fIarg\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBqsort_r\fP(): _GNU_SOURCE
+.ad b
+.SH 説明
+\fBqsort\fP()  関数は、 \fInmemb\fP 個の大きさ \fIsize\fP の要素をもつ配列を並べ変える。 \fIbase\fP
+引き数は配列の先頭へのポインターである。
+.PP
+\fIcompar\fP をポインターとする比較関数によって、 配列の中身は昇順 (値の大きいものほど後に並ぶ順番) に並べられる。
+比較関数の引き数は比較されるふたつのオブジェクトのポインターである。
+.PP
+比較関数は、第一引き数が第二引き数に対して、 1) 小さい、2) 等しい、3) 大きいのそれぞれに応じて、 1) ゼロより小さい整数、2) ゼロ、3)
+ゼロより大きい整数の いずれかを返さなければならない。 二つの要素の比較結果が等しいとき、 並べ変えた後の配列では、これら二つの順序は規定されていない。
+.PP
+\fBqsort_r\fP() 関数は \fBqsort\fP() と同じだが、比較関数 \fIcompar\fP が第 3 引き数を
+取る点が異なる。ポインターが \fIarg\fP 経由で比較関数に渡される。
+これにより、比較関数は任意の引き数を渡すためにグローバル変数を使う必要がなくなり、
+そのため、リエントラント (再入可能) で安全にスレッドで使用できるようになる。
+.SH 返り値
+関数 \fBqsort\fP() と \fBqsort_r\fP() は値を返さない。
+.SH バージョン
+\fBqsort_r\fP() は glibc バージョン 2.8 で追加された。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw18 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBqsort\fP(),
+\fBqsort_r\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.sp 1
+.SH 準拠
+\fBqsort\fP(): POSIX.1\-2001, POSIX.1\-2008, C89, C99, SVr4, 4.3BSD.
+.SH 注意
+To compare C strings, the comparison function can call \fBstrcmp\fP(3), as
+shown in the example below.
+.SH EXAMPLES
+使用例については、 \fBbsearch\fP(3)  にある例を参照すること。
+.PP
+以下のプログラムに別の使用例を示す。このプログラムは、 コマンドライン引き数で指定された文字列の並び換えを行う。
+.PP
+.EX
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+static int
+cmpstringp(const void *p1, const void *p2)
+{
+    /* この関数の実際の引き数は "char 型へのポインターのポインター" だが、
+       strcmp(3) の引き数は "char 型へのポインター" である。
+       そこで、以下のようにキャストをしてからポインターの逆参照を行う。*/
+
+    return strcmp(*(const char **) p1, *(const char **) p2);
+}
+
+int
+main(int argc, char *argv[])
+{
+    if (argc < 2) {
+        fprintf(stderr, "Usage: %s <string>...\en", argv[0]);
+        exit(EXIT_FAILURE);
+    }
+
+    qsort(&argv[1], argc \- 1, sizeof(char *), cmpstringp);
+
+    for (int j = 1; j < argc; j++)
+        puts(argv[j]);
+    exit(EXIT_SUCCESS);
+}
+.EE
+.SH 関連項目
+\fBsort\fP(1), \fBalphasort\fP(3), \fBstrcmp\fP(3), \fBversionsort\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/raise.3 b/manual/LDP_man-pages/draft/man3/raise.3
new file mode 100644 (file)
index 0000000..0f7f169
--- /dev/null
@@ -0,0 +1,93 @@
+.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
+.\" and Copyright (C) 2008 Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" Modified Sat Jul 24 18:40:56 1993 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 1995 by Mike Battersby (mib@deakin.edu.au)
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
+.\"    all rights reserved.
+.\" Translated 1997-12-25, HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
+.\" Updated 2008-08-08, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.05
+.\" Updated 2012-05-04, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH RAISE 3 2015\-08\-08 GNU "Linux Programmer's Manual"
+.SH 名前
+raise \- 呼び出し元にシグナルを送る
+.SH 書式
+.nf
+\fB#include <signal.h>\fP
+.PP
+\fBint raise(int \fP\fIsig\fP\fB);\fP
+.fi
+.SH 説明
+\fBraise\fP()  関数は、呼び出し元のプロセスもしくはスレッドにシグナルを送る。 シングルスレッドのプログラムでは、以下と等価である。
+.PP
+.in +4n
+.EX
+kill(getpid(), sig);
+.EE
+.in
+.PP
+マルチスレッドのプログラムでは、以下と等価である。
+.PP
+.in +4n
+.EX
+pthread_kill(pthread_self(), sig);
+.EE
+.in
+.PP
+シグナルに起因してシグナルハンドラーが呼び出される場合には、 \fBraise\fP()  が返るのは必ずシグナルハンドラーが返った後になる。
+.SH 返り値
+成功した場合は 0 を、失敗した場合は 0 以外の値を返す。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBraise\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, C89, C99.
+.SH 注意
+.\" 2.3.2 used the obsolete tkill(), if available.
+glibc バージョン 2.3.3 以降では、カーネルが \fBtgkill\fP(2) システムコールをサポートしている場合は\fBraise\fP() は
+\fBtgkill\fP(2) を使って実装されている。古いバージョンの glibc では、\fBraise\fP() は \fBkill\fP(2)
+を使って実装されている。
+.SH 関連項目
+\fBgetpid\fP(2), \fBkill\fP(2), \fBsigaction\fP(2), \fBsignal\fP(2), \fBpthread_kill\fP(3),
+\fBsignal\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/rand.3 b/manual/LDP_man-pages/draft/man3/rand.3
new file mode 100644 (file)
index 0000000..d0edf15
--- /dev/null
@@ -0,0 +1,185 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\"
+.\" Modified 1993-03-29, David Metcalfe
+.\" Modified 1993-04-28, Lars Wirzenius
+.\" Modified 1993-07-24, Rik Faith (faith@cs.unc.edu)
+.\" Modified 1995-05-18, Rik Faith (faith@cs.unc.edu) to add
+.\"          better discussion of problems with rand on other systems.
+.\"          (Thanks to Esa Hyyti{ (ehyytia@snakemail.hut.fi).)
+.\" Modified 1998-04-10, Nicolás Lichtmaier <nick@debian.org>
+.\"          with contribution from Francesco Potorti <F.Potorti@cnuce.cnr.it>
+.\" Modified 2003-11-15, aeb, added rand_r
+.\" 2010-09-13, mtk, added example program
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 YOSHINO Takashi all rights reserved.
+.\" Translated 1997-01-21, YOSHINO Takashi <yoshino@civil.jcn.nihon-u.ac.jp>
+.\" Updated 2000-09-24, Kentaro Shirakata <argrath@ub32.org>
+.\" Updated 2005-03-15, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2008-08-08, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.05
+.\"
+.TH RAND 3 2020\-11\-01 "" "Linux Programmer's Manual"
+.SH 名前
+rand, srand \- 乱数を生成する関数
+.SH 書式
+.nf
+\fB#include <stdlib.h>\fP
+.PP
+\fBint rand(void);\fP
+.PP
+\fBint rand_r(unsigned int *\fP\fIseedp\fP\fB);\fP
+.PP
+\fBvoid srand(unsigned int \fP\fIseed\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBrand_r\fP():
+.RS 4
+Since glibc 2.24:
+    _POSIX_C_SOURCE >= 199506L
+.br
+Glibc 2.23 and earlier
+    _POSIX_C_SOURCE
+.RE
+.SH 説明
+\fBrand\fP() 関数は 0 以上 \fBRAND_MAX\fP 以下
+(数学的に書くと [0,\ \fBRAND_MAX\fP]) の範囲の疑似乱数整数を返す。
+.PP
+\fBsrand\fP()  関数は、 \fBrand\fP()  関数で作られる疑似乱数整数系列の新しい種として、 その引き数の値を使用する。
+これらの関数を使用して作られた疑似乱数系列は、 同じ値を引き数として \fBsrand\fP()  を呼ぶことで、 再現することが可能である。
+.PP
+種の値が与えられない場合には、 \fBrand\fP()  関数は 自動的に 1 を種とする。
+.PP
+The function \fBrand\fP()  is not reentrant, since it uses hidden state that is
+modified on each call.  This might just be the seed value to be used by the
+next call, or it might be something more elaborate.  In order to get
+reproducible behavior in a threaded application, this state must be made
+explicit; this can be done using the reentrant function \fBrand_r\fP().
+.PP
+\fBrand\fP() と同様、 \fBrand_r\fP() は [0,\ \fBRAND_MAX\fP] の範囲の疑似乱数整数を返す。
+\fIseedp\fP 引き数は、\fBrand_r\fP() の呼び出し間で状態を保持するために使用される
+\fIunsigned int\fP へのポインターである。
+\fIseedp\fP が指す整数に同じ初期値を \fBrand_r\fP() を呼び出し、
+呼び出し間でその値が変更されなければ、同じ疑似乱数系列が得られる。
+.PP
+\fBrand_r\fP() の \fIseedp\fP 引き数が指す値により提供される状態は非常に小さな空間
+なので、この関数は弱い疑似乱数生成器になってしまう。
+代わりに \fBdrand48_r\fP(3) を使ってみるとよい。
+.SH 返り値
+関数 \fBrand\fP() と \fBrand_r\fP() は 0 以上 \fBRAND_MAX\fP 以下の数を返す。
+関数 \fBsrand\fP() は値を返さない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw25 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBrand\fP(),
+\fBrand_r\fP(),
+\fBsrand\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+関数 \fBrand\fP()  と \fBsrand\fP()  は SVr4, 4.3BSD, C89, C99, POSIX.1\-2001 に準拠している。
+関数 \fBrand_r\fP()  は POSIX.1\-2001 に由来する。 POSIX.1\-2008 は、 \fBrand_r\fP()
+を廃止予定としている。
+.SH 注意
+\fBrand\fP()  と \fBsrand\fP()  の Linux C Library 版は、 \fBrandom\fP(3)  と \fBsrandom\fP(3)
+の両関数と同じ乱数生成 アルゴリズムを使用している。そのため、下位のビットは上位のビットと 同じくらいにランダムである。 しかし、旧版の
+\fBrand\fP()  の実装や、他のシステムの現在の実装では、下位のビットが上位のビットほど
+ランダムになっていない。移植性を高める場合でも、精度の高い乱数が必要な アプリケーションではこの関数は使用してはいけない (代わりに
+\fBrandom\fP(3)  を使うこと)。
+.SH EXAMPLES
+POSIX 1003.1\-2003 では、 \fBrand\fP()  と \fBsrand\fP()
+の実装例として以下を挙げている。これは、異なる2つのマシンで同じ乱数系列が 必要な場合には便利であろう。
+.PP
+.in +4n
+.EX
+static unsigned long next = 1;
+
+/* RAND_MAX を 32767 と仮定 */
+int myrand(void) {
+    next = next * 1103515245 + 12345;
+    return((unsigned)(next/65536) % 32768);
+}
+
+void mysrand(unsigned int seed) {
+    next = seed;
+}
+.EE
+.in
+.PP
+以下のプログラムを使うと、特定の乱数の種が与えられた場合に
+\fBrand\fP() が生成する疑似乱数系列を表示することができる。
+.PP
+.in +4n
+.EX
+#include <stdlib.h>
+#include <stdio.h>
+
+int
+main(int argc, char *argv[])
+{
+    int r, nloops;
+    unsigned int seed;
+
+    if (argc != 3) {
+        fprintf(stderr, "Usage: %s <seed> <nloops>\en", argv[0]);
+        exit(EXIT_FAILURE);
+    }
+
+    seed = atoi(argv[1]);
+    nloops = atoi(argv[2]);
+
+    srand(seed);
+    for (int j = 0; j < nloops; j++) {
+        r =  rand();
+        printf("%d\en", r);
+    }
+
+    exit(EXIT_SUCCESS);
+}
+.EE
+.in
+.SH 関連項目
+\fBdrand48\fP(3), \fBrandom\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/random_r.3 b/manual/LDP_man-pages/draft/man3/random_r.3
new file mode 100644 (file)
index 0000000..244f91e
--- /dev/null
@@ -0,0 +1,135 @@
+.\" Copyright 2008 Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2008  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2008-08-21, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.04
+.\"
+.TH RANDOM_R 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+random_r, srandom_r, initstate_r, setstate_r \- リエントラントな 乱数生成器
+.SH 書式
+.nf
+\fB#include <stdlib.h>\fP
+.PP
+\fBint random_r(struct random_data *\fP\fIbuf\fP\fB, int32_t *\fP\fIresult\fP\fB);\fP
+.PP
+\fBint srandom_r(unsigned int \fP\fIseed\fP\fB, struct random_data *\fP\fIbuf\fP\fB);\fP
+.PP
+\fBint initstate_r(unsigned int \fP\fIseed\fP\fB, char *\fP\fIstatebuf\fP\fB,\fP
+\fB                size_t \fP\fIstatelen\fP\fB, struct random_data *\fP\fIbuf\fP\fB);\fP
+.PP
+\fBint setstate_r(char *\fP\fIstatebuf\fP\fB, struct random_data *\fP\fIbuf\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBrandom_r\fP(), \fBsrandom_r\fP(), \fBinitstate_r\fP(), \fBsetstate_r\fP():
+.RS 4
+/* Glibc since 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
+.RE
+.ad b
+.SH 説明
+これらの関数は、 \fBrandom\fP(3)  で説明されている関数のリエントラント版で、等価な機能を持つ。
+これらは、独立した再現可能な乱数列を各スレッドが得る必要があるような マルチスレッドプログラムでの使用に適している。
+.PP
+The \fBrandom_r\fP()  function is like \fBrandom\fP(3), except that instead of
+using state information maintained in a global variable, it uses the state
+information in the argument pointed to by \fIbuf\fP, which must have been
+previously initialized by \fBinitstate_r\fP().  The generated random number is
+returned in the argument \fIresult\fP.
+.PP
+The \fBsrandom_r\fP()  function is like \fBsrandom\fP(3), except that it
+initializes the seed for the random number generator whose state is
+maintained in the object pointed to by \fIbuf\fP, which must have been
+previously initialized by \fBinitstate_r\fP(), instead of the seed associated
+with the global state variable.
+.PP
+The \fBinitstate_r\fP()  function is like \fBinitstate\fP(3)  except that it
+initializes the state in the object pointed to by \fIbuf\fP, rather than
+initializing the global state variable.  Before calling this function, the
+\fIbuf.state\fP field must be initialized to NULL.  The \fBinitstate_r\fP()
+function records a pointer to the \fIstatebuf\fP argument inside the structure
+pointed to by \fIbuf\fP.  Thus, \fIstatebuf\fP should not be deallocated so long
+as \fIbuf\fP is still in use.  (So, \fIstatebuf\fP should typically be allocated
+as a static variable, or allocated on the heap using \fBmalloc\fP(3)  or
+similar.)
+.PP
+The \fBsetstate_r\fP()  function is like \fBsetstate\fP(3)  except that it
+modifies the state in the object pointed to by \fIbuf\fP, rather than modifying
+the global state variable.  \fIstate\fP must first have been initialized using
+\fBinitstate_r\fP()  or be the result of a previous call of \fBsetstate_r\fP().
+.SH 返り値
+これらの関数はすべて、成功すると 0 を返す。 エラーの場合、\-1 を返し、 \fIerrno\fP にエラーの原因を示す値がセットされる。
+.SH エラー
+.TP 
+\fBEINVAL\fP
+8 バイトより小さい状態配列が \fBinitstate_r\fP()  に指定された。
+.TP 
+\fBEINVAL\fP
+\fBsetstate_r\fP()  の引き数 \fIstatebuf\fP か \fIbuf\fP が NULL であった。
+.TP 
+\fBEINVAL\fP
+\fBrandom_r\fP()  の引き数 \fIbuf\fP か \fIresult\fP が NULL であった。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw27 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBrandom_r\fP(),
+\fBsrandom_r\fP(),
+.br
+\fBinitstate_r\fP(),
+\fBsetstate_r\fP()
+T}     Thread safety   MT\-Safe race:buf
+.TE
+.SH 準拠
+.\" These functions appear to be on Tru64, but don't seem to be on
+.\" Solaris, HP-UX, or FreeBSD.
+これらの関数は非標準で glibc による拡張である。
+.SH バグ
+.\" FIXME . https://sourceware.org/bugzilla/show_bug.cgi?id=3662
+The \fBinitstate_r\fP()  interface is confusing.  It appears that the
+\fIrandom_data\fP type is intended to be opaque, but the implementation
+requires the user to either initialize the \fIbuf.state\fP field to NULL or
+zero out the entire structure before the call.
+.SH 関連項目
+\fBdrand48\fP(3), \fBrand\fP(3), \fBrandom\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/re_comp.3 b/manual/LDP_man-pages/draft/man3/re_comp.3
new file mode 100644 (file)
index 0000000..f8d5a31
--- /dev/null
@@ -0,0 +1,83 @@
+.\" Copyright (C), 1995, Graeme W. Wilford. (Wilf.)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" Wed Jun 14 16:10:28 BST 1995 Wilf. (G.Wilford@@ee.surrey.ac.uk)
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
+.\"    all rights reserved.
+.\" Translated Thu Dec 18 15:06:31 JST 1997
+.\"    by HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
+.\"
+.TH RE_COMP 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+re_comp, re_exec \- BSD の正規表現関数
+.SH 書式
+\fB#define _REGEX_RE_COMP\fP
+.br
+\fB#include <sys/types.h>\fP
+.br
+\fB#include <regex.h>\fP
+.PP
+\fBchar *re_comp(const char *\fP\fIregex\fP\fB);\fP
+.PP
+\fBint re_exec(const char *\fP\fIstring\fP\fB);\fP
+.SH 説明
+\fBre_comp\fP()  は、 \fIregex\fP で示されるヌルで終端された正規表現をコンパイルするために使用される。
+コンパイルされたパターンは静的な領域を使用しており、そのパターンバッファー は以降の \fBre_comp\fP()  の使用によって上書きされる。 もし
+\fIregex\fP が NULL ならば何の操作も行われず、パターンバッファーの内容は 置き換えられない。
+.PP
+\fBre_exec\fP()  は、 \fIstring\fP が指すヌルで終端された文字列が前回コンパイルされた \fIregex\fP
+にマッチするかどうかを評価するために使用される。
+.SH 返り値
+\fBre_comp\fP()  は、 \fIregex\fP のコンパイルに成功した場合 NULL を返し、
+それ以外の場合は適切なエラーメッセージへのポインターを返す。
+.PP
+\fBre_exec\fP()  は、一致した場合 1 を、失敗した場合 0 を返す。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw20 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBre_comp\fP(),
+\fBre_exec\fP()
+T}     Thread safety   MT\-Unsafe
+.TE
+.SH 準拠
+4.3BSD.
+.SH 注意
+これらの関数は廃止予定である。代わりに \fBregcomp\fP(3)  に書かれている関数を使用すべきである。
+.SH 関連項目
+\fBregcomp\fP(3), \fBregex\fP(7), GNU regex manual
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
index 7719ac2..5dbc2f0 100644 (file)
@@ -114,12 +114,12 @@ Out of memory.
 \fBENOTDIR\fP
 パスのディレクトリ要素が、ディレクトリでない。
 .SH 属性
-For an explanation of the terms used in this section, see \fBattributes\fP(7).
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
 .TS
 allbox;
 lb lb lb
 l l l.
-Interface      Attribute       Value
+インターフェース       属性  値
 T{
 \fBrealpath\fP()
 T}     Thread safety   MT\-Safe
diff --git a/manual/LDP_man-pages/draft/man3/regex.3 b/manual/LDP_man-pages/draft/man3/regex.3
new file mode 100644 (file)
index 0000000..24abdbb
--- /dev/null
@@ -0,0 +1,265 @@
+.\" Copyright (C), 1995, Graeme W. Wilford. (Wilf.)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" Wed Jun 14 16:10:28 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
+.\" Tiny change in formatting - aeb, 950812
+.\" Modified 8 May 1998 by Joseph S. Myers (jsm28@cam.ac.uk)
+.\"
+.\" show the synopsis section nicely
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1998 Takatsugu Nokubi
+.\"    all rights reserved.
+.\" Translated 1998-06-30, Takatsugu Nokubi
+.\" Updated & Modified 2001-11-05, Yuichi SATO <ysato@h4.dion.ne.jp>
+.\" Updated & Modified 2005-02-24, Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated 2008-08-02, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.05
+.\" Updated 2013-03-27, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH REGEX 3 2020\-08\-13 GNU "Linux Programmer's Manual"
+.SH 名前
+regcomp, regexec, regerror, regfree \- POSIX regex 関数
+.SH 書式
+.nf
+\fB#include <regex.h>\fP
+.PP
+\fBint regcomp(regex_t *\fP\fIpreg\fP\fB, const char *\fP\fIregex\fP\fB, int \fP\fIcflags\fP\fB);\fP
+.PP
+\fBint regexec(const regex_t *\fP\fIpreg\fP\fB, const char *\fP\fIstring\fP\fB, size_t \fP\fInmatch\fP\fB,\fP
+\fB            regmatch_t \fP\fIpmatch[]\fP\fB, int \fP\fIeflags\fP\fB);\fP
+.PP
+\fBsize_t regerror(int \fP\fIerrcode\fP\fB, const regex_t *\fP\fIpreg\fP\fB, char *\fP\fIerrbuf\fP\fB,\fP
+\fB                size_t \fP\fIerrbuf_size\fP\fB);\fP
+.PP
+\fBvoid regfree(regex_t *\fP\fIpreg\fP\fB);\fP
+.fi
+.SH 説明
+.SS "POSIX regex コンパイル"
+\fBregcomp\fP()  は、正規表現をコンパイルして、 \fBregexec\fP()  での検索処理に適合する形態にする。
+.PP
+\fBregcomp\fP()  はパターンを記憶するバッファーへのポインター \fIpreg\fP、 ヌル文字で終端された文字列 \fIregex\fP、
+そしてコンパイルの形式を決めるためのフラグ \fIcflag\fP を引数に伴う。
+.PP
+全ての正規表現検索は、コンパイルされたパターンによって行わなければならない。 よって、 \fBregexec\fP()  に指定するのは、必ず
+(\fBregcomp\fP()  によってコンパイルされた) パターンバッファーへのアドレスでなければならない。
+.PP
+\fIcflags\fP is the bitwise\-\fBor\fP of zero or more of the following:
+.TP 
+\fBREG_EXTENDED\fP
+\fIregex\fP に \fBPOSIX\fP 拡張正規表現を使用する。もしこのフラグが設定されない場合、 \fBPOSIX\fP 標準正規表現が使われる。
+.TP 
+\fBREG_ICASE\fP
+大文字小文字の違いを無視する。このフラグを指定してコンパイルされた パターンバッファーを用いて \fBregexec\fP()
+関数を呼び出すと、大文字小文字の区別を付けずに検索が行われる。
+.TP 
+\fBREG_NOSUB\fP
+マッチの場所を報告しない。渡されたパターンバッファーがこのフラグを設定してコンパイルされていた場合、 \fBregexec\fP() の引き数
+\fInmatch\fP, \fIpmatch\fP が無視される。
+.TP 
+\fBREG_NEWLINE\fP
+全ての文字にマッチするオペレータに改行をマッチさせない。
+.IP
+A nonmatching list (\fB[\(ha...]\fP)  not containing a newline does not match a
+newline.
+.IP
+Match\-beginning\-of\-line operator (\fB\(ha\fP)  matches the empty string
+immediately after a newline, regardless of whether \fIeflags\fP, the execution
+flags of \fBregexec\fP(), contains \fBREG_NOTBOL\fP.
+.IP
+\fIeflags\fP に \fBREG_NOTEOL\fP を含むかどうかにかかわらず、行末にマッチするオペレータ (\fB$\fP)
+を改行直前の空文字列にマッチさせる。
+.SS "POSIX regex マッチング"
+\fBregexec\fP()  is used to match a null\-terminated string against the
+precompiled pattern buffer, \fIpreg\fP.  \fInmatch\fP and \fIpmatch\fP are used to
+provide information regarding the location of any matches.  \fIeflags\fP is the
+bitwise\-\fBor\fP of zero or more of the following flags:
+.TP 
+\fBREG_NOTBOL\fP
+行頭にマッチするオペレータは、必ずマッチに失敗する (コンパイル時のフラグ \fBREG_NEWLINE\fP の項目も参照)。
+このフラグは、複数行にまたがる文字列を \fBregexec\fP()  で検索する際に、文字列の先頭を行の先頭として解釈させない場合に用いる。
+.TP 
+\fBREG_NOTEOL\fP
+行末にマッチするオペレータは、必ずマッチに失敗する (コンパイル時のフラグ \fBREG_NEWLINE\fP の項目も参照)。
+.TP 
+\fBREG_STARTEND\fP
+Use \fIpmatch[0]\fP on the input string, starting at byte \fIpmatch[0].rm_so\fP
+and ending before byte \fIpmatch[0].rm_eo\fP.  This allows matching embedded
+NUL bytes and avoids a \fBstrlen\fP(3)  on large strings.  It does not use
+\fInmatch\fP on input, and does not change \fBREG_NOTBOL\fP or \fBREG_NEWLINE\fP
+processing.  This flag is a BSD extension, not present in POSIX.
+.SS バイトオフセット
+パターンバッファーのコンパイル時に \fBREG_NOSUB\fP が設定されない場合は、マッチング位置情報を得ることができる。 \fIpmatch\fP
+は、少なくとも \fInmatch\fP の大きさを持つように指定しなければならない。 \fBregexec\fP()
+の実行によって、それらに部分文字列マッチング位置情報が代入される。 \fIi\fP 番目の括弧で始まる部分正規表現のオフセットは \fIpmatch[i]\fP
+に格納される。正規表現全体のマッチアドレスは \fIpmatch[0]\fP に格納される。 (\fIN\fP 個の部分正規表現のマッチのオフセットを返すためには、
+\fInmatch\fP は最低限 \fIN+1\fP でなければならない点に注意すること。) 未使用の構造体要素には \-1 が値として代入される。
+.PP
+\fIpmatch\fP の型である \fIregmatch_t\fP 構造体は、 \fI<regex.h>\fP 内で定義される。
+.PP
+.in +4n
+.EX
+typedef struct {
+    regoff_t rm_so;
+    regoff_t rm_eo;
+} regmatch_t;
+.EE
+.in
+.PP
+構造体要素 \fIrm_so\fP の値が \-1 でない場合、それは文字列内での次の最大のマッチング部分の開始 オフセット位置を示す。それに対し、構造体要素
+\fIrm_eo\fP はマッチング部分の終了オフセット位置を示し、 マッチング部分の直後の文字のオフセット位置が使用される。
+.SS "POSIX エラーレポート"
+\fBregerror\fP()  は、 \fBregcomp\fP()  と \fBregexec\fP()
+の実行によって得られるエラーコードから、エラーメッセージ文字列を 得るのに用いられる。
+.PP
+\fBregerror\fP()  はエラーコード \fIerrcode\fP、 パターンバッファー \fIpreg\fP、 文字列バッファーへのポインター
+\fIerrbuf\fP、 文字列バッファーのサイズ \fIerrbuf_size\fP を引数にとる。
+この関数は、ヌル文字で終端されたエラーメッセージ文字列を格納するのに必要な \fIerrbuf\fP のサイズを返す。もし \fIerrbuf\fP と
+\fIerrbuf_size\fP の両方が非 0 値であれば、 \fIerrbuf\fP には最初の \fIerrbuf_size \- 1\fP
+文字分にエラーメッセージと終端のヌルバイト (\(aq\e0\(aq)  が収まるように代入される。
+.SS "POSIX パターンバッファー解放"
+引数にコンパイルされたパターンバッファー \fIpreg\fP を与えて \fBregfree\fP()  を呼び出すと、 \fBregcomp\fP()
+によるコンパイル時にパターンバッファーに割り当てられたメモリーが解放される。
+.SH 返り値
+\fBregcomp\fP()  は、コンパイルの成功時には 0 を返し、失敗時にはエラーコードを返す。
+.PP
+\fBregexec\fP()  は、マッチングの成功時には 0 を返し、失敗時には \fBREG_NOMATCH\fP を返す。
+.SH エラー
+\fBregcomp\fP()  は以下のエラーを返す。
+.TP 
+\fBREG_BADBR\fP
+無効な後方参照オペレータの使用。
+.TP 
+\fBREG_BADPAT\fP
+グループやリストなどの、パターンオペレータの無効な使用。
+.TP 
+\fBREG_BADRPT\fP
+\(aq*\(aq が最初の文字としてくるような、無効な繰り返しオペレータの使用。
+.TP 
+\fBREG_EBRACE\fP
+インターバルオペレータ \fB{}\fP (brace interval operators) が閉じていない。
+.TP 
+\fBREG_EBRACK\fP
+リストオペレータ \fB[]\fP (bracket list operators) が閉じていない。
+.TP 
+\fBREG_ECOLLATE\fP
+照合順序の要素 (collating element) として有効ではない。 (訳注) 詳細は \fBregex\fP(7)  を参照。
+.TP 
+\fBREG_ECTYPE\fP
+未知のキャラクタークラス名。
+.TP 
+\fBREG_EEND\fP
+未定義エラー。これは POSIX.2 には定義されていない。
+.TP 
+\fBREG_EESCAPE\fP
+正規表現がバックスラッシュで終っている。
+.TP 
+\fBREG_EPAREN\fP
+グループオペレータ \fB()\fP (parenthesis group operators) が閉じていない。
+.TP 
+\fBREG_ERANGE\fP
+無効な範囲オペレータの使用。 例えば、範囲の終了位置が開始位置よりも前にあるような場合。
+.TP 
+\fBREG_ESIZE\fP
+Compiled regular expression requires a pattern buffer larger than 64\ kB.
+This is not defined by POSIX.2.
+.TP 
+\fBREG_ESPACE\fP
+regex ルーチンがメモリーを使いはたしている。
+.TP 
+\fBREG_ESUBREG\fP
+サブエクスプレッション \e\fB(...\e\fP)  (subexpression) への無効な後方参照。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw20 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBregcomp\fP(),
+\fBregexec\fP()
+T}     Thread safety   MT\-Safe locale
+T{
+\fBregerror\fP()
+T}     Thread safety   MT\-Safe env
+T{
+\fBregfree\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH EXAMPLES
+.EX
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <regex.h>
+
+#define ARRAY_SIZE(arr) (sizeof((arr)) / sizeof((arr)[0]))
+
+static const char *const str =
+        "1) John Driverhacker;\en2) John Doe;\en3) John Foo;\en";
+static const char *const re = "John.*o";
+
+int main(void)
+{
+    static const char *s = str;
+    regex_t     regex;
+    regmatch_t  pmatch[1];
+    regoff_t    off, len;
+
+    if (regcomp(&regex, re, REG_NEWLINE))
+        exit(EXIT_FAILURE);
+
+    printf("String = \e"%s\e"\en", str);
+    printf("Matches:\en");
+
+    for (int i = 0; ; i++) {
+        if (regexec(&regex, s, ARRAY_SIZE(pmatch), pmatch, 0))
+            break;
+
+        off = pmatch[0].rm_so + (s \- str);
+        len = pmatch[0].rm_eo \- pmatch[0].rm_so;
+        printf("#%d:\en", i);
+        printf("offset = %jd; length = %jd\en", (intmax_t) off,
+                (intmax_t) len);
+        printf("substring = \e"%.*s\e"\en", len, s + pmatch[0].rm_so);
+
+        s += pmatch[0].rm_eo;
+    }
+
+    exit(EXIT_SUCCESS);
+}
+.EE
+.SH 関連項目
+\fBgrep\fP(1), \fBregex\fP(7)
+.PP
+The glibc manual section, \fIRegular Expressions\fP
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/remquo.3 b/manual/LDP_man-pages/draft/man3/remquo.3
new file mode 100644 (file)
index 0000000..3cd25cd
--- /dev/null
@@ -0,0 +1,106 @@
+.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
+.\" Distributed under GPL
+.\" %%%LICENSE_END
+.\"
+.\" based on glibc infopages
+.\" polished, aeb
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2005 Yuichi SATO
+.\" and Copyright (c) 2008 Akihiro MOTOKI
+.\" Translated Tue Feb  1 06:39:08 JST 2005
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH REMQUO 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+remquo, remquof, remquol \- 商の一部と剰余を求める
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBdouble remquo(double \fP\fIx\fP\fB, double \fP\fIy\fP\fB, int *\fP\fIquo\fP\fB);\fP
+\fBfloat remquof(float \fP\fIx\fP\fB, float \fP\fIy\fP\fB, int *\fP\fIquo\fP\fB);\fP
+\fBlong double remquol(long double \fP\fIx\fP\fB, long double \fP\fIy\fP\fB, int *\fP\fIquo\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBremquo\fP(), \fBremquof\fP(), \fBremquol\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+.RE
+.ad
+.SH 説明
+これらの関数は \fIx\fP を \fIy\fP で割ったときの商の一部と剰余を計算する。 商のいくつかのビットが \fIquo\fP ポインターを使って格納される。
+剰余は関数の結果として返される。
+.PP
+剰余の値は \fBremainder\fP(3)  関数で計算されるものと同じである。
+.PP
+\fIquo\fP ポインターを使って格納される値には、 \fIx\ /\ y\fP の符号と最低でも商の下位 3 ビットが含まれる。
+.PP
+.\" A possible application of this function might be the computation
+.\" of sin(x). Compute remquo(x, pi/2, &quo) or so.
+.\"
+.\" glibc, UnixWare: return 3 bits
+.\" MacOS 10: return 7 bits
+たとえば \fIremquo(29.0,\ 3.0)\fP は \-1.0 を返し、 (訳注: quo の指しているものには) 2 が格納される。
+実際の商が整数値にならない点に注意すること。
+.SH 返り値
+成功すると、これらの関数は \fBremainder\fP(3)  に書かれている同様の関数と同じ値を返す。
+.PP
+\fIx\fP か \fIy\fP が NaN の場合、NaN が返される。
+.PP
+\fIx\fP が無限大で \fIy\fP が NaN でない場合、 領域エラー (domain error) が発生し、NaN が返される。
+.PP
+\fIy\fP がゼロで \fIx\fP が NaN でない場合、 領域エラー (domain error) が発生し、NaN が返される。
+.SH エラー
+これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
+.PP
+以下のエラーが発生する可能性がある。
+.TP 
+領域エラー (domain error): \fIx\fP が無限大か \fIy\fP が 0 で、 他の引き数が NaN でない
+.\" .I errno
+.\" is set to
+.\" .BR EDOM .
+不正 (invalid) 浮動小数点例外 (\fBFE_INVALID\fP)  が上がる。
+.PP
+.\" FIXME . Is it intentional that these functions do not set errno?
+.\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6802
+これらの関数は \fIerrno\fP を設定しない。
+.SH バージョン
+これらの関数は glibc バージョン 2.1 で初めて登場した。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw30 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBremquo\fP(),
+\fBremquof\fP(),
+\fBremquol\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.SH 関連項目
+\fBfmod\fP(3), \fBlogb\fP(3), \fBremainder\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/rewinddir.3 b/manual/LDP_man-pages/draft/man3/rewinddir.3
new file mode 100644 (file)
index 0000000..f9f3a88
--- /dev/null
@@ -0,0 +1,75 @@
+.\" Copyright (C) 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified Sat Jul 24 18:29:11 1993 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 11 June 1995 by Andries Brouwer (aeb@cwi.nl)
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
+.\"    all rights reserved.
+.\" Translated Wed Dec 24 12:34:00 JST 1997
+.\"    by HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
+.\"
+.TH REWINDDIR 3 2015\-08\-08 "" "Linux Programmer's Manual"
+.SH 名前
+rewinddir \- ディレクトリストリームの初期化
+.SH 書式
+.nf
+\fB#include <sys/types.h>\fP
+.PP
+\fB#include <dirent.h>\fP
+.PP
+\fBvoid rewinddir(DIR *\fP\fIdirp\fP\fB);\fP
+.fi
+.SH 説明
+\fBrewinddir\fP()  関数は、ディレクトリストリーム \fIdirp\fP の位置を ディレクトリの先頭に初期化する。
+.SH 返り値
+\fBrewinddir\fP()  関数は、値を返さない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBrewinddir\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, SVr4, 4.3BSD.
+.SH 関連項目
+\fBclosedir\fP(3), \fBopendir\fP(3), \fBreaddir\fP(3), \fBscandir\fP(3), \fBseekdir\fP(3),
+\fBtelldir\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/round.3 b/manual/LDP_man-pages/draft/man3/round.3
new file mode 100644 (file)
index 0000000..d05eb87
--- /dev/null
@@ -0,0 +1,107 @@
+.\" Copyright 2001 Andries Brouwer <aeb@cwi.nl>.
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2001, 2005 Yuichi SATO
+.\" and Copyright (c) 2008 Akihiro MOTOKI
+.\" Translated Fri Jul 13 20:33:41 JST 2001
+.\"         by Yuichi SATO <ysato@h4.dion.ne.jp>
+.\" Updated & Modified Sun Jan 16 07:59:12 JST 2005
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH ROUND 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+round, roundf, roundl \- 最も近い整数値に丸める (2 つの整数の中間値の場合は 0 から遠い方に丸める)
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBdouble round(double \fP\fIx\fP\fB);\fP
+\fBfloat roundf(float \fP\fIx\fP\fB);\fP
+\fBlong double roundl(long double \fP\fIx\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBround\fP(), \fBroundf\fP(), \fBroundl\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+.RE
+.ad
+.SH 説明
+これらの関数は \fIx\fP を最も近い整数値に丸める。 2 つの整数の中間値の場合は、 \fBrint\fP(3)  のように最も近い偶数に丸めたりせずに、
+(現在の丸め方向に関係なく) 0 から遠い方に丸める (丸め方向については \fBfenv\fP(3)  を参照)。
+.PP
+例えば、 \fIround(0.5)\fP は 1.0 で、 \fIround(\-0.5)\fP は \-1.0 である。
+.SH 返り値
+これらの関数は丸めた整数値を返す。
+.PP
+\fIx\fP が整数、+0、\-0、NaN、無限のいずれかの場合、 \fIx\fP そのものが返される。
+.SH エラー
+エラーは発生しない。 POSIX.1\-2001 にはオーバーフローでの範囲エラー (range error) の 記載がある。「注意」の節を参照のこと。
+.SH バージョン
+これらの関数は glibc バージョン 2.1 で初めて登場した。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw27 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBround\fP(),
+\fBroundf\fP(),
+\fBroundl\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+.\" The POSIX.1-2001 APPLICATION USAGE SECTION discusses this point.
+POSIX.1\-2001 にはオーバーフローに関する記述があり、 オーバーフローの場合には、 \fIerrno\fP を \fBERANGE\fP に設定するか、
+\fBFE_OVERFLOW\fP 例外を発生することとされている。 実際のところ、どの現行のマシンでは結果がオーバーフローを起こすことはないので、
+このエラー処理は意味がない。 (より正確に言うと、オーバーフローは指数部の最大値が 仮数部を表すビットの数より小さい場合にしか起こらない。
+IEEE\-754 規格の 32 ビットと 64 ビットの浮動小数では、 指数部の最大値はそれぞれ 128 と 1024 であり、
+仮数部のビット数はそれぞれ 24 と 53 である。)
+.PP
+丸めた値を整数型に格納した場合には、おそらくこの関数ではなく \fBlround\fP(3)  に載っている関数のどれかを使いたいのだろう。
+.SH 関連項目
+\fBceil\fP(3), \fBfloor\fP(3), \fBlround\fP(3), \fBnearbyint\fP(3), \fBrint\fP(3),
+\fBtrunc\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/rpc.3 b/manual/LDP_man-pages/draft/man3/rpc.3
new file mode 100644 (file)
index 0000000..9ecf3cd
--- /dev/null
@@ -0,0 +1,810 @@
+.\" This page was taken from the 4.4BSD-Lite CDROM (BSD license)
+.\"
+.\" %%%LICENSE_START(BSD_ONELINE_CDROM)
+.\" This page was taken from the 4.4BSD-Lite CDROM (BSD license)
+.\" %%%LICENSE_END
+.\"
+.\" @(#)rpc.3n 2.4 88/08/08 4.0 RPCSRC; from 1.19 88/06/24 SMI
+.\"
+.\" 2007-12-30, mtk, Convert function prototypes to modern C syntax
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1999 HANATAKA Shinya
+.\"         all rights reserved.
+.\" Translated Tue Jan  4 20:48:23 JST 2000
+.\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
+.\" Updated & Modified Sun Oct 21 01:07:09 JST 2001
+.\"         by Yuichi SATO <ysato@h4.dion.ne.jp>
+.\"
+.TH RPC 3 2020\-11\-01 "" "Linux Programmer's Manual"
+.SH 名前
+rpc \- 遠隔手続き呼び出し(RPC)のためのライブラリルーティン
+.SH 書式と説明
+.\" .LP
+.\" We don't have an rpc_secure.3 page at the moment -- MTK, 19 Sep 05
+.\" Routines that are used for Secure RPC (DES authentication) are described in
+.\" .BR rpc_secure (3).
+.\" Secure RPC can be used only if DES encryption is available.
+これらのルーティンは C プログラムでネットワークを通して 他のマシンにアクセスするプロシージャーを作成することを可能にする。
+最初にクライアントはデータパケットをサーバに送るために プロシージャーを呼び出す。 サーバはパケットを受け取ると、配分ルーチンを呼び出して
+要求されたサービスに実行し、返答を送り返す。 最後にプロシージャーコールはクライアントへと戻る。
+.PP
+これらのルーティンを使用するには、ヘッダーファイル \fI<rpc/rpc.h>\fP をインクルードすること。
+
+下記のプロトタイプでは次の型を使用している。
+.PP
+.RS 4
+.EX
+\fBtypedef int \fP\fIbool_t\fP\fB;\fP
+.PP
+\fBtypedef bool_t (*\fP\fIxdrproc_t\fP\fB) (XDR *, void *, ...);\fP
+.PP
+\fBtypedef bool_t (*\fP\fIresultproc_t\fP\fB) (caddr_t \fP\fIresp\fP\fB,\fP
+\fB                                struct sockaddr_in *\fP\fIraddr\fP\fB);\fP
+.EE
+.RE
+.PP
+型 \fIAUTH\fP, \fICLIENT\fP, \fISVCXPRT\fP, \fIXDR\fP の宣言についてはヘッダーファイルを参照。
+.PP
+.nf
+\fBvoid auth_destroy(AUTH *\fP\fIauth\fP\fB);\fP
+.fi
+.IP
+このマクロは \fIauth\fP に関連付けられた認証情報を破壊する。破壊は通常は私的なデータ構造の 破棄を含んでいる。 \fBauth_destroy\fP()
+を呼び出した後に \fIauth\fP を使用することは未定義である。
+.PP
+.nf
+\fBAUTH *authnone_create(void);\fP
+.fi
+.IP
+各リモートプロシージャーコールで使用できない仮の認証情報として渡される RPC 認証ハンドルを作成して返す。 これは RPC
+で使用されるデフォルトの認証である。
+.PP
+.nf
+\fBAUTH *authunix_create(char *\fP\fIhost\fP\fB, int \fP\fIuid\fP\fB, int \fP\fIgid\fP\fB,\fP
+\fB                      int \fP\fIlen\fP\fB, int *\fP\fIaup_gids\fP\fB);\fP
+.fi
+.IP
+認証情報を含んだ RPC 認証ハンドルを作成して返す。 \fIhost\fP パラメーターは情報が作成されたマシンの名前である。 \fIuid\fP
+はそのユーザーのユーザー
+.SM ID
+、 \fIgid\fP はそのユーザーの現在のグループ
+.SM ID
+である。 \fIlen\fP と
+\fIaup_gids\fP はそのユーザーが所属するグループの配列を参照している。 他のユーザーになりすますことは簡単である。
+.PP
+.nf
+\fBAUTH *authunix_create_default(void);\fP
+.fi
+.IP
+適切なパラメーターで \fBauthunix_create\fP()  を呼び出す。
+.PP
+.nf
+\fBint callrpc(char *\fP\fIhost\fP\fB, unsigned long \fP\fIprognum\fP\fB,\fP
+\fB            unsigned long \fP\fIversnum\fP\fB, unsigned long \fP\fIprocnum\fP\fB,\fP
+\fB            xdrproc_t \fP\fIinproc\fP\fB, char *\fP\fIin\fP\fB,\fP
+\fB            xdrproc_t \fP\fIoutproc\fP\fB, char *\fP\fIout\fP\fB);\fP
+.fi
+.IP
+マシン \fIhost\fP 上で \fIprognum\fP, \fIversnum\fP, \fIprocnum\fP に関連付けられたリモートプロシージャーを呼び出す。
+パラメーター \fIin\fP はプロシージャーの引き数のアドレスであり \fIout\fP は結果を格納するアドレスである。 \fIinproc\fP
+はプロシージャーのパラメーターをエンコードするのに使用され、 \fIoutproc\fP は結果をデコードするのに使用される。
+このルーティンは成功した場合にはゼロを返す。失敗した場合には \fBenum clnt_stat\fP を整数にキャストした値を返す。
+\fBclnt_perrno\fP()  ルーティンが失敗の状態をメッセージに変換するのに使用できる。
+.IP
+警告: このルーティンでリモートプロシージャーを呼び出すと通信には UDP/IP が使用される。この際の制限については
+\fBclntudp_create\fP()  を参照すること。このルーティンを使用して認証や時間切れの制御を することはできない。
+.PP
+.nf
+\fBenum clnt_stat clnt_broadcast(unsigned long \fP\fIprognum\fP\fB,\fP
+\fB                     unsigned long \fP\fIversnum\fP\fB, unsigned long \fP\fIprocnum\fP\fB,\fP
+\fB                     xdrproc_t \fP\fIinproc\fP\fB, char *\fP\fIin\fP\fB,\fP
+\fB                     xdrproc_t \fP\fIoutproc\fP\fB, char *\fP\fIout\fP\fB,\fP
+\fB                     resultproc_t \fP\fIeachresult\fP\fB);\fP
+.fi
+.IP
+\fBcallrpc\fP()  と同様であるが、メッセージがローカルのブロードキャストネットワーク
+全体へとブロードキャストされる点が異っている。回答を受け取る度に このルーティンは以下の形式の \fBeachresult\fP()  を呼び出す。
+.IP
+.in +4n
+.EX
+\fBeachresult(char *\fP\fIout\fP\fB, struct sockaddr_in *\fP\fIaddr\fP\fB);\fP
+.EE
+.in
+.IP
+ここで \fIout\fP は \fBclnt_broadcast\fP()  に渡される \fIout\fP
+と同じであるが、リモートプロシージャーからの出力がデコードされている 点のみが異っている。 \fIaddr\fP
+は結果を送って来たマシンのアドレスを指している。 \fBeachresult\fP()  がゼロを返した場合、 \fBclnt_broadcast\fP()
+はさらなる回答を待つ。そうでなければ適切な状態で終了する。
+.IP
+警告: ブロードキャストソケットはデータリンク層の最大転送単位に 制限されている。イーサネットの場合、最大値は 1500 バイトである。
+.PP
+.nf
+\fBenum clnt_stat clnt_call(CLIENT *\fP\fIclnt\fP\fB, unsigned long \fP\fIprocnum\fP\fB,\fP
+\fB                    xdrproc_t \fP\fIinproc\fP\fB, char *\fP\fIin\fP\fB,\fP
+\fB                    xdrproc_t \fP\fIoutproc\fP\fB, char *\fP\fIout\fP\fB,\fP
+\fB                    struct timeval \fP\fItout\fP\fB);\fP
+.fi
+.IP
+このマクロはクライアントハンドル \fIclnt\fP に関連付けられた \fIprocnum\fP リモートプロシージャーを呼び出す。 クライアントハンドルは
+\fBclnt_create\fP()  のような
+.SM RPC
+クライアント作成ルーティンによって得られる。 パタメータ \fIin\fP
+はプロシージャーの引き数のアドレスである。 \fIout\fP はプロシージャーの返り値を格納するアドレスである。 \fIinproc\fP
+はプロシージャーのパラメーターをエンコードするのに使用される。 \fIoutproc\fP はプロシージャーの返り値をデコードするのに使用される。
+\fItout\fP は結果が返されるのを待つ時間である。
+.PP
+.nf
+\fBclnt_destroy(CLIENT *\fP\fIclnt\fP\fB);\fP
+.fi
+.IP
+このマクロはクライアントの RPC ハンドルを破壊する。破壊には通常は \fIclnt\fP 自身も含めて私的なデータ構造体の破棄が含まれている。
+\fBclnt_destroy\fP()  の呼び出しの後に \fIclnt\fP を使用することは未定義である。 RPC
+ライブラリが関連するソケットをオープンした場合には、 それも閉じられる。それ以外の場合にはソケットはオープンされたままである。
+.PP
+.nf
+\fBCLIENT *clnt_create(char *\fP\fIhost\fP\fB, unsigned long \fP\fIprog\fP\fB,\fP
+\fB                    unsigned long \fP\fIvers\fP\fB, char *\fP\fIproto\fP\fB);\fP
+.fi
+.IP
+一般的なクライアントの作成ルーティンである。 \fIhost\fP はサーバのあるリモートホストの名前を指定する。 \fIproto\fP
+どのような通信プロトコルを使用するかを指定する。現在ここに 使用できる値は \(lqudp\(rq と \(lqtcp\(rq である。
+デフォルトの時間切れが設定されるが、 \fBclnt_control\fP()  を使用して変更可能である。
+.IP
+Warning: using UDP has its shortcomings.  Since UDP\-based RPC messages can
+hold only up to 8 Kbytes of encoded data, this transport cannot be used for
+procedures that take large arguments or return huge results.
+.PP
+.nf
+\fBbool_t clnt_control(CLIENT *\fP\fIcl\fP\fB, int \fP\fIreq\fP\fB, char *\fP\fIinfo\fP\fB);\fP
+.fi
+.IP
+このマクロは各種クライアントについて情報を変更したり、取得したり するのに使用する。 \fIreq\fP は操作の種類を指定する。 \fIinfo\fP
+は情報へのポインターである。 UDP と TCP どちらの場合も使用可能な \fIreq\fP の値と、その引き数の型、およびその内容は以下の通りである:
+.IP
+.in +4n
+.EX
+\fBCLSET_TIMEOUT\fP  \fIstruct timeval\fP // 時間切れを設定する
+\fBCLGET_TIMEOUT\fP  \fIstruct timeval\fP // 時間切れを取得する
+.EE
+.in
+.IP
+注意: \fBclnt_control\fP()  を使用して時間切れを設定した場合にはそれ以後は \fBclnt_call\fP()
+に渡される時間切れパラメーターは全て無視される。
+.IP
+.in +4n
+.EX
+\fBCLGET_SERVER_ADDR\fP  \fIstruct sockaddr_in \fP // get server\(aqs address
+.EE
+.in
+.IP
+以下の操作は UDP の場合にのみ有効である:
+.IP
+.in +4n
+.EX
+\fBCLSET_RETRY_TIMEOUT\fP  \fIstruct timeval\fP // 再送間隔を設定する
+\fBCLGET_RETRY_TIMEOUT\fP  \fIstruct timeval\fP // 再送間隔を取得する
+.EE
+.in
+.IP
+再送間隔は次に要求を再送する前に "UDP RPC" がサーバの回答を待つ時間である。
+.PP
+.nf
+\fBclnt_freeres(CLIENT * \fP\fIclnt\fP\fB, xdrproc_t \fP\fIoutproc\fP\fB, char *\fP\fIout\fP\fB);\fP
+.fi
+.IP
+このマクロは RPC 呼び出しの結果のデコードの際に RPC/XDR システムによって割当てられたデータを解放する。 パラメーター \fIout\fP
+は結果のアドレスである。 \fIoutproc\fP は結果を記述している XDR ルーティンである。 このルーティンは結果の解放に成功した場合には 1
+を返す。 失敗した場合にはゼロを返す。
+.PP
+.nf
+\fBvoid clnt_geterr(CLIENT *\fP\fIclnt\fP\fB, struct rpc_err *\fP\fIerrp\fP\fB);\fP
+.fi
+.IP
+このマクロはクライアントハンドルのエラー構造体を \fIerrp\fP アドレスで指定された構造体へコピーする。
+.PP
+.nf
+\fBvoid clnt_pcreateerror(char *\fP\fIs\fP\fB);\fP
+.fi
+.IP
+標準エラー出力に、なぜクライアント RPC ハンドルの作成が できなかったかについてのメッセージを表示する。 メッセージの前に文字列 \fIs\fP
+とコロン(:)が表示される。 \fBclnt_create\fP(), \fBclntraw_create\fP(), \fBclnttcp_create\fP(),
+\fBclntudp_create\fP()  の呼び出しが失敗した時に使用すること。
+.PP
+.nf
+\fBvoid clnt_perrno(enum clnt_stat \fP\fIstat\fP\fB);\fP
+.fi
+.IP
+標準エラー出力に \fIstat\fP によって指示されるエラー状態に対応するメッセージを表示する。 \fBcallrpc\fP()  の後に使用すること。
+.PP
+.nf
+\fBclnt_perror(CLIENT *\fP\fIclnt\fP\fB, char *\fP\fIs\fP\fB);\fP
+.fi
+.IP
+標準エラー出力に、なぜ RPC 呼び出しが失敗したかについてのメッセージを表示する。 \fIclnt\fP はコールに使用したハンドルである。
+メッセージの前に文字列 \fIs\fP とコロン(:)が表示される。 \fBclnt_call\fP()  が失敗した後に使用すること。
+.PP
+.nf
+\fBchar *clnt_spcreateerror(char *\fP\fIs\fP\fB);\fP
+.fi
+.IP
+\fBclnt_pcreateerror\fP()  と同様であるが、標準エラー出力へ表示するかわりに文字列を返す点が異っている。
+.IP
+バグ: 静的な領域へのポインターを返すため、呼び出しごとに上書きされる。
+.PP
+.nf
+\fBchar *clnt_sperrno(enum clnt_stat \fP\fIstat\fP\fB);\fP
+.fi
+.IP
+\fBclnt_perrno\fP()  と同じ引き数を取るが、なぜ RPC 呼び出しが失敗したかについてのメッセージを標準エラー出力に表示する
+かわりに、メッセージを格納している文字列へのポインターを返す。 文字列は NEWLINE(改行) で終っている。
+.IP
+\fBclnt_sperrno\fP()  is used instead of \fBclnt_perrno\fP()  if the program does
+not have a standard error (as a program running as a server quite likely
+does not), or if the programmer does not want the message to be output with
+\fBprintf\fP(3), or if a message format different than that supported by
+\fBclnt_perrno\fP()  is to be used.  Note: unlike \fBclnt_sperror\fP()  and
+\fBclnt_spcreateerror\fP(), \fBclnt_sperrno\fP()  returns pointer to static data,
+but the result will not get overwritten on each call.
+.PP
+.nf
+\fBchar *clnt_sperror(CLIENT *\fP\fIrpch\fP\fB, char *\fP\fIs\fP\fB);\fP
+.fi
+.IP
+\fBclnt_perror\fP()  と同様であるが、標準エラー出力に表示する代りに (\fBclnt_sperrno\fP()  のように)
+文字列へのポインターを返す点が異っている。
+.IP
+バグ: 静的な領域へのポインターを返すため、呼び出しごとに上書きされる。
+.PP
+.nf
+\fBCLIENT *clntraw_create(unsigned long \fP\fIprognum\fP\fB, unsigned long \fP\fIversnum\fP\fB);\fP
+.fi
+.IP
+このルーティンはリモートプログラム \fIprognum\fP、 バージョン \fIversnum\fP のための擬似 RPC
+クライアントを作成する。メッセージをサービスに渡すために使用する 通信は実際にはそのプロセスのアドレス空間にあるバッファーである。 それで、対応する
+RPC サーバが同じアドレス空間の中にいなければならない。 \fBsvcraw_create\fP()  を参照すること。 これにより RPC
+のシミュレーションや、カーネルインターフェースに影響されずに 応答時間などの RPC オーバヘッドの獲得ができる。 失敗した場合にはこのルーティンは
+NULL を返す。
+.PP
+.nf
+\fBCLIENT *clnttcp_create(struct sockaddr_in *\fP\fIaddr\fP\fB,\fP
+\fB                unsigned long \fP\fIprognum\fP\fB, unsigned long \fP\fIversnum\fP\fB,\fP
+\fB                int *\fP\fIsockp\fP\fB, unsigned int \fP\fIsendsz\fP\fB, unsigned int \fP\fIrecvsz\fP\fB);\fP
+.fi
+.IP
+.\"The following inline font conversion is necessary for the hyphen indicator
+このルーティンはリモートプログラム \fIprognum\fP、 バージョン \fIversnum\fP のための RPC
+クライアントを作成する。クライアントは通信に TCP/IP を使用する。リモートプログラムはインターネットアドレスの \fI*addr\fP にある。
+\fIaddr\->sin_port\fP がゼロならば、実際にリモートプログラムが listen
+しているポートが設定される。(この情報のためにリモートの \fBportmap\fP サービスが利用される。) パラメーター \fIsockp\fP
+はソケットである。もしこれが \fBRPC_ANYSOCK\fP に設定されている場合は、このルーティンが新しいソケットをオープンして \fIsockp\fP
+に設定する。 TCP に基づいた RPC はバッファーされた I/O を使用するため、ユーザーはパラメーター \fIsendsz\fP と \fIrecvsz\fP
+を使用して送信バッファーと受信バッファーのサイズを指定することができる。 ゼロを指定した場合には適切なデフォルトが選択される。
+このルーティンは失敗した場合は NULL を返す。
+.PP
+.nf
+\fBCLIENT *clntudp_create(struct sockaddr_in *\fP\fIaddr\fP\fB,\fP
+\fB                unsigned long \fP\fIprognum\fP\fB, unsigned long \fP\fIversnum\fP\fB,\fP
+\fB                struct timeval \fP\fIwait\fP\fB, int *\fP\fIsockp\fP\fB);\fP
+.fi
+.IP
+このルーティンはリモートプログラム \fIprognum\fP、 バージョン \fIversnum\fP のための RPC
+クライアントを作成する。クライアントは通信に UDP/IP を使用する。リモートプログラムはインターネットアドレスの \fI*addr\fP にある。
+\fIaddr\->sin_port\fP がゼロならば、実際にリモートプログラムが listen
+しているポートが設定される。(この情報のためにリモートの \fBportmap\fP サービスが利用される。) パラメーター \fIsockp\fP
+はソケットである。もしこれが \fBRPC_ANYSOCK\fP に設定されている場合は、このルーティンが新しいソケットをオープンして \fIsockp\fP
+に設定する。 UDP 通信は回答があるか、時間切れが起こるまで \fBwait\fP 間隔で呼び出しメッセージを再送する。時間切れが起こるまでの合計時間は
+\fBclnt_call\fP()  で指定する。
+.IP
+警告: UDP に基づいた RPC メッセージは最大でも 8 Kbyte までのエンコードされたデータしか
+保持できないため、この通信は大きな引き数や巨大な結果を取る プロシージャーには使用できない。
+.PP
+.nf
+\fBCLIENT *clntudp_bufcreate(struct sockaddr_in *\fP\fIaddr\fP\fB,\fP
+\fB            unsigned long \fP\fIprognum\fP\fB, unsigned long \fP\fIversnum\fP\fB,\fP
+\fB            struct timeval \fP\fIwait\fP\fB, int *\fP\fIsockp\fP\fB,\fP
+\fB            unsigned int \fP\fIsendsize\fP\fB, unsigned int \fP\fIrecosize\fP\fB);\fP
+.fi
+.IP
+このルーティンはリモートプログラム \fIprognum\fP、 バージョン \fIversnum\fP のための RPC
+クライアントを作成する。クライアントは通信に UDP/IP を使用する。リモートプログラムはインターネットアドレスの \fI*addr\fP にある。
+\fIaddr\->sin_port\fP がゼロならば、実際にリモートプログラムが listen
+しているポートが設定される。(この情報のためにリモートの \fBportmap\fP サービスが利用される。) パラメーター \fIsockp\fP
+はソケットである。もしこれが \fBRPC_ANYSOCK\fP に設定されている場合は、このルーティンが新しいソケットをオープンして \fIsockp\fP
+に設定する。 UDP 通信は回答があるか、時間切れが起こるまで \fBwait\fP 間隔で呼び出しメッセージを再送する。時間切れが起こるまでの合計時間は
+\fBclnt_call\fP()  で指定する。
+.IP
+これを使用すると UDP に基づいた RPC メッセージにおいて送信パケットや 受信パケットの最大サイズを指定することが可能になる。
+.PP
+.nf
+\fBvoid get_myaddress(struct sockaddr_in *\fP\fIaddr\fP\fB);\fP
+.fi
+.IP
+このマシンの IP アドレスを \fI*addr\fP に格納する。 \fI/etc/hosts\fP を扱うライブラリルーティンは使用しない。ポート番号は常に
+\fBhtons(PMAPPORT)\fP に設定される。
+.PP
+.nf
+\fBstruct pmaplist *pmap_getmaps(struct sockaddr_in *\fP\fIaddr\fP\fB);\fP
+.fi
+.IP
+\fBportmap\fP サービスのためのユーザーインターフェースであり、 IP アドレス \fI*addr\fP にあるホストの現在の RPC
+プログラムからポート番号へのマッピングの一覧を返す。 このルーティンが NULL を返す場合もある。 `\fBrpcinfo \-p\fP'
+コマンドはこのルーティンを使用している。
+.PP
+.nf
+\fBunsigned short pmap_getport(struct sockaddr_in *\fP\fIaddr\fP\fB,\fP
+\fB                    unsigned long \fP\fIprognum\fP\fB, unsigned long \fP\fIversnum\fP\fB,\fP
+\fB                    unsigned int \fP\fIprotocol\fP\fB);\fP
+.fi
+.IP
+\fBportmap\fP サービスのためのユーザーインターフェースで、 プログラム番号 \fIprognum\fP、 バージョン \fIversnum\fP、
+関連付けられた通信プロトコル \fIprotocol\fP をサポートするサービスが待っているポート番号を返す。 \fIprotocol\fP の値はほとんどの場合
+IPPROTO_UDP か IPPROTO_TCP である。 返り値ゼロはマッピングが存在しないか、 RPC システムがリモートの \fBportmap\fP
+サービスの参照に失敗したことを意味する。後者の場合は大域変数 \fIrpc_createerr\fP が RPC 状態を保持している。
+.PP
+.nf
+\fBenum clnt_stat pmap_rmtcall(struct sockaddr_in *\fP\fIaddr\fP\fB,\fP
+\fB                    unsigned long \fP\fIprognum\fP\fB, unsigned long \fP\fIversnum\fP\fB,\fP
+\fB                    unsigned long \fP\fIprocnum\fP\fB,\fP
+\fB                    xdrproc_t \fP\fIinproc\fP\fB, char *\fP\fIin\fP\fB,\fP
+\fB                    xdrproc_t \fP\fIoutproc\fP\fB, char *\fP\fIout\fP\fB,\fP
+\fB                    struct timeval \fP\fItout\fP\fB, unsigned long *\fP\fIportp\fP\fB);\fP
+.fi
+.IP
+\fBportmap\fP サービスのためのユーザーインターフェースで、 IP アドレス \fI*addr\fP のホストの \fBportmap\fP を参照して、
+RPC 呼び出しを生成し、そのホスト上のプロシージャーを呼び出す。 パラメーター \fI*portp\fP
+はプロシージャーが成功した場合にはプログラムのポート番号に修正される。 他のパラメーターの定義については \fBcallrpc\fP()  や
+\fBclnt_call\fP()  で説明してある。 このプロシージャーは \(lqping\(rq のみに使用すべきである。
+\fBclnt_broadcast\fP()  も参照すること。
+.PP
+.nf
+\fBbool_t pmap_set(unsigned long \fP\fIprognum\fP\fB, unsigned long \fP\fIversnum\fP\fB,\fP
+\fB                unsigned int \fP\fIprotocol\fP\fB, unsigned short \fP\fIport\fP\fB);\fP
+.fi
+.IP
+\fBportmap\fP サービスのためのユーザーインターフェースで、 [\fIprognum\fP,\fIversnum\fP,\fIprotocol\fP]
+の組み合わせと \fIport\fP との間のマッピングを、そのマシン上の \fBportmap\fP サービスに登録する。 \fIprotocol\fP
+はほとんどの場合 \fBIPPROTO_UDP\fP か \fBIPPROTO_TCP\fP のどちらかである。 このルーティンは成功した場合には 1
+を返す。失敗した場合にはゼロを返す。 \fBsvc_register\fP()  によって自動的に実行される。
+.PP
+.nf
+\fBbool_t pmap_unset(unsigned long \fP\fIprognum\fP\fB, unsigned long \fP\fIversnum\fP\fB);\fP
+.fi
+.IP
+\fBportmap\fP サービスのためのユーザーインターフェースで、 [\fIprognum\fP,\fIversnum\fP,\fI*\fP] の組み合わせと
+\fBports\fP の間のマッピングをそのマシン上の \fBportmap\fP サービスから削除する。このルーティンは成功した場合は 1 を返す。
+失敗した場合には 0 を返す。
+.PP
+.nf
+\fBint registerrpc(unsigned long \fP\fIprognum\fP\fB, unsigned long \fP\fIversnum\fP\fB,\fP
+\fB                unsigned long \fP\fIprocnum\fP\fB, char *(*\fP\fIprocname\fP\fB)(char *),\fP
+\fB                xdrproc_t \fP\fIinproc\fP\fB, xdrproc_t \fP\fIoutproc\fP\fB);\fP
+.fi
+.IP
+Register procedure \fIprocname\fP with the RPC service package.  If a request
+arrives for program \fIprognum\fP, version \fIversnum\fP, and procedure
+\fIprocnum\fP, \fIprocname\fP is called with a pointer to its parameter(s);
+\fIprocname\fP should return a pointer to its static result(s); \fIinproc\fP is
+used to decode the parameters while \fIoutproc\fP is used to encode the
+results.  This routine returns zero if the registration succeeded, \-1
+otherwise.
+.IP
+警告: この形式で登録されたリモートプロシージャーは UDP/IP 通信を使用する。制限に関しては \fBsvcudp_create\fP()
+を参照すること。
+.PP
+.nf
+\fBstruct rpc_createerr \fP\fIrpc_createerr\fP\fB;\fP
+.fi
+.IP
+成功しなかった RPC クライアント生成ルーティンによって設定される大域変数。 \fBclnt_pcreateerror\fP()
+ルーティンが理由を表示するために使用する。
+.PP
+.nf
+\fBvoid svc_destroy(SVCXPRT *\fP\fIxprt\fP\fB);\fP
+.fi
+.IP
+このマクロは通信ハンドル \fIxprt\fP の RPC サービスを破壊する。破壊には通常、 \fIxprt\fP
+を含めて、私的なデータ構造体の破棄が含まれている。 このルーティンを呼び出した後に \fIxprt\fP を使用することは未定義である。
+.PP
+.nf
+\fBfd_set \fP\fIsvc_fdset\fP\fB;\fP
+.fi
+.IP
+RPC サービス側のファイルディスクリプターのビットマスクを反映した大域変数。 \fBselect\fP(2)
+システムコールのパラメーターのために利用できる。これは、サービスの実装者が \fBsvc_run\fP()
+を呼び出さずに、独自の非同期イベント処理を用いる場合にのみ意味がある。 この変数は読み込み専用で (そのまま \fBselect\fP(2)
+へ渡してはならない!)、 \fBsvc_getreqset\fP()  呼び出しや生成ルーティンの後に変更されているかもしれない。
+.PP
+.nf
+\fBint \fP\fIsvc_fds\fP\fB;\fP
+.fi
+.IP
+Similar to \fBsvc_fdset\fP, but limited to 32 file descriptors.  This interface
+is obsoleted by \fBsvc_fdset\fP.
+.PP
+.nf
+\fBsvc_freeargs(SVCXPRT *\fP\fIxprt\fP\fB, xdrproc_t \fP\fIinproc\fP\fB, char *\fP\fIin\fP\fB);\fP
+.fi
+.IP
+このマクロはサービスプロシージャーが \fBsvc_getargs\fP()  を使用して引き数をデコードした時に RPC/XDR
+システムによって割り当てられたデータを解放する。 このルーティンは解放に成功した場合には 1 を返す。 失敗した場合にはゼロを返す。
+.PP
+.nf
+\fBsvc_getargs(SVCXPRT *\fP\fIxprt\fP\fB, xdrproc_t \fP\fIinproc\fP\fB, char *\fP\fIin\fP\fB);\fP
+.fi
+.IP
+このマクロは RPC サービス通信ハンドル \fIxprt\fP に関連付けられた RPC 要求の引き数をデコードする。パラメーター \fIin\fP
+は引き数の格納されたアドレスである。 \fIinproc\fP は引き数をデコードするための XDR ルーティンである。
+このルーティンはデコードに成功した場合は 1 を返す。 失敗した場合はゼロを返す。
+.PP
+.nf
+\fBstruct sockaddr_in *svc_getcaller(SVCXPRT *\fP\fIxprt\fP\fB);\fP
+.fi
+.IP
+RPC サービス通信ハンドル \fIxprt\fP に関連付けられたプロシージャーの呼び出し元のネットワークアドレスを 取得するための標準的な手段。
+.PP
+.nf
+\fBvoid svc_getreqset(fd_set *\fP\fIrdfds\fP\fB);\fP
+.fi
+.IP
+このルーティンはサービスの実装者が \fBsvc_run\fP()  を呼び出さず、独自の非同期イベント処理を実装する場合にのみ意味がある。 これは
+\fBselect\fP(2)  システムコールが RPC ソケットに RPC 要求が到着したと返した場合にのみ呼び出される。 \fIrdfds\fP
+は結果の読み込みファイルディスクリプターのビットマスクである。 このルーティンは \fIrdfds\fP
+の値に関連付けられた全てのソケットのサービスが行なわれた時に 返ってくる。
+.PP
+.nf
+\fBvoid svc_getreq(int \fP\fIrdfds\fP\fB);\fP
+.fi
+.IP
+Similar to \fBsvc_getreqset\fP(), but limited to 32 file descriptors.  This
+interface is obsoleted by \fBsvc_getreqset\fP().
+.PP
+.nf
+\fBbool_t svc_register(SVCXPRT *\fP\fIxprt\fP\fB, unsigned long \fP\fIprognum\fP\fB,\fP
+\fB                    unsigned long \fP\fIversnum\fP\fB,\fP
+\fB                    void (*\fP\fIdispatch\fP\fB)(svc_req *, SVCXPRT *),\fP
+\fB                    unsigned long \fP\fIprotocol\fP\fB);\fP
+.fi
+.IP
+\fIprognum\fP と \fIversnum\fP をサービス配分プロシージャー \fIdispatch\fP で関連付ける。 \fIprotocol\fP
+がゼロの場合、サービスは \fBportmap\fP サービスには登録されない。 \fIprotocol\fP がゼロ以外の場合、
+[\fIprognum\fP,\fIversnum\fP,\fIprotocol\fP] の組み合わせと \fIxprt\->xp_port\fP
+とのマッピングがローカルの \fBportmap\fP サービスに登録される。(一般的に \fIprotocol\fP はゼロ、 \fBIPPROTO_UDP\fP、
+\fBIPPROTO_TCP\fP のどれかである。)  プロシージャー \fIdispatch\fP は以下の形式である:
+.IP
+.in +4n
+.EX
+dispatch(struct svc_req *request, SVCXPRT *xprt);
+.EE
+.in
+.IP
+\fBsvc_register\fP()  ルーティンは成功した場合は 1 を返す。失敗した場合はゼロを返す。
+.PP
+.nf
+\fBvoid svc_run(void);\fP
+.fi
+.IP
+このルーティンは戻ってこない。これは
+.SM RPC
+要求の到着を待ち、どれかが届いた場合に \fBsvc_getreq\fP()
+を使用して適切なサービスプロシージャーを呼び出す。 このプロシージャーは通常は \fBselect\fP(2)  システムコールから返るのを待っている。
+.PP
+.nf
+\fBbool_t svc_sendreply(SVCXPRT *\fP\fIxprt\fP\fB, xdrproc_t \fP\fIoutproc\fP\fB, char *\fP\fIout\fP\fB);\fP
+.fi
+.IP
+RPC サービス配分ルーティンによってリモートプロシージャーコールの結果を 返すために呼び出される。 パラメーター \fIxprt\fP
+はその要求に関連付けられた通信ハンドルである。 \fIoutproc\fP は結果をエンコードするために使用する XDR ルーティンである。 \fIout\fP
+は結果のアドレスである。このルーティンは成功した場合は 1 を返す。 失敗した場合はゼロを返す。
+.PP
+.nf
+\fBvoid svc_unregister(unsigned long \fP\fIprognum\fP\fB, unsigned long \fP\fIversnum\fP\fB);\fP
+.fi
+.IP
+配分ルーティンから [\fIprognum\fP,\fIversnum\fP] および [\fIprognum\fP,\fIversnum\fP,\fI*\fP]
+の組み合わせからポート番号へのマッピングを全て削除する。
+.PP
+.nf
+\fBvoid svcerr_auth(SVCXPRT *\fP\fIxprt\fP\fB, enum auth_stat \fP\fIwhy\fP\fB);\fP
+.fi
+.IP
+認証エラーによりリモートプロシージャーコールの実行を拒否された 場合にサービス配分ルーティンによって呼び出される。
+.PP
+.nf
+\fBvoid svcerr_decode(SVCXPRT *\fP\fIxprt\fP\fB);\fP
+.fi
+.IP
+パラメーターのデコードに失敗した場合に サービス配分ルーティンによって呼び出される。 \fBsvc_getargs\fP()  も参照すること。
+.PP
+.nf
+\fBvoid svcerr_noproc(SVCXPRT *\fP\fIxprt\fP\fB);\fP
+.fi
+.IP
+要求のあったプロシージャー番号が実装されていない場合に サービス配分ルーティンより呼び出される。
+.PP
+.nf
+\fBvoid svcerr_noprog(SVCXPRT *\fP\fIxprt\fP\fB);\fP
+.fi
+.IP
+RPC パッケージに要求されたプログラムが登録されていない場合に呼び出される。 サービスの実装には通常、このルーティンは必要ない。
+.PP
+.nf
+\fBvoid svcerr_progvers(SVCXPRT *\fP\fIxprt\fP\fB);\fP
+.fi
+.IP
+RPC パッケージに要求されたバージョンのプログラムが登録されていない場合に 呼び出される。サービスの実装には通常、このルーティンは必要ない。
+.PP
+.nf
+\fBvoid svcerr_systemerr(SVCXPRT *\fP\fIxprt\fP\fB);\fP
+.fi
+.IP
+特定のプロトコルによってカバーされていなシステムエラーが 検出された場合にサービス配分ルーティンによって呼び出される。
+例えば、サービスがそれ以上、記憶装置を割り当てることができない場合には このルーティンが呼び出されるかもしれない。
+.PP
+.nf
+\fBvoid svcerr_weakauth(SVCXPRT *\fP\fIxprt\fP\fB);\fP
+.fi
+.IP
+認証パラメーターが足りないためにリモートプロシージャーコールの実行を 拒否された場合にサービス配分ルーティンによって呼び出される。 このルーティンは
+\fBsvcerr_auth(xprt, AUTH_TOOWEAK)\fP を呼び出す。
+.PP
+.nf
+\fBSVCXPRT *svcfd_create(int \fP\fIfd\fP\fB, unsigned int \fP\fIsendsize\fP\fB,\fP
+\fB                      unsigned int \fP\fIrecvsize\fP\fB);\fP
+.fi
+.IP
+Create a service on top of any open file descriptor.  Typically, this file
+descriptor is a connected socket for a stream protocol such as TCP.
+\fIsendsize\fP and \fIrecvsize\fP indicate sizes for the send and receive
+buffers.  If they are zero, a reasonable default is chosen.
+.PP
+.nf
+\fBSVCXPRT *svcraw_create(void);\fP
+.fi
+.IP
+このルーティンは擬似 RPC サービス通信を生成して、そのポインターを返す。 通信は実際にはそのプロセスのアドレス空間にあるバッファーなので 対応する
+RPC クライアントは同じアドレス空間にいる必要がある。 \fBclntraw_create\fP()  を参照すること。 このルーティンで RPC
+のシミュレーションや、カーネルインターフェースに影響されずに応答時間などの RPC オーバヘッドを取得ができる。このルーティンは失敗した場合は NULL
+を返す。
+.PP
+.nf
+\fBSVCXPRT *svctcp_create(int \fP\fIsock\fP\fB, unsigned int \fP\fIsend_buf_size\fP\fB,\fP
+\fB                       unsigned int \fP\fIrecv_buf_size\fP\fB);\fP
+.fi
+.IP
+このルーティンは TCP/IP に基づく RPC サービス通信を作成し、それへのポインターを返す。 通信はソケット \fIsock\fP に結びつけられる。
+\fIsock\fP は \fBRPC_ANYSOCK\fP でも良い。この場合は新しいソケットが作成される。 もしソケットがローカルな TCP ポートに bind
+されていない場合は、 このルーティンが適当なポートに bind する。 補完された場合、\fIxprt\->xp_sock\fP には通信のソケット
+ディスクリプターが、\fIxprt\->xp_port\fP には通信のポート番号が 設定される。 このルーティンは失敗した場合は NULL を返す。
+TCP に基づいた RPC はバッファーされた I/O を使用するため、 ユーザーはバッファーの大きさを指定できる。
+ゼロを指定した場合は適切なデフォルトが選択される。
+.PP
+.nf
+\fBSVCXPRT *svcudp_bufcreate(int \fP\fIsock\fP\fB, unsigned int \fP\fIsendsize\fP\fB,\fP
+\fB                          unsigned int \fP\fIrecosize\fP\fB);\fP
+.fi
+.IP
+このルーティンは UDP/IP に基づいた RPC サービス通信を作成し、 そのポインターを返す。通信はソケット \fIsock\fP に関連付けられる。
+\fIsock\fP は \fBRPC_ANYSOCK\fP でも良い。この場合は新しいソケットが作成される。 ソケットがローカルの UDP ポートに bind
+されていない場合には このルーティンは適当なポートに bind する。 補完された場合、\fIxprt\->xp_sock\fP に通信のソケットの
+ディスクリプターが、\fIxprt\->xp_port\fP に通信のポート番号が 設定される。このルーティンは失敗した場合には NULL を返す。
+.IP
+これを使用すると UDP に基づいた RPC メッセージにおいて送信パケットや 受信パケットの最大サイズを指定することが可能になる。
+.PP
+.nf
+\fBSVCXPRT *svcudp_create(int \fP\fIsock\fP\fB);\fP
+.fi
+.IP
+送信パケットと受信パケットのサイズを同じデフォルトの値 \fISZ\fP に指定した \fIsvcudp_bufcreate(sock,SZ,SZ)\fP
+と等価である。
+.PP
+.nf
+\fBbool_t xdr_accepted_reply(XDR *\fP\fIxdrs\fP\fB, struct accepted_reply *\fP\fIar\fP\fB);\fP
+.fi
+.IP
+RPC 応答メッセージをエンコードするのに使用する。このルーティンは RPC パッケージを用いずに
+RPC\-形式のメッセージを作成しようとする場合に便利である。
+.PP
+.nf
+\fBbool_t xdr_authunix_parms(XDR *\fP\fIxdrs\fP\fB, struct authunix_parms *\fP\fIaupp\fP\fB);\fP
+.fi
+.IP
+UNIX 形式の証明書を記述するために使用する。このルーティンは RPC 認証パッケージを使用せずにこれらの証明書を作成しようとする場合に便利である。
+.PP
+.nf
+\fBvoid xdr_callhdr(XDR *\fP\fIxdrs\fP\fB, struct rpc_msg *\fP\fIchdr\fP\fB);\fP
+.fi
+.IP
+RPC 呼び出しのヘッダーメッセージを記述するために使用する。 このルーティンは RPC パッケージを使用せずに
+RPC\-形式のメッセージを作成しようとする場合に便利である。
+.PP
+.nf
+\fBbool_t xdr_callmsg(XDR *\fP\fIxdrs\fP\fB, struct rpc_msg *\fP\fIcmsg\fP\fB);\fP
+.fi
+.IP
+RPC 呼び出しメッセージを記述するのに使用する。 このルーティンは RPC パッケージを使用せずに
+RPC\-形式のメッセージを作成しようとする場合に便利である。
+.PP
+.nf
+\fBbool_t xdr_opaque_auth(XDR *\fP\fIxdrs\fP\fB, struct opaque_auth *\fP\fIap\fP\fB);\fP
+.fi
+.IP
+PRC 認証情報メッセージを記述するために使用する。 このルーティンは RPC パッケージを使用せずに
+RPC\-形式のメッセージを作成しようとする場合に便利である。
+.PP
+.nf
+\fBbool_t xdr_pmap(XDR *\fP\fIxdrs\fP\fB, struct pmap *\fP\fIregs\fP\fB);\fP
+.fi
+.IP
+各種の \fBportmap\fP プロシージャーへのパラメーターを外部的に記述するために使用する。 このルーティンは \fBpmap\fP
+インターフェースを使用せずに、これらのパラメーターを 作成したい場合に便利である。
+.PP
+.nf
+\fBbool_t xdr_pmaplist(XDR *\fP\fIxdrs\fP\fB, struct pmaplist **\fP\fIrp\fP\fB);\fP
+.fi
+.IP
+ポートのマッピングのリストを外部的に記述するために使用する。 このルーティンは \fBpmap\fP インターフェースを使用せずに、これらのパラメーターを
+作成したい場合に便利である。
+.PP
+.nf
+\fBbool_t xdr_rejected_reply(XDR *\fP\fIxdrs\fP\fB, struct rejected_reply *\fP\fIrr\fP\fB);\fP
+.fi
+.IP
+RPC 応答メッセージを記述するために使用する。このルーティンは RPC パッケージを使用せずに、
+RPC\-形式のメッセージを作成したい場合に便利である。
+.PP
+.nf
+\fBbool_t xdr_replymsg(XDR *\fP\fIxdrs\fP\fB, struct rpc_msg *\fP\fIrmsg\fP\fB);\fP
+.fi
+.IP
+RPC 応答メッセージを記述するために使用する。 このルーティンは RPC パッケージを使用せずに、 RPC
+形式のメッセージを作成したい場合に便利である。
+.PP
+.nf
+\fBvoid xprt_register(SVCXPRT *\fP\fIxprt\fP\fB);\fP
+.fi
+.IP
+RPC サービス通信ハンドルを生成した後に、それら自身を RPC サービスパッケージに登録する必要がある。 このルーティンは大域変数
+\fIsvc_fds\fP を修正する。サービスの実装者は通常、このルーティンは必要ない。
+.PP
+.nf
+\fBvoid xprt_unregister(SVCXPRT *\fP\fIxprt\fP\fB);\fP
+.fi
+.IP
+RPC サービス通信ハンドルを破壊する前に、それを RPC 通信パッケージから登録解除する必要がある。 このルーティンは大域変数 \fIsvc_fds\fP
+を修正する。サービスの実装者は通常、このルーティンは必要ない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.ad l
+.TS
+allbox;
+lbw35 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBauth_destroy\fP(),
+\fBauthnone_create\fP(),
+.br
+\fBauthunix_create\fP(),
+.br
+\fBauthunix_create_default\fP(),
+.br
+\fBcallrpc\fP(),
+\fBclnt_broadcast\fP(),
+.br
+\fBclnt_call\fP(),
+\fBclnt_destroy\fP(),
+.br
+\fBclnt_create\fP(),
+\fBclnt_control\fP(),
+.br
+\fBclnt_freeres\fP(),
+\fBclnt_geterr\fP(),
+.br
+\fBclnt_pcreateerror\fP(),
+\fBclnt_perrno\fP(),
+.br
+\fBclnt_perror\fP(),
+.br
+\fBclnt_spcreateerror\fP(),
+.br
+\fBclnt_sperrno\fP(),
+\fBclnt_sperror\fP(),
+.br
+\fBclntraw_create\fP(),
+\fBclnttcp_create\fP(),
+.br
+\fBclntudp_create\fP(),
+.br
+\fBclntudp_bufcreate\fP(),
+.br
+\fBget_myaddress\fP(),
+\fBpmap_getmaps\fP(),
+.br
+\fBpmap_getport\fP(),
+\fBpmap_rmtcall\fP(),
+.br
+\fBpmap_set\fP(),
+\fBpmap_unset\fP(),
+.br
+\fBregisterrpc\fP(),
+\fBsvc_destroy\fP(),
+.br
+\fBsvc_freeargs\fP(),
+\fBsvc_getargs\fP(),
+.br
+\fBsvc_getcaller\fP(),
+\fBsvc_getreqset\fP(),
+.br
+\fBsvc_getreq\fP(),
+\fBsvc_register\fP(),
+.br
+\fBsvc_run\fP(),
+\fBsvc_sendreply\fP(),
+.br
+\fBsvc_unregister\fP(),
+\fBsvcerr_auth\fP(),
+.br
+\fBsvcerr_decode\fP(),
+\fBsvcerr_noproc\fP(),
+.br
+\fBsvcerr_noprog\fP(),
+\fBsvcerr_progvers\fP(),
+.br
+\fBsvcerr_systemerr\fP(),
+\fBsvcerr_weakauth\fP(),
+.br
+\fBsvcfd_create\fP(),
+\fBsvcraw_create\fP(),
+.br
+\fBsvctcp_create\fP(),
+.br
+\fBsvcudp_bufcreate\fP(),
+.br
+\fBsvcudp_create\fP(),
+\fBxdr_accepted_reply\fP(),
+.br
+\fBxdr_authunix_parms\fP(),
+.br
+\fBxdr_callhdr\fP(),
+.br
+\fBxdr_callmsg\fP(),
+\fBxdr_opaque_auth\fP(),
+.br
+\fBxdr_pmap\fP(),
+\fBxdr_pmaplist\fP(),
+.br
+\fBxdr_rejected_reply\fP(),
+.br
+\fBxdr_replymsg\fP(),
+.br
+\fBxprt_register\fP(),
+\fBxprt_unregister\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.ad
+.SH 関連項目
+.\" We don't have an rpc_secure.3 page in the set at the moment -- MTK, 19 Sep 05
+.\" .BR rpc_secure (3),
+\fBxdr\fP(3)
+.PP
+以下のマニュアル:
+.RS
+Remote Procedure Calls: Protocol Specification
+.br
+Remote Procedure Call Programming Guide
+.br
+rpcgen Programming Guide
+.br
+.RE
+.PP
+\fIRPC: Remote Procedure Call Protocol Specification\fP, RFC\ 1050, Sun
+Microsystems, Inc., USC\-ISI.
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/rpmatch.3 b/manual/LDP_man-pages/draft/man3/rpmatch.3
new file mode 100644 (file)
index 0000000..36a9288
--- /dev/null
@@ -0,0 +1,129 @@
+.\" Copyright (C) 2006 Justin Pryzby <pryzbyj@justinpryzby.com>
+.\"
+.\" %%%LICENSE_START(PERMISSIVE_MISC)
+.\" Permission is hereby granted, free of charge, to any person obtaining
+.\" a copy of this software and associated documentation files (the
+.\" "Software"), to deal in the Software without restriction, including
+.\" without limitation the rights to use, copy, modify, merge, publish,
+.\" distribute, sublicense, and/or sell copies of the Software, and to
+.\" permit persons to whom the Software is furnished to do so, subject to
+.\" the following conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+.\" CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+.\" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+.\" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\" %%%LICENSE_END
+.\"
+.\" References:
+.\"   glibc manual and source
+.\"
+.\" 2006-05-19, mtk, various edits and example program
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI all rights reserved.
+.\" Translated 2006-07-31, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH RPMATCH 3 2020\-06\-09 GNU "Linux Programmer's Manual"
+.SH 名前
+rpmatch \- 質問への応答が肯定か否定かを判定する
+.SH 書式
+.nf
+\fB#include <stdlib.h>\fP
+.PP
+\fBint rpmatch(const char *\fP\fIresponse\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBrpmatch\fP():
+    Since glibc 2.19:
+        _DEFAULT_SOURCE
+    Glibc 2.19 and earlier:
+        _SVID_SOURCE
+.SH 説明
+\fBrpmatch\fP()  は yes/no の質問に対するユーザーからの応答を処理する。 国際化 (I18N) に対応している。
+.PP
+\fIresponse\fP にはユーザーからの応答を格納したヌル終端文字列が入っている必要がある。 たいていは、 \fBfgets\fP(3)  や
+\fBgetline\fP(3)  で取り込んだものであろう。
+.PP
+プログラムが \fBsetlocale\fP(3)  を呼び出して環境変数の変更を有効にした場合、 環境変数 \fBLANG\fP, \fBLC_MESSAGES\fP,
+\fBLC_ALL\fP が ユーザーの言語設定として考慮される。
+.PP
+Regardless of the locale, responses matching \fB\(ha[Yy]\fP are always accepted
+as affirmative, and those matching \fB\(ha[Nn]\fP are always accepted as
+negative.
+.SH 返り値
+\fIresponse\fP を検査した後、 \fBrpmatch\fP()  は否定的な応答 ("no") と認識した場合は 0 を返し、 肯定的な応答
+("yes") と認識した場合は 1 を返す。 \fIresponse\fP の値を解釈できなかった場合は \-1 を返す。
+.SH エラー
+返り値 \-1 が返った場合、入力が不正であったか、他の何らかのエラーが あったことを意味する。返り値が 0 以外かどうかを確認するだけでは
+十分ではない。
+.PP
+\fBrpmatch\fP()  は、 \fBregcomp\fP(3)  や \fBregexec\fP(3)  が失敗する理由のどれかで失敗することがある。
+エラーの原因を \fIerrno\fP や他の何かで知ることはできないが、 \fIerrno\fP は正規表現エンジンの失敗の原因を示している (但し、このケースと
+\fIresponse\fP の値を認識できずに失敗した場合を区別することはできない)。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBrpmatch\fP()
+T}     Thread safety   MT\-Safe locale
+.TE
+.sp 1
+.SH 準拠
+.\" It is available on at least AIX 5.1 and FreeBSD 6.0.
+\fBrpmatch\fP()  はどの標準でも必須となっていないが、 Linux 以外にも利用できるシステムもいくつかは存在する。
+.SH バグ
+The \fBrpmatch\fP()  implementation looks at only the first character of
+\fIresponse\fP.  As a consequence, "nyes" returns 0, and "ynever; not in a
+million years" returns 1.  It would be preferable to accept input strings
+much more strictly, for example (using the extended regular expression
+notation described in \fBregex\fP(7)): \fB\(ha([yY]|yes|YES)$\fP and
+\fB\(ha([nN]|no|NO)$\fP.
+.SH EXAMPLES
+以下のプログラムは、コマンドライン引き数で 指定された文字列を \fBrpmatch\fP()  に渡した場合の結果を表示する。
+.PP
+.EX
+#define _SVID_SOURCE
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
+int
+main(int argc, char *argv[])
+{
+    if (argc != 2 || strcmp(argv[1], "\-\-help") == 0) {
+        fprintf(stderr, "%s response\en", argv[0]);
+        exit(EXIT_FAILURE);
+    }
+
+    setlocale(LC_ALL, "");
+    printf("rpmatch() returns: %d\en", rpmatch(argv[1]));
+    exit(EXIT_SUCCESS);
+}
+.EE
+.SH 関連項目
+\fBfgets\fP(3), \fBgetline\fP(3), \fBnl_langinfo\fP(3), \fBregcomp\fP(3),
+\fBsetlocale\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
index bf19ca2..91ea47f 100644 (file)
@@ -51,12 +51,12 @@ rtime \- リモートマシンから時刻を取得する
 \fBETIMEDOUT\fP
 timeout で定義された待ち時間の期限が切れた。
 .SH 属性
-For an explanation of the terms used in this section, see \fBattributes\fP(7).
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
 .TS
 allbox;
 lb lb lb
 l l l.
-Interface      Attribute       Value
+インターフェース       属性  値
 T{
 \fBrtime\fP()
 T}     Thread safety   MT\-Safe
index 7d5e0ee..e0490bc 100644 (file)
@@ -111,12 +111,12 @@ _XOPEN_SOURCE\ >=\ 600
 範囲エラー (range error)、アンダーフローの場合
 \fIerrno\fP に \fBERANGE\fP が設定される。 アンダーフロー浮動小数点例外 (\fBFE_UNDERFLOW\fP)  が上がる。
 .SH 属性
-For an explanation of the terms used in this section, see \fBattributes\fP(7).
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
 .TS
 allbox;
 lbw28 lb lb
 l l l.
-Interface      Attribute       Value
+インターフェース       属性  値
 T{
 \fBscalb\fP(),
 \fBscalbf\fP(),
diff --git a/manual/LDP_man-pages/draft/man3/scalbln.3 b/manual/LDP_man-pages/draft/man3/scalbln.3
new file mode 100644 (file)
index 0000000..7751fe6
--- /dev/null
@@ -0,0 +1,149 @@
+.\" Copyright 2004 Andries Brouwer <aeb@cwi.nl>.
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2012  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2012-05-05, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2013-07-22, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH SCALBLN 3 2020\-11\-01 "" "Linux Programmer's Manual"
+.SH 名前
+scalbn, scalbnf, scalbnl, scalbln, scalblnf, scalblnl \-
+浮動小数点数に基数の整数乗を掛ける
+.SH 書式
+\fB#include <math.h>\fP
+.PP
+\fBdouble scalbln(double \fP\fIx\fP\fB, long \fP\fIexp\fP\fB);\fP
+.br
+\fBfloat scalblnf(float \fP\fIx\fP\fB, long \fP\fIexp\fP\fB);\fP
+.br
+\fBlong double scalblnl(long double \fP\fIx\fP\fB, long \fP\fIexp\fP\fB);\fP
+.PP
+\fBdouble scalbn(double \fP\fIx\fP\fB, int \fP\fIexp\fP\fB);\fP
+.br
+\fBfloat scalbnf(float \fP\fIx\fP\fB, int \fP\fIexp\fP\fB);\fP
+.br
+\fBlong double scalbnl(long double \fP\fIx\fP\fB, int \fP\fIexp\fP\fB);\fP
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBscalbln\fP(), \fBscalblnf\fP(), \fBscalblnl\fP():
+.RS
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+.RE
+.br
+\fBscalbn\fP(), \fBscalbnf\fP(), \fBscalbnl\fP():
+.RS
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad b
+.SH 説明
+これらの関数は最初の引き数 \fIx\fP に \fBFLT_RADIX\fP の \fIexp\fP 乗を掛ける (\fBFLT_RADIX\fP はおそらく 2
+である)。つまり、以下の式の値を返す。
+.PP
+.nf
+    x * FLT_RADIX ** exp
+.fi
+.PP
+.\" not in /usr/include but in a gcc lib
+\fBFLT_RADIX\fP の定義は \fI<float.h>\fP をインクルードすることで得られる。
+.SH 返り値
+成功すると、これらの関数は \fIx\fP * \fBFLT_RADIX\fP ** \fIexp\fP を返す。
+.PP
+\fIx\fP が NaN の場合、NaN が返される。
+.PP
+\fIx\fP が正の無限大 (負の無限大) の場合、正の無限大 (負の無限大) が返される。
+.PP
+\fIx\fP が +0 (\-0) の場合、+0 (\-0) が返される。
+.PP
+結果がオーバーフローする場合、 範囲エラー (range error) が発生し、 各関数はそれぞれ \fBHUGE_VAL\fP,
+\fBHUGE_VALF\fP, \fBHUGE_VALL\fP を返す。符号は \fIx\fP と同じになる。
+.PP
+結果がアンダーフローする場合、範囲エラーが発生し、 各関数は 0 を返す。符号は \fIx\fP と同じになる。
+.SH エラー
+これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
+.PP
+以下のエラーが発生する可能性がある。
+.TP 
+範囲エラー (range error)、オーバーフローの場合
+.\" .I errno
+.\" is set to
+.\" .BR ERANGE .
+オーバーフロー浮動小数点例外 (\fBFE_OVERFLOW\fP)  が上がる。
+.TP 
+範囲エラー (range error)、アンダーフローの場合
+\fIerrno\fP に \fBERANGE\fP が設定される。 アンダーフロー浮動小数点例外 (\fBFE_UNDERFLOW\fP)  が上がる。
+.SH バージョン
+これらの関数は glibc バージョン 2.1 で初めて登場した。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw33 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBscalbn\fP(),
+\fBscalbnf\fP(),
+\fBscalbnl\fP(),
+.br
+\fBscalbln\fP(),
+\fBscalblnf\fP(),
+\fBscalblnl\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+これらの関数は、 \fBscalb\fP(3) に説明がある廃止予定の関数群とは二番目の
+引き数の型が異なる。このページで説明する関数群は、二番目の引き数の型が
+整数である。これに対して \fBscalb\fP(3) に説明がある関数群は、二番目の
+引き数の型が \fIdouble\fP である。
+.PP
+\fBFLT_RADIX\fP が 2 の場合 (これが普通だが)、
+その場合は \fBscalbn\fP() は \fBldexp\fP(3) と等価である。
+.SH バグ
+.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6803
+Before glibc 2.20, these functions did not set \fIerrno\fP for range errors.
+.SH 関連項目
+\fBldexp\fP(3), \fBscalb\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/scandir.3 b/manual/LDP_man-pages/draft/man3/scandir.3
new file mode 100644 (file)
index 0000000..1a72d8c
--- /dev/null
@@ -0,0 +1,253 @@
+.\" Copyright (C) 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified Sat Jul 24 18:26:16 1993 by Rik Faith (faith@cs.unc.edu)
+.\" Modified Thu Apr 11 17:11:33 1996 by Andries Brouwer (aeb@cwi.nl):
+.\"     Corrected type of compar routines, as suggested by
+.\"     Miguel Barreiro (enano@avalon.yaix.es).  Added example.
+.\" Modified Sun Sep 24 20:15:46 2000 by aeb, following Petter Reinholdtsen.
+.\" Modified 2001-12-26 by aeb, following Joey. Added versionsort.
+.\"
+.\" The pieces on scandirat(3) were copyright and licensed as follows.
+.\"
+.\" Copyright (c) 2012, Mark R. Bannister <cambridge@users.sourceforge.net>
+.\"        based on text in mkfifoat.3 Copyright (c) 2006, Michael Kerrisk
+.\"
+.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
+.\" This is free documentation; you can redistribute it and/or
+.\" modify it under the terms of the GNU General Public License as
+.\" published by the Free Software Foundation; either version 2 of
+.\" the License, or (at your option) any later version.
+.\"
+.\" The GNU General Public License's references to "object code"
+.\" and "executables" are to be interpreted as the output of any
+.\" document formatting or typesetting system, including
+.\" intermediate and printed output.
+.\"
+.\" This manual is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public
+.\" License along with this manual; if not, see
+.\" <http://www.gnu.org/licenses/>.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1998 Hiroaki Nagoya all rights reserved.
+.\" Translated Thu May 28 1998 by Hiroaki Nagoya <nagoya@is.titech.ac.jp>
+.\" Updated & Modified Sat Jan 19 18:22:21 JST 2002
+.\"         by Yuichi SATO <ysato@h4.dion.ne.jp>
+.\" Updated & Modified Sun Jan 16 08:12:04 JST 2005
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\"
+.TH SCANDIR 3 2020\-06\-09 GNU "Linux Programmer's Manual"
+.SH 名前
+scandir, scandirat, alphasort, versionsort \- ディレクトリを走査する
+.SH 書式
+.nf
+\fB#include <dirent.h>\fP
+.PP
+\fBint scandir(const char *\fP\fIdirp\fP\fB, struct dirent ***\fP\fInamelist\fP\fB,\fP
+.RS
+\fBint (*\fP\fIfilter\fP\fB)(const struct dirent *),\fP
+\fBint (*\fP\fIcompar\fP\fB)(const struct dirent **, const struct dirent **));\fP
+.RE
+.PP
+\fBint alphasort(const struct dirent **\fP\fIa\fP\fB, const struct dirent **\fP\fIb\fP\fB);\fP
+.PP
+\fBint versionsort(const struct dirent **\fP\fIa\fP\fB, const struct dirent **\fP\fIb\fP\fB);\fP
+
+\fB#include <fcntl.h>\fP          /* AT_* 定数の定義 */
+\fB#include <dirent.h>\fP
+.PP
+\fBint scandirat(int \fP\fIdirfd\fP\fB, const char *\fP\fIdirp\fP\fB,\fP
+\fBstruct dirent ***\fP\fInamelist\fP\fB,\fP
+.RS
+\fBint (*\fP\fIfilter\fP\fB)(const struct dirent *),\fP
+\fBint (*\fP\fIcompar\fP\fB)(const struct dirent **, const struct dirent **));\fP
+.RE
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBscandir\fP(), \fBalphasort\fP():
+.br
+.RS 4
+.PD 0
+.ad b
+/* Since glibc 2.10: */ _POSIX_C_SOURCE\ >=\ 200809L
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.PD
+.RE
+.PP
+\fBversionsort\fP(): _GNU_SOURCE
+.PP
+\fBscandirat\fP(): _GNU_SOURCE
+.SH 説明
+関数 \fBscandir\fP()  はディレクトリ \fIdirp\fP を走査し、 ディレクトリの各エントリーを引き数として \fBfilter\fP()
+を呼び出す。 \fBfilter\fP()  が 0 以外の値を返すエントリーは \fBmalloc\fP(3)  によって 確保された文字列に保存され、比較関数
+\fBcompar\fP()  を用いて \fBqsort\fP(3)  によりソートされ、 \fBmalloc\fP(3)  により確保された配列
+\fInamelist\fP にまとめられる。 \fIfilter\fP が NULL ならば、すべてのエントリーが選択される。
+.PP
+比較関数 \fIcompar\fP()  には \fBalphasort\fP()  関数と \fBversionsort\fP()  関数を使うことができる。
+\fBalphasort\fP()  は \fBstrcoll\fP(3)  を用いてディレクトリエントリーをソートし、 \fBversionsort\fP()
+は文字列 \fI(*a)\->d_name\fP と \fI(*b)\->d_name\fP に対して \fBstrverscmp\fP(3)  を用いる。
+.SS scandirat()
+\fBscandirat\fP() 関数は \fBscandir\fP() と全く同様の動作をする。差分についてはここで説明する。
+.PP
+\fIdirp\fP で指定されたパス名が相対パスの場合、ファイルディスクリプター \fIdirfd\fP が参照するディレクトリからの相対パスと解釈される
+(これに対して、\fBscandir\fP() の場合は、相対パス名は、呼び出したプロセスのカレントワーキングディレクトリからの相対パスと解釈される)。
+.PP
+\fIdirp\fP が相対パスで \fIdirfd\fP が特別な値 \fBAT_FDCWD\fP の場合、 \fIdirp\fP は (\fBscandir\fP() と同様に)
+呼び出したプロセスのカレントワーキングディレクトリからの相対パスと解釈される。
+.PP
+\fIdirp\fP が絶対パスの場合、\fIdirfd\fP は無視される。
+.PP
+\fBscandirat\fP() が必要な理由については \fBopenat\fP(2) を参照すること。
+.SH 返り値
+\fBscandir\fP() 関数は、選択されたディレクトリのエントリー数を返す。 エラーの場合、 \-1 を返し、 \fIerrno\fP
+にエラーの原因を示す値を設定する。
+.PP
+関数 \fBalphasort\fP()  と \fBversionsort\fP()  は 1 番目の引き数が 2 番目の引き数に対して、
+[小さい/等しい/大きい] かに応じて、0 より [小さい/等しい/大きい] 値を返す。
+.SH エラー
+.TP 
+\fBENOENT\fP
+\fIdirp\fP で指定されたパスが存在しない。
+.TP 
+\fBENOMEM\fP
+操作を完了するのに十分なメモリーがない。
+.TP 
+\fBENOTDIR\fP
+\fIdirp\fP で指定されたパスがディレクトリではない。
+.PP
+\fBscandirat\fP() では追加で以下のエラーも発生する:
+.TP 
+\fBEBADF\fP
+\fIdirfd\fP が有効なファイルディスクリプターではない。
+.TP 
+\fBENOTDIR\fP
+\fIdirp\fP が相対パスで、\fIdirfd\fP がディレクトリ以外のファイルを参照している
+ファイルディスクリプターである。
+.SH バージョン
+\fBversionsort\fP()  は、glibc バージョン 2.1 で追加された。
+.PP
+\fBscandirat\fP()  は glibc バージョン 2.15 で追加された。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw26 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBscandir\fP(),
+\fBscandirat\fP()
+T}     Thread safety   MT\-Safe
+T{
+\fBalphasort\fP(),
+\fBversionsort\fP()
+T}     Thread safety   MT\-Safe locale
+.TE
+.sp 1
+.SH 準拠
+\fBalphasort\fP(), \fBscandir\fP(): 4.3BSD, POSIX.1\-2008.
+.PP
+.\" .LP
+.\" The functions
+.\" .BR scandir ()
+.\" and
+.\" .BR alphasort ()
+.\" are from 4.3BSD, and have been available under Linux since libc4.
+.\" Libc4 and libc5 use the more precise prototype
+.\" .sp
+.\" .nf
+.\"    int alphasort(const struct dirent ** a,
+.\"                  const struct dirent **b);
+.\" .fi
+.\" .sp
+.\" but glibc 2.0 returns to the imprecise BSD prototype.
+\fBversionsort\fP() と \fBscandirat\fP() は GNU 拡張である。
+.SH 注意
+glibc 2.1 以降では \fBalphasort\fP()  は \fBstrcoll\fP(3)  を呼び出す。 \fBalphasort\fP()  は以前は
+\fBstrcmp\fP(3)  を使っていた。
+.PP
+Before glibc 2.10, the two arguments of \fBalphasort\fP()  and \fBversionsort\fP()
+were typed as \fIconst void\ *\fP.  When \fBalphasort\fP()  was standardized in
+POSIX.1\-2008, the argument type was specified as the type\-safe \fIconst
+struct dirent\ **\fP, and glibc 2.10 changed the definition of \fBalphasort\fP()
+(and the nonstandard \fBversionsort\fP())  to match the standard.
+.SH EXAMPLES
+.\"
+The program below prints a list of the files in the current directory in
+reverse order.
+.SS プログラムのソース
+\&
+.EX
+#define _DEFAULT_SOURCE
+#include <dirent.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main(void)
+{
+    struct dirent **namelist;
+    int n;
+
+    n = scandir(".", &namelist, NULL, alphasort);
+    if (n == \-1) {
+        perror("scandir");
+        exit(EXIT_FAILURE);
+    }
+
+    while (n\-\-) {
+        printf("%s\en", namelist[n]\->d_name);
+        free(namelist[n]);
+    }
+    free(namelist);
+
+    exit(EXIT_SUCCESS);
+}
+.EE
+.SH 関連項目
+\fBclosedir\fP(3), \fBfnmatch\fP(3), \fBopendir\fP(3), \fBreaddir\fP(3),
+\fBrewinddir\fP(3), \fBseekdir\fP(3), \fBstrcmp\fP(3), \fBstrcoll\fP(3),
+\fBstrverscmp\fP(3), \fBtelldir\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
index e95a814..ef76c90 100644 (file)
@@ -74,12 +74,12 @@ _BSD_SOURCE || _SVID_SOURCE
 .SH バージョン
 この関数は glibc 2.6 以降で利用可能である。
 .SH 属性
-For an explanation of the terms used in this section, see \fBattributes\fP(7).
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
 .TS
 allbox;
 lb lb lb
 l l l.
-Interface      Attribute       Value
+インターフェース       属性  値
 T{
 \fBsched_getcpu\fP()
 T}     Thread safety   MT\-Safe
diff --git a/manual/LDP_man-pages/draft/man3/seekdir.3 b/manual/LDP_man-pages/draft/man3/seekdir.3
new file mode 100644 (file)
index 0000000..442dd1d
--- /dev/null
@@ -0,0 +1,89 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified Sat Jul 24 18:25:21 1993 by Rik Faith (faith@cs.unc.edu)
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
+.\"    all rights reserved.
+.\" Translated Wed Dec 24 12:34:12 JST 1997
+.\"    by HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
+.\" Updated 2009-04-24, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.20
+.\" Updated 2013-05-01, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH SEEKDIR 3 2016\-03\-15 "" "Linux Programmer's Manual"
+.SH 名前
+seekdir \- 次の readdir() 呼び出しのために、ディレクトリストリーム中の位置を 設定する
+.SH 書式
+.nf
+\fB#include <dirent.h>\fP
+.PP
+\fBvoid seekdir(DIR *\fP\fIdirp\fP\fB, long \fP\fIloc\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBseekdir\fP():
+ _XOPEN_SOURCE
+    || /* Glibc since 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.SH 説明
+\fBseekdir\fP()  関数は、次の \fBreaddir\fP(3)  呼び出しの開始位置である、 ディレクトリストリームの中での位置を設定する。
+\fIloc\fP 引き数には、それ以前の \fBtelldir\fP(3) の呼び出しで返された値を渡すべきである。
+.SH 返り値
+\fBseekdir\fP()  関数は、値を返さない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBseekdir\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, 4.3BSD.
+.SH 注意
+バージョン 2.1.1 以前の glibc では、 \fIloc\fP 引き数の型は \fIoff_t\fP であった。 POSIX.1\-2001 では
+\fIlong\fP と規定されており、glibc 2.1.2 以降では \fIlong\fP
+になっている。この引き数の値に前提を置く際には気を付けないといけない理由については \fBtelldir\fP(3) を参照のこと。
+.SH 関連項目
+\fBlseek\fP(2), \fBclosedir\fP(3), \fBopendir\fP(3), \fBreaddir\fP(3), \fBrewinddir\fP(3),
+\fBscandir\fP(3), \fBtelldir\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/sem_close.3 b/manual/LDP_man-pages/draft/man3/sem_close.3
new file mode 100644 (file)
index 0000000..95cf123
--- /dev/null
@@ -0,0 +1,75 @@
+.\" Copyright (C) 2006 Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI all rights reserved.
+.\" Translated 2006-04-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH SEM_CLOSE 3 2020\-08\-13 Linux "Linux Programmer's Manual"
+.SH 名前
+sem_close \- 名前付きセマフォをクローズする
+.SH 書式
+.nf
+\fB#include <semaphore.h>\fP
+.PP
+\fBint sem_close(sem_t *\fP\fIsem\fP\fB);\fP
+.fi
+.PP
+\fI\-pthread\fP とリンクする。
+.SH 説明
+\fBsem_close\fP()  は \fIsem\fP が参照する名前付きセマフォをクローズし、 このセマフォ用に呼び出し元プロセスにシステムが割り当てていた
+リソースを解放できるようにする。
+.SH 返り値
+成功すると、 \fBsem_close\fP()  は 0 を返す。エラーの場合、\-1 を返し、 \fIerrno\fP にエラーを示す値をセットする。
+.SH エラー
+.TP 
+\fBEINVAL\fP
+\fIsem\fP は有効なセマフォではない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBsem_close\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.sp 1
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+オープンされたすべての名前付きセマフォは、プロセス終了時、もしくは \fBexecve\fP(2)  実行時に自動的にクローズされる。
+.SH 関連項目
+\fBsem_getvalue\fP(3), \fBsem_open\fP(3), \fBsem_post\fP(3), \fBsem_unlink\fP(3),
+\fBsem_wait\fP(3), \fBsem_overview\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/sem_destroy.3 b/manual/LDP_man-pages/draft/man3/sem_destroy.3
new file mode 100644 (file)
index 0000000..f00d5c2
--- /dev/null
@@ -0,0 +1,80 @@
+.\" Copyright (C) 2006 Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI all rights reserved.
+.\" Translated 2006-04-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH SEM_DESTROY 3 2020\-08\-13 Linux "Linux Programmer's Manual"
+.SH 名前
+sem_destroy \- 名前なしセマフォを破棄する
+.SH 書式
+.nf
+\fB#include <semaphore.h>\fP
+.PP
+\fBint sem_destroy(sem_t *\fP\fIsem\fP\fB);\fP
+.fi
+.PP
+\fI\-pthread\fP とリンクする。
+.SH 説明
+\fBsem_destroy\fP()  は \fIsem\fP が指すアドレスにある名前なしセマフォを破棄する。
+.PP
+\fBsem_destroy\fP()  を使って破棄するのは、 \fBsem_init\fP(3)  で初期化したセマフォだけにすべきである。
+.PP
+他のプロセスやスレッドが (\fBsem_wait\fP(3)  で) 待ち状態になっているセマフォを破棄した場合の挙動は定義されていない。
+.PP
+すでに破棄されたセマフォを、 \fBsem_init\fP(3)  を使って再初期化される前に使用した場合、その結果は未定義である。
+.SH 返り値
+成功すると、 \fBsem_destroy\fP()  は 0 を返す。エラーの場合、\-1 を返し、 \fIerrno\fP にエラーを示す値をセットする。
+.SH エラー
+.TP 
+\fBEINVAL\fP
+\fIsem\fP は有効なセマフォではない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBsem_destroy\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+.\" But not on NPTL, where sem_destroy () is a no-op..
+名前なしセマフォは、そのセマフォが置かれているメモリーが解放される前に、 \fBsem_destroy\fP()
+を使って破棄しておくべきである。これを行わなかった場合、実装によっては リソースのリークが起こりえる。
+.SH 関連項目
+\fBsem_init\fP(3), \fBsem_post\fP(3), \fBsem_wait\fP(3), \fBsem_overview\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/sem_getvalue.3 b/manual/LDP_man-pages/draft/man3/sem_getvalue.3
new file mode 100644 (file)
index 0000000..eec08b0
--- /dev/null
@@ -0,0 +1,79 @@
+.\" Copyright (C) 2006 Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI all rights reserved.
+.\" Translated 2006-04-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH SEM_GETVALUE 3 2020\-06\-09 Linux "Linux Programmer's Manual"
+.SH 名前
+sem_getvalue \- セマフォの値を取得する
+.SH 書式
+.nf
+\fB#include <semaphore.h>\fP
+.PP
+\fBint sem_getvalue(sem_t *\fP\fIsem\fP\fB, int *\fP\fIsval\fP\fB);\fP
+.fi
+.PP
+\fI\-pthread\fP とリンクする。
+.SH 説明
+\fBsem_getvalue\fP()  は、 \fIsem\fP が指すセマフォの現在の値を \fIsval\fP で指す整数に格納する。
+.PP
+If one or more processes or threads are blocked waiting to lock the
+semaphore with \fBsem_wait\fP(3), POSIX.1 permits two possibilities for the
+value returned in \fIsval\fP: either 0 is returned; or a negative number whose
+absolute value is the count of the number of processes and threads currently
+blocked in \fBsem_wait\fP(3).  Linux adopts the former behavior.
+.SH 返り値
+成功すると、 \fBsem_getvalue\fP()  は 0 を返す。エラーの場合、\-1 を返し、 \fIerrno\fP にエラーを示す値をセットする。
+.SH エラー
+.TP 
+\fBEINVAL\fP
+\fIsem\fP is not a valid semaphore.  (The glibc implementation currently does
+not check whether \fIsem\fP is valid.)
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBsem_getvalue\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+\fBsem_getvalue\fP()  が返るときには、すでにセマフォの値は変化している可能性がある。
+.SH 関連項目
+\fBsem_post\fP(3), \fBsem_wait\fP(3), \fBsem_overview\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/sem_init.3 b/manual/LDP_man-pages/draft/man3/sem_init.3
new file mode 100644 (file)
index 0000000..f752a57
--- /dev/null
@@ -0,0 +1,92 @@
+.\" Copyright (C) 2006 Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI all rights reserved.
+.\" Translated 2006-04-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH SEM_INIT 3 2020\-08\-13 Linux "Linux Programmer's Manual"
+.SH 名前
+sem_init \- 名前なしセマフォを初期化する
+.SH 書式
+.nf
+\fB#include <semaphore.h>\fP
+.PP
+\fBint sem_init(sem_t *\fP\fIsem\fP\fB, int \fP\fIpshared\fP\fB, unsigned int \fP\fIvalue\fP\fB);\fP
+.fi
+.PP
+\fI\-pthread\fP とリンクする。
+.SH 説明
+\fBsem_init\fP()  は、 \fIsem\fP が指すアドレスにある名前なしセマフォを初期化する。 \fIvalue\fP
+引き数はそのセマフォの初期値を指定する。
+.PP
+\fIpshared\fP 引き数は、このセマフォがプロセス内のスレッド間で共有されるのか、 プロセス間で共有されるのか、を示す。
+.PP
+\fIpshared\fP が 0 の場合、セマフォはプロセス内のスレッド間で共有される。 セマフォはすべてのスレッドから参照可能なアドレスに配置すべきである
+(例えば、大域変数や、ヒープ上に動的に割り当てられた変数など)。
+.PP
+\fIpshared\fP が 0 以外の場合、セマフォはプロセス間で共有される。セマフォは 共有メモリー領域に配置すべきである
+(\fBshm_open\fP(3), \fBmmap\fP(2), \fBshmget\fP(2)  参照)。 (\fBfork\fP(2)
+で生成された子プロセスは親プロセスのメモリーマッピングを継承するため、 子プロセスもセマフォにアクセスできる。)
+共有メモリー領域にアクセスできるプロセスならば、どのプロセスでも \fBsem_post\fP(3)  や \fBsem_wait\fP(3)
+などを使ってセマフォを操作できる。
+.PP
+すでに初期化済のセマフォを初期化した場合の挙動は定義されていない。
+.SH 返り値
+成功すると、 \fBsem_init\fP()  は 0 を返す。エラーの場合、\-1 を返し、 \fIerrno\fP にエラーを示す値をセットする。
+.SH エラー
+.TP 
+\fBEINVAL\fP
+\fIvalue\fP が \fBSEM_VALUE_MAX\fP を超えている。
+.TP 
+\fBENOSYS\fP
+\fIpshared\fP が 0 以外だが、システムがプロセス共有セマフォをサポートしていない (\fBsem_overview\fP(7)  参照)。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBsem_init\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001.
+.SH 注意
+妙なことに、POSIX.1\-2001 は \fBsem_init\fP()  が成功した場合に返すべき値を規定していない。 POSIX.1\-2008
+ではこれが修正され、成功時には 0 を返すことが規定された。
+.SH EXAMPLES
+See \fBshm_open\fP(3)  and \fBsem_wait\fP(3).
+.SH 関連項目
+\fBsem_destroy\fP(3), \fBsem_post\fP(3), \fBsem_wait\fP(3), \fBsem_overview\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/sem_open.3 b/manual/LDP_man-pages/draft/man3/sem_open.3
new file mode 100644 (file)
index 0000000..ed22da2
--- /dev/null
@@ -0,0 +1,121 @@
+.\" Copyright (C) 2006 Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI all rights reserved.
+.\" Translated 2006-04-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2009-02-23, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.19
+.\"
+.TH SEM_OPEN 3 2020\-08\-13 Linux "Linux Programmer's Manual"
+.SH 名前
+sem_open \- 名前付きセマフォを初期化し、オープンする
+.SH 書式
+.nf
+\fB#include <fcntl.h>\fP           /* For O_* constants */
+\fB#include <sys/stat.h>\fP        /* For mode constants */
+\fB#include <semaphore.h>\fP
+.PP
+\fBsem_t *sem_open(const char *\fP\fIname\fP\fB, int \fP\fIoflag\fP\fB);\fP
+\fBsem_t *sem_open(const char *\fP\fIname\fP\fB, int \fP\fIoflag\fP\fB,\fP
+\fB                mode_t \fP\fImode\fP\fB, unsigned int \fP\fIvalue\fP\fB);\fP
+.fi
+.PP
+\fI\-pthread\fP とリンクする。
+.SH 説明
+\fBsem_open\fP()  は、新規の POSIX セマフォを作成するか、既存のセマフォのオープンを行う。 セマフォは \fIname\fP で識別される。
+\fIname\fP の構成の詳細は \fBsem_overview\fP(7)  を参照。
+.PP
+.\" In reality the filesystem IDs are used on Linux.
+\fIoflag\fP 引き数には、 \fBsem_open\fP()  の動作を制御するフラグを指定する (oflag の値の定義は
+\fI<fcntl.h>\fP のインクルードにより得られる)。 \fIoflag\fP に \fBO_CREAT\fP
+が指定されると、まだ存在しない場合にはそのセマフォが作成される。 セマフォの所有者 (ユーザー ID)、グループ所有権 (グループ ID) には、
+それぞれ呼び出し元プロセスの実効 UID、実効 GID が設定される。 \fIoflag\fP に \fBO_CREAT\fP と \fBO_EXCL\fP
+の両方が指定された場合、指定された名前 \fIname\fP のセマフォがすでに存在するとエラーが返される。
+.PP
+\fIoflag\fP に \fBO_CREAT\fP を指定する場合、さらに引き数が 2 つ必要である。 \fImode\fP 引き数は、 \fBopen\fP(2)
+と同じように、新しいセマフォに設定されるアクセス許可 (permission) を 指定する。許可設定はプロセスの umask でマスクされる
+(許可ビットのシンボル定義は \fI<sys/stat.h>\fP のインクルードにより得られる)。
+セマフォにアクセスしようとするユーザーは、読み出し許可と書き込み許可の 両方を得る必要がある。 \fIvalue\fP
+引き数は新しいセマフォの初期値を指定する。 \fBO_CREAT\fP が指定され、指定した名前 \fIname\fP のセマフォがすでに存在する場合、
+\fImode\fP と \fIvalue\fP は無視される。
+.SH 返り値
+成功すると、 \fBsem_open\fP()  は新しいセマフォのアドレスを返す。 このアドレスは他のセマフォ関連の関数を呼び出す際に使用される。
+エラーの場合、 \fBsem_open\fP()  は \fBSEM_FAILED\fP を返し、 \fIerrno\fP にエラーを示す値をセットする。
+.SH エラー
+.TP 
+\fBEACCES\fP
+そのセマフォが存在するが、呼び出し元にはそのセマフォをオープンする 許可がない。
+.TP 
+\fBEEXIST\fP
+\fIoflag\fP に \fBO_CREAT\fP と \fBO_EXCL\fP の両方が指定されたが、 \fIname\fP という名前のセマフォはすでに存在する。
+.TP 
+\fBEINVAL\fP
+\fIvalue\fP が \fBSEM_VALUE_MAX\fP よりも大きい。
+.TP 
+\fBEINVAL\fP
+\fIname\fP が "/" だけで構成され、その後ろに他の文字が続いていなかった。
+.TP 
+\fBEMFILE\fP
+The per\-process limit on the number of open file descriptors has been
+reached.
+.TP 
+\fBENAMETOOLONG\fP
+\fIname\fP が長すぎる。
+.TP 
+\fBENFILE\fP
+The system\-wide limit on the total number of open files has been reached.
+.TP 
+\fBENOENT\fP
+.\" this error can occur if we have a name of the (nonportable) form
+.\" /dir/name, and the directory /dev/shm/dir does not exist.
+\fIoflag\fP に \fBO_CREAT\fP フラグが指定されておらず、 \fIname\fP という名前のセマフォも存在しない。 または、
+\fBO_CREAT\fP が指定されたが、 \fIname\fP が適切な形式ではなかった。
+.TP 
+\fBENOMEM\fP
+十分なメモリーがない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBsem_open\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.sp 1
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 関連項目
+\fBsem_close\fP(3), \fBsem_getvalue\fP(3), \fBsem_post\fP(3), \fBsem_unlink\fP(3),
+\fBsem_wait\fP(3), \fBsem_overview\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/sem_post.3 b/manual/LDP_man-pages/draft/man3/sem_post.3
new file mode 100644 (file)
index 0000000..b79ff27
--- /dev/null
@@ -0,0 +1,80 @@
+.\" Copyright (C) 2006 Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI all rights reserved.
+.\" Translated 2006-04-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH SEM_POST 3 2020\-08\-13 Linux "Linux Programmer's Manual"
+.SH 名前
+sem_post \- セマフォのロックを解除する
+.SH 書式
+.nf
+\fB#include <semaphore.h>\fP
+.PP
+\fBint sem_post(sem_t *\fP\fIsem\fP\fB);\fP
+.fi
+.PP
+\fI\-pthread\fP とリンクする。
+.SH 説明
+\fBsem_post\fP()  は、 \fIsem\fP が指すセマフォの値を 1 増やす (ロックを解除する)。その結果、 セマフォの値は 0
+より大きな値に変化し、 \fBsem_wait\fP(3)  で停止している別のプロセスやスレッドが呼び起こされ、 セマフォをロックできるようになる。
+.SH 返り値
+成功すると、 \fBsem_post\fP()  は 0 を返す。エラーの場合、セマフォの値は変更せずに、 \-1 を返し、 \fIerrno\fP
+にエラーを示す値をセットする。
+.SH エラー
+.TP 
+\fBEINVAL\fP
+\fIsem\fP は有効なセマフォではない。
+.TP 
+\fBEOVERFLOW\fP
+.\" Added in POSIX.1-2008 TC1 (Austin Interpretation 213)
+一つのセマフォで使用できる最大値を超えてしまうところであった。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBsem_post\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001.
+.SH 注意
+\fBsem_post\fP()  は async\-signal\-safe である。 つまり、シグナルハンドラーの中でも安全に呼び出すことができる。
+.SH EXAMPLES
+See \fBsem_wait\fP(3)  and \fBshm_open\fP(3).
+.SH 関連項目
+\fBsem_getvalue\fP(3), \fBsem_wait\fP(3), \fBsem_overview\fP(7), \fBsignal\-safety\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/sem_unlink.3 b/manual/LDP_man-pages/draft/man3/sem_unlink.3
new file mode 100644 (file)
index 0000000..45f0b38
--- /dev/null
@@ -0,0 +1,78 @@
+.\" Copyright (C) 2006 Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI all rights reserved.
+.\" Translated 2006-04-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH SEM_UNLINK 3 2020\-08\-13 Linux "Linux Programmer's Manual"
+.SH 名前
+sem_unlink \- 名前付きセマフォを削除する
+.SH 書式
+.nf
+\fB#include <semaphore.h>\fP
+.PP
+\fBint sem_unlink(const char *\fP\fIname\fP\fB);\fP
+.fi
+.PP
+\fI\-pthread\fP とリンクする。
+.SH 説明
+\fBsem_unlink\fP()  は、 \fIname\fP で参照される名前付きセマフォを削除する。 セマフォの名前は直ちに削除される。
+このセマフォをオープンしている他のすべてのプロセスがセマフォを 閉じて初めてセマフォの削除が行われる。
+.SH 返り値
+成功すると、 \fBsem_unlink\fP()  は 0 を返す。エラーの場合、\-1 を返し、 \fIerrno\fP にエラーを示す値をセットする。
+.SH エラー
+.TP 
+\fBEACCES\fP
+呼び出し元にはこのセマフォを削除する許可がない。
+.TP 
+\fBENAMETOOLONG\fP
+\fIname\fP が長すぎる。
+.TP 
+\fBENOENT\fP
+指定された名前 \fIname\fP のセマフォが存在しない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBsem_unlink\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 関連項目
+\fBsem_getvalue\fP(3), \fBsem_open\fP(3), \fBsem_post\fP(3), \fBsem_wait\fP(3),
+\fBsem_overview\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
index 629f09c..b05afe9 100644 (file)
@@ -104,12 +104,12 @@ struct timespec {
 .\" was detected", but this does not occur on Linux(?).
 セマフォのロックに成功する前に時間切れとなった。
 .SH 属性
-For an explanation of the terms used in this section, see \fBattributes\fP(7).
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
 .TS
 allbox;
 lbw26 lb lb
 l l l.
-Interface      Attribute       Value
+インターフェース       属性  値
 T{
 \fBsem_wait\fP(),
 \fBsem_trywait\fP(),
diff --git a/manual/LDP_man-pages/draft/man3/setaliasent.3 b/manual/LDP_man-pages/draft/man3/setaliasent.3
new file mode 100644 (file)
index 0000000..e49625f
--- /dev/null
@@ -0,0 +1,149 @@
+.\" Copyright 2003 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
+.\" Distributed under GPL
+.\" %%%LICENSE_END
+.\"
+.\" Polished a bit, added a little, aeb
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2004 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated Sun Sep  5 20:44:27 JST 2004
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\"
+.TH SETALIASENT 3 2020\-06\-09 GNU "Linux Programmer's Manual"
+.SH 名前
+setaliasent, endaliasent, getaliasent, getaliasent_r, getaliasbyname,
+getaliasbyname_r \- エイリアスエントリーを読み込む
+.SH 書式
+\fB#include <aliases.h>\fP
+.PP
+\fBvoid setaliasent(void);\fP
+.PP
+\fBvoid endaliasent(void);\fP
+.PP
+\fBstruct aliasent *getaliasent(void);\fP
+.PP
+\fBint getaliasent_r(struct aliasent *\fP\fIresult\fP\fB,\fP
+.br
+\fB char *\fP\fIbuffer\fP\fB, size_t \fP\fIbuflen\fP\fB, struct aliasent **\fP\fIres\fP\fB);\fP
+.PP
+\fBstruct aliasent *getaliasbyname(const char *\fP\fIname\fP\fB);\fP
+.PP
+\fBint getaliasbyname_r(const char *\fP\fIname\fP\fB, struct aliasent
+*\fP\fIresult\fP\fB,\fP
+.br
+\fB char *\fP\fIbuffer\fP\fB, size_t \fP\fIbuflen\fP\fB, struct aliasent **\fP\fIres\fP\fB);\fP
+.SH 説明
+ネームサービススイッチ (Name Service Switch, NSS) で 利用可能なデータベースの 1 つとして、
+メールエイリアスを保持するエイリアスデータベースがある。 (どのデータベースがサポートされているかを調べるには、 getent \-\-help
+を実行すること。)  エイリアスデータベースにアクセスするために、 6 つの関数が提供されている。
+.PP
+\fBgetaliasent\fP()  関数はエイリアスデータベースから取り出した グループ情報を含む構造体へのポインターを返す。 1
+回目に関数が呼ばれたときには、最初のエントリーを返す; それ以降はその後のエントリーを返す。
+.PP
+\fBsetaliasent\fP()  関数はファイルポインターをエイリアスデータベースの先頭に巻き戻す。
+.PP
+\fBendaliasent\fP()  関数はエイリアスデータベースをクローズする。
+.PP
+\fBgetaliasent_r\fP()  関数は上記の関数のリエントラント版である。 要求された構造体は第 1 引き数に格納されるが、
+プログラマは他の引き数も埋めてやる必要がある。 充分な領域が与えられないと、この関数は失敗する。
+.PP
+関数 \fBgetaliasbyname\fP()  は name 引き数をとり、エイリアスデータベースを検索する。 エントリーは \fIstruct
+aliasent\fP へのポインターとして返される。
+.PP
+\fBgetaliasbyname_r\fP()  は上記の関数のリエントラント版である。 要求された構造体は第 2 引き数に格納されるが、
+プログラマは他の引き数も埋めてやる必要がある。 充分な領域が与えられないと、この関数は失敗する。
+.PP
+\fIstruct aliasent\fP は \fI<aliases.h>\fP で定義されている。
+.PP
+.in +4n
+.EX
+struct aliasent {
+    char    *alias_name;             /* エイリアス名 */
+    size_t   alias_members_len;
+    char   **alias_members;          /* エイリアス名のリスト */
+    int      alias_local;
+};
+.EE
+.in
+.SH 返り値
+関数 \fBgetaliasent_r\fP()  と \fBgetaliasbyname_r\fP()  は、エラーの場合に 0 以外の値を返す。
+.SH ファイル
+デフォルトのエイリアスデータベースは、ファイル \fI/etc/aliases\fP である。 これは \fI/etc/nsswitch.conf\fP
+ファイルで変更できる。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.ad l
+.TS
+allbox;
+lbw19 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBsetaliasent\fP(),
+\fBendaliasent\fP(),
+\fBgetaliasent_r\fP(),
+\fBgetaliasbyname_r\fP()
+T}     Thread safety   MT\-Safe locale
+T{
+\fBgetaliasent\fP(),
+\fBgetaliasbyname\fP()
+T}     Thread safety   MT\-Unsafe
+.TE
+.ad
+.SH 準拠
+このルーチンは glibc 固有のものである。 NeXT システムには同様のルーチンがある。
+.PP
+.in +4n
+.EX
+#include <aliasdb.h>
+
+void alias_setent(void);
+void alias_endent(void);
+alias_ent *alias_getent(void);
+alias_ent *alias_getbyname(char *name);
+.EE
+.in
+.SH EXAMPLES
+以下の例は \fIgcc example.c \-o example\fP でコンパイルできる。 これはエイリアスデータベースにある全ての名前をダンプする。
+.PP
+.EX
+#include <aliases.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+
+int
+main(void)
+{
+    struct aliasent *al;
+    setaliasent();
+    for (;;) {
+        al = getaliasent();
+        if (al == NULL)
+            break;
+        printf("Name: %s\en", al\->alias_name);
+    }
+    if (errno) {
+        perror("reading alias");
+        exit(EXIT_FAILURE);
+    }
+    endaliasent();
+    exit(EXIT_SUCCESS);
+.EE
+.SH 関連項目
+.\"
+.\" /etc/sendmail/aliases
+.\" Yellow Pages
+.\" newaliases, postalias
+\fBgetgrent\fP(3), \fBgetpwent\fP(3), \fBgetspent\fP(3), \fBaliases\fP(5)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/setenv.3 b/manual/LDP_man-pages/draft/man3/setenv.3
new file mode 100644 (file)
index 0000000..3ec2c3a
--- /dev/null
@@ -0,0 +1,122 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\" and Copyright (C) 2004, 2007 Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified Sat Jul 24 18:20:58 1993 by Rik Faith (faith@cs.unc.edu)
+.\" Modified Fri Feb 14 21:47:50 1997 by Andries Brouwer (aeb@cwi.nl)
+.\" Modified 9 Jun 2004, Michael Kerrisk <mtk.manpages@gmail.com>
+.\"     Changed unsetenv() prototype; added EINVAL error
+.\"     Noted nonstandard behavior of setenv() if name contains '='
+.\" 2005-08-12, mtk, glibc 2.3.4 fixed the "name contains '='" bug
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
+.\"    all rights reserved.
+.\" Translated 1997-12-19, HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
+.\" Updated & Modified 2005-02-17, Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated & Modified 2005-10-02, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2008-08-08, Akihiro MOTOKI, LDP v3.05
+.\" Updated 2010-04-10, Akihiro MOTOKI, LDP v3.24
+.\"
+.TH SETENV 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+setenv \- 環境変数を変更または追加する
+.SH 書式
+.nf
+\fB#include <stdlib.h>\fP
+.PP
+\fBint setenv(const char *\fP\fIname\fP\fB, const char *\fP\fIvalue\fP\fB, int \fP\fIoverwrite\fP\fB);\fP
+.PP
+\fBint unsetenv(const char *\fP\fIname\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBsetenv\fP(), \fBunsetenv\fP():
+.RS 4
+_POSIX_C_SOURCE\ >=\ 200112L
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE
+.RE
+.ad b
+.SH 説明
+\fBsetenv\fP()  関数は、\fIname\fP が存在しない場合 環境変数 \fIname\fP に値 \fIvalue\fP を設定し、環境に追加する。
+\fIname\fP が環境に存在する場合、\fIoverwrite\fP が 0 以外ならば その値を \fIvalue\fP に変更し、\fIoverwrite\fP が
+0 ならば \fIname\fP の値を変更しない (\fBsetenv\fP() は成功のステータスを返す)。 この関数は、 (\fBputenv\fP(3)
+と違い)  \fIname\fP と \fIvalue\fP により参照される文字列のコピーを行う。
+.PP
+\fBunsetenv\fP()  関数は、変数 \fIname\fP を環境から削除する。 \fIname\fP
+が環境にない場合、この関数は成功し、環境は変更されない。
+.SH 返り値
+\fBsetenv\fP()  and \fBunsetenv\fP()  functions return zero on success, or \-1 on
+error, with \fIerrno\fP set to indicate the cause of the error.
+.SH エラー
+.TP 
+\fBEINVAL\fP
+\fIname\fP が NULL であるか、長さが 0 の文字列を指しているか、 \(aq=\(aq 文字が含まれている。
+.TP 
+\fBENOMEM\fP
+環境に新しい変数を追加するのに十分なメモリーがない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.ad l
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBsetenv\fP(),
+\fBunsetenv\fP()
+T}     Thread safety   MT\-Unsafe const:env
+.TE
+.ad
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, 4.3BSD.
+.SH 注意
+POSIX.1 does not require \fBsetenv\fP()  or \fBunsetenv\fP()  to be reentrant.
+.PP
+Prior to glibc 2.2.2, \fBunsetenv\fP()  was prototyped as returning \fIvoid\fP;
+more recent glibc versions follow the POSIX.1\-compliant prototype shown in
+the SYNOPSIS.
+.SH バグ
+POSIX.1 specifies that if \fIname\fP contains an \(aq=\(aq character, then
+\fBsetenv\fP()  should fail with the error \fBEINVAL\fP; however, versions of
+glibc before 2.3.4 allowed an \(aq=\(aq sign in \fIname\fP.
+.SH 関連項目
+\fBclearenv\fP(3), \fBgetenv\fP(3), \fBputenv\fP(3), \fBenviron\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
index 1623f75..a9f9b5f 100644 (file)
@@ -124,12 +124,12 @@ setlocale(LC_ALL, "");
 この文字列は静的な記憶域に割り当てられているかもしれない。 この返って来た文字列を、カテゴリー指定と共に、 のちの setlocale
 の呼び出しに指定すれば、 プロセスのその部分のロケールが復元される。 設定に失敗した場合には、返り値は NULL になる。
 .SH 属性
-For an explanation of the terms used in this section, see \fBattributes\fP(7).
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
 .TS
 allbox;
 lb lb lbw26
 l l l.
-Interface      Attribute       Value
+インターフェース       属性  値
 T{
 \fBsetlocale\fP()
 T}     Thread safety   MT\-Unsafe const:locale env
diff --git a/manual/LDP_man-pages/draft/man3/setlogmask.3 b/manual/LDP_man-pages/draft/man3/setlogmask.3
new file mode 100644 (file)
index 0000000..90f135d
--- /dev/null
@@ -0,0 +1,87 @@
+.\" Copyright (C) 2001 Andries Brouwer <aeb@cwi.nl>.
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2001 Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated Sat Nov  3 01:46:03 JST 2001
+.\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH SETLOGMASK 3 2020\-06\-09 "" "Linux Programmer's Manual"
+.SH 名前
+setlogmask \- ログの優先度マスクを設定する
+.SH 書式
+.nf
+\fB#include <syslog.h>\fP
+.PP
+\fBint setlogmask(int \fP\fImask\fP\fB);\fP
+.fi
+.SH 説明
+プロセスにはログ優先度マスク(log priority mask)が用意されていて、 これを用いて \fBsyslog\fP(3)
+が呼び出された場合にログ記録を行うかどうかを決定する。 他のすべての関数が呼び出された場合はログ記録が行われない。 \fImask\fP
+の各ビットは優先度に対応しており、対応するビットが 1 にセットされている 優先度に対してログ収集(logging)が有効になる。
+マスクの初期値は、すべての優先度に対してログ収集が有効になるような値である。
+.PP
+\fBsetlogmask\fP()  関数は、呼び出し元のプロセスに対するログマスクを設定し、 変更前のマスクを返す。 \fImask\fP 引き数が 0
+ならば、現在のログマスクは変更されない。
+.PP
+以下の8レベルの優先度が定義されている(優先度の高い順): \fBLOG_EMERG\fP, \fBLOG_ALERT\fP, \fBLOG_CRIT\fP,
+\fBLOG_ERR\fP, \fBLOG_WARNING\fP, \fBLOG_NOTICE\fP, \fBLOG_INFO\fP, \fBLOG_DEBUG\fP。 優先度
+\fIp\fP に対応するビット列は \fILOG_MASK(p)\fP によって求められる。 優先度 \fIp\fP 以上のすべての優先度 (\fIp\fP を含む)
+のマスクビットを 求めることができるマクロ \fILOG_UPTO(p)\fP を使用できるシステムもある。
+.SH 返り値
+変更前のログ優先度マスクの値を返す。
+.SH エラー
+.\" .SH NOTES
+.\" The glibc logmask handling was broken in versions before glibc 2.1.1.
+なし。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lbw22
+l l l.
+インターフェース       属性  値
+T{
+\fBsetlogmask\fP()
+T}     Thread safety   MT\-Unsafe race:LogMask
+.TE
+.sp 1
+.SH 準拠
+.\" Note that the description in POSIX.1-2001 is flawed.
+POSIX.1\-2001, POSIX.1\-2008.
+.PP
+.\" FIXME . https://www.austingroupbugs.net/view.php?id=1033
+\fBLOG_UPTO\fP()  will be included in the next release of the POSIX
+specification (Issue 8).
+.SH 関連項目
+\fBcloselog\fP(3), \fBopenlog\fP(3), \fBsyslog\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/setnetgrent.3 b/manual/LDP_man-pages/draft/man3/setnetgrent.3
new file mode 100644 (file)
index 0000000..74ae5a2
--- /dev/null
@@ -0,0 +1,124 @@
+.\"  Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
+.\" Distributed under GPL
+.\" %%%LICENSE_END
+.\"
+.\"  based on glibc infopages
+.\" polished - aeb
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2005  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2005-02-20, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH SETNETGRENT 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+setnetgrent, endnetgrent, getnetgrent, getnetgrent_r, innetgr \-
+ネットワークグループのエントリーを操作する
+.SH 書式
+.nf
+\fB#include <netdb.h>\fP
+.PP
+\fBint setnetgrent(const char *\fP\fInetgroup\fP\fB);\fP
+.PP
+\fBvoid endnetgrent(void);\fP
+.PP
+\fBint getnetgrent(char **\fP\fIhost\fP\fB, char **\fP\fIuser\fP\fB, char **\fP\fIdomain\fP\fB);\fP
+.PP
+\fBint getnetgrent_r(char **\fP\fIhost\fP\fB, char **\fP\fIuser\fP\fB,\fP
+\fB                  char **\fP\fIdomain\fP\fB, char *\fP\fIbuf\fP\fB, size_t \fP\fIbuflen\fP\fB);\fP
+.PP
+\fBint innetgr(const char *\fP\fInetgroup\fP\fB, const char *\fP\fIhost\fP\fB,\fP
+\fB            const char *\fP\fIuser\fP\fB, const char *\fP\fIdomain\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBsetnetgrent\fP(),
+\fBendnetgrent\fP(),
+\fBgetnetgrent\fP(),
+\fBgetnetgrent_r\fP(),
+\fBinnetgr\fP():
+    Since glibc 2.19:
+        _DEFAULT_SOURCE
+    Glibc 2.19 and earlier:
+        _BSD_SOURCE || _SVID_SOURCE
+.ad b
+.SH 説明
+\fInetgroup\fP は SunOS で考案されたものである。ネットグループのデータベースの エントリーは、 3 つの文字列のリスト
+(\fIhostname\fP, \fIusername\fP, \fIdomainname\fP)  もしくはネットグループ名である。
+前記のリストの各要素は空であってもよい。 空は何とでも一致することを意味する。 本ページで説明する関数を使うことで、ネットグループのデータベースに
+アクセスすることができる。どのデータベースが検索されるかは \fI/etc/nsswitch.conf\fP ファイルで定義されている。
+.PP
+\fBsetnetgrent\fP()  コールは、この後で呼ばれる \fBgetnetgrent\fP()  コールが検索するネットグループを定める。
+\fBgetnetgrent\fP()  関数はネットグループの次のエントリーを取得し、 \fIhost\fP, \fIuser\fP, \fIdomain\fP
+にポインターを入れて返る。ヌルポインターは、対応するエントリーがどんな文字列とも一致することを意味する。
+得られたポインターは、ネットグループ関係の関数のいずれかが呼ばれるまでの 間だけ有効である。この問題を避けるためには GNU 拡張の関数
+\fBgetnetgrent_r\fP()  を使うとよい。この関数は呼び出し側が用意したバッファーに
+文字列を格納する。割り当て済のバッファーを全て解放するには \fBendnetgrent\fP()  を使用する。
+.PP
+ほとんどの場合、 (\fIhostname\fP, \fIusername\fP, \fIdomainname\fP)
+の3要素の組がネットグループのメンバーかどうかを確認したいだけであろう。 \fBinnetgr\fP()
+関数を使うと、上記の3つの関数を呼び出さずにこの目的を達成できる。 もう一度書いておくが、NULL ポインターはワイルドカードであり、
+あらゆる文字列と一致する。この関数はスレッドセーフである。
+.SH 返り値
+これらの関数は成功すると 1 を、失敗すると 0 を返す。
+.SH ファイル
+\fI/etc/netgroup\fP
+.br
+\fI/etc/nsswitch.conf\fP
+.SH 属性
+この節で使用されている用語の説明は \fBattributes\fP(7) を参照のこと。
+.TS
+allbox;
+lbw16 lb lbw23
+l l l.
+Interface      Attribute       Value
+T{
+\fBsetnetgrent\fP(),
+.br
+\fBgetnetgrent_r\fP(),
+.br
+\fBinnetgr\fP()
+T}     Thread safety   T{
+MT\-Unsafe race:netgrent
+.br
+locale
+T}
+T{
+\fBendnetgrent\fP()
+T}     Thread safety   MT\-Unsafe race:netgrent
+T{
+\fBgetnetgrent\fP()
+T}     Thread safety   T{
+MT\-Unsafe race:netgrent
+.br
+race:netgrentbuf locale
+T}
+.TE
+.sp 1
+In the above table, \fInetgrent\fP in \fIrace:netgrent\fP signifies that if any of
+the functions \fBsetnetgrent\fP(), \fBgetnetgrent_r\fP(), \fBinnetgr\fP(),
+\fBgetnetgrent\fP(), or \fBendnetgrent\fP()  are used in parallel in different
+threads of a program, then data races could occur.
+.SH 準拠
+.\" getnetgrent_r() is on Solaris 8 and AIX 5.1, but not the BSDs.
+These functions are not in POSIX.1, but \fBsetnetgrent\fP(), \fBendnetgrent\fP(),
+\fBgetnetgrent\fP(), and \fBinnetgr\fP()  are available on most UNIX systems.
+\fBgetnetgrent_r\fP()  is not widely available on other systems.
+.SH 注意
+BSD の実装では \fBsetnetgrent\fP()  は void を返す。
+.SH 関連項目
+\fBsethostent\fP(3), \fBsetprotoent\fP(3), \fBsetservent\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/siginterrupt.3 b/manual/LDP_man-pages/draft/man3/siginterrupt.3
new file mode 100644 (file)
index 0000000..a5e5968
--- /dev/null
@@ -0,0 +1,99 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified Sun Jul 25 10:40:51 1993 by Rik Faith (faith@cs.unc.edu)
+.\" Modified Sun Apr 14 16:20:34 1996 by Andries Brouwer (aeb@cwi.nl)
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1998 HANATAKA Shinya
+.\"         all rights reserved.
+.\" Translated Sun May 24 13:44:00 JST 1998
+.\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
+.\"
+.TH SIGINTERRUPT 3 2016\-03\-15 "" "Linux Programmer's Manual"
+.SH 名前
+siginterrupt \- シグナルでシステムコールに割り込むことを許す
+.SH 書式
+.nf
+\fB#include <signal.h>\fP
+.PP
+\fBint siginterrupt(int \fP\fIsig\fP\fB, int \fP\fIflag\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBsiginterrupt\fP():
+.ad l
+.RS 4
+.\"    || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
+_XOPEN_SOURCE\ >=\ 500
+    || /* Since glibc 2.12: */ _POSIX_C_SOURCE\ >=\ 200809L
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE
+.RE
+.ad
+.SH 説明
+\fBsiginterrupt\fP()  関数は、システムコールがシグナル \fIsig\fP によって割り込まれた後、再実行の際の振る舞いを変更する。
+\fIflag\fP 引き数が偽 (0) ならば、システムコールが指定した シグナル \fIsig\fP によって割り込まれた後に、そのシステムコールは
+再実行される。これは Linux においてデフォルトの動作である。
+.PP
+\fIflag\fP 引き数が真 (1) でデータの転送が全く行なわれていないならば、 シグナル \fIsig\fP でシステムコールは中断されて、\-1 が返され、
+\fIerrno\fP に \fBEINTR\fP が設定される。
+.PP
+\fIflag\fP 引き数が真 (1) でデータの転送が開始されていれば、 システムコールは中断され、それまでに実際に転送されたデータ の量が返される。
+.SH 返り値
+\fBsiginterrupt\fP()  関数は成功した場合 0 を返す。 シグナル番号 \fIsig\fP が不正な場合、 \-1 を返し、 \fIerrno\fP
+にエラーの原因を示す値を設定する。
+.SH エラー
+.TP 
+\fBEINVAL\fP
+指定したシグナル番号が不正である。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBsiginterrupt\fP()
+T}     Thread safety   MT\-Unsafe const:sigintr
+.TE
+.SH 準拠
+4.3BSD, POSIX.1\-2001.  POSIX.1\-2008 は、 \fBsiginterrupt\fP()  を廃止予定としている。 代わりに、
+\fBsigaction\fP(2)  に \fBSA_RESTART\fP フラグを指定して使うことを推奨している。
+.SH 関連項目
+\fBsignal\fP(2)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/signbit.3 b/manual/LDP_man-pages/draft/man3/signbit.3
new file mode 100644 (file)
index 0000000..58e011d
--- /dev/null
@@ -0,0 +1,73 @@
+.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
+.\" Distributed under GPL
+.\" %%%LICENSE_END
+.\"
+.\" Based on glibc infopages, copyright Free Software Foundation
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2002 Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated Sun Sep 22 09:46:55 2002
+.\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH SIGNBIT 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+signbit \- 浮動小数点実数の符号 (sign) を調べる
+.SH 書式
+\fB#include <math.h>\fP
+.PP
+\fBint signbit(\fP\fIx\fP\fB);\fP
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBsignbit\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+.RE
+.ad
+.SH 説明
+\fBsignbit\fP()  は、あらゆる種類の浮動小数点実数に対して 適用可能な汎用的なマクロである。 \fIx\fP
+の値の符号ビットがセットされている場合、非 0 の値を返す。
+.PP
+このマクロは \fIx < 0.0\fP と全く同じではない。 なぜなら、IEEE 754 の浮動小数点表現では 0 も符号を持つからである。
+\fI\-0.0 < 0.0\fP という比較結果は偽 (false) だが、 \fIsignbit (\-0.0)\fP は 非 0 の値を返す。
+.PP
+NaN と無限大には符号ビットがある。
+.SH 返り値
+\fBsignbit\fP()  マクロは \fIx\fP の符号が負の場合 0 以外を返し、そうでない場合 0 を返す。
+.SH エラー
+エラーは発生しない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBsignbit\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, C99.  This function is defined in IEC 559 (and
+the appendix with recommended functions in IEEE 754/IEEE 854).
+.SH 関連項目
+\fBcopysign\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/sigpause.3 b/manual/LDP_man-pages/draft/man3/sigpause.3
new file mode 100644 (file)
index 0000000..aa7abf4
--- /dev/null
@@ -0,0 +1,114 @@
+.\" Copyright (C) 2004 Andries Brouwer (aeb@cwi.nl)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
+.\"         all rights reserved.
+.\" Translated 1997-03-03, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
+.\" Updated 2005-12-05, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"   Catch up to LDP man-pages 2.16
+.\"   Rename sigpause.2 to sigpause.3, and modified a little.
+.\"
+.TH SIGPAUSE 3 2017\-09\-15 Linux "Linux Programmer's Manual"
+.SH 名前
+sigpause \- ブロックされたシグナルをアトミックに解放して割り込みを待つ
+.SH 書式
+.nf
+\fB#include <signal.h>\fP
+.PP
+\fBint sigpause(int \fP\fIsigmask\fP\fB);  /* BSD (ただし「備考」を参照) */\fP
+.PP
+\fBint sigpause(int \fP\fIsig\fP\fB);      /* System V / UNIX 95 */\fP
+.fi
+.SH 説明
+この関数を使わないこと。 代わりに \fBsigsuspend\fP(2)  を使うこと。
+.PP
+関数 \fBsigpause\fP()  はシグナルを待つように設計されている。 この関数はプロセスのシグナルマスク (ブロックされたシグナルのセット)
+を変更し、 シグナルが到着するのを待つ。 シグナルが到着すると、シグナルマスクは元に戻される。
+.SH 返り値
+\fBsigpause\fP()  が返った場合、この関数はシグナルによって割り込まれている。 返り値は \-1 で、 \fIerrno\fP は \fBEINTR\fP
+に設定される。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBsigpause\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.\" FIXME: The marking is different from that in the glibc manual,
+.\" marking in glibc manual is more detailed:
+.\"
+.\" sigpause: MT-Unsafe race:sigprocmask/!bsd!linux
+.\"
+.\" glibc manual says /!linux!bsd indicate the preceding marker only applies
+.\" when the underlying kernel is neither Linux nor a BSD kernel.
+.\" So, it is safe in Linux kernel.
+.SH 準拠
+The System V version of \fBsigpause\fP()  is standardized in POSIX.1\-2001.  It
+is also specified in POSIX.1\-2008, where it is marked obsolete.
+.SH 注意
+.SS 歴史
+.\" __xpg_sigpause: UNIX 95, spec 1170, SVID, SVr4, XPG
+この関数の古典的な BSD 版は 4.2BSD で登場した。 この関数はプロセスのシグナルマスクを \fIsigmask\fP に設定する。 UNIX 95
+では BSD 版と互換性のない System V 版のこの関数が標準化された。 UNIX 95 版は、指定されたシグナル \fIsig\fP
+をプロセスのシグナルマスクから削除するだけである。 同じ名前で互換性のない 2 つの関数があるという不幸な事態は、 \fB\%sigsuspend\fP(2)
+関数によって解消された。 この関数は (\fIint\fP の代わりに)  \fBsigset_t\ *\fP 引き数をとる。
+.SS "Linux での注意"
+Linux では、このルーチンは Sparc (sparc64) アーキテクチャーでのみ システムコールとなっている。
+.PP
+.\" Libc4 and libc5 know only about the BSD version.
+.\"
+Glibc uses the BSD version if the \fB_BSD_SOURCE\fP feature test macro is
+defined and none of \fB_POSIX_SOURCE\fP, \fB_POSIX_C_SOURCE\fP, \fB_XOPEN_SOURCE\fP,
+\fB_GNU_SOURCE\fP, or \fB_SVID_SOURCE\fP is defined.  Otherwise, the System V
+version is used, and feature test macros must be defined as follows to
+obtain the declaration:
+.IP * 3
+.\" || (_XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED)
+Since glibc 2.26: _XOPEN_SOURCE >= 500
+.IP *
+Glibc 2.25 and earlier: _XOPEN_SOURCE
+.PP
+.\"
+.\" For the BSD version, one usually uses a zero
+.\" .I sigmask
+.\" to indicate that no signals are to be blocked.
+Since glibc 2.19, only the System V version is exposed by
+\fI<signal.h>\fP; applications that formerly used the BSD \fBsigpause\fP()
+should be amended to use \fBsigsuspend\fP(2).
+.SH 関連項目
+\fBkill\fP(2), \fBsigaction\fP(2), \fBsigprocmask\fP(2), \fBsigsuspend\fP(2),
+\fBsigblock\fP(3), \fBsigvec\fP(3), \fBfeature_test_macros\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/sigqueue.3 b/manual/LDP_man-pages/draft/man3/sigqueue.3
new file mode 100644 (file)
index 0000000..3ba57ab
--- /dev/null
@@ -0,0 +1,133 @@
+.\" Copyright (c) 2002 Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" added note on self-signaling, aeb, 2002-06-07
+.\" added note on CAP_KILL, mtk, 2004-06-16
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2002, 2005 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated 2002-08-06, Yuichi SATO <ysato@h4.dion.ne.jp>
+.\" Updated & Modified 2005-01-08, Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated 2007-09-08, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.64
+.\" Updated 2013-05-04, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH SIGQUEUE 3 2017\-09\-15 Linux "Linux Programmer's Manual"
+.SH 名前
+sigqueue \- シグナルとデータをプロセスに送る
+.SH 書式
+\fB#include <signal.h>\fP
+.PP
+\fBint sigqueue(pid_t \fP\fIpid\fP\fB, int \fP\fIsig\fP\fB, const union sigval
+\fP\fIvalue\fP\fB);\fP
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBsigqueue\fP(): _POSIX_C_SOURCE\ >=\ 199309L
+.SH 説明
+\fBsigqueue\fP()  は \fIsig\fP で指定されたシグナルを、PID が \fIpid\fP であるプロセスに送る。 シグナルを送るのに必要な権限は
+\fBkill\fP(2)  と同じである。 \fBkill\fP(2)  と同様に、ヌルシグナル (0) を使って 指定した PID
+のプロセスが存在するかをチェックすることができる。
+.PP
+\fIvalue\fP 引き数はシグナルと一緒に送るデータの付属アイテムを指定する。 \fIvalue\fP は (整数またはポインターの値であり)
+以下のような型である。
+.PP
+.in +4n
+.EX
+union sigval {
+    int   sival_int;
+    void *sival_ptr;
+};
+.EE
+.in
+.PP
+受取先のプロセスに、このシグナルに対するハンドラーを (\fBsigaction\fP(2)  に \fBSA_SIGINFO\fP を指定して)
+インストールしておくと、 そのハンドラーの第 2 引き数に渡される \fIsiginfo_t\fP 構造体の \fIsi_value\fP
+フィールドによって、このデータを取得できる。 さらに、この構造体の \fIsi_code\fP フィールドは \fBSI_QUEUE\fP に設定される。
+.SH 返り値
+成功した場合、 \fBsigqueue\fP()  は 0 を返す。 これは受け取り側プロセスの待ち行列に シグナルが正しく入れられたことを示す。
+失敗した場合は \-1 が返され、 \fIerrno\fP がエラーを表す値に設定される。
+.SH エラー
+.TP 
+\fBEAGAIN\fP
+待ち行列に入れられるシグナルの最大数に達した (より詳しい情報は \fBsignal\fP(7)  を参照すること)。
+.TP 
+\fBEINVAL\fP
+\fIsig\fP が不正である。
+.TP 
+\fBEPERM\fP
+このプロセスには、受け取り側プロセスにシグナルを送る権限がない。 必要な権限については、 \fBkill\fP(2)  を参照すること。
+.TP 
+\fBESRCH\fP
+\fIpid\fP にマッチする PID のプロセスがない。
+.SH バージョン
+\fBsigqueue\fP()  and the underlying \fBrt_sigqueueinfo\fP()  system call first
+appeared in Linux 2.2.
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBsigqueue\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+この関数を呼び出したプロセスにこの関数がシグナルを送ったときに、 シグナルが呼び出し側スレッドにブロックされず、 かつ
+(シグナルがブロックされなかった、または \fBsigwait\fP(3)  を使用するのを待っていることにより)
+このシグナルを扱うスレッドが何もない場合は、 この関数がリターンする前に、少なくとも そのスレッドに対してシグナルが配送されていなければならない。
+.SS "C library/kernel differences"
+On Linux, \fBsigqueue\fP()  is implemented using the \fBrt_sigqueueinfo\fP(2)
+system call.  The system call differs in its third argument, which is the
+\fIsiginfo_t\fP structure that will be supplied to the receiving process's
+signal handler or returned by the receiving process's \fBsigtimedwait\fP(2)
+call.  Inside the glibc \fBsigqueue\fP()  wrapper, this argument, \fIuinfo\fP, is
+initialized as follows:
+.PP
+.in +4n
+.EX
+uinfo.si_signo = sig;      /* Argument supplied to sigqueue() */
+uinfo.si_code = SI_QUEUE;
+uinfo.si_pid = getpid();   /* Process ID of sender */
+uinfo.si_uid = getuid();   /* Real UID of sender */
+uinfo.si_value = val;      /* Argument supplied to sigqueue() */
+.EE
+.in
+.SH 関連項目
+\fBkill\fP(2), \fBrt_sigqueueinfo\fP(2), \fBsigaction\fP(2), \fBsignal\fP(2),
+\fBpthread_sigqueue\fP(3), \fBsigwait\fP(3), \fBsignal\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
index 1be9556..6aa6695 100644 (file)
@@ -102,12 +102,12 @@ _XOPEN_SOURCE\ >=\ 500
 .PP
 \fBsigignore\fP()  に関しては、 \fBsigaction\fP(2)  の「エラー」の節を参照。
 .SH 属性
-For an explanation of the terms used in this section, see \fBattributes\fP(7).
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
 .TS
 allbox;
 lbw23 lb lb
 l l l.
-Interface      Attribute       値
+インターフェース       属性  値
 T{
 \fBsigset\fP(),
 \fBsighold\fP(),
index e845284..2ecd603 100644 (file)
@@ -139,12 +139,12 @@ vec.sv_mask = sigmask(SIGQUIT) | sigmask(SIGABRT);
 (後方互換性を保証するために、glibc のシンボルのバージョン付け機構により、
 古いバージョンのライブラリとリンクされたバイナリに対してはこのインターフェースが引き続き公開されている。)
 .SH 属性
-For an explanation of the terms used in this section, see \fBattributes\fP(7).
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
 .TS
 allbox;
 lbw32 lb lb
 l l l.
-Interface      Attribute       値
+インターフェース       属性  値
 T{
 \fBsigvec\fP(),
 \fBsigmask\fP(),
diff --git a/manual/LDP_man-pages/draft/man3/sigwait.3 b/manual/LDP_man-pages/draft/man3/sigwait.3
new file mode 100644 (file)
index 0000000..60af1df
--- /dev/null
@@ -0,0 +1,103 @@
+.\" Copyright (c) 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2008  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2008-08-21, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.04
+.\"
+.TH SIGWAIT 3 2020\-06\-09 Linux "Linux Programmer's Manual"
+.SH 名前
+sigwait \- シグナルを待つ
+.SH 書式
+.nf
+\fB#include <signal.h>\fP
+.PP
+\fB int sigwait(const sigset_t *\fP\fIset\fP\fB, int *\fP\fIsig\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBsigwait\fP():
+.RS 4
+Since glibc 2.26:
+    _POSIX_C_SOURCE >= 199506L
+.br
+Glibc 2.25 and earlier:
+    _POSIX_C_SOURCE
+.RE
+.ad b
+.SH 説明
+\fBsigwait\fP()  関数は、シグナル集合 \fIset\fP で指定されたシグナルの一つが処理待ち (pending) になるまで、
+呼び出したスレッドの実行を中断する。 この関数はそのシグナルを受け取り (つまり、処理待ちのシグナルのリスト
+からそのシグナルを削除し)、そのシグナル番号を \fIsig\fP に格納して返す。
+.PP
+\fBsigwait\fP()  の動作は \fBsigwaitinfo\fP(2)  と同じだが、以下の点が異なる。
+.IP * 2
+\fBsigwait\fP()  は、シグナルの内容を表す \fIsiginfo_t\fP 構造体を返すのではなく、単にシグナル番号を返す。
+.IP *
+返り値が \fBsigwaitinfo\fP(2)  とは異なる。
+.SH 返り値
+成功すると、 \fBsigwait\fP()  は 0 を返す。 エラーの場合、(「エラー」の節のリストにある) 正のエラー番号を返す。
+.SH エラー
+.TP 
+\fBEINVAL\fP
+.\" Does not occur for glibc.
+\fIset\fP に無効なシグナル番号が入っている。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBsigwait\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+\fBsigwait\fP()  は \fBsigtimedwait\fP(2)  を使って実装されている。
+.PP
+The glibc implementation of \fBsigwait\fP()  silently ignores attempts to wait
+for the two real\-time signals that are used internally by the NPTL threading
+implementation.  See \fBnptl\fP(7)  for details.
+.SH EXAMPLES
+\fBpthread_sigmask\fP(3)  を参照。
+.SH 関連項目
+\fBsigaction\fP(2), \fBsignalfd\fP(2), \fBsigpending\fP(2), \fBsigsuspend\fP(2),
+\fBsigwaitinfo\fP(2), \fBsigsetops\fP(3), \fBsignal\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/sin.3 b/manual/LDP_man-pages/draft/man3/sin.3
new file mode 100644 (file)
index 0000000..614049f
--- /dev/null
@@ -0,0 +1,120 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 2002-07-27 by Walter Harms
+.\"    (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1996 Kenji Kajiwara and Kentaro Ogawa
+.\"         all rights reserved.
+.\" Translated Sat, 13 Jul 1996 17:42:24 JST
+.\"         by Kenji Kajiwara and Kentaro Ogawa
+.\" Proof Reading: Takashi Yoshino
+.\" Updated & Modified Thu Feb 17 22:27:53 JST 2005
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH SIN 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+sin, sinf, sinl \- 正弦 (サイン) 関数
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBdouble sin(double \fP\fIx\fP\fB);\fP
+\fBfloat sinf(float \fP\fIx\fP\fB);\fP
+\fBlong double sinl(long double \fP\fIx\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBsinf\fP(), \fBsinl\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad
+.SH 説明
+These functions return the sine of \fIx\fP, where \fIx\fP is given in radians.
+.SH 返り値
+成功すると、これらの関数は \fIx\fP の正弦を返す。
+.PP
+\fIx\fP が NaN の場合、NaN が返される。
+.PP
+.\"
+.\" POSIX.1 allows an optional range error for subnormal x
+.\" glibc 2.8 doesn't do this
+\fIx\fP が正の無限大か負の無限大の場合、 領域エラー (domain error) が発生し、NaN が返される。
+.SH エラー
+これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
+.PP
+以下のエラーが発生する可能性がある。
+.TP 
+領域エラー (domain error): \fIx\fP が無限大である
+\fIerrno\fP に \fBEDOM\fP が設定される (「バグ」の節も参照)。 不正 (invalid) 浮動小数点例外 (\fBFE_INVALID\fP)
+が上がる。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw21 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBsin\fP(),
+\fBsinf\fP(),
+\fBsinl\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.PP
+The variant returning \fIdouble\fP also conforms to SVr4, 4.3BSD, C89.
+.SH バグ
+.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6781
+バージョン 2.10 より前の glibc の実装では、 領域エラーが発生した際に、 \fIerrno\fP に \fBEDOM\fP が設定されなかった。
+.SH 関連項目
+\fBacos\fP(3), \fBasin\fP(3), \fBatan\fP(3), \fBatan2\fP(3), \fBcos\fP(3), \fBcsin\fP(3),
+\fBsincos\fP(3), \fBtan\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/sincos.3 b/manual/LDP_man-pages/draft/man3/sincos.3
new file mode 100644 (file)
index 0000000..99dd703
--- /dev/null
@@ -0,0 +1,89 @@
+.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
+.\" Distributed under GPL
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2003  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated Tue Sep  9 04:06:20 JST 2003
+.\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH SINCOS 3 2020\-06\-09 GNU "Linux Programmer's Manual"
+.SH 名前
+sincos, sincosf, sincosl \- 正弦と余弦を同時に計算する
+.SH 書式
+.nf
+\fB#define _GNU_SOURCE\fP         /* feature_test_macros(7) 参照 */
+\fB#include <math.h>\fP
+.PP
+\fBvoid sincos(double \fP\fIx\fP\fB, double *\fP\fIsin\fP\fB, double *\fP\fIcos\fP\fB);\fP
+\fBvoid sincosf(float \fP\fIx\fP\fB, float *\fP\fIsin\fP\fB, float *\fP\fIcos\fP\fB);\fP
+\fBvoid sincosl(long double \fP\fIx\fP\fB, long double *\fP\fIsin\fP\fB, long double *\fP\fIcos\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.SH 説明
+Several applications need sine and cosine of the same angle \fIx\fP.  These
+functions compute both at the same time, and store the results in \fI*sin\fP
+and \fI*cos\fP.  Using this function can be more efficient than two separate
+calls to \fBsin\fP(3)  and \fBcos\fP(3).
+.PP
+\fIx\fP が NaN の場合、 \fI*sin\fP と \fI*cos\fP に NaN が返される。
+.PP
+\fIx\fP が正の無限大か負の無限大の場合、 領域エラー (domain error) が発生し、 \fI*sin\fP と \fI*cos\fP に NaN
+が返される。
+.SH 返り値
+これらの関数は \fIvoid\fP を返す。
+.SH エラー
+これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
+.PP
+以下のエラーが発生する可能性がある。
+.TP 
+領域エラー (domain error): \fIx\fP が無限大である
+\fIerrno\fP に \fBEDOM\fP が設定される (「バグ」の節も参照)。 不正 (invalid) 浮動小数点例外 (\fBFE_INVALID\fP)
+が上がる。
+.SH バージョン
+これらの関数は glibc バージョン 2.1 で初めて登場した。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw30 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBsincos\fP(),
+\fBsincosf\fP(),
+\fBsincosl\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+これらの関数は GNU による拡張である。
+.SH 注意
+To see the performance advantage of \fBsincos\fP(), it may be necessary to
+disable \fBgcc\fP(1)  built\-in optimizations, using flags such as:
+.PP
+.in +4n
+.EX
+cc \-O \-lm \-fno\-builtin prog.c
+.EE
+.in
+.SH バグ
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=15467
+Before version 2.22, the glibc implementation did not set \fIerrno\fP to
+\fBEDOM\fP when a domain error occurred.
+.SH 関連項目
+\fBcos\fP(3), \fBsin\fP(3), \fBtan\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/sinh.3 b/manual/LDP_man-pages/draft/man3/sinh.3
new file mode 100644 (file)
index 0000000..a03c2b6
--- /dev/null
@@ -0,0 +1,126 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 1996-06-08 by aeb
+.\" Modified 2002-07-27 by Walter Harms
+.\"    (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1996 Kenji Kajiwara and Kentaro Ogawa
+.\"         all rights reserved.
+.\" Translated Sat, 13 Jul 1996 17:54:30 JST
+.\"         by Kenji Kajiwara and Kentaro Ogawa
+.\" Updated & Modified Thu Feb 17 22:50:25 JST 2005
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH SINH 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+sinh, sinhf, sinhl \- 双曲線正弦 (ハイパボリックサイン) 関数
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBdouble sinh(double \fP\fIx\fP\fB);\fP
+\fBfloat sinhf(float \fP\fIx\fP\fB);\fP
+\fBlong double sinhl(long double \fP\fIx\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBsinhf\fP(), \fBsinhl\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad
+.SH 説明
+These functions return the hyperbolic sine of \fIx\fP, which is defined
+mathematically as:
+.PP
+.nf
+    sinh(x) = (exp(x) \- exp(\-x)) / 2
+.fi
+.SH 返り値
+成功すると、これらの関数は \fIx\fP の双曲線正弦を返す。
+.PP
+\fIx\fP が NaN の場合、NaN が返される。
+.PP
+\fIx\fP が +0 (\-0) の場合、+0 (\-0) が返される。
+.PP
+\fIx\fP が正の無限大 (負の無限大) の場合、正の無限大 (負の無限大) が返される。
+.PP
+.\"
+.\" POSIX.1-2001 documents an optional range error (underflow)
+.\" for subnormal x;
+.\" glibc 2.8 does not do this.
+結果がオーバーフローする場合、 範囲エラー (range error) が発生し、 各関数はそれぞれ \fBHUGE_VAL\fP,
+\fBHUGE_VALF\fP, \fBHUGE_VALL\fP を返す。符号は \fIx\fP と同じになる。
+.SH エラー
+これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
+.PP
+以下のエラーが発生する可能性がある。
+.TP 
+範囲エラー (range error): 結果のオーバーフロー
+\fIerrno\fP に \fBERANGE\fP が設定される。 オーバーフロー浮動小数点例外 (\fBFE_OVERFLOW\fP)  が上がる。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw24 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBsinh\fP(),
+\fBsinhf\fP(),
+\fBsinhl\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.PP
+The variant returning \fIdouble\fP also conforms to SVr4, 4.3BSD, C89.
+.SH 関連項目
+\fBacosh\fP(3), \fBasinh\fP(3), \fBatanh\fP(3), \fBcosh\fP(3), \fBcsinh\fP(3), \fBtanh\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/sleep.3 b/manual/LDP_man-pages/draft/man3/sleep.3
new file mode 100644 (file)
index 0000000..547c68a
--- /dev/null
@@ -0,0 +1,80 @@
+.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" Modified Sat Jul 24 18:16:02 1993 by Rik Faith (faith@cs.unc.edu)
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 YOSHINO Takashi
+.\"       all rights reserved.
+.\" Translated Tue Jan 21 20:46:24 JST 1997
+.\"       by YOSHINO Takashi <yoshino@civil.jcn.nihon-u.ac.jp>
+.\"
+.TH SLEEP 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+sleep \- sleep for a specified number of seconds
+.SH 書式
+.nf
+\fB#include <unistd.h>\fP
+.PP
+\fBunsigned int sleep(unsigned int \fP\fIseconds\fP\fB);\fP
+.fi
+.SH 説明
+\fBsleep\fP()  causes the calling thread to sleep either until the number of
+real\-time seconds specified in \fIseconds\fP have elapsed or until a signal
+arrives which is not ignored.
+.SH 返り値
+要求された時間が過ぎた場合はゼロを返す。 呼び出しがシグナルハンドラーに割り込まれた場合は、 休止の残り時間を返す。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lbw27
+l l l.
+インターフェース       属性  値
+T{
+\fBsleep\fP()
+T}     Thread safety   MT\-Unsafe sig:SIGCHLD/linux
+.TE
+.sp 1
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+On Linux, \fBsleep\fP()  is implemented via \fBnanosleep\fP(2).  See the
+\fBnanosleep\fP(2)  man page for a discussion of the clock used.
+.SS "Portability notes"
+On some systems, \fBsleep\fP()  may be implemented using \fBalarm\fP(2)  and
+\fBSIGALRM\fP (POSIX.1 permits this); mixing calls to \fBalarm\fP(2)  and
+\fBsleep\fP()  is a bad idea.
+.PP
+休止中にシグナルハンドラーから \fBlongjmp\fP(3)  を使用することや \fBSIGALRM\fP
+のハンドリングを変更することは、定義されていない結果を生む。
+.SH 関連項目
+\fBsleep\fP(1), \fBalarm\fP(2), \fBnanosleep\fP(2), \fBsignal\fP(2), \fBsignal\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/sockatmark.3 b/manual/LDP_man-pages/draft/man3/sockatmark.3
new file mode 100644 (file)
index 0000000..9834d11
--- /dev/null
@@ -0,0 +1,127 @@
+.\" Copyright (c) 2006, Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2006 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated 2006-08-01 by Yuichi SATO <ysato444@yahoo.co.jp>, LDP v2.36
+.\"
+.TH SOCKATMARK 3 2020\-06\-09 Linux "Linux Programmer's Manual"
+.SH 名前
+sockatmark \- どのソケットに帯域外 (out\-of\-band) マークが付けられているかを調べる
+.SH 書式
+\fB#include <sys/socket.h>\fP
+.PP
+\fBint sockatmark(int \fP\fIsockfd\fP\fB);\fP
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBsockatmark\fP(): _POSIX_C_SOURCE\ >=\ 200112L
+.ad b
+.SH 説明
+\fBsockatmark\fP()  はファイルディスクリプター \fIsockfd\fP で参照されるソケットに帯域外マークが付けられているか否かを返す。
+ソケットにマークが付けられている場合は、1 が返される。 ソケットにマークが付けられていない場合は、0 が返される。
+この関数は帯域外マークを削除しない。
+.SH 返り値
+\fBsockatmark\fP()  の呼び出しが成功した場合、ソケットに帯域外マークが 付けられていれば 1 を返し、付けられていなければ 0 を返す。
+エラーの場合は \-1 が返され、エラーを表す \fIerrno\fP が設定される。
+.SH エラー
+.TP 
+\fBEBADF\fP
+\fIsockfd\fP が有効なファイルディスクリプターでない。
+.TP 
+\fBEINVAL\fP
+.\" POSIX.1 says ENOTTY for this case
+\fIsockfd\fP は \fBsockatmark\fP()  が適用できないファイルディスクリプターである。
+.SH バージョン
+\fBsockatmark\fP()  は glibc バージョン 2.2.4 で追加された。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBsockatmark\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+\fBsockatmark\fP()  が 1 を返す場合、帯域外データは \fBMSG_OOB\fP を指定した \fBrecv\fP(2)  で読み込むことができる。
+.PP
+帯域外データは、いくつかのストリームソケットプロトコルでしか サポートされていない。
+.PP
+\fBsockatmark\fP()  は \fBSIGURG\fP シグナルのハンドラーから安全に呼び出すことができる。
+.PP
+\fBsockatmark\fP()  は \fBSIOCATMARK\fP \fBioctl\fP(2)  操作を使って実装されている。
+.SH バグ
+glibc 2.4 より前のバージョンでは、 \fBsockatmark\fP()  は動作しない。
+.SH EXAMPLES
+以下のコードは、 \fBSIGURG\fP シグナルを受け取った後にマークまでの全てのデータを読み込んで (破棄し)、
+マークされたデータのバイトを読み込むのに使用できる。
+.PP
+.EX
+    char buf[BUF_LEN];
+    char oobdata;
+    int atmark, s;
+
+    for (;;) {
+        atmark = sockatmark(sockfd);
+        if (atmark == \-1) {
+            perror("sockatmark");
+            break;
+        }
+
+        if (atmark)
+            break;
+
+        s = read(sockfd, buf, BUF_LEN);
+        if (s == \-1)
+            perror("read");
+        if (s <= 0)
+            break;
+    }
+
+    if (atmark == 1) {
+        if (recv(sockfd, &oobdata, 1, MSG_OOB) == \-1) {
+            perror("recv");
+            ...
+        }
+    }
+.EE
+.SH 関連項目
+\fBfcntl\fP(2), \fBrecv\fP(2), \fBsend\fP(2), \fBtcp\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/sqrt.3 b/manual/LDP_man-pages/draft/man3/sqrt.3
new file mode 100644 (file)
index 0000000..c86ca2f
--- /dev/null
@@ -0,0 +1,114 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 2002-07-27 by Walter Harms
+.\"    (walter.harms@informatik.uni-oldenburg.de)
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1996 Kenji Kajiwara
+.\"         all rights reserved.
+.\" Translated Mon Jul 15 18:40:00 JST 1996
+.\"         by Kenji Kajiwara
+.\" Proof Reading: Takashi Yoshino
+.\" Updated Sun Sep 14 JST 2003 by Kentaro Shirakata <argrath@ub32.org>
+.\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH SQRT 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+sqrt, sqrtf, sqrtl \- 平方根関数
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBdouble sqrt(double \fP\fIx\fP\fB);\fP
+\fBfloat sqrtf(float \fP\fIx\fP\fB);\fP
+\fBlong double sqrtl(long double \fP\fIx\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBsqrtf\fP(), \fBsqrtl\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad
+.SH 説明
+These functions return the nonnegative square root of \fIx\fP.
+.SH 返り値
+成功すると、これらの関数は \fIx\fP の平方根を返す。
+.PP
+\fIx\fP が NaN の場合、NaN が返される。
+.PP
+\fIx\fP が +0 (\-0) の場合、+0 (\-0) が返される。
+.PP
+\fIx\fP が正の無限大の場合、正の無限大が返される。
+.PP
+\fIx\fP が 0 未満の場合、領域エラー (domain error) が発生し、 NaN が返される。
+.SH エラー
+これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
+.PP
+以下のエラーが発生する可能性がある。
+.TP 
+領域エラー (domain error): \fIx\fP が 0 未満
+\fIerrno\fP に \fBEDOM\fP が設定される。 不正 (invalid) 浮動小数点例外 (\fBFE_INVALID\fP)  が上がる。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw24 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBsqrt\fP(),
+\fBsqrtf\fP(),
+\fBsqrtl\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.PP
+The variant returning \fIdouble\fP also conforms to SVr4, 4.3BSD, C89.
+.SH 関連項目
+\fBcbrt\fP(3), \fBcsqrt\fP(3), \fBhypot\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/stdarg.3 b/manual/LDP_man-pages/draft/man3/stdarg.3
new file mode 100644 (file)
index 0000000..ca5c9d1
--- /dev/null
@@ -0,0 +1,207 @@
+.\" Copyright (c) 1990, 1991 The Regents of the University of California.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to Berkeley by
+.\" the American National Standards Committee X3, on Information
+.\" Processing Systems.
+.\"
+.\" %%%LICENSE_START(BSD_4_CLAUSE_UCB)
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\"    must display the following acknowledgement:
+.\"    This product includes software developed by the University of
+.\"    California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\"    may be used to endorse or promote products derived from this software
+.\"    without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\" %%%LICENSE_END
+.\"
+.\"    @(#)stdarg.3    6.8 (Berkeley) 6/29/91
+.\"
+.\" Converted for Linux, Mon Nov 29 15:11:11 1993, faith@cs.unc.edu
+.\" Additions, 2001-10-14, aeb
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1998 NAKANO Takeo all rights reserved.
+.\" Translated Fri Mar 22 1998 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
+.\" Updated Tue Oct 16 2001 by Kentaro Shirakata <argrath@ub32.org>
+.\" Updated 2013-05-06, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH STDARG 3 2020\-11\-01 "" "Linux Programmer's Manual"
+.SH 名前
+stdarg, va_start, va_arg, va_end, va_copy \- 個数、型が可変な引数リスト
+.SH 書式
+\fB#include <stdarg.h>\fP
+.PP
+\fBvoid va_start(va_list \fP\fIap\fP\fB, \fP\fIlast\fP\fB);\fP
+.br
+\fItype\fP\fB va_arg(va_list \fP\fIap\fP\fB, \fP\fItype\fP\fB);\fP
+.br
+\fBvoid va_end(va_list \fP\fIap\fP\fB);\fP
+.br
+\fBvoid va_copy(va_list \fP\fIdest\fP\fB, va_list \fP\fIsrc\fP\fB);\fP
+.SH 説明
+関数は呼び出しに際して、個数や型が可変な引数をとることができる。 インクルードファイル \fI<stdarg.h>\fP では
+\fIva_list\fP 型が宣言されており、3 つのマクロが定義されている。これらを用いると、
+呼び出された関数側では個数や型を知らない引き数のリストを、順に一 つづつ読み込むことができる。
+.PP
+呼び出される関数では、 \fIva_list\fP 型のオブジェクトが宣言されていなければならない。このオブジェクトが \fBva_start\fP(),
+\fBva_arg\fP(), \fBva_end\fP()  の各マクロによって扱われる。
+.SS va_start()
+\fBva_start\fP()  マクロは最初に呼び出さなければならない。これは \fIap\fP を初期化し、 \fBva_arg\fP()  と
+\fBva_end\fP()  で用いることができるようにする。
+.PP
+引き数 \fIlast\fP は引き数リストのうち、可変な部分の直前に置かれる引き数の名前であ る。つまり呼び出された関数が型を知っている最後の引き数である。
+.PP
+この引き数はレジスター変数や関数、配列として 宣言してはならない。この引き数のアドレスが \fBva_start\fP()
+マクロで用いられるかもしれないからである。
+.SS va_arg()
+\fBva_arg\fP()  マクロは、呼び出し時に指定された引き数のうち、 次の位置にあるものを指定した型 \fItype\fP の値として取得する。 引き数
+\fIap\fP は \fIva_list\fP \fIap\fP で、 \fBva_start\fP()  によって初期化されている必要がある。 \fBva_arg\fP()
+を呼び出すごとに \fIap\fP は変更され、次回の呼び出しの際に、さらに次の引き数を返すようになる。 引き数 \fItype\fP は型の名前である。
+\fItype\fP の前に * を付ければ、オブジェクトへの型付きポインターが得られる。
+.PP
+\fBva_start\fP()  マクロの直後に \fBva_arg\fP()  を最初に実行すると、 \fIlast\fP
+の次の引き数が返る。続けて実行すると、残りの引き数がそれぞれ返る。
+.PP
+次の引き数がなかったり、 \fItype\fP が次の引き数の実際の型と互換でない場合 (デフォルトの引き数変換で扱 えなかった場合)
+には、予測できないエラーが起こる。
+.PP
+\fIap\fP が \fBva_arg(\fP\fIap\fP\fB,\fP\fItype\fP\fB)\fP の形で関数に渡されると、 \fIap\fP
+の値は関数から返って来た後は不定となる。
+.SS va_end()
+\fBva_start\fP()  が実行される毎に、同じ関数内で対応する \fBva_end\fP()  が実行されなければならない。
+\fBva_end(\fP\fIap\fP\fB)\fP が呼び出された後、変数 \fIap\fP の値は不定となる。 \fBva_start\fP()  と \fBva_end\fP()
+の組を何回も並べて使うことも可能である。 \fBva_end\fP()  はマクロかもしれないし関数かもしれない。
+.SS va_copy()
+\fBva_copy\fP() マクロは (初期化済みの) 可変長引き数リスト \fIsrc\fP を \fIdest\fP にコピーする。動作は、 \fIlast\fP
+引き数に \fIdest\fP を渡して \fBva_start\fP() を \fIdest\fP に適用し、それから \fIsrc\fP
+が現在の状態に達するまでに呼び出したのと同じ回数だけ \fBva_arg\fP() を呼び出す、のと同じことを行う。
+.PP
+.\" Proposal from clive@demon.net, 1997-02-28
+すぐ分かる \fIva_list\fP の実装は、variadic な関数のスタックフレームのポインターである。 このような場合(ほとんどはそうである)、
+単に以下のようにすればいいように思える。
+.PP
+.in +4n
+.EX
+va_list aq = ap;
+.EE
+.in
+.PP
+残念ながら、(長さ 1の)ポインターの配列として扱うシステムもある。 そのような場合、以下のようにする必要がある。
+.PP
+.in +4n
+.EX
+va_list aq;
+*aq = *ap;
+.EE
+.in
+.PP
+最後に、引き数をレジスターで渡すシステムの場合、 \fBva_start\fP()  でメモリーを割り当て、引き数を格納し、
+次の引き数がどれかを指し示すようにする必要がある。 そして \fBva_arg\fP()  でリストを順番にたどり、 \fBva_end\fP()
+で割り当てたメモリーを開放する。 このような状況に対応するため、C99 では \fBva_copy\fP()  マクロを追加し、
+前述のような割り当ては以下のように置き換えられるようにした。
+.PP
+.in +4n
+.EX
+va_list aq;
+va_copy(aq, ap);
+\&...
+va_end(aq);
+.EE
+.in
+.PP
+\fBva_copy\fP()  が実行されるごとに、 対応する \fBva_end\fP()  を同じ関数内で実行しなければならない。 この名前はまだ draft
+proposal なので、 \fBva_copy\fP()  の代わりに \fB__va_copy\fP を用いるシステムもある。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw21 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBva_start\fP(),
+\fBva_end\fP(),
+\fBva_copy\fP()
+T}     Thread safety   MT\-Safe
+T{
+\fBva_arg\fP()
+T}     Thread safety   MT\-Safe race:ap
+.TE
+.SH 準拠
+\fBva_start\fP(), \fBva_arg\fP(), \fBva_end\fP()  マクロは C89 準拠である。 \fBva_copy\fP()  は C99
+で定義されている。
+.SH バグ
+Unlike the historical \fBvarargs\fP macros, the \fBstdarg\fP macros do not permit
+programmers to code a function with no fixed arguments.  This problem
+generates work mainly when converting \fBvarargs\fP code to \fBstdarg\fP code, but
+it also creates difficulties for variadic functions that wish to pass all of
+their arguments on to a function that takes a \fIva_list\fP argument, such as
+\fBvfprintf\fP(3).
+.SH EXAMPLES
+関数 \fIfoo\fP は書式文字からなる文字列を受け入れ、その書式文字に対応する型で可変個の 引き数を読み込み、印字する。
+.PP
+.EX
+#include <stdio.h>
+#include <stdarg.h>
+
+void
+foo(char *fmt, ...)   /* \(aq...\(aq is C syntax for a variadic function */
+
+{
+    va_list ap;
+    int d;
+    char c;
+    char *s;
+
+    va_start(ap, fmt);
+    while (*fmt)
+        switch (*fmt++) {
+        case \(aqs\(aq:              /* string */
+            s = va_arg(ap, char *);
+            printf("string %s\en", s);
+            break;
+        case \(aqd\(aq:              /* int */
+            d = va_arg(ap, int);
+            printf("int %d\en", d);
+            break;
+        case \(aqc\(aq:              /* char */
+            /* need a cast here since va_arg only
+               takes fully promoted types */
+            c = (char) va_arg(ap, int);
+            printf("char %c\en", c);
+            break;
+        }
+    va_end(ap);
+}
+.EE
+.SH 関連項目
+\fBvprintf\fP(3), \fBvscanf\fP(3), \fBvsyslog\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
index 4b0a558..464dd58 100644 (file)
@@ -237,12 +237,12 @@ O 修飾子は、ロケールに依存した別のフォーマットの中に 
 返り値は最後に処理された入力文字の次の文字を指す。 すべての入力文字列が処理された場合、 返り値は文字列末尾のヌルバイトを指す。
 \fBstrptime\fP()  がフォーマット文字列のすべての比較に失敗し、 エラーが起こった場合、関数はヌルポインターを返す。
 .SH 属性
-For an explanation of the terms used in this section, see \fBattributes\fP(7).
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
 .TS
 allbox;
 lb lb lb
 l l l.
-Interface      Attribute       Value
+インターフェース       属性  値
 T{
 \fBstrptime\fP()
 T}     Thread safety   MT\-Safe env locale
diff --git a/manual/LDP_man-pages/draft/man3/strtod.3 b/manual/LDP_man-pages/draft/man3/strtod.3
new file mode 100644 (file)
index 0000000..8b69946
--- /dev/null
@@ -0,0 +1,162 @@
+.\" Copyright (c) 1990, 1991 The Regents of the University of California.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to Berkeley by
+.\" the American National Standards Committee X3, on Information
+.\" Processing Systems.
+.\"
+.\" %%%LICENSE_START(BSD_4_CLAUSE_UCB)
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\"    must display the following acknowledgement:
+.\"    This product includes software developed by the University of
+.\"    California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\"    may be used to endorse or promote products derived from this software
+.\"    without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\" %%%LICENSE_END
+.\"
+.\"     @(#)strtod.3   5.3 (Berkeley) 6/29/91
+.\"
+.\" Modified Sun Aug 21 17:16:22 1994 by Rik Faith (faith@cs.unc.edu)
+.\" Modified Sat May 04 19:34:31 MET DST 1996 by Michael Haardt
+.\"   (michael@cantor.informatik.rwth-aachen.de)
+.\" Added strof, strtold, aeb, 2001-06-07
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1998-1999
+.\"   Michihide Hotta and NAKANO Takeo all rights reserved.
+.\" Translated Fri Jun 26 1998 by Yasushi Shoji <yashi@yashi.com>
+.\" Updated & Modified Sun Mar 14 1999 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
+.\" Updated & Modified Sun Jul  1 16:59:53 JST 2001
+.\"         by Yuichi SATO <ysato@h4.dion.ne.jp>
+.\" Updated & Modified 2006-07-20,
+.\"         Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.36
+.\"
+.TH STRTOD 3 2020\-11\-01 Linux "Linux Programmer's Manual"
+.SH 名前
+strtod, strtof, strtold \- ASCII 文字列を浮動小数点実数に変換する
+.SH 書式
+\fB#include <stdlib.h>\fP
+.PP
+\fBdouble strtod(const char *\fP\fInptr\fP\fB, char **\fP\fIendptr\fP\fB);\fP
+.br
+\fBfloat strtof(const char *\fP\fInptr\fP\fB, char **\fP\fIendptr\fP\fB);\fP
+.br
+\fBlong double strtold(const char *\fP\fInptr\fP\fB, char **\fP\fIendptr\fP\fB);\fP
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.ad l
+.PP
+\fBstrtof\fP(), \fBstrtold\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+.RE
+.ad
+.SH 説明
+\fBstrtod\fP(), \fBstrtof\fP(), \fBstrtold\fP()  関数は、 \fInptr\fP が指し示す文字列のはじめの部分を
+\fIdouble\fP, \fIfloat\fP, \fIlong double\fP 型の値にそれぞれ変換する。
+.PP
+入力する文字列 (の先頭部分) は以下の形式が期待されている。 先頭にホワイトスペース、 次にプラス (\(aq+\(aq) またはマイナス
+(\(aq\-\(aq) の記号、 その後に (i) 10 進数、(ii) 16 進数、(iii) 無限、 (iv) NAN
+(計算できない数、not\-a\-number) のいずれかがある (ホワイトスペース、符号は省略可能。 ホワイトスペースは \fBisspace\fP(3)
+で識別される)。
+.PP
+\fI10 進数\fP は 1 文字以上の 10 進の数字の列からなり、 基を表す文字 (radix charater)
+(小数点。ロケールに依存するが、通常は \(aq.\(aq) が含まれることもある。 この後に 10 進の指数部が続いても良い。 10 進の指数部は
+\(aqE\(aq または \(aqe\(aq と、その後に置かれる正負記号 (省略可)、 およびその後に続く 1 文字以上の 10
+進の数字の列からなり、 10 の何乗であるかを表す。
+.PP
+\fI16 進数\fP は、"0x" または "0X" とその後に続く 1 文字以上の 16 進の数字の列からなり、 基を表す文字が含まれることもある。
+この後に 2 進の指数部が続いても良い。 2 進の指数部は \(aqP\(aq または \(aqp\(aq と、その後に置かれる正負記号 (省略可)、
+およびその後に続く 1 文字以上の 10 進の数字の列から構成され、 2 の何乗であるかを表す。 基を表す文字と 2
+進の指数部は、どちらか一方しか存在してはならない。
+.PP
+\fI無限\fP は "INF" または "INFINITY" で表され、大文字小文字は区別されない。
+.PP
+\fINAN\fP は "NAN" (大文字小文字は区別されない) で表され、 その後に文字列 \fI(n\-char\-sequence)\fP が続く場合もある。
+\fI(n\-char\-sequence)\fP は実装に依存する NAN の型を指定する。
+.SH 返り値
+これらの関数は、変換された値があれば、それを返す。
+.PP
+\fIendptr\fP が NULL でないときは、変換に使われた最終文字の次の文字へのポインターが \fIendptr\fP で参照される場所へ保存される。
+.PP
+If no conversion is performed, zero is returned and (unless \fIendptr\fP is
+null) the value of \fInptr\fP is stored in the location referenced by
+\fIendptr\fP.
+.PP
+If the correct value would cause overflow, plus or minus \fBHUGE_VAL\fP,
+\fBHUGE_VALF\fP, or \fBHUGE_VALL\fP is returned (according to the return type and
+sign of the value), and \fBERANGE\fP is stored in \fIerrno\fP.
+.PP
+If the correct value would cause underflow, a value with magnitude no larger
+than \fBDBL_MIN\fP, \fBFLT_MIN\fP, or \fBLDBL_MIN\fP is returned and \fBERANGE\fP is
+stored in \fIerrno\fP.
+.SH エラー
+.TP 
+\fBERANGE\fP
+オーバーフローまたはアンダーフローが起こった。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw29 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBstrtod\fP(),
+\fBstrtof\fP(),
+\fBstrtold\fP()
+T}     Thread safety   MT\-Safe locale
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, C99.
+.PP
+\fBstrtod\fP()  was also described in C89.
+.SH 注意
+成功、失敗どちらの場合でも 0 を返す可能性があるので、 プログラムは呼び出す前に \fIerrno\fP を 0 に設定し、呼び出し後に \fIerrno\fP
+が 0 以外の値かどうかを確認しエラーが発生したかどうかを判断する 必要がある。
+.PP
+.\" From glibc 2.8's stdlib/strtod_l.c:
+.\"     We expect it to be a number which is put in the
+.\"     mantissa of the number.
+.\" It looks as though at least FreeBSD (according to the manual) does
+.\" something similar.
+.\" C11 says: "An implementation may use the n-char sequence to determine
+.\"    extra information to be represented in the NaN's significant."
+glibc の実装では、"NAN" の後ろに置くことができる \fIn\-char\-sequence\fP は、整数値として解釈される (基数の 8 や 16
+を示す '0' や '0x' を接頭辞として付けることができる)。 この整数値は返り値の仮数部として使われる。
+.SH EXAMPLES
+\fBstrtol\fP(3)  のマニュアルページの例を参照。 このページで説明した関数の使用方法も同様である。
+.SH 関連項目
+\fBatof\fP(3), \fBatoi\fP(3), \fBatol\fP(3), \fBnan\fP(3), \fBnanf\fP(3), \fBnanl\fP(3),
+\fBstrfromd\fP(3), \fBstrtol\fP(3), \fBstrtoul\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/strtoimax.3 b/manual/LDP_man-pages/draft/man3/strtoimax.3
new file mode 100644 (file)
index 0000000..334edd5
--- /dev/null
@@ -0,0 +1,70 @@
+.\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl)
+.\"
+.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
+.\" This is free documentation; you can redistribute it and/or
+.\" modify it under the terms of the GNU General Public License as
+.\" published by the Free Software Foundation; either version 2 of
+.\" the License, or (at your option) any later version.
+.\"
+.\" The GNU General Public License's references to "object code"
+.\" and "executables" are to be interpreted as the output of any
+.\" document formatting or typesetting system, including
+.\" intermediate and printed output.
+.\"
+.\" This manual is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public
+.\" License along with this manual; if not, see
+.\" <http://www.gnu.org/licenses/>.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2004 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated Sun Sep  5 21:02:09 JST 2004
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\"
+.TH STRTOIMAX 3 2015\-08\-08 "" "Linux Programmer's Manual"
+.SH 名前
+strtoimax, strtoumax \- 文字列を整数に変換する
+.SH 書式
+.nf
+\fB#include <inttypes.h>\fP
+.PP
+\fBintmax_t strtoimax(const char *\fP\fInptr\fP\fB, char **\fP\fIendptr\fP\fB, int \fP\fIbase\fP\fB);\fP
+\fBuintmax_t strtoumax(const char *\fP\fInptr\fP\fB, char **\fP\fIendptr\fP\fB, int \fP\fIbase\fP\fB);\fP
+.fi
+.SH 説明
+これらの関数はちょうど \fBstrtol\fP(3)  と \fBstrtoul\fP(3)  に似ているが、それぞれ \fIintmax_t\fP と
+\fIuintmax_t\fP 型の値を返す。
+.SH 返り値
+成功した場合、変換された値が返される。 変換するものが見つからなかった場合、0 が返される。 オーバーフローまたはアンダーフローの場合、
+\fBINTMAX_MAX\fP または \fBINTMAX_MIN\fP または \fBUINTMAX_MAX\fP が返され、 \fIerrno\fP が
+\fBERANGE\fP に設定される。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw24 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBstrtoimax\fP(),
+\fBstrtoumax\fP()
+T}     Thread safety   MT\-Safe locale
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, C99.
+.SH 関連項目
+\fBimaxabs\fP(3), \fBimaxdiv\fP(3), \fBstrtol\fP(3), \fBstrtoul\fP(3), \fBwcstoimax\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
index 662038a..3fa31d8 100644 (file)
@@ -55,12 +55,12 @@ sysv_signal \- System V 方式のシグナル処理
 .SH エラー
 \fBsignal\fP(2)  と同じ。
 .SH 属性
-For an explanation of the terms used in this section, see \fBattributes\fP(7).
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
 .TS
 allbox;
 lb lb lb
 l l l.
-Interface      Attribute       値
+インターフェース       属性  値
 T{
 \fBsysv_signal\fP()
 T}     Thread safety   MT\-Safe
diff --git a/manual/LDP_man-pages/draft/man3/tan.3 b/manual/LDP_man-pages/draft/man3/tan.3
new file mode 100644 (file)
index 0000000..fc4c072
--- /dev/null
@@ -0,0 +1,135 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 2002-07-27 by Walter Harms
+.\"    (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1996 Kenji Kajiwara and Kentaro Ogawa
+.\"         all rights reserved.
+.\" Translated Sat, 13 Jul 1996 17:42:24 JST
+.\"         by Kenji Kajiwara and Kentaro Ogawa
+.\" Proof Reading: Takashi Yoshino
+.\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH TAN 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+tan, tanf, tanl \- 正接(タンジェント)関数
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBdouble tan(double \fP\fIx\fP\fB);\fP
+\fBfloat tanf(float \fP\fIx\fP\fB);\fP
+\fBlong double tanl(long double \fP\fIx\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBtanf\fP(), \fBtanl\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad
+.SH 説明
+These functions return the tangent of \fIx\fP, where \fIx\fP is given in radians.
+.SH 返り値
+成功すると、これらの関数は \fIx\fP の正接 (タンジェント) を返す。
+.PP
+\fIx\fP が NaN の場合、NaN が返される。
+.PP
+\fIx\fP が正の無限大か負の無限大の場合、 領域エラー (domain error) が発生し、NaN が返される。
+.PP
+.\" I think overflow can't occur, because the closest floating-point
+.\" representation of pi/2 is still not close enough to pi/2 to
+.\" produce a large enough value to overflow.
+.\" Testing certainly seems to bear this out.  -- mtk, Jul 08
+.\"
+.\" POSIX.1 allows an optional underflow error;
+.\" glibc 2.8 doesn't do this
+.\" POSIX.1 an optional range error for subnormal x;
+.\" glibc 2.8 doesn't do this
+結果がオーバーフローする場合、範囲エラー (range error) が発生し、 各関数はそれぞれ \fBHUGE_VAL\fP, \fBHUGE_VALF\fP,
+\fBHUGE_VALL\fP を返す。
+.SH エラー
+これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
+.PP
+以下のエラーが発生する可能性がある。
+.TP 
+領域エラー (domain error): \fIx\fP が無限大である
+\fIerrno\fP に \fBEDOM\fP が設定される (「バグ」の節も参照)。 不正 (invalid) 浮動小数点例外 (\fBFE_INVALID\fP)
+が上がる。
+.TP 
+範囲エラー (range error): 結果のオーバーフロー
+.\" Unable to test this case, since the best approximation of
+.\" pi/2 in double precision only yields a tan() value of 1.633e16.
+.\" .I errno
+.\" is set to
+.\" .BR ERANGE .
+オーバーフロー浮動小数点例外 (\fBFE_OVERFLOW\fP)  が上がる。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw21 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBtan\fP(),
+\fBtanf\fP(),
+\fBtanl\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.PP
+The variant returning \fIdouble\fP also conforms to SVr4, 4.3BSD, C89.
+.SH バグ
+.\" http://sourceware.org/bugzilla/show_bug.cgi?id=6782
+バージョン 2.10 より前の glibc の実装では、 領域エラーが発生した際に、 \fIerrno\fP に \fBEDOM\fP が設定されなかった。
+.SH 関連項目
+\fBacos\fP(3), \fBasin\fP(3), \fBatan\fP(3), \fBatan2\fP(3), \fBcos\fP(3), \fBctan\fP(3),
+\fBsin\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/tanh.3 b/manual/LDP_man-pages/draft/man3/tanh.3
new file mode 100644 (file)
index 0000000..11e7007
--- /dev/null
@@ -0,0 +1,115 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 2002-07-27 by Walter Harms
+.\"    (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1996 Kenji Kajiwara and Kentaro Ogawa
+.\"         all rights reserved.
+.\" Translated Sat, 13 Jul 1996 17:54:30 JST
+.\"         by Kenji Kajiwara and Kentaro Ogawa
+.\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH TANH 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+tanh, tanhf, tanhl \- 双曲線正接 (hyperbolic tangent) 関数
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBdouble tanh(double \fP\fIx\fP\fB);\fP
+\fBfloat tanhf(float \fP\fIx\fP\fB);\fP
+\fBlong double tanhl(long double \fP\fIx\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBtanhf\fP(), \fBtanhl\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.RE
+.ad
+.SH 説明
+These functions return the hyperbolic tangent of \fIx\fP, which is defined
+mathematically as:
+.PP
+.nf
+    tanh(x) = sinh(x) / cosh(x)
+.fi
+.SH 返り値
+成功すると、これらの関数は \fIx\fP の双曲線正接を返す。
+.PP
+\fIx\fP が NaN の場合、NaN が返される。
+.PP
+\fIx\fP が +0 (\-0) の場合、+0 (\-0) が返される。
+.PP
+.\"
+.\" POSIX.1-2001 documents an optional range error (underflow)
+.\" for subnormal x;
+.\" glibc 2.8 does not do this.
+\fIx\fP が正の無限大 (負の無限大) の場合、+1 (\-1) が返される。
+.SH エラー
+エラーは発生しない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw24 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBtanh\fP(),
+\fBtanhf\fP(),
+\fBtanhl\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.PP
+The variant returning \fIdouble\fP also conforms to SVr4, 4.3BSD, C89.
+.SH 関連項目
+\fBacosh\fP(3), \fBasinh\fP(3), \fBatanh\fP(3), \fBcosh\fP(3), \fBctanh\fP(3), \fBsinh\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/tcgetsid.3 b/manual/LDP_man-pages/draft/man3/tcgetsid.3
new file mode 100644 (file)
index 0000000..a4d49a4
--- /dev/null
@@ -0,0 +1,79 @@
+.\" Copyright (C) 2002 Andries Brouwer <aeb@cwi.nl>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2003  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated Sat Jul 19 03:06:35 JST 2003
+.\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH TCGETSID 3 2015\-08\-08 GNU "Linux Programmer's Manual"
+.SH 名前
+tcgetsid \- セッションID を取得する
+.SH 書式
+\fB#define _XOPEN_SOURCE 500\fP /* feature_test_macros(7) 参照 */
+.br
+\fB#include <termios.h>\fP
+.PP
+\fBpid_t tcgetsid(int \fP\fIfd\fP\fB);\fP
+.SH 説明
+関数 \fBtcgetsid\fP()  は、制御端末として \fIfd\fP に対応する端末を持つカレントセッションのセッションID を返す。 この端末は
+\fBtcgetsid\fP() の呼び出しを行うプロセスの制御端末で なければならない。
+.SH 返り値
+\fIfd\fP が呼び出しを行ったセッションの制御端末を参照している場合、 関数 \fBtcgetsid\fP()  はこのセッションのセッションID を返す。
+そうでない場合、 \-1 が返され、 \fIerrno\fP が適切に設定される。
+.SH エラー
+.TP 
+\fBEBADF\fP
+\fIfd\fP が有効なファイルディスクリプターではない。
+.TP 
+\fBENOTTY\fP
+呼び出しを行ったプロセスが制御端末を持っていない、もしくは 制御端末を持っているが \fIfd\fP で参照されるものとは異なる。
+.SH バージョン
+\fBtcgetsid\fP()  は、バージョン 2.1 以降の glibc で提供されている。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBtcgetsid\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+この関数は \fBTIOCGSID\fP \fBioctl\fP(2)  経由で実現されており、 Linux 2.1.71 以降で存在する。
+.SH 関連項目
+\fBgetsid\fP(2)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/telldir.3 b/manual/LDP_man-pages/draft/man3/telldir.3
new file mode 100644 (file)
index 0000000..05ecd0c
--- /dev/null
@@ -0,0 +1,98 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\" Modified Sat Jul 24 17:48:42 1993 by Rik Faith (faith@cs.unc.edu)
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
+.\"    all rights reserved.
+.\" Translated 1997-12-24, HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
+.\" Updated & Modified 2005-02-19, Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated 2009-04-24, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.20
+.\" Updated 2013-05-01, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH TELLDIR 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+telldir \- ディレクトリストリーム中の現在位置を返す
+.SH 書式
+.nf
+\fB#include <dirent.h>\fP
+.PP
+\fBlong telldir(DIR *\fP\fIdirp\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBtelldir\fP():
+ _XOPEN_SOURCE
+    || /* Glibc since 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+.SH 説明
+\fBtelldir\fP()  関数は、ディレクトリストリーム \fIdirp\fP に結びつけられた 現在位置を返す。
+.SH 返り値
+成功した場合、 \fBtelldir\fP()  関数はディレクトリストリーム中の現在位置を返す。 エラーの場合、\-1 が返されて、 \fIerrno\fP
+が適切に設定される。
+.SH エラー
+.TP 
+\fBEBADF\fP
+ディレクトリストリームディスクリプター \fIdirp\fP が無効である。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBtelldir\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, 4.3BSD.
+.SH 注意
+バージョン 2.1.1 以前の glibc では、 \fBtelldir\fP()9 の返り値の型は \fIoff_t\fP であった。 POSIX.1\-2001
+では \fIlong\fP と規定されており、glibc 2.1.2 以降では \fIlong\fP になっている。
+.PP
+.\" https://lwn.net/Articles/544298/
+初期のファイルシステムでは、 \fBtelldir\fP()
+が返す値は単なるディレクトリ内のファイルオフセットであった。新しめのファイルシステムでは、ディレクトリを表現するのに、フラットなテーブルではなく、ツリーやハッシュ構造が使用されている。このようなファイルシステムでは、
+\fBtelldir\fP() が返す値 (および \fBreaddir\fP(3) が内部で使用する値)
+は、ディレクトリ内での値を示すのにファイルシステム実装が使っている "cookie"
+となる。アプリケーションプログラムでは、必ずこの値を内容を意識せず単なる値として扱うべきであり、その内容について前提を持つべきでは「ない」。
+.SH 関連項目
+\fBclosedir\fP(3), \fBopendir\fP(3), \fBreaddir\fP(3), \fBrewinddir\fP(3),
+\fBscandir\fP(3), \fBseekdir\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
index 552c6e9..0abcbe2 100644 (file)
@@ -648,14 +648,14 @@ START 文字の送信。 START 文字は端末デバイスからシステムへ
 \fBtcsetattr\fP()  は \fIなんらかの\fP 変更要求が成功した場合に成功を返すことに注意。 従って、複数の変更を行った場合には、引き続いて
 \fBtcgetattr\fP()  を呼び出して全ての変更が実行されているかを確認する必要があるかもしれない。
 .SH 属性
-For an explanation of the terms used in this section, see \fBattributes\fP(7).
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
 .nh
 .ad l
 .TS
 allbox;
 lbw36 lb lb
 l l l.
-Interface      Attribute       Value
+インターフェース       属性  値
 T{
 \fBtcgetattr\fP(),
 \fBtcsetattr\fP(),
diff --git a/manual/LDP_man-pages/draft/man3/tgamma.3 b/manual/LDP_man-pages/draft/man3/tgamma.3
new file mode 100644 (file)
index 0000000..d6b5f4a
--- /dev/null
@@ -0,0 +1,155 @@
+.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
+.\" Distributed under GPL
+.\" %%%LICENSE_END
+.\"
+.\" Based on glibc infopages
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\"     <mtk.manpages@gmail.com>
+.\" Modified 2004-11-15, fixed error noted by Fabian Kreutz
+.\"     <kreutz@dbs.uni-hannover.de>
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2002 Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated Sun Sep 22 09:31:52 2002
+.\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated & Modified Sat Feb 12 12:00:00 2005
+.\"         by SAITOH Akira <s-akira@users.sourceforge.net>
+.\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH TGAMMA 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+tgamma, tgammaf, tgammal \- 本当のガンマ関数
+.SH 書式
+\fB#include <math.h>\fP
+.PP
+\fBdouble tgamma(double \fP\fIx\fP\fB);\fP
+.br
+\fBfloat tgammaf(float \fP\fIx\fP\fB);\fP
+.br
+\fBlong double tgammal(long double \fP\fIx\fP\fB);\fP
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBtgamma\fP(), \fBtgammaf\fP(), \fBtgammal\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+.RE
+.ad
+.SH 説明
+These functions calculate the Gamma function of \fIx\fP.
+.PP
+ガンマ関数は以下のように定義される:
+.PP
+.RS
+Gamma(x) = integral from 0 to infinity of t^(x\-1) e^\-t dt
+.RE
+.PP
+この関数は正でない整数を除くすべての実数に対して定義されている。 非負の整数 \fIm\fP に関して、以下が成立する:
+.PP
+.RS
+Gamma(m+1) = m!
+.RE
+.PP
+より一般的には、すべての \fIx\fP に関して以下が成立する:
+.PP
+.RS
+Gamma(x+1) = x * Gamma(x)
+.RE
+.PP
+さらに、極を除くすべての \fIx\fP で次式も成立する:
+.PP
+.RS
+Gamma(x) * Gamma(1 \- x) = PI / sin(PI * x)
+.RE
+.SH 返り値
+成功すると、これらの関数は Gamma(x) を返す。
+.PP
+\fIx\fP が NaN の場合、NaN が返される。
+.PP
+\fIx\fP が正の無限大の場合、正の無限大が返される。
+.PP
+\fIx\fP が負の整数か負の無限大の場合、領域エラー (domain error) が発生し、 NaN が返される。
+.PP
+結果がオーバーフローする場合、範囲エラー (range error) が発生し、 各関数はそれぞれ \fBHUGE_VAL\fP, \fBHUGE_VALF\fP,
+\fBHUGE_VALL\fP, を返す。この際、数学的に正しい符号が付与される。
+.PP
+結果がアンダーフローする場合、範囲エラー (range error) が発生し、 関数は 0 をを返す。この際、数学的に正しい符号が付与される。
+.PP
+\fIx\fP が \-0 か +0 の場合、極エラー (pole error) が発生し、 各関数はそれぞれ \fBHUGE_VAL\fP,
+\fBHUGE_VALF\fP, \fBHUGE_VALL\fP, を返す。 0 と同じ符号が付与される。
+.SH エラー
+これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
+.PP
+以下のエラーが発生する可能性がある。
+.TP 
+領域エラー: \fIx\fP が負の整数か負の無限大
+\fIerrno\fP に \fBEDOM\fP が設定される。 不正 (invalid) 浮動小数点例外 (\fBFE_INVALID\fP)  が上がる
+(「バグ」の節を参照)。
+.TP 
+極エラー (pole error): \fIx\fP が +0 か \-0
+\fIerrno\fP に \fBERANGE\fP が設定される。 0 による除算 (divide\-by\-zero) 浮動小数点例外
+(\fBFE_DIVBYZERO\fP)  が上がる。
+.TP 
+範囲エラー (range error): 結果のオーバーフロー
+\fIerrno\fP に \fBERANGE\fP が設定される。 オーバーフロー浮動小数点例外 (\fBFE_OVERFLOW\fP)  が上がる。
+.PP
+glibc では、C99 や POSIX.1\-2001 で規定されていない以下のエラーも 起こり得る。
+.TP 
+範囲エラー (range error): 結果のアンダーフロー
+.\" e.g., tgamma(-172.5) on glibc 2.8/x86-32
+.\" .I errno
+.\" is set to
+.\" .BR ERANGE .
+.\" glibc (as at 2.8) also supports an inexact
+.\" exception for various cases.
+An underflow floating\-point exception (\fBFE_UNDERFLOW\fP)  is raised, and
+\fIerrno\fP is set to \fBERANGE\fP.
+.SH バージョン
+これらの関数は glibc バージョン 2.1 で初めて登場した。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw30 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBtgamma\fP(),
+\fBtgammaf\fP(),
+\fBtgammal\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+この関数を「本当の (true) ガンマ関数」と呼ばなければならなかった。 なぜなら、他の値を返す \fBgamma\fP(3)
+という関数がすでに存在するからである (詳細については \fBgamma\fP(3)  を参照)。
+.SH バグ
+.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6809
+バージョン 2.18 より前の glibc の実装では、 \fIx\fP が負の無限大の場合、 \fIerrno\fP に \fBEDOM\fP が設定されなかった。
+.PP
+.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6810
+Before glibc 2.19, the glibc implementation of these functions did not set
+\fIerrno\fP to \fBERANGE\fP on an underflow range error.  \fIx\fP
+.PP
+.\"
+glibc バージョン 2.3.3 以前では、 引き数に +0 や \-0 を渡すと、極エラーではなく、 領域エラーを間違って発生していた
+(領域エラーの場合、 \fIerrno\fP に \fBEDOM\fP を設定され、 \fBFE_INVALID\fP 例外が発生する)。
+.SH 関連項目
+\fBgamma\fP(3), \fBlgamma\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/toascii.3 b/manual/LDP_man-pages/draft/man3/toascii.3
new file mode 100644 (file)
index 0000000..4eeef46
--- /dev/null
@@ -0,0 +1,81 @@
+.\" Copyright (c) 1995 by Jim Van Zandt <jrv@vanzandt.mv.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" Added BUGS section, aeb, 950919
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
+.\"    all rights reserved.
+.\" Translated Tue Dec 16 19:43:29 JST 1997
+.\"    by HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
+.\"
+.TH TOASCII 3 2016\-03\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+toascii \- 文字を ASCII に変換する
+.SH 書式
+.nf
+\fB#include <ctype.h>\fP
+.PP
+\fBint toascii(int \fP\fIc\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBtoascii\fP():
+_XOPEN_SOURCE
+    || /* Glibc since 2.19: */ _DEFAULT_SOURCE
+    || /* Glibc versions <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
+.SH 説明
+\fBtoascii\fP()  は上位ビットをクリアする事により、 ASCII 文字セットに適合するように \fIc\fP を 7ビットの \fIunsigned
+char\fP に変換する。
+.SH 返り値
+変換された文字を返す。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBtoascii\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+SVr4, BSD, POSIX.1\-2001.  POSIX.1\-2008 は \fBtoascii\fP()  を廃止予定としている。
+ローカライズされたアプリケーションでは、移植性を確保しつつ、 この関数を使用することはできない点に注意すること。
+.SH バグ
+この関数を使う事でたくさんの人々が不幸になるだろう。 この関数はアクセント付きの字をでたらめな文字に変換してしまう。
+.SH 関連項目
+\fBisascii\fP(3), \fBtolower\fP(3), \fBtoupper\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/toupper.3 b/manual/LDP_man-pages/draft/man3/toupper.3
new file mode 100644 (file)
index 0000000..24ba7b0
--- /dev/null
@@ -0,0 +1,140 @@
+.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
+.\" and Copyright 2014 Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" Modified Sat Jul 24 17:45:39 1993 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 2000-02-13 by Nicolás Lichtmaier <nick@debian.org>
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 Ueyama Rui and HIROFUMI Nishizuka
+.\"         all rights reserved.
+.\" Translated Fri Aug 29 19:47:32 JST 1997
+.\"         by Ueyama Rui <rui@campus.or.jp>
+.\"         by HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
+.\" Translated Sun Mar 12 21:42:31 JST 2000
+.\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
+.\"
+.TH TOUPPER 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+toupper, tolower, toupper_l, tolower_l \- 小文字を大文字にする。または大文字を小文字にする。
+.SH 書式
+.nf
+\fB#include <ctype.h>\fP
+.PP
+\fBint toupper(int \fP\fIc\fP\fB);\fP
+\fBint tolower(int \fP\fIc\fP\fB);\fP
+.PP
+\fBint toupper_l(int \fP\fIc\fP\fB, locale_t \fP\fIlocale\fP\fB);\fP
+\fBint tolower_l(int \fP\fIc\fP\fB, locale_t \fP\fIlocale\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBtoupper_l\fP(), \fBtolower_l\fP():
+.PD 0
+.RS 4
+.TP 
+glibc 2.10 以降:
+_XOPEN_SOURCE\ >=\ 700
+.TP 
+glibc 2.10 より前:
+_GNU_SOURCE
+.RE
+.PD
+.SH 説明
+これらの関数は、小文字を大文字に、もしくは大文字を小文字に変換する。
+.PP
+\fIc\fP が小文字の場合、現在のロケールで大文字表現が存在する場合、 \fBtoupper\fP()
+は対応する大文字を返す。大文字表現が存在しない場合、\fIc\fP を返す。 \fBtoupper_l\fP() 関数は同じ動作をするが、ロケールハンドル
+\fIlocale\fP が参照するロケールを使って変換を行う。
+.PP
+If \fIc\fP is an uppercase letter, \fBtolower\fP()  returns its lowercase
+equivalent, if a lowercase representation exists in the current locale.
+Otherwise, it returns \fIc\fP.  The \fBtolower_l\fP()  function performs the same
+task, but uses the locale referred to by the locale handle \fIlocale\fP.
+.PP
+もし \fIc\fP が \fIunsigned char\fP 値でも \fBEOF\fP でもない場合、これらの関数の動作は未定義である。
+.PP
+\fIlocale\fP が特別なロケールオブジェクト \fBLC_GLOBAL_LOCALE\fP の場合 (\fBduplocale\fP(3) 参照)、または
+\fIlocale\fP が有効なロケールオブジェクトハンドルでない場合、 \fBtoupper_l\fP() と \fBtolower_l\fP()
+の動作は未定義である。
+.SH 返り値
+変換ができれば変換後の文字を返す。できなければ変換前の \fIc\fP を返す。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw24 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBtoupper\fP(),
+\fBtolower\fP(),
+.br
+\fBtoupper_l\fP(),
+\fBtolower_l\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+\fBtoupper\fP(), \fBtolower\fP(): C89, C99, 4.3BSD, POSIX.1\-2001, POSIX.1\-2008.
+.PP
+\fBtoupper_l\fP(), \fBtolower_l\fP(): POSIX.1\-2008.
+.SH 注意
+The standards require that the argument \fIc\fP for these functions is either
+\fBEOF\fP or a value that is representable in the type \fIunsigned char\fP.  If
+the argument \fIc\fP is of type \fIchar\fP, it must be cast to \fIunsigned char\fP,
+as in the following example:
+.PP
+.in +4n
+.EX
+char c;
+\&...
+res = toupper((unsigned char) c);
+.EE
+.in
+.PP
+This is necessary because \fIchar\fP may be the equivalent \fIsigned char\fP, in
+which case a byte where the top bit is set would be sign extended when
+converting to \fIint\fP, yielding a value that is outside the range of
+\fIunsigned char\fP.
+.PP
+なにが大文字でなにが小文字なのかということの詳細は、ロケールに依存している。たとえば、デフォルトの \fB"C"\fP
+ロケールではウムラウトを認識しないため、それらの文字は変換できない。
+.PP
+.\" FIXME One day the statement about "sharp s" needs to be reworked,
+.\" since there is nowadays a capital "sharp s" that has a codepoint
+.\" in Unicode 5.0; see https://en.wikipedia.org/wiki/Capital_%E1%BA%9E
+いくつかの非英語ロケールでは、対応する大文字を持たない小文字が存在する。 ドイツ語のエスツェットが一つの例である。
+.SH 関連項目
+\fBisalpha\fP(3), \fBnewlocale\fP(3), \fBsetlocale\fP(3), \fBtowlower\fP(3),
+\fBtowupper\fP(3), \fBuselocale\fP(3), \fBlocale\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/trunc.3 b/manual/LDP_man-pages/draft/man3/trunc.3
new file mode 100644 (file)
index 0000000..e4c6f63
--- /dev/null
@@ -0,0 +1,97 @@
+.\" Copyright (C) 2001 Andries Brouwer <aeb@cwi.nl>.
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2001, 2005 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated Sun Jul  8 10:40:20 JST 2001
+.\"         by Yuichi SATO <ysato@h4.dion.ne.jp>
+.\" Updated & Modified Sun Jan 16 08:20:45 JST 2005
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\"
+.TH TRUNC 3 2019\-03\-06 "" "Linux Programmer's Manual"
+.SH 名前
+trunc, truncf, truncl \- 0 に近い方の整数値に丸める
+.SH 書式
+.nf
+\fB#include <math.h>\fP
+.PP
+\fBdouble trunc(double \fP\fIx\fP\fB);\fP
+\fBfloat truncf(float \fP\fIx\fP\fB);\fP
+\fBlong double truncl(long double \fP\fIx\fP\fB);\fP
+.fi
+.PP
+\fI\-lm\fP でリンクする。
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBtrunc\fP(), \fBtruncf\fP(), \fBtruncl\fP():
+.RS 4
+_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
+.RE
+.ad
+.SH 説明
+These functions round \fIx\fP to the nearest integer value that is not larger
+in magnitude than \fIx\fP.
+.SH 返り値
+These functions return the rounded integer value, in floating format.
+.PP
+\fIx\fP が整数、無限大、NaN の場合、\fIx\fP 自身が返される。
+.SH エラー
+エラーは発生しない。
+.SH バージョン
+これらの関数は glibc バージョン 2.1 で初めて登場した。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw27 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBtrunc\fP(),
+\fBtruncf\fP(),
+\fBtruncl\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.SH 準拠
+C99, POSIX.1\-2001, POSIX.1\-2008.
+.SH 注意
+これらの関数が返す整数値は整数型 (\fIint\fP, \fIlong\fP など) に格納するには大き過ぎるかもしれない。
+オーバーフローが起こった場合の結果は分からないので、 オーバーフローを避けるため、アプリケーションでは整数型に代入する前に
+返された値の範囲確認を実行すべきである。
+.SH 関連項目
+\fBceil\fP(3), \fBfloor\fP(3), \fBlrint\fP(3), \fBnearbyint\fP(3), \fBrint\fP(3),
+\fBround\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/ttyslot.3 b/manual/LDP_man-pages/draft/man3/ttyslot.3
new file mode 100644 (file)
index 0000000..bedff6d
--- /dev/null
@@ -0,0 +1,140 @@
+.\" Copyright (C) 2002 Andries Brouwer <aeb@cwi.nl>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" This replaces an earlier man page written by Walter Harms
+.\" <walter.harms@informatik.uni-oldenburg.de>.
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2004 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated Wed Sep  8 01:25:01 JST 2004
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\"
+.TH TTYSLOT 3 2017\-09\-15 GNU "Linux Programmer's Manual"
+.SH 名前
+ttyslot \- カレントユーザーの端末のスロットをファイルから探す
+.SH 書式
+\fB#include <unistd.h>\fP /See NOTES */
+.PP
+\fBint ttyslot(void);\fP
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+.ad l
+\fBttyslot\fP():
+.RS 4
+Since glibc 2.24:
+    _DEFAULT_SOURCE
+.br
+From glibc 2.20 to 2.23:
+    _DEFAULT_SOURCE ||
+    _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE\ <\ 500
+.br
+Glibc 2.19 and earlier:
+    _BSD_SOURCE ||
+    _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE\ <\ 500
+.RE
+.ad b
+.SH 説明
+レガシーな関数 \fBttyslot\fP()  は、あるファイルに書かれているカレントユーザーのエントリーのインデックスを返す。
+.PP
+「どのファイルなのか?」という質問があるだろう。 では、まず最初にその歴史を見てみよう。
+.SS 大昔の歴史
+UNIX\ V6 では \fI/etc/ttys\fP ファイルが使われていた。 \fBinit\fP(1)  プログラムは、このファイルを読み込み、
+各端末行で何をすべきかを探す。 各行は 3 文字から構成されている。 1 文字目は \(aq0\(aq または \(aq1\(aq であり、
+\(aq0\(aq は「無視する」ことを表す。 2 文字目は端末を示す: \(aq8\(aq は "/dev/tty8" を表す。 3 文字目は
+\fBgetty\fP(8)  への引き数であり、(接続を) 試みる回線速度の順序を表す (\(aq\-\(aq は 110
+ボーで接続の試行を開始することを表す)。 よって一般的な行は "18\-" となる。 ある行でハングした場合は、\(aq1\(aq を \(aq0\(aq
+に変更し、 init にシグナルを送り、\(aq0\(aq を \(aq1\(aq 再度に変更し、 init に再度シグナルを送ることで解決する。
+.PP
+UNIX\ V7 ではフォーマットが変更された: 2 文字目が \fBgetty\fP(8)  の引き数となり、(接続を)
+試みる回線速度の順序を表すようになり (\(aq0\(aq は 300\-1200\-150\-110 を繰り返すことを表し、 \(aq4\(aq
+はオンラインコンソール DECwriter を表す)、 行の残り (の文字) は端末名となった。 よって、一般的な行は "14console" となる。
+.PP
+後者のシステムの書式は、より精巧である。 System V 系のシステムでは、代わりに \fI/etc/inittab\fP がある。
+.SS "大昔の歴史 (2)"
+一方、現在ログインしている人をリストするファイル \fI/etc/utmp\fP がある。 これは \fBlogin\fP(1)  によって管理されている。
+このファイルは固定されたサイズであり、ファイル内の適切なインデックスは、 \fBlogin\fP(1)  によって決定される。 この際に
+\fBttyslot\fP()  が呼ばれて、 \fI/etc/ttys\fP における行番号を見つける (行番号は 1 から数える)。
+.SS "ttyslot の意味"
+よって、関数 \fBttyslot\fP()  は、ファイル \fI/etc/ttys\fP における呼び出し元のプロセスの制御端末のインデックスを返す。 これは
+\fI/etc/utmp\fP におけるカレントユーザーのエントリーのインデックスと (通常は) 等しい。 BSD には未だに \fI/etc/ttys\fP
+ファイルがあるが、System V 系のシステムにはないので、 このファイルを参照することはできない。 よって、そのようなシステムでは
+「\fBttyslot\fP()  はカレントユーザーのユーザーアカウントデータベースにおけるインデックスを返す」 とドキュメントに書かれている。
+.SH 返り値
+成功した場合、この関数はスロット番号を返す。 エラーの場合 (例えば、ファイルディスクリプター 0, 1, 2 の何れも
+データベースにある端末に関連づけられていない場合)、 UNIX\ V6, V7, BSD 系のシステムは 0 を返すが、 System V
+系のシステムは \-1 を返す。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBttyslot\fP()
+T}     Thread safety   MT\-Unsafe
+.TE
+.SH 準拠
+SUSv1。SUSv2 では「過去の名残 (LEGACY)」と位置付けられている。 POSIX.1\-2001 で削除された。 SUSv2 ではエラー時に
+\-1 を返すことが要求されている。
+.SH 注意
+The utmp file is found in various places on various systems, such as
+\fI/etc/utmp\fP, \fI/var/adm/utmp\fP, \fI/var/run/utmp\fP.
+.PP
+この関数の glibc2 における実装では、ファイル \fB_PATH_TTYS\fP を読み込む。 これは \fI<ttyent.h>\fP
+において "/etc/ttys" と定義されている。 エラーの場合、0 を返す。 Linux システムには通常 "/etc/ttys" がないので、常に
+0 を返す。
+.PP
+On BSD\-like systems and Linux, the declaration of \fBttyslot\fP()  is provided
+by \fI<unistd.h>\fP.  On System V\-like systems, the declaration is
+provided by \fI<stdlib.h>\fP.  Since glibc 2.24, \fI<stdlib.h>\fP
+also provides the declaration with the following feature test macro
+definitions:
+.PP
+.in +4n
+.EX
+(_XOPEN_SOURCE >= 500 ||
+        (_XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED))
+    && ! (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600)
+.EE
+.in
+.PP
+.\" .SH HISTORY
+.\" .BR ttyslot ()
+.\" appeared in UNIX V7.
+Minix には \fIfttyslot\fP(\fIfd\fP)  もある。
+.SH 関連項目
+\fBgetttyent\fP(3), \fBttyname\fP(3), \fButmp\fP(5)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/ulimit.3 b/manual/LDP_man-pages/draft/man3/ulimit.3
new file mode 100644 (file)
index 0000000..fc32239
--- /dev/null
@@ -0,0 +1,87 @@
+.\" Copyright (C) 1996 Andries Brouwer (aeb@cwi.nl)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" Moved to man3, aeb, 980612
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1998 NAKANO Takeo all rights reserved.
+.\" Translated Sat 18 Jul 1998 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
+.\" Modified Sun Dec 18 1998 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
+.\"
+.TH ULIMIT 3 2017\-09\-15 Linux "Linux Programmer's Manual"
+.SH 名前
+ulimit \- ユーザー制限を取得・設定する
+.SH 書式
+\fB#include <ulimit.h>\fP
+.PP
+\fBlong ulimit(int \fP\fIcmd\fP\fB, long \fP\fInewlimit\fP\fB);\fP
+.SH 説明
+Warning: this routine is obsolete.  Use \fBgetrlimit\fP(2), \fBsetrlimit\fP(2),
+and \fBsysconf\fP(3)  instead.  For the shell command \fBulimit\fP(), see
+\fBbash\fP(1).
+.PP
+\fBulimit\fP()  は呼び出し元のプロセスに関する制限のいくつかを取得・設定する。 \fIcmd\fP
+引き数には、以下の値のうちのどれか一つを与えることができる。
+.TP 
+\fBUL_GETFSIZE\fP
+ファイルサイズに関する制限を返す。単位は 512 バイト。
+.TP 
+\fBUL_SETFSIZE\fP
+ファイルサイズに関する制限を設定する。
+.TP 
+\fB3\fP
+(Linux では実装されていない)  データセグメントで指定できるアドレスの最大値を返す。
+.TP 
+\fB4\fP
+(実装されているが、対応するシンボリックな定数は存在しない)  プロセスがオープンできるファイル数の最大値を返す。
+.SH 返り値
+成功すると \fBulimit\fP()  は 0 または正の値を返す。 エラーが生じると \-1 を返し、 \fIerrno\fP を適切な値に設定する。
+.SH エラー
+.TP 
+\fBEPERM\fP
+An unprivileged process tried to increase a limit.
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBulimit\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.sp 1
+.SH 準拠
+SVr4, POSIX.1\-2001.  POSIX.1\-2008 は \fBulimit\fP()  を廃止予定としている。
+.SH 関連項目
+\fBbash\fP(1), \fBgetrlimit\fP(2), \fBsetrlimit\fP(2), \fBsysconf\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/wctomb.3 b/manual/LDP_man-pages/draft/man3/wctomb.3
new file mode 100644 (file)
index 0000000..97ce3e0
--- /dev/null
@@ -0,0 +1,75 @@
+.\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
+.\"
+.\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA)
+.\" This is free documentation; you can redistribute it and/or
+.\" modify it under the terms of the GNU General Public License as
+.\" published by the Free Software Foundation; either version 2 of
+.\" the License, or (at your option) any later version.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"   GNU glibc-2 source code and manual
+.\"   Dinkumware C library reference http://www.dinkumware.com/
+.\"   OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
+.\"   ISO/IEC 9899:1999
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1999 HANATAKA Shinya
+.\"         all rights reserved.
+.\" Translated Tue Jan 11 00:55:39 JST 2000
+.\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
+.\"
+.TH WCTOMB 3 2015\-08\-08 GNU "Linux Programmer's Manual"
+.SH 名前
+wctomb \- ワイド文字をマルチバイト列に変換する。
+.SH 書式
+.nf
+\fB#include <stdlib.h>\fP
+.PP
+\fBint wctomb(char *\fP\fIs\fP\fB, wchar_t \fP\fIwc\fP\fB);\fP
+.fi
+.SH 説明
+\fIs\fP が NULL でなければ、 \fBwctomb\fP()  関数はワイド文字 \fIwc\fP を マルチバイト表現に変換して \fIs\fP
+の指す文字配列に格納する。 同時に wctomb 関数のみが使用する静的で名前のないシフト状態を更新する。 この関数はマルチバイト表現の長さ、すなわち
+\fIs\fP に書き込まれた バイト数を返す。
+.PP
+プログラマーは \fIs\fP に少なくとも \fBMB_CUR_MAX\fP バイトの空きがあることを保証しなければならない。
+.PP
+.\" The Dinkumware doc and the Single UNIX specification say this, but
+.\" glibc doesn't implement this.
+\fIs\fP が NULL ならば、 \fBwctomb\fP()  関数は自分のみが使用するシフト状態を
+初期状態に戻して、文字符号がシフト状態に依存しているならばゼロ以外を シフト状態に依存しない場合にはゼロを返す。
+.SH 返り値
+\fIs\fP が NULL でない場合 \fBwctomb\fP()  関数はバイト配列 \fIs\fP に 書き込まれたバイト数を返す。\fIwc\fP
+が(現在のロケールにおいて)  マルチバイト列で表現できない場合には \-1 を返す。
+.PP
+\fIs\fP が NULL の場合 \fBwctomb\fP()  関数は文字符号がシフト状態に
+依存している場合にはゼロ以外、シフト状態に依存しない場合はゼロを返す。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBwctomb\fP()
+T}     Thread safety   MT\-Unsafe race
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, C99.
+.SH 注意
+\fBwctomb\fP()  関数の動作は現在のロケールの \fBLC_CTYPE\fP カテゴリーに依存している。
+.PP
+\fBwcrtomb\fP(3)  関数は同じ機能のより良いインターフェースを提供する。
+.SH 関連項目
+\fBMB_CUR_MAX\fP(3), \fBmblen\fP(3), \fBmbstowcs\fP(3), \fBmbtowc\fP(3), \fBwcrtomb\fP(3),
+\fBwcstombs\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/wordexp.3 b/manual/LDP_man-pages/draft/man3/wordexp.3
new file mode 100644 (file)
index 0000000..88b4ea4
--- /dev/null
@@ -0,0 +1,172 @@
+.\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl)
+.\"
+.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
+.\" This is free documentation; you can redistribute it and/or
+.\" modify it under the terms of the GNU General Public License as
+.\" published by the Free Software Foundation; either version 2 of
+.\" the License, or (at your option) any later version.
+.\"
+.\" The GNU General Public License's references to "object code"
+.\" and "executables" are to be interpreted as the output of any
+.\" document formatting or typesetting system, including
+.\" intermediate and printed output.
+.\"
+.\" This manual is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public
+.\" License along with this manual; if not, see
+.\" <http://www.gnu.org/licenses/>.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2004 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated Sun Sep 12 05:05:19 JST 2004
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\"
+.TH WORDEXP 3 2020\-11\-01 "" "Linux Programmer's Manual"
+.SH 名前
+wordexp, wordfree \- posix シェルのように単語の展開を行う
+.SH 書式
+\fB#include <wordexp.h>\fP
+.PP
+\fBint wordexp(const char *\fP\fIs\fP\fB, wordexp_t *\fP\fIp\fP\fB, int \fP\fIflags\fP\fB);\fP
+.PP
+\fBvoid wordfree(wordexp_t *\fP\fIp\fP\fB);\fP
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.RE
+.PP
+\fBwordexp\fP(), \fBwordfree\fP(): _XOPEN_SOURCE
+.SH 説明
+関数 \fBwordexp\fP()  はシェルのように文字列 \fIs\fP を展開し、 \fIp\fP で指し示す構造体に結果を返す。 データ型
+\fIwordexp_t\fP は少なくともフィールド \fIwe_wordc\fP, \fIwe_wordv\fP, \fIwe_offs\fP を持つ構造体である。
+フィールド \fIwe_wordc\fP は \fIsize_t\fP であり、 \fIs\fP を展開した結果に単語がいくつあるかを表す。 フィールド
+\fIwe_wordv\fP は \fIchar\ **\fP であり、見つかった単語の配列を指し示す。 \fIsize_t\fP 型のフィールド \fIwe_offs\fP
+は、 \fIwe_wordv\fP 配列にある初期要素のうちいくつが NULL で埋められるべきかを表すのに使われたりする (\fIflags\fP
+により決定される。下記を参照。)。
+.PP
+関数 \fBwordfree\fP()  は割り当てたメモリーを再度解放する。 より正確にいうと、この関数はその引き数を解放するのではなく、 配列
+\fIwe_wordv\fP とそれが指し示す文字列を解放する。
+.SS 文字列引き数
+この展開はシェルによるコマンドのパラメーターの展開 (\fBsh\fP(1)  を参照) と同じであるので、文字列 \fIs\fP
+はシェルコマンドパラメーターで不正とされる文字を含んではならない。 特にエスケープされていない改行、|, &, ;, <, >, (,
+), {, } 文字を コマンド置換やパラメーター置換の場面以外に含めてはならない。
+.PP
+引き数 \fIs\fP にクォートしていないコメント文字 # で始まる単語が含まれている場合には、 その単語とそれ以降の単語が無視されるか、 それとも #
+がコメント文字として扱わないかは、規定されていない。
+.SS 展開
+The expansion done consists of the following stages: tilde expansion
+(replacing \(tiuser by user's home directory), variable substitution
+(replacing $FOO by the value of the environment variable FOO), command
+substitution (replacing $(command) or \`command\` by the output of command),
+arithmetic expansion, field splitting, wildcard expansion, quote removal.
+.PP
+特殊なパラメーター ($@, $*, $#, $?, $\-, $$, $!, $0) の 展開結果は規定されていない。
+.PP
+フィールド分割は環境変数 $IFS を用いて行われる。 この環境変数が設定されていない場合、 フィールド区切り文字はスペース・タブ・改行である。
+.SS 出力される配列
+配列 \fIwe_wordv\fP は見つかった単語をを含み、最後に NULL が続く。
+.SS "flags 引き数"
+\fIflags\fP 引き数は以下の値のビット包含的 OR である:
+.TP 
+\fBWRDE_APPEND\fP
+見つかった単語を前回の呼び出し結果の配列に追加する。
+.TP 
+\fBWRDE_DOOFFS\fP
+初期状態である \fIwe_offs\fP 個の NULL を配列 \fIwe_wordv\fP に挿入する (これらは返される \fIwe_wordc\fP
+にはカウントされない)。
+.TP 
+\fBWRDE_NOCMD\fP
+コマンド置換を行わない。
+.TP 
+\fBWRDE_REUSE\fP
+引き数 \fIp\fP は前回の \fBwordexp\fP()  の呼び出し結果であり、 \fBwordfree\fP()  が (まだ) 呼び出されない。
+割り当てられた領域を再利用する。
+.TP 
+\fBWRDE_SHOWERR\fP
+通常はコマンド置換のときに \fIstderr\fP が \fI/dev/null\fP にリダイレクトされる。 このフラグは \fIstderr\fP
+をリダイレクトしないように指定する。
+.TP 
+\fBWRDE_UNDEF\fP
+未定義のシェル変数を展開しようとした場合に、エラーとして扱う。
+.SH 返り値
+成功した場合は 0 が返される。 エラーの場合は以下の 5 つの値のうちの 1 つが返される。
+.TP 
+\fBWRDE_BADCHAR\fP
+改行または |, &, ;, <, >, (, ), {, } のうちの 1 つが不正に出現した。
+.TP 
+\fBWRDE_BADVAL\fP
+未定義のシェル変数が参照され、かつ \fBWRDE_UNDEF\fP フラグでこれをエラーとして扱うように指示されている。
+.TP 
+\fBWRDE_CMDSUB\fP
+コマンド置換が要求されたが、 \fBWRDE_NOCMD\fP フラグでこれをエラーとして扱うように指示されていた。
+.TP 
+\fBWRDE_NOSPACE\fP
+メモリーが足りない。
+.TP 
+\fBWRDE_SYNTAX\fP
+対応する括弧がない、クォートが合致しないといった、 シェルの書式エラー。
+.SH バージョン
+\fBwordexp\fP()  と \fBwordfree\fP()  は、バージョン 2.1 以降の glibc で提供されている。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lbw30
+l l l.
+インターフェース       属性  値
+T{
+\fBwordexp\fP()
+T}     Thread safety   T{
+MT\-Unsafe race:utent const:env
+.br
+env sig:ALRM timer locale
+T}
+T{
+\fBwordfree\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.sp 1
+In the above table, \fIutent\fP in \fIrace:utent\fP signifies that if any of the
+functions \fBsetutent\fP(3), \fBgetutent\fP(3), or \fBendutent\fP(3)  are used in
+parallel in different threads of a program, then data races could occur.
+\fBwordexp\fP()  calls those functions, so we use race:utent to remind users.
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.SH EXAMPLES
+以下のサンプルプログラムの出力はだいたい "ls [a\-c]*.c" と同じになる。
+.PP
+.EX
+#include <stdio.h>
+#include <stdlib.h>
+#include <wordexp.h>
+
+int
+main(int argc, char **argv)
+{
+    wordexp_t p;
+    char **w;
+
+    wordexp("[a\-c]*.c", &p, 0);
+    w = p.we_wordv;
+    for (int i = 0; i < p.we_wordc; i++)
+        printf("%s\en", w[i]);
+    wordfree(&p);
+    exit(EXIT_SUCCESS);
+}
+.EE
+.SH 関連項目
+\fBfnmatch\fP(3), \fBglob\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/xcrypt.3 b/manual/LDP_man-pages/draft/man3/xcrypt.3
new file mode 100644 (file)
index 0000000..213c96a
--- /dev/null
@@ -0,0 +1,74 @@
+.\"  Copyright 2003 walter harms (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
+.\"  Distributed under GPL
+.\" %%%LICENSE_END
+.\"
+.\"  this is the 3rd type of interface for cryptographic routines
+.\"  1. encrypt() expects a bit field
+.\"  2. cbc_crypt() byte values
+.\"  3. xencrypt() a hexstring
+.\"  to bad to be true :(
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2004 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated Wed Sep 15 01:02:11 JST 2004
+.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
+.\"
+.TH XCRYPT 3 2019\-03\-06 "" "Linux Programmer's Manual"
+.SH 名前
+xencrypt, xdecrypt, passwd2des \- RFS パスワード暗号化
+.SH 書式
+\fB#include <rpc/des_crypt.h>\fP
+.PP
+\fBvoid passwd2des(char \fP\fI*passwd\fP\fB, char *\fP\fIkey\fP\fB);\fP
+.PP
+\fBint xencrypt(char *\fP\fIsecret\fP\fB, char *\fP\fIpasswd\fP\fB);\fP
+.PP
+\fBint xdecrypt(char *\fP\fIsecret\fP\fB, char *\fP\fIpasswd\fP\fB);\fP
+.SH 説明
+\fBWARNING\fP: Do not use these functions in new code. They do not achieve any
+type of acceptable cryptographic security guarantees.
+.LP
+関数 \fBpasswd2des\fP()  は任意の長さの文字列 \fIpasswd\fP をとり、長さ 8 の文字配列 \fIkey\fP を埋める。 配列
+\fIkey\fP は DES キーとして使うのに適している。 この配列の各バイトのビット 0 は奇数パリティである。 ここで説明されている残りの 2
+つの関数は、 この関数を使い、引き数 \fIpasswd\fP を DES キーに変換する。
+.PP
+.\" (over the alphabet 0123456789abcdefABCDEF),
+.\" (over the alphabet 0123456789abcdef)
+\fBxencrypt\fP()  関数は 16 進数で与えられた ASCII 文字列 \fIsecret\fP をとる。 この長さは 16
+の倍数でなければならない。 そして \fBpasswd2des\fP()  によって \fIpasswd\fP から導き出された DES キーを使い、
+\fIsecret\fP を暗号化する。 その結果は 16 進数文字列として \fIsecret\fP に再び同じ長さで出力される。
+.PP
+\fBxdecrypt\fP()  関数は逆の操作を行う。
+.SH 返り値
+関数 \fBxencrypt\fP()  と \fBxdecrypt\fP()  は、成功した場合に 1 を返し、失敗した場合に 0 を返す。
+.SH バージョン
+これらの関数はバージョン 2.1 以降の glibc で提供されている。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw37 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBpasswd2des\fP(),
+\fBxencrypt\fP(),
+\fBxdecrypt\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.sp 1
+.SH バグ
+上記のインクルードファイルにプロトタイプがない。
+.SH 関連項目
+\fBcbc_crypt\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
diff --git a/manual/LDP_man-pages/draft/man3/xdr.3 b/manual/LDP_man-pages/draft/man3/xdr.3
new file mode 100644 (file)
index 0000000..533a3b8
--- /dev/null
@@ -0,0 +1,397 @@
+.\" This page was taken from the 4.4BSD-Lite CDROM (BSD license)
+.\"
+.\" %%%LICENSE_START(BSD_ONELINE_CDROM)
+.\" This page was taken from the 4.4BSD-Lite CDROM (BSD license)
+.\" %%%LICENSE_END
+.\"
+.\" @(#)xdr.3n 2.2 88/08/03 4.0 RPCSRC; from 1.16 88/03/14 SMI
+.\"
+.\" 2007-12-30, mtk, Convert function prototypes to modern C syntax
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1999 HANATAKA Shinya
+.\"         all rights reserved.
+.\" Translated Tue Jan  4 20:48:51 JST 2000
+.\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
+.\"
+.TH XDR 3 2017\-09\-15 "" "Linux Programmer's Manual"
+.SH 名前
+xdr \- 外部データ表現(XDR)のためのライブラリルーティン
+.SH 書式と説明
+これらのルーティンは C プログラマーがマシン非依存な形式で 任意のデータ構造体を記述することを可能にする。
+リモートプロシージャーコールのためのデータはこれらのルーティンを 使用して送信される。
+.PP
+以下に示すプロトタイプ宣言は \fI<rpc/xdr.h>\fP で行われており、その中では次の型が使用される。
+.PP
+.RS 4
+.EX
+\fBtypedef int \fP\fIbool_t\fP\fB;\fP
+.PP
+\fBtypedef bool_t (*\fP\fIxdrproc_t\fP\fB) (XDR *, void *,...);\fP
+.EE
+.RE
+.PP
+\fIXDR\fP 型の宣言については、 \fI<rpc/xdr.h>\fP を参照。
+.PP
+.nf
+\fBbool_t xdr_array(XDR *\fP\fIxdrs\fP\fB, char **\fP\fIarrp\fP\fB, unsigned int *\fP\fIsizep\fP\fB,\fP
+\fB                 unsigned int \fP\fImaxsize\fP\fB, unsigned int \fP\fIelsize\fP\fB,\fP
+\fB                 xdrproc_t \fP\fIelproc\fP\fB);\fP
+.fi
+.IP
+可変長の配列とそれに対応する外部表現とを変換する基本フィルター。 引き数 \fIarrp\fP は配列へのポインターのアドレスであり、 \fIsizep\fP
+は配列の要素数のアドレスである。 これらの要素数は \fImaxsize\fP を超えてはならない。 引き数 \fIelsize\fP は各配列の要素の
+\fIsizeof\fP であり、 \fIelproc\fP は配列要素を C 形式からその外部表現に変換するための XDR フィルターである。
+このルーティンは成功した場合には 1 を返す。 失敗した場合にはゼロを返す。
+.PP
+.nf
+\fBbool_t xdr_bool(XDR *\fP\fIxdrs\fP\fB, bool_t *\fP\fIbp\fP\fB);\fP
+.fi
+.IP
+真偽値(C の int)とその外部表現とを変換する基本フィルター。 データをエンコードする時、このフィルターは 1 また 0 の値を生成する。
+このルーティンは成功した場合には 1 を返す。 失敗した場合には 0 を返す。
+.PP
+.nf
+\fBbool_t xdr_bytes(XDR *\fP\fIxdrs\fP\fB, char **\fP\fIsp\fP\fB, unsigned int *\fP\fIsizep\fP\fB,\fP
+\fB                 unsigned int \fP\fImaxsize\fP\fB);\fP
+.fi
+.IP
+ある長さのバイト文字列とその外部表現とを変換する基本フィルター。 引き数 \fIsp\fP は文字列ポインターのアドレスである。文字列の長さは
+\fIsizep\fP のアドレスに置く。文字列は \fImaxsize\fP より長くてはいけない。 このルーティンは成功した場合には 1 を返す。
+失敗した場合には 0 を返す。
+.PP
+.nf
+\fBbool_t xdr_char(XDR *\fP\fIxdrs\fP\fB, char *\fP\fIcp\fP\fB);\fP
+.fi
+.IP
+C の文字(char)とその外部表現との間を変換する基本フィルター。 このルーティンは成功した場合には 1 を返す。 失敗した場合には 0 を返す。
+注意: エンコードされたデータは詰め込まれておらず、それぞれ 4 バイトを 占める。文字の配列の場合には \fBxdr_bytes\fP(),
+\fBxdr_opaque\fP(), \fBxdr_string\fP()  などを考慮した方が良い。
+.PP
+.nf
+\fBvoid xdr_destroy(XDR *\fP\fIxdrs\fP\fB);\fP
+.fi
+.IP
+このマクロは XDR ストリーム \fIxdrs\fP に関連付けられた破壊ルーティンを呼び出す。
+破壊には通常、ストリームに関連付けられた私的データ構造体の解放が含まれている。 \fBxdr_destroy\fP()  の呼び出しの後に \fIxdrs\fP
+を使用することは未定義である。
+.PP
+.nf
+\fBbool_t xdr_double(XDR *\fP\fIxdrs\fP\fB, double *\fP\fIdp\fP\fB);\fP
+.fi
+.IP
+C の \fI倍精度数 (double)\fP とその外部表現との変換を行なう基本フィルター。 このルーティンは成功した場合は 1 を返す。 失敗した場合は
+0 を返す。
+.PP
+.nf
+\fBbool_t xdr_enum(XDR *\fP\fIxdrs\fP\fB, enum_t *\fP\fIep\fP\fB);\fP
+.fi
+.IP
+C の \fIenum\fP (実際には int)とその外部表現との変換を行なう基本フィルター。 このルーティンは成功した場合は 1 を返す。 失敗した場合は
+0 を返す。
+.PP
+.nf
+\fBbool_t xdr_float(XDR *\fP\fIxdrs\fP\fB, float *\fP\fIfp\fP\fB);\fP
+.fi
+.IP
+C の \fI浮動小数点数 (float)\fP とその外部表現との変換を行なう基本フィルター。 このルーティンは成功した場合は 1 を返す。 失敗した場合は
+0 を返す。
+.PP
+.nf
+\fBvoid xdr_free(xdrproc_t \fP\fIproc\fP\fB, char *\fP\fIobjp\fP\fB);\fP
+.fi
+.IP
+汎用解放(free)ルーティン。最初の引き数はオブジェクトを解放するための XDR ルーティンである。二番目の引き数はそのオブジェクト自身へのポインター
+である。注意: このルーティンに渡されるポインターは \fI解放されない\fP が、このポインターの指すデータは(再帰的に)  \fI解放される\fP。
+.PP
+.nf
+\fBunsigned int xdr_getpos(XDR *\fP\fIxdrs\fP\fB);\fP
+.fi
+.IP
+このマクロは XDR ストリーム \fIxdrs\fP に関連付けられた位置取得ルーティンを呼び出す。 このルーティンは XDR
+バイトストリームの位置を指示する符号無し整数を返す。 XDR ストリームの機能としてこの数値で単純な算術作業ができることが
+期待されてるいる。しかしながら XDR ストリームの実体はこれを保証する必要はない。
+.PP
+.nf
+\fBlong *xdr_inline(XDR *\fP\fIxdrs\fP\fB, int \fP\fIlen\fP\fB);\fP
+.fi
+.IP
+このマクロは XDR ストリーム \fIxdrs\fP に関連付けられた内部(inline)ルーティンを呼び出す。
+ルーティンはストリームのバッファーの連続する断片へのポインターを返す。 \fIlen\fP は要求するバッファーのバイト長である。 注意: ポインターは
+\fIlong\ *\fP にキャストされる。
+.IP
+警告: \fBxdr_inline\fP()  はバッファーの連続する断片を割り当てることができなかった場合には NULL (0)を返すかもしれない。
+どの場合もその動作はストリームの実体によって変化するかもしれない。 これは効率化のために存在している。
+.PP
+.nf
+\fBbool_t xdr_int(XDR *\fP\fIxdrs\fP\fB, int *\fP\fIip\fP\fB);\fP
+.fi
+.IP
+C の整数(int)とその外部表現とを変換するための基本フィルター。 このルーティンは成功した場合は 1 を返す。 失敗した場合はゼロを返す。
+.PP
+.nf
+\fBbool_t xdr_long(XDR *\fP\fIxdrs\fP\fB, long *\fP\fIlp\fP\fB);\fP
+.fi
+.IP
+C の \fIlong\fP 整数とそのその外部表現とを変換するための基本フィルター。 このルーティンは成功した場合は 1 を返す。
+失敗した場合はゼロを返す。
+.PP
+.nf
+\fBvoid xdrmem_create(XDR *\fP\fIxdrs\fP\fB, char *\fP\fIaddr\fP\fB, unsigned int \fP\fIsize\fP\fB,\fP
+\fB                   enum xdr_op \fP\fIop\fP\fB);\fP
+.fi
+.IP
+このルーティンは \fIxdrs\fP によって指されている XDR ストリームオブジェクトを初期化する。 ストリームのデータは \fIaddr\fP
+位置にあるメモリーの塊から読み書きされる。 その長さはバイト単位で \fIsize\fP 超えてはいけない。 \fIop\fP は XDR
+ストリームの変換方向を決定する (\fBXDR_ENCODE\fP, \fBXDR_DECODE\fP, \fBXDR_FREE\fP のどれか)。
+.PP
+.nf
+\fBbool_t xdr_opaque(XDR *\fP\fIxdrs\fP\fB, char *\fP\fIcp\fP\fB, unsigned int \fP\fIcnt\fP\fB);\fP
+.fi
+.IP
+固定長の不明データとその外部表現との変換を行なう基本フィルター。 引き数 \fIcp\fP は不明オブジェクトのアドレスであり \fIcnt\fP
+はそのバイト単位の大きさである。 このルーティンは成功した場合は 1 を返す。 失敗した場合はゼロを返す。
+.PP
+.nf
+\fBbool_t xdr_pointer(XDR *\fP\fIxdrs\fP\fB, char **\fP\fIobjpp\fP\fB,\fP
+\fB                   unsigned int \fP\fIobjsize\fP\fB, xdrproc_t \fP\fIxdrobj\fP\fB);\fP
+.fi
+.IP
+\fBxdr_reference\fP()  と同様であるが、これがヌルポインターを番号化するのに対して \fBxdr_reference\fP()
+はそうしない点が異なっている。これにより、 \fBxdr_pointer\fP()  は二分木や連結リストのような再帰的なデータ構造体を 表現できる。
+.PP
+.nf
+\fBvoid xdrrec_create(XDR *\fP\fIxdrs\fP\fB, unsigned int \fP\fIsendsize\fP\fB,\fP
+\fB                   unsigned int \fP\fIrecvsize\fP\fB, char *\fP\fIhandle\fP\fB,\fP
+\fB                   int (*\fP\fIreadit\fP\fB) (char *, char *, int),\fP
+\fB                   int (*\fP\fIwriteit\fP\fB) (char *, char *, int));\fP
+.fi
+.IP
+このルーティンは \fIxdrs\fP で指された XDR ストリームオブジェクトを初期化する。 ストリームのデータは大きさ \fIsendsize\fP
+のバッファーへ書き込まれる。 \fIsendsize\fP をゼロにすると、システムに適切なデフォルトを使用するように指示する。 ストリームのデータは大きさ
+\fIrecvsize\fP のバッファーから読み込まれる。これもゼロを渡すことで適切なデフォルトに 設定することができる。
+ストリームの出力バッファーが一杯の場合は \fIwriteit\fP が呼び出される。同様にストリーム入力バッファーが空の場合には \fIreadit\fP
+が呼び出される。これらの二つのルーティンの動作はシステムコールの \fBread\fP(2)  や \fBwrite\fP(2)
+と似ているが、前者のルーティンは最初の引き数として \fIhandle\fP が渡される点で異なっている。 注意: XDR ストリームの \fIop\fP
+は呼び出し側で設定しなければならない。
+.IP
+Warning: to read from an XDR stream created by this API, you'll need to call
+\fBxdrrec_skiprecord\fP()  first before calling any other XDR APIs.  This
+inserts additional bytes in the stream to provide record boundary
+information.  Also, XDR streams created with different \fBxdr*_create\fP APIs
+are not compatible for the same reason.
+.PP
+.nf
+\fBbool_t xdrrec_endofrecord(XDR *\fP\fIxdrs\fP\fB, int \fP\fIsendnow\fP\fB);\fP
+.fi
+.IP
+このルーティンは \fBxdrrec_create\fP()  によって作成されたストリームに対してのみ呼び出すことができる。
+出力バッファーのデータは完全なレコードとして印され、 \fIsendnow\fP がゼロでない場合には出力バッファーは書き出される。
+このルーティンは成功した場合は 1 を返す。失敗した場合はゼロを返す。
+.PP
+.nf
+\fBbool_t xdrrec_eof(XDR *\fP\fIxdrs\fP\fB);\fP
+.fi
+.IP
+このルーティンは \fBxdrrec_create\fP()  によって作成されたストリームに対してのみ呼び出すことができる。
+ストリームの現在のレコードの残りを消費した後に、 ストリームに入力が残っていない場合には 1 を返す。 それ以外の場合はゼロを返す。
+.PP
+.nf
+\fBbool_t xdrrec_skiprecord(XDR *\fP\fIxdrs\fP\fB);\fP
+.fi
+.IP
+このルーティンは \fBxdrrec_create\fP()  によって作成されたストリームに対してのみ呼び出すことができる。 XDR
+の実装にそのストリームの入力バッファーの現在のレコードの残りを 捨てるように伝える。このルーティンは成功した場合は 1 を返す。
+失敗した場合はゼロを返す。
+.PP
+.nf
+\fBbool_t xdr_reference(XDR *\fP\fIxdrs\fP\fB, char **\fP\fIpp\fP\fB, unsigned int \fP\fIsize\fP\fB,\fP
+\fB                     xdrproc_t \fP\fIproc\fP\fB);\fP
+.fi
+.IP
+構造体へのポインター追跡を提供する基本ルーティン。 引き数 \fIpp\fP はポインターのアドレスである。 \fIsize\fP は \fI*pp\fP
+が指している構造体の \fIsizeof\fP である。 \fIproc\fP はその構造体の C 形式と外部表現との変換を行なう XDR プロシージャーである。
+このルーティンは成功した場合 1 を返す。 失敗した場合はゼロを返す。
+.IP
+警告: このルーティンはヌルポインターを理解することができない。かわりに \fBxdr_pointer\fP()  を使用すること。
+.PP
+.nf
+\fBxdr_setpos(XDR *\fP\fIxdrs\fP\fB, unsigned int \fP\fIpos\fP\fB);\fP
+.fi
+.IP
+このマクロは XDR ストリーム \fIxdrs\fP に関連付けられた位置設定ルーティンを呼び出す。引き数 \fIpos\fP は \fBxdr_getpos\fP()
+によって取得される位置数値である。 このルーティンは XDR ストリームの位置の変更ができた場合には 1 を返す。 それ以外の場合は 0 を返す。
+.IP
+警告: ある種の XDR ストリームの場合は位置の変更を行なうことが困難である。 それでこのルーティンはある種のストリームの場合には成功し、別の種類の
+場合には失敗するかもしれない。
+.PP
+.nf
+\fBbool_t xdr_short(XDR *\fP\fIxdrs\fP\fB, short *\fP\fIsp\fP\fB);\fP
+.fi
+.IP
+C の \fIshort\fP 整数とその外部表現との変換を行なう基本フィルター。 このルーティンは成功すると 1 を返す。 失敗した場合はゼロを返す。
+.PP
+.nf
+\fBvoid xdrstdio_create(XDR *\fP\fIxdrs\fP\fB, FILE *\fP\fIfile\fP\fB, enum xdr_op \fP\fIop\fP\fB);\fP
+.fi
+.IP
+このルーティンは \fIxdrs\fP で指された XDR ストリームオブジェクトを初期化する。 XDR ストリームに読み書きれたデータは \fIstdio\fP
+ストリーム \fIfile\fP が使用される。 \fIop\fP 引き数は XDR ストリームの変換方向を決定する (\fBXDR_ENCODE\fP,
+\fBXDR_DECODE\fP, \fBXDR_FREE\fP のどれか)。
+.IP
+警告: このような XDR ストリームに関連付けられた破壊ルーティンは \fIfile\fP ストリームに対して \fBfflush\fP(3)  を呼び出すが
+\fBfclose\fP(3)  を呼び出すことはない。
+.PP
+.nf
+\fBbool_t xdr_string(XDR *\fP\fIxdrs\fP\fB, char **\fP\fIsp\fP\fB, unsigned int \fP\fImaxsize\fP\fB);\fP
+.fi
+.IP
+C の文字列とそれに対応する外部表現とを変換するための基本フィルター。 文字列は \fImaxsize\fP より長くはできない。 注意: \fIsp\fP
+は文字列へのポインターのアドレスである。 このルーティンは成功した場合は 1 を返す。 失敗した場合はゼロを返す。
+.PP
+.nf
+\fBbool_t xdr_u_char(XDR *\fP\fIxdrs\fP\fB, unsigned char *\fP\fIucp\fP\fB);\fP
+.fi
+.IP
+C の \fI符号無し文字 (unsigned char)\fP とその外部表現とを変換する基本フィルター。 このルーティンは成功した場合は 1 を返す。
+失敗した場合はゼロを返す。
+.PP
+.nf
+\fBbool_t xdr_u_int(XDR *\fP\fIxdrs\fP\fB, unsigned *\fP\fIup\fP\fB);\fP
+.fi
+.IP
+C の \fI符号無し整数 (unsigned)\fP とその外部表現を変換するための基本フィルター。 このルーティンは成功した場合は 1 を返す。
+失敗した場合はゼロを返す。
+.PP
+.nf
+\fBbool_t xdr_u_long(XDR *\fP\fIxdrs\fP\fB, unsigned long *\fP\fIulp\fP\fB);\fP
+.fi
+.IP
+C の \fIunsigned long\fP 整数とその外部表現を変換するための基本フィルター。 このルーティンは成功した場合は 1 を返す。
+失敗した場合はゼロを返す。
+.PP
+.nf
+\fBbool_t xdr_u_short(XDR *\fP\fIxdrs\fP\fB, unsigned short *\fP\fIusp\fP\fB);\fP
+.fi
+.IP
+C の \fIunsigned short\fP 整数とその外部表現を変換するための基本フィルター。 このルーティンは成功した場合は 1 を返す。
+失敗した場合はゼロを返す。
+.PP
+.nf
+\fBbool_t xdr_union(XDR *\fP\fIxdrs\fP\fB, int *\fP\fIdscmp\fP\fB, char *\fP\fIunp\fP\fB,\fP
+\fB                 struct xdr_discrim *\fP\fIchoices\fP\fB,\fP
+\fB                 xdrproc_t \fP\fIdefaultarm\fP\fB);     /* may equal NULL */\fP
+.fi
+.IP
+分別可能な C の \fI共用体 (union)\fP とその外部形式とを変換する基本フィルター。 最初に \fIdscmp\fP
+として与えられた共用体の分別要素が変換される。 この分別要素は常に \fIenum_t\fP である。 次に \fIunp\fP の位置の共用体が変換される。引き数
+\fIchoices\fP は \fBxdr_discrim\fP()  構造体の配列へのポインターである。各構造体は [\fIvalue\fP,\fIproc\fP]
+の順序付きペアを格納している。 もし共用体の分別要素が関連付けられた \fIvalue\fP と等しい場合には、共用体を変換するために \fIproc\fP
+が呼び出される。 \fBxdr_discrim\fP()  構造体の配列の最後は、値 NULL のルーティン を指定することで示される。 分別要素が
+\fIchoices\fP 配列の中に見つからなかった場合、 \fIdefaultarm\fP が (NULL でなければ) 呼び出される。 成功した場合は 1
+を返す。失敗した場合はゼロを返す。
+.PP
+.nf
+\fBbool_t xdr_vector(XDR *\fP\fIxdrs\fP\fB, char *\fP\fIarrp\fP\fB, unsigned int \fP\fIsize\fP\fB,\fP
+\fB                  unsigned int \fP\fIelsize\fP\fB, xdrproc_t \fP\fIelproc\fP\fB);\fP
+.fi
+.IP
+固定長の配列とそれらが対応する外部表現とを変換する基本フィルター。 引き数 \fIarrp\fP は配列へのポインターのアドレスである。一方で \fIsize\fP
+は配列の要素数そのものである。引き数 \fIelsize\fP は配列の各要素の \fIsizeof\fP で、 \fIelproc\fP は配列の要素を C
+形式からその外部表現へと変換する XDR フィルターである。 このルーティンは成功した場合 1 を返す。 失敗した場合はゼロを返す。
+.PP
+.nf
+\fBbool_t xdr_void(void);\fP
+.fi
+.IP
+このルーティンは常に 1 を返す。 これは何も行なわないが、関数引き数が必要な RPC ルーティンに渡すことができる。
+.PP
+.nf
+\fBbool_t xdr_wrapstring(XDR *\fP\fIxdrs\fP\fB, char **\fP\fIsp\fP\fB);\fP
+.fi
+.IP
+\fBxdr_string(xdrs, sp, \s-1MAXUN.UNSIGNED\s0 );\fP を呼び出す基本ルーティン。 ここで
+\fBMAXUN.UNSIGNED\fP は符号無し整数(unsigned int)の最大値である。 \fBxdr_wrapstring\fP()  は、 RPC
+パッケージは二つの XDR ルーティンの最大値を引き数として渡すため便利である。 \fBxdr_string\fP()
+は最も頻繁に利用される基本ルーティンであるが三つを要求する。 成功した場合は 1 を返す、失敗した場合はゼロを返す。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw31 lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBxdr_array\fP(),
+\fBxdr_bool\fP(),
+.br
+\fBxdr_bytes\fP(),
+\fBxdr_char\fP(),
+.br
+\fBxdr_destroy\fP(),
+\fBxdr_double\fP(),
+.br
+\fBxdr_enum\fP(),
+\fBxdr_float\fP(),
+.br
+\fBxdr_free\fP(),
+\fBxdr_getpos\fP(),
+.br
+\fBxdr_inline\fP(),
+\fBxdr_int\fP(),
+.br
+\fBxdr_long\fP(),
+\fBxdrmem_create\fP(),
+.br
+\fBxdr_opaque\fP(),
+\fBxdr_pointer\fP(),
+.br
+\fBxdrrec_create\fP(),
+\fBxdrrec_eof\fP(),
+.br
+\fBxdrrec_endofrecord\fP(),
+.br
+\fBxdrrec_skiprecord\fP(),
+.br
+\fBxdr_reference\fP(),
+\fBxdr_setpos\fP(),
+.br
+\fBxdr_short\fP(),
+\fBxdrstdio_create\fP(),
+.br
+\fBxdr_string\fP(),
+\fBxdr_u_char\fP(),
+.br
+\fBxdr_u_int\fP(),
+\fBxdr_u_long\fP(),
+.br
+\fBxdr_u_short\fP(),
+\fBxdr_union\fP(),
+.br
+\fBxdr_vector\fP(),
+\fBxdr_void\fP(),
+.br
+\fBxdr_wrapstring\fP()
+T}     Thread safety   MT\-Safe
+.TE
+.sp 1
+.SH 関連項目
+\fBrpc\fP(3)
+.PP
+以下のマニュアル:
+.RS
+eXternal Data Representation Standard: Protocol Specification
+.br
+eXternal Data Representation: Sun Technical Notes
+.br
+\fIXDR: External Data Representation Standard\fP, RFC\ 1014, Sun Microsystems,
+Inc., USC\-ISI.
+.RE
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。